diff --git a/svelte-helper/.gitignore b/svelte-helper/.gitignore new file mode 100644 index 0000000..104768a --- /dev/null +++ b/svelte-helper/.gitignore @@ -0,0 +1,15 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +.dist \ No newline at end of file diff --git a/svelte-helper/.vscode/extensions.json b/svelte-helper/.vscode/extensions.json new file mode 100644 index 0000000..bdef820 --- /dev/null +++ b/svelte-helper/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["svelte.svelte-vscode"] +} diff --git a/svelte-helper/.vscode/launch.json b/svelte-helper/.vscode/launch.json new file mode 100644 index 0000000..a0488c3 --- /dev/null +++ b/svelte-helper/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch server", + "request": "launch", + "runtimeArgs": [ + "run", + "dev" + ], + "runtimeExecutable": "bun", + "skipFiles": [ + "/**" + ], + "type": "node", + "console": "internalConsole" + }, + { + "type": "msedge", + "request": "launch", + "name": "Launch Edge", + "url": "http://localhost:5173/", + "webRoot": "${workspaceFolder}" + } + ], + "compounds": [ + { + "name": "Both", + "configurations": [ + "Launch server", + "Launch Edge" + ] + } + ] +} \ No newline at end of file diff --git a/svelte-helper/.vscode/mklink.md b/svelte-helper/.vscode/mklink.md new file mode 100644 index 0000000..ce0b9ba --- /dev/null +++ b/svelte-helper/.vscode/mklink.md @@ -0,0 +1,11 @@ +--- +type: "note" +created: "2023-10-20T03:53:13.742Z" +updated: "2023-10-20T04:00:37.259Z" +--- + +# mklink + +```bash +mklink /J "L:\Git\YO-VSCode\svelte-helper\.dist" "L:\Git\YO-VSCode\type-script-helper\dist" +``` diff --git a/svelte-helper/.vscode/settings.json b/svelte-helper/.vscode/settings.json new file mode 100644 index 0000000..2a68354 --- /dev/null +++ b/svelte-helper/.vscode/settings.json @@ -0,0 +1,30 @@ +{ + "[markdown]": { + "editor.wordWrap": "off" + }, + "cSpell.words": [ + "Infineon", + "initialise", + "Kanban", + "lihau", + "Phares", + "signalr", + "VSIX", + "Weightest", + "WSJF" + ], + "files.eol": "\n", + "files.exclude": { + "**/dist": false, + "**/node_modules": true, + "**/out": false + }, + "files.watcherExclude": { + "**/node_modules": true + }, + "explorer.sortOrder": "default", + "search.exclude": { + "**/dist": true, + "**/out": true + } +} \ No newline at end of file diff --git a/svelte-helper/README.md b/svelte-helper/README.md new file mode 100644 index 0000000..382941e --- /dev/null +++ b/svelte-helper/README.md @@ -0,0 +1,47 @@ +# Svelte + Vite + +This template should help get you started developing with Svelte in Vite. + +## Recommended IDE Setup + +[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode). + +## Need an official Svelte framework? + +Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more. + +## Technical considerations + +**Why use this over SvelteKit?** + +- It brings its own routing solution which might not be preferable for some users. +- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app. + +This template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project. + +Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate. + +**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?** + +Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information. + +**Why include `.vscode/extensions.json`?** + +Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project. + +**Why enable `checkJs` in the JS template?** + +It is likely that most cases of changing variable types in runtime are likely to be accidental, rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration. + +**Why is HMR not preserving my local component state?** + +HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state). + +If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR. + +```js +// store.js +// An extremely simple external store +import { writable } from 'svelte/store' +export default writable(0) +``` diff --git a/svelte-helper/bun.lock b/svelte-helper/bun.lock new file mode 100644 index 0000000..0f0feda --- /dev/null +++ b/svelte-helper/bun.lock @@ -0,0 +1,425 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "www", + "devDependencies": { + "@rollup/plugin-node-resolve": "^16.0.1", + "@sveltejs/vite-plugin-svelte": "^5.0.3", + "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-svelte": "^7.2.2", + "svelte": "^4.2.4", + "vite": "^6.3.5", + }, + }, + }, + "packages": { + "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.25.5", "", { "os": "android", "cpu": "arm" }, "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.5", "", { "os": "android", "cpu": "arm64" }, "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.25.5", "", { "os": "android", "cpu": "x64" }, "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.5", "", { "os": "linux", "cpu": "arm" }, "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.5", "", { "os": "linux", "cpu": "none" }, "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.5", "", { "os": "linux", "cpu": "x64" }, "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.5", "", { "os": "none", "cpu": "arm64" }, "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.5", "", { "os": "none", "cpu": "x64" }, "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.5", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.5", "", { "os": "win32", "cpu": "x64" }, "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + + "@rollup/plugin-node-resolve": ["@rollup/plugin-node-resolve@16.0.1", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", "is-module": "^1.0.0", "resolve": "^1.22.1" }, "peerDependencies": { "rollup": "^2.78.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA=="], + + "@rollup/pluginutils": ["@rollup/pluginutils@5.1.4", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ=="], + + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.41.1", "", { "os": "android", "cpu": "arm" }, "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw=="], + + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.41.1", "", { "os": "android", "cpu": "arm64" }, "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA=="], + + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.41.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w=="], + + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.41.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg=="], + + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.41.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg=="], + + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.41.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA=="], + + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.41.1", "", { "os": "linux", "cpu": "arm" }, "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg=="], + + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.41.1", "", { "os": "linux", "cpu": "arm" }, "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA=="], + + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.41.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA=="], + + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.41.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg=="], + + "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw=="], + + "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.41.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A=="], + + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw=="], + + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.41.1", "", { "os": "linux", "cpu": "none" }, "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw=="], + + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.41.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g=="], + + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.41.1", "", { "os": "linux", "cpu": "x64" }, "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A=="], + + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.41.1", "", { "os": "linux", "cpu": "x64" }, "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ=="], + + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.41.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ=="], + + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.41.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg=="], + + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.41.1", "", { "os": "win32", "cpu": "x64" }, "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw=="], + + "@sveltejs/vite-plugin-svelte": ["@sveltejs/vite-plugin-svelte@5.0.3", "", { "dependencies": { "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", "debug": "^4.4.0", "deepmerge": "^4.3.1", "kleur": "^4.1.5", "magic-string": "^0.30.15", "vitefu": "^1.0.4" }, "peerDependencies": { "svelte": "^5.0.0", "vite": "^6.0.0" } }, "sha512-MCFS6CrQDu1yGwspm4qtli0e63vaPCehf6V7pIMP15AsWgMKrqDGCPFF/0kn4SP0ii4aySu4Pa62+fIRGFMjgw=="], + + "@sveltejs/vite-plugin-svelte-inspector": ["@sveltejs/vite-plugin-svelte-inspector@4.0.1", "", { "dependencies": { "debug": "^4.3.7" }, "peerDependencies": { "@sveltejs/vite-plugin-svelte": "^5.0.0", "svelte": "^5.0.0", "vite": "^6.0.0" } }, "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw=="], + + "@trysound/sax": ["@trysound/sax@0.2.0", "", {}, "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA=="], + + "@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="], + + "@types/resolve": ["@types/resolve@1.20.2", "", {}, "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q=="], + + "acorn": ["acorn@8.14.1", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "aria-query": ["aria-query@5.3.2", "", {}, "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw=="], + + "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], + + "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], + + "browserslist": ["browserslist@4.25.0", "", { "dependencies": { "caniuse-lite": "^1.0.30001718", "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA=="], + + "caniuse-api": ["caniuse-api@3.0.0", "", { "dependencies": { "browserslist": "^4.0.0", "caniuse-lite": "^1.0.0", "lodash.memoize": "^4.1.2", "lodash.uniq": "^4.5.0" } }, "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001720", "", {}, "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g=="], + + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "code-red": ["code-red@1.0.4", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15", "@types/estree": "^1.0.1", "acorn": "^8.10.0", "estree-walker": "^3.0.3", "periscopic": "^3.1.0" } }, "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "colord": ["colord@2.9.3", "", {}, "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw=="], + + "commander": ["commander@7.2.0", "", {}, "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="], + + "concat-with-sourcemaps": ["concat-with-sourcemaps@1.1.0", "", { "dependencies": { "source-map": "^0.6.1" } }, "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg=="], + + "css-declaration-sorter": ["css-declaration-sorter@6.4.1", "", { "peerDependencies": { "postcss": "^8.0.9" } }, "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g=="], + + "css-select": ["css-select@4.3.0", "", { "dependencies": { "boolbase": "^1.0.0", "css-what": "^6.0.1", "domhandler": "^4.3.1", "domutils": "^2.8.0", "nth-check": "^2.0.1" } }, "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ=="], + + "css-tree": ["css-tree@2.3.1", "", { "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" } }, "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw=="], + + "css-what": ["css-what@6.1.0", "", {}, "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw=="], + + "cssesc": ["cssesc@3.0.0", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="], + + "cssnano": ["cssnano@5.1.15", "", { "dependencies": { "cssnano-preset-default": "^5.2.14", "lilconfig": "^2.0.3", "yaml": "^1.10.2" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw=="], + + "cssnano-preset-default": ["cssnano-preset-default@5.2.14", "", { "dependencies": { "css-declaration-sorter": "^6.3.1", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", "postcss-colormin": "^5.3.1", "postcss-convert-values": "^5.1.3", "postcss-discard-comments": "^5.1.2", "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", "postcss-merge-longhand": "^5.1.7", "postcss-merge-rules": "^5.1.4", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", "postcss-minify-params": "^5.1.4", "postcss-minify-selectors": "^5.2.1", "postcss-normalize-charset": "^5.1.0", "postcss-normalize-display-values": "^5.1.0", "postcss-normalize-positions": "^5.1.1", "postcss-normalize-repeat-style": "^5.1.1", "postcss-normalize-string": "^5.1.0", "postcss-normalize-timing-functions": "^5.1.0", "postcss-normalize-unicode": "^5.1.1", "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", "postcss-ordered-values": "^5.1.3", "postcss-reduce-initial": "^5.1.2", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", "postcss-unique-selectors": "^5.1.1" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A=="], + + "cssnano-utils": ["cssnano-utils@3.1.0", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA=="], + + "csso": ["csso@4.2.0", "", { "dependencies": { "css-tree": "^1.1.2" } }, "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA=="], + + "debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + + "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + + "dom-serializer": ["dom-serializer@1.4.1", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" } }, "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag=="], + + "domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], + + "domhandler": ["domhandler@4.3.1", "", { "dependencies": { "domelementtype": "^2.2.0" } }, "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ=="], + + "domutils": ["domutils@2.8.0", "", { "dependencies": { "dom-serializer": "^1.0.1", "domelementtype": "^2.2.0", "domhandler": "^4.2.0" } }, "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.161", "", {}, "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA=="], + + "entities": ["entities@2.2.0", "", {}, "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="], + + "esbuild": ["esbuild@0.25.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.5", "@esbuild/android-arm": "0.25.5", "@esbuild/android-arm64": "0.25.5", "@esbuild/android-x64": "0.25.5", "@esbuild/darwin-arm64": "0.25.5", "@esbuild/darwin-x64": "0.25.5", "@esbuild/freebsd-arm64": "0.25.5", "@esbuild/freebsd-x64": "0.25.5", "@esbuild/linux-arm": "0.25.5", "@esbuild/linux-arm64": "0.25.5", "@esbuild/linux-ia32": "0.25.5", "@esbuild/linux-loong64": "0.25.5", "@esbuild/linux-mips64el": "0.25.5", "@esbuild/linux-ppc64": "0.25.5", "@esbuild/linux-riscv64": "0.25.5", "@esbuild/linux-s390x": "0.25.5", "@esbuild/linux-x64": "0.25.5", "@esbuild/netbsd-arm64": "0.25.5", "@esbuild/netbsd-x64": "0.25.5", "@esbuild/openbsd-arm64": "0.25.5", "@esbuild/openbsd-x64": "0.25.5", "@esbuild/sunos-x64": "0.25.5", "@esbuild/win32-arm64": "0.25.5", "@esbuild/win32-ia32": "0.25.5", "@esbuild/win32-x64": "0.25.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "eventemitter3": ["eventemitter3@4.0.7", "", {}, "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="], + + "fdir": ["fdir@6.4.5", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "generic-names": ["generic-names@4.0.0", "", { "dependencies": { "loader-utils": "^3.2.0" } }, "sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A=="], + + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "icss-replace-symbols": ["icss-replace-symbols@1.1.0", "", {}, "sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg=="], + + "icss-utils": ["icss-utils@5.1.0", "", { "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA=="], + + "import-cwd": ["import-cwd@3.0.0", "", { "dependencies": { "import-from": "^3.0.0" } }, "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg=="], + + "import-from": ["import-from@3.0.0", "", { "dependencies": { "resolve-from": "^5.0.0" } }, "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-module": ["is-module@1.0.0", "", {}, "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g=="], + + "is-reference": ["is-reference@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.6" } }, "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="], + + "loader-utils": ["loader-utils@3.3.1", "", {}, "sha512-FMJTLMXfCLMLfJxcX9PFqX5qD88Z5MRGaZCVzfuqeZSPsyiBzs+pahDQjbIWz2QIzPZz0NX9Zy4FX3lmK6YHIg=="], + + "locate-character": ["locate-character@3.0.0", "", {}, "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA=="], + + "lodash.camelcase": ["lodash.camelcase@4.3.0", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="], + + "lodash.memoize": ["lodash.memoize@4.1.2", "", {}, "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag=="], + + "lodash.uniq": ["lodash.uniq@4.5.0", "", {}, "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ=="], + + "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="], + + "mdn-data": ["mdn-data@2.0.30", "", {}, "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + + "node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="], + + "normalize-url": ["normalize-url@6.1.0", "", {}, "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="], + + "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], + + "p-finally": ["p-finally@1.0.0", "", {}, "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow=="], + + "p-queue": ["p-queue@6.6.2", "", { "dependencies": { "eventemitter3": "^4.0.4", "p-timeout": "^3.2.0" } }, "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ=="], + + "p-timeout": ["p-timeout@3.2.0", "", { "dependencies": { "p-finally": "^1.0.0" } }, "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg=="], + + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + + "periscopic": ["periscopic@3.1.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^3.0.0", "is-reference": "^3.0.0" } }, "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="], + + "pify": ["pify@5.0.0", "", {}, "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA=="], + + "postcss": ["postcss@8.5.4", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-QSa9EBe+uwlGTFmHsPKokv3B/oEMQZxfqW0QqNCyhpa6mB1afzulwn8hihglqAb2pOw+BJgNlmXQ8la2VeHB7w=="], + + "postcss-calc": ["postcss-calc@8.2.4", "", { "dependencies": { "postcss-selector-parser": "^6.0.9", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.2" } }, "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q=="], + + "postcss-colormin": ["postcss-colormin@5.3.1", "", { "dependencies": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ=="], + + "postcss-convert-values": ["postcss-convert-values@5.1.3", "", { "dependencies": { "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA=="], + + "postcss-discard-comments": ["postcss-discard-comments@5.1.2", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ=="], + + "postcss-discard-duplicates": ["postcss-discard-duplicates@5.1.0", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw=="], + + "postcss-discard-empty": ["postcss-discard-empty@5.1.1", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A=="], + + "postcss-discard-overridden": ["postcss-discard-overridden@5.1.0", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw=="], + + "postcss-load-config": ["postcss-load-config@3.1.4", "", { "dependencies": { "lilconfig": "^2.0.5", "yaml": "^1.10.2" }, "peerDependencies": { "postcss": ">=8.0.9", "ts-node": ">=9.0.0" }, "optionalPeers": ["postcss", "ts-node"] }, "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg=="], + + "postcss-merge-longhand": ["postcss-merge-longhand@5.1.7", "", { "dependencies": { "postcss-value-parser": "^4.2.0", "stylehacks": "^5.1.1" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ=="], + + "postcss-merge-rules": ["postcss-merge-rules@5.1.4", "", { "dependencies": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "cssnano-utils": "^3.1.0", "postcss-selector-parser": "^6.0.5" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g=="], + + "postcss-minify-font-values": ["postcss-minify-font-values@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA=="], + + "postcss-minify-gradients": ["postcss-minify-gradients@5.1.1", "", { "dependencies": { "colord": "^2.9.1", "cssnano-utils": "^3.1.0", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw=="], + + "postcss-minify-params": ["postcss-minify-params@5.1.4", "", { "dependencies": { "browserslist": "^4.21.4", "cssnano-utils": "^3.1.0", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw=="], + + "postcss-minify-selectors": ["postcss-minify-selectors@5.2.1", "", { "dependencies": { "postcss-selector-parser": "^6.0.5" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg=="], + + "postcss-modules": ["postcss-modules@4.3.1", "", { "dependencies": { "generic-names": "^4.0.0", "icss-replace-symbols": "^1.1.0", "lodash.camelcase": "^4.3.0", "postcss-modules-extract-imports": "^3.0.0", "postcss-modules-local-by-default": "^4.0.0", "postcss-modules-scope": "^3.0.0", "postcss-modules-values": "^4.0.0", "string-hash": "^1.1.1" }, "peerDependencies": { "postcss": "^8.0.0" } }, "sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q=="], + + "postcss-modules-extract-imports": ["postcss-modules-extract-imports@3.1.0", "", { "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q=="], + + "postcss-modules-local-by-default": ["postcss-modules-local-by-default@4.2.0", "", { "dependencies": { "icss-utils": "^5.0.0", "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw=="], + + "postcss-modules-scope": ["postcss-modules-scope@3.2.1", "", { "dependencies": { "postcss-selector-parser": "^7.0.0" }, "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA=="], + + "postcss-modules-values": ["postcss-modules-values@4.0.0", "", { "dependencies": { "icss-utils": "^5.0.0" }, "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ=="], + + "postcss-normalize-charset": ["postcss-normalize-charset@5.1.0", "", { "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg=="], + + "postcss-normalize-display-values": ["postcss-normalize-display-values@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA=="], + + "postcss-normalize-positions": ["postcss-normalize-positions@5.1.1", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg=="], + + "postcss-normalize-repeat-style": ["postcss-normalize-repeat-style@5.1.1", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g=="], + + "postcss-normalize-string": ["postcss-normalize-string@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w=="], + + "postcss-normalize-timing-functions": ["postcss-normalize-timing-functions@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg=="], + + "postcss-normalize-unicode": ["postcss-normalize-unicode@5.1.1", "", { "dependencies": { "browserslist": "^4.21.4", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA=="], + + "postcss-normalize-url": ["postcss-normalize-url@5.1.0", "", { "dependencies": { "normalize-url": "^6.0.1", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew=="], + + "postcss-normalize-whitespace": ["postcss-normalize-whitespace@5.1.1", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA=="], + + "postcss-ordered-values": ["postcss-ordered-values@5.1.3", "", { "dependencies": { "cssnano-utils": "^3.1.0", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ=="], + + "postcss-reduce-initial": ["postcss-reduce-initial@5.1.2", "", { "dependencies": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg=="], + + "postcss-reduce-transforms": ["postcss-reduce-transforms@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ=="], + + "postcss-selector-parser": ["postcss-selector-parser@7.1.0", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA=="], + + "postcss-svgo": ["postcss-svgo@5.1.0", "", { "dependencies": { "postcss-value-parser": "^4.2.0", "svgo": "^2.7.0" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA=="], + + "postcss-unique-selectors": ["postcss-unique-selectors@5.1.1", "", { "dependencies": { "postcss-selector-parser": "^6.0.5" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA=="], + + "postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="], + + "promise.series": ["promise.series@0.2.0", "", {}, "sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ=="], + + "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], + + "resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], + + "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="], + + "rollup": ["rollup@4.41.1", "", { "dependencies": { "@types/estree": "1.0.7" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.41.1", "@rollup/rollup-android-arm64": "4.41.1", "@rollup/rollup-darwin-arm64": "4.41.1", "@rollup/rollup-darwin-x64": "4.41.1", "@rollup/rollup-freebsd-arm64": "4.41.1", "@rollup/rollup-freebsd-x64": "4.41.1", "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", "@rollup/rollup-linux-arm-musleabihf": "4.41.1", "@rollup/rollup-linux-arm64-gnu": "4.41.1", "@rollup/rollup-linux-arm64-musl": "4.41.1", "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", "@rollup/rollup-linux-riscv64-gnu": "4.41.1", "@rollup/rollup-linux-riscv64-musl": "4.41.1", "@rollup/rollup-linux-s390x-gnu": "4.41.1", "@rollup/rollup-linux-x64-gnu": "4.41.1", "@rollup/rollup-linux-x64-musl": "4.41.1", "@rollup/rollup-win32-arm64-msvc": "4.41.1", "@rollup/rollup-win32-ia32-msvc": "4.41.1", "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw=="], + + "rollup-plugin-postcss": ["rollup-plugin-postcss@4.0.2", "", { "dependencies": { "chalk": "^4.1.0", "concat-with-sourcemaps": "^1.1.0", "cssnano": "^5.0.1", "import-cwd": "^3.0.0", "p-queue": "^6.6.2", "pify": "^5.0.0", "postcss-load-config": "^3.0.0", "postcss-modules": "^4.0.0", "promise.series": "^0.2.0", "resolve": "^1.19.0", "rollup-pluginutils": "^2.8.2", "safe-identifier": "^0.4.2", "style-inject": "^0.3.0" }, "peerDependencies": { "postcss": "8.x" } }, "sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w=="], + + "rollup-plugin-svelte": ["rollup-plugin-svelte@7.2.2", "", { "dependencies": { "@rollup/pluginutils": "^4.1.0", "resolve.exports": "^2.0.0" }, "peerDependencies": { "rollup": ">=2.0.0", "svelte": ">=3.5.0" } }, "sha512-hgnIblTRewaBEVQD6N0Q43o+y6q1TmDRhBjaEzQCi50bs8TXqjc+d1zFZyE8tsfgcfNHZQzclh4RxlFUB85H8Q=="], + + "rollup-pluginutils": ["rollup-pluginutils@2.8.2", "", { "dependencies": { "estree-walker": "^0.6.1" } }, "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ=="], + + "safe-identifier": ["safe-identifier@0.4.2", "", {}, "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w=="], + + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + + "stable": ["stable@0.1.8", "", {}, "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w=="], + + "string-hash": ["string-hash@1.1.3", "", {}, "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A=="], + + "style-inject": ["style-inject@0.3.0", "", {}, "sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw=="], + + "stylehacks": ["stylehacks@5.1.1", "", { "dependencies": { "browserslist": "^4.21.4", "postcss-selector-parser": "^6.0.4" }, "peerDependencies": { "postcss": "^8.2.15" } }, "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw=="], + + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + + "svelte": ["svelte@4.2.20", "", { "dependencies": { "@ampproject/remapping": "^2.2.1", "@jridgewell/sourcemap-codec": "^1.4.15", "@jridgewell/trace-mapping": "^0.3.18", "@types/estree": "^1.0.1", "acorn": "^8.9.0", "aria-query": "^5.3.0", "axobject-query": "^4.0.0", "code-red": "^1.0.3", "css-tree": "^2.3.1", "estree-walker": "^3.0.3", "is-reference": "^3.0.1", "locate-character": "^3.0.0", "magic-string": "^0.30.4", "periscopic": "^3.1.0" } }, "sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q=="], + + "svgo": ["svgo@2.8.0", "", { "dependencies": { "@trysound/sax": "0.2.0", "commander": "^7.2.0", "css-select": "^4.1.3", "css-tree": "^1.1.3", "csso": "^4.2.0", "picocolors": "^1.0.0", "stable": "^0.1.8" }, "bin": { "svgo": "bin/svgo" } }, "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg=="], + + "tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="], + + "update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + + "vite": ["vite@6.3.5", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", "picomatch": "^4.0.2", "postcss": "^8.5.3", "rollup": "^4.34.9", "tinyglobby": "^0.2.13" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ=="], + + "vitefu": ["vitefu@1.0.6", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["vite"] }, "sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA=="], + + "yaml": ["yaml@1.10.2", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="], + + "@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + + "csso/css-tree": ["css-tree@1.1.3", "", { "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="], + + "postcss-calc/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "postcss-merge-rules/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "postcss-minify-selectors/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "postcss-unique-selectors/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "rollup-plugin-svelte/@rollup/pluginutils": ["@rollup/pluginutils@4.2.1", "", { "dependencies": { "estree-walker": "^2.0.1", "picomatch": "^2.2.2" } }, "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ=="], + + "rollup-pluginutils/estree-walker": ["estree-walker@0.6.1", "", {}, "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w=="], + + "stylehacks/postcss-selector-parser": ["postcss-selector-parser@6.1.2", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg=="], + + "svgo/css-tree": ["css-tree@1.1.3", "", { "dependencies": { "mdn-data": "2.0.14", "source-map": "^0.6.1" } }, "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q=="], + + "csso/css-tree/mdn-data": ["mdn-data@2.0.14", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="], + + "rollup-plugin-svelte/@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + + "rollup-plugin-svelte/@rollup/pluginutils/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "svgo/css-tree/mdn-data": ["mdn-data@2.0.14", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="], + } +} diff --git a/svelte-helper/index.html b/svelte-helper/index.html new file mode 100644 index 0000000..f2c2f96 --- /dev/null +++ b/svelte-helper/index.html @@ -0,0 +1,16 @@ + + + + + + + + Vite + Svelte + + + +
+ + + + \ No newline at end of file diff --git a/svelte-helper/jsconfig.json b/svelte-helper/jsconfig.json new file mode 100644 index 0000000..5696a2d --- /dev/null +++ b/svelte-helper/jsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "moduleResolution": "bundler", + "target": "ESNext", + "module": "ESNext", + /** + * svelte-preprocess cannot figure out whether you have + * a value or a type, so tell TypeScript to enforce using + * `import type` instead of `import` for Types. + */ + "verbatimModuleSyntax": true, + "isolatedModules": true, + "resolveJsonModule": true, + /** + * To have warnings / errors of the Svelte compiler at the + * correct position, enable source maps by default. + */ + "sourceMap": true, + "esModuleInterop": true, + "skipLibCheck": true, + /** + * Typecheck JS in `.svelte` and `.js` files by default. + * Disable this if you'd like to use dynamic types. + */ + "checkJs": true + }, + /** + * Use global.d.ts instead of compilerOptions.types + * to avoid limiting type declarations. + */ + "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] +} diff --git a/svelte-helper/package.json b/svelte-helper/package.json new file mode 100644 index 0000000..07f2806 --- /dev/null +++ b/svelte-helper/package.json @@ -0,0 +1,20 @@ +{ + "devDependencies": { + "@rollup/plugin-node-resolve": "^16.0.1", + "@sveltejs/vite-plugin-svelte": "^5.0.3", + "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-svelte": "^7.2.2", + "svelte": "^4.2.4", + "vite": "^6.3.5" + }, + "name": "svelte-helper", + "private": true, + "scripts": { + "build": "vite build", + "dev": "vite", + "preview": "vite preview", + "svelte-build": "rollup -c" + }, + "type": "module", + "version": "0.0.0" +} \ No newline at end of file diff --git a/svelte-helper/public/b/demo.html b/svelte-helper/public/b/demo.html new file mode 100644 index 0000000..28ba3a7 --- /dev/null +++ b/svelte-helper/public/b/demo.html @@ -0,0 +1,21 @@ + + + +Demo page + + + +

Svelte embedding demo

+ +

Below, we have inserted a script tag that should + renter a Svelte component upon loading this page.

+ + + + + + + +

This text will come after the embedded content.

+ + \ No newline at end of file diff --git a/svelte-helper/public/b/dist.js b/svelte-helper/public/b/dist.js new file mode 100644 index 0000000..c515ae5 --- /dev/null +++ b/svelte-helper/public/b/dist.js @@ -0,0 +1,372 @@ +(function () { + 'use strict'; + + function noop() { } + function run(fn) { + return fn(); + } + function blank_object() { + return Object.create(null); + } + function run_all(fns) { + fns.forEach(run); + } + function is_function(thing) { + return typeof thing === 'function'; + } + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); + } + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + function append(target, node) { + target.appendChild(node); + } + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + function element(name) { + return document.createElement(name); + } + function text(data) { + return document.createTextNode(data); + } + function space() { + return text(' '); + } + function children(element) { + return Array.from(element.childNodes); + } + function set_data(text, data) { + data = '' + data; + if (text.data === data) + return; + text.data = data; + } + + let current_component; + function set_current_component(component) { + current_component = component; + } + + const dirty_components = []; + const binding_callbacks = []; + let render_callbacks = []; + const flush_callbacks = []; + const resolved_promise = /* @__PURE__ */ Promise.resolve(); + let update_scheduled = false; + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + function add_render_callback(fn) { + render_callbacks.push(fn); + } + // flush() calls callbacks in this order: + // 1. All beforeUpdate callbacks, in order: parents before children + // 2. All bind:this callbacks, in reverse order: children before parents. + // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT + // for afterUpdates called during the initial onMount, which are called in + // reverse order: children before parents. + // Since callbacks might update component values, which could trigger another + // call to flush(), the following steps guard against this: + // 1. During beforeUpdate, any updated components will be added to the + // dirty_components array and will cause a reentrant call to flush(). Because + // the flush index is kept outside the function, the reentrant call will pick + // up where the earlier call left off and go through all dirty components. The + // current_component value is saved and restored so that the reentrant call will + // not interfere with the "parent" flush() call. + // 2. bind:this callbacks cannot trigger new flush() calls. + // 3. During afterUpdate, any updated components will NOT have their afterUpdate + // callback called a second time; the seen_callbacks set, outside the flush() + // function, guarantees this behavior. + const seen_callbacks = new Set(); + let flushidx = 0; // Do *not* move this inside the flush() function + function flush() { + // Do not reenter flush while dirty components are updated, as this can + // result in an infinite loop. Instead, let the inner flush handle it. + // Reentrancy is ok afterwards for bindings etc. + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + // first, call beforeUpdate functions + // and update components + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } + catch (e) { + // reset dirty state to not end up in a deadlocked state and then rethrow + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); + } + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + /** + * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. + */ + function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)); + targets.forEach((c) => c()); + render_callbacks = filtered; + } + const outroing = new Set(); + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + function mount_component(component, target, anchor, customElement) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + // if the component was destroyed immediately + // it will update the `$$.on_destroy` reference to `null`. + // the destructured on_destroy may still reference to the old array + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback); + } + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); + } + function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }; + append_styles && append_styles($$.root); + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor, options.customElement); + flush(); + } + set_current_component(parent_component); + } + /** + * Base class for Svelte components. Used when dev=false. + */ + class SvelteComponent { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } + } + + /* Embed.svelte generated by Svelte v3.59.2 */ + + function create_fragment(ctx) { + let h1; + let t0; + let t1; + let t2; + let t3; + let p; + + return { + c() { + h1 = element("h1"); + t0 = text("Hello, "); + t1 = text(/*name*/ ctx[0]); + t2 = text("!"); + t3 = space(); + p = element("p"); + + p.innerHTML = `This component was brought to you by Code + & Life.`; + }, + m(target, anchor) { + insert(target, h1, anchor); + append(h1, t0); + append(h1, t1); + append(h1, t2); + insert(target, t3, anchor); + insert(target, p, anchor); + }, + p(ctx, [dirty]) { + if (dirty & /*name*/ 1) set_data(t1, /*name*/ ctx[0]); + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(h1); + if (detaching) detach(t3); + if (detaching) detach(p); + } + }; + } + + function instance($$self, $$props, $$invalidate) { + let { name } = $$props; + + $$self.$$set = $$props => { + if ('name' in $$props) $$invalidate(0, name = $$props.name); + }; + + return [name]; + } + + class Embed extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, { name: 0 }); + } + } + + var div = document.createElement('DIV'); + var script = document.currentScript; + script.parentNode.insertBefore(div, script); + + new Embed({ + target: div, + props: { name: 'Svelte component' }, + }); + +})(); diff --git a/svelte-helper/public/c/demo.html b/svelte-helper/public/c/demo.html new file mode 100644 index 0000000..0a440cf --- /dev/null +++ b/svelte-helper/public/c/demo.html @@ -0,0 +1,23 @@ + + + +Demo page + + + + +

Svelte embedding demo

+ +

Below, we have inserted a script tag that should + renter a Svelte component upon loading this page.

+
+ +
+ +
+ +
+

This text will come after the embedded content.

+ + + \ No newline at end of file diff --git a/svelte-helper/public/c/dist.js b/svelte-helper/public/c/dist.js new file mode 100644 index 0000000..52e8253 --- /dev/null +++ b/svelte-helper/public/c/dist.js @@ -0,0 +1,2903 @@ +(function () { + 'use strict'; + + function noop() { } + // Adapted from https://github.com/then/is-promise/blob/master/index.js + // Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE + function is_promise(value) { + return !!value && (typeof value === 'object' || typeof value === 'function') && typeof value.then === 'function'; + } + function run(fn) { + return fn(); + } + function blank_object() { + return Object.create(null); + } + function run_all(fns) { + fns.forEach(run); + } + function is_function(thing) { + return typeof thing === 'function'; + } + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); + } + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + function append(target, node) { + target.appendChild(node); + } + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } + } + function element(name) { + return document.createElement(name); + } + function text(data) { + return document.createTextNode(data); + } + function space() { + return text(' '); + } + function empty() { + return text(''); + } + function children(element) { + return Array.from(element.childNodes); + } + function set_data(text, data) { + data = '' + data; + if (text.data === data) + return; + text.data = data; + } + + let current_component; + function set_current_component(component) { + current_component = component; + } + function get_current_component() { + if (!current_component) + throw new Error('Function called outside component initialization'); + return current_component; + } + + const dirty_components = []; + const binding_callbacks = []; + let render_callbacks = []; + const flush_callbacks = []; + const resolved_promise = /* @__PURE__ */ Promise.resolve(); + let update_scheduled = false; + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + function add_render_callback(fn) { + render_callbacks.push(fn); + } + // flush() calls callbacks in this order: + // 1. All beforeUpdate callbacks, in order: parents before children + // 2. All bind:this callbacks, in reverse order: children before parents. + // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT + // for afterUpdates called during the initial onMount, which are called in + // reverse order: children before parents. + // Since callbacks might update component values, which could trigger another + // call to flush(), the following steps guard against this: + // 1. During beforeUpdate, any updated components will be added to the + // dirty_components array and will cause a reentrant call to flush(). Because + // the flush index is kept outside the function, the reentrant call will pick + // up where the earlier call left off and go through all dirty components. The + // current_component value is saved and restored so that the reentrant call will + // not interfere with the "parent" flush() call. + // 2. bind:this callbacks cannot trigger new flush() calls. + // 3. During afterUpdate, any updated components will NOT have their afterUpdate + // callback called a second time; the seen_callbacks set, outside the flush() + // function, guarantees this behavior. + const seen_callbacks = new Set(); + let flushidx = 0; // Do *not* move this inside the flush() function + function flush() { + // Do not reenter flush while dirty components are updated, as this can + // result in an infinite loop. Instead, let the inner flush handle it. + // Reentrancy is ok afterwards for bindings etc. + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + // first, call beforeUpdate functions + // and update components + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } + catch (e) { + // reset dirty state to not end up in a deadlocked state and then rethrow + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); + } + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + /** + * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. + */ + function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)); + targets.forEach((c) => c()); + render_callbacks = filtered; + } + const outroing = new Set(); + let outros; + function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; + } + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) + block.d(1); + callback(); + } + }); + block.o(local); + } + else if (callback) { + callback(); + } + } + + function handle_promise(promise, info) { + const token = info.token = {}; + function update(type, index, key, value) { + if (info.token !== token) + return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block, i) => { + if (i !== index && block) { + group_outros(); + transition_out(block, 1, 1, () => { + if (info.blocks[i] === block) { + info.blocks[i] = null; + } + }); + check_outros(); + } + }); + } + else { + info.block.d(1); + } + block.c(); + transition_in(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) + info.blocks[index] = block; + if (needs_flush) { + flush(); + } + } + if (is_promise(promise)) { + const current_component = get_current_component(); + promise.then(value => { + set_current_component(current_component); + update(info.then, 1, info.value, value); + set_current_component(null); + }, error => { + set_current_component(current_component); + update(info.catch, 2, info.error, error); + set_current_component(null); + if (!info.hasCatch) { + throw error; + } + }); + // if we previously had a then/catch block, destroy it + if (info.current !== info.pending) { + update(info.pending, 0); + return true; + } + } + else { + if (info.current !== info.then) { + update(info.then, 1, info.value, promise); + return true; + } + info.resolved = promise; + } + } + function update_await_block_branch(info, ctx, dirty) { + const child_ctx = ctx.slice(); + const { resolved } = info; + if (info.current === info.then) { + child_ctx[info.value] = resolved; + } + if (info.current === info.catch) { + child_ctx[info.error] = resolved; + } + info.block.p(child_ctx, dirty); + } + function create_component(block) { + block && block.c(); + } + function mount_component(component, target, anchor, customElement) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + if (!customElement) { + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + // if the component was destroyed immediately + // it will update the `$$.on_destroy` reference to `null`. + // the destructured on_destroy may still reference to the old array + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } + else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + } + after_update.forEach(add_render_callback); + } + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); + } + function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }; + append_styles && append_styles($$.root); + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + const nodes = children(options.target); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } + else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor, options.customElement); + flush(); + } + set_current_component(parent_component); + } + /** + * Base class for Svelte components. Used when dev=false. + */ + class SvelteComponent { + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) + callbacks.splice(index, 1); + }; + } + $set($$props) { + if (this.$$set && !is_empty($$props)) { + this.$$.skip_bound = true; + this.$$set($$props); + this.$$.skip_bound = false; + } + } + } + + /* c\Left.svelte generated by Svelte v3.59.2 */ + + function create_else_block$9(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Left: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) detach(li); + } + }; + } + + // (5:0) {#if !data} + function create_if_block$9(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Left data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + function create_fragment$9(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$9; + return create_else_block$9; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$9($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Left extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$9, create_fragment$9, safe_not_equal, { data: 0 }); + } + } + + /* c\Right.svelte generated by Svelte v3.59.2 */ + + function create_else_block$8(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Right: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) detach(li); + } + }; + } + + // (5:0) {#if !data} + function create_if_block$8(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Right data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + function create_fragment$8(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$8; + return create_else_block$8; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$8($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Right extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$8, create_fragment$8, safe_not_equal, { data: 0 }); + } + } + + /* c\AreEqual.svelte generated by Svelte v3.59.2 */ + + function get_each_context$6(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$7(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$6(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$6(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$7(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$6(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("AreEqual:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$7(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$7, create_if_block_1$6, create_else_block$7]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$7($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class AreEqual extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$7, create_fragment$7, safe_not_equal, { data: 0 }); + } + } + + /* c\LeftSideIsNewer.svelte generated by Svelte v3.59.2 */ + + function get_each_context$5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$6(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$5(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$5(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$5(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$6(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$6, create_if_block_1$5, create_else_block$6]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$6($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$6, create_fragment$6, safe_not_equal, { data: 0 }); + } + } + + /* c\LeftSideOnly.svelte generated by Svelte v3.59.2 */ + + function get_each_context$4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$5(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$4(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$4(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$4(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$5(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$5, create_if_block_1$4, create_else_block$5]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$5($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$5, create_fragment$5, safe_not_equal, { data: 0 }); + } + } + + /* c\NotEqualBut.svelte generated by Svelte v3.59.2 */ + + function get_each_context$3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$4(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$3(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$3(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$3(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("NotEqualBut:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$4(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$4, create_if_block_1$3, create_else_block$4]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$4($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class NotEqualBut extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$4, create_fragment$4, safe_not_equal, { data: 0 }); + } + } + + /* c\Records.svelte generated by Svelte v3.59.2 */ + + function get_each_context$2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (9:0) {:else} + function create_else_block$3(ctx) { + let t; + let each_1_anchor; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); + } + + return { + c() { + t = text("Records:\n "); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + insert(target, t, anchor); + + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$2(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block$2(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + }, + d(detaching) { + if (detaching) detach(t); + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (7:28) + function create_if_block_1$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (5:0) {#if !data} + function create_if_block$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (11:2) {#each data as record} + function create_each_block$2(ctx) { + let li; + let t_value = /*record*/ ctx[1].Left.Records + ""; + let t; + + return { + c() { + li = element("li"); + t = text(t_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t_value !== (t_value = /*record*/ ctx[1].Left.Records + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) detach(li); + } + }; + } + + function create_fragment$3(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$3; + if (/*data*/ ctx[0].length === 0) return create_if_block_1$2; + return create_else_block$3; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if_block.d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$3($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Records extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$3, create_fragment$3, safe_not_equal, { data: 0 }); + } + } + + /* c\RightSideIsNewer.svelte generated by Svelte v3.59.2 */ + + function get_each_context$1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$2(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$1(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$2(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$2, create_if_block_1$1, create_else_block$2]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$2($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$2, create_fragment$2, safe_not_equal, { data: 0 }); + } + } + + /* c\RightSideOnly.svelte generated by Svelte v3.59.2 */ + + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$1(ctx) { + let each_1_anchor; + let current; + let each_value = /*data*/ ctx[0]; + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = /*data*/ ctx[0]; + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + destroy_each(each_blocks, detaching); + if (detaching) detach(each_1_anchor); + } + }; + } + + // (10:28) + function create_if_block_1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (8:0) {#if !data} + function create_if_block$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(t0); + destroy_component(left, detaching); + if (detaching) detach(t1); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$1(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$1, create_if_block_1, create_else_block$1]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + function instance$1($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$1, create_fragment$1, safe_not_equal, { data: 0 }); + } + } + + /* c\Review.svelte generated by Svelte v3.59.2 */ + + function create_catch_block(ctx) { + let span; + let t_value = /*error*/ ctx[5] + ""; + let t; + + return { + c() { + span = element("span"); + t = text(t_value); + }, + m(target, anchor) { + insert(target, span, anchor); + append(span, t); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(span); + } + }; + } + + // (24:0) {:then data} + function create_then_block(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block, create_else_block]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[4]) return 0; + return 1; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if_block.p(ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); + } + }; + } + + // (28:2) {:else} + function create_else_block(ctx) { + let p; + let t1; + let areequal; + let t2; + let leftsideisnewer; + let t3; + let leftsideonly; + let t4; + let notequalbut; + let t5; + let records; + let t6; + let rightsideisnewer; + let t7; + let rightsideonly; + let current; + + areequal = new AreEqual({ + props: { data: /*data*/ ctx[4].AreEqual } + }); + + leftsideisnewer = new LeftSideIsNewer({ + props: { data: /*data*/ ctx[4].LeftSideIsNewer } + }); + + leftsideonly = new LeftSideOnly({ + props: { data: /*data*/ ctx[4].LeftSideOnly } + }); + + notequalbut = new NotEqualBut({ + props: { data: /*data*/ ctx[4].NotEqualBut } + }); + + records = new Records({ props: { data: /*data*/ ctx[4].Records } }); + + rightsideisnewer = new RightSideIsNewer({ + props: { data: /*data*/ ctx[4].RightSideIsNewer } + }); + + rightsideonly = new RightSideOnly({ + props: { data: /*data*/ ctx[4].RightSideOnly } + }); + + return { + c() { + p = element("p"); + p.textContent = "Review:"; + t1 = space(); + create_component(areequal.$$.fragment); + t2 = space(); + create_component(leftsideisnewer.$$.fragment); + t3 = space(); + create_component(leftsideonly.$$.fragment); + t4 = space(); + create_component(notequalbut.$$.fragment); + t5 = space(); + create_component(records.$$.fragment); + t6 = space(); + create_component(rightsideisnewer.$$.fragment); + t7 = space(); + create_component(rightsideonly.$$.fragment); + }, + m(target, anchor) { + insert(target, p, anchor); + insert(target, t1, anchor); + mount_component(areequal, target, anchor); + insert(target, t2, anchor); + mount_component(leftsideisnewer, target, anchor); + insert(target, t3, anchor); + mount_component(leftsideonly, target, anchor); + insert(target, t4, anchor); + mount_component(notequalbut, target, anchor); + insert(target, t5, anchor); + mount_component(records, target, anchor); + insert(target, t6, anchor); + mount_component(rightsideisnewer, target, anchor); + insert(target, t7, anchor); + mount_component(rightsideonly, target, anchor); + current = true; + }, + p: noop, + i(local) { + if (current) return; + transition_in(areequal.$$.fragment, local); + transition_in(leftsideisnewer.$$.fragment, local); + transition_in(leftsideonly.$$.fragment, local); + transition_in(notequalbut.$$.fragment, local); + transition_in(records.$$.fragment, local); + transition_in(rightsideisnewer.$$.fragment, local); + transition_in(rightsideonly.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(areequal.$$.fragment, local); + transition_out(leftsideisnewer.$$.fragment, local); + transition_out(leftsideonly.$$.fragment, local); + transition_out(notequalbut.$$.fragment, local); + transition_out(records.$$.fragment, local); + transition_out(rightsideisnewer.$$.fragment, local); + transition_out(rightsideonly.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) detach(p); + if (detaching) detach(t1); + destroy_component(areequal, detaching); + if (detaching) detach(t2); + destroy_component(leftsideisnewer, detaching); + if (detaching) detach(t3); + destroy_component(leftsideonly, detaching); + if (detaching) detach(t4); + destroy_component(notequalbut, detaching); + if (detaching) detach(t5); + destroy_component(records, detaching); + if (detaching) detach(t6); + destroy_component(rightsideisnewer, detaching); + if (detaching) detach(t7); + destroy_component(rightsideonly, detaching); + } + }; + } + + // (26:2) {#if !data} + function create_if_block(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Review data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(p); + } + }; + } + + // (21:16) waiting {:then data} + function create_pending_block(ctx) { + let span; + + return { + c() { + span = element("span"); + span.textContent = "waiting"; + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) detach(span); + } + }; + } + + function create_fragment(ctx) { + let await_block_anchor; + let current; + + let info = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 4, + error: 5, + blocks: [,,,] + }; + + handle_promise(/*promise*/ ctx[0], info); + + return { + c() { + await_block_anchor = empty(); + info.block.c(); + }, + m(target, anchor) { + insert(target, await_block_anchor, anchor); + info.block.m(target, info.anchor = anchor); + info.mount = () => await_block_anchor.parentNode; + info.anchor = await_block_anchor; + current = true; + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + update_await_block_branch(info, ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(info.block); + current = true; + }, + o(local) { + for (let i = 0; i < 3; i += 1) { + const block = info.blocks[i]; + transition_out(block); + } + + current = false; + }, + d(detaching) { + if (detaching) detach(await_block_anchor); + info.block.d(detaching); + info.token = null; + info = null; + } + }; + } + + function instance($$self, $$props, $$invalidate) { + let { page } = $$props; + let { json } = $$props; + let { baseUrl } = $$props; + + let promise = fetch(baseUrl + page, { + method: 'POST', + body: json, + headers: { 'Content-Type': 'application/json' } + }).then(x => x.json()); + + $$self.$$set = $$props => { + if ('page' in $$props) $$invalidate(1, page = $$props.page); + if ('json' in $$props) $$invalidate(2, json = $$props.json); + if ('baseUrl' in $$props) $$invalidate(3, baseUrl = $$props.baseUrl); + }; + + return [promise, page, json, baseUrl]; + } + + class Review extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, { page: 1, json: 2, baseUrl: 3 }); + } + } + + var div = document.createElement('DIV'); + var script = document.currentScript; + script.parentNode.insertBefore(div, script); + + const page = '/api/SyncV1/?'; + const baseUrl = 'http://localhost:5004'; + + const json = ` +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} +`; + + new Review({ + target: div, + props: { page: page, baseUrl: baseUrl, json: json }, + }); + +})(); diff --git a/svelte-helper/public/d/demo.html b/svelte-helper/public/d/demo.html new file mode 100644 index 0000000..0a440cf --- /dev/null +++ b/svelte-helper/public/d/demo.html @@ -0,0 +1,23 @@ + + + +Demo page + + + + +

Svelte embedding demo

+ +

Below, we have inserted a script tag that should + renter a Svelte component upon loading this page.

+
+ +
+ +
+ +
+

This text will come after the embedded content.

+ + + \ No newline at end of file diff --git a/svelte-helper/public/d/dist.js b/svelte-helper/public/d/dist.js new file mode 100644 index 0000000..2ba971d --- /dev/null +++ b/svelte-helper/public/d/dist.js @@ -0,0 +1,3276 @@ +(function () { + 'use strict'; + + /** @returns {void} */ + function noop() {} + + // Adapted from https://github.com/then/is-promise/blob/master/index.js + // Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE + /** + * @param {any} value + * @returns {value is PromiseLike} + */ + function is_promise(value) { + return ( + !!value && + (typeof value === 'object' || typeof value === 'function') && + typeof (/** @type {any} */ (value).then) === 'function' + ); + } + + function run(fn) { + return fn(); + } + + function blank_object() { + return Object.create(null); + } + + /** + * @param {Function[]} fns + * @returns {void} + */ + function run_all(fns) { + fns.forEach(run); + } + + /** + * @param {any} thing + * @returns {thing is Function} + */ + function is_function(thing) { + return typeof thing === 'function'; + } + + /** @returns {boolean} */ + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function'; + } + + /** @returns {boolean} */ + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + + /** + * @param {Node} target + * @param {Node} node + * @returns {void} + */ + function append(target, node) { + target.appendChild(node); + } + + /** + * @param {Node} target + * @param {Node} node + * @param {Node} [anchor] + * @returns {void} + */ + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + + /** + * @param {Node} node + * @returns {void} + */ + function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + + /** + * @returns {void} */ + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) iterations[i].d(detaching); + } + } + + /** + * @template {keyof HTMLElementTagNameMap} K + * @param {K} name + * @returns {HTMLElementTagNameMap[K]} + */ + function element(name) { + return document.createElement(name); + } + + /** + * @param {string} data + * @returns {Text} + */ + function text(data) { + return document.createTextNode(data); + } + + /** + * @returns {Text} */ + function space() { + return text(' '); + } + + /** + * @returns {Text} */ + function empty() { + return text(''); + } + + /** + * @param {Element} element + * @returns {ChildNode[]} + */ + function children(element) { + return Array.from(element.childNodes); + } + + /** + * @param {Text} text + * @param {unknown} data + * @returns {void} + */ + function set_data(text, data) { + data = '' + data; + if (text.data === data) return; + text.data = /** @type {string} */ (data); + } + + /** + * @typedef {Node & { + * claim_order?: number; + * hydrate_init?: true; + * actual_end_child?: NodeEx; + * childNodes: NodeListOf; + * }} NodeEx + */ + + /** @typedef {ChildNode & NodeEx} ChildNodeEx */ + + /** @typedef {NodeEx & { claim_order: number }} NodeEx2 */ + + /** + * @typedef {ChildNodeEx[] & { + * claim_info?: { + * last_index: number; + * total_claimed: number; + * }; + * }} ChildNodeArray + */ + + let current_component; + + /** @returns {void} */ + function set_current_component(component) { + current_component = component; + } + + function get_current_component() { + if (!current_component) throw new Error('Function called outside component initialization'); + return current_component; + } + + const dirty_components = []; + const binding_callbacks = []; + + let render_callbacks = []; + + const flush_callbacks = []; + + const resolved_promise = /* @__PURE__ */ Promise.resolve(); + + let update_scheduled = false; + + /** @returns {void} */ + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + + /** @returns {void} */ + function add_render_callback(fn) { + render_callbacks.push(fn); + } + + // flush() calls callbacks in this order: + // 1. All beforeUpdate callbacks, in order: parents before children + // 2. All bind:this callbacks, in reverse order: children before parents. + // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT + // for afterUpdates called during the initial onMount, which are called in + // reverse order: children before parents. + // Since callbacks might update component values, which could trigger another + // call to flush(), the following steps guard against this: + // 1. During beforeUpdate, any updated components will be added to the + // dirty_components array and will cause a reentrant call to flush(). Because + // the flush index is kept outside the function, the reentrant call will pick + // up where the earlier call left off and go through all dirty components. The + // current_component value is saved and restored so that the reentrant call will + // not interfere with the "parent" flush() call. + // 2. bind:this callbacks cannot trigger new flush() calls. + // 3. During afterUpdate, any updated components will NOT have their afterUpdate + // callback called a second time; the seen_callbacks set, outside the flush() + // function, guarantees this behavior. + const seen_callbacks = new Set(); + + let flushidx = 0; // Do *not* move this inside the flush() function + + /** @returns {void} */ + function flush() { + // Do not reenter flush while dirty components are updated, as this can + // result in an infinite loop. Instead, let the inner flush handle it. + // Reentrancy is ok afterwards for bindings etc. + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + // first, call beforeUpdate functions + // and update components + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } catch (e) { + // reset dirty state to not end up in a deadlocked state and then rethrow + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); + } + + /** @returns {void} */ + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + + /** + * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. + * @param {Function[]} fns + * @returns {void} + */ + function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c))); + targets.forEach((c) => c()); + render_callbacks = filtered; + } + + const outroing = new Set(); + + /** + * @type {Outro} + */ + let outros; + + /** + * @returns {void} */ + function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; + } + + /** + * @returns {void} */ + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + + /** + * @param {import('./private.js').Fragment} block + * @param {0 | 1} [local] + * @returns {void} + */ + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + + /** + * @param {import('./private.js').Fragment} block + * @param {0 | 1} local + * @param {0 | 1} [detach] + * @param {() => void} [callback] + * @returns {void} + */ + function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) block.d(1); + callback(); + } + }); + block.o(local); + } else if (callback) { + callback(); + } + } + + /** @typedef {1} INTRO */ + /** @typedef {0} OUTRO */ + /** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */ + /** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */ + + /** + * @typedef {Object} Outro + * @property {number} r + * @property {Function[]} c + * @property {Object} p + */ + + /** + * @typedef {Object} PendingProgram + * @property {number} start + * @property {INTRO|OUTRO} b + * @property {Outro} [group] + */ + + /** + * @typedef {Object} Program + * @property {number} a + * @property {INTRO|OUTRO} b + * @property {1|-1} d + * @property {number} duration + * @property {number} start + * @property {number} end + * @property {Outro} [group] + */ + + /** + * @template T + * @param {Promise} promise + * @param {import('./private.js').PromiseInfo} info + * @returns {boolean} + */ + function handle_promise(promise, info) { + const token = (info.token = {}); + /** + * @param {import('./private.js').FragmentFactory} type + * @param {0 | 1 | 2} index + * @param {number} [key] + * @param {any} [value] + * @returns {void} + */ + function update(type, index, key, value) { + if (info.token !== token) return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block, i) => { + if (i !== index && block) { + group_outros(); + transition_out(block, 1, 1, () => { + if (info.blocks[i] === block) { + info.blocks[i] = null; + } + }); + check_outros(); + } + }); + } else { + info.block.d(1); + } + block.c(); + transition_in(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) info.blocks[index] = block; + if (needs_flush) { + flush(); + } + } + if (is_promise(promise)) { + const current_component = get_current_component(); + promise.then( + (value) => { + set_current_component(current_component); + update(info.then, 1, info.value, value); + set_current_component(null); + }, + (error) => { + set_current_component(current_component); + update(info.catch, 2, info.error, error); + set_current_component(null); + if (!info.hasCatch) { + throw error; + } + } + ); + // if we previously had a then/catch block, destroy it + if (info.current !== info.pending) { + update(info.pending, 0); + return true; + } + } else { + if (info.current !== info.then) { + update(info.then, 1, info.value, promise); + return true; + } + info.resolved = /** @type {T} */ (promise); + } + } + + /** @returns {void} */ + function update_await_block_branch(info, ctx, dirty) { + const child_ctx = ctx.slice(); + const { resolved } = info; + if (info.current === info.then) { + child_ctx[info.value] = resolved; + } + if (info.current === info.catch) { + child_ctx[info.error] = resolved; + } + info.block.p(child_ctx, dirty); + } + + // general each functions: + + function ensure_array_like(array_like_or_iterator) { + return array_like_or_iterator?.length !== undefined + ? array_like_or_iterator + : Array.from(array_like_or_iterator); + } + + /** @returns {void} */ + function create_component(block) { + block && block.c(); + } + + /** @returns {void} */ + function mount_component(component, target, anchor) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + // if the component was destroyed immediately + // it will update the `$$.on_destroy` reference to `null`. + // the destructured on_destroy may still reference to the old array + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); + } + + /** @returns {void} */ + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + + /** @returns {void} */ + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= 1 << i % 31; + } + + // TODO: Document the other params + /** + * @param {SvelteComponent} component + * @param {import('./public.js').ComponentConstructorOptions} options + * + * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values. + * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised. + * This will be the `add_css` function from the compiled component. + * + * @returns {void} + */ + function init( + component, + options, + instance, + create_fragment, + not_equal, + props, + append_styles = null, + dirty = [-1] + ) { + const parent_component = current_component; + set_current_component(component); + /** @type {import('./private.js').T$$} */ + const $$ = (component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }); + append_styles && append_styles($$.root); + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) { + if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); + if (ready) make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + // TODO: what is the correct type here? + // @ts-expect-error + const nodes = children(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + flush(); + } + set_current_component(parent_component); + } + + /** + * Base class for Svelte components. Used when dev=false. + * + * @template {Record} [Props=any] + * @template {Record} [Events=any] + */ + class SvelteComponent { + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + $$ = undefined; + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + $$set = undefined; + + /** @returns {void} */ + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + + /** + * @template {Extract} K + * @param {K} type + * @param {((e: Events[K]) => void) | null | undefined} callback + * @returns {() => void} + */ + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) callbacks.splice(index, 1); + }; + } + + /** + * @param {Partial} props + * @returns {void} + */ + $set(props) { + if (this.$$set && !is_empty(props)) { + this.$$.skip_bound = true; + this.$$set(props); + this.$$.skip_bound = false; + } + } + } + + /** + * @typedef {Object} CustomElementPropDefinition + * @property {string} [attribute] + * @property {boolean} [reflect] + * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type] + */ + + // generated during release, do not modify + const PUBLIC_VERSION = '4'; + + if (typeof window !== 'undefined') + // @ts-ignore + (window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION); + + /* d\Left.svelte generated by Svelte v4.2.20 */ + + function create_else_block$9(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Left: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$9(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Left data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + function create_fragment$9(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$9; + return create_else_block$9; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$9($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Left extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$9, create_fragment$9, safe_not_equal, { data: 0 }); + } + } + + /* d\Right.svelte generated by Svelte v4.2.20 */ + + function create_else_block$8(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Right: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$8(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Right data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + function create_fragment$8(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$8; + return create_else_block$8; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$8($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Right extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$8, create_fragment$8, safe_not_equal, { data: 0 }); + } + } + + /* d\AreEqual.svelte generated by Svelte v4.2.20 */ + + function get_each_context$6(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$7(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$6(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$6(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$7(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$6(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("AreEqual:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$7(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$7, create_if_block_1$6, create_else_block$7]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$7($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class AreEqual extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$7, create_fragment$7, safe_not_equal, { data: 0 }); + } + } + + /* d\LeftSideIsNewer.svelte generated by Svelte v4.2.20 */ + + function get_each_context$5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$6(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$5(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$5(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$5(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$6(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$6, create_if_block_1$5, create_else_block$6]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$6($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$6, create_fragment$6, safe_not_equal, { data: 0 }); + } + } + + /* d\LeftSideOnly.svelte generated by Svelte v4.2.20 */ + + function get_each_context$4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$5(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$4(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$4(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$4(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$5(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$5, create_if_block_1$4, create_else_block$5]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$5($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$5, create_fragment$5, safe_not_equal, { data: 0 }); + } + } + + /* d\NotEqualBut.svelte generated by Svelte v4.2.20 */ + + function get_each_context$3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$4(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$3(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$3(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$3(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("NotEqualBut:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$4(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$4, create_if_block_1$3, create_else_block$4]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$4($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class NotEqualBut extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$4, create_fragment$4, safe_not_equal, { data: 0 }); + } + } + + /* d\Records.svelte generated by Svelte v4.2.20 */ + + function get_each_context$2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (9:0) {:else} + function create_else_block$3(ctx) { + let t; + let each_1_anchor; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); + } + + return { + c() { + t = text("Records:\n "); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + insert(target, t, anchor); + + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$2(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block$2(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + }, + d(detaching) { + if (detaching) { + detach(t); + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (7:28) + function create_if_block_1$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (11:2) {#each data as record} + function create_each_block$2(ctx) { + let li; + let t_value = /*record*/ ctx[1].Left.Records + ""; + let t; + + return { + c() { + li = element("li"); + t = text(t_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t_value !== (t_value = /*record*/ ctx[1].Left.Records + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + function create_fragment$3(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$3; + if (/*data*/ ctx[0].length === 0) return create_if_block_1$2; + return create_else_block$3; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$3($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Records extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$3, create_fragment$3, safe_not_equal, { data: 0 }); + } + } + + /* d\RightSideIsNewer.svelte generated by Svelte v4.2.20 */ + + function get_each_context$1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$2(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$1(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$2(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$2, create_if_block_1$1, create_else_block$2]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$2($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$2, create_fragment$2, safe_not_equal, { data: 0 }); + } + } + + /* d\RightSideOnly.svelte generated by Svelte v4.2.20 */ + + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$1(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$1(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$1, create_if_block_1, create_else_block$1]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$1($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$1, create_fragment$1, safe_not_equal, { data: 0 }); + } + } + + /* d\Review.svelte generated by Svelte v4.2.20 */ + + function create_catch_block(ctx) { + let span; + + return { + c() { + span = element("span"); + span.textContent = `${/*error*/ ctx[5]}`; + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(span); + } + } + }; + } + + // (24:0) {:then data} + function create_then_block(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block, create_else_block]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[4]) return 0; + return 1; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if_block.p(ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + // (28:2) {:else} + function create_else_block(ctx) { + let p; + let t1; + let areequal; + let t2; + let leftsideisnewer; + let t3; + let leftsideonly; + let t4; + let notequalbut; + let t5; + let records; + let t6; + let rightsideisnewer; + let t7; + let rightsideonly; + let current; + + areequal = new AreEqual({ + props: { data: /*data*/ ctx[4].AreEqual } + }); + + leftsideisnewer = new LeftSideIsNewer({ + props: { data: /*data*/ ctx[4].LeftSideIsNewer } + }); + + leftsideonly = new LeftSideOnly({ + props: { data: /*data*/ ctx[4].LeftSideOnly } + }); + + notequalbut = new NotEqualBut({ + props: { data: /*data*/ ctx[4].NotEqualBut } + }); + + records = new Records({ props: { data: /*data*/ ctx[4].Records } }); + + rightsideisnewer = new RightSideIsNewer({ + props: { data: /*data*/ ctx[4].RightSideIsNewer } + }); + + rightsideonly = new RightSideOnly({ + props: { data: /*data*/ ctx[4].RightSideOnly } + }); + + return { + c() { + p = element("p"); + p.textContent = "Review:"; + t1 = space(); + create_component(areequal.$$.fragment); + t2 = space(); + create_component(leftsideisnewer.$$.fragment); + t3 = space(); + create_component(leftsideonly.$$.fragment); + t4 = space(); + create_component(notequalbut.$$.fragment); + t5 = space(); + create_component(records.$$.fragment); + t6 = space(); + create_component(rightsideisnewer.$$.fragment); + t7 = space(); + create_component(rightsideonly.$$.fragment); + }, + m(target, anchor) { + insert(target, p, anchor); + insert(target, t1, anchor); + mount_component(areequal, target, anchor); + insert(target, t2, anchor); + mount_component(leftsideisnewer, target, anchor); + insert(target, t3, anchor); + mount_component(leftsideonly, target, anchor); + insert(target, t4, anchor); + mount_component(notequalbut, target, anchor); + insert(target, t5, anchor); + mount_component(records, target, anchor); + insert(target, t6, anchor); + mount_component(rightsideisnewer, target, anchor); + insert(target, t7, anchor); + mount_component(rightsideonly, target, anchor); + current = true; + }, + p: noop, + i(local) { + if (current) return; + transition_in(areequal.$$.fragment, local); + transition_in(leftsideisnewer.$$.fragment, local); + transition_in(leftsideonly.$$.fragment, local); + transition_in(notequalbut.$$.fragment, local); + transition_in(records.$$.fragment, local); + transition_in(rightsideisnewer.$$.fragment, local); + transition_in(rightsideonly.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(areequal.$$.fragment, local); + transition_out(leftsideisnewer.$$.fragment, local); + transition_out(leftsideonly.$$.fragment, local); + transition_out(notequalbut.$$.fragment, local); + transition_out(records.$$.fragment, local); + transition_out(rightsideisnewer.$$.fragment, local); + transition_out(rightsideonly.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(p); + detach(t1); + detach(t2); + detach(t3); + detach(t4); + detach(t5); + detach(t6); + detach(t7); + } + + destroy_component(areequal, detaching); + destroy_component(leftsideisnewer, detaching); + destroy_component(leftsideonly, detaching); + destroy_component(notequalbut, detaching); + destroy_component(records, detaching); + destroy_component(rightsideisnewer, detaching); + destroy_component(rightsideonly, detaching); + } + }; + } + + // (26:2) {#if !data} + function create_if_block(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Review data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (21:16) waiting {:then data} + function create_pending_block(ctx) { + let span; + + return { + c() { + span = element("span"); + span.textContent = "waiting"; + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(span); + } + } + }; + } + + function create_fragment(ctx) { + let await_block_anchor; + let current; + + let info = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 4, + error: 5, + blocks: [,,,] + }; + + handle_promise(/*promise*/ ctx[0], info); + + return { + c() { + await_block_anchor = empty(); + info.block.c(); + }, + m(target, anchor) { + insert(target, await_block_anchor, anchor); + info.block.m(target, info.anchor = anchor); + info.mount = () => await_block_anchor.parentNode; + info.anchor = await_block_anchor; + current = true; + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + update_await_block_branch(info, ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(info.block); + current = true; + }, + o(local) { + for (let i = 0; i < 3; i += 1) { + const block = info.blocks[i]; + transition_out(block); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(await_block_anchor); + } + + info.block.d(detaching); + info.token = null; + info = null; + } + }; + } + + function instance($$self, $$props, $$invalidate) { + let { page } = $$props; + let { json } = $$props; + let { baseUrl } = $$props; + + let promise = fetch(baseUrl + page, { + method: 'POST', + body: json, + headers: { 'Content-Type': 'application/json' } + }).then(x => x.json()); + + $$self.$$set = $$props => { + if ('page' in $$props) $$invalidate(1, page = $$props.page); + if ('json' in $$props) $$invalidate(2, json = $$props.json); + if ('baseUrl' in $$props) $$invalidate(3, baseUrl = $$props.baseUrl); + }; + + return [promise, page, json, baseUrl]; + } + + class Review extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, { page: 1, json: 2, baseUrl: 3 }); + } + } + + var div = document.createElement('DIV'); + var script = document.currentScript; + script.parentNode.insertBefore(div, script); + + const page = '/api/SyncV1/?'; + const baseUrl = 'http://localhost:5004'; + + const json = ` +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} +`; + + new Review({ + target: div, + props: { page: page, baseUrl: baseUrl, json: json }, + }); + +})(); diff --git a/svelte-helper/public/demo.html b/svelte-helper/public/demo.html new file mode 100644 index 0000000..6dcef77 --- /dev/null +++ b/svelte-helper/public/demo.html @@ -0,0 +1,41 @@ + + + + + + Demo page + + + + + +

Svelte Embedding Demo

+ +

+ Below, we have inserted a script tag that should render a + Svelte Calculator component upon loading this page. Its font size is set + to 10px. +

+ + + +

Below this line is a Calculator with font size of 16px.

+ + + +

This text will come after the embedded content.

+ + + \ No newline at end of file diff --git a/svelte-helper/public/e/demo.html b/svelte-helper/public/e/demo.html new file mode 100644 index 0000000..c302307 --- /dev/null +++ b/svelte-helper/public/e/demo.html @@ -0,0 +1,23 @@ + + + +Demo page + + + + +

Svelte embedding demo

+ +

Below, we have inserted a script tag that should + renter a Svelte component upon loading this page.

+
+ +
+ +
+ +
+

This text will come after the embedded content.

+ + + \ No newline at end of file diff --git a/svelte-helper/public/e/embed-rollup.js b/svelte-helper/public/e/embed-rollup.js new file mode 100644 index 0000000..d281def --- /dev/null +++ b/svelte-helper/public/e/embed-rollup.js @@ -0,0 +1,3277 @@ +(function () { + 'use strict'; + + /** @returns {void} */ + function noop() {} + + // Adapted from https://github.com/then/is-promise/blob/master/index.js + // Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE + /** + * @param {any} value + * @returns {value is PromiseLike} + */ + function is_promise(value) { + return ( + !!value && + (typeof value === 'object' || typeof value === 'function') && + typeof (/** @type {any} */ (value).then) === 'function' + ); + } + + function run(fn) { + return fn(); + } + + function blank_object() { + return Object.create(null); + } + + /** + * @param {Function[]} fns + * @returns {void} + */ + function run_all(fns) { + fns.forEach(run); + } + + /** + * @param {any} thing + * @returns {thing is Function} + */ + function is_function(thing) { + return typeof thing === 'function'; + } + + /** @returns {boolean} */ + function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function'; + } + + /** @returns {boolean} */ + function is_empty(obj) { + return Object.keys(obj).length === 0; + } + + /** + * @param {Node} target + * @param {Node} node + * @returns {void} + */ + function append(target, node) { + target.appendChild(node); + } + + /** + * @param {Node} target + * @param {Node} node + * @param {Node} [anchor] + * @returns {void} + */ + function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); + } + + /** + * @param {Node} node + * @returns {void} + */ + function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + + /** + * @returns {void} */ + function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) iterations[i].d(detaching); + } + } + + /** + * @template {keyof HTMLElementTagNameMap} K + * @param {K} name + * @returns {HTMLElementTagNameMap[K]} + */ + function element(name) { + return document.createElement(name); + } + + /** + * @param {string} data + * @returns {Text} + */ + function text(data) { + return document.createTextNode(data); + } + + /** + * @returns {Text} */ + function space() { + return text(' '); + } + + /** + * @returns {Text} */ + function empty() { + return text(''); + } + + /** + * @param {Element} element + * @returns {ChildNode[]} + */ + function children(element) { + return Array.from(element.childNodes); + } + + /** + * @param {Text} text + * @param {unknown} data + * @returns {void} + */ + function set_data(text, data) { + data = '' + data; + if (text.data === data) return; + text.data = /** @type {string} */ (data); + } + + /** + * @typedef {Node & { + * claim_order?: number; + * hydrate_init?: true; + * actual_end_child?: NodeEx; + * childNodes: NodeListOf; + * }} NodeEx + */ + + /** @typedef {ChildNode & NodeEx} ChildNodeEx */ + + /** @typedef {NodeEx & { claim_order: number }} NodeEx2 */ + + /** + * @typedef {ChildNodeEx[] & { + * claim_info?: { + * last_index: number; + * total_claimed: number; + * }; + * }} ChildNodeArray + */ + + let current_component; + + /** @returns {void} */ + function set_current_component(component) { + current_component = component; + } + + function get_current_component() { + if (!current_component) throw new Error('Function called outside component initialization'); + return current_component; + } + + const dirty_components = []; + const binding_callbacks = []; + + let render_callbacks = []; + + const flush_callbacks = []; + + const resolved_promise = /* @__PURE__ */ Promise.resolve(); + + let update_scheduled = false; + + /** @returns {void} */ + function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } + } + + /** @returns {void} */ + function add_render_callback(fn) { + render_callbacks.push(fn); + } + + // flush() calls callbacks in this order: + // 1. All beforeUpdate callbacks, in order: parents before children + // 2. All bind:this callbacks, in reverse order: children before parents. + // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT + // for afterUpdates called during the initial onMount, which are called in + // reverse order: children before parents. + // Since callbacks might update component values, which could trigger another + // call to flush(), the following steps guard against this: + // 1. During beforeUpdate, any updated components will be added to the + // dirty_components array and will cause a reentrant call to flush(). Because + // the flush index is kept outside the function, the reentrant call will pick + // up where the earlier call left off and go through all dirty components. The + // current_component value is saved and restored so that the reentrant call will + // not interfere with the "parent" flush() call. + // 2. bind:this callbacks cannot trigger new flush() calls. + // 3. During afterUpdate, any updated components will NOT have their afterUpdate + // callback called a second time; the seen_callbacks set, outside the flush() + // function, guarantees this behavior. + const seen_callbacks = new Set(); + + let flushidx = 0; // Do *not* move this inside the flush() function + + /** @returns {void} */ + function flush() { + // Do not reenter flush while dirty components are updated, as this can + // result in an infinite loop. Instead, let the inner flush handle it. + // Reentrancy is ok afterwards for bindings etc. + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + // first, call beforeUpdate functions + // and update components + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } catch (e) { + // reset dirty state to not end up in a deadlocked state and then rethrow + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) binding_callbacks.pop()(); + // then, once components are updated, call + // afterUpdate functions. This may cause + // subsequent updates... + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + // ...so guard against infinite loops + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); + } + + /** @returns {void} */ + function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } + } + + /** + * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`. + * @param {Function[]} fns + * @returns {void} + */ + function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c))); + targets.forEach((c) => c()); + render_callbacks = filtered; + } + + const outroing = new Set(); + + /** + * @type {Outro} + */ + let outros; + + /** + * @returns {void} */ + function group_outros() { + outros = { + r: 0, + c: [], + p: outros // parent group + }; + } + + /** + * @returns {void} */ + function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; + } + + /** + * @param {import('./private.js').Fragment} block + * @param {0 | 1} [local] + * @returns {void} + */ + function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } + } + + /** + * @param {import('./private.js').Fragment} block + * @param {0 | 1} local + * @param {0 | 1} [detach] + * @param {() => void} [callback] + * @returns {void} + */ + function transition_out(block, local, detach, callback) { + if (block && block.o) { + if (outroing.has(block)) return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach) block.d(1); + callback(); + } + }); + block.o(local); + } else if (callback) { + callback(); + } + } + + /** @typedef {1} INTRO */ + /** @typedef {0} OUTRO */ + /** @typedef {{ direction: 'in' | 'out' | 'both' }} TransitionOptions */ + /** @typedef {(node: Element, params: any, options: TransitionOptions) => import('../transition/public.js').TransitionConfig} TransitionFn */ + + /** + * @typedef {Object} Outro + * @property {number} r + * @property {Function[]} c + * @property {Object} p + */ + + /** + * @typedef {Object} PendingProgram + * @property {number} start + * @property {INTRO|OUTRO} b + * @property {Outro} [group] + */ + + /** + * @typedef {Object} Program + * @property {number} a + * @property {INTRO|OUTRO} b + * @property {1|-1} d + * @property {number} duration + * @property {number} start + * @property {number} end + * @property {Outro} [group] + */ + + /** + * @template T + * @param {Promise} promise + * @param {import('./private.js').PromiseInfo} info + * @returns {boolean} + */ + function handle_promise(promise, info) { + const token = (info.token = {}); + /** + * @param {import('./private.js').FragmentFactory} type + * @param {0 | 1 | 2} index + * @param {number} [key] + * @param {any} [value] + * @returns {void} + */ + function update(type, index, key, value) { + if (info.token !== token) return; + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } + const block = type && (info.current = type)(child_ctx); + let needs_flush = false; + if (info.block) { + if (info.blocks) { + info.blocks.forEach((block, i) => { + if (i !== index && block) { + group_outros(); + transition_out(block, 1, 1, () => { + if (info.blocks[i] === block) { + info.blocks[i] = null; + } + }); + check_outros(); + } + }); + } else { + info.block.d(1); + } + block.c(); + transition_in(block, 1); + block.m(info.mount(), info.anchor); + needs_flush = true; + } + info.block = block; + if (info.blocks) info.blocks[index] = block; + if (needs_flush) { + flush(); + } + } + if (is_promise(promise)) { + const current_component = get_current_component(); + promise.then( + (value) => { + set_current_component(current_component); + update(info.then, 1, info.value, value); + set_current_component(null); + }, + (error) => { + set_current_component(current_component); + update(info.catch, 2, info.error, error); + set_current_component(null); + if (!info.hasCatch) { + throw error; + } + } + ); + // if we previously had a then/catch block, destroy it + if (info.current !== info.pending) { + update(info.pending, 0); + return true; + } + } else { + if (info.current !== info.then) { + update(info.then, 1, info.value, promise); + return true; + } + info.resolved = /** @type {T} */ (promise); + } + } + + /** @returns {void} */ + function update_await_block_branch(info, ctx, dirty) { + const child_ctx = ctx.slice(); + const { resolved } = info; + if (info.current === info.then) { + child_ctx[info.value] = resolved; + } + if (info.current === info.catch) { + child_ctx[info.error] = resolved; + } + info.block.p(child_ctx, dirty); + } + + // general each functions: + + function ensure_array_like(array_like_or_iterator) { + return array_like_or_iterator?.length !== undefined + ? array_like_or_iterator + : Array.from(array_like_or_iterator); + } + + /** @returns {void} */ + function create_component(block) { + block && block.c(); + } + + /** @returns {void} */ + function mount_component(component, target, anchor) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + // onMount happens before the initial afterUpdate + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + // if the component was destroyed immediately + // it will update the `$$.on_destroy` reference to `null`. + // the destructured on_destroy may still reference to the old array + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + // Edge case - component was destroyed immediately, + // most likely as a result of a binding initialising + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); + } + + /** @returns {void} */ + function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + // TODO null out other refs, including component.$$ (but need to + // preserve final state?) + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } + } + + /** @returns {void} */ + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[(i / 31) | 0] |= 1 << i % 31; + } + + // TODO: Document the other params + /** + * @param {SvelteComponent} component + * @param {import('./public.js').ComponentConstructorOptions} options + * + * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values. + * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised. + * This will be the `add_css` function from the compiled component. + * + * @returns {void} + */ + function init( + component, + options, + instance, + create_fragment, + not_equal, + props, + append_styles = null, + dirty = [-1] + ) { + const parent_component = current_component; + set_current_component(component); + /** @type {import('./private.js').T$$} */ + const $$ = (component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }); + append_styles && append_styles($$.root); + let ready = false; + $$.ctx = instance + ? instance(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) { + if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); + if (ready) make_dirty(component, i); + } + return ret; + }) + : []; + $$.update(); + ready = true; + run_all($$.before_update); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + // TODO: what is the correct type here? + // @ts-expect-error + const nodes = children(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } else { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + $$.fragment && $$.fragment.c(); + } + if (options.intro) transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + flush(); + } + set_current_component(parent_component); + } + + /** + * Base class for Svelte components. Used when dev=false. + * + * @template {Record} [Props=any] + * @template {Record} [Events=any] + */ + class SvelteComponent { + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + $$ = undefined; + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + $$set = undefined; + + /** @returns {void} */ + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + + /** + * @template {Extract} K + * @param {K} type + * @param {((e: Events[K]) => void) | null | undefined} callback + * @returns {() => void} + */ + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index = callbacks.indexOf(callback); + if (index !== -1) callbacks.splice(index, 1); + }; + } + + /** + * @param {Partial} props + * @returns {void} + */ + $set(props) { + if (this.$$set && !is_empty(props)) { + this.$$.skip_bound = true; + this.$$set(props); + this.$$.skip_bound = false; + } + } + } + + /** + * @typedef {Object} CustomElementPropDefinition + * @property {string} [attribute] + * @property {boolean} [reflect] + * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type] + */ + + // generated during release, do not modify + + const PUBLIC_VERSION = '4'; + + if (typeof window !== 'undefined') + // @ts-ignore + (window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION); + + /* src\lib\Left.svelte generated by Svelte v4.2.20 */ + + function create_else_block$9(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Left: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$9(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Left data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + function create_fragment$9(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$9; + return create_else_block$9; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$9($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Left extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$9, create_fragment$9, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\Right.svelte generated by Svelte v4.2.20 */ + + function create_else_block$8(ctx) { + let li; + let t0; + let t1_value = /*data*/ ctx[0].RelativePath + ""; + let t1; + let t2; + let t3_value = /*data*/ ctx[0].Size + ""; + let t3; + let t4; + let t5_value = /*data*/ ctx[0].Ticks + ""; + let t5; + + return { + c() { + li = element("li"); + t0 = text("Right: "); + t1 = text(t1_value); + t2 = text(" - "); + t3 = text(t3_value); + t4 = text(" - "); + t5 = text(t5_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t0); + append(li, t1); + append(li, t2); + append(li, t3); + append(li, t4); + append(li, t5); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t1_value !== (t1_value = /*data*/ ctx[0].RelativePath + "")) set_data(t1, t1_value); + if (dirty & /*data*/ 1 && t3_value !== (t3_value = /*data*/ ctx[0].Size + "")) set_data(t3, t3_value); + if (dirty & /*data*/ 1 && t5_value !== (t5_value = /*data*/ ctx[0].Ticks + "")) set_data(t5, t5_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$8(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Right data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + function create_fragment$8(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$8; + return create_else_block$8; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$8($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Right extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$8, create_fragment$8, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\AreEqual.svelte generated by Svelte v4.2.20 */ + + function get_each_context$6(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$7(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$6(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$6(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$7(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "AreEqual data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$6(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("AreEqual:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$7(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$7, create_if_block_1$6, create_else_block$7]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$7($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class AreEqual extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$7, create_fragment$7, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\LeftSideIsNewer.svelte generated by Svelte v4.2.20 */ + + function get_each_context$5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$6(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$5(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$5(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$6(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$5(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$6(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$6, create_if_block_1$5, create_else_block$6]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$6($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$6, create_fragment$6, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\LeftSideOnly.svelte generated by Svelte v4.2.20 */ + + function get_each_context$4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$5(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$4(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$4(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$5(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "LeftSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$4(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("LeftSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$5(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$5, create_if_block_1$4, create_else_block$5]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$5($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class LeftSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$5, create_fragment$5, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\NotEqualBut.svelte generated by Svelte v4.2.20 */ + + function get_each_context$3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$4(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$3(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$3(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$4(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "NotEqualBut data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$3(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("NotEqualBut:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$4(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$4, create_if_block_1$3, create_else_block$4]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$4($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class NotEqualBut extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$4, create_fragment$4, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\Records.svelte generated by Svelte v4.2.20 */ + + function get_each_context$2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (9:0) {:else} + function create_else_block$3(ctx) { + let t; + let each_1_anchor; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); + } + + return { + c() { + t = text("Records:\n "); + + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + insert(target, t, anchor); + + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$2(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + } else { + each_blocks[i] = create_each_block$2(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); + } + + each_blocks.length = each_value.length; + } + }, + d(detaching) { + if (detaching) { + detach(t); + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (7:28) + function create_if_block_1$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (5:0) {#if !data} + function create_if_block$3(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Records data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (11:2) {#each data as record} + function create_each_block$2(ctx) { + let li; + let t_value = /*record*/ ctx[1].Left.Records + ""; + let t; + + return { + c() { + li = element("li"); + t = text(t_value); + }, + m(target, anchor) { + insert(target, li, anchor); + append(li, t); + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1 && t_value !== (t_value = /*record*/ ctx[1].Left.Records + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(li); + } + } + }; + } + + function create_fragment$3(ctx) { + let if_block_anchor; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return create_if_block$3; + if (/*data*/ ctx[0].length === 0) return create_if_block_1$2; + return create_else_block$3; + } + + let current_block_type = select_block_type(ctx); + let if_block = current_block_type(ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_block.m(target, anchor); + insert(target, if_block_anchor, anchor); + }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { + if_block.p(ctx, dirty); + } else { + if_block.d(1); + if_block = current_block_type(ctx); + + if (if_block) { + if_block.c(); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_block.d(detaching); + } + }; + } + + function instance$3($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class Records extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$3, create_fragment$3, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\RightSideIsNewer.svelte generated by Svelte v4.2.20 */ + + function get_each_context$1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$2(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$2(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideIsNewer data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block$1(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideIsNewer:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$2(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$2, create_if_block_1$1, create_else_block$2]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$2($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideIsNewer extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$2, create_fragment$2, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\RightSideOnly.svelte generated by Svelte v4.2.20 */ + + function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[1] = list[i]; + return child_ctx; + } + + // (12:0) {:else} + function create_else_block$1(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like(/*data*/ ctx[0]); + let each_blocks = []; + + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + + const out = i => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if (dirty & /*data*/ 1) { + each_value = ensure_array_like(/*data*/ ctx[0]); + let i; + + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx, each_value, i); + + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + + group_outros(); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + + check_outros(); + } + }, + i(local) { + if (current) return; + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + + destroy_each(each_blocks, detaching); + } + }; + } + + // (10:28) + function create_if_block_1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is empty"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (8:0) {#if !data} + function create_if_block$1(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "RightSideOnly data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (13:2) {#each data as segment} + function create_each_block(ctx) { + let t0; + let left; + let t1; + let right; + let current; + left = new Left({ props: { data: /*segment*/ ctx[1].Left } }); + + right = new Right({ + props: { data: /*segment*/ ctx[1].Right } + }); + + return { + c() { + t0 = text("RightSideOnly:\n "); + create_component(left.$$.fragment); + t1 = space(); + create_component(right.$$.fragment); + }, + m(target, anchor) { + insert(target, t0, anchor); + mount_component(left, target, anchor); + insert(target, t1, anchor); + mount_component(right, target, anchor); + current = true; + }, + p(ctx, dirty) { + const left_changes = {}; + if (dirty & /*data*/ 1) left_changes.data = /*segment*/ ctx[1].Left; + left.$set(left_changes); + const right_changes = {}; + if (dirty & /*data*/ 1) right_changes.data = /*segment*/ ctx[1].Right; + right.$set(right_changes); + }, + i(local) { + if (current) return; + transition_in(left.$$.fragment, local); + transition_in(right.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(left.$$.fragment, local); + transition_out(right.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(t0); + detach(t1); + } + + destroy_component(left, detaching); + destroy_component(right, detaching); + } + }; + } + + function create_fragment$1(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$1, create_if_block_1, create_else_block$1]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[0]) return 0; + if (/*data*/ ctx[0].length === 0) return 1; + return 2; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx); + + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } else { + if_block.p(ctx, dirty); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + function instance$1($$self, $$props, $$invalidate) { + let { data } = $$props; + + $$self.$$set = $$props => { + if ('data' in $$props) $$invalidate(0, data = $$props.data); + }; + + return [data]; + } + + class RightSideOnly extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance$1, create_fragment$1, safe_not_equal, { data: 0 }); + } + } + + /* src\lib\Review.svelte generated by Svelte v4.2.20 */ + + function create_catch_block(ctx) { + let span; + + return { + c() { + span = element("span"); + span.textContent = `${/*error*/ ctx[5]}`; + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(span); + } + } + }; + } + + // (24:0) {:then data} + function create_then_block(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block, create_else_block]; + const if_blocks = []; + + function select_block_type(ctx, dirty) { + if (!/*data*/ ctx[4]) return 0; + return 1; + } + + current_block_type_index = select_block_type(ctx); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx, dirty) { + if_block.p(ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + + if_blocks[current_block_type_index].d(detaching); + } + }; + } + + // (28:2) {:else} + function create_else_block(ctx) { + let p; + let t1; + let areequal; + let t2; + let leftsideisnewer; + let t3; + let leftsideonly; + let t4; + let notequalbut; + let t5; + let records; + let t6; + let rightsideisnewer; + let t7; + let rightsideonly; + let current; + + areequal = new AreEqual({ + props: { data: /*data*/ ctx[4].AreEqual } + }); + + leftsideisnewer = new LeftSideIsNewer({ + props: { data: /*data*/ ctx[4].LeftSideIsNewer } + }); + + leftsideonly = new LeftSideOnly({ + props: { data: /*data*/ ctx[4].LeftSideOnly } + }); + + notequalbut = new NotEqualBut({ + props: { data: /*data*/ ctx[4].NotEqualBut } + }); + + records = new Records({ props: { data: /*data*/ ctx[4].Records } }); + + rightsideisnewer = new RightSideIsNewer({ + props: { data: /*data*/ ctx[4].RightSideIsNewer } + }); + + rightsideonly = new RightSideOnly({ + props: { data: /*data*/ ctx[4].RightSideOnly } + }); + + return { + c() { + p = element("p"); + p.textContent = "Review:"; + t1 = space(); + create_component(areequal.$$.fragment); + t2 = space(); + create_component(leftsideisnewer.$$.fragment); + t3 = space(); + create_component(leftsideonly.$$.fragment); + t4 = space(); + create_component(notequalbut.$$.fragment); + t5 = space(); + create_component(records.$$.fragment); + t6 = space(); + create_component(rightsideisnewer.$$.fragment); + t7 = space(); + create_component(rightsideonly.$$.fragment); + }, + m(target, anchor) { + insert(target, p, anchor); + insert(target, t1, anchor); + mount_component(areequal, target, anchor); + insert(target, t2, anchor); + mount_component(leftsideisnewer, target, anchor); + insert(target, t3, anchor); + mount_component(leftsideonly, target, anchor); + insert(target, t4, anchor); + mount_component(notequalbut, target, anchor); + insert(target, t5, anchor); + mount_component(records, target, anchor); + insert(target, t6, anchor); + mount_component(rightsideisnewer, target, anchor); + insert(target, t7, anchor); + mount_component(rightsideonly, target, anchor); + current = true; + }, + p: noop, + i(local) { + if (current) return; + transition_in(areequal.$$.fragment, local); + transition_in(leftsideisnewer.$$.fragment, local); + transition_in(leftsideonly.$$.fragment, local); + transition_in(notequalbut.$$.fragment, local); + transition_in(records.$$.fragment, local); + transition_in(rightsideisnewer.$$.fragment, local); + transition_in(rightsideonly.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(areequal.$$.fragment, local); + transition_out(leftsideisnewer.$$.fragment, local); + transition_out(leftsideonly.$$.fragment, local); + transition_out(notequalbut.$$.fragment, local); + transition_out(records.$$.fragment, local); + transition_out(rightsideisnewer.$$.fragment, local); + transition_out(rightsideonly.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(p); + detach(t1); + detach(t2); + detach(t3); + detach(t4); + detach(t5); + detach(t6); + detach(t7); + } + + destroy_component(areequal, detaching); + destroy_component(leftsideisnewer, detaching); + destroy_component(leftsideonly, detaching); + destroy_component(notequalbut, detaching); + destroy_component(records, detaching); + destroy_component(rightsideisnewer, detaching); + destroy_component(rightsideonly, detaching); + } + }; + } + + // (26:2) {#if !data} + function create_if_block(ctx) { + let p; + + return { + c() { + p = element("p"); + p.textContent = "Review data is null"; + }, + m(target, anchor) { + insert(target, p, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(p); + } + } + }; + } + + // (21:16) waiting {:then data} + function create_pending_block(ctx) { + let span; + + return { + c() { + span = element("span"); + span.textContent = "waiting"; + }, + m(target, anchor) { + insert(target, span, anchor); + }, + p: noop, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(span); + } + } + }; + } + + function create_fragment(ctx) { + let await_block_anchor; + let current; + + let info = { + ctx, + current: null, + token: null, + hasCatch: true, + pending: create_pending_block, + then: create_then_block, + catch: create_catch_block, + value: 4, + error: 5, + blocks: [,,,] + }; + + handle_promise(/*promise*/ ctx[0], info); + + return { + c() { + await_block_anchor = empty(); + info.block.c(); + }, + m(target, anchor) { + insert(target, await_block_anchor, anchor); + info.block.m(target, info.anchor = anchor); + info.mount = () => await_block_anchor.parentNode; + info.anchor = await_block_anchor; + current = true; + }, + p(new_ctx, [dirty]) { + ctx = new_ctx; + update_await_block_branch(info, ctx, dirty); + }, + i(local) { + if (current) return; + transition_in(info.block); + current = true; + }, + o(local) { + for (let i = 0; i < 3; i += 1) { + const block = info.blocks[i]; + transition_out(block); + } + + current = false; + }, + d(detaching) { + if (detaching) { + detach(await_block_anchor); + } + + info.block.d(detaching); + info.token = null; + info = null; + } + }; + } + + function instance($$self, $$props, $$invalidate) { + let { page } = $$props; + let { json } = $$props; + let { baseUrl } = $$props; + + let promise = fetch(baseUrl + page, { + method: 'POST', + body: json, + headers: { 'Content-Type': 'application/json' } + }).then(x => x.json()); + + $$self.$$set = $$props => { + if ('page' in $$props) $$invalidate(1, page = $$props.page); + if ('json' in $$props) $$invalidate(2, json = $$props.json); + if ('baseUrl' in $$props) $$invalidate(3, baseUrl = $$props.baseUrl); + }; + + return [promise, page, json, baseUrl]; + } + + class Review extends SvelteComponent { + constructor(options) { + super(); + init(this, options, instance, create_fragment, safe_not_equal, { page: 1, json: 2, baseUrl: 3 }); + } + } + + var div = document.createElement('DIV'); + var script = document.currentScript; + script.parentNode.insertBefore(div, script); + + const page = '/api/SyncV1/?'; + const baseUrl = 'http://localhost:5004'; + + const json = ` +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} +`; + + new Review({ + target: div, + props: { page: page, baseUrl: baseUrl, json: json }, + }); + +})(); diff --git a/svelte-helper/public/embed-rollup.js b/svelte-helper/public/embed-rollup.js new file mode 100644 index 0000000..d1adb26 --- /dev/null +++ b/svelte-helper/public/embed-rollup.js @@ -0,0 +1,3457 @@ +(function () { + 'use strict'; + + // generated during release, do not modify + + const PUBLIC_VERSION = '5'; + + if (typeof window !== 'undefined') { + // @ts-expect-error + ((window.__svelte ??= {}).v ??= new Set()).add(PUBLIC_VERSION); + } + + let legacy_mode_flag = false; + let tracing_mode_flag = false; + + function enable_legacy_mode_flag() { + legacy_mode_flag = true; + } + + enable_legacy_mode_flag(); + + const EACH_ITEM_REACTIVE = 1; + const EACH_INDEX_REACTIVE = 1 << 1; + const EACH_ITEM_IMMUTABLE = 1 << 4; + + const TEMPLATE_FRAGMENT = 1; + const TEMPLATE_USE_IMPORT_NODE = 1 << 1; + + const UNINITIALIZED = Symbol(); + + var DEV = false; + + // Store the references to globals in case someone tries to monkey patch these, causing the below + // to de-opt (this occurs often when using popular extensions). + var is_array = Array.isArray; + var index_of = Array.prototype.indexOf; + var array_from = Array.from; + var get_descriptors = Object.getOwnPropertyDescriptors; + var get_prototype_of = Object.getPrototypeOf; + + // Adapted from https://github.com/then/is-promise/blob/master/index.js + // Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE + + /** + * @template [T=any] + * @param {any} value + * @returns {value is PromiseLike} + */ + function is_promise(value) { + return typeof value?.then === 'function'; + } + + /** @param {Function} fn */ + function run(fn) { + return fn(); + } + + /** @param {Array<() => void>} arr */ + function run_all(arr) { + for (var i = 0; i < arr.length; i++) { + arr[i](); + } + } + + const DERIVED = 1 << 1; + const EFFECT = 1 << 2; + const RENDER_EFFECT = 1 << 3; + const BLOCK_EFFECT = 1 << 4; + const BRANCH_EFFECT = 1 << 5; + const ROOT_EFFECT = 1 << 6; + const BOUNDARY_EFFECT = 1 << 7; + const UNOWNED = 1 << 8; + const DISCONNECTED = 1 << 9; + const CLEAN = 1 << 10; + const DIRTY = 1 << 11; + const MAYBE_DIRTY = 1 << 12; + const INERT = 1 << 13; + const DESTROYED = 1 << 14; + const EFFECT_RAN = 1 << 15; + /** 'Transparent' effects do not create a transition boundary */ + const EFFECT_TRANSPARENT = 1 << 16; + const HEAD_EFFECT = 1 << 19; + const EFFECT_HAS_DERIVED = 1 << 20; + const EFFECT_IS_UPDATING = 1 << 21; + + const STATE_SYMBOL = Symbol('$state'); + + /** @import { Equals } from '#client' */ + + /** @type {Equals} */ + function equals(value) { + return value === this.v; + } + + /** + * @param {unknown} a + * @param {unknown} b + * @returns {boolean} + */ + function safe_not_equal(a, b) { + return a != a + ? b == b + : a !== b || (a !== null && typeof a === 'object') || typeof a === 'function'; + } + + /** @type {Equals} */ + function safe_equals(value) { + return !safe_not_equal(value, this.v); + } + + /* This file is generated by scripts/process-messages/index.js. Do not edit! */ + + + /** + * `%rune%` cannot be used inside an effect cleanup function + * @param {string} rune + * @returns {never} + */ + function effect_in_teardown(rune) { + { + throw new Error(`https://svelte.dev/e/effect_in_teardown`); + } + } + + /** + * Effect cannot be created inside a `$derived` value that was not itself created inside an effect + * @returns {never} + */ + function effect_in_unowned_derived() { + { + throw new Error(`https://svelte.dev/e/effect_in_unowned_derived`); + } + } + + /** + * `%rune%` can only be used inside an effect (e.g. during component initialisation) + * @param {string} rune + * @returns {never} + */ + function effect_orphan(rune) { + { + throw new Error(`https://svelte.dev/e/effect_orphan`); + } + } + + /** + * Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops + * @returns {never} + */ + function effect_update_depth_exceeded() { + { + throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`); + } + } + + /** @import { ComponentContext } from '#client' */ + + + /** @type {ComponentContext | null} */ + let component_context = null; + + /** @param {ComponentContext | null} context */ + function set_component_context(context) { + component_context = context; + } + + /** + * @param {Record} props + * @param {any} runes + * @param {Function} [fn] + * @returns {void} + */ + function push(props, runes = false, fn) { + var ctx = (component_context = { + p: component_context, + c: null, + d: false, + e: null, + m: false, + s: props, + x: null, + l: null + }); + + if (legacy_mode_flag && !runes) { + component_context.l = { + s: null, + u: null, + r1: [], + r2: source(false) + }; + } + + teardown(() => { + /** @type {ComponentContext} */ (ctx).d = true; + }); + } + + /** + * @template {Record} T + * @param {T} [component] + * @returns {T} + */ + function pop(component) { + const context_stack_item = component_context; + if (context_stack_item !== null) { + const component_effects = context_stack_item.e; + if (component_effects !== null) { + var previous_effect = active_effect; + var previous_reaction = active_reaction; + context_stack_item.e = null; + try { + for (var i = 0; i < component_effects.length; i++) { + var component_effect = component_effects[i]; + set_active_effect(component_effect.effect); + set_active_reaction(component_effect.reaction); + effect(component_effect.fn); + } + } finally { + set_active_effect(previous_effect); + set_active_reaction(previous_reaction); + } + } + component_context = context_stack_item.p; + context_stack_item.m = true; + } + // Micro-optimization: Don't set .a above to the empty object + // so it can be garbage-collected when the return here is unused + return /** @type {T} */ ({}); + } + + /** @returns {boolean} */ + function is_runes() { + return !legacy_mode_flag || (component_context !== null && component_context.l === null); + } + + /** @import { Derived, Effect } from '#client' */ + + /** + * @template V + * @param {() => V} fn + * @returns {Derived} + */ + /*#__NO_SIDE_EFFECTS__*/ + function derived(fn) { + var flags = DERIVED | DIRTY; + var parent_derived = + active_reaction !== null && (active_reaction.f & DERIVED) !== 0 + ? /** @type {Derived} */ (active_reaction) + : null; + + if (active_effect === null || (parent_derived !== null && (parent_derived.f & UNOWNED) !== 0)) { + flags |= UNOWNED; + } else { + // Since deriveds are evaluated lazily, any effects created inside them are + // created too late to ensure that the parent effect is added to the tree + active_effect.f |= EFFECT_HAS_DERIVED; + } + + /** @type {Derived} */ + const signal = { + ctx: component_context, + deps: null, + effects: null, + equals, + f: flags, + fn, + reactions: null, + rv: 0, + v: /** @type {V} */ (null), + wv: 0, + parent: parent_derived ?? active_effect + }; + + return signal; + } + + /** + * @template V + * @param {() => V} fn + * @returns {Derived} + */ + /*#__NO_SIDE_EFFECTS__*/ + function derived_safe_equal(fn) { + const signal = derived(fn); + signal.equals = safe_equals; + return signal; + } + + /** + * @param {Derived} derived + * @returns {void} + */ + function destroy_derived_effects(derived) { + var effects = derived.effects; + + if (effects !== null) { + derived.effects = null; + + for (var i = 0; i < effects.length; i += 1) { + destroy_effect(/** @type {Effect} */ (effects[i])); + } + } + } + + /** + * @param {Derived} derived + * @returns {Effect | null} + */ + function get_derived_parent_effect(derived) { + var parent = derived.parent; + while (parent !== null) { + if ((parent.f & DERIVED) === 0) { + return /** @type {Effect} */ (parent); + } + parent = parent.parent; + } + return null; + } + + /** + * @template T + * @param {Derived} derived + * @returns {T} + */ + function execute_derived(derived) { + var value; + var prev_active_effect = active_effect; + + set_active_effect(get_derived_parent_effect(derived)); + + { + try { + destroy_derived_effects(derived); + value = update_reaction(derived); + } finally { + set_active_effect(prev_active_effect); + } + } + + return value; + } + + /** + * @param {Derived} derived + * @returns {void} + */ + function update_derived(derived) { + var value = execute_derived(derived); + + if (!derived.equals(value)) { + derived.v = value; + derived.wv = increment_write_version(); + } + + // don't mark derived clean if we're reading it inside a + // cleanup function, or it will cache a stale value + if (is_destroying_effect) return; + + var status = + (skip_reaction || (derived.f & UNOWNED) !== 0) && derived.deps !== null ? MAYBE_DIRTY : CLEAN; + + set_signal_status(derived, status); + } + + /** @import { Derived, Effect, Source, Value } from '#client' */ + const old_values = new Map(); + + /** + * @template V + * @param {V} v + * @param {Error | null} [stack] + * @returns {Source} + */ + // TODO rename this to `state` throughout the codebase + function source(v, stack) { + /** @type {Value} */ + var signal = { + f: 0, // TODO ideally we could skip this altogether, but it causes type errors + v, + reactions: null, + equals, + rv: 0, + wv: 0 + }; + + return signal; + } + + /** + * @template V + * @param {V} initial_value + * @param {boolean} [immutable] + * @returns {Source} + */ + /*#__NO_SIDE_EFFECTS__*/ + function mutable_source(initial_value, immutable = false) { + const s = source(initial_value); + if (!immutable) { + s.equals = safe_equals; + } + + // bind the signal to the component context, in case we need to + // track updates to trigger beforeUpdate/afterUpdate callbacks + if (legacy_mode_flag && component_context !== null && component_context.l !== null) { + (component_context.l.s ??= []).push(s); + } + + return s; + } + + /** + * @template V + * @param {Source} source + * @param {V} value + * @returns {V} + */ + function internal_set(source, value) { + if (!source.equals(value)) { + var old_value = source.v; + + if (is_destroying_effect) { + old_values.set(source, value); + } else { + old_values.set(source, old_value); + } + + source.v = value; + + if ((source.f & DERIVED) !== 0) { + // if we are assigning to a dirty derived we set it to clean/maybe dirty but we also eagerly execute it to track the dependencies + if ((source.f & DIRTY) !== 0) { + execute_derived(/** @type {Derived} */ (source)); + } + set_signal_status(source, (source.f & UNOWNED) === 0 ? CLEAN : MAYBE_DIRTY); + } + + source.wv = increment_write_version(); + + mark_reactions(source, DIRTY); + + // It's possible that the current reaction might not have up-to-date dependencies + // whilst it's actively running. So in the case of ensuring it registers the reaction + // properly for itself, we need to ensure the current effect actually gets + // scheduled. i.e: `$effect(() => x++)` + if ( + is_runes() && + active_effect !== null && + (active_effect.f & CLEAN) !== 0 && + (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 + ) { + if (untracked_writes === null) { + set_untracked_writes([source]); + } else { + untracked_writes.push(source); + } + } + } + + return value; + } + + /** + * @param {Value} signal + * @param {number} status should be DIRTY or MAYBE_DIRTY + * @returns {void} + */ + function mark_reactions(signal, status) { + var reactions = signal.reactions; + if (reactions === null) return; + + var runes = is_runes(); + var length = reactions.length; + + for (var i = 0; i < length; i++) { + var reaction = reactions[i]; + var flags = reaction.f; + + // Skip any effects that are already dirty + if ((flags & DIRTY) !== 0) continue; + + // In legacy mode, skip the current effect to prevent infinite loops + if (!runes && reaction === active_effect) continue; + + set_signal_status(reaction, status); + + // If the signal a) was previously clean or b) is an unowned derived, then mark it + if ((flags & (CLEAN | UNOWNED)) !== 0) { + if ((flags & DERIVED) !== 0) { + mark_reactions(/** @type {Derived} */ (reaction), MAYBE_DIRTY); + } else { + schedule_effect(/** @type {Effect} */ (reaction)); + } + } + } + } + + /** @import { TemplateNode } from '#client' */ + + + /** + * Use this variable to guard everything related to hydration code so it can be treeshaken out + * if the user doesn't use the `hydrate` method and these code paths are therefore not needed. + */ + let hydrating = false; + + /** @import { TemplateNode } from '#client' */ + + /** @type {boolean} */ + var is_firefox; + + /** @type {() => Node | null} */ + var first_child_getter; + /** @type {() => Node | null} */ + var next_sibling_getter; + + /** + * @param {string} value + * @returns {Text} + */ + function create_text(value = '') { + return document.createTextNode(value); + } + + /** + * @template {Node} N + * @param {N} node + * @returns {Node | null} + */ + /*@__NO_SIDE_EFFECTS__*/ + function get_first_child(node) { + return first_child_getter.call(node); + } + + /** + * @template {Node} N + * @param {N} node + * @returns {Node | null} + */ + /*@__NO_SIDE_EFFECTS__*/ + function get_next_sibling(node) { + return next_sibling_getter.call(node); + } + + /** + * Don't mark this as side-effect-free, hydration needs to walk all nodes + * @template {Node} N + * @param {N} node + * @param {boolean} is_text + * @returns {Node | null} + */ + function child(node, is_text) { + { + return get_first_child(node); + } + } + + /** + * Don't mark this as side-effect-free, hydration needs to walk all nodes + * @param {DocumentFragment | TemplateNode[]} fragment + * @param {boolean} is_text + * @returns {Node | null} + */ + function first_child(fragment, is_text) { + { + // when not hydrating, `fragment` is a `DocumentFragment` (the result of calling `open_frag`) + var first = /** @type {DocumentFragment} */ (get_first_child(/** @type {Node} */ (fragment))); + + // TODO prevent user comments with the empty string when preserveComments is true + if (first instanceof Comment && first.data === '') return get_next_sibling(first); + + return first; + } + } + + /** + * Don't mark this as side-effect-free, hydration needs to walk all nodes + * @param {TemplateNode} node + * @param {number} count + * @param {boolean} is_text + * @returns {Node | null} + */ + function sibling(node, count = 1, is_text = false) { + let next_sibling = node; + + while (count--) { + next_sibling = /** @type {TemplateNode} */ (get_next_sibling(next_sibling)); + } + + { + return next_sibling; + } + } + + /** + * @template {Node} N + * @param {N} node + * @returns {void} + */ + function clear_text_content(node) { + node.textContent = ''; + } + + /** @import { ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */ + + /** + * @param {'$effect' | '$effect.pre' | '$inspect'} rune + */ + function validate_effect(rune) { + if (active_effect === null && active_reaction === null) { + effect_orphan(); + } + + if (active_reaction !== null && (active_reaction.f & UNOWNED) !== 0 && active_effect === null) { + effect_in_unowned_derived(); + } + + if (is_destroying_effect) { + effect_in_teardown(); + } + } + + /** + * @param {Effect} effect + * @param {Effect} parent_effect + */ + function push_effect(effect, parent_effect) { + var parent_last = parent_effect.last; + if (parent_last === null) { + parent_effect.last = parent_effect.first = effect; + } else { + parent_last.next = effect; + effect.prev = parent_last; + parent_effect.last = effect; + } + } + + /** + * @param {number} type + * @param {null | (() => void | (() => void))} fn + * @param {boolean} sync + * @param {boolean} push + * @returns {Effect} + */ + function create_effect(type, fn, sync, push = true) { + var parent = active_effect; + + /** @type {Effect} */ + var effect = { + ctx: component_context, + deps: null, + nodes_start: null, + nodes_end: null, + f: type | DIRTY, + first: null, + fn, + last: null, + next: null, + parent, + prev: null, + teardown: null, + transitions: null, + wv: 0 + }; + + if (sync) { + try { + update_effect(effect); + effect.f |= EFFECT_RAN; + } catch (e) { + destroy_effect(effect); + throw e; + } + } else if (fn !== null) { + schedule_effect(effect); + } + + // if an effect has no dependencies, no DOM and no teardown function, + // don't bother adding it to the effect tree + var inert = + sync && + effect.deps === null && + effect.first === null && + effect.nodes_start === null && + effect.teardown === null && + (effect.f & (EFFECT_HAS_DERIVED | BOUNDARY_EFFECT)) === 0; + + if (!inert && push) { + if (parent !== null) { + push_effect(effect, parent); + } + + // if we're in a derived, add the effect there too + if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { + var derived = /** @type {Derived} */ (active_reaction); + (derived.effects ??= []).push(effect); + } + } + + return effect; + } + + /** + * @param {() => void} fn + */ + function teardown(fn) { + const effect = create_effect(RENDER_EFFECT, null, false); + set_signal_status(effect, CLEAN); + effect.teardown = fn; + return effect; + } + + /** + * Internal representation of `$effect(...)` + * @param {() => void | (() => void)} fn + */ + function user_effect(fn) { + validate_effect(); + + // Non-nested `$effect(...)` in a component should be deferred + // until the component is mounted + var defer = + active_effect !== null && + (active_effect.f & BRANCH_EFFECT) !== 0 && + component_context !== null && + !component_context.m; + + if (defer) { + var context = /** @type {ComponentContext} */ (component_context); + (context.e ??= []).push({ + fn, + effect: active_effect, + reaction: active_reaction + }); + } else { + var signal = effect(fn); + return signal; + } + } + + /** + * Internal representation of `$effect.pre(...)` + * @param {() => void | (() => void)} fn + * @returns {Effect} + */ + function user_pre_effect(fn) { + validate_effect(); + return render_effect(fn); + } + + /** + * @param {() => void | (() => void)} fn + * @returns {Effect} + */ + function effect(fn) { + return create_effect(EFFECT, fn, false); + } + + /** + * @param {() => void | (() => void)} fn + * @returns {Effect} + */ + function render_effect(fn) { + return create_effect(RENDER_EFFECT, fn, true); + } + + /** + * @param {(...expressions: any) => void | (() => void)} fn + * @param {Array<() => any>} thunks + * @returns {Effect} + */ + function template_effect(fn, thunks = [], d = derived) { + const deriveds = thunks.map(d); + const effect = () => fn(...deriveds.map(get)); + + return block(effect); + } + + /** + * @param {(() => void)} fn + * @param {number} flags + */ + function block(fn, flags = 0) { + return create_effect(RENDER_EFFECT | BLOCK_EFFECT | flags, fn, true); + } + + /** + * @param {(() => void)} fn + * @param {boolean} [push] + */ + function branch(fn, push = true) { + return create_effect(RENDER_EFFECT | BRANCH_EFFECT, fn, true, push); + } + + /** + * @param {Effect} effect + */ + function execute_effect_teardown(effect) { + var teardown = effect.teardown; + if (teardown !== null) { + const previously_destroying_effect = is_destroying_effect; + const previous_reaction = active_reaction; + set_is_destroying_effect(true); + set_active_reaction(null); + try { + teardown.call(null); + } finally { + set_is_destroying_effect(previously_destroying_effect); + set_active_reaction(previous_reaction); + } + } + } + + /** + * @param {Effect} signal + * @param {boolean} remove_dom + * @returns {void} + */ + function destroy_effect_children(signal, remove_dom = false) { + var effect = signal.first; + signal.first = signal.last = null; + + while (effect !== null) { + var next = effect.next; + + if ((effect.f & ROOT_EFFECT) !== 0) { + // this is now an independent root + effect.parent = null; + } else { + destroy_effect(effect, remove_dom); + } + + effect = next; + } + } + + /** + * @param {Effect} signal + * @returns {void} + */ + function destroy_block_effect_children(signal) { + var effect = signal.first; + + while (effect !== null) { + var next = effect.next; + if ((effect.f & BRANCH_EFFECT) === 0) { + destroy_effect(effect); + } + effect = next; + } + } + + /** + * @param {Effect} effect + * @param {boolean} [remove_dom] + * @returns {void} + */ + function destroy_effect(effect, remove_dom = true) { + var removed = false; + + if ((remove_dom || (effect.f & HEAD_EFFECT) !== 0) && effect.nodes_start !== null) { + remove_effect_dom(effect.nodes_start, /** @type {TemplateNode} */ (effect.nodes_end)); + removed = true; + } + + destroy_effect_children(effect, remove_dom && !removed); + remove_reactions(effect, 0); + set_signal_status(effect, DESTROYED); + + var transitions = effect.transitions; + + if (transitions !== null) { + for (const transition of transitions) { + transition.stop(); + } + } + + execute_effect_teardown(effect); + + var parent = effect.parent; + + // If the parent doesn't have any children, then skip this work altogether + if (parent !== null && parent.first !== null) { + unlink_effect(effect); + } + + // `first` and `child` are nulled out in destroy_effect_children + // we don't null out `parent` so that error propagation can work correctly + effect.next = + effect.prev = + effect.teardown = + effect.ctx = + effect.deps = + effect.fn = + effect.nodes_start = + effect.nodes_end = + null; + } + + /** + * + * @param {TemplateNode | null} node + * @param {TemplateNode} end + */ + function remove_effect_dom(node, end) { + while (node !== null) { + /** @type {TemplateNode | null} */ + var next = node === end ? null : /** @type {TemplateNode} */ (get_next_sibling(node)); + + node.remove(); + node = next; + } + } + + /** + * Detach an effect from the effect tree, freeing up memory and + * reducing the amount of work that happens on subsequent traversals + * @param {Effect} effect + */ + function unlink_effect(effect) { + var parent = effect.parent; + var prev = effect.prev; + var next = effect.next; + + if (prev !== null) prev.next = next; + if (next !== null) next.prev = prev; + + if (parent !== null) { + if (parent.first === effect) parent.first = next; + if (parent.last === effect) parent.last = prev; + } + } + + /** + * When a block effect is removed, we don't immediately destroy it or yank it + * out of the DOM, because it might have transitions. Instead, we 'pause' it. + * It stays around (in memory, and in the DOM) until outro transitions have + * completed, and if the state change is reversed then we _resume_ it. + * A paused effect does not update, and the DOM subtree becomes inert. + * @param {Effect} effect + * @param {() => void} [callback] + */ + function pause_effect(effect, callback) { + /** @type {TransitionManager[]} */ + var transitions = []; + + pause_children(effect, transitions, true); + + run_out_transitions(transitions, () => { + destroy_effect(effect); + if (callback) callback(); + }); + } + + /** + * @param {TransitionManager[]} transitions + * @param {() => void} fn + */ + function run_out_transitions(transitions, fn) { + var remaining = transitions.length; + if (remaining > 0) { + var check = () => --remaining || fn(); + for (var transition of transitions) { + transition.out(check); + } + } else { + fn(); + } + } + + /** + * @param {Effect} effect + * @param {TransitionManager[]} transitions + * @param {boolean} local + */ + function pause_children(effect, transitions, local) { + if ((effect.f & INERT) !== 0) return; + effect.f ^= INERT; + + if (effect.transitions !== null) { + for (const transition of effect.transitions) { + if (transition.is_global || local) { + transitions.push(transition); + } + } + } + + var child = effect.first; + + while (child !== null) { + var sibling = child.next; + var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0; + // TODO we don't need to call pause_children recursively with a linked list in place + // it's slightly more involved though as we have to account for `transparent` changing + // through the tree. + pause_children(child, transitions, transparent ? local : false); + child = sibling; + } + } + + /** + * The opposite of `pause_effect`. We call this if (for example) + * `x` becomes falsy then truthy: `{#if x}...{/if}` + * @param {Effect} effect + */ + function resume_effect(effect) { + resume_children(effect, true); + } + + /** + * @param {Effect} effect + * @param {boolean} local + */ + function resume_children(effect, local) { + if ((effect.f & INERT) === 0) return; + effect.f ^= INERT; + + // Ensure the effect is marked as clean again so that any dirty child + // effects can schedule themselves for execution + if ((effect.f & CLEAN) === 0) { + effect.f ^= CLEAN; + } + + // If a dependency of this effect changed while it was paused, + // schedule the effect to update + if (check_dirtiness(effect)) { + set_signal_status(effect, DIRTY); + schedule_effect(effect); + } + + var child = effect.first; + + while (child !== null) { + var sibling = child.next; + var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0; + // TODO we don't need to call resume_children recursively with a linked list in place + // it's slightly more involved though as we have to account for `transparent` changing + // through the tree. + resume_children(child, transparent ? local : false); + child = sibling; + } + + if (effect.transitions !== null) { + for (const transition of effect.transitions) { + if (transition.is_global || local) { + transition.in(); + } + } + } + } + + /** @type {Array<() => void>} */ + let micro_tasks = []; + + /** @type {Array<() => void>} */ + let idle_tasks = []; + + function run_micro_tasks() { + var tasks = micro_tasks; + micro_tasks = []; + run_all(tasks); + } + + function run_idle_tasks() { + var tasks = idle_tasks; + idle_tasks = []; + run_all(tasks); + } + + /** + * @param {() => void} fn + */ + function queue_micro_task(fn) { + if (micro_tasks.length === 0) { + queueMicrotask(run_micro_tasks); + } + + micro_tasks.push(fn); + } + + /** + * Synchronously run any queued tasks. + */ + function flush_tasks() { + if (micro_tasks.length > 0) { + run_micro_tasks(); + } + + if (idle_tasks.length > 0) { + run_idle_tasks(); + } + } + + /** @import { ComponentContext, Derived, Effect, Reaction, Signal, Source, Value } from '#client' */ + let is_throwing_error = false; + + let is_flushing = false; + + /** @type {Effect | null} */ + let last_scheduled_effect = null; + + let is_updating_effect = false; + + let is_destroying_effect = false; + + /** @param {boolean} value */ + function set_is_destroying_effect(value) { + is_destroying_effect = value; + } + + // Handle effect queues + + /** @type {Effect[]} */ + let queued_root_effects = []; + + /** @type {Effect[]} Stack of effects, dev only */ + let dev_effect_stack = []; + // Handle signal reactivity tree dependencies and reactions + + /** @type {null | Reaction} */ + let active_reaction = null; + + let untracking = false; + + /** @param {null | Reaction} reaction */ + function set_active_reaction(reaction) { + active_reaction = reaction; + } + + /** @type {null | Effect} */ + let active_effect = null; + + /** @param {null | Effect} effect */ + function set_active_effect(effect) { + active_effect = effect; + } + + /** + * When sources are created within a reaction, reading and writing + * them should not cause a re-run + * @type {null | Source[]} + */ + let reaction_sources = null; + + /** + * The dependencies of the reaction that is currently being executed. In many cases, + * the dependencies are unchanged between runs, and so this will be `null` unless + * and until a new dependency is accessed — we track this via `skipped_deps` + * @type {null | Value[]} + */ + let new_deps = null; + + let skipped_deps = 0; + + /** + * Tracks writes that the effect it's executed in doesn't listen to yet, + * so that the dependency can be added to the effect later on if it then reads it + * @type {null | Source[]} + */ + let untracked_writes = null; + + /** @param {null | Source[]} value */ + function set_untracked_writes(value) { + untracked_writes = value; + } + + /** + * @type {number} Used by sources and deriveds for handling updates. + * Version starts from 1 so that unowned deriveds differentiate between a created effect and a run one for tracing + **/ + let write_version = 1; + + /** @type {number} Used to version each read of a source of derived to avoid duplicating depedencies inside a reaction */ + let read_version = 0; + + // If we are working with a get() chain that has no active container, + // to prevent memory leaks, we skip adding the reaction. + let skip_reaction = false; + + function increment_write_version() { + return ++write_version; + } + + /** + * Determines whether a derived or effect is dirty. + * If it is MAYBE_DIRTY, will set the status to CLEAN + * @param {Reaction} reaction + * @returns {boolean} + */ + function check_dirtiness(reaction) { + var flags = reaction.f; + + if ((flags & DIRTY) !== 0) { + return true; + } + + if ((flags & MAYBE_DIRTY) !== 0) { + var dependencies = reaction.deps; + var is_unowned = (flags & UNOWNED) !== 0; + + if (dependencies !== null) { + var i; + var dependency; + var is_disconnected = (flags & DISCONNECTED) !== 0; + var is_unowned_connected = is_unowned && active_effect !== null && !skip_reaction; + var length = dependencies.length; + + // If we are working with a disconnected or an unowned signal that is now connected (due to an active effect) + // then we need to re-connect the reaction to the dependency + if (is_disconnected || is_unowned_connected) { + var derived = /** @type {Derived} */ (reaction); + var parent = derived.parent; + + for (i = 0; i < length; i++) { + dependency = dependencies[i]; + + // We always re-add all reactions (even duplicates) if the derived was + // previously disconnected, however we don't if it was unowned as we + // de-duplicate dependencies in that case + if (is_disconnected || !dependency?.reactions?.includes(derived)) { + (dependency.reactions ??= []).push(derived); + } + } + + if (is_disconnected) { + derived.f ^= DISCONNECTED; + } + // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent + // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned + // flag + if (is_unowned_connected && parent !== null && (parent.f & UNOWNED) === 0) { + derived.f ^= UNOWNED; + } + } + + for (i = 0; i < length; i++) { + dependency = dependencies[i]; + + if (check_dirtiness(/** @type {Derived} */ (dependency))) { + update_derived(/** @type {Derived} */ (dependency)); + } + + if (dependency.wv > reaction.wv) { + return true; + } + } + } + + // Unowned signals should never be marked as clean unless they + // are used within an active_effect without skip_reaction + if (!is_unowned || (active_effect !== null && !skip_reaction)) { + set_signal_status(reaction, CLEAN); + } + } + + return false; + } + + /** + * @param {unknown} error + * @param {Effect} effect + */ + function propagate_error(error, effect) { + /** @type {Effect | null} */ + var current = effect; + + while (current !== null) { + if ((current.f & BOUNDARY_EFFECT) !== 0) { + try { + // @ts-expect-error + current.fn(error); + return; + } catch { + // Remove boundary flag from effect + current.f ^= BOUNDARY_EFFECT; + } + } + + current = current.parent; + } + + is_throwing_error = false; + throw error; + } + + /** + * @param {Effect} effect + */ + function should_rethrow_error(effect) { + return ( + (effect.f & DESTROYED) === 0 && + (effect.parent === null || (effect.parent.f & BOUNDARY_EFFECT) === 0) + ); + } + + /** + * @param {unknown} error + * @param {Effect} effect + * @param {Effect | null} previous_effect + * @param {ComponentContext | null} component_context + */ + function handle_error(error, effect, previous_effect, component_context) { + if (is_throwing_error) { + if (previous_effect === null) { + is_throwing_error = false; + } + + if (should_rethrow_error(effect)) { + throw error; + } + + return; + } + + if (previous_effect !== null) { + is_throwing_error = true; + } + + propagate_error(error, effect); + + if (should_rethrow_error(effect)) { + throw error; + } + } + + /** + * @param {Value} signal + * @param {Effect} effect + * @param {boolean} [root] + */ + function schedule_possible_effect_self_invalidation(signal, effect, root = true) { + var reactions = signal.reactions; + if (reactions === null) return; + + for (var i = 0; i < reactions.length; i++) { + var reaction = reactions[i]; + + if (reaction_sources?.includes(signal)) continue; + + if ((reaction.f & DERIVED) !== 0) { + schedule_possible_effect_self_invalidation(/** @type {Derived} */ (reaction), effect, false); + } else if (effect === reaction) { + if (root) { + set_signal_status(reaction, DIRTY); + } else if ((reaction.f & CLEAN) !== 0) { + set_signal_status(reaction, MAYBE_DIRTY); + } + schedule_effect(/** @type {Effect} */ (reaction)); + } + } + } + + /** + * @template V + * @param {Reaction} reaction + * @returns {V} + */ + function update_reaction(reaction) { + var previous_deps = new_deps; + var previous_skipped_deps = skipped_deps; + var previous_untracked_writes = untracked_writes; + var previous_reaction = active_reaction; + var previous_skip_reaction = skip_reaction; + var previous_reaction_sources = reaction_sources; + var previous_component_context = component_context; + var previous_untracking = untracking; + + var flags = reaction.f; + + new_deps = /** @type {null | Value[]} */ (null); + skipped_deps = 0; + untracked_writes = null; + skip_reaction = + (flags & UNOWNED) !== 0 && (untracking || !is_updating_effect || active_reaction === null); + active_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; + + reaction_sources = null; + set_component_context(reaction.ctx); + untracking = false; + read_version++; + + reaction.f |= EFFECT_IS_UPDATING; + + try { + var result = /** @type {Function} */ (0, reaction.fn)(); + var deps = reaction.deps; + + if (new_deps !== null) { + var i; + + remove_reactions(reaction, skipped_deps); + + if (deps !== null && skipped_deps > 0) { + deps.length = skipped_deps + new_deps.length; + for (i = 0; i < new_deps.length; i++) { + deps[skipped_deps + i] = new_deps[i]; + } + } else { + reaction.deps = deps = new_deps; + } + + if (!skip_reaction) { + for (i = skipped_deps; i < deps.length; i++) { + (deps[i].reactions ??= []).push(reaction); + } + } + } else if (deps !== null && skipped_deps < deps.length) { + remove_reactions(reaction, skipped_deps); + deps.length = skipped_deps; + } + + // If we're inside an effect and we have untracked writes, then we need to + // ensure that if any of those untracked writes result in re-invalidation + // of the current effect, then that happens accordingly + if ( + is_runes() && + untracked_writes !== null && + !untracking && + deps !== null && + (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0 + ) { + for (i = 0; i < /** @type {Source[]} */ (untracked_writes).length; i++) { + schedule_possible_effect_self_invalidation( + untracked_writes[i], + /** @type {Effect} */ (reaction) + ); + } + } + + // If we are returning to an previous reaction then + // we need to increment the read version to ensure that + // any dependencies in this reaction aren't marked with + // the same version + if (previous_reaction !== null && previous_reaction !== reaction) { + read_version++; + + if (untracked_writes !== null) { + if (previous_untracked_writes === null) { + previous_untracked_writes = untracked_writes; + } else { + previous_untracked_writes.push(.../** @type {Source[]} */ (untracked_writes)); + } + } + } + + return result; + } finally { + new_deps = previous_deps; + skipped_deps = previous_skipped_deps; + untracked_writes = previous_untracked_writes; + active_reaction = previous_reaction; + skip_reaction = previous_skip_reaction; + reaction_sources = previous_reaction_sources; + set_component_context(previous_component_context); + untracking = previous_untracking; + + reaction.f ^= EFFECT_IS_UPDATING; + } + } + + /** + * @template V + * @param {Reaction} signal + * @param {Value} dependency + * @returns {void} + */ + function remove_reaction(signal, dependency) { + let reactions = dependency.reactions; + if (reactions !== null) { + var index = index_of.call(reactions, signal); + if (index !== -1) { + var new_length = reactions.length - 1; + if (new_length === 0) { + reactions = dependency.reactions = null; + } else { + // Swap with last element and then remove. + reactions[index] = reactions[new_length]; + reactions.pop(); + } + } + } + // If the derived has no reactions, then we can disconnect it from the graph, + // allowing it to either reconnect in the future, or be GC'd by the VM. + if ( + reactions === null && + (dependency.f & DERIVED) !== 0 && + // Destroying a child effect while updating a parent effect can cause a dependency to appear + // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` + // allows us to skip the expensive work of disconnecting and immediately reconnecting it + (new_deps === null || !new_deps.includes(dependency)) + ) { + set_signal_status(dependency, MAYBE_DIRTY); + // If we are working with a derived that is owned by an effect, then mark it as being + // disconnected. + if ((dependency.f & (UNOWNED | DISCONNECTED)) === 0) { + dependency.f ^= DISCONNECTED; + } + // Disconnect any reactions owned by this reaction + destroy_derived_effects(/** @type {Derived} **/ (dependency)); + remove_reactions(/** @type {Derived} **/ (dependency), 0); + } + } + + /** + * @param {Reaction} signal + * @param {number} start_index + * @returns {void} + */ + function remove_reactions(signal, start_index) { + var dependencies = signal.deps; + if (dependencies === null) return; + + for (var i = start_index; i < dependencies.length; i++) { + remove_reaction(signal, dependencies[i]); + } + } + + /** + * @param {Effect} effect + * @returns {void} + */ + function update_effect(effect) { + var flags = effect.f; + + if ((flags & DESTROYED) !== 0) { + return; + } + + set_signal_status(effect, CLEAN); + + var previous_effect = active_effect; + var previous_component_context = component_context; + var was_updating_effect = is_updating_effect; + + active_effect = effect; + is_updating_effect = true; + + try { + if ((flags & BLOCK_EFFECT) !== 0) { + destroy_block_effect_children(effect); + } else { + destroy_effect_children(effect); + } + + execute_effect_teardown(effect); + var teardown = update_reaction(effect); + effect.teardown = typeof teardown === 'function' ? teardown : null; + effect.wv = write_version; + + var deps = effect.deps; + + // In DEV, we need to handle a case where $inspect.trace() might + // incorrectly state a source dependency has not changed when it has. + // That's beacuse that source was changed by the same effect, causing + // the versions to match. We can avoid this by incrementing the version + var dep; if (DEV && tracing_mode_flag && (effect.f & DIRTY) !== 0 && deps !== null) ; + + if (DEV) ; + } catch (error) { + handle_error(error, effect, previous_effect, previous_component_context || effect.ctx); + } finally { + is_updating_effect = was_updating_effect; + active_effect = previous_effect; + } + } + + function infinite_loop_guard() { + try { + effect_update_depth_exceeded(); + } catch (error) { + // Try and handle the error so it can be caught at a boundary, that's + // if there's an effect available from when it was last scheduled + if (last_scheduled_effect !== null) { + { + handle_error(error, last_scheduled_effect, null); + } + } else { + throw error; + } + } + } + + function flush_queued_root_effects() { + var was_updating_effect = is_updating_effect; + + try { + var flush_count = 0; + is_updating_effect = true; + + while (queued_root_effects.length > 0) { + if (flush_count++ > 1000) { + infinite_loop_guard(); + } + + var root_effects = queued_root_effects; + var length = root_effects.length; + + queued_root_effects = []; + + for (var i = 0; i < length; i++) { + var collected_effects = process_effects(root_effects[i]); + flush_queued_effects(collected_effects); + } + old_values.clear(); + } + } finally { + is_flushing = false; + is_updating_effect = was_updating_effect; + + last_scheduled_effect = null; + } + } + + /** + * @param {Array} effects + * @returns {void} + */ + function flush_queued_effects(effects) { + var length = effects.length; + if (length === 0) return; + + for (var i = 0; i < length; i++) { + var effect = effects[i]; + + if ((effect.f & (DESTROYED | INERT)) === 0) { + try { + if (check_dirtiness(effect)) { + update_effect(effect); + + // Effects with no dependencies or teardown do not get added to the effect tree. + // Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we + // don't know if we need to keep them until they are executed. Doing the check + // here (rather than in `update_effect`) allows us to skip the work for + // immediate effects. + if (effect.deps === null && effect.first === null && effect.nodes_start === null) { + if (effect.teardown === null) { + // remove this effect from the graph + unlink_effect(effect); + } else { + // keep the effect in the graph, but free up some memory + effect.fn = null; + } + } + } + } catch (error) { + handle_error(error, effect, null, effect.ctx); + } + } + } + } + + /** + * @param {Effect} signal + * @returns {void} + */ + function schedule_effect(signal) { + if (!is_flushing) { + is_flushing = true; + queueMicrotask(flush_queued_root_effects); + } + + var effect = (last_scheduled_effect = signal); + + while (effect.parent !== null) { + effect = effect.parent; + var flags = effect.f; + + if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { + if ((flags & CLEAN) === 0) return; + effect.f ^= CLEAN; + } + } + + queued_root_effects.push(effect); + } + + /** + * + * This function both runs render effects and collects user effects in topological order + * from the starting effect passed in. Effects will be collected when they match the filtered + * bitwise flag passed in only. The collected effects array will be populated with all the user + * effects to be flushed. + * + * @param {Effect} root + * @returns {Effect[]} + */ + function process_effects(root) { + /** @type {Effect[]} */ + var effects = []; + + /** @type {Effect | null} */ + var effect = root; + + while (effect !== null) { + var flags = effect.f; + var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0; + var is_skippable_branch = is_branch && (flags & CLEAN) !== 0; + + if (!is_skippable_branch && (flags & INERT) === 0) { + if ((flags & EFFECT) !== 0) { + effects.push(effect); + } else if (is_branch) { + effect.f ^= CLEAN; + } else { + try { + if (check_dirtiness(effect)) { + update_effect(effect); + } + } catch (error) { + handle_error(error, effect, null, effect.ctx); + } + } + + /** @type {Effect | null} */ + var child = effect.first; + + if (child !== null) { + effect = child; + continue; + } + } + + var parent = effect.parent; + effect = effect.next; + + while (effect === null && parent !== null) { + effect = parent.next; + parent = parent.parent; + } + } + + return effects; + } + + /** + * Synchronously flush any pending updates. + * Returns void if no callback is provided, otherwise returns the result of calling the callback. + * @template [T=void] + * @param {(() => T) | undefined} [fn] + * @returns {T} + */ + function flushSync(fn) { + var result; + + while (true) { + flush_tasks(); + + if (queued_root_effects.length === 0) { + return /** @type {T} */ (result); + } + + is_flushing = true; + flush_queued_root_effects(); + } + } + + /** + * @template V + * @param {Value} signal + * @returns {V} + */ + function get(signal) { + var flags = signal.f; + var is_derived = (flags & DERIVED) !== 0; + + // Register the dependency on the current reaction signal. + if (active_reaction !== null && !untracking) { + if (!reaction_sources?.includes(signal)) { + var deps = active_reaction.deps; + if (signal.rv < read_version) { + signal.rv = read_version; + // If the signal is accessing the same dependencies in the same + // order as it did last time, increment `skipped_deps` + // rather than updating `new_deps`, which creates GC cost + if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { + skipped_deps++; + } else if (new_deps === null) { + new_deps = [signal]; + } else if (!skip_reaction || !new_deps.includes(signal)) { + // Normally we can push duplicated dependencies to `new_deps`, but if we're inside + // an unowned derived because skip_reaction is true, then we need to ensure that + // we don't have duplicates + new_deps.push(signal); + } + } + } + } else if ( + is_derived && + /** @type {Derived} */ (signal).deps === null && + /** @type {Derived} */ (signal).effects === null + ) { + var derived = /** @type {Derived} */ (signal); + var parent = derived.parent; + + if (parent !== null && (parent.f & UNOWNED) === 0) { + // If the derived is owned by another derived then mark it as unowned + // as the derived value might have been referenced in a different context + // since and thus its parent might not be its true owner anymore + derived.f ^= UNOWNED; + } + } + + if (is_derived) { + derived = /** @type {Derived} */ (signal); + + if (check_dirtiness(derived)) { + update_derived(derived); + } + } + + if (is_destroying_effect && old_values.has(signal)) { + return old_values.get(signal); + } + + return signal.v; + } + + /** + * When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect), + * any state read inside `fn` will not be treated as a dependency. + * + * ```ts + * $effect(() => { + * // this will run when `data` changes, but not when `time` changes + * save(data, { + * timestamp: untrack(() => time) + * }); + * }); + * ``` + * @template T + * @param {() => T} fn + * @returns {T} + */ + function untrack(fn) { + var previous_untracking = untracking; + try { + untracking = true; + return fn(); + } finally { + untracking = previous_untracking; + } + } + + const STATUS_MASK = -7169; + + /** + * @param {Signal} signal + * @param {number} status + * @returns {void} + */ + function set_signal_status(signal, status) { + signal.f = (signal.f & STATUS_MASK) | status; + } + + /** + * Possibly traverse an object and read all its properties so that they're all reactive in case this is `$state`. + * Does only check first level of an object for performance reasons (heuristic should be good for 99% of all cases). + * @param {any} value + * @returns {void} + */ + function deep_read_state(value) { + if (typeof value !== 'object' || !value || value instanceof EventTarget) { + return; + } + + if (STATE_SYMBOL in value) { + deep_read(value); + } else if (!Array.isArray(value)) { + for (let key in value) { + const prop = value[key]; + if (typeof prop === 'object' && prop && STATE_SYMBOL in prop) { + deep_read(prop); + } + } + } + } + + /** + * Deeply traverse an object and read all its properties + * so that they're all reactive in case this is `$state` + * @param {any} value + * @param {Set} visited + * @returns {void} + */ + function deep_read(value, visited = new Set()) { + if ( + typeof value === 'object' && + value !== null && + // We don't want to traverse DOM elements + !(value instanceof EventTarget) && + !visited.has(value) + ) { + visited.add(value); + // When working with a possible SvelteDate, this + // will ensure we capture changes to it. + if (value instanceof Date) { + value.getTime(); + } + for (let key in value) { + try { + deep_read(value[key], visited); + } catch (e) { + // continue + } + } + const proto = get_prototype_of(value); + if ( + proto !== Object.prototype && + proto !== Array.prototype && + proto !== Map.prototype && + proto !== Set.prototype && + proto !== Date.prototype + ) { + const descriptors = get_descriptors(proto); + for (let key in descriptors) { + const get = descriptors[key].get; + if (get) { + try { + get.call(value); + } catch (e) { + // continue + } + } + } + } + } + } + + /** @param {string} html */ + function create_fragment_from_html(html) { + var elem = document.createElement('template'); + elem.innerHTML = html.replaceAll('', ''); // XHTML compliance + return elem.content; + } + + /** @import { Effect, TemplateNode } from '#client' */ + /** @import { TemplateStructure } from './types' */ + + /** + * @param {TemplateNode} start + * @param {TemplateNode | null} end + */ + function assign_nodes(start, end) { + var effect = /** @type {Effect} */ (active_effect); + if (effect.nodes_start === null) { + effect.nodes_start = start; + effect.nodes_end = end; + } + } + + /** + * @param {string} content + * @param {number} flags + * @returns {() => Node | Node[]} + */ + /*#__NO_SIDE_EFFECTS__*/ + function from_html(content, flags) { + var is_fragment = (flags & TEMPLATE_FRAGMENT) !== 0; + var use_import_node = (flags & TEMPLATE_USE_IMPORT_NODE) !== 0; + + /** @type {Node} */ + var node; + + /** + * Whether or not the first item is a text/element node. If not, we need to + * create an additional comment node to act as `effect.nodes.start` + */ + var has_start = !content.startsWith(''); + + return () => { + + if (node === undefined) { + node = create_fragment_from_html(has_start ? content : '' + content); + if (!is_fragment) node = /** @type {Node} */ (get_first_child(node)); + } + + var clone = /** @type {TemplateNode} */ ( + use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true) + ); + + if (is_fragment) { + var start = /** @type {TemplateNode} */ (get_first_child(clone)); + var end = /** @type {TemplateNode} */ (clone.lastChild); + + assign_nodes(start, end); + } else { + assign_nodes(clone, clone); + } + + return clone; + }; + } + + function comment() { + + var frag = document.createDocumentFragment(); + var start = document.createComment(''); + var anchor = create_text(); + frag.append(start, anchor); + + assign_nodes(start, anchor); + + return frag; + } + + /** + * Assign the created (or in hydration mode, traversed) dom elements to the current block + * and insert the elements into the dom (in client mode). + * @param {Text | Comment | Element} anchor + * @param {DocumentFragment | Element} dom + */ + function append(anchor, dom) { + + if (anchor === null) { + // edge case — void `` with content + return; + } + + anchor.before(/** @type {Node} */ (dom)); + } + + /** @import { ComponentContext, Effect, TemplateNode } from '#client' */ + /** @import { Component, ComponentType, SvelteComponent, MountOptions } from '../../index.js' */ + + /** + * @param {Element} text + * @param {string} value + * @returns {void} + */ + function set_text(text, value) { + // For objects, we apply string coercion (which might make things like $state array references in the template reactive) before diffing + var str = value == null ? '' : typeof value === 'object' ? value + '' : value; + // @ts-expect-error + if (str !== (text.__t ??= text.nodeValue)) { + // @ts-expect-error + text.__t = str; + text.nodeValue = str + ''; + } + } + + /** @import { Effect, Source, TemplateNode } from '#client' */ + + const PENDING = 0; + const THEN = 1; + const CATCH = 2; + + /** + * @template V + * @param {TemplateNode} node + * @param {(() => Promise)} get_input + * @param {null | ((anchor: Node) => void)} pending_fn + * @param {null | ((anchor: Node, value: Source) => void)} then_fn + * @param {null | ((anchor: Node, error: unknown) => void)} catch_fn + * @returns {void} + */ + function await_block(node, get_input, pending_fn, then_fn, catch_fn) { + + var anchor = node; + var runes = is_runes(); + var active_component_context = component_context; + + /** @type {V | Promise | typeof UNINITIALIZED} */ + var input = UNINITIALIZED; + + /** @type {Effect | null} */ + var pending_effect; + + /** @type {Effect | null} */ + var then_effect; + + /** @type {Effect | null} */ + var catch_effect; + + var input_source = (runes ? source : mutable_source)(/** @type {V} */ (undefined)); + var error_source = (runes ? source : mutable_source)(undefined); + var resolved = false; + + /** + * @param {PENDING | THEN | CATCH} state + * @param {boolean} restore + */ + function update(state, restore) { + resolved = true; + + if (restore) { + set_active_effect(effect); + set_active_reaction(effect); // TODO do we need both? + set_component_context(active_component_context); + } + + try { + if (state === PENDING && pending_fn) { + if (pending_effect) resume_effect(pending_effect); + else pending_effect = branch(() => pending_fn(anchor)); + } + + if (state === THEN && then_fn) { + if (then_effect) resume_effect(then_effect); + else then_effect = branch(() => then_fn(anchor, input_source)); + } + + if (state === CATCH && catch_fn) { + if (catch_effect) resume_effect(catch_effect); + else catch_effect = branch(() => catch_fn(anchor, error_source)); + } + + if (state !== PENDING && pending_effect) { + pause_effect(pending_effect, () => (pending_effect = null)); + } + + if (state !== THEN && then_effect) { + pause_effect(then_effect, () => (then_effect = null)); + } + + if (state !== CATCH && catch_effect) { + pause_effect(catch_effect, () => (catch_effect = null)); + } + } finally { + if (restore) { + set_component_context(null); + set_active_reaction(null); + set_active_effect(null); + + // without this, the DOM does not update until two ticks after the promise + // resolves, which is unexpected behaviour (and somewhat irksome to test) + flushSync(); + } + } + } + + var effect = block(() => { + if (input === (input = get_input())) return; + + if (is_promise(input)) { + var promise = input; + + resolved = false; + + promise.then( + (value) => { + if (promise !== input) return; + // we technically could use `set` here since it's on the next microtick + // but let's use internal_set for consistency and just to be safe + internal_set(input_source, value); + update(THEN, true); + }, + (error) => { + if (promise !== input) return; + // we technically could use `set` here since it's on the next microtick + // but let's use internal_set for consistency and just to be safe + internal_set(error_source, error); + update(CATCH, true); + if (!catch_fn) { + // Rethrow the error if no catch block exists + throw error_source.v; + } + } + ); + + { + // Wait a microtask before checking if we should show the pending state as + // the promise might have resolved by the next microtask. + queue_micro_task(() => { + if (!resolved) update(PENDING, true); + }); + } + } else { + internal_set(input_source, input); + update(THEN, false); + } + + // Set the input to something else, in order to disable the promise callbacks + return () => (input = UNINITIALIZED); + }); + } + + /** @import { Effect, TemplateNode } from '#client' */ + + /** + * @param {TemplateNode} node + * @param {(branch: (fn: (anchor: Node, elseif?: [number,number]) => void, flag?: boolean) => void) => void} fn + * @param {[number,number]} [elseif] + * @returns {void} + */ + function if_block(node, fn, [root_index, hydrate_index] = [0, 0]) { + + var anchor = node; + + /** @type {Effect | null} */ + var consequent_effect = null; + + /** @type {Effect | null} */ + var alternate_effect = null; + + /** @type {UNINITIALIZED | boolean | null} */ + var condition = UNINITIALIZED; + + var flags = root_index > 0 ? EFFECT_TRANSPARENT : 0; + + var has_branch = false; + + const set_branch = ( + /** @type {(anchor: Node, elseif?: [number,number]) => void} */ fn, + flag = true + ) => { + has_branch = true; + update_branch(flag, fn); + }; + + const update_branch = ( + /** @type {boolean | null} */ new_condition, + /** @type {null | ((anchor: Node, elseif?: [number,number]) => void)} */ fn + ) => { + if (condition === (condition = new_condition)) return; + + if (condition) { + if (consequent_effect) { + resume_effect(consequent_effect); + } else if (fn) { + consequent_effect = branch(() => fn(anchor)); + } + + if (alternate_effect) { + pause_effect(alternate_effect, () => { + alternate_effect = null; + }); + } + } else { + if (alternate_effect) { + resume_effect(alternate_effect); + } else if (fn) { + alternate_effect = branch(() => fn(anchor, [root_index + 1, hydrate_index])); + } + + if (consequent_effect) { + pause_effect(consequent_effect, () => { + consequent_effect = null; + }); + } + } + }; + + block(() => { + has_branch = false; + fn(set_branch); + if (!has_branch) { + update_branch(null, null); + } + }, flags); + } + + /** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */ + + /** + * @param {any} _ + * @param {number} i + */ + function index(_, i) { + return i; + } + + /** + * Pause multiple effects simultaneously, and coordinate their + * subsequent destruction. Used in each blocks + * @param {EachState} state + * @param {EachItem[]} items + * @param {null | Node} controlled_anchor + * @param {Map} items_map + */ + function pause_effects(state, items, controlled_anchor, items_map) { + /** @type {TransitionManager[]} */ + var transitions = []; + var length = items.length; + + for (var i = 0; i < length; i++) { + pause_children(items[i].e, transitions, true); + } + + var is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null; + // If we have a controlled anchor, it means that the each block is inside a single + // DOM element, so we can apply a fast-path for clearing the contents of the element. + if (is_controlled) { + var parent_node = /** @type {Element} */ ( + /** @type {Element} */ (controlled_anchor).parentNode + ); + clear_text_content(parent_node); + parent_node.append(/** @type {Element} */ (controlled_anchor)); + items_map.clear(); + link(state, items[0].prev, items[length - 1].next); + } + + run_out_transitions(transitions, () => { + for (var i = 0; i < length; i++) { + var item = items[i]; + if (!is_controlled) { + items_map.delete(item.k); + link(state, item.prev, item.next); + } + destroy_effect(item.e, !is_controlled); + } + }); + } + + /** + * @template V + * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block + * @param {number} flags + * @param {() => V[]} get_collection + * @param {(value: V, index: number) => any} get_key + * @param {(anchor: Node, item: MaybeSource, index: MaybeSource) => void} render_fn + * @param {null | ((anchor: Node) => void)} fallback_fn + * @returns {void} + */ + function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) { + var anchor = node; + + /** @type {EachState} */ + var state = { flags, items: new Map(), first: null }; + + /** @type {Effect | null} */ + var fallback = null; + + var was_empty = false; + + // TODO: ideally we could use derived for runes mode but because of the ability + // to use a store which can be mutated, we can't do that here as mutating a store + // will still result in the collection array being the same from the store + var each_array = derived_safe_equal(() => { + var collection = get_collection(); + + return is_array(collection) ? collection : collection == null ? [] : array_from(collection); + }); + + block(() => { + var array = get(each_array); + var length = array.length; + + if (was_empty && length === 0) { + // ignore updates if the array is empty, + // and it already was empty on previous run + return; + } + was_empty = length === 0; + + { + reconcile(array, state, anchor, render_fn, flags, get_key, get_collection); + } + + if (fallback_fn !== null) { + if (length === 0) { + if (fallback) { + resume_effect(fallback); + } else { + fallback = branch(() => fallback_fn(anchor)); + } + } else if (fallback !== null) { + pause_effect(fallback, () => { + fallback = null; + }); + } + } + + // When we mount the each block for the first time, the collection won't be + // connected to this effect as the effect hasn't finished running yet and its deps + // won't be assigned. However, it's possible that when reconciling the each block + // that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the + // collection again can provide consistency to the reactive graph again as the deriveds + // will now be `CLEAN`. + get(each_array); + }); + } + + /** + * Add, remove, or reorder items output by an each block as its input changes + * @template V + * @param {Array} array + * @param {EachState} state + * @param {Element | Comment | Text} anchor + * @param {(anchor: Node, item: MaybeSource, index: number | Source, collection: () => V[]) => void} render_fn + * @param {number} flags + * @param {(value: V, index: number) => any} get_key + * @param {() => V[]} get_collection + * @returns {void} + */ + function reconcile(array, state, anchor, render_fn, flags, get_key, get_collection) { + + var length = array.length; + var items = state.items; + var first = state.first; + var current = first; + + /** @type {undefined | Set} */ + var seen; + + /** @type {EachItem | null} */ + var prev = null; + + /** @type {EachItem[]} */ + var matched = []; + + /** @type {EachItem[]} */ + var stashed = []; + + /** @type {V} */ + var value; + + /** @type {any} */ + var key; + + /** @type {EachItem | undefined} */ + var item; + + /** @type {number} */ + var i; + + for (i = 0; i < length; i += 1) { + value = array[i]; + key = get_key(value, i); + item = items.get(key); + + if (item === undefined) { + var child_anchor = current ? /** @type {TemplateNode} */ (current.e.nodes_start) : anchor; + + prev = create_item( + child_anchor, + state, + prev, + prev === null ? state.first : prev.next, + value, + key, + i, + render_fn, + flags, + get_collection + ); + + items.set(key, prev); + + matched = []; + stashed = []; + + current = prev.next; + continue; + } + + { + update_item(item, value, i); + } + + if ((item.e.f & INERT) !== 0) { + resume_effect(item.e); + } + + if (item !== current) { + if (seen !== undefined && seen.has(item)) { + if (matched.length < stashed.length) { + // more efficient to move later items to the front + var start = stashed[0]; + var j; + + prev = start.prev; + + var a = matched[0]; + var b = matched[matched.length - 1]; + + for (j = 0; j < matched.length; j += 1) { + move(matched[j], start, anchor); + } + + for (j = 0; j < stashed.length; j += 1) { + seen.delete(stashed[j]); + } + + link(state, a.prev, b.next); + link(state, prev, a); + link(state, b, start); + + current = start; + prev = b; + i -= 1; + + matched = []; + stashed = []; + } else { + // more efficient to move earlier items to the back + seen.delete(item); + move(item, current, anchor); + + link(state, item.prev, item.next); + link(state, item, prev === null ? state.first : prev.next); + link(state, prev, item); + + prev = item; + } + + continue; + } + + matched = []; + stashed = []; + + while (current !== null && current.k !== key) { + // If the each block isn't inert and an item has an effect that is already inert, + // skip over adding it to our seen Set as the item is already being handled + if ((current.e.f & INERT) === 0) { + (seen ??= new Set()).add(current); + } + stashed.push(current); + current = current.next; + } + + if (current === null) { + continue; + } + + item = current; + } + + matched.push(item); + prev = item; + current = item.next; + } + + if (current !== null || seen !== undefined) { + var to_destroy = seen === undefined ? [] : array_from(seen); + + while (current !== null) { + // If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished + if ((current.e.f & INERT) === 0) { + to_destroy.push(current); + } + current = current.next; + } + + var destroy_length = to_destroy.length; + + if (destroy_length > 0) { + var controlled_anchor = null; + + pause_effects(state, to_destroy, controlled_anchor, items); + } + } + + /** @type {Effect} */ (active_effect).first = state.first && state.first.e; + /** @type {Effect} */ (active_effect).last = prev && prev.e; + } + + /** + * @param {EachItem} item + * @param {any} value + * @param {number} index + * @param {number} type + * @returns {void} + */ + function update_item(item, value, index, type) { + { + internal_set(item.v, value); + } + + { + item.i = index; + } + } + + /** + * @template V + * @param {Node} anchor + * @param {EachState} state + * @param {EachItem | null} prev + * @param {EachItem | null} next + * @param {V} value + * @param {unknown} key + * @param {number} index + * @param {(anchor: Node, item: V | Source, index: number | Value, collection: () => V[]) => void} render_fn + * @param {number} flags + * @param {() => V[]} get_collection + * @returns {EachItem} + */ + function create_item( + anchor, + state, + prev, + next, + value, + key, + index, + render_fn, + flags, + get_collection + ) { + var reactive = (flags & EACH_ITEM_REACTIVE) !== 0; + var mutable = (flags & EACH_ITEM_IMMUTABLE) === 0; + + var v = reactive ? (mutable ? mutable_source(value) : source(value)) : value; + var i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index); + + /** @type {EachItem} */ + var item = { + i, + v, + k: key, + a: null, + // @ts-expect-error + e: null, + prev, + next + }; + + try { + item.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating); + + item.e.prev = prev && prev.e; + item.e.next = next && next.e; + + if (prev === null) { + state.first = item; + } else { + prev.next = item; + prev.e.next = item.e; + } + + if (next !== null) { + next.prev = item; + next.e.prev = item.e; + } + + return item; + } finally { + } + } + + /** + * @param {EachItem} item + * @param {EachItem | null} next + * @param {Text | Element | Comment} anchor + */ + function move(item, next, anchor) { + var end = item.next ? /** @type {TemplateNode} */ (item.next.e.nodes_start) : anchor; + + var dest = next ? /** @type {TemplateNode} */ (next.e.nodes_start) : anchor; + var node = /** @type {TemplateNode} */ (item.e.nodes_start); + + while (node !== end) { + var next_node = /** @type {TemplateNode} */ (get_next_sibling(node)); + dest.before(node); + node = next_node; + } + } + + /** + * @param {EachState} state + * @param {EachItem | null} prev + * @param {EachItem | null} next + */ + function link(state, prev, next) { + if (prev === null) { + state.first = next; + } else { + prev.next = next; + prev.e.next = next && next.e; + } + + if (next !== null) { + next.prev = prev; + next.e.prev = prev && prev.e; + } + } + + /** @import { ComponentContextLegacy } from '#client' */ + + /** + * Legacy-mode only: Call `onMount` callbacks and set up `beforeUpdate`/`afterUpdate` effects + * @param {boolean} [immutable] + */ + function init(immutable = false) { + const context = /** @type {ComponentContextLegacy} */ (component_context); + + const callbacks = context.l.u; + if (!callbacks) return; + + let props = () => deep_read_state(context.s); + + if (immutable) { + let version = 0; + let prev = /** @type {Record} */ ({}); + + // In legacy immutable mode, before/afterUpdate only fire if the object identity of a prop changes + const d = derived(() => { + let changed = false; + const props = context.s; + for (const key in props) { + if (props[key] !== prev[key]) { + prev[key] = props[key]; + changed = true; + } + } + if (changed) version++; + return version; + }); + + props = () => get(d); + } + + // beforeUpdate + if (callbacks.b.length) { + user_pre_effect(() => { + observe_all(context, props); + run_all(callbacks.b); + }); + } + + // onMount (must run before afterUpdate) + user_effect(() => { + const fns = untrack(() => callbacks.m.map(run)); + return () => { + for (const fn of fns) { + if (typeof fn === 'function') { + fn(); + } + } + }; + }); + + // afterUpdate + if (callbacks.a.length) { + user_effect(() => { + observe_all(context, props); + run_all(callbacks.a); + }); + } + } + + /** + * Invoke the getter of all signals associated with a component + * so they can be registered to the effect this function is called in. + * @param {ComponentContextLegacy} context + * @param {(() => void)} props + */ + function observe_all(context, props) { + if (context.l.s) { + for (const signal of context.l.s) get(signal); + } + + props(); + } + + var root_1$8 = from_html(`

Left data is null

`); + var root_2$2 = from_html(`
  • `); + + function Left($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$8(); + + append($$anchor, p); + }; + + var alternate = ($$anchor) => { + var li = root_2$2(); + var text = child(li); + template_effect(() => set_text(text, `Left: ${$$props.data.RelativePath ?? ''} - ${$$props.data.Size ?? ''} - ${$$props.data.Ticks ?? ''}`)); + append($$anchor, li); + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$7 = from_html(`

    Right data is null

    `); + var root_2$1 = from_html(`
  • `); + + function Right($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$7(); + + append($$anchor, p); + }; + + var alternate = ($$anchor) => { + var li = root_2$1(); + var text = child(li); + template_effect(() => set_text(text, `Right: ${$$props.data.RelativePath ?? ''} - ${$$props.data.Size ?? ''} - ${$$props.data.Ticks ?? ''}`)); + append($$anchor, li); + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$6 = from_html(`

    AreEqual data is null

    `); + var root_3$7 = from_html(`

    AreEqual data is empty

    `); + var root_5$7 = from_html(`AreEqual: `, 1); + + function AreEqual($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$6(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$7(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$7(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$5 = from_html(`

    LeftSideIsNewer data is null

    `); + var root_3$6 = from_html(`

    LeftSideIsNewer data is empty

    `); + var root_5$6 = from_html(`LeftSideIsNewer: `, 1); + + function LeftSideIsNewer($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$5(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$6(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$6(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$4 = from_html(`

    LeftSideOnly data is null

    `); + var root_3$5 = from_html(`

    LeftSideOnly data is empty

    `); + var root_5$5 = from_html(`LeftSideOnly: `, 1); + + function LeftSideOnly($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$4(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$5(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$5(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$3 = from_html(`

    NotEqualBut data is null

    `); + var root_3$4 = from_html(`

    NotEqualBut data is empty

    `); + var root_5$4 = from_html(`NotEqualBut: `, 1); + + function NotEqualBut($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$3(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$4(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$4(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$2 = from_html(`

    Records data is null

    `); + var root_3$3 = from_html(`

    Records data is empty

    `); + var root_5$3 = from_html(`
  • `); + var root_4$1 = from_html(`Records: `, 1); + + function Records($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$2(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$3(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = root_4$1(); + var node_1 = sibling(first_child(fragment_1)); + + each(node_1, 17, () => $$props.data, index, ($$anchor, record) => { + var li = root_5$3(); + var text = child(li); + template_effect(() => set_text(text, get(record).Left.Records)); + append($$anchor, li); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1$1 = from_html(`

    RightSideIsNewer data is null

    `); + var root_3$2 = from_html(`

    RightSideIsNewer data is empty

    `); + var root_5$2 = from_html(`RightSideIsNewer: `, 1); + + function RightSideIsNewer($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1$1(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$2(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$2(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_1 = from_html(`

    RightSideOnly data is null

    `); + var root_3$1 = from_html(`

    RightSideOnly data is empty

    `); + var root_5$1 = from_html(`RightSideOnly: `, 1); + + function RightSideOnly($$anchor, $$props) { + push($$props, true); + + var fragment = comment(); + var node = first_child(fragment); + + { + var consequent = ($$anchor) => { + var p = root_1(); + + append($$anchor, p); + }; + + var alternate = ($$anchor, $$elseif) => { + { + var consequent_1 = ($$anchor) => { + var p_1 = root_3$1(); + + append($$anchor, p_1); + }; + + var alternate_1 = ($$anchor) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + each(node_1, 17, () => $$props.data, index, ($$anchor, segment) => { + + var fragment_2 = root_5$1(); + var node_2 = sibling(first_child(fragment_2)); + + Left(node_2, { + get data() { + return get(segment).Left; + } + }); + + var node_3 = sibling(node_2, 2); + + Right(node_3, { + get data() { + return get(segment).Right; + } + }); + + append($$anchor, fragment_2); + }); + + append($$anchor, fragment_1); + }; + + if_block( + $$anchor, + ($$render) => { + if ($$props.data.length === 0) $$render(consequent_1); else $$render(alternate_1, false); + }, + $$elseif + ); + } + }; + + if_block(node, ($$render) => { + if (!$$props.data) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment); + pop(); + } + + var root_2 = from_html(`

    Review data is null

    `); + var root_3 = from_html(`

    Review:

    `, 1); + var root_4 = from_html(` `); + var root_5 = from_html(`waiting`); + + function Review($$anchor, $$props) { + push($$props, false); + + let promise = fetch("http://localhost:5004/api/SyncV1/?", { + method: "POST", + body: ` +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} +`, + headers: { "Content-Type": "application/json" } + }).then((x) => x.json()); + + init(); + + var fragment = comment(); + var node = first_child(fragment); + + await_block( + node, + () => promise, + ($$anchor) => { + var span_1 = root_5(); + + append($$anchor, span_1); + }, + ($$anchor, data) => { + var fragment_1 = comment(); + var node_1 = first_child(fragment_1); + + { + var consequent = ($$anchor) => { + var p = root_2(); + + append($$anchor, p); + }; + + var alternate = ($$anchor) => { + var fragment_2 = root_3(); + var node_2 = sibling(first_child(fragment_2), 2); + + AreEqual(node_2, { + get data() { + return get(data).AreEqual; + } + }); + + var node_3 = sibling(node_2, 2); + + LeftSideIsNewer(node_3, { + get data() { + return get(data).LeftSideIsNewer; + } + }); + + var node_4 = sibling(node_3, 2); + + LeftSideOnly(node_4, { + get data() { + return get(data).LeftSideOnly; + } + }); + + var node_5 = sibling(node_4, 2); + + NotEqualBut(node_5, { + get data() { + return get(data).NotEqualBut; + } + }); + + var node_6 = sibling(node_5, 2); + + Records(node_6, { + get data() { + return get(data).Records; + } + }); + + var node_7 = sibling(node_6, 2); + + RightSideIsNewer(node_7, { + get data() { + return get(data).RightSideIsNewer; + } + }); + + var node_8 = sibling(node_7, 2); + + RightSideOnly(node_8, { + get data() { + return get(data).RightSideOnly; + } + }); + + append($$anchor, fragment_2); + }; + + if_block(node_1, ($$render) => { + if (!get(data)) $$render(consequent); else $$render(alternate, false); + }); + } + + append($$anchor, fragment_1); + }, + ($$anchor, error) => { + var span = root_4(); + var text = child(span); + template_effect(() => set_text(text, get(error))); + append($$anchor, span); + } + ); + + append($$anchor, fragment); + pop(); + } + + let div = document.createElement("div"); + let script = document.currentScript; + script.parentNode.insertBefore(div, script); + + new Review({ + target: div, + props: {}, + }); + +})(); diff --git a/svelte-helper/public/example.json b/svelte-helper/public/example.json new file mode 100644 index 0000000..91eb0ce --- /dev/null +++ b/svelte-helper/public/example.json @@ -0,0 +1,21 @@ +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} \ No newline at end of file diff --git a/svelte-helper/public/vite.svg b/svelte-helper/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/svelte-helper/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svelte-helper/rollup.config.js b/svelte-helper/rollup.config.js new file mode 100644 index 0000000..5fa2d8b --- /dev/null +++ b/svelte-helper/rollup.config.js @@ -0,0 +1,21 @@ +import svelte from 'rollup-plugin-svelte'; +import postcss from 'rollup-plugin-postcss'; +import resolve from '@rollup/plugin-node-resolve'; + +export default { + input: 'src/lib/embed.js', + output: { + format: 'iife', + file: '.dist/embed-rollup.js', + sourcemap: false, + name: 'MyBundle', + }, + plugins: [ + svelte({ emitCss: false }), + postcss({ + extract: 'global.css', + minimize: false, + }), + resolve({ browser: true, dedupe: ['svelte'] }), + ], +}; diff --git a/svelte-helper/src/App.svelte b/svelte-helper/src/App.svelte new file mode 100644 index 0000000..67aaf2d --- /dev/null +++ b/svelte-helper/src/App.svelte @@ -0,0 +1,33 @@ + + +
    +
    +

    Vite + Svelte

    + +
    + +
    + +
    + +
    + +

    + Check out SvelteKit, the official Svelte app framework powered by Vite! +

    + +

    Click on the Vite and Svelte logos to learn more

    +
    + + diff --git a/svelte-helper/src/app.css b/svelte-helper/src/app.css new file mode 100644 index 0000000..b7286d5 --- /dev/null +++ b/svelte-helper/src/app.css @@ -0,0 +1,84 @@ +:root { + font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} + +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} + +button:hover { + border-color: #646cff; +} + +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + + a:hover { + color: #747bff; + } + + button { + background-color: #f9f9f9; + } +} \ No newline at end of file diff --git a/svelte-helper/src/lib/AreEqual.svelte b/svelte-helper/src/lib/AreEqual.svelte new file mode 100644 index 0000000..b4d5343 --- /dev/null +++ b/svelte-helper/src/lib/AreEqual.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    AreEqual data is null

    +{:else if data.length === 0} +

    AreEqual data is empty

    +{:else} + {#each data as segment} + AreEqual: + + + {/each} +{/if} \ No newline at end of file diff --git a/svelte-helper/src/lib/Counter.svelte b/svelte-helper/src/lib/Counter.svelte new file mode 100644 index 0000000..0233b15 --- /dev/null +++ b/svelte-helper/src/lib/Counter.svelte @@ -0,0 +1,10 @@ + + + diff --git a/svelte-helper/src/lib/Left.svelte b/svelte-helper/src/lib/Left.svelte new file mode 100644 index 0000000..496471c --- /dev/null +++ b/svelte-helper/src/lib/Left.svelte @@ -0,0 +1,9 @@ + + +{#if !data} +

    Left data is null

    +{:else} +
  • Left: {data.RelativePath} - {data.Size} - {data.Ticks}
  • +{/if} diff --git a/svelte-helper/src/lib/LeftSideIsNewer.svelte b/svelte-helper/src/lib/LeftSideIsNewer.svelte new file mode 100644 index 0000000..0a5c407 --- /dev/null +++ b/svelte-helper/src/lib/LeftSideIsNewer.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    LeftSideIsNewer data is null

    +{:else if data.length === 0} +

    LeftSideIsNewer data is empty

    +{:else} + {#each data as segment} + LeftSideIsNewer: + + + {/each} +{/if} diff --git a/svelte-helper/src/lib/LeftSideOnly.svelte b/svelte-helper/src/lib/LeftSideOnly.svelte new file mode 100644 index 0000000..aaeb610 --- /dev/null +++ b/svelte-helper/src/lib/LeftSideOnly.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    LeftSideOnly data is null

    +{:else if data.length === 0} +

    LeftSideOnly data is empty

    +{:else} + {#each data as segment} + LeftSideOnly: + + + {/each} +{/if} diff --git a/svelte-helper/src/lib/NotEqualBut.svelte b/svelte-helper/src/lib/NotEqualBut.svelte new file mode 100644 index 0000000..5c04f1e --- /dev/null +++ b/svelte-helper/src/lib/NotEqualBut.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    NotEqualBut data is null

    +{:else if data.length === 0} +

    NotEqualBut data is empty

    +{:else} + {#each data as segment} + NotEqualBut: + + + {/each} +{/if} diff --git a/svelte-helper/src/lib/Records.svelte b/svelte-helper/src/lib/Records.svelte new file mode 100644 index 0000000..3396c9c --- /dev/null +++ b/svelte-helper/src/lib/Records.svelte @@ -0,0 +1,14 @@ + + +{#if !data} +

    Records data is null

    +{:else if data.length === 0} +

    Records data is empty

    +{:else} + Records: + {#each data as record} +
  • {record.Left.Records}
  • + {/each} +{/if} diff --git a/svelte-helper/src/lib/Review.svelte b/svelte-helper/src/lib/Review.svelte new file mode 100644 index 0000000..de849bc --- /dev/null +++ b/svelte-helper/src/lib/Review.svelte @@ -0,0 +1,41 @@ + + +{#await promise} + + waiting +{:then data} + + {#if !data} +

    Review data is null

    + {:else} +

    Review:

    + + + + + + + + {/if} +{:catch error} + {error} + +{/await} diff --git a/svelte-helper/src/lib/Right.svelte b/svelte-helper/src/lib/Right.svelte new file mode 100644 index 0000000..95f02c7 --- /dev/null +++ b/svelte-helper/src/lib/Right.svelte @@ -0,0 +1,9 @@ + + +{#if !data} +

    Right data is null

    +{:else} +
  • Right: {data.RelativePath} - {data.Size} - {data.Ticks}
  • +{/if} diff --git a/svelte-helper/src/lib/RightSideIsNewer.svelte b/svelte-helper/src/lib/RightSideIsNewer.svelte new file mode 100644 index 0000000..32d330c --- /dev/null +++ b/svelte-helper/src/lib/RightSideIsNewer.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    RightSideIsNewer data is null

    +{:else if data.length === 0} +

    RightSideIsNewer data is empty

    +{:else} + {#each data as segment} + RightSideIsNewer: + + + {/each} +{/if} diff --git a/svelte-helper/src/lib/RightSideOnly.svelte b/svelte-helper/src/lib/RightSideOnly.svelte new file mode 100644 index 0000000..7dfba2e --- /dev/null +++ b/svelte-helper/src/lib/RightSideOnly.svelte @@ -0,0 +1,18 @@ + + +{#if !data} +

    RightSideOnly data is null

    +{:else if data.length === 0} +

    RightSideOnly data is empty

    +{:else} + {#each data as segment} + RightSideOnly: + + + {/each} +{/if} diff --git a/svelte-helper/src/lib/embed.js b/svelte-helper/src/lib/embed.js new file mode 100644 index 0000000..ffbe43f --- /dev/null +++ b/svelte-helper/src/lib/embed.js @@ -0,0 +1,37 @@ +import Review from './Review.svelte'; + +var div = document.createElement('DIV'); +var script = document.currentScript; +script.parentNode.insertBefore(div, script); + +const page = '/api/SyncV1/?'; +const baseUrl = 'http://localhost:5004'; + +const json = ` +{ + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Records": [ + { + "RelativePath": "D:/Tmp/phares/VisualStudioCode", + "Size": 0, + "Ticks": 0 + }, + { + "RelativePath": "z-exclude-patterns.nsv", + "Size": 230, + "Ticks": 638843891271017574 + }, + { + "RelativePath": "z-include-patterns.nsv", + "Size": 4, + "Ticks": 638796666663591762 + } + ] +} +`; + +const embed = new Review({ + target: div, + props: { page: page, baseUrl: baseUrl, json: json }, +}); \ No newline at end of file diff --git a/svelte-helper/src/lib/x.js b/svelte-helper/src/lib/x.js new file mode 100644 index 0000000..8e69773 --- /dev/null +++ b/svelte-helper/src/lib/x.js @@ -0,0 +1,101 @@ +const exampleData = ` +{ + "RightDirectory": "D:/Tmp/phares/VisualStudioCode", + "Helper": "Day-Helper-2025-05-19", + "LeftDirectory": "D:/Tmp/phares/VisualStudioCodeLeft", + "IncludePatternsFile": "z-include-patterns.nsv", + "ExcludePatternsFile": "z-exclude-patterns.nsv", + "BaseAddresses": [ + "http://localhost:5004" + ], + "Page": "/api/SyncV1/?", + "LessThan": ",L", + "GreaterThan": ".G", + "Segments": [ + "+", + "G", + "", + "L", + "+", + "Custom-Default" + ], + "Empty": "", + "Mirror": "+~G~~G~-~Mirror", + "Update": "+~G~~~~Update", + "Custom-Default": "+~G~~L~+~Custom-Default", + "Custom-A": "-~G~~G~+~Custom-A", + "Custom-B": "-~L~~L~+~Custom-B", + "Custom-C": "+~L~~L~-~Custom-C" +} +`; + +window.addEventListener('message', event => { onDidReceiveMessage(event); }); + +function onDidReceiveMessage(event) { + const message = event.data; + console.info(message); + const headerGrid = document.getElementById('HeaderGrid'); + const allTextarea = document.getElementById('AllTextarea'); + if (!headerGrid || !allTextarea) { + console.warn('Could not select html element(s)!'); + } + else { + allTextarea.value = ''; + headerGrid.innerHTML = ''; + if (message.command && message.command === 'post') { + post(allTextarea, headerGrid, event.data); + } + } +} + +function post(allTextarea, headerGrid, data) { + $.post(data.input.BaseAddresses[0] + data.input.Page, data.relativePath) + .done(function (reply) { + loadPage(allTextarea, headerGrid, data.input, data.relativePath, reply); + }) + .fail(function (_, textStatus, __) { + console.warn(textStatus); + }); +} + +function loadPage(allTextarea, headerGrid, input, relativePath, reply) { + console.log('Input value of ' + input); + console.log('RelativePath value of ' + relativePath); + console.log('Posted value of ' + reply); + if (!reply || !reply.RightSideIsNewer) { + console.warn('Data retrieved is not valid!'); + } + else { + let record; + let line = ''; + let text = 'RelativePath\tSize\tTicks\r\n'; + let html = 'RelativePathSizeTicks'; + for (let i = 0; i < reply.RightSideIsNewer.length; i++) { + record = reply.RightSideIsNewer[i]; + text += record.Left.RelativePath + '\t' + + record.Left.Size + '\t' + + record.Left.Ticks + '\r\n'; + line = '' + + record.Left.RelativePath + '' + + record.Left.Size + "" + + record.Left.Ticks + + ''; + html += line; + } + headerGrid.innerHTML = html.replaceAll('>null<', '> <'); + allTextarea.value = text.replaceAll('null', '').replaceAll(' ', ''); + } +} + +function getRelativePathAndPost() { + if (!acquiredVsCodeApi || typeof acquiredVsCodeApi.postMessage !== 'function') { + console.warn('VSCode function is not available!'); + } + else { + acquiredVsCodeApi.postMessage({ command: 'File-Folder-Helper.exe', subcommand: 'post', value: null, collection: [] }); + } +} + +if (!exampleData) { + getRelativePathAndPost(); +} \ No newline at end of file diff --git a/svelte-helper/src/main.js b/svelte-helper/src/main.js new file mode 100644 index 0000000..458c7a8 --- /dev/null +++ b/svelte-helper/src/main.js @@ -0,0 +1,9 @@ +import { mount } from 'svelte' +import './app.css' +import App from './App.svelte' + +const app = mount(App, { + target: document.getElementById('app'), +}) + +export default app diff --git a/svelte-helper/src/vite-env.d.ts b/svelte-helper/src/vite-env.d.ts new file mode 100644 index 0000000..4078e74 --- /dev/null +++ b/svelte-helper/src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/svelte-helper/svelte.config.js b/svelte-helper/svelte.config.js new file mode 100644 index 0000000..b0683fd --- /dev/null +++ b/svelte-helper/svelte.config.js @@ -0,0 +1,7 @@ +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + preprocess: vitePreprocess(), +} diff --git a/svelte-helper/vite.config.js b/svelte-helper/vite.config.js new file mode 100644 index 0000000..d32eba1 --- /dev/null +++ b/svelte-helper/vite.config.js @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [svelte()], +})