1234567891011121314151617181920212223242526272829 |
- import {
- EditorSimpleWorker,
- SimpleWorkerServer
- } from "./chunk-FBUDSZGC.js";
- // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/editor/editor.worker.js
- var initialized = false;
- function initialize(foreignModule) {
- if (initialized) {
- return;
- }
- initialized = true;
- const simpleWorker = new SimpleWorkerServer((msg) => {
- globalThis.postMessage(msg);
- }, (host) => new EditorSimpleWorker(host, foreignModule));
- globalThis.onmessage = (e) => {
- simpleWorker.onmessage(e.data);
- };
- }
- globalThis.onmessage = (e) => {
- if (!initialized) {
- initialize(null);
- }
- };
- export {
- initialize
- };
- //# sourceMappingURL=chunk-2VOPQV4X.js.map
|