From 3fbaee454de1608a4d18eb72781aa545f8892463 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 4 Jul 2022 03:15:23 +0200 Subject: [PATCH] refactor(examples/api): new look (#4465) Co-authored-by: Lucas Nogueira --- examples/api/dist/assets/index.css | 2 +- examples/api/dist/assets/index.js | 72 +- examples/api/dist/assets/vendor.css | 1 - examples/api/dist/assets/vendor.js | 25 - examples/api/dist/global.css | 196 ---- examples/api/dist/index.html | 5 +- .../dist/{tauri logo.png => tauri_logo.png} | Bin examples/api/index.html | 3 +- examples/api/isolation-dist/index.html | 14 +- examples/api/isolation-dist/index.js | 2 +- examples/api/package.json | 12 +- examples/api/public/global.css | 196 ---- .../public/{tauri logo.png => tauri_logo.png} | Bin examples/api/src-tauri/Cargo.lock | 26 + examples/api/src-tauri/Cargo.toml | 4 + examples/api/src-tauri/src/main.rs | 45 +- examples/api/src-tauri/src/menu.rs | 38 - examples/api/src-tauri/tauri.conf.json | 7 +- examples/api/src/App.svelte | 418 +++++-- examples/api/src/app.css | 30 + examples/api/src/components/Cli.svelte | 24 - examples/api/src/components/Clipboard.svelte | 36 - .../api/src/components/Communication.svelte | 50 - examples/api/src/components/Dialog.svelte | 122 -- examples/api/src/components/Http.svelte | 57 - examples/api/src/components/HttpForm.svelte | 39 - .../api/src/components/Notifications.svelte | 34 - examples/api/src/components/Shell.svelte | 74 -- examples/api/src/components/Shortcuts.svelte | 68 -- examples/api/src/components/Updater.svelte | 59 - examples/api/src/components/WebRTC.svelte | 53 - examples/api/src/components/Welcome.svelte | 33 - examples/api/src/components/Window.svelte | 410 ------- examples/api/src/main.js | 4 +- examples/api/src/views/Cli.svelte | 29 + examples/api/src/views/Clipboard.svelte | 32 + examples/api/src/views/Communication.svelte | 50 + examples/api/src/views/Dialog.svelte | 118 ++ .../{components => views}/FileSystem.svelte | 40 +- examples/api/src/views/Http.svelte | 99 ++ examples/api/src/views/Notifications.svelte | 34 + examples/api/src/views/Shell.svelte | 93 ++ examples/api/src/views/Shortcuts.svelte | 73 ++ examples/api/src/views/Updater.svelte | 76 ++ examples/api/src/views/WebRTC.svelte | 56 + examples/api/src/views/Welcome.svelte | 47 + examples/api/src/views/Window.svelte | 447 ++++++++ examples/api/unocss.config.js | 98 ++ examples/api/vite.config.js | 3 +- examples/api/yarn.lock | 1015 ++++++++++++++--- 50 files changed, 2588 insertions(+), 1881 deletions(-) delete mode 100644 examples/api/dist/assets/vendor.css delete mode 100644 examples/api/dist/assets/vendor.js delete mode 100644 examples/api/dist/global.css rename examples/api/dist/{tauri logo.png => tauri_logo.png} (100%) delete mode 100644 examples/api/public/global.css rename examples/api/public/{tauri logo.png => tauri_logo.png} (100%) delete mode 100644 examples/api/src-tauri/src/menu.rs create mode 100644 examples/api/src/app.css delete mode 100644 examples/api/src/components/Cli.svelte delete mode 100644 examples/api/src/components/Clipboard.svelte delete mode 100644 examples/api/src/components/Communication.svelte delete mode 100644 examples/api/src/components/Dialog.svelte delete mode 100644 examples/api/src/components/Http.svelte delete mode 100644 examples/api/src/components/HttpForm.svelte delete mode 100644 examples/api/src/components/Notifications.svelte delete mode 100644 examples/api/src/components/Shell.svelte delete mode 100644 examples/api/src/components/Shortcuts.svelte delete mode 100644 examples/api/src/components/Updater.svelte delete mode 100644 examples/api/src/components/WebRTC.svelte delete mode 100644 examples/api/src/components/Welcome.svelte delete mode 100644 examples/api/src/components/Window.svelte create mode 100644 examples/api/src/views/Cli.svelte create mode 100644 examples/api/src/views/Clipboard.svelte create mode 100644 examples/api/src/views/Communication.svelte create mode 100644 examples/api/src/views/Dialog.svelte rename examples/api/src/{components => views}/FileSystem.svelte (78%) create mode 100644 examples/api/src/views/Http.svelte create mode 100644 examples/api/src/views/Notifications.svelte create mode 100644 examples/api/src/views/Shell.svelte create mode 100644 examples/api/src/views/Shortcuts.svelte create mode 100644 examples/api/src/views/Updater.svelte create mode 100644 examples/api/src/views/WebRTC.svelte create mode 100644 examples/api/src/views/Welcome.svelte create mode 100644 examples/api/src/views/Window.svelte create mode 100644 examples/api/unocss.config.js diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index bb235641f..986683d11 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -#dialog-filter.svelte-1eg58yg{width:260px}#request-body.svelte-1xfmj7b{width:100%;margin-right:10px;font-size:12px}form.svelte-1tppwwz.svelte-1tppwwz{margin-top:24px}.flex-row.svelte-1tppwwz.svelte-1tppwwz{flex-direction:row}.grow.svelte-1tppwwz.svelte-1tppwwz{flex-grow:1}.window-controls.svelte-1tppwwz input.svelte-1tppwwz{width:50px}.window-property.svelte-1tppwwz.svelte-1tppwwz{margin-top:12px}.window-property.svelte-1tppwwz span.svelte-1tppwwz{font-size:.8rem}.env-vars.svelte-1g38c1n{width:300px}.container.svelte-1fam3xt{margin:1em}.view-container.svelte-1fam3xt{width:15em;margin-left:.5em}#response.svelte-1fam3xt{white-space:pre-line} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v20/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-bell-dot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12.994 7.875A4.008 4.008 0 0 1 12 8h-.01v.217c0 .909.143 1.818.442 2.691l.371 1.113h-9.63v-.012l.37-1.113a8.633 8.633 0 0 0 .443-2.691V6.004c0-.563.12-1.113.347-1.616c.227-.514.55-.969.969-1.34c.419-.382.91-.67 1.436-.837c.538-.18 1.1-.24 1.65-.18l.12.018a4 4 0 0 1 .673-.887a5.15 5.15 0 0 0-.697-.135c-.694-.072-1.4 0-2.07.227c-.67.215-1.28.574-1.794 1.053a4.923 4.923 0 0 0-1.208 1.675a5.067 5.067 0 0 0-.431 2.022v2.2a7.61 7.61 0 0 1-.383 2.37L2 12.343l.479.658h3.505c0 .526.215 1.04.586 1.412c.37.37.885.586 1.412.586c.526 0 1.04-.215 1.411-.586s.587-.886.587-1.412h3.505l.478-.658l-.586-1.77a7.63 7.63 0 0 1-.383-2.381v-.318ZM7.982 14.02a.997.997 0 0 0 .706-.3a.939.939 0 0 0 .287-.705H6.977c0 .263.107.514.299.706a.999.999 0 0 0 .706.299Z' clip-rule='evenodd'/%3E%3Cpath d='M12 7a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m7.116 8l-4.558 4.558l.884.884L8 8.884l4.558 4.558l.884-.884L8.884 8l4.558-4.558l-.884-.884L8 7.116L3.442 2.558l-.884.884L7.116 8z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clippy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7 13.992H4v-9h8v2h1v-2.5l-.5-.5H11v-1h-1a2 2 0 0 0-4 0H4.94v1H3.5l-.5.5v10l.5.5H7v-1zm0-11.2a1 1 0 0 1 .8-.8a1 1 0 0 1 .58.06a.94.94 0 0 1 .45.36a1 1 0 1 1-1.75.94a1 1 0 0 1-.08-.56zm7.08 9.46L13 13.342v-5.35h-1v5.34l-1.08-1.08l-.71.71l1.94 1.93h.71l1.93-1.93l-.71-.71zm-5.92-4.16h.71l1.93 1.93l-.71.71l-1.08-1.08v5.34h-1v-5.35l-1.08 1.09l-.71-.71l1.94-1.93z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-files{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.5 0h-9L7 1.5V6H2.5L1 7.5v15.07L2.5 24h12.07L16 22.57V18h4.7l1.3-1.43V4.5L17.5 0zm0 2.12l2.38 2.38H17.5V2.12zm-3 20.38h-12v-15H7v9.07L8.5 18h6v4.5zm6-6h-12v-15H16V6h4.5v10.5z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-multiple-windows{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6 1.5l.5-.5h8l.5.5v7l-.5.5H12V8h2V4H7v1H6V1.5zM7 2v1h7V2H7zM1.5 7l-.5.5v7l.5.5h8l.5-.5v-7L9.5 7h-8zM2 9V8h7v1H2zm0 1h7v4H2v-4z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-record-keys{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14 3H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 8H3V4h11v7zm-3-6h-1v1h1V5zm-1 2H9v1h1V7zm2-2h1v1h-1V5zm1 4h-1v1h1V9zM6 9h5v1H6V9zm7-2h-2v1h2V7zM8 5h1v1H8V5zm0 2H7v1h1V7zM4 9h1v1H4V9zm0-4h1v1H4V5zm3 0H6v1h1V5zM4 7h2v1H4V7z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal-bash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.655 3.56L8.918.75a1.785 1.785 0 0 0-1.82 0L2.363 3.56a1.889 1.889 0 0 0-.921 1.628v5.624a1.889 1.889 0 0 0 .913 1.627l4.736 2.812a1.785 1.785 0 0 0 1.82 0l4.736-2.812a1.888 1.888 0 0 0 .913-1.627V5.188a1.889 1.889 0 0 0-.904-1.627zm-3.669 8.781v.404a.149.149 0 0 1-.07.124l-.239.137c-.038.02-.07 0-.07-.053v-.396a.78.78 0 0 1-.545.053a.073.073 0 0 1-.027-.09l.086-.365a.153.153 0 0 1 .071-.096a.048.048 0 0 1 .038 0a.662.662 0 0 0 .497-.063a.662.662 0 0 0 .37-.567c0-.206-.112-.292-.384-.293c-.344 0-.661-.066-.67-.574A1.47 1.47 0 0 1 9.6 9.437V9.03a.147.147 0 0 1 .07-.126l.231-.147c.038-.02.07 0 .07.054v.409a.754.754 0 0 1 .453-.055a.073.073 0 0 1 .03.095l-.081.362a.156.156 0 0 1-.065.09a.055.055 0 0 1-.035 0a.6.6 0 0 0-.436.072a.549.549 0 0 0-.331.486c0 .185.098.242.425.248c.438 0 .627.199.632.639a1.568 1.568 0 0 1-.576 1.185zm2.481-.68a.094.094 0 0 1-.036.092l-1.198.727a.034.034 0 0 1-.04.003a.035.035 0 0 1-.016-.037v-.31a.086.086 0 0 1 .055-.076l1.179-.706a.035.035 0 0 1 .056.035v.273zm.827-6.914L8.812 7.515c-.559.331-.97.693-.97 1.367v5.52c0 .404.165.662.413.741a1.465 1.465 0 0 1-.248.025c-.264 0-.522-.072-.748-.207L2.522 12.15a1.558 1.558 0 0 1-.75-1.338V5.188a1.558 1.558 0 0 1 .75-1.34l4.738-2.81a1.46 1.46 0 0 1 1.489 0l4.736 2.812a1.548 1.548 0 0 1 .728 1.083c-.154-.334-.508-.427-.92-.185h.002z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-globe-hemisphere-west{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M221.6 173.3A102.9 102.9 0 0 0 232 128a104.2 104.2 0 0 0-77.2-100.5h-.5A103.8 103.8 0 0 0 60.4 49l-1.3 1.2A103.9 103.9 0 0 0 128 232h2.4a104.3 104.3 0 0 0 90.6-57.4ZM216 128a89.3 89.3 0 0 1-5.5 30.7l-46.4-28.5a16.6 16.6 0 0 0-6.3-2.3l-22.8-3a16.1 16.1 0 0 0-15.3 6.8h-8.6l-3.8-7.9a15.9 15.9 0 0 0-11-8.7l-6.6-1.4l4.6-10.8h21.4a16.1 16.1 0 0 0 7.7-2l12.2-6.8a16.1 16.1 0 0 0 3-2.1l26.9-24.4a15.7 15.7 0 0 0 4.5-16.9a88 88 0 0 1 46 77.3Zm-68.8-85.9l7.6 13.7l-26.9 24.3l-12.2 6.8H94.3a15.9 15.9 0 0 0-14.7 9.8l-5.3 12.4l-10.9-29.2l8.1-19.3a88 88 0 0 1 75.7-18.5ZM40 128a87.1 87.1 0 0 1 9.5-39.7l10.4 27.9a16.1 16.1 0 0 0 11.6 10l5.5 1.2h.1l15.8 3.4l3.8 7.9a16.3 16.3 0 0 0 14.4 9h1.2l-7.7 17.2a15.9 15.9 0 0 0 2.8 17.4l18.8 20.4l-2.5 13.2A88.1 88.1 0 0 1 40 128Zm100.1 87.2l1.8-9.5a16 16 0 0 0-3.9-13.9l-18.8-20.3l12.7-28.7l1-2.1l22.8 3.1l47.8 29.4a88.5 88.5 0 0 1-63.4 42Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .absolute{position:absolute;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.hidden{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-auto{height:auto;}.h-screen{height:100vh;}.w-100\%{width:100%;}.w-75{width:18.75rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-darkPrimaryLighter\/60{background-color:rgba(36,37,38,0.6);}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.dark .dark\:hover\:bg-red-700:hover,.hover\:bg-red-700:hover{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-red-700\/90:active,.dark .dark\:active\:bg-red-700\/90:active{background-color:rgba(185,28,28,0.9);}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.hover\:text-darkPrimaryText:hover,.text-darkPrimaryText,.active\:text-darkPrimaryText:active{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}ul.svelte-gbh3pt{list-style:none;margin:0;padding:0;padding-left:var(--nodePaddingLeft, 1rem);border-left:var(--nodeBorderLeft, 1px dotted #9ca3af);color:var(--nodeColor, #374151)}.hidden.svelte-gbh3pt{display:none}.bracket.svelte-gbh3pt{cursor:pointer}.bracket.svelte-gbh3pt:hover{background:var(--bracketHoverBackground, #d1d5db)}.comma.svelte-gbh3pt{color:var(--nodeColor, #374151)}.val.svelte-gbh3pt{color:var(--leafDefaultColor, #9ca3af)}.val.string.svelte-gbh3pt{color:var(--leafStringColor, #059669)}.val.number.svelte-gbh3pt{color:var(--leafNumberColor, #d97706)}.val.boolean.svelte-gbh3pt{color:var(--leafBooleanColor, #2563eb)}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index f081e844c..fbdd5b3fe 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,29 +1,43 @@ -var zi=Object.defineProperty,Ci=Object.defineProperties;var Mi=Object.getOwnPropertyDescriptors;var Yl=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable;var Jl=(n,t,l)=>t in n?zi(n,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[t]=l,Kl=(n,t)=>{for(var l in t||(t={}))Ti.call(t,l)&&Jl(n,l,t[l]);if(Yl)for(var l of Yl(t))Si.call(t,l)&&Jl(n,l,t[l]);return n},Ql=(n,t)=>Ci(n,Mi(t));import{S as X,i as Y,s as J,e as o,a as h,t as C,b as u,c as S,d as e,l as y,f as G,n as W,g as R,r as x,h as Ri,j as Li,o as Ei,k as Hi,m as Zl,p as Oi,q as en,u as $l,v as Wn,w as Un,x as Pi,y as E,z as xl,A as ei,B as Ai,C as tn,D as $e,E as ti,F as Ii,G as Wi,H as Ui,I as qi,J as qn,K as xe,L as ni,M as Nn,N as Dn,O as B,P as jn,Q as nn,R as Gn,T as li,U as ii,V as Ni,W as Di,X as si,Y as oi,Z as ji,_ as Gi,$ as Bi,a0 as Fi,a1 as Vi,a2 as Xi,a3 as Yi,a4 as Ji,a5 as Ki,a6 as Bn,a7 as Fn,a8 as Vn,a9 as Xn,aa as Yn,ab as Qi,ac as ai,ad as Zi,ae as $i,af as xi,ag as es}from"./vendor.js";const ts=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function l(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerpolicy&&(a.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?a.credentials="include":s.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=l(s);fetch(s.href,a)}};ts();function ns(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P;return{c(){t=o("h1"),t.textContent="Welcome",l=h(),i=o("p"),i.textContent="Tauri's API capabilities using the ` @tauri-apps/api ` package. It's used as\r\n the main validation app, serving as the testbed of our development process. In\r\n the future, this app will be used on Tauri's integration tests.",s=h(),a=o("p"),r=C("Current App version: "),c=C(n[0]),m=h(),v=o("p"),k=C("Current Tauri version: "),g=C(n[1]),p=h(),_=o("p"),w=C("Current App name: "),b=C(n[2]),d=h(),z=o("button"),z.textContent="Close application",M=h(),q=o("button"),q.textContent="Relaunch application",u(z,"class","button"),u(q,"class","button")},m(L,I){S(L,t,I),S(L,l,I),S(L,i,I),S(L,s,I),S(L,a,I),e(a,r),e(a,c),S(L,m,I),S(L,v,I),e(v,k),e(v,g),S(L,p,I),S(L,_,I),e(_,w),e(_,b),S(L,d,I),S(L,z,I),S(L,M,I),S(L,q,I),A||(P=[y(z,"click",n[3]),y(q,"click",n[4])],A=!0)},p(L,[I]){I&1&&G(c,L[0]),I&2&&G(g,L[1]),I&4&&G(b,L[2])},i:W,o:W,d(L){L&&R(t),L&&R(l),L&&R(i),L&&R(s),L&&R(a),L&&R(m),L&&R(v),L&&R(p),L&&R(_),L&&R(d),L&&R(z),L&&R(M),L&&R(q),A=!1,x(P)}}}function ls(n,t,l){let i=0,s=0,a="Unknown";Ri().then(m=>{l(2,a=m)}),Li().then(m=>{l(0,i=m)}),Ei().then(m=>{l(1,s=m)});async function r(){await Hi()}async function c(){await Zl()}return[i,s,a,r,c]}class is extends X{constructor(t){super();Y(this,t,ls,ns,J,{})}}function ss(n){let t,l,i,s,a,r,c,m,v,k,g;return{c(){t=o("div"),l=C(`This binary can be run on the terminal and takes the following arguments:\r - `),i=o("ul"),i.innerHTML=`
  • --config PATH
  • -
  • --theme light|dark|system
  • -
  • --verbose
  • `,s=C(`\r - Additionally, it has a `),a=o("i"),a.textContent="update --background",r=C(` subcommand.\r - Note that the arguments are only parsed, not implemented.\r - `),c=o("br"),m=h(),v=o("button"),v.textContent="Get matches",u(v,"class","button"),u(v,"id","cli-matches")},m(p,_){S(p,t,_),e(t,l),e(t,i),e(t,s),e(t,a),e(t,r),e(t,c),e(t,m),e(t,v),k||(g=y(v,"click",n[0]),k=!0)},p:W,i:W,o:W,d(p){p&&R(t),k=!1,g()}}}function os(n,t,l){let{onMessage:i}=t;function s(){Oi().then(i).catch(i)}return n.$$set=a=>{"onMessage"in a&&l(1,i=a.onMessage)},[s,i]}class as extends X{constructor(t){super();Y(this,t,os,ss,J,{onMessage:1})}}function us(n){let t,l,i,s,a,r,c,m;return{c(){t=o("div"),l=o("button"),l.textContent="Call Log API",i=h(),s=o("button"),s.textContent="Call Request (async) API",a=h(),r=o("button"),r.textContent="Send event to Rust",u(l,"class","button"),u(l,"id","log"),u(s,"class","button"),u(s,"id","request"),u(r,"class","button"),u(r,"id","event")},m(v,k){S(v,t,k),e(t,l),e(t,i),e(t,s),e(t,a),e(t,r),c||(m=[y(l,"click",n[0]),y(s,"click",n[1]),y(r,"click",n[2])],c=!0)},p:W,i:W,o:W,d(v){v&&R(t),c=!1,x(m)}}}function rs(n,t,l){let{onMessage:i}=t,s;en(async()=>{s=await $l("rust-event",i)}),Wn(()=>{s&&s()});function a(){Un("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function r(){Un("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){Pi("js-event","this is the payload string")}return n.$$set=m=>{"onMessage"in m&&l(3,i=m.onMessage)},[a,r,c,i]}class cs extends X{constructor(t){super();Y(this,t,rs,us,J,{onMessage:3})}}function ps(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A;return{c(){t=o("div"),l=o("input"),i=h(),s=o("input"),a=h(),r=o("div"),c=o("input"),m=h(),v=o("label"),v.textContent="Multiple",k=h(),g=o("div"),p=o("input"),_=h(),w=o("label"),w.textContent="Directory",b=h(),d=o("button"),d.textContent="Open dialog",z=h(),M=o("button"),M.textContent="Open save dialog",u(l,"id","dialog-default-path"),u(l,"placeholder","Default path"),u(s,"id","dialog-filter"),u(s,"placeholder","Extensions filter, comma-separated"),u(s,"class","svelte-1eg58yg"),u(c,"type","checkbox"),u(c,"id","dialog-multiple"),u(v,"for","dialog-multiple"),u(p,"type","checkbox"),u(p,"id","dialog-directory"),u(w,"for","dialog-directory"),u(d,"class","button"),u(d,"id","open-dialog"),u(M,"class","button"),u(M,"id","save-dialog")},m(P,L){S(P,t,L),e(t,l),E(l,n[0]),e(t,i),e(t,s),E(s,n[1]),e(t,a),e(t,r),e(r,c),c.checked=n[2],e(r,m),e(r,v),e(t,k),e(t,g),e(g,p),p.checked=n[3],e(g,_),e(g,w),e(t,b),e(t,d),e(t,z),e(t,M),q||(A=[y(l,"input",n[8]),y(s,"input",n[9]),y(c,"change",n[10]),y(p,"change",n[11]),y(d,"click",n[4]),y(M,"click",n[5])],q=!0)},p(P,[L]){L&1&&l.value!==P[0]&&E(l,P[0]),L&2&&s.value!==P[1]&&E(s,P[1]),L&4&&(c.checked=P[2]),L&8&&(p.checked=P[3])},i:W,o:W,d(P){P&&R(t),q=!1,x(A)}}}function fs(n,t){var l=new Blob([n],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(s){var a=s.target.result;t(a.substr(a.indexOf(",")+1))},i.readAsDataURL(l)}function ds(n,t,l){let{onMessage:i}=t,{insecureRenderHtml:s}=t,a=null,r=null,c=!1,m=!1;function v(){xl({title:"My wonderful open dialog",defaultPath:a,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[],multiple:c,directory:m}).then(function(b){if(Array.isArray(b))i(b);else{var d=b,z=d.match(/\S+\.\S+$/g);ei(d).then(function(M){z&&(d.includes(".png")||d.includes(".jpg"))?fs(new Uint8Array(M),function(q){var A="data:image/png;base64,"+q;s('')}):i(b)}).catch(i(b))}}).catch(i)}function k(){Ai({title:"My wonderful save dialog",defaultPath:a,filters:r?[{name:"Tauri Example",extensions:r.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function g(){a=this.value,l(0,a)}function p(){r=this.value,l(1,r)}function _(){c=this.checked,l(2,c)}function w(){m=this.checked,l(3,m)}return n.$$set=b=>{"onMessage"in b&&l(6,i=b.onMessage),"insecureRenderHtml"in b&&l(7,s=b.insecureRenderHtml)},[a,r,c,m,v,k,i,s,g,p,_,w]}class hs extends X{constructor(t){super();Y(this,t,ds,ps,J,{onMessage:6,insecureRenderHtml:7})}}function ui(n,t,l){const i=n.slice();return i[9]=t[l],i}function ri(n){let t,l=n[9][0]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[9][1],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p:W,d(a){a&&R(t)}}}function ms(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w=n[2],b=[];for(let d=0;disNaN(parseInt(p))).map(p=>[p,ti[p]]);function m(){const p=a.match(/\S+\.\S+$/g),_={dir:ci()};(p?ei(a,_):Ii(a,_)).then(function(b){if(p)if(a.includes(".png")||a.includes(".jpg"))vs(new Uint8Array(b),function(d){const z="data:image/png;base64,"+d;s('')});else{const d=String.fromCharCode.apply(null,b);s(''),setTimeout(()=>{const z=document.getElementById("file-response");z.value=d,document.getElementById("file-save").addEventListener("click",function(){Wi(a,z.value,{dir:ci()}).catch(i)})})}else i(b)}).catch(i)}function v(){l(1,r.src=Ui(a),r)}function k(){a=this.value,l(0,a)}function g(p){qi[p?"unshift":"push"](()=>{r=p,l(1,r)})}return n.$$set=p=>{"onMessage"in p&&l(5,i=p.onMessage),"insecureRenderHtml"in p&&l(6,s=p.insecureRenderHtml)},[a,r,c,m,v,i,s,k,g]}class gs extends X{constructor(t){super();Y(this,t,_s,ms,J,{onMessage:5,insecureRenderHtml:6})}}function bs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b;return{c(){t=o("form"),l=o("select"),i=o("option"),i.textContent="GET",s=o("option"),s.textContent="POST",a=o("option"),a.textContent="PUT",r=o("option"),r.textContent="PATCH",c=o("option"),c.textContent="DELETE",m=h(),v=o("br"),k=h(),g=o("textarea"),p=h(),_=o("button"),_.textContent="Make request",i.__value="GET",i.value=i.__value,s.__value="POST",s.value=s.__value,a.__value="PUT",a.value=a.__value,r.__value="PATCH",r.value=r.__value,c.__value="DELETE",c.value=c.__value,u(l,"class","button"),u(l,"id","request-method"),n[0]===void 0&&qn(()=>n[4].call(l)),u(g,"id","request-body"),u(g,"placeholder","Request body"),u(g,"rows","5"),u(g,"class","svelte-1xfmj7b"),u(_,"class","button"),u(_,"id","make-request")},m(d,z){S(d,t,z),e(t,l),e(l,i),e(l,s),e(l,a),e(l,r),e(l,c),xe(l,n[0]),e(t,m),e(t,v),e(t,k),e(t,g),E(g,n[1]),e(t,p),e(t,_),w||(b=[y(l,"change",n[4]),y(g,"input",n[5]),y(t,"submit",tn(n[2]))],w=!0)},p(d,[z]){z&1&&xe(l,d[0]),z&2&&E(g,d[1])},i:W,o:W,d(d){d&&R(t),w=!1,x(b)}}}function ws(n,t,l){let i="GET",s="",{onMessage:a}=t;async function r(){const v=await ni().catch(p=>{throw a(p),p}),g={url:"http://localhost:3003",method:i||"GET"||"GET"};s.startsWith("{")&&s.endsWith("}")||s.startsWith("[")&&s.endsWith("]")?g.body=Nn.json(JSON.parse(s)):s!==""&&(g.body=Nn.text(s)),v.request(g).then(a).catch(a)}function c(){i=Dn(this),l(0,i)}function m(){s=this.value,l(1,s)}return n.$$set=v=>{"onMessage"in v&&l(3,a=v.onMessage)},[i,s,r,a,c,m]}class ks extends X{constructor(t){super();Y(this,t,ws,bs,J,{onMessage:3})}}function ys(n){let t,l,i;return{c(){t=o("button"),t.textContent="Send test notification",u(t,"class","button"),u(t,"id","notification")},m(s,a){S(s,t,a),l||(i=y(t,"click",zs),l=!0)},p:W,i:W,o:W,d(s){s&&R(t),l=!1,i()}}}function zs(){new Notification("Notification title",{body:"This is the notification body"})}function Cs(n,t,l){let{onMessage:i}=t;return n.$$set=s=>{"onMessage"in s&&l(0,i=s.onMessage)},[i]}class Ms extends X{constructor(t){super();Y(this,t,Cs,ys,J,{onMessage:0})}}function pi(n,t,l){const i=n.slice();return i[65]=t[l],i}function fi(n,t,l){const i=n.slice();return i[68]=t[l],i}function di(n){let t,l=n[68]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[68],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p(a,r){r[0]&2&&l!==(l=a[68]+"")&&G(i,l),r[0]&2&&s!==(s=a[68])&&(t.__value=s,t.value=t.__value)},d(a){a&&R(t)}}}function hi(n){let t,l=n[65]+"",i,s;return{c(){t=o("option"),i=C(l),t.__value=s=n[65],t.value=t.__value},m(a,r){S(a,t,r),e(t,i)},p:W,d(a){a&&R(t)}}}function Ts(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P,L,I,N,K,fe,V,j,O,Q,H,F,Se,Re,Ae,wt,et,ee,de,Ie,kt,le,yt,We,zt,ie,Ct,he,Ue,Mt,se,Tt,qe,St,oe,Rt,me,Ne,Lt,ae,Et,De,Ht,ue,Ot,ve,je,D,te,Jn,Pt,Kn,ce,ln,re,Ge,_e,sn,Qn,tt,Zn,At=n[25].width+"",on,$n,nt,xn,It=n[25].height+"",an,el,ge,un,tl,lt,nl,Wt=n[26].width+"",rn,ll,it,il,Ut=n[26].height+"",cn,sl,Be,be,pn,ol,st,al,qt=n[25].toLogical(n[22]).width+"",fn,ul,ot,rl,Nt=n[25].toLogical(n[22]).height+"",dn,cl,we,hn,pl,at,fl,Dt=n[26].toLogical(n[22]).width+"",mn,dl,ut,hl,jt=n[26].toLogical(n[22]).height+"",vn,ml,Fe,ke,_n,vl,rt,_l,Gt=n[23].x+"",gn,gl,ct,bl,Bt=n[23].y+"",bn,wl,ye,wn,kl,pt,yl,Ft=n[24].x+"",kn,zl,ft,Cl,Vt=n[24].y+"",yn,Ml,Ve,ze,zn,Tl,dt,Sl,Xt=n[23].toLogical(n[22]).x+"",Cn,Rl,ht,Ll,Yt=n[23].toLogical(n[22]).y+"",Mn,El,Ce,Tn,Hl,mt,Ol,Jt=n[24].toLogical(n[22]).x+"",Sn,Pl,vt,Al,Kt=n[24].toLogical(n[22]).y+"",Rn,Ln,ne,En,Il,Qt,Xe,Wl,Ul,Zt,Ye,ql,Nl,pe,Dl,Je,$t,jl,Le,Gl,xt,Bl,Ee,Hn,Me,He,Fl,_t,On,Te,Oe,Vl,gt,Pn,Pe,An,Ke,In,Xl,Qe=Object.keys(n[1]),Z=[];for(let f=0;fn[37].call(l)),u(r,"type","checkbox"),u(k,"type","checkbox"),u(_,"title","Unminimizes after 2 seconds"),u(b,"title","Unminimizes after 2 seconds"),u(z,"title","Visible again after 2 seconds"),u(A,"type","checkbox"),u(N,"type","checkbox"),u(j,"type","checkbox"),u(F,"type","checkbox"),u(le,"type","number"),u(le,"min","0"),u(le,"class","svelte-1tppwwz"),u(ie,"type","number"),u(ie,"min","0"),u(ie,"class","svelte-1tppwwz"),u(de,"class","flex col grow svelte-1tppwwz"),u(se,"type","number"),u(se,"min","400"),u(se,"class","svelte-1tppwwz"),u(oe,"type","number"),u(oe,"min","400"),u(oe,"class","svelte-1tppwwz"),u(he,"class","flex col grow svelte-1tppwwz"),u(ae,"type","number"),u(ae,"class","svelte-1tppwwz"),u(ue,"type","number"),u(ue,"class","svelte-1tppwwz"),u(me,"class","flex col grow svelte-1tppwwz"),u(te,"type","number"),u(te,"min","400"),u(te,"class","svelte-1tppwwz"),u(ce,"type","number"),u(ce,"min","400"),u(ce,"class","svelte-1tppwwz"),u(ve,"class","flex col grow svelte-1tppwwz"),u(ee,"class","window-controls flex flex-row svelte-1tppwwz"),u(t,"class","flex col"),u(tt,"class","svelte-1tppwwz"),u(nt,"class","svelte-1tppwwz"),u(_e,"class","grow window-property svelte-1tppwwz"),u(lt,"class","svelte-1tppwwz"),u(it,"class","svelte-1tppwwz"),u(ge,"class","grow window-property svelte-1tppwwz"),u(Ge,"class","flex"),u(st,"class","svelte-1tppwwz"),u(ot,"class","svelte-1tppwwz"),u(be,"class","grow window-property svelte-1tppwwz"),u(at,"class","svelte-1tppwwz"),u(ut,"class","svelte-1tppwwz"),u(we,"class","grow window-property svelte-1tppwwz"),u(Be,"class","flex"),u(rt,"class","svelte-1tppwwz"),u(ct,"class","svelte-1tppwwz"),u(ke,"class","grow window-property svelte-1tppwwz"),u(pt,"class","svelte-1tppwwz"),u(ft,"class","svelte-1tppwwz"),u(ye,"class","grow window-property svelte-1tppwwz"),u(Fe,"class","flex"),u(dt,"class","svelte-1tppwwz"),u(ht,"class","svelte-1tppwwz"),u(ze,"class","grow window-property svelte-1tppwwz"),u(mt,"class","svelte-1tppwwz"),u(vt,"class","svelte-1tppwwz"),u(Ce,"class","grow window-property svelte-1tppwwz"),u(Ve,"class","flex"),u(Xe,"type","checkbox"),u(Ye,"type","checkbox"),u(pe,"class","button"),n[19]===void 0&&qn(()=>n[55].call(pe)),u(Le,"type","number"),u(Ee,"type","number"),u(Je,"class","flex col grow svelte-1tppwwz"),u(He,"id","title"),u(_t,"class","button"),u(_t,"type","submit"),u(Me,"class","svelte-1tppwwz"),u(Oe,"id","url"),u(gt,"class","button"),u(gt,"id","open-url"),u(Te,"class","svelte-1tppwwz"),u(Pe,"class","button"),u(Pe,"title","Minimizes the window, requests attention for 3s and then resets it"),u(Ke,"class","button")},m(f,T){S(f,t,T),e(t,l);for(let U=0;U{typeof D=="string"&&s[i].setIcon(D)})}function Ie(){const D=Math.random().toString().replace(".",""),te=new Ni(D);l(1,s[D]=te,s),te.once("tauri://error",function(){r("Error creating new webview")})}function kt(){s[i].innerSize().then(D=>{l(25,K=D),l(7,w=K.width),l(8,b=K.height)}),s[i].outerSize().then(D=>{l(26,fe=D)})}function le(){s[i].innerPosition().then(D=>{l(23,I=D)}),s[i].outerPosition().then(D=>{l(24,N=D),l(13,A=N.x),l(14,P=N.y)})}async function yt(D){V&&V(),j&&j(),j=await D.listen("tauri://move",le),V=await D.listen("tauri://resize",kt)}async function We(){await s[i].minimize(),await s[i].requestUserAttention(Di.Critical),await new Promise(D=>setTimeout(D,3e3)),await s[i].requestUserAttention(null)}function zt(){i=Dn(this),l(0,i),l(1,s)}function ie(){m=this.checked,l(2,m)}function Ct(){v=this.checked,l(3,v)}const he=()=>s[i].center();function Ue(){k=this.checked,l(21,k)}function Mt(){g=this.checked,l(4,g)}function se(){p=this.checked,l(5,p)}function Tt(){_=this.checked,l(6,_)}function qe(){A=B(this.value),l(13,A)}function St(){P=B(this.value),l(14,P)}function oe(){w=B(this.value),l(7,w)}function Rt(){b=B(this.value),l(8,b)}function me(){d=B(this.value),l(9,d)}function Ne(){z=B(this.value),l(10,z)}function Lt(){M=B(this.value),l(11,M)}function ae(){q=B(this.value),l(12,q)}function Et(){O=this.checked,l(15,O)}function De(){Q=this.checked,l(16,Q)}function Ht(){Se=Dn(this),l(19,Se),l(28,a)}function ue(){H=B(this.value),l(17,H)}function Ot(){F=B(this.value),l(18,F)}function ve(){Re=this.value,l(27,Re)}function je(){c=this.value,l(20,c)}return n.$$set=D=>{"onMessage"in D&&l(36,r=D.onMessage)},n.$$.update=()=>{n.$$.dirty[0]&7&&s[i].setResizable(m),n.$$.dirty[0]&11&&(v?s[i].maximize():s[i].unmaximize()),n.$$.dirty[0]&19&&s[i].setDecorations(g),n.$$.dirty[0]&35&&s[i].setAlwaysOnTop(p),n.$$.dirty[0]&67&&s[i].setFullscreen(_),n.$$.dirty[0]&387&&s[i].setSize(new Gn(w,b)),n.$$.dirty[0]&1539&&(d&&z?s[i].setMinSize(new li(d,z)):s[i].setMinSize(null)),n.$$.dirty[0]&6147&&(M&&q?s[i].setMaxSize(new li(M,q)):s[i].setMaxSize(null)),n.$$.dirty[0]&24579&&s[i].setPosition(new nn(A,P)),n.$$.dirty[0]&3&&s[i].scaleFactor().then(D=>l(22,L=D)),n.$$.dirty[0]&3&&yt(s[i]),n.$$.dirty[0]&32771&&s[i].setCursorGrab(O),n.$$.dirty[0]&65539&&s[i].setCursorVisible(Q),n.$$.dirty[0]&524291&&s[i].setCursorIcon(Se),n.$$.dirty[0]&393219&&s[i].setCursorPosition(new nn(H,F))},[i,s,m,v,g,p,_,w,b,d,z,M,q,A,P,O,Q,H,F,Se,c,k,L,I,N,K,fe,Re,a,Ae,wt,et,ee,de,Ie,We,r,zt,ie,Ct,he,Ue,Mt,se,Tt,qe,St,oe,Rt,me,Ne,Lt,ae,Et,De,Ht,ue,Ot,ve,je]}class Rs extends X{constructor(t){super();Y(this,t,Ss,Ts,J,{onMessage:36},[-1,-1,-1])}}function mi(n,t,l){const i=n.slice();return i[9]=t[l],i}function vi(n){let t,l=n[9]+"",i,s,a,r,c;function m(){return n[8](n[9])}return{c(){t=o("div"),i=C(l),s=h(),a=o("button"),a.textContent="Unregister",u(a,"type","button")},m(v,k){S(v,t,k),e(t,i),e(t,s),e(t,a),r||(c=y(a,"click",m),r=!0)},p(v,k){n=v,k&2&&l!==(l=n[9]+"")&&G(i,l)},d(v){v&&R(t),r=!1,c()}}}function _i(n){let t,l,i;return{c(){t=o("button"),t.textContent="Unregister all",u(t,"type","button")},m(s,a){S(s,t,a),l||(i=y(t,"click",n[5]),l=!0)},p:W,d(s){s&&R(t),l=!1,i()}}}function Ls(n){let t,l,i,s,a,r,c,m,v,k,g=n[1],p=[];for(let w=0;wl(1,i=p));let r="CmdOrControl+X";function c(){const p=r;ji(p,()=>{s(`Shortcut ${p} triggered`)}).then(()=>{a.update(_=>[..._,p]),s(`Shortcut ${p} registered successfully`)}).catch(s)}function m(p){const _=p;Gi(_).then(()=>{a.update(w=>w.filter(b=>b!==_)),s(`Shortcut ${_} unregistered`)}).catch(s)}function v(){Bi().then(()=>{a.update(()=>[]),s("Unregistered all shortcuts")}).catch(s)}function k(){r=this.value,l(0,r)}const g=p=>m(p);return n.$$set=p=>{"onMessage"in p&&l(6,s=p.onMessage)},[r,i,a,c,m,v,s,k,g]}class Hs extends X{constructor(t){super();Y(this,t,Es,Ls,J,{onMessage:6})}}function gi(n){let t,l,i,s,a;return{c(){t=o("input"),l=h(),i=o("button"),i.textContent="Write",u(t,"placeholder","write to stdin"),u(i,"class","button")},m(r,c){S(r,t,c),E(t,n[3]),S(r,l,c),S(r,i,c),s||(a=[y(t,"input",n[10]),y(i,"click",n[7])],s=!0)},p(r,c){c&8&&t.value!==r[3]&&E(t,r[3])},d(r){r&&R(t),r&&R(l),r&&R(i),s=!1,x(a)}}}function Os(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d=n[4]&&gi(n);return{c(){t=o("div"),l=o("div"),i=o("input"),s=h(),a=o("button"),a.textContent="Run",r=h(),c=o("button"),c.textContent="Kill",m=h(),d&&d.c(),v=h(),k=o("div"),g=o("input"),p=h(),_=o("input"),u(a,"class","button"),u(c,"class","button"),u(g,"placeholder","Working directory"),u(_,"class","env-vars svelte-1g38c1n"),u(_,"placeholder","Environment variables")},m(z,M){S(z,t,M),e(t,l),e(l,i),E(i,n[0]),e(l,s),e(l,a),e(l,r),e(l,c),e(l,m),d&&d.m(l,null),e(t,v),e(t,k),e(k,g),E(g,n[1]),e(k,p),e(k,_),E(_,n[2]),w||(b=[y(i,"input",n[9]),y(a,"click",n[5]),y(c,"click",n[6]),y(g,"input",n[11]),y(_,"input",n[12])],w=!0)},p(z,[M]){M&1&&i.value!==z[0]&&E(i,z[0]),z[4]?d?d.p(z,M):(d=gi(z),d.c(),d.m(l,null)):d&&(d.d(1),d=null),M&2&&g.value!==z[1]&&E(g,z[1]),M&4&&_.value!==z[2]&&E(_,z[2])},i:W,o:W,d(z){z&&R(t),d&&d.d(),w=!1,x(b)}}}function Ps(n,t,l){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",a=i?["/C"]:["-c"],{onMessage:r}=t,c='echo "hello world"',m=null,v="SOMETHING=value ANOTHER=2",k="",g;function p(){return v.split(" ").reduce((A,P)=>{let[L,I]=P.split("=");return Ql(Kl({},A),{[L]:I})},{})}function _(){l(4,g=null);const A=new Fi(s,[...a,c],{cwd:m||null,env:p()});A.on("close",P=>{r(`command finished with code ${P.code} and signal ${P.signal}`),l(4,g=null)}),A.on("error",P=>r(`command error: "${P}"`)),A.stdout.on("data",P=>r(`command stdout: "${P}"`)),A.stderr.on("data",P=>r(`command stderr: "${P}"`)),A.spawn().then(P=>{l(4,g=P)}).catch(r)}function w(){g.kill().then(()=>r("killed child process")).catch(r)}function b(){g.write(k).catch(r)}function d(){c=this.value,l(0,c)}function z(){k=this.value,l(3,k)}function M(){m=this.value,l(1,m)}function q(){v=this.value,l(2,v)}return n.$$set=A=>{"onMessage"in A&&l(8,r=A.onMessage)},[c,m,v,k,g,_,w,b,r,d,z,M,q]}class As extends X{constructor(t){super();Y(this,t,Ps,Os,J,{onMessage:8})}}function Is(n){let t,l,i,s,a,r;return{c(){t=o("div"),l=o("button"),l.textContent="Check update",i=h(),s=o("button"),s.textContent="Install update",u(l,"class","button"),u(l,"id","check_update"),u(s,"class","button hidden"),u(s,"id","start_update")},m(c,m){S(c,t,m),e(t,l),e(t,i),e(t,s),a||(r=[y(l,"click",n[0]),y(s,"click",n[1])],a=!0)},p:W,i:W,o:W,d(c){c&&R(t),a=!1,x(r)}}}function Ws(n,t,l){let{onMessage:i}=t,s;en(async()=>{s=await $l("tauri://update-status",i)}),Wn(()=>{s&&s()});async function a(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:m}=await Vi();i(`Should update: ${c}`),i(m),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function r(){try{document.getElementById("start_update").classList.add("hidden"),await Xi(),i("Installation complete, restart required."),await Zl()}catch(c){i(c)}}return n.$$set=c=>{"onMessage"in c&&l(2,i=c.onMessage)},[a,r,i]}class Us extends X{constructor(t){super();Y(this,t,Ws,Is,J,{onMessage:2})}}function qs(n){let t,l,i,s,a,r,c,m,v;return{c(){t=o("div"),l=o("div"),i=o("input"),s=h(),a=o("button"),a.textContent="Write",r=h(),c=o("button"),c.textContent="Read",u(i,"placeholder","Text to write to the clipboard"),u(a,"type","button"),u(c,"type","button")},m(k,g){S(k,t,g),e(t,l),e(l,i),E(i,n[0]),e(l,s),e(l,a),e(t,r),e(t,c),m||(v=[y(i,"input",n[4]),y(a,"click",n[1]),y(c,"click",n[2])],m=!0)},p(k,[g]){g&1&&i.value!==k[0]&&E(i,k[0])},i:W,o:W,d(k){k&&R(t),m=!1,x(v)}}}function Ns(n,t,l){let{onMessage:i}=t,s="clipboard message";function a(){Yi(s).then(()=>{i("Wrote to the clipboard")}).catch(i)}function r(){Ji().then(m=>{i(`Clipboard contents: ${m}`)}).catch(i)}function c(){s=this.value,l(0,s)}return n.$$set=m=>{"onMessage"in m&&l(3,i=m.onMessage)},[s,a,r,i,c]}class Ds extends X{constructor(t){super();Y(this,t,Ns,qs,J,{onMessage:3})}}function js(n){let t;return{c(){t=o("div"),t.innerHTML=`

    Not available for Linux

    - `},m(l,i){S(l,t,i)},p:W,i:W,o:W,d(l){l&&R(t)}}}function Gs(n,t,l){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function a(c){const m=document.querySelector("video"),v=c.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${v[0].label}`),window.stream=c,m.srcObject=c}function r(c){if(c.name==="ConstraintNotSatisfiedError"){const m=s.video;i(`The resolution ${m.width.exact}x${m.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return en(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(s);a(c)}catch(c){r(c)}}),Wn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),n.$$set=c=>{"onMessage"in c&&l(0,i=c.onMessage)},[i]}class Bs extends X{constructor(t){super();Y(this,t,Gs,js,J,{onMessage:0})}}function Fs(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b;return p=new Ki({props:{json:n[2]}}),{c(){t=o("div"),l=o("input"),i=h(),s=o("input"),a=h(),r=o("label"),c=o("input"),m=C(`\r - Multipart`),v=h(),k=o("button"),k.textContent="Post it.",g=h(),Bn(p.$$.fragment),u(c,"type","checkbox"),u(k,"type","button")},m(d,z){S(d,t,z),e(t,l),E(l,n[0]),e(t,i),e(t,s),E(s,n[1]),e(t,a),e(t,r),e(r,c),c.checked=n[3],e(r,m),e(t,v),e(t,k),e(t,g),Fn(p,t,null),_=!0,w||(b=[y(l,"input",n[5]),y(s,"input",n[6]),y(c,"change",n[7]),y(k,"click",n[4])],w=!0)},p(d,[z]){z&1&&l.value!==d[0]&&E(l,d[0]),z&2&&s.value!==d[1]&&E(s,d[1]),z&8&&(c.checked=d[3]);const M={};z&4&&(M.json=d[2]),p.$set(M)},i(d){_||(Vn(p.$$.fragment,d),_=!0)},o(d){Xn(p.$$.fragment,d),_=!1},d(d){d&&R(t),Yn(p),w=!1,x(b)}}}function Vs(n,t,l){let i="baz",s="qux",a=null,r=!0;async function c(){const g=await ni().catch(p=>{throw onMessage(p),p});l(2,a=await g.request({url:"http://localhost:3003",method:"POST",body:Nn.form({foo:i,bar:s}),headers:r?{"Content-Type":"multipart/form-data"}:void 0,responseType:Qi.Text}))}function m(){i=this.value,l(0,i)}function v(){s=this.value,l(1,s)}function k(){r=this.checked,l(3,r)}return[i,s,a,r,c,m,v,k]}class Xs extends X{constructor(t){super();Y(this,t,Vs,Fs,J,{})}}function bi(n,t,l){const i=n.slice();return i[10]=t[l],i}function wi(n,t,l){const i=n.slice();return i[13]=t[l],i}function ki(n){let t,l=n[13].label+"",i,s,a,r,c;function m(){return n[9](n[13])}return{c(){t=o("p"),i=C(l),s=h(),u(t,"class",a="nv noselect "+(n[0]===n[13]?"nv_selected":""))},m(v,k){S(v,t,k),e(t,i),e(t,s),r||(c=y(t,"click",m),r=!0)},p(v,k){n=v,k&1&&a!==(a="nv noselect "+(n[0]===n[13]?"nv_selected":""))&&u(t,"class",a)},d(v){v&&R(t),r=!1,c()}}}function Ys(n){let t,l=n[10].html+"",i;return{c(){i=ai(),t=new es(i)},m(s,a){t.m(l,s,a),S(s,i,a)},p(s,a){a&2&&l!==(l=s[10].html+"")&&t.p(l)},d(s){s&&R(i),s&&t.d()}}}function Js(n){let t,l=n[10].text+"",i;return{c(){t=o("p"),i=C(l)},m(s,a){S(s,t,a),e(t,i)},p(s,a){a&2&&l!==(l=s[10].text+"")&&G(i,l)},d(s){s&&R(t)}}}function yi(n){let t;function l(a,r){return a[10].text?Js:Ys}let i=l(n),s=i(n);return{c(){s.c(),t=ai()},m(a,r){s.m(a,r),S(a,t,r)},p(a,r){i===(i=l(a))&&s?s.p(a,r):(s.d(1),s=i(a),s&&(s.c(),s.m(t.parentNode,t)))},d(a){s.d(a),a&&R(t)}}}function Ks(n){let t,l,i,s,a,r,c,m,v,k,g,p,_,w,b,d,z,M,q,A,P,L,I=n[2],N=[];for(let O=0;ODocumentation - Github - Source`,c=h(),m=o("div"),v=o("div");for(let O=0;O{Yn(H,1)}),Zi()}K?(p=new K(fe(O)),Bn(p.$$.fragment),Vn(p.$$.fragment,1),Fn(p,g,null)):p=null}if(Q&2){V=O[1];let H;for(H=0;H{xi(Qs,()=>{Un("menu_toggle")})}),jn.listen("tauri://file-drop",function(_){m(`File drop: ${_.payload}`)});const s=[{label:"Welcome",component:is},{label:"Messages",component:cs},{label:"CLI",component:as},{label:"Dialog",component:hs},{label:"File system",component:gs},{label:"HTTP",component:ks},{label:"HTTP Form",component:Xs},{label:"Notifications",component:Ms},{label:"Window",component:Rs},{label:"Shortcuts",component:Hs},{label:"Shell",component:As},{label:"Updater",component:Us},{label:"Clipboard",component:Ds},{label:"WebRTC",component:Bs}];let a=s[0],r=oi([]);si(n,r,_=>l(1,i=_));function c(_){l(0,a=_)}function m(_){r.update(w=>[{text:`[${new Date().toLocaleTimeString()}]: `+(typeof _=="string"?_:JSON.stringify(_))},...w])}function v(_){r.update(w=>[{html:_},...w])}function k(){r.update(()=>[])}function g(){ii("https://tauri.app/")}return[a,i,s,r,c,m,v,k,g,_=>c(_)]}class $s extends X{constructor(t){super();Y(this,t,Zs,Ks,J,{})}}new $s({target:document.body}); +const Ql=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}};Ql();function G(){}function hl(t){return t()}function Ho(){return Object.create(null)}function ue(t){t.forEach(hl)}function Zl(t){return typeof t=="function"}function me(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Nn;function xl(t,e){return Nn||(Nn=document.createElement("a")),Nn.href=e,t===Nn.href}function $l(t){return Object.keys(t).length===0}function er(t,...e){if(t==null)return G;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ml(t,e,n){t.$$.on_destroy.push(er(e,n))}function l(t,e){t.appendChild(e)}function v(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode.removeChild(t)}function ut(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function Yn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function u(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function re(t){return t===""?null:+t}function nr(t){return Array.from(t.childNodes)}function Q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function B(t,e){t.value=e==null?"":e}function Ct(t,e){for(let n=0;n{Vn.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}function Kn(t){t&&t.c()}function Bt(t,e,n,i){const{fragment:o,on_mount:r,on_destroy:a,after_update:f}=t.$$;o&&o.m(e,n),i||zt(()=>{const c=r.map(hl).filter(Zl);a?a.push(...c):ue(c),t.$$.on_mount=[]}),f.forEach(zt)}function Vt(t,e){const n=t.$$;n.fragment!==null&&(ue(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function sr(t,e){t.$$.dirty[0]===-1&&(It.push(t),lr(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const g=y.length?y[0]:b;return p.ctx&&o(p.ctx[k],p.ctx[k]=g)&&(!p.skip_bound&&p.bound[k]&&p.bound[k](g),d&&sr(t,k)),b}):[],p.update(),d=!0,ue(p.before_update),p.fragment=i?i(p.ctx):!1,e.target){if(e.hydrate){const k=nr(e.target);p.fragment&&p.fragment.l(k),k.forEach(m)}else p.fragment&&p.fragment.c();e.intro&&Te(t.$$.fragment),Bt(t,e.target,e.anchor,e.customElement),_l()}Ut(c)}class ye{$destroy(){Vt(this,1),this.$destroy=G}$on(e,n){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(e){this.$$set&&!$l(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const kt=[];function bl(t,e=G){let n;const i=new Set;function o(f){if(me(t,f)&&(t=f,n)){const c=!kt.length;for(const p of i)p[1](),kt.push(p,t);if(c){for(let p=0;p{i.delete(p),i.size===0&&(n(),n=null)}}return{set:o,update:r,subscribe:a}}var gl=function(t,e){return(gl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(t,e)};function ji(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}gl(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Fe=function(){return(Fe=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&o[o.length-1])||d[0]!==6&&d[0]!==2)){a=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]@tauri-apps/api package. It's used as the main validation app, serving as the test bed of our + development process. In the future, this app will be used on Tauri's integration + tests.`,n=_(),i=s("br"),o=_(),r=s("br"),a=_(),f=s("pre"),c=E("App name: "),p=s("code"),d=E(t[2]),k=E(` +App version: `),b=s("code"),y=E(t[0]),g=E(` +Tauri version: `),h=s("code"),O=E(t[1]),j=E(` +`),I=_(),R=s("br"),H=_(),M=s("div"),z=s("button"),z.textContent="Close application",S=_(),D=s("button"),D.textContent="Relaunch application",u(z,"class","btn"),u(D,"class","btn"),u(M,"class","flex flex-wrap gap-1 shadow-")},m(q,X){v(q,e,X),v(q,n,X),v(q,i,X),v(q,o,X),v(q,r,X),v(q,a,X),v(q,f,X),l(f,c),l(f,p),l(p,d),l(f,k),l(f,b),l(b,y),l(f,g),l(f,h),l(h,O),l(f,j),v(q,I,X),v(q,R,X),v(q,H,X),v(q,M,X),l(M,z),l(M,S),l(M,D),L||(N=[P(z,"click",t[3]),P(D,"click",t[4])],L=!0)},p(q,[X]){X&4&&Q(d,q[2]),X&1&&Q(y,q[0]),X&2&&Q(O,q[1])},i:G,o:G,d(q){q&&m(e),q&&m(n),q&&m(i),q&&m(o),q&&m(r),q&&m(a),q&&m(f),q&&m(I),q&&m(R),q&&m(H),q&&m(M),L=!1,ue(N)}}}function gr(t,e,n){let i="0.0.0",o="0.0.0",r="Unknown";Wl().then(c=>{n(2,r=c)}),Pl().then(c=>{n(0,i=c)}),El().then(c=>{n(1,o=c)});async function a(){await jl()}async function f(){await Hi()}return[i,o,r,a,f]}class yr extends ye{constructor(e){super(),ge(this,e,gr,br,me,{})}}function Dl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:Dl});function wr(t){let e,n,i,o,r,a,f,c,p,d,k,b,y;return{c(){e=s("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments: +
      --config <PATH>
    +  --theme <light|dark|system>
    +  --verbose
    + Additionally, it has a update --background subcommand.`,n=_(),i=s("br"),o=_(),r=s("div"),r.textContent="Note that the arguments are only parsed, not implemented.",a=_(),f=s("br"),c=_(),p=s("br"),d=_(),k=s("button"),k.textContent="Get matches",u(r,"class","note"),u(k,"class","btn"),u(k,"id","cli-matches")},m(g,h){v(g,e,h),v(g,n,h),v(g,i,h),v(g,o,h),v(g,r,h),v(g,a,h),v(g,f,h),v(g,c,h),v(g,p,h),v(g,d,h),v(g,k,h),b||(y=P(k,"click",t[0]),b=!0)},p:G,i:G,o:G,d(g){g&&m(e),g&&m(n),g&&m(i),g&&m(o),g&&m(r),g&&m(a),g&&m(f),g&&m(c),g&&m(p),g&&m(d),g&&m(k),b=!1,y()}}}function kr(t,e,n){let{onMessage:i}=e;function o(){Dl().then(i).catch(i)}return t.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[o,i]}class Mr extends ye{constructor(e){super(),ge(this,e,kr,wr,me,{onMessage:1})}}function Lt(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Ri(t,null,e)]})})}function Rl(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Cl(t,null,e)]})})}function ti(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,Tl(t,void 0,e)]})})}Object.freeze({__proto__:null,listen:Lt,once:Rl,emit:ti});function Tr(t){let e,n,i,o,r,a,f,c;return{c(){e=s("div"),n=s("button"),n.textContent="Call Log API",i=_(),o=s("button"),o.textContent="Call Request (async) API",r=_(),a=s("button"),a.textContent="Send event to Rust",u(n,"class","btn"),u(n,"id","log"),u(o,"class","btn"),u(o,"id","request"),u(a,"class","btn"),u(a,"id","event")},m(p,d){v(p,e,d),l(e,n),l(e,i),l(e,o),l(e,r),l(e,a),f||(c=[P(n,"click",t[0]),P(o,"click",t[1]),P(a,"click",t[2])],f=!0)},p:G,i:G,o:G,d(p){p&&m(e),f=!1,ue(c)}}}function Cr(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Lt("rust-event",i)}),Ei(()=>{o&&o()});function r(){Qn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function a(){Qn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){ti("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[r,a,f,i]}class zr extends ye{constructor(e){super(),ge(this,e,Cr,Tr,me,{onMessage:3})}}function Fi(t){return t===void 0&&(t={}),T(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]})})}function Hl(t){return t===void 0&&(t={}),T(this,void 0,void 0,function(){return C(this,function(e){return typeof t=="object"&&Object.freeze(t),[2,A({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]})})}function Sr(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Fl(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"askDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}function Ar(t,e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return[2,A({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:t,title:(n=typeof e=="string"?{title:e}:e)==null?void 0:n.title,type:n==null?void 0:n.type}})]})})}Object.freeze({__proto__:null,open:Fi,save:Hl,message:Sr,ask:Fl,confirm:Ar});var At;function Or(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]})})}function Ii(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){var n;return C(this,function(i){switch(i.label){case 0:return[4,A({__tauriModule:"Fs",message:{cmd:"readFile",path:t,options:e}})];case 1:return n=i.sent(),[2,Uint8Array.from(n)]}})})}function Pi(t,e,n){return T(this,void 0,void 0,function(){var i,o;return C(this,function(r){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:""},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),typeof e=="string"?i.contents=e!=null?e:"":o=e,[2,A({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:o}})]})})}function Lr(t,e,n){return T(this,void 0,void 0,function(){var i,o;return C(this,function(r){return typeof n=="object"&&Object.freeze(n),typeof t=="object"&&Object.freeze(t),i={path:"",contents:[]},o=n,typeof t=="string"?i.path=t:(i.path=t.path,i.contents=t.contents),e&&"dir"in e?o=e:typeof t=="string"&&(i.contents=e!=null?e:[]),[2,A({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents),options:o}})]})})}function Il(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"readDir",path:t,options:e}})]})})}function Pr(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"createDir",path:t,options:e}})]})})}function Wr(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"removeDir",path:t,options:e}})]})})}function Er(t,e,n){return n===void 0&&(n={}),T(this,void 0,void 0,function(){return C(this,function(i){return[2,A({__tauriModule:"Fs",message:{cmd:"copyFile",source:t,destination:e,options:n}})]})})}function jr(t,e){return e===void 0&&(e={}),T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"Fs",message:{cmd:"removeFile",path:t,options:e}})]})})}function Dr(t,e,n){return n===void 0&&(n={}),T(this,void 0,void 0,function(){return C(this,function(i){return[2,A({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:t,newPath:e,options:n}})]})})}(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Desktop=6]="Desktop",t[t.Document=7]="Document",t[t.Download=8]="Download",t[t.Executable=9]="Executable",t[t.Font=10]="Font",t[t.Home=11]="Home",t[t.Picture=12]="Picture",t[t.Public=13]="Public",t[t.Runtime=14]="Runtime",t[t.Template=15]="Template",t[t.Video=16]="Video",t[t.Resource=17]="Resource",t[t.App=18]="App",t[t.Log=19]="Log",t[t.Temp=20]="Temp"})(At||(At={}));Object.freeze({__proto__:null,get BaseDirectory(){return At},get Dir(){return At},readTextFile:Or,readBinaryFile:Ii,writeTextFile:Pi,writeFile:Pi,writeBinaryFile:Lr,readDir:Il,createDir:Pr,removeDir:Wr,copyFile:Er,removeFile:jr,renameFile:Dr});function Rr(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H,M,z,S,D;return{c(){e=s("div"),n=s("input"),i=_(),o=s("input"),r=_(),a=s("br"),f=_(),c=s("div"),p=s("input"),d=_(),k=s("label"),k.textContent="Multiple",b=_(),y=s("div"),g=s("input"),h=_(),O=s("label"),O.textContent="Directory",j=_(),I=s("br"),R=_(),H=s("button"),H.textContent="Open dialog",M=_(),z=s("button"),z.textContent="Open save dialog",u(n,"class","input"),u(n,"id","dialog-default-path"),u(n,"placeholder","Default path"),u(o,"class","input"),u(o,"id","dialog-filter"),u(o,"placeholder","Extensions filter, comma-separated"),u(e,"class","flex gap-2 children:grow"),u(p,"type","checkbox"),u(p,"id","dialog-multiple"),u(k,"for","dialog-multiple"),u(g,"type","checkbox"),u(g,"id","dialog-directory"),u(O,"for","dialog-directory"),u(H,"class","btn"),u(H,"id","open-dialog"),u(z,"class","btn"),u(z,"id","save-dialog")},m(L,N){v(L,e,N),l(e,n),B(n,t[0]),l(e,i),l(e,o),B(o,t[1]),v(L,r,N),v(L,a,N),v(L,f,N),v(L,c,N),l(c,p),p.checked=t[2],l(c,d),l(c,k),v(L,b,N),v(L,y,N),l(y,g),g.checked=t[3],l(y,h),l(y,O),v(L,j,N),v(L,I,N),v(L,R,N),v(L,H,N),v(L,M,N),v(L,z,N),S||(D=[P(n,"input",t[8]),P(o,"input",t[9]),P(p,"change",t[10]),P(g,"change",t[11]),P(H,"click",t[4]),P(z,"click",t[5])],S=!0)},p(L,[N]){N&1&&n.value!==L[0]&&B(n,L[0]),N&2&&o.value!==L[1]&&B(o,L[1]),N&4&&(p.checked=L[2]),N&8&&(g.checked=L[3])},i:G,o:G,d(L){L&&m(e),L&&m(r),L&&m(a),L&&m(f),L&&m(c),L&&m(b),L&&m(y),L&&m(j),L&&m(I),L&&m(R),L&&m(H),L&&m(M),L&&m(z),S=!1,ue(D)}}}function Hr(t,e){var n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(o){var r=o.target.result;e(r.substr(r.indexOf(",")+1))},i.readAsDataURL(n)}function Fr(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:o}=e,r=null,a=null,f=!1,c=!1;function p(){Fi({title:"My wonderful open dialog",defaultPath:r,filters:a?[{name:"Tauri Example",extensions:a.split(",").map(h=>h.trim())}]:[],multiple:f,directory:c}).then(function(h){if(Array.isArray(h))i(h);else{var O=h,j=O.match(/\S+\.\S+$/g);Ii(O).then(function(I){j&&(O.includes(".png")||O.includes(".jpg"))?Hr(new Uint8Array(I),function(R){var H="data:image/png;base64,"+R;o('')}):i(h)}).catch(i(h))}}).catch(i)}function d(){Hl({title:"My wonderful save dialog",defaultPath:r,filters:a?[{name:"Tauri Example",extensions:a.split(",").map(h=>h.trim())}]:[]}).then(i).catch(i)}function k(){r=this.value,n(0,r)}function b(){a=this.value,n(1,a)}function y(){f=this.checked,n(2,f)}function g(){c=this.checked,n(3,c)}return t.$$set=h=>{"onMessage"in h&&n(6,i=h.onMessage),"insecureRenderHtml"in h&&n(7,o=h.insecureRenderHtml)},[r,a,f,c,p,d,i,o,k,b,y,g]}class Ir extends ye{constructor(e){super(),ge(this,e,Fr,Rr,me,{onMessage:6,insecureRenderHtml:7})}}function No(t,e,n){const i=t.slice();return i[9]=e[n],i}function Uo(t){let e,n=t[9][0]+"",i,o;return{c(){e=s("option"),i=E(n),e.__value=o=t[9][1],e.value=e.__value},m(r,a){v(r,e,a),l(e,i)},p:G,d(r){r&&m(e)}}}function Nr(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H=t[2],M=[];for(let z=0;zisNaN(parseInt(b))).map(b=>[b,At[b]]);function c(){const b=r.match(/\S+\.\S+$/g),y={dir:qo()};(b?Ii(r,y):Il(r,y)).then(function(h){if(b)if(r.includes(".png")||r.includes(".jpg"))Ur(new Uint8Array(h),function(O){const j="data:image/png;base64,"+O;o('')});else{const O=String.fromCharCode.apply(null,h);o(''),setTimeout(()=>{const j=document.getElementById("file-response");j.value=O,document.getElementById("file-save").addEventListener("click",function(){Pi(r,j.value,{dir:qo()}).catch(i)})})}else i(h)}).catch(i)}function p(){n(1,a.src=yl(r),a)}function d(){r=this.value,n(0,r)}function k(b){Xn[b?"unshift":"push"](()=>{a=b,n(1,a)})}return t.$$set=b=>{"onMessage"in b&&n(5,i=b.onMessage),"insecureRenderHtml"in b&&n(6,o=b.insecureRenderHtml)},[r,a,f,c,p,i,o,d,k]}class Br extends ye{constructor(e){super(),ge(this,e,qr,Nr,me,{onMessage:5,insecureRenderHtml:6})}}var Ot;(function(t){t[t.JSON=1]="JSON",t[t.Text=2]="Text",t[t.Binary=3]="Binary"})(Ot||(Ot={}));var Jn=function(){function t(e,n){this.type=e,this.payload=n}return t.form=function(e){var n={};for(var i in e){var o=e[i],r=void 0;r=typeof o=="string"?o:o instanceof Uint8Array||Array.isArray(o)?Array.from(o):typeof o.file=="string"?{file:o.file,mime:o.mime,fileName:o.fileName}:{file:Array.from(o.file),mime:o.mime,fileName:o.fileName},n[i]=r}return new t("Form",n)},t.json=function(e){return new t("Json",e)},t.text=function(e){return new t("Text",e)},t.bytes=function(e){return new t("Bytes",Array.from(e))},t}(),Nl=function(t){this.url=t.url,this.status=t.status,this.ok=this.status>=200&&this.status<300,this.headers=t.headers,this.rawHeaders=t.rawHeaders,this.data=t.data},Ul=function(){function t(e){this.id=e}return t.prototype.drop=function(){return T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},t.prototype.request=function(e){return T(this,void 0,void 0,function(){var n;return C(this,function(i){return(n=!e.responseType||e.responseType===Ot.JSON)&&(e.responseType=Ot.Text),[2,A({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(function(o){var r=new Nl(o);if(n){try{r.data=JSON.parse(r.data)}catch(a){if(r.ok&&r.data==="")r.data={};else if(r.ok)throw Error("Failed to parse response `".concat(r.data,"` as JSON: ").concat(a,";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response."))}return r}return r})]})})},t.prototype.get=function(e,n){return T(this,void 0,void 0,function(){return C(this,function(i){return[2,this.request(Fe({method:"GET",url:e},n))]})})},t.prototype.post=function(e,n,i){return T(this,void 0,void 0,function(){return C(this,function(o){return[2,this.request(Fe({method:"POST",url:e,body:n},i))]})})},t.prototype.put=function(e,n,i){return T(this,void 0,void 0,function(){return C(this,function(o){return[2,this.request(Fe({method:"PUT",url:e,body:n},i))]})})},t.prototype.patch=function(e,n){return T(this,void 0,void 0,function(){return C(this,function(i){return[2,this.request(Fe({method:"PATCH",url:e},n))]})})},t.prototype.delete=function(e,n){return T(this,void 0,void 0,function(){return C(this,function(i){return[2,this.request(Fe({method:"DELETE",url:e},n))]})})},t}();function xn(t){return T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then(function(n){return new Ul(n)})]})})}var Ai=null;function Vr(t,e){var n;return T(this,void 0,void 0,function(){return C(this,function(i){switch(i.label){case 0:return Ai!==null?[3,2]:[4,xn()];case 1:Ai=i.sent(),i.label=2;case 2:return[2,Ai.request(Fe({url:t,method:(n=e==null?void 0:e.method)!==null&&n!==void 0?n:"GET"},e))]}})})}Object.freeze({__proto__:null,getClient:xn,fetch:Vr,Body:Jn,Client:Ul,Response:Nl,get ResponseType(){return Ot}});function Bo(t,e,n){const i=t.slice();return i[12]=e[n],i[14]=n,i}function Vo(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I=t[5],R=[];for(let S=0;SEe(R[S],1,1,()=>{R[S]=null});let M=!t[3]&&Xo(),z=!t[3]&&t[8]&&Ko();return{c(){e=s("span"),n=s("span"),i=E(t[6]),o=_(),r=s("ul");for(let S=0;S{d[g]=null}),ei(),r=d[o],r?r.p(b,y):(r=d[o]=p[o](b),r.c()),Te(r,1),r.m(e,a))},i(b){f||(Te(r),f=!0)},o(b){Ee(r),f=!1},d(b){b&&m(e),c&&c.d(),d[o].d()}}}function Xo(t){let e;return{c(){e=s("span"),e.textContent=",",u(e,"class","comma svelte-gbh3pt")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ko(t){let e;return{c(){e=s("span"),e.textContent=",",u(e,"class","comma svelte-gbh3pt")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Yr(t){let e,n,i=t[5].length&&Vo(t);return{c(){i&&i.c(),e=Wi()},m(o,r){i&&i.m(o,r),v(o,e,r),n=!0},p(o,[r]){o[5].length?i?(i.p(o,r),r&32&&Te(i,1)):(i=Vo(o),i.c(),Te(i,1),i.m(e.parentNode,e)):i&&($n(),Ee(i,1,1,()=>{i=null}),ei())},i(o){n||(Te(i),n=!0)},o(o){Ee(i),n=!1},d(o){i&&i.d(o),o&&m(e)}}}const Xr="...";function Kr(t,e,n){let{json:i}=e,{depth:o=1/0}=e,{_lvl:r=0}=e,{_last:a=!0}=e;const f=h=>h===null?"null":typeof h;let c,p,d,k,b;const y=h=>{switch(f(h)){case"string":return`"${h}"`;case"function":return"f () {...}";case"symbol":return h.toString();default:return h}},g=()=>{n(8,b=!b)};return t.$$set=h=>{"json"in h&&n(0,i=h.json),"depth"in h&&n(1,o=h.depth),"_lvl"in h&&n(2,r=h._lvl),"_last"in h&&n(3,a=h._last)},t.$$.update=()=>{t.$$.dirty&17&&(n(5,c=f(i)==="object"?Object.keys(i):[]),n(4,p=Array.isArray(i)),n(6,d=p?"[":"{"),n(7,k=p?"]":"}")),t.$$.dirty&6&&n(8,b=ot[9].call(n)),u(k,"class","input h-auto w-100%"),u(k,"id","request-body"),u(k,"placeholder","Request body"),u(k,"rows","5"),u(h,"class","btn"),u(h,"id","make-request"),u(z,"class","input"),u(D,"class","input"),u(M,"class","flex gap-2 children:grow"),u(x,"type","checkbox"),u(ie,"class","btn"),u(ie,"type","button")},m(W,V){v(W,e,V),l(e,n),l(n,i),l(n,o),l(n,r),l(n,a),l(n,f),Ct(n,t[0]),l(e,c),l(e,p),l(e,d),l(e,k),B(k,t[1]),l(e,b),l(e,y),l(e,g),l(e,h),v(W,O,V),v(W,j,V),v(W,I,V),v(W,R,V),v(W,H,V),v(W,M,V),l(M,z),B(z,t[2]),l(M,S),l(M,D),B(D,t[3]),v(W,L,V),v(W,N,V),v(W,q,V),v(W,X,V),l(X,x),x.checked=t[5],l(X,ae),v(W,Y,V),v(W,ce,V),v(W,$,V),v(W,pe,V),v(W,ve,V),v(W,ie,V),v(W,we,V),v(W,Ce,V),v(W,te,V),v(W,_e,V),v(W,fe,V),Bt(oe,W,V),le=!0,Ae||(ee=[P(n,"change",t[9]),P(k,"input",t[10]),P(e,"submit",Yn(t[6])),P(z,"input",t[11]),P(D,"input",t[12]),P(x,"change",t[13]),P(ie,"click",t[7])],Ae=!0)},p(W,[V]){V&1&&Ct(n,W[0]),V&2&&B(k,W[1]),V&4&&z.value!==W[2]&&B(z,W[2]),V&8&&D.value!==W[3]&&B(D,W[3]),V&32&&(x.checked=W[5]);const ne={};V&16&&(ne.json=W[4]),oe.$set(ne)},i(W){le||(Te(oe.$$.fragment,W),le=!0)},o(W){Ee(oe.$$.fragment,W),le=!1},d(W){W&&m(e),W&&m(O),W&&m(j),W&&m(I),W&&m(R),W&&m(H),W&&m(M),W&&m(L),W&&m(N),W&&m(q),W&&m(X),W&&m(Y),W&&m(ce),W&&m($),W&&m(pe),W&&m(ve),W&&m(ie),W&&m(we),W&&m(Ce),W&&m(te),W&&m(_e),W&&m(fe),Vt(oe,W),Ae=!1,ue(ee)}}}function Zr(t,e,n){let i="GET",o="",{onMessage:r}=e;async function a(){const j=await xn().catch(H=>{throw r(H),H}),R={url:"http://localhost:3003",method:i||"GET"||"GET"};o.startsWith("{")&&o.endsWith("}")||o.startsWith("[")&&o.endsWith("]")?R.body=Jn.json(JSON.parse(o)):o!==""&&(R.body=Jn.text(o)),j.request(R).then(r).catch(r)}let f="baz",c="qux",p=null,d=!0;async function k(){const j=await xn().catch(I=>{throw r(I),I});n(4,p=await j.request({url:"http://localhost:3003",method:"POST",body:Jn.form({foo:f,bar:c}),headers:d?{"Content-Type":"multipart/form-data"}:void 0,responseType:Ot.Text}))}function b(){i=Oi(this),n(0,i)}function y(){o=this.value,n(1,o)}function g(){f=this.value,n(2,f)}function h(){c=this.value,n(3,c)}function O(){d=this.checked,n(5,d)}return t.$$set=j=>{"onMessage"in j&&n(8,r=j.onMessage)},[i,o,f,c,p,d,a,k,r,b,y,g,h,O]}class xr extends ye{constructor(e){super(),ge(this,e,Zr,Qr,me,{onMessage:8})}}function $r(t){let e,n,i;return{c(){e=s("button"),e.textContent="Send test notification",u(e,"class","btn"),u(e,"id","notification")},m(o,r){v(o,e,r),n||(i=P(e,"click",es),n=!0)},p:G,i:G,o:G,d(o){o&&m(e),n=!1,i()}}}function es(){new Notification("Notification title",{body:"This is the notification body"})}function ts(t,e,n){let{onMessage:i}=e;return t.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class ns extends ye{constructor(e){super(),ge(this,e,ts,$r,me,{onMessage:0})}}function Qo(t,e,n){const i=t.slice();return i[65]=e[n],i}function Zo(t,e,n){const i=t.slice();return i[68]=e[n],i}function xo(t){let e,n,i,o,r,a,f=Object.keys(t[1]),c=[];for(let p=0;pt[38].call(i))},m(p,d){v(p,e,d),v(p,n,d),v(p,i,d),l(i,o);for(let k=0;kt[55].call(He)),u(Xe,"class","input"),u(Xe,"type","number"),u(Ke,"class","input"),u(Ke,"type","number"),u(Re,"class","flex gap-2"),u(Qe,"class","input grow"),u(Qe,"id","title"),u(Ht,"class","btn"),u(Ht,"type","submit"),u(it,"class","flex gap-1"),u(Ze,"class","input grow"),u(Ze,"id","url"),u(Ft,"class","btn"),u(Ft,"id","open-url"),u(ot,"class","flex gap-1"),u(nt,"class","flex flex-col gap-1")},m(w,F){v(w,e,F),v(w,n,F),v(w,i,F),l(i,o),l(i,r),l(i,a),l(i,f),l(i,c),l(i,p),l(i,d),l(i,k),l(i,b),v(w,y,F),v(w,g,F),v(w,h,F),v(w,O,F),l(O,j),l(j,I),l(j,R),R.checked=t[3],l(O,H),l(O,M),l(M,z),l(M,S),S.checked=t[2],l(O,D),l(O,L),l(L,N),l(L,q),q.checked=t[4],l(O,X),l(O,x),l(x,ae),l(x,Y),Y.checked=t[5],l(O,ce),l(O,$),l($,pe),l($,ve),ve.checked=t[6],v(w,ie,F),v(w,we,F),v(w,Ce,F),v(w,te,F),l(te,_e),l(_e,fe),l(fe,oe),l(fe,le),B(le,t[13]),l(_e,Ae),l(_e,ee),l(ee,W),l(ee,V),B(V,t[14]),l(te,ne),l(te,be),l(be,je),l(je,Oe),l(je,Z),B(Z,t[7]),l(be,U),l(be,se),l(se,J),l(se,de),B(de,t[8]),l(te,Jt),l(te,Ie),l(Ie,ct),l(ct,Yt),l(ct,Pe),B(Pe,t[9]),l(Ie,Xt),l(Ie,ft),l(ft,Kt),l(ft,We),B(We,t[10]),l(te,Qt),l(te,Ne),l(Ne,K),l(K,Pt),l(K,ze),B(ze,t[11]),l(Ne,Wt),l(Ne,xe),l(xe,Et),l(xe,Se),B(Se,t[12]),v(w,dt,F),v(w,pt,F),v(w,ht,F),v(w,Me,F),l(Me,De),l(De,Le),l(Le,$e),l(Le,jt),l(Le,et),l(et,Dt),l(et,ni),l(Le,Ni),l(Le,Zt),l(Zt,Ui),l(Zt,ii),l(De,qi),l(De,Ue),l(Ue,$t),l(Ue,Bi),l(Ue,en),l(en,Vi),l(en,oi),l(Ue,Gi),l(Ue,nn),l(nn,Ji),l(nn,li),l(Me,Yi),l(Me,vt),l(vt,qe),l(qe,ln),l(qe,Xi),l(qe,rn),l(rn,Ki),l(rn,ri),l(qe,Qi),l(qe,un),l(un,Zi),l(un,si),l(vt,xi),l(vt,Be),l(Be,cn),l(Be,$i),l(Be,fn),l(fn,eo),l(fn,ui),l(Be,to),l(Be,pn),l(pn,no),l(pn,ai),l(Me,io),l(Me,_t),l(_t,Ve),l(Ve,mn),l(Ve,oo),l(Ve,vn),l(vn,lo),l(vn,ci),l(Ve,ro),l(Ve,bn),l(bn,so),l(bn,fi),l(_t,uo),l(_t,Ge),l(Ge,yn),l(Ge,ao),l(Ge,wn),l(wn,co),l(wn,di),l(Ge,fo),l(Ge,Mn),l(Mn,po),l(Mn,pi),l(Me,ho),l(Me,bt),l(bt,Je),l(Je,Cn),l(Je,mo),l(Je,zn),l(zn,vo),l(zn,hi),l(Je,_o),l(Je,An),l(An,bo),l(An,mi),l(bt,go),l(bt,Ye),l(Ye,Ln),l(Ye,yo),l(Ye,Pn),l(Pn,wo),l(Pn,vi),l(Ye,ko),l(Ye,En),l(En,Mo),l(En,_i),v(w,bi,F),v(w,gi,F),v(w,yi,F),v(w,Rt,F),v(w,wi,F),v(w,tt,F),l(tt,Dn),l(Dn,gt),gt.checked=t[15],l(Dn,To),l(tt,Co),l(tt,Rn),l(Rn,yt),yt.checked=t[16],l(Rn,zo),v(w,ki,F),v(w,Re,F),l(Re,Hn),l(Hn,So),l(Hn,He);for(let he=0;he=1,d,k,b,y=p&&xo(t),g=t[1][t[0]]&&el(t);return{c(){e=s("div"),n=s("div"),i=s("input"),o=_(),r=s("button"),r.textContent="New window",a=_(),f=s("br"),c=_(),y&&y.c(),d=_(),g&&g.c(),u(i,"class","input grow"),u(i,"type","text"),u(i,"placeholder","New Window label.."),u(r,"class","btn"),u(n,"class","flex gap-1"),u(e,"class","flex flex-col children:grow gap-2")},m(h,O){v(h,e,O),l(e,n),l(n,i),B(i,t[20]),l(n,o),l(n,r),l(e,a),l(e,f),l(e,c),y&&y.m(e,null),l(e,d),g&&g.m(e,null),k||(b=[P(i,"input",t[37]),P(r,"click",t[34])],k=!0)},p(h,O){O[0]&1048576&&i.value!==h[20]&&B(i,h[20]),O[0]&2&&(p=Object.keys(h[1]).length>=1),p?y?y.p(h,O):(y=xo(h),y.c(),y.m(e,d)):y&&(y.d(1),y=null),h[1][h[0]]?g?g.p(h,O):(g=el(h),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},i:G,o:G,d(h){h&&m(e),y&&y.d(),g&&g.d(),k=!1,ue(b)}}}function os(t,e,n){let i=st.label;const o={[st.label]:st},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:a}=e,f,c="https://tauri.app",p=!0,d=!1,k=!0,b=!1,y=!1,g=null,h=null,O=null,j=null,I=null,R=null,H=null,M=null,z=1,S=new rt(H,M),D=new rt(H,M),L=new Tt(g,h),N=new Tt(g,h),q,X,x=!1,ae=!0,Y=null,ce=null,$="default",pe="Awesome Tauri Example!";function ve(){Di(c)}function ie(){o[i].setTitle(pe)}function we(){o[i].hide(),setTimeout(o[i].show,2e3)}function Ce(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)}function te(){Fi({multiple:!1}).then(K=>{typeof K=="string"&&o[i].setIcon(K)})}function _e(){if(!f)return;const K=new St(f);n(1,o[f]=K,o),K.once("tauri://error",function(){a("Error creating new webview")})}function fe(){o[i].innerSize().then(K=>{n(25,L=K),n(7,g=L.width),n(8,h=L.height)}),o[i].outerSize().then(K=>{n(26,N=K)})}function oe(){o[i].innerPosition().then(K=>{n(23,S=K)}),o[i].outerPosition().then(K=>{n(24,D=K),n(13,H=D.x),n(14,M=D.y)})}async function le(K){!K||(q&&q(),X&&X(),X=await K.listen("tauri://move",oe),q=await K.listen("tauri://resize",fe))}async function Ae(){await o[i].minimize(),await o[i].requestUserAttention(Gt.Critical),await new Promise(K=>setTimeout(K,3e3)),await o[i].requestUserAttention(null)}function ee(){f=this.value,n(20,f)}function W(){i=Oi(this),n(0,i),n(1,o)}const V=()=>o[i].center();function ne(){d=this.checked,n(3,d)}function be(){p=this.checked,n(2,p)}function je(){k=this.checked,n(4,k)}function Oe(){b=this.checked,n(5,b)}function Z(){y=this.checked,n(6,y)}function U(){H=re(this.value),n(13,H)}function se(){M=re(this.value),n(14,M)}function J(){g=re(this.value),n(7,g)}function de(){h=re(this.value),n(8,h)}function Jt(){O=re(this.value),n(9,O)}function Ie(){j=re(this.value),n(10,j)}function ct(){I=re(this.value),n(11,I)}function Yt(){R=re(this.value),n(12,R)}function Pe(){x=this.checked,n(15,x)}function Xt(){ae=this.checked,n(16,ae)}function ft(){$=Oi(this),n(19,$),n(28,r)}function Kt(){Y=re(this.value),n(17,Y)}function We(){ce=re(this.value),n(18,ce)}function Qt(){pe=this.value,n(27,pe)}function Ne(){c=this.value,n(21,c)}return t.$$set=K=>{"onMessage"in K&&n(36,a=K.onMessage)},t.$$.update=()=>{var K,Pt,ze,Wt,xe,Et,Se,dt,pt,ht,Me,De,Le,$e,jt,et,Dt;t.$$.dirty[0]&3&&(o[i],oe(),fe()),t.$$.dirty[0]&7&&((K=o[i])==null||K.setResizable(p)),t.$$.dirty[0]&11&&(d?(Pt=o[i])==null||Pt.maximize():(ze=o[i])==null||ze.unmaximize()),t.$$.dirty[0]&19&&((Wt=o[i])==null||Wt.setDecorations(k)),t.$$.dirty[0]&35&&((xe=o[i])==null||xe.setAlwaysOnTop(b)),t.$$.dirty[0]&67&&((Et=o[i])==null||Et.setFullscreen(y)),t.$$.dirty[0]&387&&g&&h&&((Se=o[i])==null||Se.setSize(new Tt(g,h))),t.$$.dirty[0]&1539&&(O&&j?(dt=o[i])==null||dt.setMinSize(new Zn(O,j)):(pt=o[i])==null||pt.setMinSize(null)),t.$$.dirty[0]&6147&&(I>800&&R>400?(ht=o[i])==null||ht.setMaxSize(new Zn(I,R)):(Me=o[i])==null||Me.setMaxSize(null)),t.$$.dirty[0]&24579&&H!==null&&M!==null&&((De=o[i])==null||De.setPosition(new rt(H,M))),t.$$.dirty[0]&3&&((Le=o[i])==null||Le.scaleFactor().then(mt=>n(22,z=mt))),t.$$.dirty[0]&3&&le(o[i]),t.$$.dirty[0]&32771&&(($e=o[i])==null||$e.setCursorGrab(x)),t.$$.dirty[0]&65539&&((jt=o[i])==null||jt.setCursorVisible(ae)),t.$$.dirty[0]&524291&&((et=o[i])==null||et.setCursorIcon($)),t.$$.dirty[0]&393219&&Y!==null&&ce!==null&&((Dt=o[i])==null||Dt.setCursorPosition(new rt(Y,ce)))},[i,o,p,d,k,b,y,g,h,O,j,I,R,H,M,x,ae,Y,ce,$,f,c,z,S,D,L,N,pe,r,ve,ie,we,Ce,te,_e,Ae,a,ee,W,V,ne,be,je,Oe,Z,U,se,J,de,Jt,Ie,ct,Yt,Pe,Xt,ft,Kt,We,Qt,Ne]}class ls extends ye{constructor(e){super(),ge(this,e,os,is,me,{onMessage:36},null,[-1,-1,-1])}}function Bl(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:at(e)}})]})})}function rs(t,e){return T(this,void 0,void 0,function(){return C(this,function(n){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:at(e)}})]})})}function ss(t){return T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]})})}function Vl(t){return T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]})})}function Gl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:Bl,registerAll:rs,isRegistered:ss,unregister:Vl,unregisterAll:Gl});function nl(t,e,n){const i=t.slice();return i[9]=e[n],i}function il(t){let e,n=t[9]+"",i,o,r,a,f;function c(){return t[8](t[9])}return{c(){e=s("div"),i=E(n),o=_(),r=s("button"),r.textContent="Unregister",u(r,"class","btn"),u(r,"type","button"),u(e,"class","flex justify-between")},m(p,d){v(p,e,d),l(e,i),l(e,o),l(e,r),a||(f=P(r,"click",c),a=!0)},p(p,d){t=p,d&2&&n!==(n=t[9]+"")&&Q(i,n)},d(p){p&&m(e),a=!1,f()}}}function ol(t){let e,n,i,o,r;return{c(){e=s("br"),n=_(),i=s("button"),i.textContent="Unregister all",u(i,"class","btn"),u(i,"type","button")},m(a,f){v(a,e,f),v(a,n,f),v(a,i,f),o||(r=P(i,"click",t[5]),o=!0)},p:G,d(a){a&&m(e),a&&m(n),a&&m(i),o=!1,r()}}}function us(t){let e,n,i,o,r,a,f,c,p,d,k,b=t[1],y=[];for(let h=0;h1&&ol(t);return{c(){e=s("div"),n=s("input"),i=_(),o=s("button"),o.textContent="Register",r=_(),a=s("br"),f=_(),c=s("div");for(let h=0;h1?g?g.p(h,O):(g=ol(h),g.c(),g.m(c,null)):g&&(g.d(1),g=null)},i:G,o:G,d(h){h&&m(e),h&&m(r),h&&m(a),h&&m(f),h&&m(c),ut(y,h),g&&g.d(),d=!1,ue(k)}}}function as(t,e,n){let i,{onMessage:o}=e;const r=bl([]);ml(t,r,b=>n(1,i=b));let a="CmdOrControl+X";function f(){const b=a;Bl(b,()=>{o(`Shortcut ${b} triggered`)}).then(()=>{r.update(y=>[...y,b]),o(`Shortcut ${b} registered successfully`)}).catch(o)}function c(b){const y=b;Vl(y).then(()=>{r.update(g=>g.filter(h=>h!==y)),o(`Shortcut ${y} unregistered`)}).catch(o)}function p(){Gl().then(()=>{r.update(()=>[]),o("Unregistered all shortcuts")}).catch(o)}function d(){a=this.value,n(0,a)}const k=b=>c(b);return t.$$set=b=>{"onMessage"in b&&n(6,o=b.onMessage)},[a,i,r,f,c,p,o,d,k]}class cs extends ye{constructor(e){super(),ge(this,e,as,us,me,{onMessage:6})}}function ll(t){let e,n,i,o,r,a,f;return{c(){e=s("br"),n=_(),i=s("input"),o=_(),r=s("button"),r.textContent="Write",u(i,"class","input"),u(i,"placeholder","write to stdin"),u(r,"class","btn")},m(c,p){v(c,e,p),v(c,n,p),v(c,i,p),B(i,t[3]),v(c,o,p),v(c,r,p),a||(f=[P(i,"input",t[12]),P(r,"click",t[7])],a=!0)},p(c,p){p&8&&i.value!==c[3]&&B(i,c[3])},d(c){c&&m(e),c&&m(n),c&&m(i),c&&m(o),c&&m(r),a=!1,ue(f)}}}function fs(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H,M=t[4]&&ll(t);return{c(){e=s("div"),n=s("div"),i=E(`Script: + `),o=s("input"),r=_(),a=s("div"),f=E(`Working directory: + `),c=s("input"),p=_(),d=s("div"),k=E(`Arguments: + `),b=s("input"),y=_(),g=s("div"),h=s("button"),h.textContent="Run",O=_(),j=s("button"),j.textContent="Kill",I=_(),M&&M.c(),u(o,"class","grow input"),u(n,"class","flex items-center gap-1"),u(c,"class","grow input"),u(c,"placeholder","Working directory"),u(a,"class","flex items-center gap-1"),u(b,"class","grow input"),u(b,"placeholder","Environment variables"),u(d,"class","flex items-center gap-1"),u(h,"class","btn"),u(j,"class","btn"),u(g,"class","flex children:grow gap-1"),u(e,"class","flex flex-col childre:grow gap-1")},m(z,S){v(z,e,S),l(e,n),l(n,i),l(n,o),B(o,t[0]),l(e,r),l(e,a),l(a,f),l(a,c),B(c,t[1]),l(e,p),l(e,d),l(d,k),l(d,b),B(b,t[2]),l(e,y),l(e,g),l(g,h),l(g,O),l(g,j),l(e,I),M&&M.m(e,null),R||(H=[P(o,"input",t[9]),P(c,"input",t[10]),P(b,"input",t[11]),P(h,"click",t[5]),P(j,"click",t[6])],R=!0)},p(z,[S]){S&1&&o.value!==z[0]&&B(o,z[0]),S&2&&c.value!==z[1]&&B(c,z[1]),S&4&&b.value!==z[2]&&B(b,z[2]),z[4]?M?M.p(z,S):(M=ll(z),M.c(),M.m(e,null)):M&&(M.d(1),M=null)},i:G,o:G,d(z){z&&m(e),M&&M.d(),R=!1,ue(H)}}}function ds(t,e,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",r=i?["/C"]:["-c"],{onMessage:a}=e,f='echo "hello world"',c=null,p="SOMETHING=value ANOTHER=2",d="",k;function b(){return p.split(" ").reduce((H,M)=>{let[z,S]=M.split("=");return{...H,[z]:S}},{})}function y(){n(4,k=null);const H=new kl(o,[...r,f],{cwd:c||null,env:b()});H.on("close",M=>{a(`command finished with code ${M.code} and signal ${M.signal}`),n(4,k=null)}),H.on("error",M=>a(`command error: "${M}"`)),H.stdout.on("data",M=>a(`command stdout: "${M}"`)),H.stderr.on("data",M=>a(`command stderr: "${M}"`)),H.spawn().then(M=>{n(4,k=M)}).catch(a)}function g(){k.kill().then(()=>a("killed child process")).catch(a)}function h(){k.write(d).catch(a)}function O(){f=this.value,n(0,f)}function j(){c=this.value,n(1,c)}function I(){p=this.value,n(2,p)}function R(){d=this.value,n(3,d)}return t.$$set=H=>{"onMessage"in H&&n(8,a=H.onMessage)},[f,c,p,d,k,y,g,h,a,O,j,I,R]}class ps extends ye{constructor(e){super(),ge(this,e,ds,fs,me,{onMessage:8})}}function Jl(){return T(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return C(this,function(n){return[2,new Promise(function(i,o){Lt("tauri://update-status",function(r){var a;(a=r==null?void 0:r.payload).error?(t(),o(a.error)):a.status==="DONE"&&(t(),i())}).then(function(r){e=r}).catch(function(r){throw t(),r}),ti("tauri://update-install").catch(function(r){throw t(),r})})]})})}function Yl(){return T(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return C(this,function(n){return[2,new Promise(function(i,o){Rl("tauri://update-available",function(r){var a;a=r==null?void 0:r.payload,t(),i({manifest:a,shouldUpdate:!0})}).catch(function(r){throw t(),r}),Lt("tauri://update-status",function(r){var a;(a=r==null?void 0:r.payload).error?(t(),o(a.error)):a.status==="UPTODATE"&&(t(),i({shouldUpdate:!1}))}).then(function(r){e=r}).catch(function(r){throw t(),r}),ti("tauri://update").catch(function(r){throw t(),r})})]})})}Object.freeze({__proto__:null,installUpdate:Jl,checkUpdate:Yl});function hs(t){let e;return{c(){e=s("button"),e.innerHTML='
    ',u(e,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){v(n,e,i)},p:G,d(n){n&&m(e)}}}function ms(t){let e,n,i;return{c(){e=s("button"),e.textContent="Install update",u(e,"class","btn")},m(o,r){v(o,e,r),n||(i=P(e,"click",t[4]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function vs(t){let e,n,i;return{c(){e=s("button"),e.textContent="Check update",u(e,"class","btn")},m(o,r){v(o,e,r),n||(i=P(e,"click",t[3]),n=!0)},p:G,d(o){o&&m(e),n=!1,i()}}}function _s(t){let e;function n(r,a){return!r[0]&&!r[2]?vs:!r[1]&&r[2]?ms:hs}let i=n(t),o=i(t);return{c(){e=s("div"),o.c(),u(e,"class","flex children:grow children:h10")},m(r,a){v(r,e,a),o.m(e,null)},p(r,[a]){i===(i=n(r))&&o?o.p(r,a):(o.d(1),o=i(r),o&&(o.c(),o.m(e,null)))},i:G,o:G,d(r){r&&m(e),o.d()}}}function bs(t,e,n){let{onMessage:i}=e,o;Mt(async()=>{o=await Lt("tauri://update-status",i)}),Ei(()=>{o&&o()});let r,a,f;async function c(){n(0,r=!0);try{const{shouldUpdate:d,manifest:k}=await Yl();i(`Should update: ${d}`),i(k),n(2,f=d)}catch(d){i(d)}finally{n(0,r=!1)}}async function p(){n(1,a=!0);try{await Jl(),i("Installation complete, restart required."),await Hi()}catch(d){i(d)}finally{n(1,a=!1)}}return t.$$set=d=>{"onMessage"in d&&n(5,i=d.onMessage)},[r,a,f,c,p,i]}class gs extends ye{constructor(e){super(),ge(this,e,bs,_s,me,{onMessage:5})}}function Xl(t){return T(this,void 0,void 0,function(){return C(this,function(e){return[2,A({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})]})})}function Kl(){return T(this,void 0,void 0,function(){return C(this,function(t){return[2,A({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})]})})}Object.freeze({__proto__:null,writeText:Xl,readText:Kl});function ys(t){let e,n,i,o,r,a,f,c;return{c(){e=s("div"),n=s("input"),i=_(),o=s("button"),o.textContent="Write",r=_(),a=s("button"),a.textContent="Read",u(n,"class","grow input"),u(n,"placeholder","Text to write to the clipboard"),u(o,"class","btn"),u(o,"type","button"),u(a,"class","btn"),u(a,"type","button"),u(e,"class","flex gap-1")},m(p,d){v(p,e,d),l(e,n),B(n,t[0]),l(e,i),l(e,o),l(e,r),l(e,a),f||(c=[P(n,"input",t[4]),P(o,"click",t[1]),P(a,"click",t[2])],f=!0)},p(p,[d]){d&1&&n.value!==p[0]&&B(n,p[0])},i:G,o:G,d(p){p&&m(e),f=!1,ue(c)}}}function ws(t,e,n){let{onMessage:i}=e,o="clipboard message";function r(){Xl(o).then(()=>{i("Wrote to the clipboard")}).catch(i)}function a(){Kl().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function f(){o=this.value,n(0,o)}return t.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,r,a,i,f]}class ks extends ye{constructor(e){super(),ge(this,e,ws,ys,me,{onMessage:3})}}function Ms(t){let e;return{c(){e=s("div"),e.innerHTML=`
    Not available for Linux
    + `,u(e,"class","flex flex-col gap-2")},m(n,i){v(n,e,i)},p:G,i:G,o:G,d(n){n&&m(e)}}}function Ts(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};function r(f){const c=document.querySelector("video"),p=f.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${p[0].label}`),window.stream=f,c.srcObject=f}function a(f){if(f.name==="ConstraintNotSatisfiedError"){const c=o.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${f.name}`,f)}return Mt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(o);r(f)}catch(f){a(f)}}),Ei(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),t.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class Cs extends ye{constructor(e){super(),ge(this,e,Ts,Ms,me,{onMessage:0})}}function rl(t,e,n){const i=t.slice();return i[23]=e[n],i}function sl(t,e,n){const i=t.slice();return i[26]=e[n],i}function ul(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h;function O(z,S){return z[2]?Ss:zs}let j=O(t),I=j(t);function R(z,S){return z[1]?Os:As}let H=R(t),M=H(t);return{c(){e=s("div"),n=s("span"),n.textContent="Tauri API Validation",i=_(),o=s("span"),r=s("span"),I.c(),f=_(),c=s("span"),c.innerHTML='
    ',p=_(),d=s("span"),M.c(),b=_(),y=s("span"),y.innerHTML='
    ',u(n,"class","text-darkPrimaryText"),u(r,"title",a=t[2]?"Switch to Light mode":"Switch to Dark mode"),u(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(c,"title","Minimize"),u(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(d,"title",k=t[1]?"Restore":"Maximize"),u(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),u(y,"title","Close"),u(y,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),u(o,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),u(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),u(e,"data-tauri-drag-region","")},m(z,S){v(z,e,S),l(e,n),l(e,i),l(e,o),l(o,r),I.m(r,null),l(o,f),l(o,c),l(o,p),l(o,d),M.m(d,null),l(o,b),l(o,y),g||(h=[P(r,"click",t[11]),P(c,"click",t[8]),P(d,"click",t[9]),P(y,"click",t[10])],g=!0)},p(z,S){j!==(j=O(z))&&(I.d(1),I=j(z),I&&(I.c(),I.m(r,null))),S&4&&a!==(a=z[2]?"Switch to Light mode":"Switch to Dark mode")&&u(r,"title",a),H!==(H=R(z))&&(M.d(1),M=H(z),M&&(M.c(),M.m(d,null))),S&2&&k!==(k=z[1]?"Restore":"Maximize")&&u(d,"title",k)},d(z){z&&m(e),I.d(),M.d(),g=!1,ue(h)}}}function zs(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-moon")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Ss(t){let e;return{c(){e=s("div"),u(e,"class","i-ph-sun")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function As(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-maximize")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function Os(t){let e;return{c(){e=s("div"),u(e,"class","i-codicon-chrome-restore")},m(n,i){v(n,e,i)},d(n){n&&m(e)}}}function al(t){let e,n,i,o,r,a,f,c,p;function d(y,g){return y[2]?Ps:Ls}let k=d(t),b=k(t);return{c(){e=s("a"),b.c(),n=_(),i=s("br"),o=_(),r=s("div"),a=_(),f=s("br"),u(e,"href","##"),u(e,"class","nv justify-between h-8"),u(r,"class","bg-white/5 h-2px")},m(y,g){v(y,e,g),b.m(e,null),v(y,n,g),v(y,i,g),v(y,o,g),v(y,r,g),v(y,a,g),v(y,f,g),c||(p=P(e,"click",t[11]),c=!0)},p(y,g){k!==(k=d(y))&&(b.d(1),b=k(y),b&&(b.c(),b.m(e,null)))},d(y){y&&m(e),b.d(),y&&m(n),y&&m(i),y&&m(o),y&&m(r),y&&m(a),y&&m(f),c=!1,p()}}}function Ls(t){let e,n;return{c(){e=E(`Switch to Dark mode + `),n=s("div"),u(n,"class","i-ph-moon")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function Ps(t){let e,n;return{c(){e=E(`Switch to Light mode + `),n=s("div"),u(n,"class","i-ph-sun")},m(i,o){v(i,e,o),v(i,n,o)},d(i){i&&m(e),i&&m(n)}}}function cl(t){let e,n,i,o,r,a=t[26].label+"",f,c,p,d;function k(){return t[18](t[26])}return{c(){e=s("a"),n=s("div"),o=_(),r=s("p"),f=E(a),u(n,"class",i=t[26].icon+" mr-2"),u(e,"href","##"),u(e,"class",c="nv "+(t[0]===t[26]?"nv_selected":""))},m(b,y){v(b,e,y),l(e,n),l(e,o),l(e,r),l(r,f),p||(d=P(e,"click",k),p=!0)},p(b,y){t=b,y&1&&c!==(c="nv "+(t[0]===t[26]?"nv_selected":""))&&u(e,"class",c)},d(b){b&&m(e),p=!1,d()}}}function fl(t){let e,n=t[23].html+"",i;return{c(){e=new ir(!1),i=Wi(),e.a=i},m(o,r){e.m(n,o,r),v(o,i,r)},p(o,r){r&32&&n!==(n=o[23].html+"")&&e.p(n)},d(o){o&&m(i),o&&e.d()}}}function Ws(t){let e,n,i,o,r,a,f,c,p,d,k,b,y,g,h,O,j,I,R,H,M,z,S,D,L,N=t[0].label+"",q,X,x,ae,Y,ce,$,pe,ve,ie,we,Ce,te,_e,fe,oe,le,Ae,ee=t[4]&&ul(t),W=!t[4]&&al(t),V=t[6],ne=[];for(let U=0;U`,p=_(),d=s("a"),d.innerHTML=`Github + `,k=_(),b=s("a"),b.innerHTML=`Source + `,y=_(),g=s("br"),h=_(),O=s("div"),j=_(),I=s("br"),R=_(),H=s("div");for(let U=0;U',_e=_(),fe=s("div");for(let U=0;U{Vt(J,1)}),ei()}be?(Y=new be(je(U)),Kn(Y.$$.fragment),Te(Y.$$.fragment,1),Bt(Y,ae,null)):Y=null}if(se&32){Oe=U[5];let J;for(J=0;J{const N=Nt();n(1,f=await N.isMaximized()),Lt("tauri://resize",async()=>{n(1,f=await N.isMaximized())})});function c(){Nt().minimize()}async function p(){const N=Nt();await N.isMaximized()?N.unmaximize():N.maximize()}let d=!1;async function k(){d||(d=await Fl("Are you sure that you want to close this window?",{title:"Tauri API"}),d&&Nt().close())}let b;Mt(()=>{n(2,b=localStorage.getItem("theme")=="dark"),pl(b)});function y(){n(2,b=!b),pl(b)}let g=bl([]);ml(t,g,N=>n(5,i=N));function h(N){g.update(q=>[{html:`
    [${new Date().toLocaleTimeString()}]: `+(typeof N=="string"?N:JSON.stringify(N,null,1))+"
    "},...q])}function O(N){g.update(q=>[{html:`
    [${new Date().toLocaleTimeString()}]: `+N+"
    "},...q])}function j(){g.update(()=>[])}let I,R,H;function M(N){H=N.clientY;const q=window.getComputedStyle(I);R=parseInt(q.height,10);const X=ae=>{const Y=ae.clientY-H,ce=R-Y;n(3,I.style.height=`${ce{document.removeEventListener("mouseup",x),document.removeEventListener("mousemove",X)};document.addEventListener("mouseup",x),document.addEventListener("mousemove",X)}let z;Mt(async()=>{n(4,z=await Ll()==="win32")});const S=()=>Di("https://tauri.app/"),D=N=>a(N);function L(N){Xn[N?"unshift":"push"](()=>{I=N,n(3,I)})}return[r,f,b,I,z,i,o,a,c,p,k,y,g,h,O,j,M,S,D,L]}class js extends ye{constructor(e){super(),ge(this,e,Es,Ws,me,{})}}new js({target:document.querySelector("#app")}); diff --git a/examples/api/dist/assets/vendor.css b/examples/api/dist/assets/vendor.css deleted file mode 100644 index aaf074e25..000000000 --- a/examples/api/dist/assets/vendor.css +++ /dev/null @@ -1 +0,0 @@ -ul.svelte-gbh3pt{list-style:none;margin:0;padding:0;padding-left:var(--nodePaddingLeft, 1rem);border-left:var(--nodeBorderLeft, 1px dotted #9ca3af);color:var(--nodeColor, #374151)}.hidden.svelte-gbh3pt{display:none}.bracket.svelte-gbh3pt{cursor:pointer}.bracket.svelte-gbh3pt:hover{background:var(--bracketHoverBackground, #d1d5db)}.comma.svelte-gbh3pt{color:var(--nodeColor, #374151)}.val.svelte-gbh3pt{color:var(--leafDefaultColor, #9ca3af)}.val.string.svelte-gbh3pt{color:var(--leafStringColor, #059669)}.val.number.svelte-gbh3pt{color:var(--leafNumberColor, #d97706)}.val.boolean.svelte-gbh3pt{color:var(--leafBooleanColor, #2563eb)} diff --git a/examples/api/dist/assets/vendor.js b/examples/api/dist/assets/vendor.js deleted file mode 100644 index 03b17c4a8..000000000 --- a/examples/api/dist/assets/vendor.js +++ /dev/null @@ -1,25 +0,0 @@ -function L(){}function zt(t){return t()}function St(){return Object.create(null)}function B(t){t.forEach(zt)}function be(t){return typeof t=="function"}function Wt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function we(t){return Object.keys(t).length===0}function Me(t,...e){if(t==null)return L;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Cn(t,e,n){t.$$.on_destroy.push(Me(e,n))}function T(t,e){t.appendChild(e)}function S(t,e,n){t.insertBefore(e,n||null)}function z(t){t.parentNode.removeChild(t)}function Oe(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function $n(t){return function(e){return e.preventDefault(),t.call(this,e)}}function P(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Dn(t){return t===""?null:+t}function ke(t){return Array.from(t.childNodes)}function I(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Ln(t,e){t.value=e==null?"":e}function Fn(t,e){for(let n=0;n{et.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}function Ee(t){t&&t.c()}function xt(t,e,n,i){const{fragment:r,on_mount:o,on_destroy:a,after_update:f}=t.$$;r&&r.m(e,n),i||ct(()=>{const d=o.map(zt).filter(be);a?a.push(...d):B(d),t.$$.on_mount=[]}),f.forEach(ct)}function Kt(t,e){const n=t.$$;n.fragment!==null&&(B(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function je(t,e){t.$$.dirty[0]===-1&&(H.push(t),Te(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const y=m.length?m[0]:_;return d.ctx&&r(d.ctx[l],d.ctx[l]=y)&&(!d.skip_bound&&d.bound[l]&&d.bound[l](y),h&&je(t,l)),_}):[],d.update(),h=!0,B(d.before_update),d.fragment=i?i(d.ctx):!1,e.target){if(e.hydrate){const l=ke(e.target);d.fragment&&d.fragment.l(l),l.forEach(z)}else d.fragment&&d.fragment.c();e.intro&&$(t.$$.fragment),xt(t,e.target,e.anchor,e.customElement),Ft()}Z(f)}class Se{$destroy(){Kt(this,1),this.$destroy=L}$on(e,n){const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!we(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const V=[];function Nn(t,e=L){let n;const i=[];function r(f){if(Wt(t,f)&&(t=f,n)){const d=!V.length;for(let h=0;h{const l=i.indexOf(h);l!==-1&&i.splice(l,1),i.length===0&&(n(),n=null)}}return{set:r,update:o,subscribe:a}}/*! - * hotkeys-js v3.8.5 - * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. - * - * Copyright (c) 2021 kenny wong - * http://jaywcjlove.github.io/hotkeys - * - * Licensed under the MIT license. - */var mt=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function _t(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on".concat(e),function(){n(window.event)})}function Rt(t,e){for(var n=e.slice(0,e.length-1),i=0;i=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function We(t,e){for(var n=t.length>=e.length?t:e,i=t.length>=e.length?e:t,r=!0,o=0;o=0&&g.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&g.splice(0,g.length),(e===93||e===224)&&(e=91),e in A){A[e]=!1;for(var i in U)U[i]===e&&(F[i]=!1)}}function xe(t){if(!t)Object.keys(k).forEach(function(a){return delete k[a]});else if(Array.isArray(t))t.forEach(function(a){a.key&&vt(a)});else if(typeof t=="object")t.key&&vt(t);else if(typeof t=="string"){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1?Rt(U,h):[];k[m]=k[m].map(function(b){var v=r?b.method===r:!0;return v&&b.scope===i&&We(b.mods,y)?{}:b})}})};function Ht(t,e,n){var i;if(e.scope===n||e.scope==="all"){i=e.mods.length>0;for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(!A[r]&&e.mods.indexOf(+r)>-1||A[r]&&e.mods.indexOf(+r)===-1)&&(i=!1);(e.mods.length===0&&!A[16]&&!A[18]&&!A[17]&&!A[91]||i||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function Gt(t){var e=k["*"],n=t.keyCode||t.which||t.charCode;if(!!F.filter.call(this,t)){if((n===93||n===224)&&(n=91),g.indexOf(n)===-1&&n!==229&&g.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(y){var b=Bt[y];t[y]&&g.indexOf(b)===-1?g.push(b):!t[y]&&g.indexOf(b)>-1?g.splice(g.indexOf(b),1):y==="metaKey"&&t[y]&&g.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(g=g.slice(g.indexOf(b))))}),n in A){A[n]=!0;for(var i in U)U[i]===n&&(F[i]=!0);if(!e)return}for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(A[r]=t[Bt[r]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(g.indexOf(17)===-1&&g.push(17),g.indexOf(18)===-1&&g.push(18),A[17]=!0,A[18]=!0);var o=G();if(e)for(var a=0;a-1}function F(t,e,n){g=[];var i=Ut(t),r=[],o="all",a=document,f=0,d=!1,h=!0,l="+";for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(d=e.keyup),e.keydown!==void 0&&(h=e.keydown),typeof e.splitKey=="string"&&(l=e.splitKey)),typeof e=="string"&&(o=e);f1&&(r=Rt(U,t)),t=t[t.length-1],t=t==="*"?"*":it(t),t in k||(k[t]=[]),k[t].push({keyup:d,keydown:h,scope:o,mods:r,shortcut:i[f],method:n,key:i[f],splitKey:l});typeof a!="undefined"&&!Ke(a)&&window&&(Vt.push(a),_t(a,"keydown",function(_){Gt(_)}),_t(window,"focus",function(){g=[]}),_t(a,"keyup",function(_){Gt(_),Fe(_)}))}var yt={setScope:qt,getScope:G,deleteScope:Le,getPressedKeyCodes:Ce,isPressed:De,filter:$e,unbind:xe};for(var gt in yt)Object.prototype.hasOwnProperty.call(yt,gt)&&(F[gt]=yt[gt]);if(typeof window!="undefined"){var Re=window.hotkeys;F.noConflict=function(t){return t&&window.hotkeys===F&&(window.hotkeys=Re),F},window.hotkeys=F}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Jt=function(t,e){return(Jt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])})(t,e)};function bt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Jt(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var D=function(){return(D=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&r[r.length-1])||l[0]!==6&&l[0]!==2)){a=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]=200&&this.status<300,this.headers=t.headers,this.rawHeaders=t.rawHeaders,this.data=t.data},ce=function(){function t(e){this.id=e}return t.prototype.drop=function(){return u(this,void 0,void 0,function(){return s(this,function(e){return[2,c({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},t.prototype.request=function(e){return u(this,void 0,void 0,function(){var n;return s(this,function(i){return(n=!e.responseType||e.responseType===X.JSON)&&(e.responseType=X.Text),[2,c({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(function(r){var o=new le(r);if(n){try{o.data=JSON.parse(o.data)}catch(a){if(o.ok&&o.data==="")o.data={};else if(o.ok)throw Error("Failed to parse response `".concat(o.data,"` as JSON: ").concat(a,";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response."))}return o}return o})]})})},t.prototype.get=function(e,n){return u(this,void 0,void 0,function(){return s(this,function(i){return[2,this.request(D({method:"GET",url:e},n))]})})},t.prototype.post=function(e,n,i){return u(this,void 0,void 0,function(){return s(this,function(r){return[2,this.request(D({method:"POST",url:e,body:n},i))]})})},t.prototype.put=function(e,n,i){return u(this,void 0,void 0,function(){return s(this,function(r){return[2,this.request(D({method:"PUT",url:e,body:n},i))]})})},t.prototype.patch=function(e,n){return u(this,void 0,void 0,function(){return s(this,function(i){return[2,this.request(D({method:"PATCH",url:e},n))]})})},t.prototype.delete=function(e,n){return u(this,void 0,void 0,function(){return s(this,function(i){return[2,this.request(D({method:"DELETE",url:e},n))]})})},t}();function fe(t){return u(this,void 0,void 0,function(){return s(this,function(e){return[2,c({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then(function(n){return new ce(n)})]})})}var Pt=null;function vn(t,e){var n;return u(this,void 0,void 0,function(){return s(this,function(i){switch(i.label){case 0:return Pt!==null?[3,2]:[4,fe()];case 1:Pt=i.sent(),i.label=2;case 2:return[2,Pt.request(D({url:t,method:(n=e==null?void 0:e.method)!==null&&n!==void 0?n:"GET"},e))]}})})}Object.freeze({__proto__:null,getClient:fe,fetch:vn,Body:_n,Client:ce,Response:le,get ResponseType(){return X}});function yn(t,e){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,c({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:N(e)}})]})})}function gn(t,e){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,c({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:N(e)}})]})})}function bn(t){return u(this,void 0,void 0,function(){return s(this,function(e){return[2,c({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]})})}function wn(t){return u(this,void 0,void 0,function(){return s(this,function(e){return[2,c({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]})})}function Mn(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2,c({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:yn,registerAll:gn,isRegistered:bn,unregister:wn,unregisterAll:Mn});function On(){return u(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return s(this,function(n){return[2,new Promise(function(i,r){At("tauri://update-status",function(o){var a;(a=o==null?void 0:o.payload).error?(t(),r(a.error)):a.status==="DONE"&&(t(),i())}).then(function(o){e=o}).catch(function(o){throw t(),o}),Tt("tauri://update-install").catch(function(o){throw t(),o})})]})})}function kn(){return u(this,void 0,void 0,function(){function t(){e&&e(),e=void 0}var e;return s(this,function(n){return[2,new Promise(function(i,r){se("tauri://update-available",function(o){var a;a=o==null?void 0:o.payload,t(),i({manifest:a,shouldUpdate:!0})}).catch(function(o){throw t(),o}),At("tauri://update-status",function(o){var a;(a=o==null?void 0:o.payload).error?(t(),r(a.error)):a.status==="UPTODATE"&&(t(),i({shouldUpdate:!1}))}).then(function(o){e=o}).catch(function(o){throw t(),o}),Tt("tauri://update").catch(function(o){throw t(),o})})]})})}Object.freeze({__proto__:null,installUpdate:On,checkUpdate:kn});function An(t){return u(this,void 0,void 0,function(){return s(this,function(e){return[2,c({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})]})})}function Tn(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2,c({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})]})})}Object.freeze({__proto__:null,writeText:An,readText:Tn});function de(t,e,n){const i=t.slice();return i[12]=e[n],i[14]=n,i}function he(t){let e,n,i,r,o,a,f,d,h,l,_,m,y,b,v,st,Et,x=t[5],M=[];for(let p=0;pR(M[p],1,1,()=>{M[p]=null});let E=!t[3]&&ve(),j=!t[3]&&t[8]&&ye();return{c(){e=W("span"),n=W("span"),i=C(t[6]),r=q(),o=W("ul");for(let p=0;p{l[b]=null}),pt(),o=l[r],o?o.p(m,y):(o=l[r]=h[r](m),o.c()),$(o,1),o.m(e,a))},i(m){f||($(o),f=!0)},o(m){R(o),f=!1},d(m){m&&z(e),d&&d.d(),l[r].d()}}}function ve(t){let e;return{c(){e=W("span"),e.textContent=",",P(e,"class","comma svelte-gbh3pt")},m(n,i){S(n,e,i)},d(n){n&&z(e)}}}function ye(t){let e;return{c(){e=W("span"),e.textContent=",",P(e,"class","comma svelte-gbh3pt")},m(n,i){S(n,e,i)},d(n){n&&z(e)}}}function jn(t){let e,n,i=t[5].length&&he(t);return{c(){i&&i.c(),e=Ct()},m(r,o){i&&i.m(r,o),S(r,e,o),n=!0},p(r,[o]){r[5].length?i?(i.p(r,o),o&32&&$(i,1)):(i=he(r),i.c(),$(i,1),i.m(e.parentNode,e)):i&&(ht(),R(i,1,1,()=>{i=null}),pt())},i(r){n||($(i),n=!0)},o(r){R(i),n=!1},d(r){i&&i.d(r),r&&z(e)}}}const zn="...";function Sn(t,e,n){let{json:i}=e,{depth:r=1/0}=e,{_lvl:o=0}=e,{_last:a=!0}=e;const f=v=>v===null?"null":typeof v;let d,h,l,_,m;const y=v=>{switch(f(v)){case"string":return`"${v}"`;case"function":return"f () {...}";case"symbol":return v.toString();default:return v}},b=()=>{n(8,m=!m)};return t.$$set=v=>{"json"in v&&n(0,i=v.json),"depth"in v&&n(1,r=v.depth),"_lvl"in v&&n(2,o=v._lvl),"_last"in v&&n(3,a=v._last)},t.$$.update=()=>{t.$$.dirty&17&&(n(5,d=f(i)==="object"?Object.keys(i):[]),n(4,h=Array.isArray(i)),n(6,l=h?"[":"{"),n(7,_=h?"]":"}")),t.$$.dirty&6&&n(8,m=r - + - Svelte + Vite App - - diff --git a/examples/api/dist/tauri logo.png b/examples/api/dist/tauri_logo.png similarity index 100% rename from examples/api/dist/tauri logo.png rename to examples/api/dist/tauri_logo.png diff --git a/examples/api/index.html b/examples/api/index.html index c2847e399..3b39b0f66 100644 --- a/examples/api/index.html +++ b/examples/api/index.html @@ -1,8 +1,7 @@ - + - Svelte + Vite App diff --git a/examples/api/isolation-dist/index.html b/examples/api/isolation-dist/index.html index 1a12b0bc4..27c8d3f39 100644 --- a/examples/api/isolation-dist/index.html +++ b/examples/api/isolation-dist/index.html @@ -1,10 +1,10 @@ - - - Isolation Secure Script - - - - + + + Isolation Secure Script + + + + diff --git a/examples/api/isolation-dist/index.js b/examples/api/isolation-dist/index.js index f3a30af5d..afb969e6a 100644 --- a/examples/api/isolation-dist/index.js +++ b/examples/api/isolation-dist/index.js @@ -1,3 +1,3 @@ -window.__TAURI_ISOLATION_HOOK__= (payload) => { +window.__TAURI_ISOLATION_HOOK__ = (payload) => { return payload } diff --git a/examples/api/package.json b/examples/api/package.json index e861b58ac..68d0072c6 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -10,12 +10,14 @@ }, "dependencies": { "@tauri-apps/api": "../../tooling/api/dist", - "@zerodevx/svelte-json-view": "0.2.0", - "hotkeys-js": "^3.8.5" + "@zerodevx/svelte-json-view": "0.2.1" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.0-next.11", - "svelte": "3.35.0", - "vite": "^2.6.4" + "@iconify-json/codicon": "^1.1.10", + "@iconify-json/ph": "^1.1.1", + "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49", + "svelte": "^3.48.0", + "unocss": "^0.39.3", + "vite": "^2.9.12" } } diff --git a/examples/api/public/global.css b/examples/api/public/global.css deleted file mode 100644 index 54babc528..000000000 --- a/examples/api/public/global.css +++ /dev/null @@ -1,196 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Tauri&display=swap'); - -* { - font-family: Tauri, Arial, Helvetica, sans-serif; -} - -body { - background: rgb(24, 25, 26, 0.8); -} - -.noselect { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.logo-container { - width: 95%; - margin: 0px auto; -} - -.logo-link { - font-weight: 700; - position: absolute; - top: 150px; - right: 10px; -} - -.logo { - cursor: pointer; -} - -#response { - height: 100%; - max-height: 100%; - margin-top: 1em; - background: rgb(36, 37, 38, 0.8); - color: #f0f4f5; - border: solid 1px rgba(255, 255, 255, 0.055); - box-shadow: 0 1px 5px 0 rgb(0 0 0 / 20%); - font-family: 'Courier New', Courier, monospace; - font-size: 12px; - word-wrap: break-word; - padding: 0px 15px; - overflow-y: auto; -} - -input, -select, -textarea { - background: rgb(53, 53, 53, 0.9); - color: #fff; - font-family: system-ui, sans-serif; - border: none !important; - border-radius: 0.25rem; - font-size: 1rem; - line-height: 1.2; - padding: 0.25rem 0.5rem; - margin: 0.25rem; - transition: 0.2s ease; -} - -button:hover, -button:focus { - background: #ffe07a; -} - -button:focus { - outline: 1px solid #fff; - outline-offset: -4px; -} - -button:active { - transform: scale(0.99); -} - -.button { - border: 0; - border-radius: 0.25rem; - background: #67d6ed; - color: rgb(0, 0, 0); - font-family: system-ui, sans-serif; - font-size: 1rem; - line-height: 1.2; - white-space: nowrap; - text-decoration: none; - padding: 0.25rem 0.5rem; - margin: 0.25rem; - cursor: pointer; - transition: 0.2s ease; -} - -.dark-link { - color: white; - text-decoration: none !important; - padding: 0.5em; - background: rgb(36, 37, 38); - transition: 0.2s ease; - border: solid 1px rgba(255, 255, 255, 0.055); - box-shadow: 0 1px 5px 0 rgb(0 0 0 / 20%); -} - -.dark-link:hover { - background: #3d392a; -} - -.nv { - color: #fff; - cursor: pointer; - transition: 0.25s ease; -} - -.nv:hover { - color: #ffe07a; - padding-left: 8px; - border-left: solid 5px #ffe07a; -} - -.nv_selected { - color: #67d6ed; - padding-left: 8px; - border-left: solid 5px #67d6ed; -} - -.content { - background: rgb(36, 37, 38, 0.5); - color: #f0f4f5; - padding: 20px; - width: 100%; - border: solid 1px rgba(255, 255, 255, 0.055); - box-shadow: 0 1px 5px 0 rgb(0 0 0 / 20%); -} - -main { - height: 100%; -} - -[type='radio']:checked~label { - background: rgb(36, 37, 38); - color: #67d6ed; - border-bottom: 1px solid transparent; - z-index: 2; -} - -[type='radio']:checked~label~.content { - z-index: 1; -} - -.flex { - display: flex; -} - -.row { - flex-direction: row; -} - -.col { - flex-direction: column; -} - -.just-around { - justify-content: space-between; -} - -.hidden { - display: none; -} - -.alert { - width: auto; - height: 40px; - display: flex; - justify-content: left; - align-items: center; - border-radius: 5px; - padding-left: 10px; - padding-right: 40px; - font-size: 15px; - color: #000; - margin-bottom: 10px; - margin-top: 10px; - box-shadow: rgba(0, 0, 0, 0.06) 0px 0px 10px; - border-left: 6px solid #ff0000; - background: #f0f4f5; -} - -#file-response { - height: 400px; -} - -span.key { - color: #fff; -} \ No newline at end of file diff --git a/examples/api/public/tauri logo.png b/examples/api/public/tauri_logo.png similarity index 100% rename from examples/api/public/tauri logo.png rename to examples/api/public/tauri_logo.png diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index f99e6f9be..e171d00ba 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -97,6 +97,8 @@ dependencies = [ "tauri", "tauri-build", "tiny_http", + "window-shadows", + "window-vibrancy", ] [[package]] @@ -3948,6 +3950,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "window-shadows" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796156ad1a67853e927727809bb6138ddc1f19ebced0dc976c0d109d5e2576f7" +dependencies = [ + "cocoa", + "objc", + "raw-window-handle", + "windows-sys", +] + +[[package]] +name = "window-vibrancy" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b66a7f578d164c3f53425ecb73241246ed56a7c3383a15e741684c949a88c86" +dependencies = [ + "cocoa", + "objc", + "raw-window-handle", + "windows-sys", +] + [[package]] name = "windows" version = "0.24.0" diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 1e9a017f3..ccd2189c5 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -31,6 +31,10 @@ features = [ "updater" ] +[target."cfg(target_os = \"windows\")".dependencies] +window-vibrancy = "0.1" +window-shadows= "0.1" + [features] default = [ "custom-protocol" ] custom-protocol = [ "tauri/custom-protocol" ] diff --git a/examples/api/src-tauri/src/main.rs b/examples/api/src-tauri/src/main.rs index 15979923f..31030a9d5 100644 --- a/examples/api/src-tauri/src/main.rs +++ b/examples/api/src-tauri/src/main.rs @@ -8,7 +8,6 @@ )] mod cmd; -mod menu; use std::sync::atomic::{AtomicBool, Ordering}; @@ -23,11 +22,6 @@ struct Reply { data: String, } -#[tauri::command] -async fn menu_toggle(window: tauri::Window) { - window.menu_handle().toggle().unwrap(); -} - fn main() { let tray_menu1 = SystemTrayMenu::new() .add_item(CustomMenuItem::new("toggle", "Toggle")) @@ -44,10 +38,30 @@ fn main() { let is_menu1 = AtomicBool::new(true); #[allow(unused_mut)] - let mut app = tauri::Builder::default() + let mut builder = tauri::Builder::default() .setup(|app| { + #[allow(unused_mut)] + let mut window_builder = WindowBuilder::new(app, "main", WindowUrl::default()) + .title("Tauri API Validation") + .inner_size(1000., 800.) + .min_inner_size(600., 400.); + + #[cfg(target_os = "windows")] + { + window_builder = window_builder.transparent(true); + window_builder = window_builder.decorations(false); + } + + let window = window_builder.build().unwrap(); + + #[cfg(target_os = "windows")] + { + let _ = window_shadows::set_shadow(&window, true); + let _ = window_vibrancy::apply_blur(&window, Some((0, 0, 0, 0))); + } + #[cfg(debug_assertions)] - app.get_window("main").unwrap().open_devtools(); + window.open_devtools(); std::thread::spawn(|| { let server = match tiny_http::Server::http("localhost:3003") { @@ -88,10 +102,6 @@ fn main() { .expect("failed to emit"); }); }) - .menu(menu::get_menu()) - .on_menu_event(|event| { - println!("{:?}", event.menu_item_id()); - }) .system_tray(SystemTray::new().with_menu(tray_menu1.clone())) .on_system_tray_event(move |app, event| match event { SystemTrayEvent::LeftClick { @@ -165,11 +175,18 @@ fn main() { } } _ => {} - }) + }); + + #[cfg(target_os = "macos")] + { + builder = builder.menu(tauri::Menu::os_default("Tauri API Validation")); + } + + #[allow(unused_mut)] + let mut app = builder .invoke_handler(tauri::generate_handler![ cmd::log_operation, cmd::perform_request, - menu_toggle, ]) .build(tauri::generate_context!()) .expect("error while building tauri application"); diff --git a/examples/api/src-tauri/src/menu.rs b/examples/api/src-tauri/src/menu.rs deleted file mode 100644 index 026f3b7a4..000000000 --- a/examples/api/src-tauri/src/menu.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019-2021 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use tauri::{CustomMenuItem, Menu, MenuItem, Submenu}; - -pub fn get_menu() -> Menu { - #[allow(unused_mut)] - let mut disable_item = - CustomMenuItem::new("disable-menu", "Disable menu").accelerator("CmdOrControl+D"); - #[allow(unused_mut)] - let mut test_item = CustomMenuItem::new("test", "Test").accelerator("CmdOrControl+T"); - #[cfg(target_os = "macos")] - { - disable_item = disable_item.native_image(tauri::NativeImage::MenuOnState); - test_item = test_item.native_image(tauri::NativeImage::Add); - } - - // create a submenu - let my_sub_menu = Menu::with_items([disable_item.into()]); - - let my_app_menu = Menu::new() - .add_native_item(MenuItem::Copy) - .add_submenu(Submenu::new("Sub menu", my_sub_menu)); - - let test_menu = Menu::new() - .add_item(CustomMenuItem::new( - "selected/disabled", - "Selected and disabled", - )) - .add_native_item(MenuItem::Separator) - .add_item(test_item); - - // add all our childs to the menu (order is how they'll appear) - Menu::new() - .add_submenu(Submenu::new("My app", my_app_menu)) - .add_submenu(Submenu::new("Other menu", test_menu)) -} diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index 1a92f8607..51048566d 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -117,12 +117,7 @@ "scope": ["http://localhost:3003"] } }, - "windows": [ - { - "title": "Tauri API Validation", - "transparent": true - } - ], + "windows": [], "security": { "csp": { "default-src": "'self' customprotocol: asset:", diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 8c14c27d2..e4b47eb65 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -1,178 +1,380 @@ -
    -
    - - +{#if isWindows} +
    + Tauri API Validation + + + {#if isDark} +
    + {:else} +
    + {/if} + + +
    + + + {#if isWindowMaximized} +
    + {:else} +
    + {/if} + + +
    + +
    -
    -
    +{/if} + +
    + +
    +
    +

    {selected.label}

    +
    +
    + +
    +
    -
    -
    -

    - Tauri Console - clear -

    - {#each $responses as r} - {#if r.text} -

    {r.text}

    - {:else} - {@html r.html} - {/if} - {/each} -
    -
    - +
    +
    +
    +

    Console

    +
    +
    +
    +
    +
    + {#each $messages as r} + {@html r.html} + {/each} +
    +
    + +
    diff --git a/examples/api/src/app.css b/examples/api/src/app.css new file mode 100644 index 000000000..26c2b6163 --- /dev/null +++ b/examples/api/src/app.css @@ -0,0 +1,30 @@ +*:not(h1, h2, h3, h4, h5, h6) { + margin: 0; + padding: 0; +} + +* { + box-sizing: border-box; + font-family: 'Rubik', sans-serif; +} + +::-webkit-scrollbar { + width: 0.25rem; + height: 3px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + border-radius: 0.25rem; +} + +code { + padding: 0.05rem 0.25rem; +} + +code.code-block { + padding: 0.5rem; +} diff --git a/examples/api/src/components/Cli.svelte b/examples/api/src/components/Cli.svelte deleted file mode 100644 index a38b4f2e6..000000000 --- a/examples/api/src/components/Cli.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - -
    - This binary can be run on the terminal and takes the following arguments: -
      -
    • --config PATH
    • -
    • --theme light|dark|system
    • -
    • --verbose
    • -
    - Additionally, it has a update --background subcommand. - Note that the arguments are only parsed, not implemented. -
    - -
    diff --git a/examples/api/src/components/Clipboard.svelte b/examples/api/src/components/Clipboard.svelte deleted file mode 100644 index 57430243a..000000000 --- a/examples/api/src/components/Clipboard.svelte +++ /dev/null @@ -1,36 +0,0 @@ - - -
    -
    - - -
    - -
    diff --git a/examples/api/src/components/Communication.svelte b/examples/api/src/components/Communication.svelte deleted file mode 100644 index c25a2731e..000000000 --- a/examples/api/src/components/Communication.svelte +++ /dev/null @@ -1,50 +0,0 @@ - - -
    - - - -
    diff --git a/examples/api/src/components/Dialog.svelte b/examples/api/src/components/Dialog.svelte deleted file mode 100644 index ed065df9a..000000000 --- a/examples/api/src/components/Dialog.svelte +++ /dev/null @@ -1,122 +0,0 @@ - - -
    - - -
    - - -
    -
    - - -
    - - - -
    - - diff --git a/examples/api/src/components/Http.svelte b/examples/api/src/components/Http.svelte deleted file mode 100644 index fa3433d90..000000000 --- a/examples/api/src/components/Http.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - -
    - -
    -