@volter/browser-substrate 0.1.118 → 0.1.119
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/catalog/demand-input.json +34 -16
- package/catalog/published/profile.json +8 -3
- package/catalog/published/v1/artifacts/sha256/1d9fc30121217ec1c2161e79c3df3e27047a786b8eb33ee6a218a887d794fa88 +4141 -0
- package/catalog/published/v1/artifacts/sha256/{db018a9b080d9b5fbcc6e72bc47afbdae210b679902e8dd1a269b8bd24a1bcd6 → 23a82cc8afdf35d48f0f9ef66f53ff6d7a8b3a641b7ef86e9b81ce04551ee954} +71 -25
- package/catalog/published/v1/artifacts/sha256/23a82cc8afdf35d48f0f9ef66f53ff6d7a8b3a641b7ef86e9b81ce04551ee954.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/2ac5eba365ec12839c75c03b39b3be1dd63b798852cc460b014b52238be042f7 +2 -0
- package/catalog/published/v1/artifacts/sha256/2ac5eba365ec12839c75c03b39b3be1dd63b798852cc460b014b52238be042f7.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/301eea90d7061167d148cc37016a0dd77b58ca86d378ee27f720ef1ea62df9e8 +0 -0
- package/catalog/published/v1/artifacts/sha256/301eea90d7061167d148cc37016a0dd77b58ca86d378ee27f720ef1ea62df9e8.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/3a0a00dfeaa348ac20f9ef09904233d32d33f644339662d4af368f8a2010f37a +0 -0
- package/catalog/published/v1/artifacts/sha256/3a0a00dfeaa348ac20f9ef09904233d32d33f644339662d4af368f8a2010f37a.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/3fdaef09e9e365c85e002737720f8d0ab8f278c1c244a2dde6a37663cf488ad4 +1 -0
- package/catalog/published/v1/artifacts/sha256/3fdaef09e9e365c85e002737720f8d0ab8f278c1c244a2dde6a37663cf488ad4.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/5f7e1d2b4020aec4e624f10815e9c8e88b3fa2be6122a349f0319613f76985ea +0 -0
- package/catalog/published/v1/artifacts/sha256/5f7e1d2b4020aec4e624f10815e9c8e88b3fa2be6122a349f0319613f76985ea.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/69e3f6ccec3e14b465df60be577ca62f536251406b9a00cce019eac5252a2495 +4 -0
- package/catalog/published/v1/artifacts/sha256/69e3f6ccec3e14b465df60be577ca62f536251406b9a00cce019eac5252a2495.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/73c393191ec41b2b40e0bcc8653d874cb42046023e7a72389bd54abf8df928b9.headers.json +1 -1
- package/catalog/published/v1/artifacts/sha256/80c5be6babfe03297069703410c3c29404dcf2525d2b128746bae5536f94831f +0 -0
- package/catalog/published/v1/artifacts/sha256/80c5be6babfe03297069703410c3c29404dcf2525d2b128746bae5536f94831f.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/a140f34875990a080a84a61ac57e9ea924e7b8d79f0dd3a1b4242139cdd6a8e4 +0 -0
- package/catalog/published/v1/artifacts/sha256/a140f34875990a080a84a61ac57e9ea924e7b8d79f0dd3a1b4242139cdd6a8e4.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/cba9aeb25bd2b45d01611a062df64db41b20302ffa81c4eb0d0d71b359e19e7c.headers.json +1 -1
- package/catalog/published/v1/artifacts/sha256/d96eba1f1881334d50ffc144276dfa98e147a415e7c591ecdfcb81680361dc91.headers.json +1 -1
- package/catalog/published/v1/artifacts/sha256/d9dddf83dfd2af98c525007dc494d564b9ffa1f5f393c564334dcb5137e99330 +1 -0
- package/catalog/published/v1/artifacts/sha256/d9dddf83dfd2af98c525007dc494d564b9ffa1f5f393c564334dcb5137e99330.headers.json +1 -0
- package/catalog/published/v1/artifacts/sha256/ec62dc96da0099b87f4511736c87309335527fb7031639493e06c95728dc8c54.headers.json +1 -1
- package/catalog/published/v1/artifacts/sha256/efba6a51e920b23f2bc24e72939fbf39adead922535b7a4e5a58af21f9289b22.headers.json +1 -1
- package/catalog/published/v1/catalog.json +1 -1
- package/catalog/published/v1/catalogs/sha256/ba2ed522ac281012a19ff5a94ca87b3bb4bdf230bb941220de5491513d2a57ea.json +1 -0
- package/catalog/published/v1/locks/sha256/09a6c49b4a0e11a111cecfcf6b4afd63b97efcb6439bed0401f60be6d9246780.json +1 -0
- package/catalog/published/v1/locks/sha256/4d2b82aaf0610359bf0e757e4e63100576687880f65d1fb093625301021fc61c.json +1 -0
- package/catalog/published/v1/locks/sha256/5292658503e248418d24e005942a3adc9ca79af135c8f8fa20659b048df93e0b.json +1 -0
- package/catalog/published/v1/locks/sha256/65e508124330a0cb0455ac06ce274ed9a47b7d720290b24146cf16f1153ad0a0.json +1 -0
- package/catalog/published/v1/locks/sha256/91621a0164f2a8d1a149034353e8679547e3269f7329a049006ae6e069fc41ff.json +1 -0
- package/catalog/published/v1/locks/sha256/bf650fdc44f5297175d58f3248b31768573a23484719f455c4e9c24502c41648.json +1 -0
- package/catalog/published/v1/locks/sha256/f5c7caac5e06541e998fa1c6d6ef1d50c8c146af161bcf5c1c0a828c0dcedaea.json +1 -0
- package/catalog/published/v1/locks/sha256/fba31e0e4cf54807389170be745fe505628d9af5cb2dc3223df1508bbde3973e.json +1 -0
- package/catalog/published/v1/manifests/sha256/026eef1bad61aa255defe8115c2daae7a739657aebe1cff1df31712d98606cd3.json +1 -0
- package/catalog/published/v1/manifests/sha256/03503c6f6d9142dce3f1d6eb5105b909fe0a2b16189bd58b9c8971ca588d3e61.json +1 -0
- package/catalog/published/v1/manifests/sha256/{2e038fc0a8ea054179c7ec22749b6b75d76e28f47bc49090ec4a92c62838efcb.json → 05781228ef0c812f61bf957a9ce2ee58544c4a6c010be46228ec8505a5a1f978.json} +1 -1
- package/catalog/published/v1/manifests/sha256/05781228ef0c812f61bf957a9ce2ee58544c4a6c010be46228ec8505a5a1f978.json.headers.json +1 -0
- package/catalog/published/v1/manifests/sha256/566b3535719ba2aa5f2f437939174189b7b195e161890a5b792667633e9d7fc5.json +1 -0
- package/catalog/published/v1/manifests/sha256/566b3535719ba2aa5f2f437939174189b7b195e161890a5b792667633e9d7fc5.json.headers.json +1 -0
- package/catalog/published/v1/manifests/sha256/64a81cb05980cf4e83f77244ee540b7fbc9e2e8bd8673614fff938a6a21de822.json +1 -0
- package/catalog/published/v1/manifests/sha256/64a81cb05980cf4e83f77244ee540b7fbc9e2e8bd8673614fff938a6a21de822.json.headers.json +1 -0
- package/catalog/published/v1/manifests/sha256/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e.json → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371.json} +1 -1
- package/catalog/published/v1/manifests/sha256/c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371.json.headers.json +1 -0
- package/catalog/published/v1/manifests/sha256/{9345a903a00ef5bcfd58c03f54e9d00670a1fb885284369b6af1c3fb0fcaa43a.json → e9c4da2392cebaa5377154b7fe0e72d7d943032e41cf775d0158df5808d1e38f.json} +1 -1
- package/catalog/published/v1/manifests/sha256/e9c4da2392cebaa5377154b7fe0e72d7d943032e41cf775d0158df5808d1e38f.json.headers.json +1 -0
- package/catalog/published/v1/manifests/sha256/fd500c4047bcddcc3d16d4a98ac7d1d0f887e0669a6ae8fa1f391a8b16a8abb9.json +1 -0
- package/catalog/published/v1/manifests/sha256/fd500c4047bcddcc3d16d4a98ac7d1d0f887e0669a6ae8fa1f391a8b16a8abb9.json.headers.json +1 -0
- package/dist/catalog-programs.d.ts +6 -0
- package/dist/catalog-programs.d.ts.map +1 -1
- package/dist/catalog-programs.js +15 -2
- package/dist/catalog-programs.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +36 -10
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/provision-catalog.d.ts +14 -0
- package/dist/cli/provision-catalog.d.ts.map +1 -1
- package/dist/cli/provision-catalog.js +43 -17
- package/dist/cli/provision-catalog.js.map +1 -1
- package/dist/image.d.ts +6 -0
- package/dist/image.d.ts.map +1 -1
- package/dist/image.js +14 -2
- package/dist/image.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/shell/assets/{browser-sandbox-bridge-CRudVv29.js → browser-sandbox-bridge-Cxc4WXZV.js} +2 -2
- package/dist/shell/assets/{node-execution-worker-87fe3e3a28e9186d.js → node-execution-worker-08f9a46842d3ea2d.js} +4 -4
- package/dist/shell/assets/pythonHost-CTnI04xe.js +1 -0
- package/dist/shell/assets/{runtime-worker-DH_89R1c.js → runtime-worker-4ta5HAH6.js} +61 -12
- package/dist/shell/assets/{sandbox-BnR3tlyJ.js → sandbox-Csy8dHxD.js} +1 -1
- package/dist/shell/assets/{shell-5W27-rZ9.js → shell-BchR8dEr.js} +503 -502
- package/dist/shell/bundler-worker.js +4 -4
- package/dist/shell/index.html +2 -2
- package/dist/shell/node-execution-worker.js +1 -1
- package/dist/shell/python-host.html +1 -2
- package/dist/shell/sandbox.html +2 -2
- package/package.json +1 -1
- package/catalog/published/v1/catalogs/sha256/0706a928806dcf706b3ec1718fce04fde7637b0e3792860849ef2551fdc11207.json +0 -1
- package/catalog/published/v1/locks/sha256/0932882d27d284ca572fadc5139f8919a36fe4be5e7310f47518d32a490df0fe.json +0 -1
- package/catalog/published/v1/locks/sha256/17f8b244e6d8ee2441e204d88208fb12957019102df10b9387c2602b153568c2.json +0 -1
- package/catalog/published/v1/locks/sha256/4b762bf5e60a1ee7c2e837114286edc90b117fbfc4fdcf7988ffc78e8016d7e3.json +0 -1
- package/catalog/published/v1/locks/sha256/e847d9c9af2d5c30c7a60b362afb2d57a099782dbaa1d649b48a63f2fc22bd0d.json +0 -1
- package/catalog/published/v1/locks/sha256/ef55f6c4a945d35d7eac63950b6308b4fa2759f6826728c5fc9c6c195e238d44.json +0 -1
- package/catalog/published/v1/manifests/sha256/7c26dd6d9ba0fc4c5b0f224f7602b69ac10cdb98fadc12bb5c2b5337a5b7fc09.json +0 -1
- package/catalog/published/v1/manifests/sha256/ee2393699113b4be1eb965d37d9fa718fe6213980a33a3f08672457781f56415.json +0 -1
- package/dist/shell/assets/cross-origin-worker-host-BBpqGIrC.js +0 -1
- package/dist/shell/assets/index-DGXLsqoC.js +0 -1
- package/dist/shell/assets/pythonHost-xjkxJWzf.js +0 -1
- /package/catalog/published/v1/artifacts/sha256/{db018a9b080d9b5fbcc6e72bc47afbdae210b679902e8dd1a269b8bd24a1bcd6.headers.json → 1d9fc30121217ec1c2161e79c3df3e27047a786b8eb33ee6a218a887d794fa88.headers.json} +0 -0
- /package/catalog/published/v1/catalogs/sha256/{0706a928806dcf706b3ec1718fce04fde7637b0e3792860849ef2551fdc11207.json.headers.json → ba2ed522ac281012a19ff5a94ca87b3bb4bdf230bb941220de5491513d2a57ea.json.headers.json} +0 -0
- /package/catalog/published/v1/locks/sha256/{0932882d27d284ca572fadc5139f8919a36fe4be5e7310f47518d32a490df0fe.json.headers.json → 09a6c49b4a0e11a111cecfcf6b4afd63b97efcb6439bed0401f60be6d9246780.json.headers.json} +0 -0
- /package/catalog/published/v1/locks/sha256/{17f8b244e6d8ee2441e204d88208fb12957019102df10b9387c2602b153568c2.json.headers.json → 4d2b82aaf0610359bf0e757e4e63100576687880f65d1fb093625301021fc61c.json.headers.json} +0 -0
- /package/catalog/published/v1/locks/sha256/{4b762bf5e60a1ee7c2e837114286edc90b117fbfc4fdcf7988ffc78e8016d7e3.json.headers.json → 5292658503e248418d24e005942a3adc9ca79af135c8f8fa20659b048df93e0b.json.headers.json} +0 -0
- /package/catalog/published/v1/locks/sha256/{e847d9c9af2d5c30c7a60b362afb2d57a099782dbaa1d649b48a63f2fc22bd0d.json.headers.json → 65e508124330a0cb0455ac06ce274ed9a47b7d720290b24146cf16f1153ad0a0.json.headers.json} +0 -0
- /package/catalog/published/v1/locks/sha256/{ef55f6c4a945d35d7eac63950b6308b4fa2759f6826728c5fc9c6c195e238d44.json.headers.json → 91621a0164f2a8d1a149034353e8679547e3269f7329a049006ae6e069fc41ff.json.headers.json} +0 -0
- /package/catalog/published/v1/{manifests/sha256/2e038fc0a8ea054179c7ec22749b6b75d76e28f47bc49090ec4a92c62838efcb.json.headers.json → locks/sha256/bf650fdc44f5297175d58f3248b31768573a23484719f455c4e9c24502c41648.json.headers.json} +0 -0
- /package/catalog/published/v1/{manifests/sha256/606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e.json.headers.json → locks/sha256/f5c7caac5e06541e998fa1c6d6ef1d50c8c146af161bcf5c1c0a828c0dcedaea.json.headers.json} +0 -0
- /package/catalog/published/v1/{manifests/sha256/7c26dd6d9ba0fc4c5b0f224f7602b69ac10cdb98fadc12bb5c2b5337a5b7fc09.json.headers.json → locks/sha256/fba31e0e4cf54807389170be745fe505628d9af5cb2dc3223df1508bbde3973e.json.headers.json} +0 -0
- /package/catalog/published/v1/manifests/sha256/{9345a903a00ef5bcfd58c03f54e9d00670a1fb885284369b6af1c3fb0fcaa43a.json.headers.json → 026eef1bad61aa255defe8115c2daae7a739657aebe1cff1df31712d98606cd3.json.headers.json} +0 -0
- /package/catalog/published/v1/manifests/sha256/{ee2393699113b4be1eb965d37d9fa718fe6213980a33a3f08672457781f56415.json.headers.json → 03503c6f6d9142dce3f1d6eb5105b909fe0a2b16189bd58b9c8971ca588d3e61.json.headers.json} +0 -0
- /package/dist/shell/substrate/shell.compilers/{2e038fc0a8ea054179c7ec22749b6b75d76e28f47bc49090ec4a92c62838efcb → 05781228ef0c812f61bf957a9ce2ee58544c4a6c010be46228ec8505a5a1f978}/bindings_wasm_bg.wasm +0 -0
- /package/dist/shell/substrate/shell.compilers/{2e038fc0a8ea054179c7ec22749b6b75d76e28f47bc49090ec4a92c62838efcb → 05781228ef0c812f61bf957a9ce2ee58544c4a6c010be46228ec8505a5a1f978}/package.json +0 -0
- /package/dist/shell/substrate/shell.compilers/{2e038fc0a8ea054179c7ec22749b6b75d76e28f47bc49090ec4a92c62838efcb → 05781228ef0c812f61bf957a9ce2ee58544c4a6c010be46228ec8505a5a1f978}/rollup.browser.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/LICENSE.md +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/README.md +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/bin/esbuild +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/esbuild.wasm +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/esm/browser.d.ts +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/esm/browser.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/esm/browser.min.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/lib/browser.d.ts +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/lib/browser.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/lib/browser.min.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/lib/main.d.ts +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/lib/main.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/package.json +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/wasm_exec.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{606b43db77c5b9be029cd31941d9ba4ac91424e9a5225ac62debb381e522979e → c5ebb33c1959713cf4dee3482dde9b95a87fe1c6dd9e947c013018254cd2a371}/wasm_exec_node.js +0 -0
- /package/dist/shell/substrate/shell.compilers/{9345a903a00ef5bcfd58c03f54e9d00670a1fb885284369b6af1c3fb0fcaa43a → e9c4da2392cebaa5377154b7fe0e72d7d943032e41cf775d0158df5808d1e38f}/amaro.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as g}from"./page-workers-BUcWBF51.js";const a="browser-runtime.cross-origin-worker.v1";function h(d){const c=new URL(location.href),r=c.searchParams.get("parentOrigin"),t=c.hash.slice(1);if(!r||new URL(r).origin!==r||t.length<32)throw new Error("Invalid cross-origin worker host bootstrap URL.");const s=d.createWorker(),p=o=>{if(o.source!==parent||o.origin!==r)return;const i=o.data;i.channel!==a||i.nonce!==t||i.type!=="attach"||(window.removeEventListener("message",p),window.addEventListener("message",e=>{if(e.source!==parent||e.origin!==r)return;const n=e.data;if(!(n.channel!==a||n.nonce!==t)){if(n.type==="terminate"){s.terminate();return}n.type==="data"&&s.postMessage(n.data,[...e.ports])}}),s.addEventListener("message",e=>{parent.postMessage({channel:a,nonce:t,type:"data",data:e.data},r,[...e.ports])}),s.addEventListener("error",e=>{parent.postMessage({channel:a,nonce:t,type:"error",message:e.message},r)}),parent.postMessage({channel:a,nonce:t,type:"ready"},r))};window.addEventListener("message",p)}h({createWorker:()=>g(new Worker("/python-execution-worker.js",{type:"module",name:"browser-python-execution-boundary"}))});
|
|
@@ -6690,11 +6690,15 @@ var asyncHooksShim$1 = /* @__PURE__ */ Object.freeze({
|
|
|
6690
6690
|
triggerAsyncId
|
|
6691
6691
|
});
|
|
6692
6692
|
function describedIdentity(identity) {
|
|
6693
|
-
const { pid, ppid, argv, cwd, startedAt } = identity;
|
|
6694
|
-
const described = {
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6693
|
+
const { pid, ppid, pgid, argv, cwd, startedAt } = identity;
|
|
6694
|
+
const described = {
|
|
6695
|
+
pid,
|
|
6696
|
+
ppid,
|
|
6697
|
+
...pgid !== void 0 ? { pgid } : {},
|
|
6698
|
+
...Array.isArray(argv) && argv.length <= 4096 && argv.every((arg) => typeof arg === "string") ? { argv: Object.freeze([...argv]) } : {},
|
|
6699
|
+
...typeof cwd === "string" && cwd.startsWith("/") ? { cwd } : {},
|
|
6700
|
+
...typeof startedAt === "number" && Number.isFinite(startedAt) ? { startedAt } : {}
|
|
6701
|
+
};
|
|
6698
6702
|
return Object.freeze(described);
|
|
6699
6703
|
}
|
|
6700
6704
|
function createProcessRegistryOwner() {
|
|
@@ -6743,17 +6747,26 @@ function createProcessRegistryOwner() {
|
|
|
6743
6747
|
publish(token, identity) {
|
|
6744
6748
|
active2();
|
|
6745
6749
|
const previous = runs2.get(token);
|
|
6746
|
-
if ((previous == null ? void 0 : previous.pid) === identity.pid && previous.ppid === identity.ppid)
|
|
6750
|
+
if ((previous == null ? void 0 : previous.pid) === identity.pid && previous.ppid === identity.ppid) {
|
|
6751
|
+
if (identity.pgid !== void 0 && identity.pgid !== previous.pgid) throw new Error("Process group identity cannot change at publication.");
|
|
6752
|
+
return;
|
|
6753
|
+
}
|
|
6747
6754
|
if (previous || !allocated.has(identity.pid) || live.has(identity.pid)) {
|
|
6748
6755
|
throw new Error("Process identity is not owned by this run.");
|
|
6749
6756
|
}
|
|
6750
6757
|
if (!Number.isInteger(identity.ppid) || identity.ppid < 0 || identity.ppid > 2147483647) {
|
|
6751
6758
|
throw new Error("Invalid parent process identifier.");
|
|
6752
6759
|
}
|
|
6753
|
-
|
|
6760
|
+
const parent = Array.from(runs2.values()).find((parent2) => parent2.pid === identity.ppid);
|
|
6761
|
+
if (identity.ppid !== 0 && !parent) {
|
|
6754
6762
|
throw new Error("Parent process is not owned by this realm.");
|
|
6755
6763
|
}
|
|
6756
|
-
const
|
|
6764
|
+
const inherited = (parent == null ? void 0 : parent.pgid) ?? (parent == null ? void 0 : parent.pid) ?? identity.pid;
|
|
6765
|
+
const pgid = identity.pgid ?? inherited;
|
|
6766
|
+
if (!Number.isInteger(pgid) || pgid < 1 || pgid > 2147483647 || pgid !== identity.pid && pgid !== inherited) {
|
|
6767
|
+
throw new Error("Invalid or unowned process group identifier.");
|
|
6768
|
+
}
|
|
6769
|
+
const entry = describedIdentity({ ...identity, pgid });
|
|
6757
6770
|
runs2.set(token, entry);
|
|
6758
6771
|
live.set(entry.pid, entry);
|
|
6759
6772
|
receivers.set(entry.pid, receiver);
|
|
@@ -6777,6 +6790,21 @@ function createProcessRegistryOwner() {
|
|
|
6777
6790
|
if (!live.has(pid) || typeof signal !== "string") return false;
|
|
6778
6791
|
return ((_b3 = (_a3 = receivers.get(pid)) == null ? void 0 : _a3.handler) == null ? void 0 : _b3.call(_a3, pid, signal)) === true;
|
|
6779
6792
|
},
|
|
6793
|
+
lookupGroup(pgid) {
|
|
6794
|
+
active2();
|
|
6795
|
+
return Array.from(live.values()).some((identity) => identity.pgid === pgid);
|
|
6796
|
+
},
|
|
6797
|
+
signalGroup(pgid, signal) {
|
|
6798
|
+
var _a3, _b3;
|
|
6799
|
+
active2();
|
|
6800
|
+
if (typeof signal !== "string") return false;
|
|
6801
|
+
const members = Array.from(live.values()).filter((identity) => identity.pgid === pgid);
|
|
6802
|
+
let delivered = false;
|
|
6803
|
+
for (const identity of members) {
|
|
6804
|
+
if (live.get(identity.pid) === identity && ((_b3 = (_a3 = receivers.get(identity.pid)) == null ? void 0 : _a3.handler) == null ? void 0 : _b3.call(_a3, identity.pid, signal)) === true) delivered = true;
|
|
6805
|
+
}
|
|
6806
|
+
return delivered;
|
|
6807
|
+
},
|
|
6780
6808
|
receiveSignals(handler) {
|
|
6781
6809
|
active2();
|
|
6782
6810
|
receiver.handler = handler;
|
|
@@ -6851,14 +6879,22 @@ function __signalOwnedProcess(token, signal) {
|
|
|
6851
6879
|
return true;
|
|
6852
6880
|
}
|
|
6853
6881
|
const processRegistryOwner = createProcessRegistryOwner();
|
|
6854
|
-
|
|
6882
|
+
const localProcessRegistry = processRegistryOwner.createScope();
|
|
6883
|
+
localProcessRegistry.receiveSignals((pid, signal) => {
|
|
6884
|
+
const token = tokenOfPid(pid);
|
|
6885
|
+
return token !== null && __signalOwnedProcess(token, signal);
|
|
6886
|
+
});
|
|
6887
|
+
let processRegistry = localProcessRegistry;
|
|
6855
6888
|
const pidsOfRuns = /* @__PURE__ */ new Map();
|
|
6856
6889
|
function mintPid() {
|
|
6857
6890
|
return processRegistry.allocate();
|
|
6858
6891
|
}
|
|
6859
6892
|
function setRunPid(token, pid, ppid, started) {
|
|
6860
|
-
|
|
6861
|
-
pidsOfRuns.
|
|
6893
|
+
var _a3, _b3;
|
|
6894
|
+
const pgid = ((_a3 = pidsOfRuns.get(token)) == null ? void 0 : _a3.pgid) ?? ((started == null ? void 0 : started.detached) ? pid : ((_b3 = processRegistry.lookup(ppid)) == null ? void 0 : _b3.pgid) ?? pid);
|
|
6895
|
+
const { detached: _detached, ...description } = started ?? {};
|
|
6896
|
+
processRegistry.publish(token, { pid, ppid, pgid, ...description, startedAt: Date.now() });
|
|
6897
|
+
pidsOfRuns.set(token, { pid, ppid, pgid });
|
|
6862
6898
|
}
|
|
6863
6899
|
function runPid(token) {
|
|
6864
6900
|
return token === null || token === void 0 ? void 0 : pidsOfRuns.get(token);
|
|
@@ -6877,6 +6913,14 @@ function pidIsLive(pid) {
|
|
|
6877
6913
|
function signalPid(pid, signal) {
|
|
6878
6914
|
return processRegistry.signal(pid, signal);
|
|
6879
6915
|
}
|
|
6916
|
+
function groupIsLive(pgid) {
|
|
6917
|
+
var _a3;
|
|
6918
|
+
return (_a3 = processRegistry.lookupGroup) == null ? void 0 : _a3.call(processRegistry, pgid);
|
|
6919
|
+
}
|
|
6920
|
+
function signalGroup(pgid, signal) {
|
|
6921
|
+
var _a3;
|
|
6922
|
+
return (_a3 = processRegistry.signalGroup) == null ? void 0 : _a3.call(processRegistry, pgid, signal);
|
|
6923
|
+
}
|
|
6880
6924
|
const owners$1 = /* @__PURE__ */ new Map();
|
|
6881
6925
|
const allOwned = /* @__PURE__ */ new Map();
|
|
6882
6926
|
const heldBy = /* @__PURE__ */ new WeakMap();
|
|
@@ -31588,6 +31632,11 @@ function createProcess(options) {
|
|
|
31588
31632
|
if (signal !== 0 && (typeof name !== "string" || __substrateSignals[name] === void 0)) {
|
|
31589
31633
|
throw Object.assign(new TypeError("Unknown signal: " + signal), { code: "ERR_UNKNOWN_SIGNAL" });
|
|
31590
31634
|
}
|
|
31635
|
+
if (pid < 0) {
|
|
31636
|
+
const result = signal === 0 ? groupIsLive(-pid) : signalGroup(-pid, name);
|
|
31637
|
+
if (result === true) return true;
|
|
31638
|
+
if (result === false) throw Object.assign(new Error("kill ESRCH"), { code: "ESRCH", errno: -3, syscall: "kill" });
|
|
31639
|
+
}
|
|
31591
31640
|
if (pid !== proc.pid) {
|
|
31592
31641
|
const child = __substrateChildren.get(Math.abs(pid));
|
|
31593
31642
|
if (child === void 0 || child.exitCode !== null || child.signalCode !== null) {
|
|
@@ -76630,7 +76679,7 @@ function startChildRun(request) {
|
|
|
76630
76679
|
token,
|
|
76631
76680
|
pid,
|
|
76632
76681
|
((_a3 = runPid(__currentProcessToken() ?? __lastLaunchedToken)) == null ? void 0 : _a3.pid) ?? 0,
|
|
76633
|
-
{ argv: request.args.length ? request.args : [request.file], ...request.cwd ? { cwd: request.cwd } : {} }
|
|
76682
|
+
{ detached: request.detached, argv: request.args.length ? request.args : [request.file], ...request.cwd ? { cwd: request.cwd } : {} }
|
|
76634
76683
|
);
|
|
76635
76684
|
const controller = new AbortController();
|
|
76636
76685
|
const pendingStdin = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./page-workers-BUcWBF51.js";import{
|
|
1
|
+
import"./page-workers-BUcWBF51.js";import{i as Kr,T as Qr,a5 as Cc,a2 as Ec,a3 as Rc,h as po,a6 as Ic,a7 as Ke,a8 as yr,a9 as rt,aa as Zt,b as zn,ab as us,c as Zi,ac as Oc,ad as Mc,ae as Nc,u as kc,a as Ac,af as bt,ag as Tc,ah as mo,M as Pc}from"./browser-sandbox-bridge-Cxc4WXZV.js";class pn{adapter;objects=new Map;contexts=new Map;groups=new Map;sessions=new Map;prefix=globalThis.crypto.randomUUID();sequence=0;constructor(t){this.adapter=t}forSession(t){let r=this.sessions.get(t);return r||(r=new pn(this.adapter),this.sessions.set(t,r)),r}releaseSession(t){this.sessions.get(t)?.clear(),this.sessions.delete(t)}groupFor(t){for(const[r,i]of this.groups)if(i.has(t))return r}clear(){this.objects.clear(),this.groups.clear(),this.contexts.clear();for(const t of this.sessions.values())t.clear()}contextOf(t){return this.contexts.get(t)}serialize(t,r=!1,i,n){if(t===void 0)return{type:"undefined"};if(t===null)return{type:"object",subtype:"null",value:null};if(typeof t=="number"){const d=Number.isNaN(t)?"NaN":t===1/0?"Infinity":t===-1/0?"-Infinity":Object.is(t,-0)?"-0":void 0;return d?{type:"number",unserializableValue:d}:{type:"number",value:t}}if(typeof t=="bigint")return{type:"bigint",unserializableValue:`${t}n`};if(typeof t=="string"||typeof t=="boolean")return{type:typeof t,value:t};if(typeof t=="symbol")return{type:"symbol",description:String(t)};if(r)return{type:typeof t,value:JSON.parse(JSON.stringify(t))};const u=`${this.prefix}:${++this.sequence}`;if(this.objects.set(u,t),n!==void 0&&this.contexts.set(u,n),i){const d=this.groups.get(i)??new Set;d.add(u),this.groups.set(i,d)}const c=this.adapter.describe(t);return{type:typeof t,...c,description:c.description??c.className,objectId:u}}argument(t){if(t.objectId){if(!this.objects.has(t.objectId))throw new Error(`Could not find object with given id ${t.objectId}`);return this.objects.get(t.objectId)}if(t.unserializableValue){switch(t.unserializableValue){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;case"-0":return-0}if(/^-?\d+n$/.test(t.unserializableValue))return BigInt(t.unserializableValue.slice(0,-1));throw new Error("Invalid unserializable value")}return t.value}async execute(t){if(t.sessionId!==void 0){const{sessionId:u,...c}=t;return this.forSession(u).execute(c)}const r=t.params??{},i=u=>({id:t.id,result:u}),n=typeof r.objectGroup=="string"?r.objectGroup:typeof r.objectId=="string"?this.groupFor(r.objectId):void 0;switch(t.method){case"Runtime.evaluate":{const u=typeof r.contextId=="number"?r.contextId:void 0;let c=this.adapter.evaluate(String(r.expression??""),u);return r.awaitPromise&&(c=await c),i({result:this.serialize(c,r.returnByValue===!0,n,u)})}case"Runtime.callFunctionOn":{const u=typeof r.executionContextId=="number"?r.executionContextId:typeof r.objectId=="string"?this.contextOf(r.objectId):void 0,c=typeof r.objectId=="string"?this.argument({objectId:r.objectId}):this.adapter.globalObject(u),d=Array.isArray(r.arguments)?r.arguments.map(g=>this.argument(g)):[];let o=this.adapter.invoke(String(r.functionDeclaration??"() => undefined"),c,d,u);return r.awaitPromise&&(o=await o),i({result:this.serialize(o,r.returnByValue===!0,n,u)})}case"Runtime.getProperties":{const u=this.argument({objectId:String(r.objectId??"")}),c=this.contextOf(String(r.objectId??"")),d=this.adapter.properties(u).map(({name:o,descriptor:g})=>({name:o,configurable:g.configurable??!1,enumerable:g.enumerable??!1,isOwn:!0,..."value"in g?{value:this.serialize(g.value,!1,n,c),writable:g.writable??!1}:{...g.get?{get:this.serialize(g.get,!1,n,c)}:{},...g.set?{set:this.serialize(g.set,!1,n,c)}:{}}}));return i({result:d,internalProperties:[]})}case"Runtime.releaseObject":{const u=String(r.objectId??"");this.objects.delete(u),this.contexts.delete(u);for(const c of this.groups.values())c.delete(u);return i({})}case"Runtime.releaseObjectGroup":{const u=this.groups.get(String(r.objectGroup??""));for(const c of u??[])this.objects.delete(c),this.contexts.delete(c);return this.groups.delete(String(r.objectGroup??"")),i({})}default:return}}}class Dc{backendIds=new WeakMap;backendNodes=new Map;sessions=new Map;sequence=0;backend(t){const r=this.backendIds.get(t);if(r!==void 0)return r;const i=++this.sequence;return this.backendIds.set(t,i),this.backendNodes.set(i,t),i}expose(t,r){let i=this.sessions.get(t);i||(i={ids:new WeakMap,nodes:new Map},this.sessions.set(t,i));const n=i.ids.get(r);if(n!==void 0)return n;const u=++this.sequence;return i.ids.set(r,u),i.nodes.set(u,r),this.backend(r),u}get(t,r){return this.sessions.get(t)?.nodes.get(r)}getBackend(t){return this.backendNodes.get(t)}releaseSession(t){this.sessions.delete(t)}clear(){this.sessions.clear(),this.backendNodes.clear(),this.backendIds=new WeakMap}}const Lc=4096,_c=200,Qa=128*1024,go=2e3,Fc=20,Uc=64,wt=2048,yo=64*1024,Fr=4096,qn=8e6;let es;const Za=new Set;Object.defineProperty(globalThis,"__substrateDocumentStart",{configurable:!0,value:e=>{for(const t of Za)try{t(e)}catch{}}});function $c(e){es=e}class Bc{preview;virtualPort;scriptSource;constructor(t,r){this.preview=t,this.virtualPort=r}connectProtocol(t,r){if(!es)throw new Error("This page lends no protocol surface: none is registered.");const{window:i}=this.context();return es(t,r,{window:i,documentStart:n=>{Za.add(n)},validateDocument:bo,urls:{toSurface:n=>this.surfaceUrl(n),fromSurface:n=>this.guestUrl(n),hostToSurface:n=>n==="localhost"||n==="127.0.0.1"||n===location.hostname?location.hostname:void 0,hostFromSurface:n=>n===location.hostname?"localhost":n},navigation:{navigate:n=>this.navigate(n),reload:()=>this.reload()},capture:n=>this.captureProtocolImage(n)})}guestUrl(t){let r;try{r=new URL(t)}catch{return t}if(r.origin!==location.origin)return t;const i=/^\/__virtual__\/([0-9]+)(\/.*)?$/u.exec(r.pathname),n=i?i[1]:String(this.virtualPort),u=i?i[2]??"/":r.pathname;return`http://localhost:${n}${u}${r.search}${r.hash}`}surfaceUrl(t){let r;try{r=new URL(t)}catch{return}if(r.origin===location.origin)return t;const i=r.hostname==="localhost"||r.hostname==="127.0.0.1"||r.hostname==="[::1]";if(r.protocol!=="http:"&&r.protocol!=="https:"||!i)return;const n=Number(r.port||(r.protocol==="https:"?443:80)),u=`${r.pathname}${r.search}${r.hash}`;return n===this.virtualPort?`${location.origin}${u}`:`${location.origin}/__virtual__/${n}${u}`}async captureProtocolImage(t){const r=t.format??"png";if(r!=="png"&&r!=="jpeg"&&r!=="webp")throw new Error("Unsupported preview image format.");if(t.fromSurface===!1)throw new Error("Preview capture cannot capture native surfaces.");const i=Number(t.quality??80);if(!Number.isFinite(i)||i<0||i>100)throw new Error("Invalid image quality.");const n=t.clip,u=await this.screenshot({fullPage:n!==void 0||t.captureBeyondViewport===!0});if(u.format!=="png")throw new Error("Preview could not produce PNG pixels.");const c=n?.x??0,d=n?.y??0,o=n?.width??u.width,g=n?.height??u.height,s=n?.scale??1;if(![c,d,o,g,s].every(Number.isFinite)||c<0||d<0||o<=0||g<=0||s<=0)throw new Error("Invalid preview capture clip.");if(c+o>u.width||d+g>u.height)throw new Error("Requested clip exceeds the bounded inspector capture.");const m=Math.min(1,Number(t.maxWidth??o)/o,Number(t.maxHeight??g)/g);if(!Number.isFinite(m)||m<=0)throw new Error("Invalid preview capture dimensions.");const l=Math.max(1,Math.round(o*s*m)),a=Math.max(1,Math.round(g*s*m));if(l>Fr||a>Fr||l*a>qn)throw new Error("Requested image exceeds the inspector capture limits.");const h=await wo(u.dataUrl),f=document.createElement("canvas");f.width=l,f.height=a;const y=f.getContext("2d");if(!y)throw new Error("Canvas rendering is unavailable.");y.drawImage(h,c,d,o,g,0,0,l,a);const R=f.toDataURL(`image/${r}`,i/100);if(!R.startsWith(`data:image/${r};`))throw new Error("Requested image encoder is unavailable.");const{window:x}=this.context();return{data:R.slice(R.indexOf(",")+1),deviceWidth:x.innerWidth,deviceHeight:x.innerHeight,scrollOffsetX:x.scrollX,scrollOffsetY:x.scrollY,timestamp:Date.now()/1e3}}loaded(){this.context(),this.scriptSource!==void 0&&this.installScript(this.scriptSource)}async execute(t){if(!Number.isSafeInteger(t.id)||t.id<1)throw new Error("Invalid preview command identifier.");switch(t.operation){case"snapshot":return this.snapshot();case"query":return this.query(t.selector);case"screenshot":return this.screenshot(t.fullPage===void 0?{}:{fullPage:t.fullPage});case"navigate":return this.navigate(t.url);case"reload":return this.reload();case"network-idle":return this.networkIdle(t.idleMs,t.timeoutMs);case"set-script":return this.setScript(t.source);case"evaluate":{if(typeof t.source!="string"||t.source.length>yo)throw new Error("Preview evaluation exceeds 64 KiB.");const{window:r}=this.context(),n=await new r.Function("args","preview",`return (async () => { ${t.source}
|
|
2
2
|
})();`)(t.args,{screenshot:c=>this.screenshot(c)}),u=JSON.stringify(n??null);if(u.length>1024*1024)throw new Error("Preview evaluation result exceeds 1 MiB.");return JSON.parse(u)}}}snapshot(){const{document:t,window:r}=this.context(),i=t.documentElement,n=t.body,u=Math.max(i.scrollWidth,i.clientWidth,n?.scrollWidth??0,n?.clientWidth??0),c=Math.max(i.scrollHeight,i.clientHeight,n?.scrollHeight??0,n?.clientHeight??0);return{url:r.location.href,title:t.title.slice(0,4096),readyState:t.readyState,text:(n?.innerText??"").slice(0,Qa),viewport:{width:r.innerWidth,height:r.innerHeight,devicePixelRatio:r.devicePixelRatio},document:{width:u,height:c,scrollX:r.scrollX,scrollY:r.scrollY,overflowX:u>r.innerWidth,overflowY:c>r.innerHeight},accessibility:jc(t)}}query(t){if(typeof t!="string"||t.length===0||t.length>Lc)throw new Error("Preview selector must contain 1..4096 characters.");const{document:r,window:i}=this.context();let n;try{n=r.querySelectorAll(t)}catch{throw new Error("Preview selector is invalid.")}return[...n].slice(0,_c).map(u=>Wc(u,i))}async screenshot(t={}){if(t.fullPage!==void 0&&typeof t.fullPage!="boolean")throw new Error("Invalid fullPage screenshot option.");const{document:r,window:i}=this.context(),n=r.documentElement;let u=Math.min(Fr,Math.max(1,t.fullPage===!1?i.innerWidth:n.scrollWidth,i.innerWidth)),c=Math.min(Fr,Math.max(1,t.fullPage===!1?i.innerHeight:n.scrollHeight,i.innerHeight));const d=u*c;if(d>qn){const a=Math.sqrt(qn/d);u=Math.max(1,Math.floor(u*a)),c=Math.max(1,Math.floor(c*a))}const o=Gc(n);t.fullPage===!1&&(o.style.transform=`translate(${-i.scrollX}px, ${-i.scrollY}px)`,o.style.transformOrigin="top left");const g=new XMLSerializer().serializeToString(o);if(g.length>32*1024*1024)throw new Error("Screenshot DOM exceeds 32 MiB.");const s=`<svg xmlns="http://www.w3.org/2000/svg" width="${u}" height="${c}"><foreignObject width="100%" height="100%">${g}</foreignObject></svg>`,m=Hn(s),l="DOM reconstruction; images the page may not read, external fonts, embedded media and native compositor effects are omitted";try{const a=await wo(m),h=r.createElement("canvas");h.width=u,h.height=c;const f=h.getContext("2d");if(!f)throw new Error("Canvas rendering is unavailable.");const y=w=>w==="rgba(0, 0, 0, 0)"||w==="transparent",R=i.getComputedStyle(n).backgroundColor,x=y(R)?i.getComputedStyle(r.body??n).backgroundColor:R;f.fillStyle=y(x)?"#ffffff":x,f.fillRect(0,0,u,c),f.drawImage(a,0,0,u,c);try{return{dataUrl:h.toDataURL("image/png"),format:"png",width:u,height:c,fidelity:l}}catch{return{dataUrl:Hn(s),format:"svg",width:u,height:c,fidelity:l}}}catch{return{dataUrl:Hn(s),format:"svg",width:u,height:c,fidelity:l}}}async navigate(t){if(typeof t!="string"||t.length===0||t.length>16384)throw new Error("Preview navigation target is invalid.");const r=this.preview.src||`${location.origin}/`,i=/^\/__virtual__\/([0-9]+)\//u.exec(r.startsWith("about:")?"":new URL(r).pathname),n=new URL(i?`/__virtual__/${i[1]}/`:"/",location.origin),u=t.startsWith("/")?new URL(t.slice(1),n):new URL(t,r),c=/^\/__virtual__\/[0-9]+\//u.test(u.pathname);if(u.origin!==location.origin||!(u.pathname.startsWith(n.pathname)||c))throw new Error("Preview navigation cannot leave its virtual application.");return await this.load(u.href),{url:this.context().window.location.href}}async reload(){const t=this.preview.contentWindow;let r=this.preview.src;try{r=t?.location.href||r}catch{}return await this.load(r,()=>{try{t.location.reload()}catch{this.preview.src=r}}),{url:this.context().window.location.href}}async networkIdle(t=500,r=1e4){if(!Number.isSafeInteger(t)||t<0||t>5e3||!Number.isSafeInteger(r)||r<1||r>3e4)throw new Error("Preview network-idle bounds are invalid.");const i=Date.now()+r;for(;Date.now()<i;){const n=this.context().window.__browserRuntimeNetworkState,u=n?.lastChanged??0,c=Date.now()-u;if((n?.pending??0)===0&&c>=t)return{idleForMs:c};await Xc(Math.min(50,Math.max(1,i-Date.now())))}throw new Error("Preview did not reach network idle before the timeout.")}setScript(t){if(t!==void 0&&(typeof t!="string"||t.length>yo))throw new Error("Preview instrumentation exceeds 64 KiB.");return this.scriptSource=t,t!==void 0&&this.installScript(t),{installed:t!==void 0}}installScript(t){const{document:r}=this.context();r.querySelectorAll("script[data-browser-runtime-instrumentation]").forEach(n=>n.remove());const i=r.createElement("script");i.dataset.browserRuntimeInstrumentation="",i.textContent=t,(r.head??r.documentElement).append(i)}load(t,r=()=>{this.preview.src=t}){return new Promise((i,n)=>{const u=setTimeout(()=>d(new Error("Preview navigation timed out.")),15e3),c=()=>d(),d=o=>{clearTimeout(u),this.preview.removeEventListener("load",c),o?n(o):i()};this.preview.addEventListener("load",c,{once:!0}),r()})}context(){const t=this.preview.contentWindow,r=this.preview.contentDocument;if(!t||!r)throw new Error("Generated preview is unavailable.");return bo(r),{document:r,window:t}}}function bo(e){if(e.querySelector('meta[name="browser-substrate-host"]'))throw new Error("Preview routing failed: a host document was returned instead of the generated app.")}function Wc(e,t){const r=e,i=e.getBoundingClientRect(),n=t.getComputedStyle(e),u={};for(const c of[...e.attributes].slice(0,Uc))u[c.name]=c.value.slice(0,wt);return{tag:e.tagName.toLowerCase(),...e.id?{id:e.id.slice(0,wt)}:{},classes:[...e.classList].slice(0,64),...ts(e)?{role:ts(e)}:{},...rs(e)?{name:rs(e)}:{},text:(r.innerText??e.textContent??"").trim().slice(0,Qa),visible:n.display!=="none"&&n.visibility!=="hidden"&&Number.parseFloat(n.opacity||"1")>0&&i.width>0&&i.height>0,box:Vc(i),attributes:u}}function jc(e){const t=[...e.querySelectorAll("a,button,input,select,textarea,summary,[role],[aria-label],h1,h2,h3,h4,h5,h6,main,nav,aside,header,footer,form,table")];let r=go;const i=new Set(t.slice(0,go)),n=[],u=new Map;for(const d of i){const o=zc(d,i);if(!o)n.push(d);else{const g=u.get(o)??[];g.push(d),u.set(o,g)}}const c=(d,o)=>{if(r--<=0||o>Fc)return;const g=ts(d);if(!g)return;const s=(u.get(d)??[]).map(h=>c(h,o+1)).filter(h=>!!h),m=Hc(d.getAttribute("aria-checked")??(d.tagName==="INPUT"&&new Set(["checkbox","radio"]).has(d.type)?String(d.checked):null)),l=el(d.getAttribute("aria-expanded")),a=/^h[1-6]$/iu.test(d.tagName)?Number(d.tagName.slice(1)):void 0;return{role:g,name:rs(d),tag:d.tagName.toLowerCase(),...d.disabled===!0||d.getAttribute("aria-disabled")==="true"?{disabled:!0}:{},...m!==void 0?{checked:m}:{},...l!==void 0?{expanded:l}:{},...a!==void 0?{level:a}:{},...s.length>0?{children:s}:{}}};return n.map(d=>c(d,0)).filter(d=>!!d)}function zc(e,t){let r=e.parentElement;for(;r;){if(t.has(r))return r;r=r.parentElement}}function ts(e){const t=e.getAttribute("role");if(t)return t.split(/\s+/u)[0]??"";const r=e.tagName.toLowerCase();return/^h[1-6]$/u.test(r)?"heading":{a:e.hasAttribute("href")?"link":"generic",button:"button",input:qc(e),select:"combobox",textarea:"textbox",summary:"button",main:"main",nav:"navigation",aside:"complementary",header:"banner",footer:"contentinfo",form:"form",table:"table"}[r]??""}function qc(e){return e.type==="checkbox"?"checkbox":e.type==="radio"?"radio":e.type==="range"?"slider":e.type==="button"||e.type==="submit"||e.type==="reset"?"button":"textbox"}function rs(e){const t=e.getAttribute("aria-label");if(t)return t.slice(0,wt);const r=e.getAttribute("aria-labelledby");if(r){const n=r.split(/\s+/u).map(u=>e.ownerDocument.getElementById(u)?.textContent?.trim()??"").filter(Boolean).join(" ");if(n)return n.slice(0,wt)}if(e.tagName==="IMG"&&e.alt)return e.alt.slice(0,wt);if(e.tagName==="INPUT"){const n=e,u=n.labels?.[0]?.textContent?.trim();if(u)return u.slice(0,wt);if(n.value&&new Set(["button","submit","reset"]).has(n.type))return n.value.slice(0,wt);if(n.placeholder)return n.placeholder.slice(0,wt)}const i=e.getAttribute("title");return i?i.slice(0,wt):(e.textContent??"").trim().replace(/\s+/gu," ").slice(0,wt)}function el(e){if(e==="true")return!0;if(e==="false")return!1}function Hc(e){return e==="mixed"?"mixed":el(e)}function Vc(e){return{x:e.x,y:e.y,width:e.width,height:e.height}}function wo(e){return new Promise((t,r)=>{const i=new Image;i.onload=()=>t(i),i.onerror=()=>r(new Error("The serialized preview could not be rendered.")),i.src=e})}function Hn(e){return`data:image/svg+xml;base64,${Kr(new TextEncoder().encode(e))}`}function Gc(e){const t=e.ownerDocument;let r=0;const i=(n,u)=>{if(n.nodeType===3)return t.createTextNode(n.nodeValue??"");if(n.nodeType!==1)return;const c=n,d=c.localName;if(/^(script|object|embed|video|audio|source|link|template|noscript)$/u.test(d))return;if(++r>5e3)throw new Error("Screenshot DOM exceeds 5000 elements.");if(d==="style")return u||/@import|url\s*\(/iu.test(c.textContent??"")?void 0:c.cloneNode(!0);const o=c.ownerDocument.defaultView.getComputedStyle(c),g=Array.from(o).map(a=>{const h=o.getPropertyValue(a);return/url\s*\(/iu.test(h)?"":`${a}:${h};`}).join("");if(d==="iframe"){let a=null;try{a=c.contentDocument}catch{a=null}const h=a?.documentElement?i(a.documentElement,!0):void 0;if(!h)return;const f=t.createElement("div");return f.setAttribute("style",`${g}overflow:hidden;contain:paint;${o.display==="inline"?"display:inline-block;":""}`),f.append(h),f}if(d==="canvas"){const a=c;try{const h=t.createElement("img");return h.src=a.toDataURL("image/png"),h.width=a.width,h.height=a.height,h.setAttribute("style",g),h}catch{return}}const s=c.cloneNode(!1);if(s.setAttribute("style",g),d==="input")s.setAttribute("value",c.value),s.toggleAttribute("checked",c.checked);else{if(d==="textarea")return s.textContent=c.value,s;if(d==="option")s.toggleAttribute("selected",c.selected);else if(d==="img"){const a=c;if(s.removeAttribute("srcset"),!(s.getAttribute("src")??"").startsWith("data:")&&(s.removeAttribute("src"),a.complete&&a.naturalWidth))try{const h=t.createElement("canvas");h.width=a.naturalWidth,h.height=a.naturalHeight,h.getContext("2d")?.drawImage(a,0,0),s.setAttribute("src",h.toDataURL("image/png"))}catch{}}}const m=c.shadowRoot,l=m?m.childNodes:d==="slot"&&c.getRootNode()!==c.ownerDocument?c.assignedNodes({flatten:!0}):c.childNodes;for(const a of l){const h=i(a,u||m!==null);h&&s.appendChild(h)}return s};return i(e,!1)}function Xc(e){return new Promise(t=>setTimeout(t,e))}const er=new URLSearchParams(location.search),tl=new URL(er.get("parentOrigin")||"").origin,ur=er.get("nonce")||"",pt=Number.parseInt(er.get("port")||"",10),vo=pt===0,Ct=document.querySelector("#generated-preview"),ns=new Bc(Ct,pt);let $t;window.addEventListener("pagehide",()=>{$t?.close(),Ye("protocol-disconnect")});const ds=1e4,Ur=new Map,cr=new Map,So=64*1024,Jc=8*1024*1024,Yc=64*1024*1024,xo=(e,t)=>`${location.origin}${e===pt||e===0?"":`/__virtual__/${e}`}${t}`,rl=er.get("clear")==="1"||er.get("clear")==="reuse",Kc=er.get("clear")==="reuse";if(!ur||!rl&&(!Number.isSafeInteger(pt)||pt<0||pt>65535))throw new Error("Invalid sandbox bootstrap parameters.");const Qc="<script>(function(s){try{var h=parent.__substrateDocumentStart;if(h)h(window)}catch(e){}if(s)s.remove()})(document.currentScript)<\/script>";async function Zc(){localStorage.clear(),sessionStorage.clear();for(const i of await indexedDB.databases())i.name&&indexedDB.deleteDatabase(i.name);for(const i of await caches.keys())await caches.delete(i);const e=globalThis.cookieStore;if(e)for(const i of await e.getAll())await e.delete({name:i.name,...i.path?{path:i.path}:{},...i.domain?{domain:i.domain}:{}});const t=await navigator.storage.getDirectory();for await(const i of t.keys())await t.removeEntry(i,{recursive:!0});const r=`${location.origin}/__sw__.js`;for(const i of await navigator.serviceWorker.getRegistrations()){const n=(i.active??i.waiting??i.installing)?.scriptURL;Kc&&i.scope===`${location.origin}/`&&n===r||await i.unregister()}}function Ye(e,t){window.parent.postMessage({channel:Qr,nonce:ur,type:e,payload:t},tl)}async function eu(){const e=await navigator.serviceWorker.register("/__sw__.js",{scope:"/",updateViaCache:"none"});await e.update();const t=e.installing||e.waiting||e.active;if(!t)throw new Error("Sandbox service worker registration failed.");return t.state!=="activated"&&await tu(t,"activated"),t}function tu(e,t){return new Promise((r,i)=>{const n=globalThis.setTimeout(()=>c(new Error(`Sandbox service worker did not reach ${t}.`)),ds),u=()=>{e.state===t?c():e.state==="redundant"&&c(new Error("Sandbox service worker became redundant during startup."))},c=d=>{globalThis.clearTimeout(n),e.removeEventListener("statechange",u),d?i(d):r()};e.addEventListener("statechange",u),u()})}function ru(e){return navigator.serviceWorker.controller===e?Promise.resolve():new Promise((t,r)=>{const i=globalThis.setTimeout(()=>u(new Error("Sandbox service worker did not take control.")),ds),n=()=>{navigator.serviceWorker.controller===e&&u()},u=c=>{globalThis.clearTimeout(i),navigator.serviceWorker.removeEventListener("controllerchange",n),c?r(c):t()};navigator.serviceWorker.addEventListener("controllerchange",n),n()})}function Co(){try{ns.loaded(),Ye("preview-load")}catch(e){$t?.close(),$t=void 0,Ye("error",{message:e instanceof Error?e.message:String(e)})}}function Eo(e){return e==="document"||e==="iframe"||e==="frame"}function $r(e,t){return t?[{type:"stream-start",id:e,data:{statusCode:204,statusMessage:"No Content",headers:{}}},{type:"stream-end",id:e}]:[{type:"response",id:e,data:{statusCode:204,statusMessage:"No Content",headers:{},bodyBase64:""}}]}async function nu(){const e=await eu();let t;const r=new Cc(await Ec(`sandbox:${pt}`).then(d=>(Rc(window,d),d)));async function i(d){if((d?.type==="stream-pull"||d?.type==="stream-cancel")&&Number.isSafeInteger(d.id)&&cr.has(d.id)){const a=cr.get(d.id);if(d.type==="stream-cancel"){cr.delete(d.id);return}const h=a.shift();h&&t.postMessage({type:"stream-chunk",id:d.id,data:{chunkBase64:Kr(h)}}),a.length||(cr.delete(d.id),t.postMessage({type:"stream-end",id:d.id}));return}d?.type==="stream-cancel"&&Number.isSafeInteger(d.id)&&r.forget(d.id),r.request(d);const o=d?.data,g=$t?.network;if(d?.type!=="request"||!g||!o||!o.destination||!Number.isSafeInteger(d.id)||typeof o.url!="string"||typeof o.method!="string"||!Number.isSafeInteger(o.port)){Ye("request",d);return}const s=d.id,m=xo(o.port,o.url);let l;try{l=await g.request(String(s),{url:m,method:o.method,headers:Object.entries(o.headers??{}),destination:o.destination,...o.body&&o.body.byteLength?{body:new Uint8Array(o.body)}:{}})}catch{Ye("request",d);return}if(l.type==="fulfill"){const a={};for(const[f,y]of l.headers)a[f]=a[f]===void 0?y:`${a[f]}, ${y}`;l={...l,body:Ic(l.body,a,void 0)};const h=l.headers.filter(([f])=>f.toLowerCase()==="set-cookie").map(([,f])=>f);if(r.answer({type:"response",id:s,data:{headers:h.length?{"set-cookie":h}:{}}}),o.flowControl){const f=[];for(let y=0;y<l.body.byteLength;y+=So)f.push(l.body.subarray(y,y+So));t.postMessage({type:"stream-start",id:s,data:{statusCode:l.status,statusMessage:l.statusText,headers:a}}),f.length?cr.set(s,f):t.postMessage({type:"stream-end",id:s})}else o.streaming?(t.postMessage({type:"stream-start",id:s,data:{statusCode:l.status,statusMessage:l.statusText,headers:a}}),l.body.byteLength&&t.postMessage({type:"stream-chunk",id:s,data:{chunkBase64:Kr(l.body)}}),t.postMessage({type:"stream-end",id:s})):t.postMessage({type:"response",id:s,data:{statusCode:l.status,statusMessage:l.statusText,headers:a,bodyBase64:Kr(l.body)}});return}if(l.type==="fail"){if(r.forget(s),Eo(o.destination))for(const a of $r(s,!!(o.streaming||o.flowControl)))t.postMessage(a);else t.postMessage({type:o.streaming?"stream-error":"response",id:s,error:l.reason});return}if(l.url)try{const a=new URL(l.url),h=Number(a.port||(a.protocol==="https:"?443:80));if(a.pathname.startsWith("/__virtual__/")){const f=/^\/__virtual__\/([0-9]+)(\/.*)?$/u.exec(a.pathname);f&&(o.port=Number(f[1]),o.url=`${f[2]??"/"}${a.search}`)}else a.origin===location.origin?(o.port=pt,o.url=`${a.pathname}${a.search}`):(o.port=h,o.url=`${a.pathname}${a.search}`)}catch{}l.method&&(o.method=l.method),l.headers&&(o.headers=Object.fromEntries(l.headers)),l.postData&&(o.body=l.postData.slice().buffer),Ur.set(s,{url:xo(o.port,o.url),chunks:[],size:0,document:Eo(o.destination),streaming:!!(o.streaming||o.flowControl),flowControl:!!o.flowControl}),Ye("request",d)}function n(d){return/is not listening/u.test(String(d))?"net::ERR_CONNECTION_REFUSED":"net::ERR_FAILED"}function u(d){const o=d,g=$t?.network;if(!o||!Number.isSafeInteger(o.id)||!Ur.has(o.id))return;const s=Ur.get(o.id),m=String(o.id),l=y=>Object.fromEntries(Object.entries(y??{}).map(([R,x])=>[R,Array.isArray(x)?x.join(", "):String(x)])),a=()=>{Ur.delete(o.id)};if(o.error||o.type==="stream-error")return g?.failed(m,n(o.error)),a(),s.download?[]:s.document?$r(o.id,s.streaming):void 0;const h=()=>s.download?Yc:Jc,f=()=>{s.download&&s.flowControl&&Ye("request",{type:"stream-pull",id:o.id})};if(o.type==="response"){g?.responded(m,{status:o.data?.statusCode??200,statusText:o.data?.statusMessage??"",headers:l(o.data?.headers),url:s.url})&&(s.download=!0);const R=o.data?.bodyBase64?po(o.data.bodyBase64):new Uint8Array;if(g?.finished(m,R.byteLength<=h()?R:void 0),a(),s.download)return $r(o.id,!1)}else if(o.type==="stream-start"){if(g?.responded(m,{status:o.data?.statusCode??200,statusText:o.data?.statusMessage??"",headers:l(o.data?.headers),url:s.url}))return s.download=!0,f(),$r(o.id,!0)}else if(o.type==="stream-chunk"&&o.data?.chunkBase64){const y=po(o.data.chunkBase64);if(s.size+=y.byteLength,s.size<=h()&&s.chunks.push(y),s.download)return f(),[]}else if(o.type==="stream-end"){let y;if(s.size<=h()){y=new Uint8Array(s.size);let R=0;for(const x of s.chunks)y.set(x,R),R+=x.byteLength}if(g?.finished(m,y),a(),s.download)return[]}}async function c(){const d=new MessageChannel;t=d.port1,r.reset();const o=new Promise((g,s)=>{const m=globalThis.setTimeout(()=>s(new Error("Sandbox service worker bridge timed out.")),ds);d.port1.onmessage=l=>{if(l.data?.type==="bridge-ready"){globalThis.clearTimeout(m),g();return}i(l.data)}});e.postMessage({type:"init",data:{ownDocuments:[location.pathname,"/node-host.html","/python-host.html"],documentPrelude:Qc}},[d.port2]),await o,vo||e.postMessage({type:"server-registered",data:{port:pt,hostname:"0.0.0.0",primary:!0}})}window.addEventListener("message",d=>{if(d.origin===tl&&d.source===window.parent){const o=d.data;if(o.channel===Qr&&o.nonce===ur&&o.type==="protocol-connect"){const g=o.payload?.id,s=d.ports[0];if(!s||d.ports.length!==1||typeof g!="string"||!/^[a-zA-Z0-9_-]{1,128}$/u.test(g)){for(const m of d.ports)m.close();return}try{$t?.close(),$t=ns.connectProtocol(s,g),s.postMessage({type:"protocol-ready",id:g})}catch(m){s.postMessage({type:"close",code:1011,reason:m instanceof Error?m.message:String(m)}),s.close()}return}if(o.channel===Qr&&o.nonce===ur&&o.type==="response"){const g=o.payload?.type;if(typeof g=="string"&&g.startsWith("websocket-"))Ct.contentWindow?.postMessage(o.payload,location.origin);else{r.answer(o.payload);for(const s of u(o.payload)??[o.payload])t.postMessage(s)}}if(o.channel===Qr&&o.nonce===ur&&o.type==="command"){const g=o.payload;ns.execute(g).then(s=>Ye("command-result",{id:g.id,result:s}),s=>Ye("command-result",{id:g?.id,error:s instanceof Error?s.message:String(s)}))}d.data?.channel==="vite-hmr"&&Ct.contentWindow?.postMessage(d.data,location.origin);return}if(d.source===Ct.contentWindow&&d.data?.type==="browser-agent-preview-load")Co();else if(d.source===Ct.contentWindow&&d.data?.type==="browser-agent-rendered")Ye("rendered",{revision:String(d.data.revision)});else if(d.source===Ct.contentWindow&&d.data?.type==="browser-agent-observation")Ye("observation",d.data.observation);else if(d.source===Ct.contentWindow&&typeof d.data?.type=="string"&&d.data.type.startsWith("websocket-")){const o=d.data;o.data?.port===0&&(o.data.port=pt),Ye("request",d.data)}}),navigator.serviceWorker.addEventListener("message",d=>{d.data?.type==="sw-needs-init"&&c().catch(o=>Ye("error",{message:o instanceof Error?o.message:String(o)}))}),await c(),await ru(e),Ct.addEventListener("load",Co),Ct.src=vo?"about:blank":`${location.origin}/`,Ye("ready",{documentId:crypto.randomUUID(),url:`${location.origin}/__virtual__/${pt}/`})}rl?Zc().then(()=>Ye("cleared"),e=>Ye("error",{message:e instanceof Error?e.message:String(e)})):nu().catch(e=>Ye("error",{message:e instanceof Error?e.message:String(e)}));var sn={},iu=Object.defineProperty,su=(e,t,r)=>t in e?iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>su(e,typeof t!="symbol"?t+"":t,r),Ro,ou=Object.defineProperty,au=(e,t,r)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Io=(e,t,r)=>au(e,typeof t!="symbol"?t+"":t,r),He=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(He||{});const Oo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Mo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Br={},nl={},lu=()=>!!globalThis.Zone;function fs(e){if(Br[e])return Br[e];const t=globalThis[e],r=t.prototype,i=e in Oo?Oo[e]:void 0,n=!!(i&&i.every(d=>{var o,g;return!!((g=(o=Object.getOwnPropertyDescriptor(r,d))==null?void 0:o.get)!=null&&g.toString().includes("[native code]"))})),u=e in Mo?Mo[e]:void 0,c=!!(u&&u.every(d=>{var o;return typeof r[d]=="function"&&((o=r[d])==null?void 0:o.toString().includes("[native code]"))}));if(n&&c&&!lu())return Br[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");d.style.display="none",document.body.appendChild(d);const o=d.contentWindow;if(!o)return t.prototype;const g=o[e].prototype;if(!g)return d.remove(),r;const s=navigator.userAgent;return s.includes("Safari")&&!s.includes("Chrome")?(d.classList.add("rr-block"),d.setAttribute("__rrwebUntaintedMutationObserver",""),nl[e]=()=>d.remove()):d.remove(),Br[e]=g}catch{return r}}const Vn={};function ot(e,t,r){var i,n;const u=(i=Vn[e])==null?void 0:i[r];if(u)return u.call(t);const c=fs(e),d=(n=Object.getOwnPropertyDescriptor(c,r))==null?void 0:n.get;return d?((Vn[e]||(Vn[e]={}))[r]=d,d.call(t)):t[r]}const Gn={};function il(e,t,r){const i=`${e}.${String(r)}`;if(Gn[i])return Gn[i].bind(t);const u=fs(e)[r];return typeof u!="function"?t[r]:(Gn[i]=u,u.bind(t))}function cu(e){return ot("Node",e,"ownerDocument")}function uu(e){return ot("Node",e,"childNodes")}function du(e){return ot("Node",e,"parentNode")}function fu(e){return ot("Node",e,"parentElement")}function hu(e){return ot("Node",e,"textContent")}function pu(e){return ot("Node",e,"firstChild")}function mu(e){return ot("Node",e,"lastChild")}function gu(e){return ot("Node",e,"nextSibling")}function yu(e){return ot("Node",e,"previousSibling")}function bu(e,t){return il("Node",e,"contains")(t)}function wu(e){return il("Node",e,"getRootNode")()}function vu(e){return!e||!("host"in e)?null:ot("ShadowRoot",e,"host")}function Su(e){return e.styleSheets}function xu(e){return!e||!("shadowRoot"in e)?null:ot("Element",e,"shadowRoot")}function Cu(e,t){return ot("Element",e,"querySelector")(t)}function Eu(e,t){return ot("Element",e,"querySelectorAll")(t)}function Ru(){return[fs("MutationObserver").constructor,nl.MutationObserver??(()=>{})]}let sl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(sl=()=>new Date().getTime());function Iu(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const Ze={ownerDocument:cu,childNodes:uu,parentNode:du,parentElement:fu,textContent:hu,firstChild:pu,lastChild:mu,nextSibling:gu,previousSibling:yu,contains:bu,getRootNode:wu,host:vu,styleSheets:Su,shadowRoot:xu,querySelector:Cu,querySelectorAll:Eu,nowTimestamp:sl,mutationObserverCtor:Ru,patch:Iu};function ol(e){return e.nodeType===e.ELEMENT_NODE}function dr(e){const t=e&&"host"in e&&"mode"in e&&Ze.host(e)||null;return!!(t&&"shadowRoot"in t&&Ze.shadowRoot(t)===e)}function fr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ou(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Mu(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function is(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const i=Array.from(t,n=>al(n,r)).join("");return Ou(i)}catch{return null}}function al(e,t){if(ku(e)){let r;try{r=is(e.styleSheet)||Mu(e)}catch{r=e.cssText}return e.styleSheet.href?ln(r,e.styleSheet.href):r}else{let r=e.cssText;return Au(e)&&e.selectorText.includes(":")&&(r=Nu(r)),t?ln(r,t):r}}function Nu(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ku(e){return"styleSheet"in e}function Au(e){return"selectorText"in e}class ll{constructor(){Io(this,"idNodeMap",new Map),Io(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Tu(){return new ll}function on({element:e,maskInputOptions:t,tagName:r,type:i,value:n,maskInputFn:u}){let c=n||"";const d=i&&Nt(i);return(t[r.toLowerCase()]||d&&t[d])&&(u?c=u(c,e):c="*".repeat(c.length)),c}function Nt(e){return e.toLowerCase()}const No="__rrweb_original__";function Pu(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let i=0;i<e.width;i+=r)for(let n=0;n<e.height;n+=r){const u=t.getImageData,c=No in u?u[No]:u;if(new Uint32Array(c.call(t,i,n,Math.min(r,e.width-i),Math.min(r,e.height-n)).data.buffer).some(o=>o!==0))return!1}return!0}function an(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Nt(t):null}function cl(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}const i=/\.([0-9a-z]+)(?:$)/i,n=r.pathname.match(i);return n?.[1]??null}function Du(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Lu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_u=/^(?:[a-z+]+:)?\/\//i,Fu=/^www\..*/i,Uu=/^(data:)([^,]*),(.*)/i;function ln(e,t){return(e||"").replace(Lu,(r,i,n,u,c,d)=>{const o=n||c||d,g=i||u||"";if(!o)return r;if(_u.test(o)||Fu.test(o))return`url(${g}${o}${g})`;if(Uu.test(o))return`url(${g}${o}${g})`;if(o[0]==="/")return`url(${g}${Du(t)+o}${g})`;const s=o.split("#")[0],m=o.substring(s.length),l=t.split("#")[0].split("/"),a=s.split("/");l.pop();for(const h of a)h!=="."&&(h===".."?l.pop():l.push(h));return`url(${g}${l.join("/")}${m}${g})`})}function Wr(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function $u(e,t,r=!1){const i=Array.from(t.childNodes),n=[];let u=0;if(i.length>1&&e&&typeof e=="string"){let c=Wr(e,r);const d=c.length/e.length;for(let o=1;o<i.length;o++)if(i[o].textContent&&typeof i[o].textContent=="string"){const g=Wr(i[o].textContent,r),s=100;let m=3;for(;m<g.length&&(g[m].match(/[a-zA-Z0-9]/)||g.indexOf(g.substring(0,m),1)!==-1);m++);for(;m<g.length;m++){let l=g.substring(0,m),a=c.split(l),h=-1;if(a.length===2)h=a[0].length;else if(a.length>2&&a[0]===""&&i[o-1].textContent!=="")h=c.indexOf(l,1);else if(a.length===1){if(l=l.substring(0,l.length-1),a=c.split(l),a.length<=1)return n.push(e),n;m=s+1}else m===g.length-1&&(h=c.indexOf(l));if(a.length>=2&&m>s){const f=i[o-1].textContent;if(f&&typeof f=="string"){const y=Wr(f).length;h=c.indexOf(l,y)}h===-1&&(h=a[0].length)}if(h!==-1){let f=Math.floor(h/d);for(;f>0&&f<e.length;){if(u+=1,u>50*i.length)return n.push(e),n;const y=Wr(e.substring(0,f),r);if(y.length===h){n.push(e.substring(0,f)),e=e.substring(f),c=c.substring(h);break}else y.length<h?f+=Math.max(1,Math.floor((h-y.length)/d)):f-=Math.max(1,Math.floor((y.length-h)*d))}break}}}}return n.push(e),n}function Bu(e,t){return $u(e,t).join("/* rr_split */")}let Wu=1;const ju=new RegExp("[^a-z0-9-_:]"),cn=-2;function ul(){return Wu++}function zu(e){if(e instanceof HTMLFormElement)return"form";const t=Nt(e.tagName);return ju.test(t)?"div":t}let Gt,ko;const qu=/^[^ \t\n\r\u000c]+/,Hu=/^[, \t\n\r\u000c]+/;function Vu(e,t){if(t.trim()==="")return t;let r=0;function i(u){let c;const d=u.exec(t.substring(r));return d?(c=d[0],r+=c.length,c):""}const n=[];for(;i(Hu),!(r>=t.length);){let u=i(qu);if(u.slice(-1)===",")u=Yt(e,u.substring(0,u.length-1)),n.push(u);else{let c="";u=Yt(e,u);let d=!1;for(;;){const o=t.charAt(r);if(o===""){n.push((u+c).trim());break}else if(d)o===")"&&(d=!1);else if(o===","){r+=1,n.push((u+c).trim());break}else o==="("&&(d=!0);c+=o,r+=1}}}return n.join(", ")}const Ao=new WeakMap;function Yt(e,t){return!t||t.trim()===""?t:hs(e,t)}function Gu(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hs(e,t){let r=Ao.get(e);if(r||(r=e.createElement("a"),Ao.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function dl(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Yt(e,i):r==="srcset"?Vu(e,i):r==="style"?ln(i,hs(e)):t==="object"&&r==="data"?Yt(e,i):i)}function fl(e,t,r){return["video","audio"].includes(e)&&Nt(t)==="autoplay"}function Xu(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}if(r)return e.matches(r)}catch{}return!1}function un(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?un(Ze.parentNode(e),t,r):!1;for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}return r?un(Ze.parentNode(e),t,r):!1}function hl(e,t,r,i){let n;if(ol(e)){if(n=e,!Ze.childNodes(n).length)return!1}else{if(Ze.parentElement(e)===null)return!1;n=Ze.parentElement(e)}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(un(n,t,i))return!0;if(r){if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}}catch{}return!1}function Ju(e,t,r){const i=e.contentWindow;if(!i)return;let n=!1,u;try{u=i.document.readyState}catch{return}if(u!=="complete"){const d=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(d),n=!0,t()});return}const c="about:blank";if(i.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Yu(e,t,r){let i=!1,n;try{n=e.sheet}catch{return}if(n)return;const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()})}function Ku(e,t){const{doc:r,mirror:i,blockClass:n,blockSelector:u,needsMask:c,inlineStylesheet:d,maskInputOptions:o={},maskTextFn:g,maskInputFn:s,dataURLOptions:m={},inlineImages:l,recordCanvas:a,keepIframeSrcFn:h,newlyAddedElement:f=!1,cssCaptured:y=!1}=t,R=Qu(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:He.Document,childNodes:[],compatMode:e.compatMode}:{type:He.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:He.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return ed(e,{doc:r,blockClass:n,blockSelector:u,inlineStylesheet:d,maskInputOptions:o,maskInputFn:s,dataURLOptions:m,inlineImages:l,recordCanvas:a,keepIframeSrcFn:h,newlyAddedElement:f,rootId:R});case e.TEXT_NODE:return Zu(e,{doc:r,needsMask:c,maskTextFn:g,rootId:R,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:He.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:He.Comment,textContent:Ze.textContent(e)||"",rootId:R};default:return!1}}function Qu(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Zu(e,t){const{needsMask:r,maskTextFn:i,rootId:n,cssCaptured:u}=t,c=Ze.parentNode(e),d=c&&c.tagName;let o="";const g=d==="STYLE"?!0:void 0,s=d==="SCRIPT"?!0:void 0;return s?o="SCRIPT_PLACEHOLDER":u||(o=Ze.textContent(e),g&&o&&(o=ln(o,hs(t.doc)))),!g&&!s&&o&&r&&(o=i?i(o,Ze.parentElement(e)):o.replace(/[\S]/g,"*")),{type:He.Text,textContent:o||"",rootId:n}}function ed(e,t){const{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:u,maskInputOptions:c={},maskInputFn:d,dataURLOptions:o={},inlineImages:g,recordCanvas:s,keepIframeSrcFn:m,newlyAddedElement:l=!1,rootId:a}=t,h=Xu(e,i,n),f=zu(e);let y={};const R=e.attributes.length;for(let w=0;w<R;w++){const S=e.attributes[w];fl(f,S.name,S.value)||(y[S.name]=dl(r,f,Nt(S.name),S.value))}if(f==="link"&&u){const w=Array.from(r.styleSheets).find(v=>v.href===e.href);let S=null;w&&(S=is(w)),S&&(delete y.rel,delete y.href,y._cssText=S)}if(f==="style"&&e.sheet){let w=is(e.sheet);w&&(e.childNodes.length>1&&(w=Bu(w,e)),y._cssText=w)}if(["input","textarea","select"].includes(f)){const w=e.value,S=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&w?y.value=on({element:e,type:an(e),tagName:f,value:w,maskInputOptions:c,maskInputFn:d}):S&&(y.checked=S)}if(f==="option"&&(e.selected&&!c.select?y.selected=!0:delete y.selected),f==="dialog"&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&s){if(e.__context==="2d")Pu(e)||(y.rr_dataURL=e.toDataURL(o.type,o.quality));else if(!("__context"in e)){const w=e.toDataURL(o.type,o.quality),S=r.createElement("canvas");S.width=e.width,S.height=e.height;const v=S.toDataURL(o.type,o.quality);w!==v&&(y.rr_dataURL=w)}}if(f==="img"&&g){Gt||(Gt=r.createElement("canvas"),ko=Gt.getContext("2d"));const w=e,S=w.currentSrc||w.getAttribute("src")||"<unknown-src>",v=w.crossOrigin,E=()=>{w.removeEventListener("load",E);try{Gt.width=w.naturalWidth,Gt.height=w.naturalHeight,ko.drawImage(w,0,0),y.rr_dataURL=Gt.toDataURL(o.type,o.quality)}catch(O){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?E():w.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${S}! Error: ${O}`)}w.crossOrigin==="anonymous"&&(v?y.crossOrigin=v:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?E():w.addEventListener("load",E)}if(["audio","video"].includes(f)){const w=y;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(l||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),h){const{width:w,height:S}=e.getBoundingClientRect();y={class:y.class,rr_width:`${w}px`,rr_height:`${S}px`}}f==="iframe"&&!m(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let x;try{customElements.get(f)&&(x=!0)}catch{}return{type:He.Element,tagName:f,attributes:y,childNodes:[],isSVG:Gu(e)||void 0,needBlock:h,rootId:a,isCustom:x}}function De(e){return e==null?"":e.toLowerCase()}function pl(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function td(e,t){if(t.comment&&e.type===He.Comment)return!0;if(e.type===He.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&cl(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(De(e.attributes.name).match(/^msapplication-tile(image|color)$/)||De(e.attributes.name)==="application-name"||De(e.attributes.rel)==="icon"||De(e.attributes.rel)==="apple-touch-icon"||De(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&De(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(De(e.attributes.property).match(/^(og|twitter|fb):/)||De(e.attributes.name).match(/^(og|twitter):/)||De(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(De(e.attributes.name)==="robots"||De(e.attributes.name)==="googlebot"||De(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(De(e.attributes.name)==="author"||De(e.attributes.name)==="generator"||De(e.attributes.name)==="framework"||De(e.attributes.name)==="publisher"||De(e.attributes.name)==="progid"||De(e.attributes.property).match(/^article:/)||De(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(De(e.attributes.name)==="google-site-verification"||De(e.attributes.name)==="yandex-verification"||De(e.attributes.name)==="csrf-token"||De(e.attributes.name)==="p:domain_verify"||De(e.attributes.name)==="verify-v1"||De(e.attributes.name)==="verification"||De(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Kt(e,t){const{doc:r,mirror:i,blockClass:n,blockSelector:u,maskTextClass:c,maskTextSelector:d,skipChild:o=!1,inlineStylesheet:g=!0,maskInputOptions:s={},maskTextFn:m,maskInputFn:l,slimDOMOptions:a,dataURLOptions:h={},inlineImages:f=!1,recordCanvas:y=!1,onSerialize:R,onIframeLoad:x,iframeLoadTimeout:w=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:O=!1,cssCaptured:A=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:N=!0}=t;k||(k=hl(e,c,d,k===void 0));const _=Ku(e,{doc:r,mirror:i,blockClass:n,blockSelector:u,needsMask:k,inlineStylesheet:g,maskInputOptions:s,maskTextFn:m,maskInputFn:l,dataURLOptions:h,inlineImages:f,recordCanvas:y,keepIframeSrcFn:E,newlyAddedElement:O,cssCaptured:A});if(!_)return console.warn(e,"not serialized"),null;let z;i.hasNode(e)?z=i.getId(e):td(_,a)||!N&&_.type===He.Text&&!_.textContent.replace(/^\s+|\s+$/gm,"").length?z=cn:z=ul();const T=Object.assign(_,{id:z});if(i.add(e,T),z===cn)return null;R&&R(e);let ye=!o;if(T.type===He.Element){ye=ye&&!T.needBlock,delete T.needBlock;const se=Ze.shadowRoot(e);se&&fr(se)&&(T.isShadowHost=!0)}if((T.type===He.Document||T.type===He.Element)&&ye){a.headWhitespace&&T.type===He.Element&&T.tagName==="head"&&(N=!1);const se={doc:r,mirror:i,blockClass:n,blockSelector:u,needsMask:k,maskTextClass:c,maskTextSelector:d,skipChild:o,inlineStylesheet:g,maskInputOptions:s,maskTextFn:m,maskInputFn:l,slimDOMOptions:a,dataURLOptions:h,inlineImages:f,recordCanvas:y,preserveWhiteSpace:N,onSerialize:R,onIframeLoad:x,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:E,cssCaptured:!1};if(!(T.type===He.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===He.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(se.cssCaptured=!0);for(const pe of Array.from(Ze.childNodes(e))){const Ie=Kt(pe,se);Ie&&T.childNodes.push(Ie)}}let ie=null;if(ol(e)&&(ie=Ze.shadowRoot(e)))for(const pe of Array.from(Ze.childNodes(ie))){const Ie=Kt(pe,se);Ie&&(fr(ie)&&(Ie.isShadow=!0),T.childNodes.push(Ie))}}const be=Ze.parentNode(e);return be&&dr(be)&&fr(be)&&(T.isShadow=!0),T.type===He.Element&&T.tagName==="iframe"&&Ju(e,()=>{const se=e.contentDocument;if(se&&x){const ie=Kt(se,{doc:se,mirror:i,blockClass:n,blockSelector:u,needsMask:k,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:s,maskTextFn:m,maskInputFn:l,slimDOMOptions:a,dataURLOptions:h,inlineImages:f,recordCanvas:y,preserveWhiteSpace:N,onSerialize:R,onIframeLoad:x,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:E});ie&&x(e,ie)}},w),T.type===He.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&cl(T.attributes.href)==="css")&&Yu(e,()=>{if(S){const se=Kt(e,{doc:r,mirror:i,blockClass:n,blockSelector:u,needsMask:k,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:s,maskTextFn:m,maskInputFn:l,slimDOMOptions:a,dataURLOptions:h,inlineImages:f,recordCanvas:y,preserveWhiteSpace:N,onSerialize:R,onIframeLoad:x,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:E});se&&S(e,se)}},v),T}function rd(e,t){const{mirror:r=new ll,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:o=!1,recordCanvas:g=!1,maskAllInputs:s=!1,maskTextFn:m,maskInputFn:l,slimDOM:a=!1,dataURLOptions:h,preserveWhiteSpace:f,onSerialize:y,onIframeLoad:R,iframeLoadTimeout:x,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:v=()=>!1}=t,E=s===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:s===!1?{password:!0}:s,O=pl(a);return Kt(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:E,maskTextFn:m,maskInputFn:l,slimDOMOptions:O,dataURLOptions:h,inlineImages:o,recordCanvas:g,preserveWhiteSpace:f,onSerialize:y,onIframeLoad:R,iframeLoadTimeout:x,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:v,newlyAddedElement:!1})}function nd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function id(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),r}var jr={exports:{}},To;function sd(){if(To)return jr.exports;To=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return jr.exports=t(),jr.exports.createColors=t,jr.exports}const od={},ad=Object.freeze(Object.defineProperty({__proto__:null,default:od},Symbol.toStringTag,{value:"Module"})),mt=id(ad);var Xn,Po;function ps(){if(Po)return Xn;Po=1;let e=sd(),t=mt;class r extends Error{constructor(n,u,c,d,o,g){super(n),this.name="CssSyntaxError",this.reason=n,o&&(this.file=o),d&&(this.source=d),g&&(this.plugin=g),typeof u<"u"&&typeof c<"u"&&(typeof u=="number"?(this.line=u,this.column=c):(this.line=u.line,this.column=u.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(n){if(!this.source)return"";let u=this.source;n==null&&(n=e.isColorSupported),t&&n&&(u=t(u));let c=u.split(/\r?\n/),d=Math.max(this.line-3,0),o=Math.min(this.line+2,c.length),g=String(o).length,s,m;if(n){let{bold:l,gray:a,red:h}=e.createColors(!0);s=f=>l(h(f)),m=f=>a(f)}else s=m=l=>l;return c.slice(d,o).map((l,a)=>{let h=d+1+a,f=" "+(" "+h).slice(-g)+" | ";if(h===this.line){let y=m(f.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+m(f)+l+`
|
|
3
3
|
`+y+s("^")}return" "+m(f)+l}).join(`
|
|
4
4
|
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|