@mindexec/cli 0.2.340 → 0.2.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codex-runtime.js +255 -31
- package/package.json +1 -1
- package/remote-hub.js +80 -2
- package/scripts/remote-fast-live-rate-smoke.mjs +19 -3
- package/scripts/remote-fast-mdm-browser-smoke.mjs +28 -2
- package/scripts/remote-hub-smoke.mjs +32 -2
- package/server.js +1363 -28
- package/wwwroot/_headers +50 -17
- package/wwwroot/assets/AdminDashboardPage-B2vz2Px9.css +1 -0
- package/wwwroot/assets/AdminDashboardPage-DpUfWSRs.js +1 -0
- package/wwwroot/assets/AppSidebar-CBqvLonm.js +1 -0
- package/wwwroot/assets/AuthPages-Cd5fYgU0.js +1 -0
- package/wwwroot/assets/AuthPages-DFGWKWuB.css +1 -0
- package/wwwroot/assets/CodePage-Bncc352E.css +1 -0
- package/wwwroot/assets/CodePage-D9-cUf4A.js +87 -0
- package/wwwroot/assets/CompanyCorePage-ChBnq1ve.css +1 -0
- package/wwwroot/assets/CompanyCorePage-D0byTW77.js +13 -0
- package/wwwroot/assets/ExecutionModePage-DtMDlqYc.js +18 -0
- package/wwwroot/assets/ExecutionModePage-TLuld9l3.css +1 -0
- package/wwwroot/assets/LaunchLeadCapture-CiRI1shz.css +1 -0
- package/wwwroot/assets/LaunchLeadCapture-CqeoHfvb.js +1 -0
- package/wwwroot/assets/MarketingHome-DPzaYzA_.css +1 -0
- package/wwwroot/assets/MarketingHome-DbWyEAya.js +1 -0
- package/wwwroot/assets/MindCanvas-CME1KpAo.js +48 -0
- package/wwwroot/assets/MindCanvas-DiQlUDJu.css +1 -0
- package/wwwroot/assets/PlanMasterPage-CJ36rep-.css +1 -0
- package/wwwroot/assets/PlanMasterPage-mhlZZK19.js +4 -0
- package/wwwroot/assets/PricingPage-Cg_0i_ZR.css +1 -0
- package/wwwroot/assets/PricingPage-zVu8-CrF.js +1 -0
- package/wwwroot/assets/ToolPages-DIB187pZ.css +1 -0
- package/wwwroot/assets/ToolPages-DTSqKzQd.js +28 -0
- package/wwwroot/assets/YouTubeSearchPage-IPPa_BIH.css +1 -0
- package/wwwroot/assets/YouTubeSearchPage-xGiaLNqk.js +4 -0
- package/wwwroot/assets/app-runtime-xD2Z3NdN.js +1 -0
- package/wwwroot/assets/canvas-runtime-D1gfvqKp.js +44 -0
- package/wwwroot/assets/code-agent-runtime-B5PPZd1t.js +74 -0
- package/wwwroot/assets/executionModeSettings-NJqurj-o.js +1 -0
- package/wwwroot/assets/index-CP_xejf2.css +1 -0
- package/wwwroot/assets/index-CZS-9WFu.js +2 -0
- package/wwwroot/assets/marketingTools-DN_rnHeB.js +4 -0
- package/wwwroot/assets/mindCanvasSearchWorker-BzPMsHOB.js +1 -0
- package/wwwroot/assets/mindexecution-mindcanvas.png +0 -0
- package/wwwroot/assets/mindexecution-prod-home-current.png +0 -0
- package/wwwroot/assets/mindexecution-prod-pricing-current.png +0 -0
- package/wwwroot/assets/pricingCheckoutShell-O-DnwmbU.js +1 -0
- package/wwwroot/assets/runtimeSettingsPersistenceProjection-BoNWmYjU.js +1 -0
- package/wwwroot/assets/storage-CGDupGH4.js +1 -0
- package/wwwroot/assets/supabaseAuthAdapter-C3z334Qw.js +44 -0
- package/wwwroot/assets/toolHandoff-D5e5f7t5.js +4 -0
- package/wwwroot/assets/vendor-icons-oiW_NVNO.js +681 -0
- package/wwwroot/assets/vendor-msgpack-BE8aAsr3.js +1 -0
- package/wwwroot/assets/vendor-react-BXzpOyCS.js +40 -0
- package/wwwroot/favicon.svg +7 -0
- package/wwwroot/index.html +22 -736
- package/wwwroot/manifest.webmanifest +18 -21
- package/wwwroot/robots.txt +1 -1
- package/wwwroot/service-worker.js +5 -31
- package/wwwroot/sitemap.xml +21 -9
- package/wwwroot/MindExecution.Web.styles.css +0 -3
- package/wwwroot/_content/MindExecution.Plugins.Admin/css/admin-dashboard.css +0 -546
- package/wwwroot/_content/MindExecution.Plugins.Directory/MindExecution.Plugins.Directory.u7utcng611.bundle.scp.css +0 -7
- package/wwwroot/_content/MindExecution.Plugins.Directory/background.png +0 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/directory-manager.js +0 -202
- package/wwwroot/_content/MindExecution.Plugins.Directory/exampleJsInterop.js +0 -6
- package/wwwroot/_content/MindExecution.Plugins.YouTube/css/youtube-search.css +0 -251
- package/wwwroot/_content/MindExecution.Shared/MindExecution.Shared.wsano1j4wp.bundle.scp.css +0 -4
- package/wwwroot/_content/MindExecution.Shared/css/admin-dashboard.css +0 -559
- package/wwwroot/_content/MindExecution.Shared/css/app.css +0 -1
- package/wwwroot/_content/MindExecution.Shared/css/mind-map-overrides.css +0 -3705
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Bold.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Regular.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/js/agent-visualization.js +0 -359
- package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +0 -1631
- package/wwwroot/_content/MindExecution.Shared/js/code-master.js +0 -8316
- package/wwwroot/_content/MindExecution.Shared/js/file-system-helper.js +0 -639
- package/wwwroot/_content/MindExecution.Shared/js/helpers/InfiniteGridHelper.js +0 -109
- package/wwwroot/_content/MindExecution.Shared/js/marked.min.js +0 -69
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +0 -12909
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js.backup +0 -1059
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +0 -24635
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dev-guards.js +0 -325
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js +0 -1491
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js.bak +0 -434
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-glow-shader.js +0 -260
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +0 -7829
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-plan-worker.js +0 -160
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +0 -10400
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-logic-workers.js +0 -977
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-menu-manager.js +0 -1531
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-multi-select.js +0 -1716
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-node-search-worker.js +0 -554
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +0 -4578
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js +0 -489
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js.backup +0 -372
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-pipeline.js +0 -2203
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-lod-system.js +0 -646
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-overlay-v2.js +0 -4735
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js +0 -2383
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js.backup +0 -1258
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-visibility-worker.js +0 -890
- package/wwwroot/_content/MindExecution.Shared/js/mindmap-toolbar.js +0 -639
- package/wwwroot/_content/MindExecution.Shared/js/native-drop-handler.js +0 -170
- package/wwwroot/_content/MindExecution.Shared/js/plan-master.js +0 -788
- package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +0 -90
- package/wwwroot/_content/MindExecution.Shared/js/texture-worker-manager.js +0 -188
- package/wwwroot/_content/MindExecution.Shared/js/texture-worker.js +0 -208
- package/wwwroot/_content/MindExecution.Shared/js/three.min.js +0 -6
- package/wwwroot/_content/MindExecution.Shared/js/titlebar-handler.js +0 -191
- package/wwwroot/_content/MindExecution.Shared/js/token-manager.js +0 -37
- package/wwwroot/_content/MindExecution.Shared/js/token-worker.js +0 -28
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js +0 -5626
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js.map +0 -7
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/css/all.min.css +0 -9
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
- package/wwwroot/_content/MindExecution.Shared/models/all-MiniLM-L6-v2-quantized.onnx +0 -0
- package/wwwroot/_content/MindExecution.Shared/models/vocab.txt +0 -30522
- package/wwwroot/_framework/Google.Protobuf.9h59ukbel7.dll +0 -0
- package/wwwroot/_framework/Markdig.d1j7v41cl1.dll +0 -0
- package/wwwroot/_framework/MessagePack.Annotations.l6qv48kgpt.dll +0 -0
- package/wwwroot/_framework/MessagePack.eqoptzx9d5.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Authorization.k7dsih5y5g.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.6nyje9sa0g.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.Authorization.iycd6unprw.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.Web.487u3twia4.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Components.WebAssembly.d0gcnmlxxz.dll +0 -0
- package/wwwroot/_framework/Microsoft.AspNetCore.Metadata.h4yevl9adi.dll +0 -0
- package/wwwroot/_framework/Microsoft.CSharp.8bsm8vx6su.dll +0 -0
- package/wwwroot/_framework/Microsoft.Data.Sqlite.jdlxgv2jtg.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.4gjazp7kjf.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Abstractions.gocudnvz7b.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Relational.lt4rsvinuo.dll +0 -0
- package/wwwroot/_framework/Microsoft.EntityFrameworkCore.Sqlite.69luj0fa9r.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Caching.Abstractions.364t4jh3zz.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Caching.Memory.izlxhpzosu.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.8zq7hh41o7.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.Abstractions.8if74zs6ea.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Configuration.Json.duvlngw8i0.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.t2hh9kvx0o.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyInjection.n4tg99oy8l.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.DependencyModel.h0d06ixk3e.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Logging.Abstractions.rl32bkx2sd.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Logging.dlht1xei0t.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Options.qeunebioml.dll +0 -0
- package/wwwroot/_framework/Microsoft.Extensions.Primitives.18cr6vnuuz.dll +0 -0
- package/wwwroot/_framework/Microsoft.IO.RecyclableMemoryStream.r915vovvw4.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Abstractions.1ejljk3erv.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.JsonWebTokens.1596zr8gne.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Logging.229uyvpgio.dll +0 -0
- package/wwwroot/_framework/Microsoft.IdentityModel.Tokens.9sibtajc9f.dll +0 -0
- package/wwwroot/_framework/Microsoft.JSInterop.WebAssembly.ryia5gxiad.dll +0 -0
- package/wwwroot/_framework/Microsoft.JSInterop.ew9vz9o332.dll +0 -0
- package/wwwroot/_framework/Microsoft.ML.OnnxRuntime.w9deo1m5ss.dll +0 -0
- package/wwwroot/_framework/Microsoft.ML.Tokenizers.cm2vuv2z61.dll +0 -0
- package/wwwroot/_framework/Microsoft.NET.StringTools.3qbrf4v2ki.dll +0 -0
- package/wwwroot/_framework/MimeMapping.og9ys58ylm.dll +0 -0
- package/wwwroot/_framework/MindExecution.Core.y7ffihhajj.dll +0 -0
- package/wwwroot/_framework/MindExecution.Kernel.l5y3qroa7p.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Admin.uuf238xa0h.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Business.nyr3v25v48.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Concept.l9z9tx9svt.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.Directory.ju87t8h3zs.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.PlanMaster.krn3jgvjpa.dll +0 -0
- package/wwwroot/_framework/MindExecution.Plugins.YouTube.5m53srfud6.dll +0 -0
- package/wwwroot/_framework/MindExecution.Shared.ojp3psugsm.dll +0 -0
- package/wwwroot/_framework/MindExecution.Web.82k6ktlkfg.dll +0 -0
- package/wwwroot/_framework/Newtonsoft.Json.a56zs13vug.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.batteries_v2.rrd1nzawpp.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.core.1dxloztpfz.dll +0 -0
- package/wwwroot/_framework/SQLitePCLRaw.provider.e_sqlite3.oekyzl53i1.dll +0 -0
- package/wwwroot/_framework/Supabase.Core.s1pkj4aj0l.dll +0 -0
- package/wwwroot/_framework/Supabase.Functions.qz4nu782sg.dll +0 -0
- package/wwwroot/_framework/Supabase.Gotrue.twah27pkik.dll +0 -0
- package/wwwroot/_framework/Supabase.Postgrest.gmuuv369ih.dll +0 -0
- package/wwwroot/_framework/Supabase.Realtime.ox3kchdy3w.dll +0 -0
- package/wwwroot/_framework/Supabase.Storage.fnjnepaowr.dll +0 -0
- package/wwwroot/_framework/Supabase.azmaw5pgcz.dll +0 -0
- package/wwwroot/_framework/System.Collections.23yxgetbju.dll +0 -0
- package/wwwroot/_framework/System.Collections.Concurrent.vow3rm1dku.dll +0 -0
- package/wwwroot/_framework/System.Collections.Immutable.ap9596utv5.dll +0 -0
- package/wwwroot/_framework/System.Collections.NonGeneric.npjkaz40oc.dll +0 -0
- package/wwwroot/_framework/System.Collections.Specialized.ugkjbs6p02.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.Annotations.clwo0z2oyu.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.Primitives.end4v0xe2c.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.TypeConverter.tgtp5sm4iv.dll +0 -0
- package/wwwroot/_framework/System.ComponentModel.wupoltkk1t.dll +0 -0
- package/wwwroot/_framework/System.Console.9dik0wogo2.dll +0 -0
- package/wwwroot/_framework/System.Data.Common.4v8jejsiu0.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.DiagnosticSource.e2q75ondtq.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.Process.9736yjnxs8.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.TraceSource.h9al53gbbw.dll +0 -0
- package/wwwroot/_framework/System.Diagnostics.Tracing.h4bcp2fo98.dll +0 -0
- package/wwwroot/_framework/System.Drawing.64oovy8qts.dll +0 -0
- package/wwwroot/_framework/System.Drawing.Primitives.o6jiqpgbgl.dll +0 -0
- package/wwwroot/_framework/System.Formats.Asn1.rylx5ipd40.dll +0 -0
- package/wwwroot/_framework/System.IO.Compression.iceabaupns.dll +0 -0
- package/wwwroot/_framework/System.IO.Pipelines.uw8csd3mlz.dll +0 -0
- package/wwwroot/_framework/System.IdentityModel.Tokens.Jwt.t67es60z5b.dll +0 -0
- package/wwwroot/_framework/System.Linq.Expressions.ty95ava37f.dll +0 -0
- package/wwwroot/_framework/System.Linq.Queryable.hs2195jrwy.dll +0 -0
- package/wwwroot/_framework/System.Linq.hssodjwmlf.dll +0 -0
- package/wwwroot/_framework/System.Memory.1k78n7wdxb.dll +0 -0
- package/wwwroot/_framework/System.Net.Http.3br8rfql4c.dll +0 -0
- package/wwwroot/_framework/System.Net.Http.Json.860wbh17d8.dll +0 -0
- package/wwwroot/_framework/System.Net.NetworkInformation.e3wr00853o.dll +0 -0
- package/wwwroot/_framework/System.Net.Ping.r5cw4mf1a4.dll +0 -0
- package/wwwroot/_framework/System.Net.Primitives.ksxwiwlvhu.dll +0 -0
- package/wwwroot/_framework/System.Net.WebSockets.6rt3n3gl2q.dll +0 -0
- package/wwwroot/_framework/System.Net.WebSockets.Client.z3usrzo7rz.dll +0 -0
- package/wwwroot/_framework/System.Numerics.Tensors.0c7z4mt3on.dll +0 -0
- package/wwwroot/_framework/System.Numerics.Vectors.lbdzx8reja.dll +0 -0
- package/wwwroot/_framework/System.ObjectModel.yct1gdirzf.dll +0 -0
- package/wwwroot/_framework/System.Private.CoreLib.c1dbswx1b2.dll +0 -0
- package/wwwroot/_framework/System.Private.Uri.zp9kmg0z93.dll +0 -0
- package/wwwroot/_framework/System.Private.Xml.Linq.lgv2n0akl4.dll +0 -0
- package/wwwroot/_framework/System.Private.Xml.dpsk8g304y.dll +0 -0
- package/wwwroot/_framework/System.Reactive.t3fuon548l.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.ILGeneration.1tcuz2cmbk.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.Lightweight.ddt2wylovg.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Emit.d8vkadiwhg.dll +0 -0
- package/wwwroot/_framework/System.Reflection.Primitives.cpsl71xd1z.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.31vjgsfk1o.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.JavaScript.pn2wvizzet.dll +0 -0
- package/wwwroot/_framework/System.Runtime.InteropServices.RuntimeInformation.l5rk496q70.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Intrinsics.0zee9qcqfy.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Loader.xw2jr9wl92.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Numerics.ezj1dfyvbj.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Serialization.Formatters.0y019e9zkr.dll +0 -0
- package/wwwroot/_framework/System.Runtime.Serialization.Primitives.bia5wb62c8.dll +0 -0
- package/wwwroot/_framework/System.Runtime.h9cduidfkh.dll +0 -0
- package/wwwroot/_framework/System.Security.Claims.2r18wim2rl.dll +0 -0
- package/wwwroot/_framework/System.Security.Cryptography.qqgybpoucx.dll +0 -0
- package/wwwroot/_framework/System.Text.Encoding.Extensions.9t3hs6kyll.dll +0 -0
- package/wwwroot/_framework/System.Text.Encodings.Web.wftjfh2crk.dll +0 -0
- package/wwwroot/_framework/System.Text.Json.0v0qgmri0w.dll +0 -0
- package/wwwroot/_framework/System.Text.RegularExpressions.cvkox11l6l.dll +0 -0
- package/wwwroot/_framework/System.Threading.Channels.419493szqu.dll +0 -0
- package/wwwroot/_framework/System.Threading.Thread.xhmys87xh5.dll +0 -0
- package/wwwroot/_framework/System.Threading.b66vzsz9g1.dll +0 -0
- package/wwwroot/_framework/System.Transactions.Local.7zfffdvnwf.dll +0 -0
- package/wwwroot/_framework/System.Web.HttpUtility.9up6xfbtuq.dll +0 -0
- package/wwwroot/_framework/System.Xml.Linq.n5rzv9nbf7.dll +0 -0
- package/wwwroot/_framework/System.Xml.ReaderWriter.ag8pilllob.dll +0 -0
- package/wwwroot/_framework/System.Xml.XDocument.sn51jas17n.dll +0 -0
- package/wwwroot/_framework/System.brmz7yk5qh.dll +0 -0
- package/wwwroot/_framework/Websocket.Client.vapounvmnl.dll +0 -0
- package/wwwroot/_framework/blazor.boot.json +0 -305
- package/wwwroot/_framework/blazor.webassembly.js +0 -1
- package/wwwroot/_framework/dotnet.js +0 -4
- package/wwwroot/_framework/dotnet.native.boem75ye5i.wasm +0 -0
- package/wwwroot/_framework/dotnet.native.qc8g39g30v.js +0 -16
- package/wwwroot/_framework/dotnet.runtime.opaiwunc3t.js +0 -4
- package/wwwroot/_framework/icudt_CJK.tjcz0u77k5.dat +0 -0
- package/wwwroot/_framework/icudt_EFIGS.tptq2av103.dat +0 -0
- package/wwwroot/_framework/icudt_no_CJK.lfu7j35m59.dat +0 -0
- package/wwwroot/_framework/netstandard.yvr3prsx0x.dll +0 -0
- package/wwwroot/appsettings.json +0 -83
- package/wwwroot/icon-192.png +0 -0
- package/wwwroot/icon-512.png +0 -0
- package/wwwroot/js/marketing-tool.js +0 -180
- package/wwwroot/service-worker-assets.js +0 -857
|
@@ -1,554 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const MAX_PROMPT_CHARS = 2048;
|
|
4
|
-
const MAX_RESPONSE_CHARS = 16000;
|
|
5
|
-
const MAX_METADATA_TEXT_CHARS = 8192;
|
|
6
|
-
const MAX_SOURCE_PATH_CHARS = 2048;
|
|
7
|
-
const NGRAM_SIZE = 3;
|
|
8
|
-
const SEARCH_VIEWPORT_FOV_DEGREES = 45;
|
|
9
|
-
const SEARCH_VIEWPORT_ASPECT_RATIO_FALLBACK = 1.6;
|
|
10
|
-
const SEARCH_VIEWPORT_IN_VIEW_BONUS = 4;
|
|
11
|
-
const SEARCH_VIEWPORT_CENTER_BOOST_MAX = 8;
|
|
12
|
-
const SEARCH_VIEWPORT_NEAR_MARGIN = 1.35;
|
|
13
|
-
const TOKEN_REGEX = /[\p{L}\p{M}\p{N}]{2,}/gu;
|
|
14
|
-
|
|
15
|
-
function createState() {
|
|
16
|
-
return {
|
|
17
|
-
boardId: '',
|
|
18
|
-
documents: new Map(),
|
|
19
|
-
tokenIndex: new Map(),
|
|
20
|
-
prefixIndex: new Map(),
|
|
21
|
-
ngramIndex: new Map()
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let runtime = createState();
|
|
26
|
-
|
|
27
|
-
function normalizeBoardId(boardId) {
|
|
28
|
-
return String(boardId ?? '').trim();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function limitText(value, maxLength) {
|
|
32
|
-
const text = String(value ?? '');
|
|
33
|
-
if (!text) {
|
|
34
|
-
return '';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return text.length <= maxLength
|
|
38
|
-
? text
|
|
39
|
-
: text.slice(0, maxLength);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function shouldIndexResponse(contentType) {
|
|
43
|
-
return contentType === 'text'
|
|
44
|
-
|| contentType === 'note'
|
|
45
|
-
|| contentType === 'memo'
|
|
46
|
-
|| contentType === 'markdown'
|
|
47
|
-
|| contentType === 'code'
|
|
48
|
-
|| contentType === 'csv-table'
|
|
49
|
-
|| contentType === 'directory';
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function buildMetadataText(metadata) {
|
|
53
|
-
if (!metadata) {
|
|
54
|
-
return '';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (typeof metadata === 'string') {
|
|
58
|
-
return limitText(metadata, MAX_METADATA_TEXT_CHARS);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const values = [];
|
|
62
|
-
const entries = Array.isArray(metadata)
|
|
63
|
-
? metadata
|
|
64
|
-
: Object.entries(metadata);
|
|
65
|
-
for (let i = 0; i < entries.length; i++) {
|
|
66
|
-
const entry = entries[i];
|
|
67
|
-
if (Array.isArray(entry)) {
|
|
68
|
-
const key = limitText(entry[0], 128).trim();
|
|
69
|
-
const value = limitText(entry[1], 1024).trim();
|
|
70
|
-
if (key) values.push(key);
|
|
71
|
-
if (value) values.push(value);
|
|
72
|
-
} else if (entry) {
|
|
73
|
-
const value = limitText(entry, 1024).trim();
|
|
74
|
-
if (value) values.push(value);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (values.join(' ').length >= MAX_METADATA_TEXT_CHARS) {
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return limitText(values.join(' '), MAX_METADATA_TEXT_CHARS);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function normalizeText(value) {
|
|
86
|
-
if (value === null || value === undefined) {
|
|
87
|
-
return '';
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
let normalized = String(value);
|
|
91
|
-
if (!normalized.trim()) {
|
|
92
|
-
return '';
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
try {
|
|
96
|
-
normalized = normalized.normalize('NFKC');
|
|
97
|
-
} catch {
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
normalized = normalized.toLowerCase();
|
|
101
|
-
|
|
102
|
-
let result = '';
|
|
103
|
-
let wroteWhitespace = false;
|
|
104
|
-
for (let i = 0; i < normalized.length; i++) {
|
|
105
|
-
const ch = normalized[i];
|
|
106
|
-
if (/\s/u.test(ch)) {
|
|
107
|
-
if (!wroteWhitespace) {
|
|
108
|
-
result += ' ';
|
|
109
|
-
wroteWhitespace = true;
|
|
110
|
-
}
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const code = ch.codePointAt(0);
|
|
115
|
-
if (typeof code === 'number' && code <= 31) {
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
result += ch;
|
|
120
|
-
wroteWhitespace = false;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return result.trim();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function removeWhitespace(value) {
|
|
127
|
-
return String(value ?? '').replace(/\s+/gu, '');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function extractTokens(normalizedText) {
|
|
131
|
-
if (!normalizedText) {
|
|
132
|
-
return [];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const matches = normalizedText.match(TOKEN_REGEX);
|
|
136
|
-
if (!matches || matches.length === 0) {
|
|
137
|
-
return [];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return matches.filter((token) => token.length >= 2);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function buildPrefixes(tokens) {
|
|
144
|
-
const prefixes = [];
|
|
145
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
146
|
-
const token = tokens[i];
|
|
147
|
-
if (!token) {
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const maxLength = Math.min(8, token.length);
|
|
152
|
-
for (let length = 2; length <= maxLength; length++) {
|
|
153
|
-
prefixes.push(token.slice(0, length));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return prefixes;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function buildNGrams(normalizedCompactText) {
|
|
161
|
-
if (!normalizedCompactText) {
|
|
162
|
-
return [];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (normalizedCompactText.length <= NGRAM_SIZE) {
|
|
166
|
-
return [normalizedCompactText];
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const ngrams = [];
|
|
170
|
-
for (let i = 0; i <= normalizedCompactText.length - NGRAM_SIZE; i++) {
|
|
171
|
-
ngrams.push(normalizedCompactText.slice(i, i + NGRAM_SIZE));
|
|
172
|
-
}
|
|
173
|
-
return ngrams;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function addPosting(index, key, nodeId) {
|
|
177
|
-
if (!key) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
let postings = index.get(key);
|
|
182
|
-
if (!postings) {
|
|
183
|
-
postings = new Set();
|
|
184
|
-
index.set(key, postings);
|
|
185
|
-
}
|
|
186
|
-
postings.add(nodeId);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function removePosting(index, key, nodeId) {
|
|
190
|
-
const postings = index.get(key);
|
|
191
|
-
if (!postings) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
postings.delete(nodeId);
|
|
196
|
-
if (postings.size === 0) {
|
|
197
|
-
index.delete(key);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function addPostingMatches(index, key, candidateScores, weight) {
|
|
202
|
-
const postings = index.get(key);
|
|
203
|
-
if (!postings) {
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
postings.forEach((nodeId) => {
|
|
208
|
-
candidateScores.set(
|
|
209
|
-
nodeId,
|
|
210
|
-
Number(candidateScores.get(nodeId) || 0) + weight
|
|
211
|
-
);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function clearState(boardId) {
|
|
216
|
-
runtime = createState();
|
|
217
|
-
runtime.boardId = normalizeBoardId(boardId);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function normalizeNodeSnapshot(node) {
|
|
221
|
-
if (!node || typeof node !== 'object') {
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const nodeId = String(node.id ?? node.Id ?? '').trim();
|
|
226
|
-
if (!nodeId) {
|
|
227
|
-
return null;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
const contentType = String(node.contentType ?? node.ContentType ?? '').trim().toLowerCase();
|
|
231
|
-
|
|
232
|
-
return {
|
|
233
|
-
id: nodeId,
|
|
234
|
-
contentType,
|
|
235
|
-
prompt: limitText(node.prompt ?? node.Prompt, MAX_PROMPT_CHARS),
|
|
236
|
-
response: limitText(node.response ?? node.Response, MAX_RESPONSE_CHARS),
|
|
237
|
-
metadataText: buildMetadataText(node.metadataText ?? node.MetadataText ?? node.metadata ?? node.Metadata),
|
|
238
|
-
sourcePath: limitText(node.sourcePath ?? node.SourcePath ?? node.sourceFilePath ?? node.SourceFilePath, MAX_SOURCE_PATH_CHARS),
|
|
239
|
-
positionX: Number(node.positionX ?? node.PositionX ?? node.x ?? 0),
|
|
240
|
-
positionY: Number(node.positionY ?? node.PositionY ?? node.y ?? 0),
|
|
241
|
-
width: Math.max(1, Number(node.width ?? node.Width ?? 1)),
|
|
242
|
-
height: Math.max(1, Number(node.height ?? node.Height ?? 1))
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function buildDocument(node) {
|
|
247
|
-
const prompt = normalizeText(node.prompt);
|
|
248
|
-
const response = normalizeText(shouldIndexResponse(node.contentType) ? node.response : '');
|
|
249
|
-
const metadataText = normalizeText(node.metadataText);
|
|
250
|
-
const sourcePath = normalizeText(node.sourcePath);
|
|
251
|
-
const normalizedContentType = normalizeText(node.contentType);
|
|
252
|
-
|
|
253
|
-
const combined = [prompt, metadataText, sourcePath, response, normalizedContentType]
|
|
254
|
-
.filter(Boolean)
|
|
255
|
-
.join(' ');
|
|
256
|
-
const tokens = new Set(extractTokens(combined));
|
|
257
|
-
const prefixes = new Set(buildPrefixes(Array.from(tokens)));
|
|
258
|
-
const ngrams = new Set(buildNGrams(removeWhitespace(combined)));
|
|
259
|
-
|
|
260
|
-
return {
|
|
261
|
-
nodeId: node.id,
|
|
262
|
-
contentType: node.contentType,
|
|
263
|
-
positionX: node.positionX,
|
|
264
|
-
positionY: node.positionY,
|
|
265
|
-
width: node.width,
|
|
266
|
-
height: node.height,
|
|
267
|
-
normalizedPrompt: prompt,
|
|
268
|
-
normalizedResponse: response,
|
|
269
|
-
normalizedMetadata: metadataText,
|
|
270
|
-
normalizedSourcePath: sourcePath,
|
|
271
|
-
normalizedContentType,
|
|
272
|
-
tokens,
|
|
273
|
-
prefixes,
|
|
274
|
-
ngrams
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
function removeDocument(nodeId) {
|
|
279
|
-
const existing = runtime.documents.get(nodeId);
|
|
280
|
-
if (!existing) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
existing.tokens.forEach((token) => removePosting(runtime.tokenIndex, token, nodeId));
|
|
285
|
-
existing.prefixes.forEach((prefix) => removePosting(runtime.prefixIndex, prefix, nodeId));
|
|
286
|
-
existing.ngrams.forEach((ngram) => removePosting(runtime.ngramIndex, ngram, nodeId));
|
|
287
|
-
runtime.documents.delete(nodeId);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
function upsertNode(node) {
|
|
291
|
-
const normalizedNode = normalizeNodeSnapshot(node);
|
|
292
|
-
if (!normalizedNode) {
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
removeDocument(normalizedNode.id);
|
|
297
|
-
|
|
298
|
-
const document = buildDocument(normalizedNode);
|
|
299
|
-
runtime.documents.set(document.nodeId, document);
|
|
300
|
-
|
|
301
|
-
document.tokens.forEach((token) => addPosting(runtime.tokenIndex, token, document.nodeId));
|
|
302
|
-
document.prefixes.forEach((prefix) => addPosting(runtime.prefixIndex, prefix, document.nodeId));
|
|
303
|
-
document.ngrams.forEach((ngram) => addPosting(runtime.ngramIndex, ngram, document.nodeId));
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function rebuildBoard(boardId, nodes) {
|
|
307
|
-
clearState(boardId);
|
|
308
|
-
const sourceNodes = Array.isArray(nodes) ? nodes : [];
|
|
309
|
-
for (let i = 0; i < sourceNodes.length; i++) {
|
|
310
|
-
upsertNode(sourceNodes[i]);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function scoreDocument(document, normalizedQuery, queryTokens, queryNGrams) {
|
|
315
|
-
let score = 0;
|
|
316
|
-
|
|
317
|
-
if (document.normalizedPrompt === normalizedQuery) {
|
|
318
|
-
score += 120;
|
|
319
|
-
} else if (document.normalizedPrompt.includes(normalizedQuery)) {
|
|
320
|
-
score += 54;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
if (document.normalizedMetadata.includes(normalizedQuery)) {
|
|
324
|
-
score += 26;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (document.normalizedSourcePath.includes(normalizedQuery)) {
|
|
328
|
-
score += 18;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
if (document.normalizedResponse.includes(normalizedQuery)) {
|
|
332
|
-
score += 14;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
if (document.normalizedContentType.includes(normalizedQuery)) {
|
|
336
|
-
score += 8;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
for (let i = 0; i < queryTokens.length; i++) {
|
|
340
|
-
const token = queryTokens[i];
|
|
341
|
-
if (document.tokens.has(token)) {
|
|
342
|
-
score += 7;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (document.normalizedPrompt.startsWith(token)) {
|
|
346
|
-
score += 10;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
for (let i = 0; i < queryNGrams.length; i++) {
|
|
351
|
-
if (document.ngrams.has(queryNGrams[i])) {
|
|
352
|
-
score += 0.85;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
return score;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function calculateViewportBoost(document, camera) {
|
|
360
|
-
if (!camera) {
|
|
361
|
-
return 0;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
const cameraZ = Math.max(400, Number(camera.z || 0) || 1200);
|
|
365
|
-
const aspect = Math.max(0.1, Number(camera.aspect || SEARCH_VIEWPORT_ASPECT_RATIO_FALLBACK));
|
|
366
|
-
const halfViewHeight = Math.max(
|
|
367
|
-
480,
|
|
368
|
-
cameraZ * Math.tan((SEARCH_VIEWPORT_FOV_DEGREES * Math.PI / 180) / 2)
|
|
369
|
-
);
|
|
370
|
-
const halfViewWidth = halfViewHeight * aspect;
|
|
371
|
-
|
|
372
|
-
const nodeWidth = Math.max(1, Number(document.width || 1));
|
|
373
|
-
const nodeHeight = Math.max(1, Number(document.height || 1));
|
|
374
|
-
const centerX = Number(document.positionX || 0) + (nodeWidth / 2);
|
|
375
|
-
const centerY = Number(document.positionY || 0) - (nodeHeight / 2);
|
|
376
|
-
const normalizedX = Math.abs(centerX - Number(camera.x || 0)) / Math.max(1, halfViewWidth);
|
|
377
|
-
const normalizedY = Math.abs(centerY - Number(camera.y || 0)) / Math.max(1, halfViewHeight);
|
|
378
|
-
const radialDistance = Math.sqrt((normalizedX * normalizedX) + (normalizedY * normalizedY));
|
|
379
|
-
|
|
380
|
-
if (radialDistance <= 1) {
|
|
381
|
-
return SEARCH_VIEWPORT_IN_VIEW_BONUS + ((1 - radialDistance) * SEARCH_VIEWPORT_CENTER_BOOST_MAX);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
if (radialDistance <= SEARCH_VIEWPORT_NEAR_MARGIN) {
|
|
385
|
-
const falloff = 1 - ((radialDistance - 1) / Math.max(0.001, SEARCH_VIEWPORT_NEAR_MARGIN - 1));
|
|
386
|
-
return Math.max(0, falloff) * (SEARCH_VIEWPORT_IN_VIEW_BONUS * 0.75);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
return 0;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
function handleSearchQuery(message) {
|
|
393
|
-
const boardId = normalizeBoardId(message.boardId);
|
|
394
|
-
if (!boardId || boardId !== runtime.boardId) {
|
|
395
|
-
self.postMessage({
|
|
396
|
-
type: 'SEARCH_RESULT',
|
|
397
|
-
boardId,
|
|
398
|
-
seq: Number(message.seq || 0),
|
|
399
|
-
query: String(message.query || ''),
|
|
400
|
-
hits: []
|
|
401
|
-
});
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
const startedAt = (typeof performance !== 'undefined' && typeof performance.now === 'function')
|
|
406
|
-
? performance.now()
|
|
407
|
-
: Date.now();
|
|
408
|
-
const normalizedLimit = Math.max(1, Number(message.limit || 30));
|
|
409
|
-
const normalizedQuery = normalizeText(message.query);
|
|
410
|
-
if (!normalizedQuery) {
|
|
411
|
-
self.postMessage({
|
|
412
|
-
type: 'SEARCH_RESULT',
|
|
413
|
-
boardId,
|
|
414
|
-
seq: Number(message.seq || 0),
|
|
415
|
-
query: String(message.query || ''),
|
|
416
|
-
hits: []
|
|
417
|
-
});
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
const allowedContentTypes = Array.isArray(message.contentTypes) && message.contentTypes.length > 0
|
|
422
|
-
? new Set(
|
|
423
|
-
message.contentTypes
|
|
424
|
-
.map((value) => String(value || '').trim().toLowerCase())
|
|
425
|
-
.filter(Boolean)
|
|
426
|
-
)
|
|
427
|
-
: null;
|
|
428
|
-
const queryTokens = extractTokens(normalizedQuery);
|
|
429
|
-
const queryPrefixes = buildPrefixes(queryTokens);
|
|
430
|
-
const queryNGrams = buildNGrams(removeWhitespace(normalizedQuery));
|
|
431
|
-
const candidateScores = new Map();
|
|
432
|
-
|
|
433
|
-
for (let i = 0; i < queryTokens.length; i++) {
|
|
434
|
-
addPostingMatches(runtime.tokenIndex, queryTokens[i], candidateScores, 8);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
for (let i = 0; i < queryPrefixes.length; i++) {
|
|
438
|
-
const prefix = queryPrefixes[i];
|
|
439
|
-
addPostingMatches(runtime.prefixIndex, prefix, candidateScores, prefix.length <= 3 ? 4 : 2);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
for (let i = 0; i < queryNGrams.length; i++) {
|
|
443
|
-
addPostingMatches(runtime.ngramIndex, queryNGrams[i], candidateScores, 1.15);
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
let candidateIds = [];
|
|
447
|
-
if (candidateScores.size > 0) {
|
|
448
|
-
candidateIds = Array.from(candidateScores.entries())
|
|
449
|
-
.sort((a, b) => {
|
|
450
|
-
if (b[1] !== a[1]) {
|
|
451
|
-
return b[1] - a[1];
|
|
452
|
-
}
|
|
453
|
-
return String(a[0]).localeCompare(String(b[0]));
|
|
454
|
-
})
|
|
455
|
-
.slice(0, Math.max(normalizedLimit * 16, 256))
|
|
456
|
-
.map((entry) => entry[0]);
|
|
457
|
-
} else {
|
|
458
|
-
candidateIds = Array.from(runtime.documents.keys());
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
const ranked = [];
|
|
462
|
-
for (let i = 0; i < candidateIds.length; i++) {
|
|
463
|
-
const document = runtime.documents.get(candidateIds[i]);
|
|
464
|
-
if (!document) {
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
if (allowedContentTypes && allowedContentTypes.size > 0 && !allowedContentTypes.has(document.contentType)) {
|
|
469
|
-
continue;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
const score = scoreDocument(document, normalizedQuery, queryTokens, queryNGrams);
|
|
473
|
-
if (score <= 0) {
|
|
474
|
-
continue;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
ranked.push({
|
|
478
|
-
nodeId: document.nodeId,
|
|
479
|
-
score: score + calculateViewportBoost(document, message.camera || null)
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
ranked.sort((a, b) => {
|
|
484
|
-
if (b.score !== a.score) {
|
|
485
|
-
return b.score - a.score;
|
|
486
|
-
}
|
|
487
|
-
return String(a.nodeId).localeCompare(String(b.nodeId));
|
|
488
|
-
});
|
|
489
|
-
|
|
490
|
-
const completedAt = (typeof performance !== 'undefined' && typeof performance.now === 'function')
|
|
491
|
-
? performance.now()
|
|
492
|
-
: Date.now();
|
|
493
|
-
|
|
494
|
-
self.postMessage({
|
|
495
|
-
type: 'SEARCH_RESULT',
|
|
496
|
-
boardId,
|
|
497
|
-
seq: Number(message.seq || 0),
|
|
498
|
-
query: String(message.query || ''),
|
|
499
|
-
hits: ranked.slice(0, normalizedLimit),
|
|
500
|
-
profile: {
|
|
501
|
-
durationMs: Number(Math.max(0, completedAt - startedAt).toFixed(2)),
|
|
502
|
-
candidateCount: candidateIds.length,
|
|
503
|
-
rankedCount: ranked.length
|
|
504
|
-
}
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
self.onmessage = function (event) {
|
|
509
|
-
const message = event?.data || null;
|
|
510
|
-
if (!message || typeof message !== 'object') {
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
switch (message.type) {
|
|
515
|
-
case 'RESET_BOARD':
|
|
516
|
-
clearState(message.boardId);
|
|
517
|
-
break;
|
|
518
|
-
case 'REBUILD_BOARD':
|
|
519
|
-
rebuildBoard(message.boardId, message.nodes);
|
|
520
|
-
break;
|
|
521
|
-
case 'UPSERT_NODE':
|
|
522
|
-
if (normalizeBoardId(message.boardId) === runtime.boardId) {
|
|
523
|
-
upsertNode(message.node);
|
|
524
|
-
}
|
|
525
|
-
break;
|
|
526
|
-
case 'REMOVE_NODE':
|
|
527
|
-
if (normalizeBoardId(message.boardId) === runtime.boardId) {
|
|
528
|
-
removeDocument(String(message.nodeId || '').trim());
|
|
529
|
-
}
|
|
530
|
-
break;
|
|
531
|
-
case 'BATCH_SYNC':
|
|
532
|
-
if (normalizeBoardId(message.boardId) === runtime.boardId) {
|
|
533
|
-
const removedIds = Array.isArray(message.removedIds) ? message.removedIds : [];
|
|
534
|
-
for (let i = 0; i < removedIds.length; i++) {
|
|
535
|
-
removeDocument(String(removedIds[i] || '').trim());
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
const nodes = Array.isArray(message.nodes) ? message.nodes : [];
|
|
539
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
540
|
-
upsertNode(nodes[i]);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
break;
|
|
544
|
-
case 'SEARCH_QUERY':
|
|
545
|
-
handleSearchQuery(message);
|
|
546
|
-
break;
|
|
547
|
-
default:
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
self.postMessage({
|
|
553
|
-
type: 'READY'
|
|
554
|
-
});
|