├── .gitignore ├── .svelte-kit ├── ambient.d.ts ├── generated │ ├── client-optimized │ │ ├── manifest.js │ │ ├── matchers.js │ │ └── nodes │ │ │ ├── 0.js │ │ │ ├── 1.js │ │ │ ├── 2.js │ │ │ ├── 3.js │ │ │ ├── 4.js │ │ │ └── 5.js │ ├── client │ │ ├── app.js │ │ ├── manifest.js │ │ ├── matchers.js │ │ └── nodes │ │ │ ├── 0.js │ │ │ ├── 1.js │ │ │ ├── 10.js │ │ │ ├── 11.js │ │ │ ├── 12.js │ │ │ ├── 13.js │ │ │ ├── 14.js │ │ │ ├── 15.js │ │ │ ├── 16.js │ │ │ ├── 17.js │ │ │ ├── 2.js │ │ │ ├── 3.js │ │ │ ├── 4.js │ │ │ ├── 5.js │ │ │ ├── 6.js │ │ │ ├── 7.js │ │ │ ├── 8.js │ │ │ └── 9.js │ ├── root.svelte │ └── server │ │ └── internal.js ├── output │ ├── client │ │ ├── _app │ │ │ ├── immutable │ │ │ │ ├── assets │ │ │ │ │ └── _layout-7f5e19c9.css │ │ │ │ ├── chunks │ │ │ │ │ ├── 0-494c4032.js │ │ │ │ │ ├── 1-ec1787f8.js │ │ │ │ │ ├── 2-d35ac8cc.js │ │ │ │ │ ├── 3-e77bb67b.js │ │ │ │ │ ├── 4-ebbcc64a.js │ │ │ │ │ ├── 5-4f31fec2.js │ │ │ │ │ ├── index-fac9d42c.js │ │ │ │ │ ├── singletons-8aa67421.js │ │ │ │ │ ├── stores-10673846.js │ │ │ │ │ └── transform-0199f17a.js │ │ │ │ ├── components │ │ │ │ │ ├── error.svelte-246cf555.js │ │ │ │ │ └── pages │ │ │ │ │ │ ├── _layout.svelte-eb1cc3e8.js │ │ │ │ │ │ ├── _page.svelte-fa763652.js │ │ │ │ │ │ ├── colors │ │ │ │ │ │ └── _page.svelte-fb9a2599.js │ │ │ │ │ │ ├── happyfaces │ │ │ │ │ │ └── _page.svelte-93850a70.js │ │ │ │ │ │ └── stickycircle │ │ │ │ │ │ └── _page.svelte-1aed0162.js │ │ │ │ └── start-cac21a0c.js │ │ │ └── version.json │ │ └── favicon.png │ └── server │ │ ├── chunks │ │ ├── index.js │ │ ├── internal.js │ │ └── stores.js │ │ ├── entries │ │ ├── fallbacks │ │ │ └── error.svelte.js │ │ └── pages │ │ │ ├── _layout.svelte.js │ │ │ ├── _page.server.js │ │ │ ├── _page.svelte.js │ │ │ ├── colors │ │ │ ├── _page.server.js │ │ │ └── _page.svelte.js │ │ │ ├── happyfaces │ │ │ └── _page.svelte.js │ │ │ └── stickycircle │ │ │ └── _page.svelte.js │ │ ├── index.js │ │ ├── internal.js │ │ ├── manifest-full.js │ │ ├── manifest.js │ │ └── nodes │ │ ├── 0.js │ │ ├── 1.js │ │ ├── 2.js │ │ ├── 3.js │ │ ├── 4.js │ │ └── 5.js └── tsconfig.json ├── LICENSE ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── src ├── app.html ├── lib │ └── stores ├── resources │ ├── UNPopPred.csv │ └── UNPopulationProjections.csv └── routes │ ├── +layout.svelte │ ├── +page.server.js │ ├── +page.svelte │ ├── Navbar.svelte │ ├── demos │ ├── +layout.svelte │ ├── NavbarDemos.svelte │ ├── colors │ │ ├── +page.server.js │ │ └── +page.svelte │ ├── happyfaces │ │ ├── +page.svelte │ │ ├── BackgroundCircle.svelte │ │ ├── Eyes.svelte │ │ ├── Face.svelte │ │ └── Mouth.svelte │ ├── menus │ │ └── +page.svelte │ ├── sfline │ │ ├── +page.server.js │ │ ├── +page.svelte │ │ ├── AxisBottom.svelte │ │ ├── AxisLeft.svelte │ │ └── Marks.svelte │ ├── stickycircle │ │ └── +page.svelte │ └── worldmap │ │ ├── +page.server.js │ │ ├── +page.svelte │ │ └── Marks.svelte │ ├── histmm │ ├── +page.server.js │ ├── +page.svelte │ ├── AxisBottom.svelte │ ├── AxisLeft.svelte │ └── Marks.svelte │ ├── irisscatter │ ├── +page.server.js │ ├── +page.svelte │ ├── AxisBottom.svelte │ ├── AxisLeft.svelte │ ├── ColorLegend.svelte │ └── Marks.svelte │ ├── newplot │ ├── +page.svelte │ └── Plot.svelte │ ├── popbarchart │ ├── +page.server.js │ ├── +page.svelte │ ├── AxisBottom.svelte │ ├── AxisLeft.svelte │ └── Marks.svelte │ ├── worldmapcities │ ├── +page.server.js │ ├── +page.svelte │ └── Marks.svelte │ ├── worldmapcitiessize │ ├── +page.server.js │ ├── +page.svelte │ └── Marks.svelte │ └── worldmapmm │ ├── +page.server.js │ ├── +page.svelte │ └── Marks.svelte ├── static └── favicon.png ├── svelte.config.js └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /.svelte-kit/ambient.d.ts: -------------------------------------------------------------------------------- 1 | 2 | // this file is generated — do not edit it 3 | 4 | 5 | /// 6 | 7 | /** 8 | * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env). 9 | * 10 | * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. 11 | * 12 | * ```ts 13 | * import { API_KEY } from '$env/static/private'; 14 | * ``` 15 | * 16 | * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: 17 | * 18 | * ``` 19 | * MY_FEATURE_FLAG="" 20 | * ``` 21 | * 22 | * You can override `.env` values from the command line like so: 23 | * 24 | * ```bash 25 | * MY_FEATURE_FLAG="enabled" npm run dev 26 | * ``` 27 | */ 28 | declare module '$env/static/private' { 29 | export const LESSOPEN: string; 30 | export const KDE_FULL_SESSION: string; 31 | export const CMDSTAN_OLD: string; 32 | export const CONDA_PROMPT_MODIFIER: string; 33 | export const USER: string; 34 | export const PAM_KWALLET5_LOGIN: string; 35 | export const npm_config_version_commit_hooks: string; 36 | export const npm_config_user_agent: string; 37 | export const QT_SCREEN_SCALE_FACTORS: string; 38 | export const CONDA_MKL_INTERFACE_LAYER_BACKUP: string; 39 | export const XDG_SEAT: string; 40 | export const CXXFLAGS: string; 41 | export const npm_config_bin_links: string; 42 | export const GCC_RANLIB: string; 43 | export const SSH_AGENT_PID: string; 44 | export const XDG_SESSION_TYPE: string; 45 | export const OBJCOPY: string; 46 | export const npm_node_execpath: string; 47 | export const npm_package_devDependencies_vite: string; 48 | export const npm_config_init_version: string; 49 | export const XCURSOR_SIZE: string; 50 | export const DEBUG_CXXFLAGS: string; 51 | export const SIZE: string; 52 | export const SHLVL: string; 53 | export const npm_package_dependencies_rxjs: string; 54 | export const HOME: string; 55 | export const CC_FOR_BUILD: string; 56 | export const CONDA_SHLVL: string; 57 | export const KDE_APPLICATIONS_AS_SCOPE: string; 58 | export const OLDPWD: string; 59 | export const npm_package_dependencies_topojson_client: string; 60 | export const DESKTOP_SESSION: string; 61 | export const npm_package_devDependencies_eslint_config_prettier: string; 62 | export const PYENV_SHELL: string; 63 | export const CONDA_TOOLCHAIN_BUILD: string; 64 | export const npm_config_init_license: string; 65 | export const HOMEBREW_PREFIX: string; 66 | export const GTK_RC_FILES: string; 67 | export const GTK_MODULES: string; 68 | export const LDFLAGS: string; 69 | export const XDG_SEAT_PATH: string; 70 | export const KDE_SESSION_VERSION: string; 71 | export const YARN_WRAP_OUTPUT: string; 72 | export const npm_package_dependencies_ajax: string; 73 | export const npm_config_version_tag_prefix: string; 74 | export const STRINGS: string; 75 | export const npm_package_dependencies_topojson_simplify: string; 76 | export const SYSTEMD_EXEC_PID: string; 77 | export const DBUS_SESSION_BUS_ADDRESS: string; 78 | export const COLORTERM: string; 79 | export const _CE_M: string; 80 | export const CPP: string; 81 | export const LIBVIRT_DEFAULT_URI: string; 82 | export const npm_package_description: string; 83 | export const NVM_DIR: string; 84 | export const npm_package_readmeFilename: string; 85 | export const npm_package_dependencies_d3: string; 86 | export const MANDATORY_PATH: string; 87 | export const IM_CONFIG_PHASE: string; 88 | export const ELFEDIT: string; 89 | export const INFOPATH: string; 90 | export const STRIP: string; 91 | export const npm_package_devDependencies_prettier: string; 92 | export const npm_package_scripts_dev: string; 93 | export const GTK_IM_MODULE: string; 94 | export const LOGNAME: string; 95 | export const ALACRITTY_SOCKET: string; 96 | export const GCC: string; 97 | export const npm_package_type: string; 98 | export const WINDOWID: string; 99 | export const QT_AUTO_SCREEN_SCALE_FACTOR: string; 100 | export const _: string; 101 | export const npm_package_private: string; 102 | export const npm_config_prefix: string; 103 | export const READELF: string; 104 | export const XDG_SESSION_CLASS: string; 105 | export const DEFAULTS_PATH: string; 106 | export const AR: string; 107 | export const FORMAT: string; 108 | export const npm_package_scripts_lint: string; 109 | export const npm_config_registry: string; 110 | export const GXX: string; 111 | export const TERM: string; 112 | export const AS: string; 113 | export const XDG_SESSION_ID: string; 114 | export const ALACRITTY_LOG: string; 115 | export const DOTNET_ROOT: string; 116 | export const _CE_CONDA: string; 117 | export const CXXFILT: string; 118 | export const npm_package_devDependencies_eslint_plugin_svelte3: string; 119 | export const npm_config_ignore_scripts: string; 120 | export const GTK2_RC_FILES: string; 121 | export const BUILD: string; 122 | export const PATH: string; 123 | export const NODE: string; 124 | export const SESSION_MANAGER: string; 125 | export const HOMEBREW_CELLAR: string; 126 | export const npm_package_name: string; 127 | export const XDG_SESSION_PATH: string; 128 | export const build_alias: string; 129 | export const XDG_RUNTIME_DIR: string; 130 | export const XCURSOR_THEME: string; 131 | export const CFLAGS: string; 132 | export const npm_package_dependencies_sveltestrap: string; 133 | export const GCC_AR: string; 134 | export const DISPLAY: string; 135 | export const LANG: string; 136 | export const DEBUG_CFLAGS: string; 137 | export const XDG_CURRENT_DESKTOP: string; 138 | export const DOTNET_BUNDLE_EXTRACT_BASE_DIR: string; 139 | export const npm_package_devDependencies_eslint: string; 140 | export const _CONDA_PYTHON_SYSCONFIGDATA_NAME: string; 141 | export const XMODIFIERS: string; 142 | export const XDG_SESSION_DESKTOP: string; 143 | export const XAUTHORITY: string; 144 | export const LS_COLORS: string; 145 | export const npm_lifecycle_script: string; 146 | export const SSH_AUTH_SOCK: string; 147 | export const GSETTINGS_SCHEMA_DIR: string; 148 | export const CPPFLAGS: string; 149 | export const CONDA_PYTHON_EXE: string; 150 | export const npm_package_devDependencies__sveltejs_kit: string; 151 | export const npm_config_version_git_message: string; 152 | export const SHELL: string; 153 | export const CMAKE_ARGS: string; 154 | export const HOST: string; 155 | export const npm_lifecycle_event: string; 156 | export const npm_package_version: string; 157 | export const QT_ACCESSIBILITY: string; 158 | export const CXX: string; 159 | export const PROMPT_COMMAND: string; 160 | export const DEBUG_CPPFLAGS: string; 161 | export const npm_config_argv: string; 162 | export const npm_package_devDependencies_svelte: string; 163 | export const npm_package_scripts_build: string; 164 | export const LESSCLOSE: string; 165 | export const CONDA_DEFAULT_ENV: string; 166 | export const npm_package_dependencies_topojson_server: string; 167 | export const npm_config_version_git_tag: string; 168 | export const npm_config_version_git_sign: string; 169 | export const GPG_AGENT_INFO: string; 170 | export const ADDR2LINE: string; 171 | export const GCC_NM: string; 172 | export const CONDA_BUILD_SYSROOT: string; 173 | export const npm_package_license: string; 174 | export const npm_config_strict_ssl: string; 175 | export const QT_IM_MODULE: string; 176 | export const XDG_VTNR: string; 177 | export const ALACRITTY_WINDOW_ID: string; 178 | export const npm_package_scripts_format: string; 179 | export const PWD: string; 180 | export const LD_GOLD: string; 181 | export const npm_execpath: string; 182 | export const npm_package_dependencies_flowbite_svelte: string; 183 | export const XDG_CONFIG_DIRS: string; 184 | export const CONDA_EXE: string; 185 | export const CMDSTAN: string; 186 | export const LD: string; 187 | export const CLUTTER_IM_MODULE: string; 188 | export const NVM_CD_FLAGS: string; 189 | export const PYENV_ROOT: string; 190 | export const XDG_DATA_DIRS: string; 191 | export const HOMEBREW_REPOSITORY: string; 192 | export const npm_package_devDependencies__sveltejs_adapter_auto: string; 193 | export const npm_config_save_prefix: string; 194 | export const npm_config_ignore_optional: string; 195 | export const GPROF: string; 196 | export const CONDA_PREFIX: string; 197 | export const GSETTINGS_SCHEMA_DIR_CONDA_BACKUP: string; 198 | export const CONDA_TOOLCHAIN_HOST: string; 199 | export const KDE_SESSION_UID: string; 200 | export const host_alias: string; 201 | export const CC: string; 202 | export const RANLIB: string; 203 | export const MKL_INTERFACE_LAYER: string; 204 | export const npm_package_devDependencies_prettier_plugin_svelte: string; 205 | export const npm_package_scripts_preview: string; 206 | export const MANPATH: string; 207 | export const CXX_FOR_BUILD: string; 208 | export const INIT_CWD: string; 209 | export const NVM_RC_VERSION: string; 210 | export const CMAKE_PREFIX_PATH: string; 211 | export const NM: string; 212 | export const OBJDUMP: string; 213 | export const NODE_ENV: string; 214 | } 215 | 216 | /** 217 | * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 218 | * 219 | * Values are replaced statically at build time. 220 | * 221 | * ```ts 222 | * import { PUBLIC_BASE_URL } from '$env/static/public'; 223 | * ``` 224 | */ 225 | declare module '$env/static/public' { 226 | 227 | } 228 | 229 | /** 230 | * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env). 231 | * 232 | * This module cannot be imported into client-side code. 233 | * 234 | * ```ts 235 | * import { env } from '$env/dynamic/private'; 236 | * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); 237 | * ``` 238 | * 239 | * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. 240 | */ 241 | declare module '$env/dynamic/private' { 242 | export const env: { 243 | LESSOPEN: string; 244 | KDE_FULL_SESSION: string; 245 | CMDSTAN_OLD: string; 246 | CONDA_PROMPT_MODIFIER: string; 247 | USER: string; 248 | PAM_KWALLET5_LOGIN: string; 249 | npm_config_version_commit_hooks: string; 250 | npm_config_user_agent: string; 251 | QT_SCREEN_SCALE_FACTORS: string; 252 | CONDA_MKL_INTERFACE_LAYER_BACKUP: string; 253 | XDG_SEAT: string; 254 | CXXFLAGS: string; 255 | npm_config_bin_links: string; 256 | GCC_RANLIB: string; 257 | SSH_AGENT_PID: string; 258 | XDG_SESSION_TYPE: string; 259 | OBJCOPY: string; 260 | npm_node_execpath: string; 261 | npm_package_devDependencies_vite: string; 262 | npm_config_init_version: string; 263 | XCURSOR_SIZE: string; 264 | DEBUG_CXXFLAGS: string; 265 | SIZE: string; 266 | SHLVL: string; 267 | npm_package_dependencies_rxjs: string; 268 | HOME: string; 269 | CC_FOR_BUILD: string; 270 | CONDA_SHLVL: string; 271 | KDE_APPLICATIONS_AS_SCOPE: string; 272 | OLDPWD: string; 273 | npm_package_dependencies_topojson_client: string; 274 | DESKTOP_SESSION: string; 275 | npm_package_devDependencies_eslint_config_prettier: string; 276 | PYENV_SHELL: string; 277 | CONDA_TOOLCHAIN_BUILD: string; 278 | npm_config_init_license: string; 279 | HOMEBREW_PREFIX: string; 280 | GTK_RC_FILES: string; 281 | GTK_MODULES: string; 282 | LDFLAGS: string; 283 | XDG_SEAT_PATH: string; 284 | KDE_SESSION_VERSION: string; 285 | YARN_WRAP_OUTPUT: string; 286 | npm_package_dependencies_ajax: string; 287 | npm_config_version_tag_prefix: string; 288 | STRINGS: string; 289 | npm_package_dependencies_topojson_simplify: string; 290 | SYSTEMD_EXEC_PID: string; 291 | DBUS_SESSION_BUS_ADDRESS: string; 292 | COLORTERM: string; 293 | _CE_M: string; 294 | CPP: string; 295 | LIBVIRT_DEFAULT_URI: string; 296 | npm_package_description: string; 297 | NVM_DIR: string; 298 | npm_package_readmeFilename: string; 299 | npm_package_dependencies_d3: string; 300 | MANDATORY_PATH: string; 301 | IM_CONFIG_PHASE: string; 302 | ELFEDIT: string; 303 | INFOPATH: string; 304 | STRIP: string; 305 | npm_package_devDependencies_prettier: string; 306 | npm_package_scripts_dev: string; 307 | GTK_IM_MODULE: string; 308 | LOGNAME: string; 309 | ALACRITTY_SOCKET: string; 310 | GCC: string; 311 | npm_package_type: string; 312 | WINDOWID: string; 313 | QT_AUTO_SCREEN_SCALE_FACTOR: string; 314 | _: string; 315 | npm_package_private: string; 316 | npm_config_prefix: string; 317 | READELF: string; 318 | XDG_SESSION_CLASS: string; 319 | DEFAULTS_PATH: string; 320 | AR: string; 321 | FORMAT: string; 322 | npm_package_scripts_lint: string; 323 | npm_config_registry: string; 324 | GXX: string; 325 | TERM: string; 326 | AS: string; 327 | XDG_SESSION_ID: string; 328 | ALACRITTY_LOG: string; 329 | DOTNET_ROOT: string; 330 | _CE_CONDA: string; 331 | CXXFILT: string; 332 | npm_package_devDependencies_eslint_plugin_svelte3: string; 333 | npm_config_ignore_scripts: string; 334 | GTK2_RC_FILES: string; 335 | BUILD: string; 336 | PATH: string; 337 | NODE: string; 338 | SESSION_MANAGER: string; 339 | HOMEBREW_CELLAR: string; 340 | npm_package_name: string; 341 | XDG_SESSION_PATH: string; 342 | build_alias: string; 343 | XDG_RUNTIME_DIR: string; 344 | XCURSOR_THEME: string; 345 | CFLAGS: string; 346 | npm_package_dependencies_sveltestrap: string; 347 | GCC_AR: string; 348 | DISPLAY: string; 349 | LANG: string; 350 | DEBUG_CFLAGS: string; 351 | XDG_CURRENT_DESKTOP: string; 352 | DOTNET_BUNDLE_EXTRACT_BASE_DIR: string; 353 | npm_package_devDependencies_eslint: string; 354 | _CONDA_PYTHON_SYSCONFIGDATA_NAME: string; 355 | XMODIFIERS: string; 356 | XDG_SESSION_DESKTOP: string; 357 | XAUTHORITY: string; 358 | LS_COLORS: string; 359 | npm_lifecycle_script: string; 360 | SSH_AUTH_SOCK: string; 361 | GSETTINGS_SCHEMA_DIR: string; 362 | CPPFLAGS: string; 363 | CONDA_PYTHON_EXE: string; 364 | npm_package_devDependencies__sveltejs_kit: string; 365 | npm_config_version_git_message: string; 366 | SHELL: string; 367 | CMAKE_ARGS: string; 368 | HOST: string; 369 | npm_lifecycle_event: string; 370 | npm_package_version: string; 371 | QT_ACCESSIBILITY: string; 372 | CXX: string; 373 | PROMPT_COMMAND: string; 374 | DEBUG_CPPFLAGS: string; 375 | npm_config_argv: string; 376 | npm_package_devDependencies_svelte: string; 377 | npm_package_scripts_build: string; 378 | LESSCLOSE: string; 379 | CONDA_DEFAULT_ENV: string; 380 | npm_package_dependencies_topojson_server: string; 381 | npm_config_version_git_tag: string; 382 | npm_config_version_git_sign: string; 383 | GPG_AGENT_INFO: string; 384 | ADDR2LINE: string; 385 | GCC_NM: string; 386 | CONDA_BUILD_SYSROOT: string; 387 | npm_package_license: string; 388 | npm_config_strict_ssl: string; 389 | QT_IM_MODULE: string; 390 | XDG_VTNR: string; 391 | ALACRITTY_WINDOW_ID: string; 392 | npm_package_scripts_format: string; 393 | PWD: string; 394 | LD_GOLD: string; 395 | npm_execpath: string; 396 | npm_package_dependencies_flowbite_svelte: string; 397 | XDG_CONFIG_DIRS: string; 398 | CONDA_EXE: string; 399 | CMDSTAN: string; 400 | LD: string; 401 | CLUTTER_IM_MODULE: string; 402 | NVM_CD_FLAGS: string; 403 | PYENV_ROOT: string; 404 | XDG_DATA_DIRS: string; 405 | HOMEBREW_REPOSITORY: string; 406 | npm_package_devDependencies__sveltejs_adapter_auto: string; 407 | npm_config_save_prefix: string; 408 | npm_config_ignore_optional: string; 409 | GPROF: string; 410 | CONDA_PREFIX: string; 411 | GSETTINGS_SCHEMA_DIR_CONDA_BACKUP: string; 412 | CONDA_TOOLCHAIN_HOST: string; 413 | KDE_SESSION_UID: string; 414 | host_alias: string; 415 | CC: string; 416 | RANLIB: string; 417 | MKL_INTERFACE_LAYER: string; 418 | npm_package_devDependencies_prettier_plugin_svelte: string; 419 | npm_package_scripts_preview: string; 420 | MANPATH: string; 421 | CXX_FOR_BUILD: string; 422 | INIT_CWD: string; 423 | NVM_RC_VERSION: string; 424 | CMAKE_PREFIX_PATH: string; 425 | NM: string; 426 | OBJDUMP: string; 427 | NODE_ENV: string; 428 | [key: `PUBLIC_${string}`]: undefined; 429 | [key: string]: string | undefined; 430 | } 431 | } 432 | 433 | /** 434 | * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 435 | * 436 | * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. 437 | * 438 | * ```ts 439 | * import { env } from '$env/dynamic/public'; 440 | * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); 441 | * ``` 442 | */ 443 | declare module '$env/dynamic/public' { 444 | export const env: { 445 | [key: `PUBLIC_${string}`]: string | undefined; 446 | } 447 | } 448 | -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/manifest.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [() => import('./nodes/0'), 4 | () => import('./nodes/1'), 5 | () => import('./nodes/2'), 6 | () => import('./nodes/3'), 7 | () => import('./nodes/4'), 8 | () => import('./nodes/5')]; 9 | 10 | export const server_loads = []; 11 | 12 | export const dictionary = { 13 | "/": [~2], 14 | "/colors": [~3], 15 | "/happyfaces": [4], 16 | "/stickycircle": [5] 17 | }; 18 | 19 | export const hooks = { 20 | handleError: (({ error }) => { console.error(error) }), 21 | }; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/matchers.js: -------------------------------------------------------------------------------- 1 | export const matchers = {}; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/0.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+layout.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/1.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/error.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/2.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/3.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/colors/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/4.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/happyfaces/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client-optimized/nodes/5.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/stickycircle/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/app.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [() => import('./nodes/0'), 4 | () => import('./nodes/1'), 5 | () => import('./nodes/2'), 6 | () => import('./nodes/3'), 7 | () => import('./nodes/4'), 8 | () => import('./nodes/5'), 9 | () => import('./nodes/6'), 10 | () => import('./nodes/7'), 11 | () => import('./nodes/8'), 12 | () => import('./nodes/9'), 13 | () => import('./nodes/10'), 14 | () => import('./nodes/11'), 15 | () => import('./nodes/12'), 16 | () => import('./nodes/13'), 17 | () => import('./nodes/14'), 18 | () => import('./nodes/15'), 19 | () => import('./nodes/16')]; 20 | 21 | export const server_loads = []; 22 | 23 | export const dictionary = { 24 | "/": [~3], 25 | "/demos/colors": [~4,[2]], 26 | "/demos/happyfaces": [5,[2]], 27 | "/demos/menus": [6,[2]], 28 | "/demos/sfline": [~7,[2]], 29 | "/demos/stickycircle": [8,[2]], 30 | "/demos/worldmap": [~9,[2]], 31 | "/histmm": [~10], 32 | "/irisscatter": [~11], 33 | "/newplot": [12], 34 | "/popbarchart": [~13], 35 | "/worldmapcitiessize": [~15], 36 | "/worldmapcities": [~14], 37 | "/worldmapmm": [~16] 38 | }; 39 | 40 | export const hooks = { 41 | handleError: (({ error }) => { console.error(error) }), 42 | }; 43 | 44 | export { default as root } from '../root.svelte'; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/manifest.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [() => import('./nodes/0'), 4 | () => import('./nodes/1'), 5 | () => import('./nodes/2'), 6 | () => import('./nodes/3'), 7 | () => import('./nodes/4'), 8 | () => import('./nodes/5'), 9 | () => import('./nodes/6'), 10 | () => import('./nodes/7'), 11 | () => import('./nodes/8'), 12 | () => import('./nodes/9'), 13 | () => import('./nodes/10'), 14 | () => import('./nodes/11'), 15 | () => import('./nodes/12'), 16 | () => import('./nodes/13'), 17 | () => import('./nodes/14'), 18 | () => import('./nodes/15'), 19 | () => import('./nodes/16')]; 20 | 21 | export const server_loads = []; 22 | 23 | export const dictionary = { 24 | "/": [~3], 25 | "/demos/colors": [~4,[2]], 26 | "/demos/happyfaces": [5,[2]], 27 | "/demos/menus": [6,[2]], 28 | "/demos/sfline": [~7,[2]], 29 | "/demos/stickycircle": [8,[2]], 30 | "/demos/worldmap": [~9,[2]], 31 | "/histmm": [~10], 32 | "/irisscatter": [~11], 33 | "/newplot": [12], 34 | "/popbarchart": [~13], 35 | "/worldmapcitiessize": [~15], 36 | "/worldmapcities": [~14], 37 | "/worldmapmm": [~16] 38 | }; 39 | 40 | export const hooks = { 41 | handleError: (({ error }) => { console.error(error) }), 42 | }; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/matchers.js: -------------------------------------------------------------------------------- 1 | export const matchers = {}; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/0.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+layout.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/1.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/error.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/10.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/histmm/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/11.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/irisscatter/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/12.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/newplot/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/13.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/popbarchart/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/14.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/worldmapcities/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/15.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/worldmapcitiessize/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/16.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/worldmapmm/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/17.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/worldmapmm/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/2.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/+layout.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/3.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/4.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/colors/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/5.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/happyfaces/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/6.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/menus/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/7.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/sfline/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/8.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/stickycircle/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/client/nodes/9.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/demos/worldmap/+page.svelte"; -------------------------------------------------------------------------------- /.svelte-kit/generated/root.svelte: -------------------------------------------------------------------------------- 1 | 2 | 40 | 41 | {#if constructors[1]} 42 | 43 | {#if constructors[2]} 44 | 45 | 46 | 47 | {:else} 48 | 49 | {/if} 50 | 51 | {:else} 52 | 53 | {/if} 54 | 55 | {#if mounted} 56 |
57 | {#if navigated} 58 | {title} 59 | {/if} 60 |
61 | {/if} -------------------------------------------------------------------------------- /.svelte-kit/generated/server/internal.js: -------------------------------------------------------------------------------- 1 | 2 | import root from '../root.svelte'; 3 | import { set_building } from '__sveltekit/environment'; 4 | import { set_assets, set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js'; 5 | 6 | export const options = { 7 | app_template_contains_nonce: false, 8 | csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}}, 9 | csrf_check_origin: true, 10 | embedded: false, 11 | env_public_prefix: 'PUBLIC_', 12 | hooks: null, // added lazily, via `get_hooks` 13 | root, 14 | service_worker: false, 15 | templates: { 16 | app: ({ head, body, assets, nonce, env }) => "\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t" + head + "\n\t\n\t\n\t\n\t\t
" + body + "
\n\t\n\n", 17 | error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" 18 | }, 19 | version_hash: "v1euno" 20 | }; 21 | 22 | export function get_hooks() { 23 | return {}; 24 | } 25 | 26 | export { set_assets, set_building, set_private_env, set_public_env }; 27 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/assets/_layout-7f5e19c9.css: -------------------------------------------------------------------------------- 1 | nav.svelte-1mun0q1{background-color:#212529;color:#fff}.container.svelte-1mun0q1{display:flex;align-items:center}a.svelte-1mun0q1{color:#aaa;text-decoration:none;padding-left:5px}.active.svelte-1mun0q1{color:#fff}ul.svelte-1mun0q1{display:flex;list-style:none;margin-left:auto;font-size:1em}li.svelte-1mun0q1{margin-right:20px}h1.svelte-1mun0q1{margin:0;font-size:1.1em;font-weight:400} 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/0-494c4032.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/pages/_layout.svelte-eb1cc3e8.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/1-ec1787f8.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/error.svelte-246cf555.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/2-d35ac8cc.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/pages/_page.svelte-fa763652.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/3-e77bb67b.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/pages/colors/_page.svelte-fb9a2599.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/4-ebbcc64a.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/pages/happyfaces/_page.svelte-93850a70.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/5-4f31fec2.js: -------------------------------------------------------------------------------- 1 | import{default as t}from"../components/pages/stickycircle/_page.svelte-1aed0162.js";export{t as component}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/index-fac9d42c.js: -------------------------------------------------------------------------------- 1 | function $(){}function H(t,n){for(const e in n)t[e]=n[e];return t}function k(t){return t()}function C(){return Object.create(null)}function y(t){t.forEach(k)}function B(t){return typeof t=="function"}function lt(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function I(t){return Object.keys(t).length===0}function G(t,...n){if(t==null)return $;const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function ut(t,n,e){t.$$.on_destroy.push(G(n,e))}function st(t,n,e,i){if(t){const r=T(t,n,e,i);return t[0](r)}}function T(t,n,e,i){return t[1]&&i?H(e.ctx.slice(),t[1](i(n))):e.ctx}function ot(t,n,e,i){if(t[2]&&i){const r=t[2](i(e));if(n.dirty===void 0)return r;if(typeof r=="object"){const o=[],c=Math.max(n.dirty.length,r.length);for(let s=0;s32){const n=[],e=t.ctx.length/32;for(let i=0;i>1);e(r)<=i?t=r+1:n=r}return t}function Q(t){if(t.hydrate_init)return;t.hydrate_init=!0;let n=t.childNodes;if(t.nodeName==="HEAD"){const l=[];for(let u=0;u0&&n[e[r]].claim_order<=u?r+1:W(1,r,g=>n[e[g]].claim_order,u))-1;i[l]=e[a]+1;const f=a+1;e[f]=l,r=Math.max(f,r)}const o=[],c=[];let s=n.length-1;for(let l=e[r]+1;l!=0;l=i[l-1]){for(o.push(n[l-1]);s>=l;s--)c.push(n[s]);s--}for(;s>=0;s--)c.push(n[s]);o.reverse(),c.sort((l,u)=>l.claim_order-u.claim_order);for(let l=0,u=0;l=o[u].claim_order;)u++;const a=ut.removeEventListener(n,e,i)}function yt(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function Y(t){return Array.from(t.childNodes)}function Z(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function O(t,n,e,i,r=!1){Z(t);const o=(()=>{for(let c=t.claim_info.last_index;c=0;c--){const s=t[c];if(n(s)){const l=e(s);return l===void 0?t.splice(c,1):t[c]=l,r?l===void 0&&t.claim_info.last_index--:t.claim_info.last_index=c,s}}return i()})();return o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,o}function P(t,n,e,i){return O(t,r=>r.nodeName===n,r=>{const o=[];for(let c=0;cr.removeAttribute(c))},()=>i(n))}function gt(t,n,e){return P(t,n,e,V)}function xt(t,n,e){return P(t,n,e,X)}function tt(t,n){return O(t,e=>e.nodeType===3,e=>{const i=""+n;if(e.data.startsWith(i)){if(e.data.length!==i.length)return e.splitText(i.length)}else e.data=i},()=>S(n),!0)}function bt(t){return tt(t," ")}function $t(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function wt(t,n,e,i){e===null?t.style.removeProperty(n):t.style.setProperty(n,e,i?"important":"")}function vt(t,n,e){t.classList[e?"add":"remove"](n)}function Et(t,n){return new t(n)}let p;function m(t){p=t}function q(){if(!p)throw new Error("Function called outside component initialization");return p}function Nt(t){q().$$.on_mount.push(t)}function St(t){q().$$.after_update.push(t)}const h=[],M=[],x=[],L=[],z=Promise.resolve();let E=!1;function D(){E||(E=!0,z.then(F))}function At(){return D(),z}function N(t){x.push(t)}const v=new Set;let d=0;function F(){if(d!==0)return;const t=p;do{try{for(;d{b.delete(t),i&&(e&&t.d(1),i())}),t.o(n)}else i&&i()}function Lt(t){t&&t.c()}function kt(t,n){t&&t.l(n)}function it(t,n,e,i){const{fragment:r,after_update:o}=t.$$;r&&r.m(n,e),i||N(()=>{const c=t.$$.on_mount.map(k).filter(B);t.$$.on_destroy?t.$$.on_destroy.push(...c):y(c),t.$$.on_mount=[]}),o.forEach(N)}function rt(t,n){const e=t.$$;e.fragment!==null&&(y(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ct(t,n){t.$$.dirty[0]===-1&&(h.push(t),D(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<{const j=A.length?A[0]:g;return u.ctx&&r(u.ctx[f],u.ctx[f]=j)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](j),a&&ct(t,f)),g}):[],u.update(),a=!0,y(u.before_update),u.fragment=i?i(u.ctx):!1,n.target){if(n.hydrate){J();const f=Y(n.target);u.fragment&&u.fragment.l(f),f.forEach(U)}else u.fragment&&u.fragment.c();n.intro&&et(t.$$.fragment),it(t,n.target,n.anchor,n.customElement),K(),F()}m(l)}class Tt{$destroy(){rt(this,1),this.$destroy=$}$on(n,e){if(!B(e))return $;const i=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return i.push(e),()=>{const r=i.indexOf(e);r!==-1&&i.splice(r,1)}}$set(n){this.$$set&&!I(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}export{At as A,$ as B,vt as C,R as D,ut as E,st as F,ft as G,at as H,ot as I,X as J,xt as K,dt as L,pt as M,Tt as S,ht as a,_t as b,bt as c,Ct as d,mt as e,et as f,jt as g,U as h,Bt as i,St as j,V as k,gt as l,Y as m,yt as n,Nt as o,wt as p,S as q,tt as r,lt as s,Mt as t,$t as u,Et as v,Lt as w,kt as x,it as y,rt as z}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/singletons-8aa67421.js: -------------------------------------------------------------------------------- 1 | import{B as d,s as w}from"./index-fac9d42c.js";const c=[];function b(e,t=d){let n;const s=new Set;function o(a){if(w(e,a)&&(e=a,n)){const u=!c.length;for(const l of s)l[1](),c.push(l,e);if(u){for(let l=0;l{s.delete(l),s.size===0&&(n(),n=null)}}return{set:o,update:r,subscribe:i}}let m="",p="",E="";function I(e){p=e.base,m=e.assets||p}function y(e){E=e}const S="sveltekit:scroll",x="sveltekit:index",h={tap:1,hover:2,viewport:3,eager:4,off:-1};function T(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function U(){return{x:pageXOffset,y:pageYOffset}}function f(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const _={...h,"":h.hover};function v(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function L(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=v(e)}}function O(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const s=e instanceof SVGAElement?e.target.baseVal:e.target,o=!n||!!s||k(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external")||e.hasAttribute("download");return{url:n,external:o,target:s}}function V(e){let t=null,n=null,s=null,o=null,r=e;for(;r&&r!==document.documentElement;)n===null&&(n=f(r,"preload-code")),s===null&&(s=f(r,"preload-data")),t===null&&(t=f(r,"noscroll")),o===null&&(o=f(r,"reload")),r=v(r);return{preload_code:_[n??"off"],preload_data:_[s??"off"],noscroll:t==="off"?!1:t===""?!0:null,reload:o==="off"?!1:o===""?!0:null}}function g(e){const t=b(e);let n=!0;function s(){n=!0,t.update(i=>i)}function o(i){n=!1,t.set(i)}function r(i){let a;return t.subscribe(u=>{(a===void 0||n&&u!==a)&&i(a=u)})}return{notify:s,set:o,subscribe:r}}function R(){const{set:e,subscribe:t}=b(!1);let n;async function s(){clearTimeout(n);const o=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(o.ok){const i=(await o.json()).version!==E;return i&&(e(!0),clearTimeout(n)),i}else throw new Error(`Version check failed: ${o.status}`)}return{subscribe:t,check:s}}function k(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}function N(e){e.client}const $={url:g({}),page:g({}),navigating:b(null),updated:R()};export{x as I,h as P,S,O as a,V as b,U as c,I as d,N as e,L as f,T as g,y as h,k as i,$ as s}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/stores-10673846.js: -------------------------------------------------------------------------------- 1 | import"./index-fac9d42c.js";import{s as e}from"./singletons-8aa67421.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/chunks/transform-0199f17a.js: -------------------------------------------------------------------------------- 1 | const rn=Math.PI,an=2*rn,Z=1e-6,fn=an-Z;function cn(n){this._+=n[0];for(let t=1,s=n.length;t=0))throw new Error(`invalid digits: ${n}`);if(t>15)return cn;const s=10**t;return function(e){this._+=e[0];for(let o=1,l=e.length;oZ)if(!(Math.abs(y*_-u*i)>Z)||!l)this._append`L${this._x1=t},${this._y1=s}`;else{let f=e-$,d=o-h,g=_*_+u*u,q=f*f+d*d,p=Math.sqrt(g),v=Math.sqrt(r),x=l*Math.tan((rn-Math.acos((g+r-q)/(2*p*v)))/2),M=x/v,T=x/p;Math.abs(M-1)>Z&&this._append`L${t+M*i},${s+M*y}`,this._append`A${l},${l},0,0,${+(y*f>i*d)},${this._x1=t+T*_},${this._y1=s+T*u}`}}arc(t,s,e,o,l,$){if(t=+t,s=+s,e=+e,$=!!$,e<0)throw new Error(`negative radius: ${e}`);let h=e*Math.cos(o),_=e*Math.sin(o),u=t+h,i=s+_,y=1^$,r=$?o-l:l-o;this._x1===null?this._append`M${u},${i}`:(Math.abs(this._x1-u)>Z||Math.abs(this._y1-i)>Z)&&this._append`L${u},${i}`,e&&(r<0&&(r=r%an+an),r>fn?this._append`A${e},${e},0,1,${y},${t-h},${s-_}A${e},${e},0,1,${y},${this._x1=u},${this._y1=i}`:r>Z&&this._append`A${e},${e},0,${+(r>=rn)},${y},${this._x1=t+e*Math.cos(l)},${this._y1=s+e*Math.sin(l)}`)}rect(t,s,e,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+s}h${e=+e}v${+o}h${-e}Z`}toString(){return this._}}function C(n){return function(){return n}}const on=Math.abs,m=Math.atan2,S=Math.cos,dn=Math.max,sn=Math.min,E=Math.sin,O=Math.sqrt,A=1e-12,j=Math.PI,N=j/2,$n=2*j;function gn(n){return n>1?0:n<-1?j:Math.acos(n)}function ln(n){return n>=1?N:n<=-1?-N:Math.asin(n)}function _n(n){let t=3;return n.digits=function(s){if(!arguments.length)return t;if(s==null)t=null;else{const e=Math.floor(s);if(!(e>=0))throw new RangeError(`invalid digits: ${s}`);t=e}return n},()=>new yn(t)}function xn(n){return n.innerRadius}function mn(n){return n.outerRadius}function vn(n){return n.startAngle}function Mn(n){return n.endAngle}function An(n){return n&&n.padAngle}function Tn(n,t,s,e,o,l,$,h){var _=s-n,u=e-t,i=$-o,y=h-l,r=y*_-i*u;if(!(r*rc*c+I*I&&(X=P,Y=R),{cx:X,cy:Y,x01:-i,y01:-y,x11:X*(o/T-1),y11:Y*(o/T-1)}}function Rn(){var n=xn,t=mn,s=C(0),e=null,o=vn,l=Mn,$=An,h=null,_=_n(u);function u(){var i,y,r=+n.apply(this,arguments),f=+t.apply(this,arguments),d=o.apply(this,arguments)-N,g=l.apply(this,arguments)-N,q=on(g-d),p=g>d;if(h||(h=i=_()),fA))h.moveTo(0,0);else if(q>$n-A)h.moveTo(f*S(d),f*E(d)),h.arc(0,0,f,d,g,!p),r>A&&(h.moveTo(r*S(g),r*E(g)),h.arc(0,0,r,g,d,p));else{var v=d,x=g,M=d,T=g,w=q,L=q,X=$.apply(this,arguments)/2,Y=X>A&&(e?+e.apply(this,arguments):O(r*r+f*f)),P=sn(on(f-r)/2,+s.apply(this,arguments)),R=P,k=P,a,c;if(Y>A){var I=ln(Y/r*E(X)),B=ln(Y/f*E(X));(w-=I*2)>A?(I*=p?1:-1,M+=I,T-=I):(w=0,M=T=(d+g)/2),(L-=B*2)>A?(B*=p?1:-1,v+=B,x-=B):(L=0,v=x=(d+g)/2)}var z=f*S(v),D=f*E(v),F=r*S(T),G=r*E(T);if(P>A){var H=f*S(x),J=f*E(x),U=r*S(M),V=r*E(M),b;if(qA?k>A?(a=K(U,V,z,D,f,k,p),c=K(H,J,F,G,f,k,p),h.moveTo(a.cx+a.x01,a.cy+a.y01),kA)||!(w>A)?h.lineTo(F,G):R>A?(a=K(F,G,H,J,r,-R,p),c=K(z,D,U,V,r,-R,p),h.lineTo(a.cx+a.x01,a.cy+a.y01),Rt(0,r=o)),[r]}class w extends x{constructor(a){super(),S(this,a,H,D,g,{})}}export{w as default}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/components/pages/_layout.svelte-eb1cc3e8.js: -------------------------------------------------------------------------------- 1 | import{S as J,i as K,s as M,k as h,q as b,a as C,l as d,m as $,r as k,h as u,c as A,n as i,C as g,b as O,D as c,B as G,E as P,F as Q,w as R,x as T,y as W,G as X,H as Y,I as Z,f as U,t as j,z as x}from"../../chunks/index-fac9d42c.js";import{p as ee}from"../../chunks/stores-10673846.js";function ae(n){let a,t,l,r,s,e,o,f,_,D,H,p,I,S,m,V;return{c(){a=h("nav"),t=h("div"),l=h("h1"),r=h("a"),s=b("Data Visualizations"),e=C(),o=h("ul"),f=h("li"),_=h("a"),D=b("Happy Faces"),H=C(),p=h("a"),I=b("Sticky Circle"),S=C(),m=h("a"),V=b("Colors"),this.h()},l(v){a=d(v,"NAV",{class:!0});var y=$(a);t=d(y,"DIV",{class:!0});var E=$(t);l=d(E,"H1",{class:!0});var z=$(l);r=d(z,"A",{href:!0,class:!0});var F=$(r);s=k(F,"Data Visualizations"),F.forEach(u),z.forEach(u),e=A(E),o=d(E,"UL",{class:!0});var L=$(o);f=d(L,"LI",{class:!0});var q=$(f);_=d(q,"A",{href:!0,class:!0});var N=$(_);D=k(N,"Happy Faces"),N.forEach(u),H=A(q),p=d(q,"A",{href:!0,class:!0});var w=$(p);I=k(w,"Sticky Circle"),w.forEach(u),S=A(q),m=d(q,"A",{href:!0,class:!0});var B=$(m);V=k(B,"Colors"),B.forEach(u),q.forEach(u),L.forEach(u),E.forEach(u),y.forEach(u),this.h()},h(){i(r,"href","/"),i(r,"class","active svelte-1mun0q1"),i(l,"class","svelte-1mun0q1"),i(_,"href","/happyfaces"),i(_,"class","svelte-1mun0q1"),g(_,"active",n[0]=="/happyfaces"),i(p,"href","/stickycircle"),i(p,"class","svelte-1mun0q1"),g(p,"active",n[0]=="/stickycircle"),i(m,"href","/colors"),i(m,"class","svelte-1mun0q1"),g(m,"active",n[0]=="/colors"),i(f,"class","svelte-1mun0q1"),i(o,"class","svelte-1mun0q1"),i(t,"class","container svelte-1mun0q1"),i(a,"class","svelte-1mun0q1")},m(v,y){O(v,a,y),c(a,t),c(t,l),c(l,r),c(r,s),c(t,e),c(t,o),c(o,f),c(f,_),c(_,D),c(f,H),c(f,p),c(p,I),c(f,S),c(f,m),c(m,V)},p(v,[y]){y&1&&g(_,"active",v[0]=="/happyfaces"),y&1&&g(p,"active",v[0]=="/stickycircle"),y&1&&g(m,"active",v[0]=="/colors")},i:G,o:G,d(v){v&&u(a)}}}function se(n,a,t){let l,r;return P(n,ee,s=>t(1,r=s)),n.$$.update=()=>{n.$$.dirty&2&&t(0,l=r.route.id)},[l,r]}class te extends J{constructor(a){super(),K(this,a,se,ae,M,{})}}function le(n){let a,t,l;a=new te({});const r=n[1].default,s=Q(r,n,n[0],null);return{c(){R(a.$$.fragment),t=C(),s&&s.c()},l(e){T(a.$$.fragment,e),t=A(e),s&&s.l(e)},m(e,o){W(a,e,o),O(e,t,o),s&&s.m(e,o),l=!0},p(e,[o]){s&&s.p&&(!l||o&1)&&X(s,r,e,e[0],l?Z(r,e[0],o,null):Y(e[0]),null)},i(e){l||(U(a.$$.fragment,e),U(s,e),l=!0)},o(e){j(a.$$.fragment,e),j(s,e),l=!1},d(e){x(a,e),e&&u(t),s&&s.d(e)}}}function re(n,a,t){let{$$slots:l={},$$scope:r}=a;return n.$$set=s=>{"$$scope"in s&&t(0,r=s.$$scope)},[r,l]}class oe extends J{constructor(a){super(),K(this,a,re,le,M,{})}}export{oe as default}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/components/pages/_page.svelte-fa763652.js: -------------------------------------------------------------------------------- 1 | import{S as E,i as b,s as C,k as o,q as h,a as q,l as u,m as d,r as p,h as i,c as A,n as g,b as V,D as t,B as w}from"../../chunks/index-fac9d42c.js";function z(y){let e,l,f,m,a,_,s,v,x;return{c(){e=o("div"),l=o("h1"),f=h("Data Visualizations"),m=q(),a=o("p"),_=h("A Svelte recasting of the "),s=o("a"),v=h("Excellent Series"),x=h(" by Curran Kelleher using D3 with React."),this.h()},l(n){e=u(n,"DIV",{class:!0});var r=d(e);l=u(r,"H1",{});var D=d(l);f=p(D,"Data Visualizations"),D.forEach(i),m=A(r),a=u(r,"P",{});var c=d(a);_=p(c,"A Svelte recasting of the "),s=u(c,"A",{href:!0});var S=d(s);v=p(S,"Excellent Series"),S.forEach(i),x=p(c," by Curran Kelleher using D3 with React."),c.forEach(i),r.forEach(i),this.h()},h(){g(s,"href","https://www.youtube.com/channel/UCSwd_9jyX4YtDYm9p9MxQqw"),g(e,"class","container")},m(n,r){V(n,e,r),t(e,l),t(l,f),t(e,m),t(e,a),t(a,_),t(a,s),t(s,v),t(a,x)},p:w,i:w,o:w,d(n){n&&i(e)}}}class P extends E{constructor(e){super(),b(this,e,null,z,C,{})}}export{P as default}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/components/pages/colors/_page.svelte-fb9a2599.js: -------------------------------------------------------------------------------- 1 | import{S as A,i as I,s as P,k as R,J as u,l as y,m as f,K as _,h as o,n as c,b as k,D as p,B as m,L as B}from"../../../chunks/index-fac9d42c.js";import{a as D}from"../../../chunks/transform-0199f17a.js";function E(r,t,n){const l=r.slice();return l[5]=t[n],l[7]=n,l}function b(r){let t;return{c(){t=u("path"),this.h()},l(n){t=_(n,"path",{fill:!0,d:!0}),f(t).forEach(o),this.h()},h(){c(t,"fill",r[5]["RGB hex value"]),c(t,"d",r[3]({startAngle:r[7]/r[0].length*2*Math.PI,endAngle:(r[7]+1)/r[0].length*2*Math.PI}))},m(n,l){k(n,t,l)},p:m,d(n){n&&o(t)}}}function M(r){let t,n,l,i=r[0],s=[];for(let a=0;a{"data"in e&&n(4,l=e.data)},[i,s,a,h,l]}class C extends A{constructor(t){super(),I(this,t,S,M,P,{data:4})}}export{C as default}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/components/pages/happyfaces/_page.svelte-93850a70.js: -------------------------------------------------------------------------------- 1 | import{S as X,i as w,s as M,J as W,a as D,K as Y,m as R,h as o,c as S,n as u,b as _,B as d,w as E,x as b,D as q,y as v,f as y,t as O,z as A,k as z,l as F,d as J,L as K,g as L}from"../../../chunks/index-fac9d42c.js";import{a as V}from"../../../chunks/transform-0199f17a.js";function j(f){let e,i,r,t,a,s;return{c(){e=W("circle"),r=D(),t=W("circle"),this.h()},l(h){e=Y(h,"circle",{cx:!0,cy:!0,r:!0}),R(e).forEach(o),r=S(h),t=Y(h,"circle",{cx:!0,cy:!0,r:!0}),R(t).forEach(o),this.h()},h(){u(e,"cx",f[0]),u(e,"cy",i=-f[1]),u(e,"r",f[2]),u(t,"cx",a=-f[0]),u(t,"cy",s=-f[1]),u(t,"r",f[2])},m(h,n){_(h,e,n),_(h,r,n),_(h,t,n)},p(h,[n]){n&1&&u(e,"cx",h[0]),n&2&&i!==(i=-h[1])&&u(e,"cy",i),n&4&&u(e,"r",h[2]),n&1&&a!==(a=-h[0])&&u(t,"cx",a),n&2&&s!==(s=-h[1])&&u(t,"cy",s),n&4&&u(t,"r",h[2])},i:d,o:d,d(h){h&&o(e),h&&o(r),h&&o(t)}}}function G(f,e,i){let{eyeOffsetX:r}=e,{eyeOffsetY:t}=e,{eyeRadius:a}=e;return f.$$set=s=>{"eyeOffsetX"in s&&i(0,r=s.eyeOffsetX),"eyeOffsetY"in s&&i(1,t=s.eyeOffsetY),"eyeRadius"in s&&i(2,a=s.eyeRadius)},[r,t,a]}class H extends X{constructor(e){super(),w(this,e,G,j,M,{eyeOffsetX:0,eyeOffsetY:1,eyeRadius:2})}}function N(f){let e;return{c(){e=W("path"),this.h()},l(i){e=Y(i,"path",{d:!0}),R(e).forEach(o),this.h()},h(){u(e,"d",f[0]())},m(i,r){_(i,e,r)},p:d,i:d,o:d,d(i){i&&o(e)}}}function Q(f,e,i){let{mouthRadius:r}=e,{mouthWidth:t}=e;const a=V().innerRadius(r).outerRadius(r+t).startAngle(Math.PI/2).endAngle(Math.PI*3/2);return f.$$set=s=>{"mouthRadius"in s&&i(1,r=s.mouthRadius),"mouthWidth"in s&&i(2,t=s.mouthWidth)},[a,r,t]}class T extends X{constructor(e){super(),w(this,e,Q,N,M,{mouthRadius:1,mouthWidth:2})}}function U(f){let e,i;return{c(){e=W("circle"),this.h()},l(r){e=Y(r,"circle",{r:!0,fill:!0,stroke:!0,"stroke-width":!0}),R(e).forEach(o),this.h()},h(){u(e,"r",i=f[1]-f[0]/2),u(e,"fill","yellow"),u(e,"stroke","black"),u(e,"stroke-width",f[0])},m(r,t){_(r,e,t)},p(r,[t]){t&3&&i!==(i=r[1]-r[0]/2)&&u(e,"r",i),t&1&&u(e,"stroke-width",r[0])},i:d,o:d,d(r){r&&o(e)}}}function Z(f,e,i){let{strokeWidth:r}=e,{centerY:t}=e;return f.$$set=a=>{"strokeWidth"in a&&i(0,r=a.strokeWidth),"centerY"in a&&i(1,t=a.centerY)},[r,t]}class x extends X{constructor(e){super(),w(this,e,Z,U,M,{strokeWidth:0,centerY:1})}}function p(f){let e,i,r,t,a,s,h;return r=new x({props:{centerY:f[3],strokeWidth:f[4]}}),t=new H({props:{eyeOffsetX:f[5],eyeOffsetY:f[6],eyeRadius:f[7]}}),a=new T({props:{mouthRadius:f[8],mouthWidth:f[9]}}),{c(){e=W("svg"),i=W("g"),E(r.$$.fragment),E(t.$$.fragment),E(a.$$.fragment),this.h()},l(n){e=Y(n,"svg",{width:!0,height:!0});var c=R(e);i=Y(c,"g",{transform:!0});var m=R(i);b(r.$$.fragment,m),b(t.$$.fragment,m),b(a.$$.fragment,m),m.forEach(o),c.forEach(o),this.h()},h(){u(i,"transform",s=`translate(${f[2]},${f[3]})`),u(e,"width",f[0]),u(e,"height",f[1])},m(n,c){_(n,e,c),q(e,i),v(r,i,null),v(t,i,null),v(a,i,null),h=!0},p(n,[c]){const m={};c&8&&(m.centerY=n[3]),c&16&&(m.strokeWidth=n[4]),r.$set(m);const g={};c&32&&(g.eyeOffsetX=n[5]),c&64&&(g.eyeOffsetY=n[6]),c&128&&(g.eyeRadius=n[7]),t.$set(g);const k={};c&256&&(k.mouthRadius=n[8]),c&512&&(k.mouthWidth=n[9]),a.$set(k),(!h||c&12&&s!==(s=`translate(${n[2]},${n[3]})`))&&u(i,"transform",s),(!h||c&1)&&u(e,"width",n[0]),(!h||c&2)&&u(e,"height",n[1])},i(n){h||(y(r.$$.fragment,n),y(t.$$.fragment,n),y(a.$$.fragment,n),h=!0)},o(n){O(r.$$.fragment,n),O(t.$$.fragment,n),O(a.$$.fragment,n),h=!1},d(n){n&&o(e),A(r),A(t),A(a)}}}function $(f,e,i){let{width:r}=e,{height:t}=e,{centerX:a}=e,{centerY:s}=e,{strokeWidth:h}=e,{eyeOffsetX:n}=e,{eyeOffsetY:c}=e,{eyeRadius:m}=e,{mouthRadius:g}=e,{mouthWidth:k}=e;return f.$$set=l=>{"width"in l&&i(0,r=l.width),"height"in l&&i(1,t=l.height),"centerX"in l&&i(2,a=l.centerX),"centerY"in l&&i(3,s=l.centerY),"strokeWidth"in l&&i(4,h=l.strokeWidth),"eyeOffsetX"in l&&i(5,n=l.eyeOffsetX),"eyeOffsetY"in l&&i(6,c=l.eyeOffsetY),"eyeRadius"in l&&i(7,m=l.eyeRadius),"mouthRadius"in l&&i(8,g=l.mouthRadius),"mouthWidth"in l&&i(9,k=l.mouthWidth)},[r,t,a,s,h,n,c,m,g,k]}class ee extends X{constructor(e){super(),w(this,e,$,p,M,{width:0,height:1,centerX:2,centerY:3,strokeWidth:4,eyeOffsetX:5,eyeOffsetY:6,eyeRadius:7,mouthRadius:8,mouthWidth:9})}}function B(f,e,i){const r=f.slice();return r[2]=e[i],r}function I(f){let e,i;return e=new ee({props:{width:P,height:C,centerX:f[0],centerY:f[1],strokeWidth:ne+Math.random()*3,eyeOffsetX:ie+Math.random()*9,eyeOffsetY:re+Math.random()*15,eyeRadius:se+Math.random()*10,mouthWidth:fe+Math.random()*9,mouthRadius:he+Math.random()*10}}),{c(){E(e.$$.fragment)},l(r){b(e.$$.fragment,r)},m(r,t){v(e,r,t),i=!0},p:d,i(r){i||(y(e.$$.fragment,r),i=!0)},o(r){O(e.$$.fragment,r),i=!1},d(r){A(e,r)}}}function te(f){let e,i,r=Array(18),t=[];for(let s=0;sO(t[s],1,1,()=>{t[s]=null});return{c(){e=z("div");for(let s=0;s{const{clientX:l,clientY:h}=r;t(0,e.x=l,e),t(0,e.y=h,e)};return t(0,e={x:p/2,y:y/2}),[e,n]}class C extends x{constructor(s){super(),w(this,s,q,b,E,{})}}export{C as default}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/immutable/start-cac21a0c.js: -------------------------------------------------------------------------------- 1 | import{S as rt,i as ot,s as st,a as it,e as B,c as lt,b as J,g as de,t as F,d as pe,f as M,h as G,j as ct,o as Ie,k as ft,l as ut,m as dt,n as be,p as V,q as pt,r as ht,u as mt,v as X,w as Z,x as Pe,y as x,z as Q,A as fe}from"./chunks/index-fac9d42c.js";import{S as et,I as C,g as Je,f as Ke,a as Ee,b as ue,s as q,i as ze,c as ae,P as We,d as _t,e as gt,h as yt}from"./chunks/singletons-8aa67421.js";function wt(a,e){return a==="/"||e==="ignore"?a:e==="never"?a.endsWith("/")?a.slice(0,-1):a:e==="always"&&!a.endsWith("/")?a+"/":a}function vt(a){return a.split("%25").map(decodeURI).join("%25")}function bt(a){for(const e in a)a[e]=decodeURIComponent(a[e]);return a}const Et=["href","pathname","search","searchParams","toString","toJSON"];function kt(a,e){const n=new URL(a);for(const i of Et){let o=n[i];Object.defineProperty(n,i,{get(){return e(),o},enumerable:!0,configurable:!0})}return Rt(n),n}function Rt(a){Object.defineProperty(a,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const St="/__data.json";function Lt(a){return a.replace(/\/$/,"")+St}function It(a){let e=5381;if(typeof a=="string"){let n=a.length;for(;n;)e=e*33^a.charCodeAt(--n)}else if(ArrayBuffer.isView(a)){const n=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);let i=n.length;for(;i;)e=e*33^n[--i]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const he=window.fetch;window.fetch=(a,e)=>((a instanceof Request?a.method:(e==null?void 0:e.method)||"GET")!=="GET"&&re.delete(Ue(a)),he(a,e));const re=new Map;function At(a,e){const n=Ue(a,e),i=document.querySelector(n);if(i!=null&&i.textContent){const{body:o,...d}=JSON.parse(i.textContent),t=i.getAttribute("data-ttl");return t&&re.set(n,{body:o,init:d,ttl:1e3*Number(t)}),Promise.resolve(new Response(o,d))}return he(a,e)}function Ot(a,e,n){if(re.size>0){const i=Ue(a,n),o=re.get(i);if(o){if(performance.now(){const o=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(o)return e.push({name:o[1],matcher:o[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const d=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(d)return e.push({name:d[1],matcher:d[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const t=i.split(/\[(.+?)\](?!\])/);return"/"+t.map((_,h)=>{if(h%2){if(_.startsWith("x+"))return ke(String.fromCharCode(parseInt(_.slice(2),16)));if(_.startsWith("u+"))return ke(String.fromCharCode(..._.slice(2).split("-").map(I=>parseInt(I,16))));const g=Pt.exec(_);if(!g)throw new Error(`Invalid param: ${_}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,w,S,T,D]=g;return e.push({name:T,matcher:D,optional:!!w,rest:!!S,chained:S?h===1&&t[0]==="":!1}),S?"(.*?)":w?"([^/]*)?":"([^/]+?)"}return ke(_)}).join("")}).join("")}/?$`),params:e}}function $t(a){return!/^\([^)]+\)$/.test(a)}function Nt(a){return a.slice(1).split("/").filter($t)}function Tt(a,e,n){const i={},o=a.slice(1);let d="";for(let t=0;t=t;)o[h]=o[h-1],h-=1;continue}return}i[f.name]=_}}if(!d)return i}function ke(a){return a.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function jt(a,e,n,i){const o=new Set(e);return Object.entries(n).map(([f,[_,h,g]])=>{const{pattern:w,params:S}=Ut(f),T={id:f,exec:D=>{const I=w.exec(D);if(I)return Tt(I,S,i)},errors:[1,...g||[]].map(D=>a[D]),layouts:[0,...h||[]].map(t),leaf:d(_)};return T.errors.length=T.layouts.length=Math.max(T.errors.length,T.layouts.length),T});function d(f){const _=f<0;return _&&(f=~f),[_,a[f]]}function t(f){return f===void 0?f:[o.has(f),a[f]]}}function Dt(a){let e,n,i;var o=a[0][0];function d(t){return{props:{data:t[2],form:t[1]}}}return o&&(e=X(o,d(a))),{c(){e&&Z(e.$$.fragment),n=B()},l(t){e&&Pe(e.$$.fragment,t),n=B()},m(t,f){e&&x(e,t,f),J(t,n,f),i=!0},p(t,f){const _={};if(f&4&&(_.data=t[2]),f&2&&(_.form=t[1]),o!==(o=t[0][0])){if(e){de();const h=e;F(h.$$.fragment,1,0,()=>{Q(h,1)}),pe()}o?(e=X(o,d(t)),Z(e.$$.fragment),M(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else o&&e.$set(_)},i(t){i||(e&&M(e.$$.fragment,t),i=!0)},o(t){e&&F(e.$$.fragment,t),i=!1},d(t){t&&G(n),e&&Q(e,t)}}}function Ct(a){let e,n,i;var o=a[0][0];function d(t){return{props:{data:t[2],$$slots:{default:[Vt]},$$scope:{ctx:t}}}}return o&&(e=X(o,d(a))),{c(){e&&Z(e.$$.fragment),n=B()},l(t){e&&Pe(e.$$.fragment,t),n=B()},m(t,f){e&&x(e,t,f),J(t,n,f),i=!0},p(t,f){const _={};if(f&4&&(_.data=t[2]),f&523&&(_.$$scope={dirty:f,ctx:t}),o!==(o=t[0][0])){if(e){de();const h=e;F(h.$$.fragment,1,0,()=>{Q(h,1)}),pe()}o?(e=X(o,d(t)),Z(e.$$.fragment),M(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else o&&e.$set(_)},i(t){i||(e&&M(e.$$.fragment,t),i=!0)},o(t){e&&F(e.$$.fragment,t),i=!1},d(t){t&&G(n),e&&Q(e,t)}}}function Vt(a){let e,n,i;var o=a[0][1];function d(t){return{props:{data:t[3],form:t[1]}}}return o&&(e=X(o,d(a))),{c(){e&&Z(e.$$.fragment),n=B()},l(t){e&&Pe(e.$$.fragment,t),n=B()},m(t,f){e&&x(e,t,f),J(t,n,f),i=!0},p(t,f){const _={};if(f&8&&(_.data=t[3]),f&2&&(_.form=t[1]),o!==(o=t[0][1])){if(e){de();const h=e;F(h.$$.fragment,1,0,()=>{Q(h,1)}),pe()}o?(e=X(o,d(t)),Z(e.$$.fragment),M(e.$$.fragment,1),x(e,n.parentNode,n)):e=null}else o&&e.$set(_)},i(t){i||(e&&M(e.$$.fragment,t),i=!0)},o(t){e&&F(e.$$.fragment,t),i=!1},d(t){t&&G(n),e&&Q(e,t)}}}function Ye(a){let e,n=a[5]&&Xe(a);return{c(){e=ft("div"),n&&n.c(),this.h()},l(i){e=ut(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var o=dt(e);n&&n.l(o),o.forEach(G),this.h()},h(){be(e,"id","svelte-announcer"),be(e,"aria-live","assertive"),be(e,"aria-atomic","true"),V(e,"position","absolute"),V(e,"left","0"),V(e,"top","0"),V(e,"clip","rect(0 0 0 0)"),V(e,"clip-path","inset(50%)"),V(e,"overflow","hidden"),V(e,"white-space","nowrap"),V(e,"width","1px"),V(e,"height","1px")},m(i,o){J(i,e,o),n&&n.m(e,null)},p(i,o){i[5]?n?n.p(i,o):(n=Xe(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&G(e),n&&n.d()}}}function Xe(a){let e;return{c(){e=pt(a[6])},l(n){e=ht(n,a[6])},m(n,i){J(n,e,i)},p(n,i){i&64&&mt(e,n[6])},d(n){n&&G(e)}}}function qt(a){let e,n,i,o,d;const t=[Ct,Dt],f=[];function _(g,w){return g[0][1]?0:1}e=_(a),n=f[e]=t[e](a);let h=a[4]&&Ye(a);return{c(){n.c(),i=it(),h&&h.c(),o=B()},l(g){n.l(g),i=lt(g),h&&h.l(g),o=B()},m(g,w){f[e].m(g,w),J(g,i,w),h&&h.m(g,w),J(g,o,w),d=!0},p(g,[w]){let S=e;e=_(g),e===S?f[e].p(g,w):(de(),F(f[S],1,1,()=>{f[S]=null}),pe(),n=f[e],n?n.p(g,w):(n=f[e]=t[e](g),n.c()),M(n,1),n.m(i.parentNode,i)),g[4]?h?h.p(g,w):(h=Ye(g),h.c(),h.m(o.parentNode,o)):h&&(h.d(1),h=null)},i(g){d||(M(n),d=!0)},o(g){F(n),d=!1},d(g){f[e].d(g),g&&G(i),h&&h.d(g),g&&G(o)}}}function Bt(a,e,n){let{stores:i}=e,{page:o}=e,{components:d}=e,{form:t}=e,{data_0:f=null}=e,{data_1:_=null}=e;ct(i.page.notify);let h=!1,g=!1,w=null;return Ie(()=>{const S=i.page.subscribe(()=>{h&&(n(5,g=!0),n(6,w=document.title||"untitled page"))});return n(4,h=!0),S}),a.$$set=S=>{"stores"in S&&n(7,i=S.stores),"page"in S&&n(8,o=S.page),"components"in S&&n(0,d=S.components),"form"in S&&n(1,t=S.form),"data_0"in S&&n(2,f=S.data_0),"data_1"in S&&n(3,_=S.data_1)},a.$$.update=()=>{a.$$.dirty&384&&i.page.set(o)},[d,t,f,_,h,g,w,i,o]}class Ft extends rt{constructor(e){super(),ot(this,e,Bt,qt,st,{stores:7,page:8,components:0,form:1,data_0:2,data_1:3})}}const Mt="modulepreload",Gt=function(a,e){return new URL(a,e).href},Ze={},W=function(e,n,i){if(!n||n.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(n.map(d=>{if(d=Gt(d,i),d in Ze)return;Ze[d]=!0;const t=d.endsWith(".css"),f=t?'[rel="stylesheet"]':"";if(!!i)for(let g=o.length-1;g>=0;g--){const w=o[g];if(w.href===d&&(!t||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${f}`))return;const h=document.createElement("link");if(h.rel=t?"stylesheet":Mt,t||(h.as="script",h.crossOrigin=""),h.href=d,document.head.appendChild(h),t)return new Promise((g,w)=>{h.addEventListener("load",g),h.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${d}`)))})})).then(()=>e())},Ht={},me=[()=>W(()=>import("./chunks/0-494c4032.js"),["./chunks/0-494c4032.js","./components/pages/_layout.svelte-eb1cc3e8.js","./chunks/index-fac9d42c.js","./chunks/stores-10673846.js","./chunks/singletons-8aa67421.js","./assets/_layout-7f5e19c9.css"],import.meta.url),()=>W(()=>import("./chunks/1-ec1787f8.js"),["./chunks/1-ec1787f8.js","./components/error.svelte-246cf555.js","./chunks/index-fac9d42c.js","./chunks/stores-10673846.js","./chunks/singletons-8aa67421.js"],import.meta.url),()=>W(()=>import("./chunks/2-d35ac8cc.js"),["./chunks/2-d35ac8cc.js","./components/pages/_page.svelte-fa763652.js","./chunks/index-fac9d42c.js"],import.meta.url),()=>W(()=>import("./chunks/3-e77bb67b.js"),["./chunks/3-e77bb67b.js","./components/pages/colors/_page.svelte-fb9a2599.js","./chunks/index-fac9d42c.js","./chunks/transform-0199f17a.js"],import.meta.url),()=>W(()=>import("./chunks/4-ebbcc64a.js"),["./chunks/4-ebbcc64a.js","./components/pages/happyfaces/_page.svelte-93850a70.js","./chunks/index-fac9d42c.js","./chunks/transform-0199f17a.js"],import.meta.url),()=>W(()=>import("./chunks/5-4f31fec2.js"),["./chunks/5-4f31fec2.js","./components/pages/stickycircle/_page.svelte-1aed0162.js","./chunks/index-fac9d42c.js"],import.meta.url)],tt=[],Jt={"/":[-3],"/colors":[-4],"/happyfaces":[4],"/stickycircle":[5]},Kt={handleError:({error:a})=>{console.error(a)}};let Ae=class{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},xe=class{constructor(e,n){this.status=e,this.location=n}};async function zt(a){var e;for(const n in a)if(typeof((e=a[n])==null?void 0:e.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(a).map(async([i,o])=>[i,await o])));return a}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");const Wt=-1,Yt=-2,Xt=-3,Zt=-4,xt=-5,Qt=-6;function en(a){if(typeof a=="number")return i(a,!0);if(!Array.isArray(a)||a.length===0)throw new Error("Invalid input");const e=a,n=Array(e.length);function i(o,d=!1){if(o===Wt)return;if(o===Xt)return NaN;if(o===Zt)return 1/0;if(o===xt)return-1/0;if(o===Qt)return-0;if(d)throw new Error("Invalid input");if(o in n)return n[o];const t=e[o];if(!t||typeof t!="object")n[o]=t;else if(Array.isArray(t))if(typeof t[0]=="string")switch(t[0]){case"Date":n[o]=new Date(t[1]);break;case"Set":const _=new Set;n[o]=_;for(let w=1;we!=null)}const Re=jt(me,tt,Jt,Ht),nt=me[0],Oe=me[1];nt();Oe();let Y={};try{Y=JSON.parse(sessionStorage[et])}catch{}function Se(a){Y[a]=ae()}function nn({target:a,base:e}){var Me;const n=document.documentElement,i=[];let o=null;const d={before_navigate:[],after_navigate:[]};let t={branch:[],error:null,url:null},f=!1,_=!1,h=!0,g=!1,w=!1,S=!1,T=!1,D,I=(Me=history.state)==null?void 0:Me[C];I||(I=Date.now(),history.replaceState({...history.state,[C]:I},"",location.href));const _e=Y[I];_e&&(history.scrollRestoration="manual",scrollTo(_e.x,_e.y));let H,$e,oe;async function Ne(){oe=oe||Promise.resolve(),await oe,oe=null;const r=new URL(location.href),s=le(r,!0);o=null,await je(s,r,[])}async function ge(r,{noScroll:s=!1,replaceState:c=!1,keepFocus:l=!1,state:p={},invalidateAll:u=!1},m,b){return typeof r=="string"&&(r=new URL(r,Je(document))),ce({url:r,scroll:s?ae():null,keepfocus:l,redirect_chain:m,details:{state:p,replaceState:c},nav_token:b,accepted:()=>{u&&(T=!0)},blocked:()=>{},type:"goto"})}async function Te(r){const s=le(r,!1);if(!s)throw new Error(`Attempted to preload a URL that does not belong to this app: ${r}`);return o={id:s.id,promise:Ve(s).then(c=>(c.type==="loaded"&&c.state.error&&(o=null),c))},o.promise}async function se(...r){const c=Re.filter(l=>r.some(p=>l.exec(p))).map(l=>Promise.all([...l.layouts,l.leaf].map(p=>p==null?void 0:p[1]())));await Promise.all(c)}async function je(r,s,c,l,p={},u){var b,v;$e=p;let m=r&&await Ve(r);if(m||(m=await Fe(s,{id:null},await ne(new Error(`Not found: ${s.pathname}`),{url:s,params:{},route:{id:null}}),404)),s=(r==null?void 0:r.url)||s,$e!==p)return!1;if(m.type==="redirect")if(c.length>10||c.includes(s.pathname))m=await ie({status:500,error:await ne(new Error("Redirect loop"),{url:s,params:{},route:{id:null}}),url:s,route:{id:null}});else return ge(new URL(m.location,s).href,{},[...c,s.pathname],p),!1;else((v=(b=m.props)==null?void 0:b.page)==null?void 0:v.status)>=400&&await q.updated.check()&&await te(s);if(i.length=0,T=!1,g=!0,l&&l.details){const{details:y}=l,k=y.replaceState?0:1;y.state[C]=I+=k,history[y.replaceState?"replaceState":"pushState"](y.state,"",s)}if(o=null,_?(t=m.state,m.props.page&&(m.props.page.url=s),D.$set(m.props)):De(m),l){const{scroll:y,keepfocus:k}=l,{activeElement:P}=document;await fe();const j=document.activeElement!==P&&document.activeElement!==document.body;if(!k&&!j&&await Le(),h){const L=s.hash&&document.getElementById(s.hash.slice(1));y?scrollTo(y.x,y.y):L?L.scrollIntoView():scrollTo(0,0)}}else await fe();h=!0,m.props.page&&(H=m.props.page),u&&u(),g=!1}function De(r){var l;t=r.state;const s=document.querySelector("style[data-sveltekit]");s&&s.remove(),H=r.props.page,D=new Ft({target:a,props:{...r.props,stores:q},hydrate:!0});const c={from:null,to:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};d.after_navigate.forEach(p=>p(c)),_=!0}async function ee({url:r,params:s,branch:c,status:l,error:p,route:u,form:m}){let b="never";for(const L of c)(L==null?void 0:L.slash)!==void 0&&(b=L.slash);r.pathname=wt(r.pathname,b),r.search=r.search;const v={type:"loaded",state:{url:r,params:s,branch:c,error:p,route:u},props:{components:tn(c).map(L=>L.node.component)}};m!==void 0&&(v.props.form=m);let y={},k=!H,P=0;for(let L=0;L(b.params.add(U),E[U])}),data:(u==null?void 0:u.data)??null,url:kt(c,()=>{b.url=!0}),async fetch(E,U){let N;E instanceof Request?(N=E.url,U={body:E.method==="GET"||E.method==="HEAD"?void 0:await E.blob(),cache:E.cache,credentials:E.credentials,headers:E.headers,integrity:E.integrity,keepalive:E.keepalive,method:E.method,mode:E.mode,redirect:E.redirect,referrer:E.referrer,referrerPolicy:E.referrerPolicy,signal:E.signal,...U}):N=E;const R=new URL(N,c).href;return j(R),_?Ot(N,R,U):At(N,U)},setHeaders:()=>{},depends:j,parent(){return b.parent=!0,s()}};m=await v.universal.load.call(null,L)??null,m=m?await zt(m):null}return{node:v,loader:r,server:u,universal:(k=v.universal)!=null&&k.load?{type:"data",data:m,uses:b}:null,data:m??(u==null?void 0:u.data)??null,slash:((P=v.universal)==null?void 0:P.trailingSlash)??(u==null?void 0:u.slash)}}function Ce(r,s,c,l,p){if(T)return!0;if(!l)return!1;if(l.parent&&r||l.route&&s||l.url&&c)return!0;for(const u of l.params)if(p[u]!==t.params[u])return!0;for(const u of l.dependencies)if(i.some(m=>m(new URL(u))))return!0;return!1}function we(r,s){return(r==null?void 0:r.type)==="data"?{type:"data",data:r.data,uses:{dependencies:new Set(r.uses.dependencies??[]),params:new Set(r.uses.params??[]),parent:!!r.uses.parent,route:!!r.uses.route,url:!!r.uses.url},slash:r.slash}:(r==null?void 0:r.type)==="skip"?s??null:null}async function Ve({id:r,invalidating:s,url:c,params:l,route:p}){if((o==null?void 0:o.id)===r)return o.promise;const{errors:u,layouts:m,leaf:b}=p,v=[...m,b];u.forEach(R=>R==null?void 0:R().catch(()=>{})),v.forEach(R=>R==null?void 0:R[1]().catch(()=>{}));let y=null;const k=t.url?r!==t.url.pathname+t.url.search:!1,P=t.route?p.id!==t.route.id:!1,j=v.reduce((R,O,$)=>{var z;const A=t.branch[$],K=!!(O!=null&&O[0])&&((A==null?void 0:A.loader)!==O[1]||Ce(R.some(Boolean),P,k,(z=A.server)==null?void 0:z.uses,l));return R.push(K),R},[]);if(j.some(Boolean)){try{y=await Qe(c,j)}catch(R){return ie({status:500,error:await ne(R,{url:c,params:l,route:{id:p.id}}),url:c,route:p})}if(y.type==="redirect")return y}const L=y==null?void 0:y.nodes;let E=!1;const U=v.map(async(R,O)=>{var z;if(!R)return;const $=t.branch[O],A=L==null?void 0:L[O];if((!A||A.type==="skip")&&R[1]===($==null?void 0:$.loader)&&!Ce(E,P,k,(z=$.universal)==null?void 0:z.uses,l))return $;if(E=!0,(A==null?void 0:A.type)==="error")throw A;return ye({loader:R[1],url:c,params:l,route:p,parent:async()=>{var He;const Ge={};for(let ve=0;ve{});const N=[];for(let R=0;RPromise.resolve({}),server_data_node:we(u)}),v={node:await Oe(),loader:Oe,universal:null,server:null,data:null};return await ee({url:c,params:p,branch:[b,v],status:r,error:s,route:null})}function le(r,s){if(ze(r,e))return;const c=vt(r.pathname.slice(e.length)||"/");for(const l of Re){const p=l.exec(c);if(p)return{id:r.pathname+r.search,invalidating:s,route:l,params:bt(p),url:r}}}function Be({url:r,type:s,intent:c,delta:l}){var b,v;let p=!1;const u={from:{params:t.params,route:{id:((b=t.route)==null?void 0:b.id)??null},url:t.url},to:{params:(c==null?void 0:c.params)??null,route:{id:((v=c==null?void 0:c.route)==null?void 0:v.id)??null},url:r},willUnload:!c,type:s};l!==void 0&&(u.delta=l);const m={...u,cancel:()=>{p=!0}};return w||d.before_navigate.forEach(y=>y(m)),p?null:u}async function ce({url:r,scroll:s,keepfocus:c,redirect_chain:l,details:p,type:u,delta:m,nav_token:b,accepted:v,blocked:y}){const k=le(r,!1),P=Be({url:r,type:u,delta:m,intent:k});if(!P){y();return}Se(I),v(),w=!0,_&&q.navigating.set(P),await je(k,r,l,{scroll:s,keepfocus:c,details:p},b,()=>{w=!1,d.after_navigate.forEach(j=>j(P)),q.navigating.set(null)})}async function Fe(r,s,c,l){return r.origin===location.origin&&r.pathname===location.pathname&&!f?await ie({status:l,error:c,url:r,route:s}):await te(r)}function te(r){return location.href=r.href,new Promise(()=>{})}function at(){let r;n.addEventListener("mousemove",u=>{const m=u.target;clearTimeout(r),r=setTimeout(()=>{l(m,2)},20)});function s(u){l(u.composedPath()[0],1)}n.addEventListener("mousedown",s),n.addEventListener("touchstart",s,{passive:!0});const c=new IntersectionObserver(u=>{for(const m of u)m.isIntersecting&&(se(new URL(m.target.href).pathname),c.unobserve(m.target))},{threshold:0});function l(u,m){const b=Ke(u,n);if(!b)return;const{url:v,external:y}=Ee(b,e);if(y)return;const k=ue(b);k.reload||(m<=k.preload_data?Te(v):m<=k.preload_code&&se(v.pathname))}function p(){c.disconnect();for(const u of n.querySelectorAll("a")){const{url:m,external:b}=Ee(u,e);if(b)continue;const v=ue(u);v.reload||(v.preload_code===We.viewport&&c.observe(u),v.preload_code===We.eager&&se(m.pathname))}}d.after_navigate.push(p),p()}return{after_navigate:r=>{Ie(()=>(d.after_navigate.push(r),()=>{const s=d.after_navigate.indexOf(r);d.after_navigate.splice(s,1)}))},before_navigate:r=>{Ie(()=>(d.before_navigate.push(r),()=>{const s=d.before_navigate.indexOf(r);d.before_navigate.splice(s,1)}))},disable_scroll_handling:()=>{(g||!_)&&(h=!1)},goto:(r,s={})=>ge(r,s,[]),invalidate:r=>{if(typeof r=="function")i.push(r);else{const{href:s}=new URL(r,location.href);i.push(c=>c.href===s)}return Ne()},invalidateAll:()=>(T=!0,Ne()),preload_data:async r=>{const s=new URL(r,Je(document));await Te(s)},preload_code:se,apply_action:async r=>{if(r.type==="error"){const s=new URL(location.href),{branch:c,route:l}=t;if(!l)return;const p=await qe(t.branch.length,c,l.errors);if(p){const u=await ee({url:s,params:t.params,branch:c.slice(0,p.idx).concat(p.node),status:r.status??500,error:r.error,route:l});t=u.state,D.$set(u.props),fe().then(Le)}}else if(r.type==="redirect")ge(r.location,{invalidateAll:!0},[]);else{const s={form:r.data,page:{...H,form:r.data,status:r.status}};D.$set(s),r.type==="success"&&fe().then(Le)}},_start_router:()=>{var r;history.scrollRestoration="manual",addEventListener("beforeunload",s=>{var l;let c=!1;if(!w){const p={from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url},to:null,willUnload:!0,type:"leave",cancel:()=>c=!0};d.before_navigate.forEach(u=>u(p))}c?(s.preventDefault(),s.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){Se(I);try{sessionStorage[et]=JSON.stringify(Y)}catch{}}}),(r=navigator.connection)!=null&&r.saveData||at(),n.addEventListener("click",s=>{if(s.button||s.which!==1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.defaultPrevented)return;const c=Ke(s.composedPath()[0],n);if(!c)return;const{url:l,external:p,target:u}=Ee(c,e);if(!l)return;if(u==="_parent"||u==="_top"){if(window.parent!==window)return}else if(u&&u!=="_self")return;const m=ue(c);if(!(c instanceof SVGAElement)&&l.protocol!==location.protocol&&!(l.protocol==="https:"||l.protocol==="http:"))return;if(p||m.reload){Be({url:l,type:"link"})||s.preventDefault(),w=!0;return}const[v,y]=l.href.split("#");if(y!==void 0&&v===location.href.split("#")[0]){S=!0,Se(I),t.url=l,q.page.set({...H,url:l}),q.page.notify();return}ce({url:l,scroll:m.noscroll?ae():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:l.href===location.href},accepted:()=>s.preventDefault(),blocked:()=>s.preventDefault(),type:"link"})}),n.addEventListener("submit",s=>{if(s.defaultPrevented)return;const c=HTMLFormElement.prototype.cloneNode.call(s.target),l=s.submitter;if(((l==null?void 0:l.formMethod)||c.method)!=="get")return;const u=new URL((l==null?void 0:l.hasAttribute("formaction"))&&(l==null?void 0:l.formAction)||c.action);if(ze(u,e))return;const m=s.target,{noscroll:b,reload:v}=ue(m);if(v)return;s.preventDefault(),s.stopPropagation();const y=new FormData(m),k=l==null?void 0:l.getAttribute("name");k&&y.append(k,(l==null?void 0:l.getAttribute("value"))??""),u.search=new URLSearchParams(y).toString(),ce({url:u,scroll:b?ae():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",s=>{var c;if((c=s.state)!=null&&c[C]){if(s.state[C]===I)return;const l=Y[s.state[C]];if(t.url.href.split("#")[0]===location.href.split("#")[0]){Y[I]=ae(),I=s.state[C],scrollTo(l.x,l.y);return}const p=s.state[C]-I;ce({url:new URL(location.href),scroll:l,keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{I=s.state[C]},blocked:()=>{history.go(-p)},type:"popstate",delta:p})}}),addEventListener("hashchange",()=>{S&&(S=!1,history.replaceState({...history.state,[C]:++I},"",location.href))});for(const s of document.querySelectorAll("link"))s.rel==="icon"&&(s.href=s.href);addEventListener("pageshow",s=>{s.persisted&&q.navigating.set(null)})},_hydrate:async({status:r=200,error:s,node_ids:c,params:l,route:p,data:u,form:m})=>{f=!0;const b=new URL(location.href);({params:l={},route:p={id:null}}=le(b,!1)||{});let v;try{const y=c.map(async(k,P)=>{const j=u[P];return ye({loader:me[k],url:b,params:l,route:p,parent:async()=>{const L={};for(let E=0;Ek===p.id)??null})}catch(y){if(y instanceof xe){await te(new URL(y.location,location.href));return}v=await ie({status:y instanceof Ae?y.status:500,error:await ne(y,{url:b,params:l,route:p}),url:b,route:p})}De(v)}}}async function Qe(a,e){var d;const n=new URL(a);n.pathname=Lt(a.pathname),n.searchParams.append("x-sveltekit-invalidated",e.map(t=>t?"1":"").join("_"));const i=await he(n.href),o=await i.json();if(!i.ok)throw new Error(o);return(d=o.nodes)==null||d.forEach(t=>{(t==null?void 0:t.type)==="data"&&(t.data=en(t.data),t.uses={dependencies:new Set(t.uses.dependencies??[]),params:new Set(t.uses.params??[]),parent:!!t.uses.parent,route:!!t.uses.route,url:!!t.uses.url})}),o}function ne(a,e){return a instanceof Ae?a.body:Kt.handleError({error:a,event:e})??{message:e.route.id!=null?"Internal Error":"Not Found"}}function Le(){const a=document.querySelector("[autofocus]");if(a)a.focus();else{const e=document.body,n=e.getAttribute("tabindex");return e.tabIndex=-1,e.focus({preventScroll:!0}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex"),new Promise(i=>{setTimeout(()=>{var o;i((o=getSelection())==null?void 0:o.removeAllRanges())})})}}async function ln({env:a,hydrate:e,paths:n,target:i,version:o}){_t(n),yt(o);const d=nn({target:i,base:n.base});gt({client:d}),e?await d._hydrate(e):d.goto(location.href,{replaceState:!0}),d._start_router()}export{ln as start}; 2 | -------------------------------------------------------------------------------- /.svelte-kit/output/client/_app/version.json: -------------------------------------------------------------------------------- 1 | {"version":"1674915924012"} -------------------------------------------------------------------------------- /.svelte-kit/output/client/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biscotty666/SvelteDataVisualization/716f8f16b70e524b9a8aaa6b0f68c0f5eb1a75f0/.svelte-kit/output/client/favicon.png -------------------------------------------------------------------------------- /.svelte-kit/output/server/chunks/index.js: -------------------------------------------------------------------------------- 1 | function noop() { 2 | } 3 | function run(fn) { 4 | return fn(); 5 | } 6 | function blank_object() { 7 | return /* @__PURE__ */ Object.create(null); 8 | } 9 | function run_all(fns) { 10 | fns.forEach(run); 11 | } 12 | function safe_not_equal(a, b) { 13 | return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function"); 14 | } 15 | function subscribe(store, ...callbacks) { 16 | if (store == null) { 17 | return noop; 18 | } 19 | const unsub = store.subscribe(...callbacks); 20 | return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; 21 | } 22 | let current_component; 23 | function set_current_component(component) { 24 | current_component = component; 25 | } 26 | function get_current_component() { 27 | if (!current_component) 28 | throw new Error("Function called outside component initialization"); 29 | return current_component; 30 | } 31 | function setContext(key, context) { 32 | get_current_component().$$.context.set(key, context); 33 | return context; 34 | } 35 | function getContext(key) { 36 | return get_current_component().$$.context.get(key); 37 | } 38 | Promise.resolve(); 39 | const ATTR_REGEX = /[&"]/g; 40 | const CONTENT_REGEX = /[&<]/g; 41 | function escape(value, is_attr = false) { 42 | const str = String(value); 43 | const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX; 44 | pattern.lastIndex = 0; 45 | let escaped = ""; 46 | let last = 0; 47 | while (pattern.test(str)) { 48 | const i = pattern.lastIndex - 1; 49 | const ch = str[i]; 50 | escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<"); 51 | last = i + 1; 52 | } 53 | return escaped + str.substring(last); 54 | } 55 | function each(items, fn) { 56 | let str = ""; 57 | for (let i = 0; i < items.length; i += 1) { 58 | str += fn(items[i], i); 59 | } 60 | return str; 61 | } 62 | const missing_component = { 63 | $$render: () => "" 64 | }; 65 | function validate_component(component, name) { 66 | if (!component || !component.$$render) { 67 | if (name === "svelte:component") 68 | name += " this={...}"; 69 | throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`); 70 | } 71 | return component; 72 | } 73 | let on_destroy; 74 | function create_ssr_component(fn) { 75 | function $$render(result, props, bindings, slots, context) { 76 | const parent_component = current_component; 77 | const $$ = { 78 | on_destroy, 79 | context: new Map(context || (parent_component ? parent_component.$$.context : [])), 80 | // these will be immediately discarded 81 | on_mount: [], 82 | before_update: [], 83 | after_update: [], 84 | callbacks: blank_object() 85 | }; 86 | set_current_component({ $$ }); 87 | const html = fn(result, props, bindings, slots); 88 | set_current_component(parent_component); 89 | return html; 90 | } 91 | return { 92 | render: (props = {}, { $$slots = {}, context = /* @__PURE__ */ new Map() } = {}) => { 93 | on_destroy = []; 94 | const result = { title: "", head: "", css: /* @__PURE__ */ new Set() }; 95 | const html = $$render(result, props, {}, $$slots, context); 96 | run_all(on_destroy); 97 | return { 98 | html, 99 | css: { 100 | code: Array.from(result.css).map((css) => css.code).join("\n"), 101 | map: null 102 | // TODO 103 | }, 104 | head: result.title + result.head 105 | }; 106 | }, 107 | $$render 108 | }; 109 | } 110 | function add_attribute(name, value, boolean) { 111 | if (value == null || boolean && !value) 112 | return ""; 113 | const assignment = boolean && value === true ? "" : `="${escape(value, true)}"`; 114 | return ` ${name}${assignment}`; 115 | } 116 | export { 117 | setContext as a, 118 | subscribe as b, 119 | create_ssr_component as c, 120 | add_attribute as d, 121 | escape as e, 122 | each as f, 123 | getContext as g, 124 | missing_component as m, 125 | noop as n, 126 | safe_not_equal as s, 127 | validate_component as v 128 | }; 129 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/chunks/internal.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, a as setContext, v as validate_component, m as missing_component } from "./index.js"; 2 | let assets = ""; 3 | let base = ""; 4 | let version = ""; 5 | let public_env = {}; 6 | function set_paths(paths) { 7 | base = paths.base; 8 | assets = paths.assets || base; 9 | } 10 | function set_building(value) { 11 | } 12 | function set_private_env(environment) { 13 | } 14 | function set_public_env(environment) { 15 | public_env = environment; 16 | } 17 | function set_version(value) { 18 | version = value; 19 | } 20 | function afterUpdate() { 21 | } 22 | const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => { 23 | let { stores } = $$props; 24 | let { page } = $$props; 25 | let { components } = $$props; 26 | let { form } = $$props; 27 | let { data_0 = null } = $$props; 28 | let { data_1 = null } = $$props; 29 | { 30 | setContext("__svelte__", stores); 31 | } 32 | afterUpdate(stores.page.notify); 33 | if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0) 34 | $$bindings.stores(stores); 35 | if ($$props.page === void 0 && $$bindings.page && page !== void 0) 36 | $$bindings.page(page); 37 | if ($$props.components === void 0 && $$bindings.components && components !== void 0) 38 | $$bindings.components(components); 39 | if ($$props.form === void 0 && $$bindings.form && form !== void 0) 40 | $$bindings.form(form); 41 | if ($$props.data_0 === void 0 && $$bindings.data_0 && data_0 !== void 0) 42 | $$bindings.data_0(data_0); 43 | if ($$props.data_1 === void 0 && $$bindings.data_1 && data_1 !== void 0) 44 | $$bindings.data_1(data_1); 45 | { 46 | stores.page.set(page); 47 | } 48 | return ` 49 | 50 | 51 | ${components[1] ? `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, { data: data_0 }, {}, { 52 | default: () => { 53 | return `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, { data: data_1, form }, {}, {})}`; 54 | } 55 | })}` : `${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, { data: data_0, form }, {}, {})}`} 56 | 57 | ${``}`; 58 | }); 59 | set_paths({ "base": "", "assets": "" }); 60 | set_version("1674915924012"); 61 | const options = { 62 | csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } }, 63 | csrf_check_origin: true, 64 | embedded: false, 65 | env_public_prefix: "PUBLIC_", 66 | hooks: null, 67 | // added lazily, via `get_hooks` 68 | root: Root, 69 | service_worker: false, 70 | templates: { 71 | app: ({ head, body, assets: assets2, nonce, env }) => '\n\n \n \n \n \n \n \n ' + head + '\n \n \n \n
' + body + "
\n \n\n", 72 | error: ({ status, message }) => '\n\n \n \n ' + message + ` 73 | 74 | 114 | 115 | 116 |
117 | ` + status + '\n
\n

' + message + "

\n
\n
\n \n\n" 118 | } 119 | }; 120 | function get_hooks() { 121 | return {}; 122 | } 123 | export { 124 | assets as a, 125 | base as b, 126 | set_building as c, 127 | set_paths as d, 128 | set_private_env as e, 129 | get_hooks as g, 130 | options as o, 131 | public_env as p, 132 | set_public_env as s, 133 | version as v 134 | }; 135 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/chunks/stores.js: -------------------------------------------------------------------------------- 1 | import { g as getContext } from "./index.js"; 2 | const getStores = () => { 3 | const stores = getContext("__svelte__"); 4 | return { 5 | page: { 6 | subscribe: stores.page.subscribe 7 | }, 8 | navigating: { 9 | subscribe: stores.navigating.subscribe 10 | }, 11 | updated: stores.updated 12 | }; 13 | }; 14 | const page = { 15 | /** @param {(value: any) => void} fn */ 16 | subscribe(fn) { 17 | const store = getStores().page; 18 | return store.subscribe(fn); 19 | } 20 | }; 21 | export { 22 | page as p 23 | }; 24 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/fallbacks/error.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, b as subscribe, e as escape } from "../../chunks/index.js"; 2 | import { p as page } from "../../chunks/stores.js"; 3 | const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => { 4 | let $page, $$unsubscribe_page; 5 | $$unsubscribe_page = subscribe(page, (value) => $page = value); 6 | $$unsubscribe_page(); 7 | return `

${escape($page.status)}

8 |

${escape($page.error?.message)}

`; 9 | }); 10 | export { 11 | Error as default 12 | }; 13 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/_layout.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, b as subscribe, v as validate_component } from "../../chunks/index.js"; 2 | import { p as page } from "../../chunks/stores.js"; 3 | const Navbar_svelte_svelte_type_style_lang = ""; 4 | const css = { 5 | code: "nav.svelte-1mun0q1{background-color:#212529;color:white}.container.svelte-1mun0q1{display:flex;align-items:center}a.svelte-1mun0q1{color:#aaa;text-decoration:none;padding-left:5px}.active.svelte-1mun0q1{color:white}ul.svelte-1mun0q1{display:flex;list-style:none;margin-left:auto;font-size:1em}li.svelte-1mun0q1{margin-right:20px}h1.svelte-1mun0q1{margin:0;font-size:1.1em;font-weight:normal}", 6 | map: null 7 | }; 8 | const Navbar = create_ssr_component(($$result, $$props, $$bindings, slots) => { 9 | let routeId; 10 | let $page, $$unsubscribe_page; 11 | $$unsubscribe_page = subscribe(page, (value) => $page = value); 12 | $$result.css.add(css); 13 | routeId = $page.route.id; 14 | $$unsubscribe_page(); 15 | return ``; 20 | }); 21 | const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => { 22 | return `${validate_component(Navbar, "Navbar").$$render($$result, {}, {}, {})} 23 | ${slots.default ? slots.default({}) : ``}`; 24 | }); 25 | export { 26 | Layout as default 27 | }; 28 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/_page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3"; 2 | const csvUrl = "https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/639388c2cbc2120a14dcf466e85730eb8be498bb/iris.csv"; 3 | const load = async () => { 4 | const getFlowers = async () => { 5 | const row = (d) => { 6 | d.sepal_length = +d.sepal_length; 7 | d.sepal_width = +d.sepal_width; 8 | d.petal_length = +d.petal_length; 9 | d.petal_width = +d.petal_width; 10 | return d; 11 | }; 12 | const data = await csv(csvUrl, row); 13 | return data; 14 | }; 15 | return { 16 | flowers: getFlowers() 17 | }; 18 | }; 19 | export { 20 | load 21 | }; 22 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/_page.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component } from "../../chunks/index.js"; 2 | const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { 3 | return `

Data Visualizations

4 |

A Svelte recasting of the Excellent Series by Curran Kelleher using D3 with React.

5 |
`; 6 | }); 7 | export { 8 | Page as default 9 | }; 10 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/colors/_page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3"; 2 | const csvUrl = "https://gist.githubusercontent.com/curran/b236990081a24761f7000567094914e0/raw/cssNamedColors.csv"; 3 | const load = async () => { 4 | const getColors = async () => { 5 | const data = await csv(csvUrl); 6 | console.log(data); 7 | return data; 8 | }; 9 | return { 10 | colors: getColors() 11 | }; 12 | }; 13 | export { 14 | load 15 | }; 16 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/colors/_page.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, d as add_attribute, f as each } from "../../../chunks/index.js"; 2 | import { arc } from "d3"; 3 | const width = 960; 4 | const height = 500; 5 | const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { 6 | let { data } = $$props; 7 | const { colors } = data; 8 | const centerX = width / 2; 9 | const centerY = height / 2; 10 | const pieArc = arc().innerRadius(0).outerRadius(width); 11 | if ($$props.data === void 0 && $$bindings.data && data !== void 0) 12 | $$bindings.data(data); 13 | return `
${each(colors, (color, i) => { 14 | return ``; 22 | })} 23 |
`; 24 | }); 25 | export { 26 | Page as default 27 | }; 28 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/happyfaces/_page.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, d as add_attribute, v as validate_component, f as each } from "../../../chunks/index.js"; 2 | import { arc } from "d3"; 3 | const Eyes = create_ssr_component(($$result, $$props, $$bindings, slots) => { 4 | let { eyeOffsetX: eyeOffsetX2 } = $$props; 5 | let { eyeOffsetY: eyeOffsetY2 } = $$props; 6 | let { eyeRadius: eyeRadius2 } = $$props; 7 | if ($$props.eyeOffsetX === void 0 && $$bindings.eyeOffsetX && eyeOffsetX2 !== void 0) 8 | $$bindings.eyeOffsetX(eyeOffsetX2); 9 | if ($$props.eyeOffsetY === void 0 && $$bindings.eyeOffsetY && eyeOffsetY2 !== void 0) 10 | $$bindings.eyeOffsetY(eyeOffsetY2); 11 | if ($$props.eyeRadius === void 0 && $$bindings.eyeRadius && eyeRadius2 !== void 0) 12 | $$bindings.eyeRadius(eyeRadius2); 13 | return ` 14 | `; 15 | }); 16 | const Mouth = create_ssr_component(($$result, $$props, $$bindings, slots) => { 17 | let { mouthRadius: mouthRadius2 } = $$props; 18 | let { mouthWidth: mouthWidth2 } = $$props; 19 | const mouthArc = arc().innerRadius(mouthRadius2).outerRadius(mouthRadius2 + mouthWidth2).startAngle(Math.PI / 2).endAngle(Math.PI * 3 / 2); 20 | if ($$props.mouthRadius === void 0 && $$bindings.mouthRadius && mouthRadius2 !== void 0) 21 | $$bindings.mouthRadius(mouthRadius2); 22 | if ($$props.mouthWidth === void 0 && $$bindings.mouthWidth && mouthWidth2 !== void 0) 23 | $$bindings.mouthWidth(mouthWidth2); 24 | return ``; 25 | }); 26 | const BackgroundCircle = create_ssr_component(($$result, $$props, $$bindings, slots) => { 27 | let { strokeWidth: strokeWidth2 } = $$props; 28 | let { centerY } = $$props; 29 | if ($$props.strokeWidth === void 0 && $$bindings.strokeWidth && strokeWidth2 !== void 0) 30 | $$bindings.strokeWidth(strokeWidth2); 31 | if ($$props.centerY === void 0 && $$bindings.centerY && centerY !== void 0) 32 | $$bindings.centerY(centerY); 33 | return ``; 34 | }); 35 | const Face = create_ssr_component(($$result, $$props, $$bindings, slots) => { 36 | let { width: width2 } = $$props; 37 | let { height: height2 } = $$props; 38 | let { centerX } = $$props; 39 | let { centerY } = $$props; 40 | let { strokeWidth: strokeWidth2 } = $$props; 41 | let { eyeOffsetX: eyeOffsetX2 } = $$props; 42 | let { eyeOffsetY: eyeOffsetY2 } = $$props; 43 | let { eyeRadius: eyeRadius2 } = $$props; 44 | let { mouthRadius: mouthRadius2 } = $$props; 45 | let { mouthWidth: mouthWidth2 } = $$props; 46 | if ($$props.width === void 0 && $$bindings.width && width2 !== void 0) 47 | $$bindings.width(width2); 48 | if ($$props.height === void 0 && $$bindings.height && height2 !== void 0) 49 | $$bindings.height(height2); 50 | if ($$props.centerX === void 0 && $$bindings.centerX && centerX !== void 0) 51 | $$bindings.centerX(centerX); 52 | if ($$props.centerY === void 0 && $$bindings.centerY && centerY !== void 0) 53 | $$bindings.centerY(centerY); 54 | if ($$props.strokeWidth === void 0 && $$bindings.strokeWidth && strokeWidth2 !== void 0) 55 | $$bindings.strokeWidth(strokeWidth2); 56 | if ($$props.eyeOffsetX === void 0 && $$bindings.eyeOffsetX && eyeOffsetX2 !== void 0) 57 | $$bindings.eyeOffsetX(eyeOffsetX2); 58 | if ($$props.eyeOffsetY === void 0 && $$bindings.eyeOffsetY && eyeOffsetY2 !== void 0) 59 | $$bindings.eyeOffsetY(eyeOffsetY2); 60 | if ($$props.eyeRadius === void 0 && $$bindings.eyeRadius && eyeRadius2 !== void 0) 61 | $$bindings.eyeRadius(eyeRadius2); 62 | if ($$props.mouthRadius === void 0 && $$bindings.mouthRadius && mouthRadius2 !== void 0) 63 | $$bindings.mouthRadius(mouthRadius2); 64 | if ($$props.mouthWidth === void 0 && $$bindings.mouthWidth && mouthWidth2 !== void 0) 65 | $$bindings.mouthWidth(mouthWidth2); 66 | return `${validate_component(BackgroundCircle, "BackgroundCircle").$$render($$result, { centerY, strokeWidth: strokeWidth2 }, {}, {})}${validate_component(Eyes, "Eyes").$$render($$result, { eyeOffsetX: eyeOffsetX2, eyeOffsetY: eyeOffsetY2, eyeRadius: eyeRadius2 }, {}, {})}${validate_component(Mouth, "Mouth").$$render($$result, { mouthRadius: mouthRadius2, mouthWidth: mouthWidth2 }, {}, {})}`; 67 | }); 68 | const width = 160; 69 | const height = 160; 70 | const strokeWidth = 6; 71 | const eyeOffsetX = 20; 72 | const eyeOffsetY = 20; 73 | const eyeRadius = 5; 74 | const mouthWidth = 7; 75 | const mouthRadius = 30; 76 | const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { 77 | const centerX = width / 2; 78 | const centerY = height / 2; 79 | return `
${each(Array(6 * 3), (_) => { 80 | return `${validate_component(Face, "Face").$$render( 81 | $$result, 82 | { 83 | width, 84 | height, 85 | centerX, 86 | centerY, 87 | strokeWidth: strokeWidth + Math.random() * 3, 88 | eyeOffsetX: eyeOffsetX + Math.random() * 9, 89 | eyeOffsetY: eyeOffsetY + Math.random() * 15, 90 | eyeRadius: eyeRadius + Math.random() * 10, 91 | mouthWidth: mouthWidth + Math.random() * 9, 92 | mouthRadius: mouthRadius + Math.random() * 10 93 | }, 94 | {}, 95 | {} 96 | )}`; 97 | })} 98 |
`; 99 | }); 100 | export { 101 | Page as default 102 | }; 103 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/entries/pages/stickycircle/_page.svelte.js: -------------------------------------------------------------------------------- 1 | import { c as create_ssr_component, d as add_attribute } from "../../../chunks/index.js"; 2 | const width = 960; 3 | const height = 500; 4 | const circleRadius = 30; 5 | const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { 6 | let mousePosition; 7 | mousePosition = { x: width / 2, y: height / 2 }; 8 | return `
9 |
`; 10 | }); 11 | export { 12 | Page as default 13 | }; 14 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/internal.js: -------------------------------------------------------------------------------- 1 | import { g, o, c, d, e, s } from "./chunks/internal.js"; 2 | export { 3 | g as get_hooks, 4 | o as options, 5 | c as set_building, 6 | d as set_paths, 7 | e as set_private_env, 8 | s as set_public_env 9 | }; 10 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/manifest-full.js: -------------------------------------------------------------------------------- 1 | export const manifest = { 2 | appDir: "_app", 3 | appPath: "_app", 4 | assets: new Set(["favicon.png"]), 5 | mimeTypes: {".png":"image/png"}, 6 | _: { 7 | entry: {"file":"_app/immutable/start-cac21a0c.js","imports":["_app/immutable/start-cac21a0c.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/singletons-8aa67421.js"],"stylesheets":[],"fonts":[]}, 8 | nodes: [ 9 | () => import('./nodes/0.js'), 10 | () => import('./nodes/1.js'), 11 | () => import('./nodes/2.js'), 12 | () => import('./nodes/3.js'), 13 | () => import('./nodes/4.js'), 14 | () => import('./nodes/5.js') 15 | ], 16 | routes: [ 17 | { 18 | id: "/", 19 | pattern: /^\/$/, 20 | params: [], 21 | page: { layouts: [0], errors: [1], leaf: 2 }, 22 | endpoint: null 23 | }, 24 | { 25 | id: "/colors", 26 | pattern: /^\/colors\/?$/, 27 | params: [], 28 | page: { layouts: [0], errors: [1], leaf: 3 }, 29 | endpoint: null 30 | }, 31 | { 32 | id: "/happyfaces", 33 | pattern: /^\/happyfaces\/?$/, 34 | params: [], 35 | page: { layouts: [0], errors: [1], leaf: 4 }, 36 | endpoint: null 37 | }, 38 | { 39 | id: "/stickycircle", 40 | pattern: /^\/stickycircle\/?$/, 41 | params: [], 42 | page: { layouts: [0], errors: [1], leaf: 5 }, 43 | endpoint: null 44 | } 45 | ], 46 | matchers: async () => { 47 | 48 | return { }; 49 | } 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/manifest.js: -------------------------------------------------------------------------------- 1 | export const manifest = { 2 | appDir: "_app", 3 | appPath: "_app", 4 | assets: new Set(["favicon.png"]), 5 | mimeTypes: {".png":"image/png"}, 6 | _: { 7 | entry: {"file":"_app/immutable/start-cac21a0c.js","imports":["_app/immutable/start-cac21a0c.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/singletons-8aa67421.js"],"stylesheets":[],"fonts":[]}, 8 | nodes: [ 9 | () => import('./nodes/0.js'), 10 | () => import('./nodes/1.js'), 11 | () => import('./nodes/2.js'), 12 | () => import('./nodes/3.js'), 13 | () => import('./nodes/4.js'), 14 | () => import('./nodes/5.js') 15 | ], 16 | routes: [ 17 | { 18 | id: "/", 19 | pattern: /^\/$/, 20 | params: [], 21 | page: { layouts: [0], errors: [1], leaf: 2 }, 22 | endpoint: null 23 | }, 24 | { 25 | id: "/colors", 26 | pattern: /^\/colors\/?$/, 27 | params: [], 28 | page: { layouts: [0], errors: [1], leaf: 3 }, 29 | endpoint: null 30 | }, 31 | { 32 | id: "/happyfaces", 33 | pattern: /^\/happyfaces\/?$/, 34 | params: [], 35 | page: { layouts: [0], errors: [1], leaf: 4 }, 36 | endpoint: null 37 | }, 38 | { 39 | id: "/stickycircle", 40 | pattern: /^\/stickycircle\/?$/, 41 | params: [], 42 | page: { layouts: [0], errors: [1], leaf: 5 }, 43 | endpoint: null 44 | } 45 | ], 46 | matchers: async () => { 47 | 48 | return { }; 49 | } 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/0.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const index = 0; 4 | export const component = async () => (await import('../entries/pages/_layout.svelte.js')).default; 5 | export const file = '_app/immutable/components/pages/_layout.svelte-eb1cc3e8.js'; 6 | export const imports = ["_app/immutable/components/pages/_layout.svelte-eb1cc3e8.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/stores-10673846.js","_app/immutable/chunks/singletons-8aa67421.js"]; 7 | export const stylesheets = ["_app/immutable/assets/_layout-7f5e19c9.css"]; 8 | export const fonts = []; 9 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/1.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const index = 1; 4 | export const component = async () => (await import('../entries/fallbacks/error.svelte.js')).default; 5 | export const file = '_app/immutable/components/error.svelte-246cf555.js'; 6 | export const imports = ["_app/immutable/components/error.svelte-246cf555.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/stores-10673846.js","_app/immutable/chunks/singletons-8aa67421.js"]; 7 | export const stylesheets = []; 8 | export const fonts = []; 9 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/2.js: -------------------------------------------------------------------------------- 1 | import * as server from '../entries/pages/_page.server.js'; 2 | 3 | export const index = 2; 4 | export const component = async () => (await import('../entries/pages/_page.svelte.js')).default; 5 | export const file = '_app/immutable/components/pages/_page.svelte-fa763652.js'; 6 | export { server }; 7 | export const imports = ["_app/immutable/components/pages/_page.svelte-fa763652.js","_app/immutable/chunks/index-fac9d42c.js"]; 8 | export const stylesheets = []; 9 | export const fonts = []; 10 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/3.js: -------------------------------------------------------------------------------- 1 | import * as server from '../entries/pages/colors/_page.server.js'; 2 | 3 | export const index = 3; 4 | export const component = async () => (await import('../entries/pages/colors/_page.svelte.js')).default; 5 | export const file = '_app/immutable/components/pages/colors/_page.svelte-fb9a2599.js'; 6 | export { server }; 7 | export const imports = ["_app/immutable/components/pages/colors/_page.svelte-fb9a2599.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/transform-0199f17a.js"]; 8 | export const stylesheets = []; 9 | export const fonts = []; 10 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/4.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const index = 4; 4 | export const component = async () => (await import('../entries/pages/happyfaces/_page.svelte.js')).default; 5 | export const file = '_app/immutable/components/pages/happyfaces/_page.svelte-93850a70.js'; 6 | export const imports = ["_app/immutable/components/pages/happyfaces/_page.svelte-93850a70.js","_app/immutable/chunks/index-fac9d42c.js","_app/immutable/chunks/transform-0199f17a.js"]; 7 | export const stylesheets = []; 8 | export const fonts = []; 9 | -------------------------------------------------------------------------------- /.svelte-kit/output/server/nodes/5.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const index = 5; 4 | export const component = async () => (await import('../entries/pages/stickycircle/_page.svelte.js')).default; 5 | export const file = '_app/immutable/components/pages/stickycircle/_page.svelte-1aed0162.js'; 6 | export const imports = ["_app/immutable/components/pages/stickycircle/_page.svelte-1aed0162.js","_app/immutable/chunks/index-fac9d42c.js"]; 7 | export const stylesheets = []; 8 | export const fonts = []; 9 | -------------------------------------------------------------------------------- /.svelte-kit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "$lib": [ 5 | "../src/lib" 6 | ], 7 | "$lib/*": [ 8 | "../src/lib/*" 9 | ] 10 | }, 11 | "rootDirs": [ 12 | "..", 13 | "./types" 14 | ], 15 | "importsNotUsedAsValues": "error", 16 | "isolatedModules": true, 17 | "preserveValueImports": true, 18 | "lib": [ 19 | "esnext", 20 | "DOM", 21 | "DOM.Iterable" 22 | ], 23 | "moduleResolution": "node", 24 | "module": "esnext", 25 | "target": "esnext" 26 | }, 27 | "include": [ 28 | "ambient.d.ts", 29 | "./types/**/$types.d.ts", 30 | "../vite.config.ts", 31 | "../src/**/*.js", 32 | "../src/**/*.ts", 33 | "../src/**/*.svelte", 34 | "../tests/**/*.js", 35 | "../tests/**/*.ts", 36 | "../tests/**/*.svelte" 37 | ], 38 | "exclude": [ 39 | "../node_modules/**", 40 | "./[!ambient.d.ts]**", 41 | "../src/service-worker.js", 42 | "../src/service-worker.ts", 43 | "../src/service-worker.d.ts" 44 | ] 45 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 biscotty666 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Since people seem to be following this I should say that I'm not working on it right now because I'm doing some stuff with R. It would be great if someone picked up where I left off. If not I do plan to finish, just not yet. 2 | 3 | # Project running at 4 | 5 | ### [Project (Vercel)](https://sveltekit-1-biscotty666.vercel.app/) 6 | 7 | ### [Project (GitHub)](https://sveltekit-1-biscotty666.vercel.app/) 8 | 9 | # D3 With Svelte 10 | 11 | Based on [Curran Kelleher's](https://www.youtube.com/channel/UCSwd_9jyX4YtDYm9p9MxQqw) excellent Series using D3 with React. 12 | 13 | ## Project data resources 14 | 15 | [Missing Migrants Project](https://missingmigrants.iom.int/data) 16 | 17 | [Simplemaps World Cities Database](https://simplemaps.com/data/world-cities) 18 | 19 | [UN World Population Prospects](https://population.un.org/wpp/Download/Standard/MostUsed/) 20 | 21 | [Data Canvas: Sense Your City](https://grayarea.org/initiative/data-canvas-sense-your-city/) 22 | 23 | [Curran's Sense Your City Data]('https://gist.githubusercontent.com/curran/90240a6d88bdb1411467b21ea0769029/raw/7d4c3914cc6a29a7f5165f7d5d82b735d97bcfe4/week_temperature_sf.csv') 24 | 25 | [Natural Earth TopoJSON](https://github.com/topojson/world-atlas) 26 | 27 | [unpkg world-atlas ](https://unpkg.com/world-atlas@2.0.2/countries-50m.json) 28 | 29 | ## Tech Resources 30 | 31 | [Sunlight Foundation Data Visualization Style Guide](https://sunlightfoundation.com/2014/03/12/datavizguide/) 32 | 33 | [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG) 34 | 35 | ## Finding Visualizations 36 | 37 | [Reuters Graphics](https://www.reuters.com/graphics/) 38 | 39 | [The Upshot (NYT)](https://www.nytimes.com/section/upshot) 40 | 41 | [The Pudding](https://pudding.cool/) 42 | 43 | [FiveThirtyEight](https://fivethirtyeight.com/tag/data-visualization/) 44 | 45 | [FLOWINGDATA](https://flowingdata.com/) 46 | 47 | [Data Is Beautiful (Reddit)](https://www.reddit.com/r/dataisbeautiful/) 48 | 49 | [Information is Beautiful](https://informationisbeautiful.net/) 50 | 51 | [Information is Beautiful Awards](https://www.informationisbeautifulawards.com/) 52 | 53 | [Graphic Detail (The Economist)](https://www.economist.com/graphic-detail) 54 | 55 | [#dataviz (Twitter)](https://twitter.com/hashtag/dataviz) 56 | 57 | [Data Visualization Society (twitter)](https://twitter.com/DataVizSociety) 58 | 59 | [Our World in Data](https://ourworldindata.org/) 60 | 61 | ## Components 62 | 63 | [Blockbuilder Search (obsereablehq)](https://observablehq.com/@enjalot/blockbuilder-search-data) 64 | 65 | ## Coronavirus 66 | 67 | ### Existing Resources 68 | 69 | [Johns Hopkins CV Dataset](https://coronavirus.jhu.edu/) 70 | 71 | [Johns Hopkins Github](https://github.com/CSSEGISandData/COVID-19) 72 | 73 | [Our World in Data CV Visualizations](https://ourworldindata.org/explorers/coronavirus-data-explorer?zoomToSelection=true&country=~OWID_WRL&hideControls=true&Interval=Cumulative&Relative+to+Population=false&Metric=Confirmed+deaths&Color+by+test+positivity=false) 74 | 75 | [Our World in Data Github](https://github.com/owid/covid-19-data/tree/master/public/data) 76 | 77 | [Financial Times](https://www.ft.com/content/a2901ce8-5eb7-4633-b89c-cbdf5b386938) 78 | 79 | [Information is Beautiful Visualizations](https://informationisbeautiful.net/visualizations/covid-19-coronavirus-infographic-datapack/) 80 | 81 | [Information is Beautiful CV Dataset](https://covid.cd2h.org/node/71) 82 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Data Visualizations 8 | 14 | 15 | %sveltekit.head% 16 | 17 | 18 | 19 |
%sveltekit.body%
20 | 21 | 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "datavizsvelte", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview", 9 | "lint": "prettier --plugin-search-dir . --check . && eslint .", 10 | "format": "prettier --plugin-search-dir . --write ." 11 | }, 12 | "devDependencies": { 13 | "@sveltejs/adapter-auto": "^1.0.0", 14 | "@sveltejs/kit": "^1.0.0", 15 | "eslint": "^8.28.0", 16 | "eslint-config-prettier": "^8.5.0", 17 | "eslint-plugin-svelte3": "^4.0.0", 18 | "prettier": "^2.8.0", 19 | "prettier-plugin-svelte": "^2.8.1", 20 | "svelte": "^3.54.0", 21 | "vite": "^4.0.0" 22 | }, 23 | "type": "module", 24 | "dependencies": { 25 | "ajax": "^0.0.4", 26 | "d3": "^7.8.2", 27 | "flowbite-svelte": "^0.29.12", 28 | "rxjs": "^7.8.0", 29 | "sveltestrap": "^5.10.0", 30 | "topojson-client": "^3.1.0", 31 | "topojson-server": "^3.0.1", 32 | "topojson-simplify": "^3.0.3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | %sveltekit.head% 15 | 16 | 17 | 18 |
%sveltekit.body%
19 | 20 | 21 | -------------------------------------------------------------------------------- /src/lib/stores: -------------------------------------------------------------------------------- 1 | import { writable } from "svelte/store"; 2 | 3 | export const createSearchStore = (data) => { 4 | const { subscribe, set, update} = writable({ 5 | data, 6 | filtered: data, 7 | search: "", 8 | }) 9 | 10 | return { 11 | subscribe, 12 | set, 13 | update 14 | } 15 | } 16 | 17 | export const searchHandler = (store) => { 18 | const searchTerm = store.search.toLowerCase() || "" 19 | store.filtered = store.data.filter((item) => { 20 | return item.searchTerms.toLowerCase().includes(searchTerm) 21 | }) 22 | } -------------------------------------------------------------------------------- /src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/routes/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | const csvUrl = 'https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/639388c2cbc2120a14dcf466e85730eb8be498bb/iris.csv' 4 | 5 | export const load = async () => { 6 | 7 | const getFlowers = async () => { 8 | const row = d => { 9 | d.sepal_length = +d.sepal_length 10 | d.sepal_width = +d.sepal_width 11 | d.petal_length = +d.petal_length 12 | d.petal_width = +d.petal_width 13 | return d 14 | } 15 | const data = await csv(csvUrl, row) 16 | return data 17 | }; 18 | 19 | return { 20 | flowers: getFlowers() 21 | } 22 | } -------------------------------------------------------------------------------- /src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |

Data Visualizations

7 |

Project running at:

8 |

Vercel

9 | 10 |

Project Repository

11 |

Github

12 | 13 |

README.md

14 |

Github Reame

15 | 16 |
17 |
18 | 24 | -------------------------------------------------------------------------------- /src/routes/Navbar.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 22 | 23 | 61 | -------------------------------------------------------------------------------- /src/routes/demos/+layout.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/routes/demos/NavbarDemos.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 22 | 23 | 61 | -------------------------------------------------------------------------------- /src/routes/demos/colors/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | const csvUrl = 'https://gist.githubusercontent.com/curran/b236990081a24761f7000567094914e0/raw/cssNamedColors.csv' 4 | 5 | export const load = async () => { 6 | 7 | const getColors = async () => { 8 | // const row = d => { 9 | // d.sepal_length = +d.sepal_length 10 | // d.sepal_width = +d.sepal_width 11 | // d.petal_length = +d.petal_length 12 | // d.petal_width = +d.petal_width 13 | // return d 14 | // } 15 | const data = await csv(csvUrl) 16 | console.log(data) 17 | return data 18 | }; 19 | 20 | return { 21 | colors: getColors() 22 | } 23 | } -------------------------------------------------------------------------------- /src/routes/demos/colors/+page.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |

An SVG color wheel of named CSS Colors

18 | 19 | 20 | {#each colors as color, i} 21 | 25 | {/each} 26 | 27 | 28 |

Demonstrates data loading with d3 and svelte as well as working with svg

29 |
30 | 31 | 37 | -------------------------------------------------------------------------------- /src/routes/demos/happyfaces/+page.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |

Random Faces

18 | {#each Array(6 * 3) as _} 19 | 29 | {/each} 30 |

Demonstrates looping and component management with Svelte

31 |
32 | 33 | 39 | -------------------------------------------------------------------------------- /src/routes/demos/happyfaces/BackgroundCircle.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | -------------------------------------------------------------------------------- /src/routes/demos/happyfaces/Eyes.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 17 | -------------------------------------------------------------------------------- /src/routes/demos/happyfaces/Face.svelte: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/routes/demos/happyfaces/Mouth.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/routes/demos/menus/+page.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 | 22 | 27 | 28 |

29 | Selected {selected['id']} 30 |

31 |
32 | 33 | 43 | -------------------------------------------------------------------------------- /src/routes/demos/sfline/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | const csvUrl = 'https://gist.githubusercontent.com/curran/90240a6d88bdb1411467b21ea0769029/raw/7d4c3914cc6a29a7f5165f7d5d82b735d97bcfe4/week_temperature_sf.csv' 4 | 5 | export const load = async () => { 6 | 7 | const prepareData = async () => { 8 | const row = d => { 9 | d.temperature = +d.temperature 10 | d.timestamp = new Date(d.timestamp) 11 | return d 12 | } 13 | const data = await csv(csvUrl, row) 14 | console.log(data) 15 | return data 16 | }; 17 | 18 | return { 19 | theData: prepareData() 20 | } 21 | } -------------------------------------------------------------------------------- /src/routes/demos/sfline/+page.svelte: -------------------------------------------------------------------------------- 1 | 40 | 41 | {#if data} 42 |
43 | 44 | 45 | 51 | 57 | {yAxisLabel} 58 | 59 | 64 | 69 | {xAxisLabel} 70 | 71 | 80 | 81 | 82 |
83 | {:else} 84 |

Loading...

85 | {/if} 86 | 87 | 103 | -------------------------------------------------------------------------------- /src/routes/demos/sfline/AxisBottom.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#each xScale.ticks() as tickValue} 9 | 14 | 15 | 16 | {tickFormat(tickValue)} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/demos/sfline/AxisLeft.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#each yScale.ticks() as tickValue} 8 | 9 | 10 | 16 | {tickValue} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/demos/sfline/Marks.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | {#each theData as d} 15 | xScale(xValue(d))) 19 | .y(d => yScale(yValue(d))) 20 | .curve(curveNatural)(theData)} 21 | /> 22 | 27 | {tooltipFormat(xValue(d))} 28 | 29 | 30 | {/each} 31 | 32 | -------------------------------------------------------------------------------- /src/routes/demos/stickycircle/+page.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 |
20 |

Sticky Circle

21 | 22 | 27 | 28 |

Demonstrates state management in Svelte

29 |
30 | 31 | 40 | -------------------------------------------------------------------------------- /src/routes/demos/worldmap/+page.server.js: -------------------------------------------------------------------------------- 1 | import { json } from "d3" 2 | import { mesh } from "topojson-client" 3 | import { feature } from "topojson-client" 4 | 5 | const jsonUrl = 'https://unpkg.com/world-atlas@2.0.2/countries-50m.json' 6 | 7 | export const load = async () => { 8 | 9 | const prepareData = async () => { 10 | const data = await json(jsonUrl) 11 | const { countries, land } = data.objects 12 | const features = feature(data, countries) 13 | 14 | return { 15 | land: feature(data, land), 16 | interiors: mesh(data, countries, (a,b) => a !== b) 17 | } 18 | }; 19 | 20 | // console.log(prepareData()) 21 | 22 | return { 23 | theData: prepareData() 24 | } 25 | } -------------------------------------------------------------------------------- /src/routes/demos/worldmap/+page.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | {#if data} 13 |
14 |

A Map of the Globe

15 | 16 | 19 | 20 |

Demonstrates working with spatial data (topojson) in d3 and Svelte using svg

21 |
22 | {:else} 23 |

Loading...

24 | {/if} 25 | 26 | 32 | -------------------------------------------------------------------------------- /src/routes/demos/worldmap/Marks.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | {#each land.features as feature} 16 | 20 | {/each} 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/routes/histmm/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | // const csvUrl = 'https://gist.githubusercontent.com/curran/90240a6d88bdb1411467b21ea0769029/raw/7d4c3914cc6a29a7f5165f7d5d82b735d97bcfe4/week_temperature_sf.csv' 4 | const csvUrl = 'https://gist.githubusercontent.com/curran/a9656d711a8ad31d812b8f9963ac441c/raw/c22144062566de911ba32509613c84af2a99e8e2/MissingMigrants-Global-2019-10-08T09-47-14-subset.csv' 5 | 6 | export const load = async () => { 7 | 8 | const prepareData = async () => { 9 | const row = d => { 10 | d.temperature = +d['Total Dead and Missing'] 11 | d.timestamp = new Date(d['Reported Date']) 12 | return d 13 | } 14 | const data = await csv(csvUrl, row) 15 | console.log(data[0]) 16 | return data 17 | }; 18 | 19 | return { 20 | theData: prepareData() 21 | } 22 | } -------------------------------------------------------------------------------- /src/routes/histmm/+page.svelte: -------------------------------------------------------------------------------- 1 | 41 | 42 | {#if data} 43 |
44 | 45 | 46 | 52 | 58 | {yAxisLabel} 59 | 60 | 65 | 70 | {xAxisLabel} 71 | 72 | 81 | 82 | 83 |
84 | {:else} 85 |

Loading...

86 | {/if} 87 | 88 | 104 | -------------------------------------------------------------------------------- /src/routes/histmm/AxisBottom.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#each xScale.ticks() as tickValue} 9 | 14 | 15 | 16 | {tickFormat(tickValue)} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/histmm/AxisLeft.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#each yScale.ticks() as tickValue} 8 | 9 | 10 | 16 | {tickValue} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/histmm/Marks.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 | {#each theData as d} 15 | xScale(xValue(d))) 19 | .y(d => yScale(yValue(d))) 20 | .curve(curveNatural)(theData)} 21 | /> 22 | 27 | {tooltipFormat(xValue(d))} 28 | 29 | 30 | {/each} 31 | 32 | -------------------------------------------------------------------------------- /src/routes/irisscatter/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | const csvUrl = 'https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv' 4 | 5 | export const load = async () => { 6 | 7 | const getFlowers = async () => { 8 | const row = d => { 9 | d.sepal_length = +d.sepal_length 10 | d.sepal_width = +d.sepal_width 11 | d.petal_length = +d.petal_length 12 | d.petal_width = +d.petal_width 13 | return d 14 | } 15 | const data = await csv(csvUrl, row) 16 | // console.log(data) 17 | return data 18 | }; 19 | 20 | return { 21 | flowers: getFlowers() 22 | } 23 | } -------------------------------------------------------------------------------- /src/routes/irisscatter/+page.svelte: -------------------------------------------------------------------------------- 1 | 115 | 116 |

The Iris Dataset

117 | {#if data} 118 |
119 |
120 | 142 | 143 | 144 | 150 | 156 | {yAxisLabel} 157 | 158 | 159 | 164 | {xAxisLabel} 165 | 166 | 177 | 178 | 179 |
180 | {#if flowers} 181 |
182 |
183 |

Species

184 |
185 |
188 | {#each colorDomain as color, i} 189 | 190 |
{filter(colors[i])}} 193 | on:mouseleave={() => {unFilter()}} 194 | > 195 | reactiveFilter(colors[i])} 199 | >• 201 | {color} 202 |
203 | {/each} 204 |

Hover to view species

205 |
206 |
207 | {/if} 208 |
209 | {:else} 210 |

Loading...

211 | {/if} 212 | 213 | 275 | -------------------------------------------------------------------------------- /src/routes/irisscatter/AxisBottom.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | {#each xScale.ticks() as tickValue} 9 | 14 | 15 | 16 | {tickFormat(tickValue)} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/irisscatter/AxisLeft.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#each yScale.ticks() as tickValue} 8 | 9 | 10 | 16 | {tickValue} 17 | 18 | 19 | {/each} 20 | 21 | 30 | -------------------------------------------------------------------------------- /src/routes/irisscatter/ColorLegend.svelte: -------------------------------------------------------------------------------- 1 | 17 | 18 |
19 | {#if flowers} 20 |

Legend

21 |
Click to Filter
22 | {#each flowers as flower, i} 23 | 24 | --> 26 | {flower} 27 | 28 | {/each} 29 | {/if} 30 |
-------------------------------------------------------------------------------- /src/routes/irisscatter/Marks.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 | {#each filteredFlowers as d} 16 | 24 | {tooltipFormat(xValue(d))} 25 | 26 | 27 | {/each} 28 | 29 | -------------------------------------------------------------------------------- /src/routes/newplot/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/routes/popbarchart/+page.server.js: -------------------------------------------------------------------------------- 1 | import { csv } from "d3" 2 | 3 | const csvUrl = 'https://gist.githubusercontent.com/biscotty666/9dcc3e250f5772e16e2b5112e02aada0/raw/a37dc899e9aca6dcaf0ca21b53e6620992169f20/UNPopProj.csv' 4 | 5 | export const load = async () => { 6 | 7 | const getPop = async () => { 8 | const row = d => { 9 | d.Population = +d['2100'] * 1000 10 | // d.sepal_length = +d.sepal_length 11 | // d.sepal_width = +d.sepal_width 12 | // d.petal_length = +d.petal_length 13 | // d.petal_width = +d.petal_width 14 | return d 15 | } 16 | const data = await csv(csvUrl, row) 17 | console.log(data[0]) 18 | return data.slice(0,10) 19 | }; 20 | 21 | return { 22 | pop: getPop() 23 | } 24 | } -------------------------------------------------------------------------------- /src/routes/popbarchart/+page.svelte: -------------------------------------------------------------------------------- 1 | 33 | {#if data} 34 |
35 |

Top Ten Countries By Population in 2100

36 |

From UN Predictive Data

37 | 38 | 39 | 44 | 45 | 50 | Population 51 | 52 | 60 | 61 | 62 |
63 | {:else} 64 |

Loading...

65 | {/if} 66 | -------------------------------------------------------------------------------- /src/routes/popbarchart/AxisBottom.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#each xScale.ticks() as tickValue} 8 | 13 | 14 | 15 | {tickFormat(tickValue)} 16 | 17 | 18 | {/each} 19 | 20 | 29 | -------------------------------------------------------------------------------- /src/routes/popbarchart/AxisLeft.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | {#each yScale.domain() as tickValue} 6 | {tickValue} 13 | 14 | {/each} 15 | 16 | 22 | 23 | -------------------------------------------------------------------------------- /src/routes/popbarchart/Marks.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#each pop as d} 11 | 17 | {tooltipFormat(xValue(d))} 18 | 19 | 20 | {/each} 21 | 22 | -------------------------------------------------------------------------------- /src/routes/worldmapcities/+page.server.js: -------------------------------------------------------------------------------- 1 | import { json, csv } from "d3" 2 | import { mesh } from "topojson-client" 3 | import { feature } from "topojson-client" 4 | 5 | const countriesUrl = 'https://unpkg.com/world-atlas@2.0.2/countries-50m.json' 6 | const citiesUrl = 'https://gist.githubusercontent.com/biscotty666/5ba7671e8c72b3147d387035bb5624a9/raw/b10d3742b41d28def93466fbce80a4f0a5a0a71d/WorldCities' 7 | 8 | export const load = async () => { 9 | 10 | const prepareCountries = async () => { 11 | const data = await json(countriesUrl) 12 | const { countries, land } = data.objects 13 | const features = feature(data, countries) 14 | 15 | return { 16 | land: feature(data, land), 17 | interiors: mesh(data, countries, (a,b) => a !== b) 18 | } 19 | }; 20 | 21 | const row = d => { 22 | d.lat = +d.lat 23 | d.lng = +d.lng 24 | return d 25 | } 26 | 27 | const prepareCities = async () => { 28 | const data = await csv(citiesUrl, row) 29 | console.log(data) 30 | 31 | return { 32 | cities: data, 33 | } 34 | }; 35 | 36 | // console.log(prepareData()) 37 | 38 | return { 39 | countriesData: prepareCountries(), 40 | citiesData: prepareCities() 41 | } 42 | } -------------------------------------------------------------------------------- /src/routes/worldmapcities/+page.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | {#if data} 13 |
14 |

World Cities

15 |

Population greater than 50,000 people

16 | 17 | 18 | 19 |
20 | {:else} 21 |

Loading...

22 | {/if} 23 | 24 | 30 | -------------------------------------------------------------------------------- /src/routes/worldmapcities/Marks.svelte: -------------------------------------------------------------------------------- 1 | 24 | 25 | 26 | 27 | {#each land.features as feature} 28 | 32 | {/each} 33 | 34 | {#each cities as d} 35 | 36 | {/each} 37 | 38 | -------------------------------------------------------------------------------- /src/routes/worldmapcitiessize/+page.server.js: -------------------------------------------------------------------------------- 1 | import { json, csv } from "d3" 2 | import { mesh } from "topojson-client" 3 | import { feature } from "topojson-client" 4 | 5 | const countriesUrl = 'https://unpkg.com/world-atlas@2.0.2/countries-50m.json' 6 | const citiesUrl = 'https://gist.githubusercontent.com/biscotty666/5ba7671e8c72b3147d387035bb5624a9/raw/b10d3742b41d28def93466fbce80a4f0a5a0a71d/WorldCities' 7 | 8 | export const load = async () => { 9 | 10 | const prepareCountries = async () => { 11 | const data = await json(countriesUrl) 12 | const { countries, land } = data.objects 13 | const features = feature(data, countries) 14 | 15 | return { 16 | land: feature(data, land), 17 | interiors: mesh(data, countries, (a,b) => a !== b) 18 | } 19 | }; 20 | 21 | const row = d => { 22 | d.lat = +d.lat 23 | d.lng = +d.lng 24 | d.population = +d.population 25 | return d 26 | } 27 | 28 | const prepareCities = async () => { 29 | const data = await csv(citiesUrl, row) 30 | 31 | return { 32 | cities: data, 33 | } 34 | }; 35 | 36 | // console.log(prepareData()) 37 | 38 | return { 39 | countriesData: prepareCountries(), 40 | citiesData: prepareCities() 41 | } 42 | } -------------------------------------------------------------------------------- /src/routes/worldmapcitiessize/+page.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | {#if data} 17 |
18 |

World Cities

19 |

Population greater than 50,000 people

20 |

City Size shown by size of the dots.

21 | 22 | 23 | 24 |
25 | {:else} 26 |

Loading...

27 | {/if} 28 | 29 | 35 | -------------------------------------------------------------------------------- /src/routes/worldmapcitiessize/Marks.svelte: -------------------------------------------------------------------------------- 1 | 37 | 38 | 39 | 40 | {#each land.features as feature} 41 | 45 | {/each} 46 | 47 | {#each cities as d} 48 | 49 | {/each} 50 | 51 | -------------------------------------------------------------------------------- /src/routes/worldmapmm/+page.server.js: -------------------------------------------------------------------------------- 1 | import { json, csv } from "d3" 2 | import { mesh } from "topojson-client" 3 | import { feature } from "topojson-client" 4 | 5 | const countriesUrl = 'https://unpkg.com/world-atlas@2.0.2/countries-50m.json' 6 | const citiesUrl = 'https://gist.githubusercontent.com/biscotty666/5ba7671e8c72b3147d387035bb5624a9/raw/b10d3742b41d28def93466fbce80a4f0a5a0a71d/WorldCities' 7 | 8 | export const load = async () => { 9 | 10 | const prepareCountries = async () => { 11 | const data = await json(countriesUrl) 12 | const { countries, land } = data.objects 13 | const features = feature(data, countries) 14 | 15 | return { 16 | land: feature(data, land), 17 | interiors: mesh(data, countries, (a,b) => a !== b) 18 | } 19 | }; 20 | 21 | const row = d => { 22 | d.lat = +d.lat 23 | d.lng = +d.lng 24 | d.population = +d.population 25 | return d 26 | } 27 | 28 | const prepareCities = async () => { 29 | const data = await csv(citiesUrl, row) 30 | 31 | return { 32 | cities: data, 33 | } 34 | }; 35 | 36 | // console.log(prepareData()) 37 | 38 | return { 39 | countriesData: prepareCountries(), 40 | citiesData: prepareCities() 41 | } 42 | } -------------------------------------------------------------------------------- /src/routes/worldmapmm/+page.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | {#if data} 17 |
18 |

World Cities

19 |

Population greater than 50,000 people

20 |

City Size shown by size of the dots.

21 | 22 | 23 | 24 |
25 | {:else} 26 |

Loading...

27 | {/if} 28 | 29 | 35 | -------------------------------------------------------------------------------- /src/routes/worldmapmm/Marks.svelte: -------------------------------------------------------------------------------- 1 | 37 | 38 | 39 | 40 | {#each land.features as feature} 41 | 45 | {/each} 46 | 47 | {#each cities as d} 48 | 49 | {/each} 50 | 51 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biscotty666/SvelteDataVisualization/716f8f16b70e524b9a8aaa6b0f68c0f5eb1a75f0/static/favicon.png -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | adapter: adapter() 7 | } 8 | }; 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | 3 | const config = { 4 | plugins: [sveltekit()] 5 | }; 6 | 7 | export default config; 8 | --------------------------------------------------------------------------------