From 228473650b6414c409557ea0ef849ca64cea20df Mon Sep 17 00:00:00 2001 From: abhijit-hota Date: Mon, 13 Jun 2022 23:45:26 +0530 Subject: [PATCH] feat(meta): add release pipeline --- .gitignore | 3 +- api/.air.toml | 12 ++++---- api/.goreleaser.yaml | 29 ++++++++++++++++++++ api/frontend-dist/assets/index.08dd52ed.css | 1 + api/frontend-dist/assets/index.2d1dc04a.js | 6 ++++ api/frontend-dist/favicon.ico | Bin 0 -> 1150 bytes api/frontend-dist/index.html | 15 ++++++++++ api/go.mod | 3 -- frontend/vite.config.js | 2 +- 9 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 api/.goreleaser.yaml create mode 100644 api/frontend-dist/assets/index.08dd52ed.css create mode 100644 api/frontend-dist/assets/index.2d1dc04a.js create mode 100644 api/frontend-dist/favicon.ico create mode 100644 api/frontend-dist/index.html diff --git a/.gitignore b/.gitignore index 6c3a5e2..84cc7ab 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ tmp temp *db-journal -node_modules \ No newline at end of file +node_modules +dist/ diff --git a/api/.air.toml b/api/.air.toml index ee13b26..aec8b76 100644 --- a/api/.air.toml +++ b/api/.air.toml @@ -6,31 +6,31 @@ tmp_dir = "tmp" bin = "./tmp/main" cmd = "go build -ldflags '-s -w' -o ./tmp/main ." delay = 1000 - exclude_dir = ["assets", "tmp", "vendor", "testdata", "frontend"] + exclude_dir = ["assets", "tmp", "vendor", "testdata", "frontend-dist", "dist"] exclude_file = [] exclude_regex = ["_test.go"] exclude_unchanged = false follow_symlink = false full_bin = "" include_dir = [] - include_ext = ["go", "tpl", "tmpl", "html", "db"] + include_ext = ["go", "tpl", "tmpl", "html"] kill_delay = "0s" log = "build-errors.log" send_interrupt = false stop_on_error = true [color] - app = "" + app = "pink" build = "yellow" main = "magenta" runner = "green" watcher = "cyan" [log] - time = false + time = true [misc] - clean_on_exit = false + clean_on_exit = true [screen] - clear_on_rebuild = false + clear_on_rebuild = true diff --git a/api/.goreleaser.yaml b/api/.goreleaser.yaml new file mode 100644 index 0000000..482bde0 --- /dev/null +++ b/api/.goreleaser.yaml @@ -0,0 +1,29 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +project_name: rengoku +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + - sh -c "cd ../frontend && npm run build" +builds: + - env: [CGO_ENABLED=0] + targets: + - go_118_first_class +archives: + - replacements: + amd64: 64-bit + 386: 32-bit + darwin: macOS + format_overrides: + - goos: windows + format: zip +nfpms: + - id: linux-packs + maintainer: Abhijit Hota + description: 'Rengoku: A Powerful Bookmark Manager' + homepage: https://github.com/abhijit-hota/rengoku + license: MIT + formats: + - deb + - rpm diff --git a/api/frontend-dist/assets/index.08dd52ed.css b/api/frontend-dist/assets/index.08dd52ed.css new file mode 100644 index 0000000..791978a --- /dev/null +++ b/api/frontend-dist/assets/index.08dd52ed.css @@ -0,0 +1 @@ +:root{--background-body: #fff;--background: #efefef;--background-alt: #f7f7f7;--selection: #9e9e9e;--text-main: #363636;--text-bright: #000;--text-muted: #70777f;--links: #0076d1;--focus: rgba(0, 150, 191, .67);--border: #dbdbdb;--code: #000;--animation-duration: .1s;--button-base: #d0cfcf;--button-hover: #9b9b9b;--scrollbar-thumb: #aaa;--scrollbar-thumb-hover: var(--button-hover);--form-placeholder: #949494;--form-text: #1d1d1d;--variable: #39a33c;--highlight: #ff0;--select-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='63' width='117' fill='%23161f27'%3E%3Cpath d='M115 2c-1-2-4-2-5 0L59 53 7 2a4 4 0 00-5 5l54 54 2 2 3-2 54-54c2-1 2-4 0-5z'/%3E%3C/svg%3E") }@media (prefers-color-scheme:dark){:root{--background-body: #202b38;--background: #161f27;--background-alt: #1a242f;--selection: #1c76c5;--text-main: #dbdbdb;--text-bright: #fff;--text-muted: #a9b1ba;--links: #41adff;--focus: rgba(0, 150, 191, .67);--border: #526980;--code: #ffbe85;--animation-duration: .1s;--button-base: #0c151c;--button-hover: #040a0f;--scrollbar-thumb: var(--button-hover);--scrollbar-thumb-hover: #000;--form-placeholder: #a9a9a9;--form-text: #fff;--variable: #d941e2;--highlight: #efdb43;--select-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='63' width='117' fill='%23efefef'%3E%3Cpath d='M115 2c-1-2-4-2-5 0L59 53 7 2a4 4 0 00-5 5l54 54 2 2 3-2 54-54c2-1 2-4 0-5z'/%3E%3C/svg%3E") }}html{scrollbar-color:#aaa #fff;scrollbar-color:var(--scrollbar-thumb) var(--background-body);scrollbar-width:thin}@media (prefers-color-scheme:dark){html{scrollbar-color:#040a0f #202b38;scrollbar-color:var(--scrollbar-thumb) var(--background-body)}}body{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Segoe UI Emoji,Apple Color Emoji,Noto Color Emoji,sans-serif;line-height:1.4;max-width:800px;margin:20px auto;padding:0 10px;word-wrap:break-word;color:#363636;color:var(--text-main);background:#fff;background:var(--background-body);text-rendering:optimizeLegibility}@media (prefers-color-scheme:dark){body{background:#202b38;background:var(--background-body);color:#dbdbdb;color:var(--text-main)}}button{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}@media (prefers-color-scheme:dark){button{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}}input{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}@media (prefers-color-scheme:dark){input{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}}textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}@media (prefers-color-scheme:dark){textarea{transition:background-color .1s linear,border-color .1s linear,color .1s linear,box-shadow .1s linear,transform .1s ease;transition:background-color var(--animation-duration) linear,border-color var(--animation-duration) linear,color var(--animation-duration) linear,box-shadow var(--animation-duration) linear,transform var(--animation-duration) ease}}h1{font-size:2.2em;margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:12px;margin-top:24px}h1{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h1{color:#fff;color:var(--text-bright)}}h2{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h2{color:#fff;color:var(--text-bright)}}h3{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h3{color:#fff;color:var(--text-bright)}}h4{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h4{color:#fff;color:var(--text-bright)}}h5{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h5{color:#fff;color:var(--text-bright)}}h6{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){h6{color:#fff;color:var(--text-bright)}}strong{color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){strong{color:#fff;color:var(--text-bright)}}b,h1,h2,h3,h4,h5,h6,strong,th{font-weight:600}q:after,q:before{content:none}blockquote{border-left:4px solid rgba(0,150,191,.67);border-left:4px solid var(--focus);margin:1.5em 0;padding:.5em 1em;font-style:italic}@media (prefers-color-scheme:dark){blockquote{border-left:4px solid rgba(0,150,191,.67);border-left:4px solid var(--focus)}}q{border-left:4px solid rgba(0,150,191,.67);border-left:4px solid var(--focus);margin:1.5em 0;padding:.5em 1em;font-style:italic}@media (prefers-color-scheme:dark){q{border-left:4px solid rgba(0,150,191,.67);border-left:4px solid var(--focus)}}blockquote>footer{font-style:normal;border:0}address,blockquote cite{font-style:normal}a[href^="mailto:"]:before{content:"\1f4e7 "}a[href^="tel:"]:before{content:"\1f4de "}a[href^="sms:"]:before{content:"\1f4ac "}mark{background-color:#ff0;background-color:var(--highlight);border-radius:2px;padding:0 2px;color:#000}@media (prefers-color-scheme:dark){mark{background-color:#efdb43;background-color:var(--highlight)}}a>code,a>strong{color:inherit}button,input[type=button],input[type=checkbox],input[type=radio],input[type=range],input[type=reset],input[type=submit],select{cursor:pointer}input,select{display:block}[type=checkbox],[type=radio]{display:initial}input{color:#1d1d1d;color:var(--form-text);background-color:#efefef;background-color:var(--background);font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}@media (prefers-color-scheme:dark){input{background-color:#161f27;background-color:var(--background);color:#fff;color:var(--form-text)}}button{color:#1d1d1d;color:var(--form-text);background-color:#efefef;background-color:var(--background);font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}@media (prefers-color-scheme:dark){button{background-color:#161f27;background-color:var(--background);color:#fff;color:var(--form-text)}}textarea{color:#1d1d1d;color:var(--form-text);background-color:#efefef;background-color:var(--background);font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}@media (prefers-color-scheme:dark){textarea{background-color:#161f27;background-color:var(--background);color:#fff;color:var(--form-text)}}select{color:#1d1d1d;color:var(--form-text);background-color:#efefef;background-color:var(--background);font-family:inherit;font-size:inherit;margin-right:6px;margin-bottom:6px;padding:10px;border:none;border-radius:6px;outline:none}@media (prefers-color-scheme:dark){select{background-color:#161f27;background-color:var(--background);color:#fff;color:var(--form-text)}}button{background-color:#d0cfcf;background-color:var(--button-base);padding-right:30px;padding-left:30px}@media (prefers-color-scheme:dark){button{background-color:#0c151c;background-color:var(--button-base)}}input[type=submit]{background-color:#d0cfcf;background-color:var(--button-base);padding-right:30px;padding-left:30px}@media (prefers-color-scheme:dark){input[type=submit]{background-color:#0c151c;background-color:var(--button-base)}}input[type=reset]{background-color:#d0cfcf;background-color:var(--button-base);padding-right:30px;padding-left:30px}@media (prefers-color-scheme:dark){input[type=reset]{background-color:#0c151c;background-color:var(--button-base)}}input[type=button]{background-color:#d0cfcf;background-color:var(--button-base);padding-right:30px;padding-left:30px}@media (prefers-color-scheme:dark){input[type=button]{background-color:#0c151c;background-color:var(--button-base)}}button:hover{background:#9b9b9b;background:var(--button-hover)}@media (prefers-color-scheme:dark){button:hover{background:#040a0f;background:var(--button-hover)}}input[type=submit]:hover{background:#9b9b9b;background:var(--button-hover)}@media (prefers-color-scheme:dark){input[type=submit]:hover{background:#040a0f;background:var(--button-hover)}}input[type=reset]:hover{background:#9b9b9b;background:var(--button-hover)}@media (prefers-color-scheme:dark){input[type=reset]:hover{background:#040a0f;background:var(--button-hover)}}input[type=button]:hover{background:#9b9b9b;background:var(--button-hover)}@media (prefers-color-scheme:dark){input[type=button]:hover{background:#040a0f;background:var(--button-hover)}}input[type=color]{min-height:2rem;padding:8px;cursor:pointer}input[type=checkbox],input[type=radio]{height:1em;width:1em}input[type=radio]{border-radius:100%}input{vertical-align:top}label{vertical-align:middle;margin-bottom:4px;display:inline-block}button,input:not([type=checkbox]):not([type=radio]),input[type=range],select,textarea{-webkit-appearance:none}textarea{display:block;margin-right:0;box-sizing:border-box;resize:vertical}textarea:not([cols]){width:100%}textarea:not([rows]){min-height:40px;height:140px}select{background:#efefef url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='63' width='117' fill='%23161f27'%3E%3Cpath d='M115 2c-1-2-4-2-5 0L59 53 7 2a4 4 0 00-5 5l54 54 2 2 3-2 54-54c2-1 2-4 0-5z'/%3E%3C/svg%3E") calc(100% - 12px) 50%/12px no-repeat;background:var(--background) var(--select-arrow) calc(100% - 12px) 50%/12px no-repeat;padding-right:35px}@media (prefers-color-scheme:dark){select{background:#161f27 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='63' width='117' fill='%23efefef'%3E%3Cpath d='M115 2c-1-2-4-2-5 0L59 53 7 2a4 4 0 00-5 5l54 54 2 2 3-2 54-54c2-1 2-4 0-5z'/%3E%3C/svg%3E") calc(100% - 12px) 50%/12px no-repeat;background:var(--background) var(--select-arrow) calc(100% - 12px) 50%/12px no-repeat}}select::-ms-expand{display:none}select[multiple]{padding-right:10px;background-image:none;overflow-y:auto}input:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}@media (prefers-color-scheme:dark){input:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}}select:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}@media (prefers-color-scheme:dark){select:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}}button:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}@media (prefers-color-scheme:dark){button:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}}textarea:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}@media (prefers-color-scheme:dark){textarea:focus{box-shadow:0 0 0 2px #0096bfab;box-shadow:0 0 0 2px var(--focus)}}button:active,input[type=button]:active,input[type=checkbox]:active,input[type=radio]:active,input[type=range]:active,input[type=reset]:active,input[type=submit]:active{transform:translateY(2px)}button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.5}::-moz-placeholder{color:#949494;color:var(--form-placeholder)}:-ms-input-placeholder{color:#949494;color:var(--form-placeholder)}::-ms-input-placeholder{color:#949494;color:var(--form-placeholder)}::placeholder{color:#949494;color:var(--form-placeholder)}@media (prefers-color-scheme:dark){::-moz-placeholder{color:#a9a9a9;color:var(--form-placeholder)}:-ms-input-placeholder{color:#a9a9a9;color:var(--form-placeholder)}::-ms-input-placeholder{color:#a9a9a9;color:var(--form-placeholder)}::placeholder{color:#a9a9a9;color:var(--form-placeholder)}}fieldset{border:1px solid rgba(0,150,191,.67);border:1px solid var(--focus);border-radius:6px;margin:0 0 12px;padding:10px}@media (prefers-color-scheme:dark){fieldset{border:1px solid rgba(0,150,191,.67);border:1px solid var(--focus)}}legend{font-size:.9em;font-weight:600}input[type=range]{margin:10px 0;padding:10px 0;background:transparent}input[type=range]:focus{outline:none}input[type=range]::-webkit-slider-runnable-track{width:100%;height:9.5px;-webkit-transition:.2s;transition:.2s;background:#efefef;background:var(--background);border-radius:3px}@media (prefers-color-scheme:dark){input[type=range]::-webkit-slider-runnable-track{background:#161f27;background:var(--background)}}input[type=range]::-webkit-slider-thumb{box-shadow:0 1px 1px #000,0 0 1px #0d0d0d;height:20px;width:20px;border-radius:50%;background:#dbdbdb;background:var(--border);-webkit-appearance:none;margin-top:-7px}@media (prefers-color-scheme:dark){input[type=range]::-webkit-slider-thumb{background:#526980;background:var(--border)}}input[type=range]:focus::-webkit-slider-runnable-track{background:#efefef;background:var(--background)}@media (prefers-color-scheme:dark){input[type=range]:focus::-webkit-slider-runnable-track{background:#161f27;background:var(--background)}}input[type=range]::-moz-range-track{width:100%;height:9.5px;-moz-transition:.2s;transition:.2s;background:#efefef;background:var(--background);border-radius:3px}@media (prefers-color-scheme:dark){input[type=range]::-moz-range-track{background:#161f27;background:var(--background)}}input[type=range]::-moz-range-thumb{box-shadow:1px 1px 1px #000,0 0 1px #0d0d0d;height:20px;width:20px;border-radius:50%;background:#dbdbdb;background:var(--border)}@media (prefers-color-scheme:dark){input[type=range]::-moz-range-thumb{background:#526980;background:var(--border)}}input[type=range]::-ms-track{width:100%;height:9.5px;background:transparent;border-color:transparent;border-width:16px 0;color:transparent}input[type=range]::-ms-fill-lower{background:#efefef;background:var(--background);border:.2px solid #010101;border-radius:3px;box-shadow:1px 1px 1px #000,0 0 1px #0d0d0d}@media (prefers-color-scheme:dark){input[type=range]::-ms-fill-lower{background:#161f27;background:var(--background)}}input[type=range]::-ms-fill-upper{background:#efefef;background:var(--background);border:.2px solid #010101;border-radius:3px;box-shadow:1px 1px 1px #000,0 0 1px #0d0d0d}@media (prefers-color-scheme:dark){input[type=range]::-ms-fill-upper{background:#161f27;background:var(--background)}}input[type=range]::-ms-thumb{box-shadow:1px 1px 1px #000,0 0 1px #0d0d0d;border:1px solid #000;height:20px;width:20px;border-radius:50%;background:#dbdbdb;background:var(--border)}@media (prefers-color-scheme:dark){input[type=range]::-ms-thumb{background:#526980;background:var(--border)}}input[type=range]:focus::-ms-fill-lower{background:#efefef;background:var(--background)}@media (prefers-color-scheme:dark){input[type=range]:focus::-ms-fill-lower{background:#161f27;background:var(--background)}}input[type=range]:focus::-ms-fill-upper{background:#efefef;background:var(--background)}@media (prefers-color-scheme:dark){input[type=range]:focus::-ms-fill-upper{background:#161f27;background:var(--background)}}a{text-decoration:none;color:#0076d1;color:var(--links)}@media (prefers-color-scheme:dark){a{color:#41adff;color:var(--links)}}a:hover{text-decoration:underline}code{background:#efefef;background:var(--background);color:#000;color:var(--code);padding:2.5px 5px;border-radius:6px;font-size:1em}@media (prefers-color-scheme:dark){code{color:#ffbe85;color:var(--code);background:#161f27;background:var(--background)}}samp{background:#efefef;background:var(--background);color:#000;color:var(--code);padding:2.5px 5px;border-radius:6px;font-size:1em}@media (prefers-color-scheme:dark){samp{color:#ffbe85;color:var(--code);background:#161f27;background:var(--background)}}time{background:#efefef;background:var(--background);color:#000;color:var(--code);padding:2.5px 5px;border-radius:6px;font-size:1em}@media (prefers-color-scheme:dark){time{color:#ffbe85;color:var(--code);background:#161f27;background:var(--background)}}pre>code{padding:10px;display:block;overflow-x:auto}var{color:#39a33c;color:var(--variable);font-style:normal;font-family:monospace}@media (prefers-color-scheme:dark){var{color:#d941e2;color:var(--variable)}}kbd{background:#efefef;background:var(--background);border:1px solid #dbdbdb;border:1px solid var(--border);border-radius:2px;color:#363636;color:var(--text-main);padding:2px 4px}@media (prefers-color-scheme:dark){kbd{color:#dbdbdb;color:var(--text-main);border:1px solid #526980;border:1px solid var(--border);background:#161f27;background:var(--background)}}img,video{max-width:100%;height:auto}hr{border:none;border-top:1px solid #dbdbdb;border-top:1px solid var(--border)}@media (prefers-color-scheme:dark){hr{border-top:1px solid #526980;border-top:1px solid var(--border)}}table{border-collapse:collapse;margin-bottom:10px;width:100%;table-layout:fixed}table caption,td,th{text-align:left}td,th{padding:6px;vertical-align:top;word-wrap:break-word}thead{border-bottom:1px solid #dbdbdb;border-bottom:1px solid var(--border)}@media (prefers-color-scheme:dark){thead{border-bottom:1px solid #526980;border-bottom:1px solid var(--border)}}tfoot{border-top:1px solid #dbdbdb;border-top:1px solid var(--border)}@media (prefers-color-scheme:dark){tfoot{border-top:1px solid #526980;border-top:1px solid var(--border)}}tbody tr:nth-child(2n){background-color:#efefef;background-color:var(--background)}@media (prefers-color-scheme:dark){tbody tr:nth-child(2n){background-color:#161f27;background-color:var(--background)}}tbody tr:nth-child(2n) button{background-color:#f7f7f7;background-color:var(--background-alt)}@media (prefers-color-scheme:dark){tbody tr:nth-child(2n) button{background-color:#1a242f;background-color:var(--background-alt)}}tbody tr:nth-child(2n) button:hover{background-color:#fff;background-color:var(--background-body)}@media (prefers-color-scheme:dark){tbody tr:nth-child(2n) button:hover{background-color:#202b38;background-color:var(--background-body)}}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:#efefef;background:var(--background);border-radius:6px}@media (prefers-color-scheme:dark){::-webkit-scrollbar-track{background:#161f27;background:var(--background)}}::-webkit-scrollbar-thumb{background:#aaa;background:var(--scrollbar-thumb);border-radius:6px}@media (prefers-color-scheme:dark){::-webkit-scrollbar-thumb{background:#040a0f;background:var(--scrollbar-thumb)}}::-webkit-scrollbar-thumb:hover{background:#9b9b9b;background:var(--scrollbar-thumb-hover)}@media (prefers-color-scheme:dark){::-webkit-scrollbar-thumb:hover{background:#000;background:var(--scrollbar-thumb-hover)}}::-moz-selection{background-color:#9e9e9e;background-color:var(--selection);color:#000;color:var(--text-bright)}::selection{background-color:#9e9e9e;background-color:var(--selection);color:#000;color:var(--text-bright)}@media (prefers-color-scheme:dark){::-moz-selection{color:#fff;color:var(--text-bright)}::selection{color:#fff;color:var(--text-bright)}}@media (prefers-color-scheme:dark){::-moz-selection{background-color:#1c76c5;background-color:var(--selection)}::selection{background-color:#1c76c5;background-color:var(--selection)}}details{display:flex;flex-direction:column;align-items:flex-start;background-color:#f7f7f7;background-color:var(--background-alt);padding:10px 10px 0;margin:1em 0;border-radius:6px;overflow:hidden}@media (prefers-color-scheme:dark){details{background-color:#1a242f;background-color:var(--background-alt)}}details[open]{padding:10px}details>:last-child{margin-bottom:0}details[open] summary{margin-bottom:10px}summary{display:list-item;background-color:#efefef;background-color:var(--background);padding:10px;margin:-10px -10px 0;cursor:pointer;outline:none}@media (prefers-color-scheme:dark){summary{background-color:#161f27;background-color:var(--background)}}summary:focus,summary:hover{text-decoration:underline}details>:not(summary){margin-top:0}summary::-webkit-details-marker{color:#363636;color:var(--text-main)}@media (prefers-color-scheme:dark){summary::-webkit-details-marker{color:#dbdbdb;color:var(--text-main)}}dialog{background-color:#f7f7f7;background-color:var(--background-alt);color:#363636;color:var(--text-main);border-radius:6px;border:#dbdbdb;border-color:var(--border);padding:10px 30px}@media (prefers-color-scheme:dark){dialog{border-color:#526980;border-color:var(--border);color:#dbdbdb;color:var(--text-main);background-color:#1a242f;background-color:var(--background-alt)}}dialog>header:first-child{background-color:#efefef;background-color:var(--background);border-radius:6px 6px 0 0;margin:-10px -30px 10px;padding:10px;text-align:center}@media (prefers-color-scheme:dark){dialog>header:first-child{background-color:#161f27;background-color:var(--background)}}dialog::-webkit-backdrop{background:rgba(0,0,0,.61);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}dialog::backdrop{background:rgba(0,0,0,.61);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}footer{border-top:1px solid #dbdbdb;border-top:1px solid var(--border);padding-top:10px;color:#70777f;color:var(--text-muted)}@media (prefers-color-scheme:dark){footer{color:#a9b1ba;color:var(--text-muted);border-top:1px solid #526980;border-top:1px solid var(--border)}}body>footer{margin-top:40px}@media print{body,button,code,details,input,pre,summary,textarea{background-color:#fff}button,input,textarea{border:1px solid #000}body,button,code,footer,h1,h2,h3,h4,h5,h6,input,pre,strong,summary,textarea{color:#000}summary::marker{color:#000}summary::-webkit-details-marker{color:#000}tbody tr:nth-child(2n){background-color:#f2f2f2}a{color:#00f;text-decoration:underline}}:root{--sms-options-bg: var(--background-body);--sms-border-radius: 6px}h1,h2,h3{margin:unset}button{margin-bottom:unset}.no-style{all:unset}body{max-width:70vw;display:grid;grid-template-areas:"nav nav nav" "folders bookmarks filters";margin-top:0!important}dialog{margin-top:100px}.w-full{width:100%}.row{display:flex;align-items:center}.col{display:flex;flex-direction:column}.m-l-auto{margin-left:auto!important}.m-b-1{margin-bottom:1em}.m-b-2{margin-bottom:2em}.red{color:#e77e7e}.icon-button{padding:.4em;margin:0;width:1.8em;aspect-ratio:1/1}#autocomplete{position:absolute}.color-fix{color:var(--form-text)!important;background-color:var(--background)!important;border-color:var(--background-alt)!important;margin:unset!important}.color-fix ul.options{margin:unset;border-radius:0 0 1ex 1ex}.input-like{color:var(--form-text)!important;background-color:var(--background)!important;font-family:inherit;font-size:inherit;margin-right:6px!important;padding:10px!important;border:none!important;border-radius:6px!important;--webkit-appearance: none;height:19px!important;display:flex!important;flex-wrap:wrap!important}.sticky{background-color:var(--background-body);position:sticky;top:calc(21px + 5.08em);align-self:start}.tags{display:flex;margin-top:.5em;flex-wrap:wrap}.tag{background-color:var(--background);border-radius:10px;margin:4px 4px 4px 0;padding:4px 8px;width:max-content}div.svelte-66wdl1{display:inline-block;vertical-align:middle;margin:0 3pt;border-width:.2em;border-style:solid;border-radius:50%;animation:var(--duration) infinite svelte-66wdl1-rotate}@keyframes svelte-66wdl1-rotate{to{transform:rotate(360deg)}}.svelte-18jo2l6:where(div.multiselect){position:relative;margin:1em 0;align-items:center;display:flex;cursor:text;border:var(--sms-border, 1pt solid lightgray);border-radius:var(--sms-border-radius, 3pt);background:var(--sms-bg);max-width:var(--sms-max-width);padding:var(--sms-padding, 0 3pt);color:var(--sms-text-color);font-size:var(--sms-font-size, inherit);min-height:var(--sms-min-height, 19pt)}.svelte-18jo2l6:where(div.multiselect.open){z-index:var(--sms-open-z-index, 4)}.svelte-18jo2l6:where(div.multiselect:focus-within){border:var(--sms-focus-border, 1pt solid var(--sms-active-color, cornflowerblue))}.svelte-18jo2l6:where(div.multiselect.disabled){background:var(--sms-disabled-bg, lightgray);cursor:not-allowed}.svelte-18jo2l6:where(div.multiselect > ul.selected){display:flex;flex:1;padding:0;margin:0;flex-wrap:wrap}.svelte-18jo2l6:where(div.multiselect > ul.selected > li){align-items:center;border-radius:3pt;display:flex;margin:2pt;line-height:normal;transition:.3s;white-space:nowrap;background:var(--sms-selected-bg, rgba(0, 0, 0, .15));padding:var(--sms-selected-li-padding, 1pt 5pt);color:var(--sms-selected-text-color, var(--sms-text-color))}.svelte-18jo2l6:where(div.multiselect button){border-radius:50%;display:flex;transition:.2s;color:inherit;background:transparent;border:none;cursor:pointer;outline:none;padding:0;margin:0 0 0 3pt}.svelte-18jo2l6:where(div.multiselect button.remove-all){margin:0 3pt}.svelte-18jo2l6:where(ul.selected > li button:hover,button.remove-all:hover,button:focus){color:var(--sms-button-hover-color, lightskyblue)}.svelte-18jo2l6:where(div.multiselect input){margin:auto 0;padding:0}.svelte-18jo2l6:where(div.multiselect > ul.selected > li > input){border:none;outline:none;background:none;flex:1;min-width:2em;color:inherit;font-size:inherit;cursor:inherit}.svelte-18jo2l6:where(div.multiselect > ul.selected > li > input)::placeholder{color:var(--sms-placeholder-color)}.svelte-18jo2l6:where(div.multiselect > input.form-control){width:2em;position:absolute;background:transparent;border:none;outline:none;z-index:-1;opacity:0;pointer-events:none}.svelte-18jo2l6:where(div.multiselect > ul.options){list-style:none;padding:0;top:100%;left:0;width:100%;position:absolute;border-radius:1ex;overflow:auto;background:var(--sms-options-bg, white);max-height:var(--sms-options-max-height, 50vh);overscroll-behavior:var(--sms-options-overscroll, none);box-shadow:var(--sms-options-shadow, 0 0 14pt -8pt black);transition:all .2s;opacity:1;transform:translateY(0)}.svelte-18jo2l6:where(div.multiselect > ul.options.hidden){visibility:hidden;opacity:0;transform:translateY(50px)}.svelte-18jo2l6:where(div.multiselect > ul.options > li){padding:3pt 2ex;cursor:pointer;scroll-margin:var(--sms-options-scroll-margin, 100px)}.svelte-18jo2l6:where(div.multiselect > ul.options span){padding:3pt 2ex}.svelte-18jo2l6:where(div.multiselect > ul.options > li.selected){background:var(--sms-li-selected-bg);color:var(--sms-li-selected-color)}.svelte-18jo2l6:where(div.multiselect > ul.options > li.active){background:var(--sms-li-active-bg, var(--sms-active-color, rgba(0, 0, 0, .15)))}.svelte-18jo2l6:where(div.multiselect > ul.options > li.disabled){cursor:not-allowed;background:var(--sms-li-disabled-bg, #f5f5f6);color:var(--sms-li-disabled-text, #b8b8b8)}#add-bookmark-modal.svelte-il024n{width:600px}:root{--size:1.8em}.bookmark.svelte-odn92f.svelte-odn92f.svelte-odn92f{display:flex;flex-direction:column;padding:.5em;margin-bottom:1em;border-radius:6px}.bookmark.active.svelte-odn92f.svelte-odn92f.svelte-odn92f{background-color:var(--background-alt)}.bookmark.svelte-odn92f h3.svelte-odn92f.svelte-odn92f,.bookmark.svelte-odn92f small.svelte-odn92f.svelte-odn92f{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.favicon.svelte-odn92f.svelte-odn92f.svelte-odn92f{aspect-ratio:1/1;width:1.17em;margin-right:.5em}.bookmark-checkbox.svelte-odn92f.svelte-odn92f.svelte-odn92f{margin:0 0 0 .5em!important;width:calc(var(--size) - 2px);height:calc(var(--size) - 2px);border-radius:6px!important}.tags.svelte-odn92f.svelte-odn92f.svelte-odn92f{display:flex;margin-top:.5em}.tag.svelte-odn92f.svelte-odn92f.svelte-odn92f{background-color:var(--background);border-radius:10px;margin:4px 4px 4px 0;padding:4px 8px;width:max-content}.popup.svelte-odn92f .menu.svelte-odn92f.svelte-odn92f{list-style-type:none;background-color:var(--button-base);border-radius:6px;padding:0;position:absolute;margin-top:.5em;z-index:1000}.popup.svelte-odn92f .menu hr.svelte-odn92f.svelte-odn92f{margin:0}.popup.svelte-odn92f .menu li.svelte-odn92f>.svelte-odn92f{padding:.75em;cursor:pointer;width:calc(100% - 1.5em)}.popup.svelte-odn92f .menu li.svelte-odn92f>.svelte-odn92f:hover,.popup.svelte-odn92f .menu li.svelte-odn92f>.svelte-odn92f:focus{background-color:var(--button-hover)}.popup.svelte-odn92f .menu li.svelte-odn92f:last-child>.svelte-odn92f{border-radius:0 0 6px 6px}.popup.svelte-odn92f .menu li.svelte-odn92f:first-child>.svelte-odn92f{border-radius:6px 6px 0 0}button.svelte-y6ql9o{font-family:inherit;font-size:inherit;padding:1em 2em;color:#ff3e00;background-color:#ff3e001a;border-radius:2em;border:2px solid rgba(255,62,0,0);outline:none;width:200px;font-variant-numeric:tabular-nums;cursor:pointer}button.svelte-y6ql9o:focus{border:2px solid #ff3e00}button.svelte-y6ql9o:active{background-color:#ff3e0033}input[type=radio].svelte-1fmor0p.svelte-1fmor0p,label.svelte-1fmor0p.svelte-1fmor0p{cursor:pointer}.tags.svelte-1fmor0p .tag.svelte-1fmor0p{cursor:pointer;opacity:.5;transition:opacity .1s ease-out}.tags.svelte-1fmor0p .tag.svelte-1fmor0p:hover{opacity:1!important}ul.svelte-u7x5vz{margin:0;list-style:none;padding-left:1rem;user-select:none;padding-top:.5em;padding-bottom:.5em;cursor:pointer}label.svelte-u7x5vz{font-size:larger}.arrow.svelte-u7x5vz{cursor:pointer;display:inline-block}.arrowDown.svelte-u7x5vz{transform:rotate(90deg)}.url-action.svelte-19q94so{background-color:var(--background-alt);border-radius:6px}nav.svelte-zxsuuu{grid-area:nav;padding-top:20px;padding-bottom:1em;position:sticky;top:0px;background-color:var(--background-body)}#filters.svelte-zxsuuu{grid-area:filters;width:15vw;min-width:300px}main.svelte-zxsuuu{padding-right:1em;width:35vw}#folders.svelte-zxsuuu{grid-area:folders;width:15vw} diff --git a/api/frontend-dist/assets/index.2d1dc04a.js b/api/frontend-dist/assets/index.2d1dc04a.js new file mode 100644 index 0000000..c69c68c --- /dev/null +++ b/api/frontend-dist/assets/index.2d1dc04a.js @@ -0,0 +1,6 @@ +var Ql=Object.defineProperty,Wl=Object.defineProperties;var Yl=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var Kl=Object.prototype.hasOwnProperty,Jl=Object.prototype.propertyIsEnumerable;var pt=(t,e,l)=>e in t?Ql(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,Ze=(t,e)=>{for(var l in e||(e={}))Kl.call(e,l)&&pt(t,l,e[l]);if(bt)for(var l of bt(e))Jl.call(e,l)&&pt(t,l,e[l]);return t},kt=(t,e)=>Wl(t,Yl(e));const Zl=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function l(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=l(i);fetch(i.href,o)}};Zl();function j(){}function Se(t,e){for(const l in e)t[l]=e[l];return t}function Xl(t){return t&&typeof t=="object"&&typeof t.then=="function"}function il(t){return t()}function vt(){return Object.create(null)}function fe(t){t.forEach(il)}function ct(t){return typeof t=="function"}function me(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Xe;function it(t,e){return Xe||(Xe=document.createElement("a")),Xe.href=e,t===Xe.href}function xl(t){return Object.keys(t).length===0}function sl(t,...e){if(t==null)return j;const l=t.subscribe(...e);return l.unsubscribe?()=>l.unsubscribe():l}function Ue(t,e,l){t.$$.on_destroy.push(sl(e,l))}function He(t,e,l,n){if(t){const i=ol(t,e,l,n);return t[0](i)}}function ol(t,e,l,n){return t[1]&&n?Se(l.ctx.slice(),t[1](n(e))):l.ctx}function Ve(t,e,l,n){if(t[2]&&n){const i=t[2](n(l));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(e.dirty.length,i.length);for(let u=0;u32){const e=[],l=t.ctx.length/32;for(let n=0;nwindow.performance.now():()=>Date.now(),ul=rl?t=>requestAnimationFrame(t):j;const qe=new Set;function fl(t){qe.forEach(e=>{e.c(t)||(qe.delete(e),e.f())}),qe.size!==0&&ul(fl)}function $l(t){let e;return qe.size===0&&ul(fl),{promise:new Promise(l=>{qe.add(e={c:t,f:l})}),abort(){qe.delete(e)}}}function a(t,e){t.appendChild(e)}function L(t,e,l){t.insertBefore(e,l||null)}function D(t){t.parentNode.removeChild(t)}function Be(t,e){for(let l=0;lt.removeEventListener(e,l,n)}function Me(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function en(t){return function(e){e.target===this&&t.call(this,e)}}function c(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function Fe(t,e){for(const l in e)c(t,l,e[l])}function tn(t){return Array.from(t.childNodes)}function ve(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function he(t,e){t.value=e==null?"":e}function ne(t,e,l,n){l===null?t.style.removeProperty(e):t.style.setProperty(e,l,n?"important":"")}function yt(t,e){for(let l=0;l{const i=t.$$.callbacks[e];if(i){const o=nn(e,l,{cancelable:n});return i.slice().forEach(s=>{s.call(t,o)}),!o.defaultPrevented}return!0}}function St(t,e){const l=t.$$.callbacks[e.type];l&&l.slice().forEach(n=>n.call(this,e))}const Ye=[],Ce=[],$e=[],st=[],al=Promise.resolve();let ot=!1;function dl(){ot||(ot=!0,al.then(mt))}function sn(){return dl(),al}function tt(t){$e.push(t)}function _t(t){st.push(t)}const nt=new Set;let xe=0;function mt(){const t=Je;do{for(;xe{et.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}}function rt(t,e){const l=e.token={};function n(i,o,s,u){if(e.token!==l)return;e.resolved=u;let r=e.ctx;s!==void 0&&(r=r.slice(),r[s]=u);const f=i&&(e.current=i)(r);let d=!1;e.block&&(e.blocks?e.blocks.forEach((g,w)=>{w!==o&&g&&(pe(),I(g,1,1,()=>{e.blocks[w]===g&&(e.blocks[w]=null)}),ke())}):e.block.d(1),f.c(),E(f,1),f.m(e.mount(),e.anchor),d=!0),e.block=f,e.blocks&&(e.blocks[o]=f),d&&mt()}if(Xl(t)){const i=at();if(t.then(o=>{Ae(i),n(e.then,1,e.value,o),Ae(null)},o=>{if(Ae(i),n(e.catch,2,e.error,o),Ae(null),!e.hasCatch)throw o}),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,t),!0;e.resolved=t}}function ut(t,e,l){const n=e.slice(),{resolved:i}=t;t.current===t.then&&(n[t.value]=i),t.current===t.catch&&(n[t.error]=i),t.block.p(n,l)}function ht(t,e){const l={},n={},i={$$scope:1};let o=t.length;for(;o--;){const s=t[o],u=e[o];if(u){for(const r in s)r in u||(n[r]=1);for(const r in u)i[r]||(l[r]=u[r],i[r]=1);t[o]=u}else for(const r in s)i[r]=1}for(const s in n)s in l||(l[s]=void 0);return l}function gt(t,e,l){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=l,l(t.$$.ctx[n]))}function de(t){t&&t.c()}function ce(t,e,l,n){const{fragment:i,on_mount:o,on_destroy:s,after_update:u}=t.$$;i&&i.m(e,l),n||tt(()=>{const r=o.map(il).filter(ct);s?s.push(...r):fe(r),t.$$.on_mount=[]}),u.forEach(tt)}function ae(t,e){const l=t.$$;l.fragment!==null&&(fe(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function rn(t,e){t.$$.dirty[0]===-1&&(Ye.push(t),dl(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=b.length?b[0]:w;return f.ctx&&i(f.ctx[g],f.ctx[g]=k)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](k),d&&rn(t,g)),w}):[],f.update(),d=!0,fe(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){const g=tn(e.target);f.fragment&&f.fragment.l(g),g.forEach(D)}else f.fragment&&f.fragment.c();e.intro&&E(t.$$.fragment),ce(t,e.target,e.anchor,e.customElement),mt()}Ae(r)}class be{$destroy(){ae(this,1),this.$destroy=j}$on(e,l){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!xl(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const un="http://localhost:8080";async function we(t,e="GET",l=null){const n=await fetch(un+"/api"+t,{method:e,body:l?JSON.stringify(l):null});if(!n.ok)throw new Error(n.statusText);return await n.json()}function fn(t){let e,l=`${t[0]} transparent ${t[0]} + ${t[0]}`;return{c(){e=m("div"),ne(e,"--duration",t[1]),c(e,"class","svelte-66wdl1"),ne(e,"border-color",l,!1),ne(e,"width",t[2],!1),ne(e,"height",t[2],!1)},m(n,i){L(n,e,i)},p(n,[i]){i&2&&ne(e,"--duration",n[1]),i&1&&l!==(l=`${n[0]} transparent ${n[0]} + ${n[0]}`)&&ne(e,"border-color",l,!1),i&4&&ne(e,"width",n[2],!1),i&4&&ne(e,"height",n[2],!1)},i:j,o:j,d(n){n&&D(e)}}}function cn(t,e,l){let{color:n="cornflowerblue"}=e,{duration:i="1.5s"}=e,{size:o="1em"}=e;return t.$$set=s=>{"color"in s&&l(0,n=s.color),"duration"in s&&l(1,i=s.duration),"size"in s&&l(2,o=s.size)},[n,i,o]}class an extends be{constructor(e){super(),ge(this,e,cn,fn,me,{color:0,duration:1,size:2})}}function dn(t){let e,l,n=[t[0],{fill:"currentColor"},{viewBox:"0 0 16 16"}],i={};for(let o=0;o{l(0,e=Se(Se({},e),Pe(n)))},e=Pe(e),[e]}class mn extends be{constructor(e){super(),ge(this,e,_n,dn,me,{})}}function hn(t){let e,l,n=[t[0],{viewBox:"0 0 20 20"},{fill:"currentColor"}],i={};for(let o=0;o{l(0,e=Se(Se({},e),Pe(n)))},e=Pe(e),[e]}class _l extends be{constructor(e){super(),ge(this,e,gn,hn,me,{})}}function bn(t){let e,l,n,i=[t[0],{viewBox:"0 0 24 24"},{fill:"currentColor"}],o={};for(let s=0;s{l(0,e=Se(Se({},e),Pe(n)))},e=Pe(e),[e]}class kn extends be{constructor(e){super(),ge(this,e,pn,bn,me,{})}}const Re=[];function vn(t,e){return{subscribe:lt(t,e).subscribe}}function lt(t,e=j){let l;const n=new Set;function i(u){if(me(t,u)&&(t=u,l)){const r=!Re.length;for(const f of n)f[1](),Re.push(f,t);if(r){for(let f=0;f{n.delete(f),n.size===0&&(l(),l=null)}}return{set:i,update:o,subscribe:s}}function wn(t,e,l){const n=!Array.isArray(t),i=n?[t]:t,o=e.length<2;return vn(l,s=>{let u=!1;const r=[];let f=0,d=j;const g=()=>{if(f)return;d();const b=e(n?r[0]:r,s);o?s(b):d=ct(b)?b:j},w=i.map((b,k)=>sl(b,p=>{r[k]=p,f&=~(1<{f|=1<ft(t,e[o],l[o],n[o]));if(typeof l=="object"){const i={};for(const o in l)i[o]=ft(t,e[o],l[o],n[o]);return i}else throw new Error(`Cannot spring ${typeof l} values`)}}function yn(t,e={}){const l=lt(t),{stiffness:n=.15,damping:i=.8,precision:o=.01}=e;let s,u,r,f=t,d=t,g=1,w=0,b=!1;function k(h,v={}){d=h;const S=r={};if(t==null||v.hard||p.stiffness>=1&&p.damping>=1)return b=!0,s=wt(),f=h,l.set(t=d),Promise.resolve();if(v.soft){const M=v.soft===!0?.5:+v.soft;w=1/(M*60),g=0}return u||(s=wt(),b=!1,u=$l(M=>{if(b)return b=!1,u=null,!1;g=Math.min(g+w,1);const N={inv_mass:g,opts:p,settled:!0,dt:(M-s)*60/1e3},O=ft(N,f,t,d);return s=M,f=t,l.set(t=O),N.settled&&(u=null),!N.settled})),new Promise(M=>{u.promise.then(()=>{S===r&&M()})})}const p={set:k,update:(h,v)=>k(h(d,t),v),subscribe:l.subscribe,stiffness:n,damping:i,precision:o};return p}function Sn(t){let e,l=`rotate(${t[0].angle}deg) scale(${t[0].scale}) translate(${t[0].dx}px, + ${t[0].dy}px)`,n;const i=t[11].default,o=He(i,t,t[10],null);return{c(){e=m("span"),o&&o.c(),ne(e,"transform",l,!1)},m(s,u){L(s,e,u),o&&o.m(e,null),n=!0},p(s,[u]){o&&o.p&&(!n||u&1024)&&Ge(o,i,s,s[10],n?Ve(i,s[10],u,null):Qe(s[10]),null),u&1&&l!==(l=`rotate(${s[0].angle}deg) scale(${s[0].scale}) translate(${s[0].dx}px, + ${s[0].dy}px)`)&&ne(e,"transform",l,!1)},i(s){n||(E(o,s),n=!0)},o(s){I(o,s),n=!1},d(s){s&&D(e),o&&o.d(s)}}}function An(t,e,l){let n,{$$slots:i={},$$scope:o}=e,{wiggle:s=!1}=e,{angle:u=0}=e,{scale:r=1}=e,{dx:f=0}=e,{dy:d=0}=e,{duration:g=200}=e,{stiffness:w=.05}=e,{damping:b=.1}=e,k={angle:0,scale:1,dx:0,dy:0},p=yn(k,{stiffness:w,damping:b});return Ue(t,p,h=>l(0,n=h)),t.$$set=h=>{"wiggle"in h&&l(2,s=h.wiggle),"angle"in h&&l(3,u=h.angle),"scale"in h&&l(4,r=h.scale),"dx"in h&&l(5,f=h.dx),"dy"in h&&l(6,d=h.dy),"duration"in h&&l(7,g=h.duration),"stiffness"in h&&l(8,w=h.stiffness),"damping"in h&&l(9,b=h.damping),"$$scope"in h&&l(10,o=h.$$scope)},t.$$.update=()=>{t.$$.dirty&132&&s&&setTimeout(()=>l(2,s=!1),g),t.$$.dirty&124&&p.set(s?{scale:r,angle:u,dx:f,dy:d}:k)},[n,p,s,u,r,f,d,g,w,b,o,i]}class Cn extends be{constructor(e){super(),ge(this,e,An,Sn,me,{wiggle:2,angle:3,scale:4,dx:5,dy:6,duration:7,stiffness:8,damping:9})}}function Ct(t,e,l){const n=t.slice();n[76]=e[l],n[82]=l;const i=n[76]instanceof Object?n[76]:{label:n[76]};n[77]=i.label,n[29]=i.disabled!==void 0?i.disabled:null,n[78]=i.title!==void 0?i.title:null,n[79]=i.selectedTitle!==void 0?i.selectedTitle:null,n[30]=i.disabledTitle!==void 0?i.disabledTitle:n[23];const o=n[6]&&n[36](n[6])===n[77];return n[80]=o,n}const On=t=>({option:t[1]&16}),Ot=t=>({option:t[76],idx:t[82]}),Bn=t=>({}),Bt=t=>({}),Mn=t=>({}),Mt=t=>({});function Tt(t,e,l){const n=t.slice();return n[76]=e[l],n[82]=l,n}const Tn=t=>({option:t[0]&2}),Dt=t=>({option:t[76],idx:t[82]});function Dn(t){let e=t[36](t[76])+"",l;return{c(){l=ue(e)},m(n,i){L(n,l,i)},p(n,i){i[0]&2&&e!==(e=n[36](n[76])+"")&&ve(l,e)},d(n){n&&D(l)}}}function Et(t){let e,l,n,i,o,s;l=new _l({props:{width:"15px"}});function u(){return t[54](t[76])}function r(){return t[55](t[76])}return{c(){e=m("button"),de(l.$$.fragment),c(e,"type","button"),c(e,"title",n=t[21]+" "+t[36](t[76])),c(e,"class","svelte-18jo2l6")},m(f,d){L(f,e,d),ce(l,e,null),i=!0,o||(s=[U(e,"mouseup",Me(u)),U(e,"keydown",function(){ct(t[42](r))&&t[42](r).apply(this,arguments)})],o=!0)},p(f,d){t=f,(!i||d[0]&2097154&&n!==(n=t[21]+" "+t[36](t[76])))&&c(e,"title",n)},i(f){i||(E(l.$$.fragment,f),i=!0)},o(f){I(l.$$.fragment,f),i=!1},d(f){f&&D(e),ae(l),o=!1,fe(s)}}}function Lt(t){let e,l,n,i;const o=t[48].selected,s=He(o,t,t[73],Dt),u=s||Dn(t);let r=!t[29]&&Et(t);return{c(){e=m("li"),u&&u.c(),l=C(),r&&r.c(),c(e,"class",n=Ie(t[16])+" svelte-18jo2l6"),c(e,"aria-selected","true")},m(f,d){L(f,e,d),u&&u.m(e,null),a(e,l),r&&r.m(e,null),i=!0},p(f,d){s?s.p&&(!i||d[0]&2|d[2]&2048)&&Ge(s,o,f,f[73],i?Ve(o,f[73],d,Tn):Qe(f[73]),Dt):u&&u.p&&(!i||d[0]&2)&&u.p(f,i?d:[-1,-1,-1]),f[29]?r&&(pe(),I(r,1,1,()=>{r=null}),ke()):r?(r.p(f,d),d[0]&536870912&&E(r,1)):(r=Et(f),r.c(),E(r,1),r.m(e,null)),(!i||d[0]&65536&&n!==(n=Ie(f[16])+" svelte-18jo2l6"))&&c(e,"class",n)},i(f){i||(E(u,f),E(r),i=!0)},o(f){I(u,f),I(r),i=!1},d(f){f&&D(e),u&&u.d(f),r&&r.d()}}}function jt(t){let e;const l=t[48].spinner,n=He(l,t,t[73],Mt),i=n||En();return{c(){i&&i.c()},m(o,s){i&&i.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s[2]&2048)&&Ge(n,l,o,o[73],e?Ve(l,o[73],s,Mn):Qe(o[73]),Mt)},i(o){e||(E(i,o),e=!0)},o(o){I(i,o),e=!1},d(o){i&&i.d(o)}}}function En(t){let e,l;return e=new an({}),{c(){de(e.$$.fragment)},m(n,i){ce(e,n,i),l=!0},i(n){l||(E(e.$$.fragment,n),l=!0)},o(n){I(e.$$.fragment,n),l=!1},d(n){ae(e,n)}}}function Ln(t){let e,l,n,i=t[8]&&(t[8]>1||t[9])&&Nt(t),o=t[8]!==1&&t[1].length>1&&Rt(t);return{c(){i&&i.c(),e=C(),o&&o.c(),l=je()},m(s,u){i&&i.m(s,u),L(s,e,u),o&&o.m(s,u),L(s,l,u),n=!0},p(s,u){s[8]&&(s[8]>1||s[9])?i?(i.p(s,u),u[0]&768&&E(i,1)):(i=Nt(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(pe(),I(i,1,1,()=>{i=null}),ke()),s[8]!==1&&s[1].length>1?o?(o.p(s,u),u[0]&258&&E(o,1)):(o=Rt(s),o.c(),E(o,1),o.m(l.parentNode,l)):o&&(pe(),I(o,1,1,()=>{o=null}),ke())},i(s){n||(E(i),E(o),n=!0)},o(s){I(i),I(o),n=!1},d(s){i&&i.d(s),s&&D(e),o&&o.d(s),s&&D(l)}}}function jn(t){let e;const l=t[48]["disabled-icon"],n=He(l,t,t[73],Bt),i=n||Rn();return{c(){i&&i.c()},m(o,s){i&&i.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s[2]&2048)&&Ge(n,l,o,o[73],e?Ve(l,o[73],s,Bn):Qe(o[73]),Bt)},i(o){e||(E(i,o),e=!0)},o(o){I(i,o),e=!1},d(o){i&&i.d(o)}}}function Nt(t){let e,l,n;function i(s){t[60](s)}let o={angle:20,$$slots:{default:[Nn]},$$scope:{ctx:t}};return t[33]!==void 0&&(o.wiggle=t[33]),e=new Cn({props:o}),Ce.push(()=>gt(e,"wiggle",i)),{c(){de(e.$$.fragment)},m(s,u){ce(e,s,u),n=!0},p(s,u){const r={};u[0]&770|u[2]&2048&&(r.$$scope={dirty:u,ctx:s}),!l&&u[1]&4&&(l=!0,r.wiggle=s[33],_t(()=>l=!1)),e.$set(r)},i(s){n||(E(e.$$.fragment,s),n=!0)},o(s){I(e.$$.fragment,s),n=!1},d(s){ae(e,s)}}}function Nn(t){var i,o;let e,l=((o=(i=t[9])==null?void 0:i.call(t,t[1].length,t[8]))!=null?o:t[8]>1?`${t[1].length}/${t[8]}`:"")+"",n;return{c(){e=m("span"),n=ue(l),ne(e,"padding","0 3pt"),c(e,"class","svelte-18jo2l6")},m(s,u){L(s,e,u),a(e,n)},p(s,u){var r,f;u[0]&770&&l!==(l=((f=(r=s[9])==null?void 0:r.call(s,s[1].length,s[8]))!=null?f:s[8]>1?`${s[1].length}/${s[8]}`:"")+"")&&ve(n,l)},d(s){s&&D(e)}}}function Rt(t){let e,l,n,i,o;return l=new _l({props:{width:"15px"}}),{c(){e=m("button"),de(l.$$.fragment),c(e,"type","button"),c(e,"class","remove-all svelte-18jo2l6"),c(e,"title",t[22])},m(s,u){L(s,e,u),ce(l,e,null),n=!0,i||(o=[U(e,"mouseup",Me(t[41])),U(e,"keydown",t[42](t[41]))],i=!0)},p(s,u){(!n||u[0]&4194304)&&c(e,"title",s[22])},i(s){n||(E(l.$$.fragment,s),n=!0)},o(s){I(l.$$.fragment,s),n=!1},d(s){s&&D(e),ae(l),i=!1,fe(o)}}}function Rn(t){let e,l;return e=new kn({props:{width:"15px"}}),{c(){de(e.$$.fragment)},m(n,i){ce(e,n,i),l=!0},p:j,i(n){l||(E(e.$$.fragment,n),l=!0)},o(n){I(e.$$.fragment,n),l=!1},d(n){ae(e,n)}}}function Ut(t){let e;function l(o,s){return o[24]&&o[0]?qn:Un}let n=l(t),i=n(t);return{c(){i.c(),e=je()},m(o,s){i.m(o,s),L(o,e,s)},p(o,s){n===(n=l(o))&&i?i.p(o,s):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){i.d(o),o&&D(e)}}}function Un(t){let e,l;return{c(){e=m("span"),l=ue(t[13]),c(e,"class","svelte-18jo2l6")},m(n,i){L(n,e,i),a(e,l)},p(n,i){i[0]&8192&&ve(l,n[13])},d(n){n&&D(e)}}}function qn(t){let e,l,n,i,o;return{c(){e=m("li"),l=ue(t[25]),n=C(),c(e,"title",t[25]),c(e,"aria-selected","false"),c(e,"class","svelte-18jo2l6"),ie(e,"active",t[32])},m(s,u){L(s,e,u),a(e,l),a(e,n),i||(o=[U(e,"mousedown",Me(t[50])),U(e,"mouseup",Me(t[66])),U(e,"mouseover",t[67]),U(e,"focus",t[68]),U(e,"mouseout",t[69]),U(e,"blur",t[70])],i=!0)},p(s,u){u[0]&33554432&&ve(l,s[25]),u[0]&33554432&&c(e,"title",s[25]),u[1]&2&&ie(e,"active",s[32])},d(s){s&&D(e),i=!1,fe(o)}}}function zn(t){let e=t[36](t[76])+"",l;return{c(){l=ue(e)},m(n,i){L(n,l,i)},p(n,i){i[1]&16&&e!==(e=n[36](n[76])+"")&&ve(l,e)},d(n){n&&D(l)}}}function qt(t){let e,l,n,i,o,s,u;const r=t[48].option,f=He(r,t,t[73],Ot),d=f||zn(t);function g(){return t[61](t[29],t[77])}function w(){return t[62](t[29],t[76])}function b(){return t[63](t[29],t[76])}return{c(){e=m("li"),d&&d.c(),l=C(),c(e,"title",n=t[29]?t[30]:t[34](t[77])&&t[79]||t[78]),c(e,"class",i=t[18]+" "+(t[80]?t[19]:"")+" svelte-18jo2l6"),c(e,"aria-selected","false"),ie(e,"selected",t[34](t[77])),ie(e,"active",t[80]),ie(e,"disabled",t[29])},m(k,p){L(k,e,p),d&&d.m(e,null),a(e,l),o=!0,s||(u=[U(e,"mousedown",Me(t[49])),U(e,"mouseup",Me(g)),U(e,"mouseover",w),U(e,"focus",b),U(e,"mouseout",t[64]),U(e,"blur",t[65])],s=!0)},p(k,p){t=k,f?f.p&&(!o||p[1]&16|p[2]&2048)&&Ge(f,r,t,t[73],o?Ve(r,t[73],p,On):Qe(t[73]),Ot):d&&d.p&&(!o||p[1]&16)&&d.p(t,o?p:[-1,-1,-1]),(!o||p[1]&24&&n!==(n=t[29]?t[30]:t[34](t[77])&&t[79]||t[78]))&&c(e,"title",n),(!o||p[0]&786496|p[1]&16&&i!==(i=t[18]+" "+(t[80]?t[19]:"")+" svelte-18jo2l6"))&&c(e,"class",i),p[0]&786496|p[1]&24&&ie(e,"selected",t[34](t[77])),p[0]&786496|p[1]&48&&ie(e,"active",t[80]),p[0]&786496|p[1]&16&&ie(e,"disabled",t[29])},i(k){o||(E(d,k),o=!0)},o(k){I(d,k),o=!1},d(k){k&&D(e),d&&d.d(k),s=!1,fe(u)}}}function Pn(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h,v,S,M,N,O,Q,q,R,F,V,G;i=new mn({props:{width:"15px",style:"min-width: 1em; padding: 0 1pt;"}});let A=t[1],B=[];for(let y=0;yI(B[y],1,1,()=>{B[y]=null});let J=t[26]&&jt(t);const $=[jn,Ln],K=[];function ee(y,T){return y[29]?0:y[1].length>0?1:-1}~(h=ee(t))&&(v=K[h]=$[h](t));let P=t[35],z=[];for(let y=0;yI(z[y],1,1,()=>{z[y]=null});let x=null;return P.length||(x=Ut(t)),{c(){e=m("div"),l=m("input"),n=C(),de(i.$$.fragment),o=C(),s=m("ul");for(let y=0;y1),c(e,"class",Q="multiselect "+t[14]+" svelte-18jo2l6"),c(e,"title",q=t[29]?t[30]:null),c(e,"aria-disabled",R=t[29]?"true":null),ie(e,"disabled",t[29]),ie(e,"single",t[8]===1),ie(e,"open",t[3]),ie(e,"invalid",t[7])},m(y,T){L(y,e,T),a(e,l),he(l,t[31]),a(e,n),ce(i,e,null),a(e,o),a(e,s);for(let se=0;se{J=null}),ke());let se=h;if(h=ee(y),h===se?~h&&K[h].p(y,T):(v&&(pe(),I(K[se],1,1,()=>{K[se]=null}),ke()),~h?(v=K[h],v?v.p(y,T):(v=K[h]=$[h](y),v.c()),E(v,1),v.m(e,S)):v=null),T[0]&51126337|T[1]&250|T[2]&2048){P=y[35];let W;for(W=0;W1))&&c(e,"aria-multiselectable",O),(!F||T[0]&16384&&Q!==(Q="multiselect "+y[14]+" svelte-18jo2l6"))&&c(e,"class",Q),(!F||T[0]&1610612736&&q!==(q=y[29]?y[30]:null))&&c(e,"title",q),(!F||T[0]&536870912&&R!==(R=y[29]?"true":null))&&c(e,"aria-disabled",R),T[0]&536887296&&ie(e,"disabled",y[29]),T[0]&16640&&ie(e,"single",y[8]===1),T[0]&16392&&ie(e,"open",y[3]),T[0]&16512&&ie(e,"invalid",y[7])},i(y){if(!F){E(i.$$.fragment,y);for(let T=0;TZ?`${X(_)}`.toLowerCase().includes(Z.toLowerCase()):!0}=e,{outerDivClass:V=""}=e,{ulSelectedClass:G=""}=e,{liSelectedClass:A=""}=e,{ulOptionsClass:B=""}=e,{liOptionClass:Y=""}=e,{liActiveOptionClass:J=""}=e,{inputClass:$=""}=e,{removeBtnTitle:K="Remove"}=e,{removeAllTitle:ee="Remove all"}=e,{defaultDisabledTitle:P="This option is disabled"}=e,{allowUserOptions:z=!1}=e,{addOptionMsg:le="Create this option..."}=e,{autoScroll:x=!0}=e,{loading:y=!1}=e,{required:T=!1}=e,{autocomplete:se="off"}=e,{invalid:W=!1}=e,{sortSelected:oe=!1}=e;d!==null&&d<1&&console.error(`maxSelect must be null or positive integer, got ${d}`),(k==null?void 0:k.length)>0||console.error("MultiSelect is missing options"),Array.isArray(p)||console.error("selected prop must be an array");const te=cl();let H=!1;const X=_=>_ instanceof Object?_.label:_,re=_=>{var Z;return _ instanceof Object?(Z=_.value)!=null?Z:_.label:_};let Te=!1;function We(_){if(d&&d>1&&p.length>=d&&l(33,Te=!0),d===null||d===1||p.lengthX(ye)===_);if(!Z&&[!0,"append"].includes(z)&&r.length>0&&(Z={label:r,value:r},z==="append"&&l(43,k=[...k,Z])),l(0,r=""),!Z){console.error(`MultiSelect: option with label ${_} not found`);return}d===1?l(1,p=[Z]):(l(1,p=[...p,Z]),oe===!0?l(1,p=p.sort((ye,De)=>{const[Vl,Gl]=[X(ye),X(De)];return`${Vl}`.localeCompare(`${Gl}`)})):typeof oe=="function"&&l(1,p=p.sort(oe))),p.length===d?Oe(!1):S==null||S.focus(),te("add",{option:Z}),te("change",{option:Z,type:"add"})}}function Ne(_){var ye;if(p.length===0)return;p.splice(h.lastIndexOf(_),1),l(1,p);const Z=(ye=k.find(De=>X(De)===_))!=null?ye:z&&{label:_,value:_};if(!Z)return console.error(`MultiSelect: option with label ${_} not found`);te("remove",{option:Z}),te("change",{option:Z,type:"remove"})}function Oe(_){w||(l(3,f=_),_?(S==null||S.focus(),te("focus")):(S==null||S.blur(),l(6,R=null),te("blur")))}async function gl(_){if(_.key==="Escape"||_.key==="Tab")Oe(!1),l(0,r="");else if(_.key==="Enter")if(_.preventDefault(),R){const Z=X(R);h.includes(Z)?Ne(Z):We(Z),l(0,r="")}else z&&r.length>0?We(r):Oe(!0);else if(["ArrowDown","ArrowUp"].includes(_.key)){if(R===null&&i.length>0){l(6,R=i[0]);return}else if(z&&r.length>0){l(32,H=!H);return}else if(R===null)return;const Z=_.key==="ArrowUp"?-1:1,ye=i.indexOf(R)+Z;if(ye<0?l(6,R=i[i.length-1]):ye===i.length?l(6,R=i[0]):l(6,R=i[ye]),x){await sn();const De=document.querySelector("ul.options > li.active");De==null||De.scrollIntoViewIfNeeded()}}else _.key==="Backspace"&&h.length>0&&!r&&Ne(h.at(-1))}function bl(){te("removeAll",{options:p}),te("change",{options:p,type:"removeAll"}),l(1,p=[]),l(0,r="")}const pl=_=>Z=>{["Enter","Space"].includes(Z.code)&&(Z.preventDefault(),_())};function kl(_){St.call(this,t,_)}function vl(_){St.call(this,t,_)}const wl=_=>{M&&!M.contains(_.target)&&Oe(!1)};function yl(){n=this.value,l(31,n),l(44,v),l(1,p)}const Sl=()=>l(7,W=!0),Al=_=>Ne(X(_)),Cl=_=>Ne(X(_));function Ol(_){Ce[_?"unshift":"push"](()=>{S=_,l(4,S)})}function Bl(){r=this.value,l(0,r)}const Ml=()=>Oe(!0),Tl=()=>Oe(!0);function Dl(_){Te=_,l(33,Te)}const El=(_,Z)=>{_||(o(Z)?Ne(Z):We(Z))},Ll=(_,Z)=>{_||l(6,R=Z)},jl=(_,Z)=>{_||l(6,R=Z)},Nl=()=>l(6,R=null),Rl=()=>l(6,R=null),Ul=()=>We(r),ql=()=>l(32,H=!0),zl=()=>l(32,H=!0),Pl=()=>l(32,H=!1),Il=()=>l(32,H=!1);function Fl(_){Ce[_?"unshift":"push"](()=>{M=_,l(5,M)})}const Hl=()=>Oe(!0);return t.$$set=_=>{"searchText"in _&&l(0,r=_.searchText),"showOptions"in _&&l(3,f=_.showOptions),"maxSelect"in _&&l(8,d=_.maxSelect),"maxSelectMsg"in _&&l(9,g=_.maxSelectMsg),"disabled"in _&&l(29,w=_.disabled),"disabledTitle"in _&&l(30,b=_.disabledTitle),"options"in _&&l(43,k=_.options),"selected"in _&&l(1,p=_.selected),"selectedLabels"in _&&l(2,h=_.selectedLabels),"selectedValues"in _&&l(44,v=_.selectedValues),"input"in _&&l(4,S=_.input),"outerDiv"in _&&l(5,M=_.outerDiv),"placeholder"in _&&l(10,N=_.placeholder),"id"in _&&l(11,O=_.id),"name"in _&&l(12,Q=_.name),"noOptionsMsg"in _&&l(13,q=_.noOptionsMsg),"activeOption"in _&&l(6,R=_.activeOption),"filterFunc"in _&&l(45,F=_.filterFunc),"outerDivClass"in _&&l(14,V=_.outerDivClass),"ulSelectedClass"in _&&l(15,G=_.ulSelectedClass),"liSelectedClass"in _&&l(16,A=_.liSelectedClass),"ulOptionsClass"in _&&l(17,B=_.ulOptionsClass),"liOptionClass"in _&&l(18,Y=_.liOptionClass),"liActiveOptionClass"in _&&l(19,J=_.liActiveOptionClass),"inputClass"in _&&l(20,$=_.inputClass),"removeBtnTitle"in _&&l(21,K=_.removeBtnTitle),"removeAllTitle"in _&&l(22,ee=_.removeAllTitle),"defaultDisabledTitle"in _&&l(23,P=_.defaultDisabledTitle),"allowUserOptions"in _&&l(24,z=_.allowUserOptions),"addOptionMsg"in _&&l(25,le=_.addOptionMsg),"autoScroll"in _&&l(46,x=_.autoScroll),"loading"in _&&l(26,y=_.loading),"required"in _&&l(27,T=_.required),"autocomplete"in _&&l(28,se=_.autocomplete),"invalid"in _&&l(7,W=_.invalid),"sortSelected"in _&&l(47,oe=_.sortSelected),"$$scope"in _&&l(73,u=_.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&2&&l(2,h=p.map(X)),t.$$.dirty[0]&2&&l(44,v=p.map(re)),t.$$.dirty[1]&8192&&l(31,n=v.join(",")),t.$$.dirty[1]&1&&n&&l(7,W=!1),t.$$.dirty[0]&5|t.$$.dirty[1]&20480&&l(35,i=k.filter(_=>F(_,r)&&!(_ instanceof Object&&_.disabled)&&!h.includes(X(_)))),t.$$.dirty[0]&4&&l(34,o=_=>h.includes(_))},[r,p,h,f,S,M,R,W,d,g,N,O,Q,q,V,G,A,B,Y,J,$,K,ee,P,z,le,y,T,se,w,b,n,H,Te,o,i,X,We,Ne,Oe,gl,bl,pl,k,v,F,x,oe,s,kl,vl,wl,yl,Sl,Al,Cl,Ol,Bl,Ml,Tl,Dl,El,Ll,jl,Nl,Rl,Ul,ql,zl,Pl,Il,Fl,Hl,u]}class ml extends be{constructor(e){super(),ge(this,e,In,Pn,me,{searchText:0,showOptions:3,maxSelect:8,maxSelectMsg:9,disabled:29,disabledTitle:30,options:43,selected:1,selectedLabels:2,selectedValues:44,input:4,outerDiv:5,placeholder:10,id:11,name:12,noOptionsMsg:13,activeOption:6,filterFunc:45,outerDivClass:14,ulSelectedClass:15,liSelectedClass:16,ulOptionsClass:17,liOptionClass:18,liActiveOptionClass:19,inputClass:20,removeBtnTitle:21,removeAllTitle:22,defaultDisabledTitle:23,allowUserOptions:24,addOptionMsg:25,autoScroll:46,loading:26,required:27,autocomplete:28,invalid:7,sortSelected:47},null,[-1,-1,-1])}}const _e=lt({sortBy:"date",order:"asc",folder:"",tags:[],search:"",page:0}),Fn=wn(_e,t=>{const e=[];if(t.sortBy&&t.order){const l=`sort_by=${t.sortBy}&order=${t.order}`;e.push(l)}if(t.folder){const l=`folder=${t.folder}`;e.push(l)}if(t.search){const l=`search=${t.search}`;e.push(l)}if(t.tags.length>0){const n=t.tags.map(i=>`tags[]=${i}`).join("&");e.push(n)}return e.push(`page=${t.page}`),"?"+e.join("&")}),Hn=()=>{const t=lt([]),{set:e,subscribe:l,update:n}=t;return{subscribe:l,fetch:async i=>{try{const o=await we("/bookmarks"+i);e(o.data)}catch{return e([])}},add:(...i)=>{n(o=>[...o,...i])},delete:i=>{n(o=>{const s=o.findIndex(u=>u.id===i);return o.splice(s,1),o})},updateOne:(i,o)=>{n(s=>s.map(u=>u.id===i?Ze(Ze({},u),o):u))}}},ze=Hn();function Vn(t){return{c:j,m:j,p:j,i:j,o:j,d:j}}function Gn(t){let e,l,n=t[11].length>0&&Qn(t);return{c(){n&&n.c(),e=je()},m(i,o){n&&n.m(i,o),L(i,e,o),l=!0},p(i,o){i[11].length>0&&n.p(i,o)},i(i){l||(E(n),l=!0)},o(i){I(n),l=!1},d(i){n&&n.d(i),i&&D(e)}}}function Qn(t){let e,l,n;function i(s){t[7](s)}let o={inputClass:"input-like",outerDivClass:"color-fix",allowUserOptions:!0,addOptionMsg:"+ Create new tag",options:t[11].map(Xn)};return t[3]!==void 0&&(o.selected=t[3]),e=new ml({props:o}),Ce.push(()=>gt(e,"selected",i)),{c(){de(e.$$.fragment)},m(s,u){ce(e,s,u),n=!0},p(s,u){const r={};!l&&u&8&&(l=!0,r.selected=s[3],_t(()=>l=!1)),e.$set(r)},i(s){n||(E(e.$$.fragment,s),n=!0)},o(s){I(e.$$.fragment,s),n=!1},d(s){ae(e,s)}}}function Wn(t){return{c:j,m:j,p:j,i:j,o:j,d:j}}function Yn(t){return{c:j,m:j,p:j,i:j,o:j,d:j}}function Kn(t){let e,l,n;function i(s){t[8](s)}let o={inputClass:"input-like",outerDivClass:"color-fix",options:t[10].map(xn)};return t[4]!==void 0&&(o.selected=t[4]),e=new ml({props:o}),Ce.push(()=>gt(e,"selected",i)),{c(){de(e.$$.fragment)},m(s,u){ce(e,s,u),n=!0},p(s,u){const r={};!l&&u&16&&(l=!0,r.selected=s[4],_t(()=>l=!1)),e.$set(r)},i(s){n||(E(e.$$.fragment,s),n=!0)},o(s){I(e.$$.fragment,s),n=!1},d(s){ae(e,s)}}}function Jn(t){return{c:j,m:j,p:j,i:j,o:j,d:j}}function zt(t){let e,l;return{c(){e=m("span"),l=ue(t[1]),c(e,"class","m-b-1 red")},m(n,i){L(n,e,i),a(e,l)},p(n,i){i&2&&ve(l,n[1])},d(n){n&&D(e)}}}function Zn(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h,v,S,M,N=t[0]==="SUBMITTING"?"Loading":"Add",O,Q,q,R,F,V={ctx:t,current:null,token:null,hasCatch:!1,pending:Wn,then:Gn,catch:Vn,value:11,blocks:[,,,]};rt(we("/tags"),V);let G={ctx:t,current:null,token:null,hasCatch:!1,pending:Jn,then:Kn,catch:Yn,value:10,blocks:[,,,]};rt(we("/folders"),G);let A=t[0]==="ERROR"&&zt(t);return{c(){e=m("dialog"),l=m("header"),l.innerHTML="

Add new bookmark

",n=C(),i=m("div"),o=m("div"),s=m("label"),s.innerHTML='URL*',u=C(),r=m("input"),f=C(),d=m("div"),g=m("label"),g.innerHTML="Tags",w=C(),V.block.c(),b=C(),k=m("div"),p=m("label"),p.innerHTML="Folder",h=C(),G.block.c(),v=C(),A&&A.c(),S=C(),M=m("button"),O=ue(N),c(s,"for","url"),c(r,"type","url"),c(r,"placeholder","Add new URL"),c(r,"name","url"),c(r,"id","url"),r.required=!0,c(o,"class","col m-b-1"),c(g,"for","tags"),c(d,"class","col m-b-1"),c(p,"for","folders"),c(k,"class","col m-b-1"),c(i,"class","col"),c(M,"class","w-full"),c(M,"type","submit"),M.disabled=Q=t[0]==="SUBMITTING",ne(M,"margin","3em 0 1em 0"),c(e,"id","add-bookmark-modal"),c(e,"class","svelte-il024n")},m(B,Y){L(B,e,Y),a(e,l),a(e,n),a(e,i),a(i,o),a(o,s),a(o,u),a(o,r),he(r,t[2]),a(i,f),a(i,d),a(d,g),a(d,w),V.block.m(d,V.anchor=null),V.mount=()=>d,V.anchor=null,a(i,b),a(i,k),a(k,p),a(k,h),G.block.m(k,G.anchor=null),G.mount=()=>k,G.anchor=null,a(i,v),A&&A.m(i,null),a(e,S),a(e,M),a(M,O),q=!0,R||(F=[U(r,"input",t[6]),U(M,"click",t[5])],R=!0)},p(B,[Y]){t=B,Y&4&&he(r,t[2]),ut(V,t,Y),ut(G,t,Y),t[0]==="ERROR"?A?A.p(t,Y):(A=zt(t),A.c(),A.m(i,null)):A&&(A.d(1),A=null),(!q||Y&1)&&N!==(N=t[0]==="SUBMITTING"?"Loading":"Add")&&ve(O,N),(!q||Y&1&&Q!==(Q=t[0]==="SUBMITTING"))&&(M.disabled=Q)},i(B){q||(E(V.block),E(G.block),q=!0)},o(B){for(let Y=0;Y<3;Y+=1){const J=V.blocks[Y];I(J)}for(let Y=0;Y<3;Y+=1){const J=G.blocks[Y];I(J)}q=!1},d(B){B&&D(e),V.block.d(),V.token=null,V=null,G.block.d(),G.token=null,G=null,A&&A.d(),R=!1,fe(F)}}}const Xn=({id:t,name:e})=>({label:e,value:t}),xn=({id:t,name:e})=>({label:e,value:t});function $n(t,e,l){let n,i,o,s=[],u=[];const r=b=>b.label==b.value&&typeof b.value=="string",f=async()=>{l(0,n="SUBMITTING");const b=s.filter(r);if(b.length>0)try{const p=await we("/tags/bulk","POST",{names:b.map(({value:h})=>h)});l(3,s=[...s.filter(h=>!r(h)),...p.map(({id:h,name:v})=>({label:v,value:h}))])}catch{l(0,n="ERROR"),l(1,i="An error occurred");return}const k={url:o,tags:s.map(({value:p})=>p),folders:u.map(({value:p})=>p)};try{const p=await we("/bookmarks","POST",k);l(0,n="SUCCESS"),ze.add(p),document.getElementById("add-bookmark-modal").close()}catch{l(0,n="ERROR"),l(1,i="An error occurred")}};function d(){o=this.value,l(2,o)}function g(b){s=b,l(3,s)}function w(b){u=b,l(4,u)}return[n,i,o,s,u,f,d,g,w]}class ei extends be{constructor(e){super(),ge(this,e,$n,Zn,me,{})}}var ti="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAWQAAAFkBqp2phgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABBSURBVDiNY2DADbwZGBieMDAwPGZgYPDEow4neMzAwPAfih/hUsREjsnEAk+oKx4xMDB40NIi2oHRWBgMYKTEAgDk8RljTFG0oAAAAABJRU5ErkJggg==";function li(t){let e,l,n,i,o,s;const u=t[9].default,r=He(u,t,t[8],null);return{c(){e=m("div"),r&&r.c(),c(e,"class",l="outclick "+t[0]),c(e,"style",n=!t[0]&&!t[1]?"display: contents":"")},m(f,d){L(f,e,d),r&&r.m(e,null),t[10](e),i=!0,o||(s=[U(window,"pointerdown",t[3]),U(window,"keydown",t[4])],o=!0)},p(f,[d]){r&&r.p&&(!i||d&256)&&Ge(r,u,f,f[8],i?Ve(u,f[8],d,null):Qe(f[8]),null),(!i||d&1&&l!==(l="outclick "+f[0]))&&c(e,"class",l),(!i||d&3&&n!==(n=!f[0]&&!f[1]?"display: contents":""))&&c(e,"style",n)},i(f){i||(E(r,f),i=!0)},o(f){I(r,f),i=!1},d(f){f&&D(e),r&&r.d(f),t[10](null),o=!1,fe(s)}}}function ni(t,e,l){let{$$slots:n={},$$scope:i}=e;const o=cl();let{class:s=""}=e,{excludeByDOMNode:u=[]}=e,{excludeByQuerySelector:r=[]}=e,{useWrapper:f=!1}=e,{includeSelf:d=!1}=e,g;const w=h=>{let v=!1;for(let S=0;S{(d?!0:!g.contains(h.target))&&!w(h.target)&&o("outclick",{wrapper:g})},k=h=>{if(h.code==="Escape"){o("outclick",{wrapper:g});return}h.target!==document.body&&["Enter","NumpadEnter","Space"].includes(h.code)&&b(h)};function p(h){Ce[h?"unshift":"push"](()=>{g=h,l(2,g)})}return t.$$set=h=>{"class"in h&&l(0,s=h.class),"excludeByDOMNode"in h&&l(5,u=h.excludeByDOMNode),"excludeByQuerySelector"in h&&l(6,r=h.excludeByQuerySelector),"useWrapper"in h&&l(1,f=h.useWrapper),"includeSelf"in h&&l(7,d=h.includeSelf),"$$scope"in h&&l(8,i=h.$$scope)},[s,f,g,b,k,u,r,d,i,n,p]}class ii extends be{constructor(e){super(),ge(this,e,ni,li,me,{class:0,excludeByDOMNode:5,excludeByQuerySelector:6,useWrapper:1,includeSelf:7})}}function Pt(t,e,l){const n=t.slice();return n[18]=e[l],n}function It(t){let e,l;return{c(){e=m("img"),c(e,"class","favicon svelte-odn92f"),it(e.src,l=t[0].meta.favicon)||c(e,"src",l),c(e,"alt","\u{1F525}")},m(n,i){L(n,e,i)},p(n,i){i&1&&!it(e.src,l=n[0].meta.favicon)&&c(e,"src",l)},d(n){n&&D(e)}}}function Ft(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h,v,S,M,N,O,Q,q=t[0].last_saved_offline&&Ht(t);return{c(){e=m("ul"),l=m("li"),l.innerHTML='',n=C(),i=m("li"),i.innerHTML='',o=C(),s=m("hr"),u=C(),r=m("li"),f=m("button"),d=ue("Save Offline"),w=C(),q&&q.c(),b=C(),k=m("li"),p=m("button"),p.textContent="Refetch Metadata",h=C(),v=m("hr"),S=C(),M=m("li"),N=m("button"),N.textContent="Delete",c(l,"role","none"),c(l,"class","svelte-odn92f"),c(i,"role","none"),c(i,"class","svelte-odn92f"),c(s,"class","svelte-odn92f"),c(f,"id",g="save-offline-button-"+t[0].id),c(f,"class","no-style svelte-odn92f"),c(r,"role","none"),c(r,"class","svelte-odn92f"),c(p,"class","no-style svelte-odn92f"),c(k,"role","none"),c(k,"class","svelte-odn92f"),c(v,"class","svelte-odn92f"),c(N,"class","no-style red svelte-odn92f"),c(M,"role","none"),c(M,"class","svelte-odn92f"),c(e,"class","menu svelte-odn92f")},m(R,F){L(R,e,F),a(e,l),a(e,n),a(e,i),a(e,o),a(e,s),a(e,u),a(e,r),a(r,f),a(f,d),a(e,w),q&&q.m(e,null),a(e,b),a(e,k),a(k,p),a(e,h),a(e,v),a(e,S),a(e,M),a(M,N),t[14](e),O||(Q=[U(f,"click",t[11]),U(p,"click",t[12]),U(N,"click",t[7]),U(e,"keydown",t[13])],O=!0)},p(R,F){F&1&&g!==(g="save-offline-button-"+R[0].id)&&c(f,"id",g),R[0].last_saved_offline?q?q.p(R,F):(q=Ht(R),q.c(),q.m(e,b)):q&&(q.d(1),q=null)},d(R){R&&D(e),q&&q.d(),t[14](null),O=!1,fe(Q)}}}function Ht(t){let e,l,n,i;return{c(){e=m("li"),l=m("a"),n=ue("Open saved copy"),c(l,"class","no-style svelte-odn92f"),c(l,"target","_blank"),c(l,"href",i="http://localhost:8080/saved/"+t[0].id),c(e,"role","none"),c(e,"class","svelte-odn92f")},m(o,s){L(o,e,s),a(e,l),a(l,n)},p(o,s){s&1&&i!==(i="http://localhost:8080/saved/"+o[0].id)&&c(l,"href",i)},d(o){o&&D(e)}}}function si(t){let e,l=t[6]&&Ft(t);return{c(){l&&l.c(),e=je()},m(n,i){l&&l.m(n,i),L(n,e,i)},p(n,i){n[6]?l?l.p(n,i):(l=Ft(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){l&&l.d(n),n&&D(e)}}}function Vt(t){let e,l=t[0].meta.description+"",n;return{c(){e=m("p"),n=ue(l)},m(i,o){L(i,e,o),a(e,n)},p(i,o){o&1&&l!==(l=i[0].meta.description+"")&&ve(n,l)},d(i){i&&D(e)}}}function Gt(t){let e,l,n=t[0].tags,i=[];for(let o=0;o0&&Gt(t);return{c(){e=m("div"),l=m("div"),$&&$.c(),n=C(),i=m("h3"),s=ue(o),u=C(),r=m("div"),f=m("div"),d=m("button"),g=m("img"),k=C(),de(p.$$.fragment),h=C(),v=m("input"),N=C(),O=m("small"),Q=m("a"),R=ue(q),V=C(),K&&K.c(),G=C(),ee&&ee.c(),ne(i,"text-overflow","ellipsis"),c(i,"class","svelte-odn92f"),it(g.src,w=ti)||c(g,"src",w),c(g,"alt","Menu"),ne(g,"filter","invert(1)"),ne(g,"transform","rotate(90deg)"),c(d,"id",b="menu-button-"+t[0].id),c(d,"class","icon-button"),c(f,"class","popup svelte-odn92f"),c(v,"type","checkbox"),c(v,"name",S=t[0].id.toString()),c(v,"id",M=t[0].id.toString()),c(v,"class","bookmark-checkbox svelte-odn92f"),c(r,"class","m-l-auto row"),c(l,"class","row header-row"),c(Q,"href",F=t[0].url),c(O,"class","svelte-odn92f"),c(e,"class",A=Ie(`bookmark ${t[5]||t[4]?"active":""}`)+" svelte-odn92f")},m(P,z){L(P,e,z),a(e,l),$&&$.m(l,null),a(l,n),a(l,i),a(i,s),a(l,u),a(l,r),a(r,f),a(f,d),a(d,g),a(f,k),ce(p,f,null),a(r,h),a(r,v),v.checked=t[5],a(e,N),a(e,O),a(O,Q),a(Q,R),a(e,V),K&&K.m(e,null),a(e,G),ee&&ee.m(e,null),B=!0,Y||(J=[U(d,"click",t[10]),U(v,"change",t[16]),U(v,"change",t[17]),U(e,"mouseover",t[8]),U(e,"focus",t[8]),U(e,"mouseout",t[9]),U(e,"blur",t[9])],Y=!0)},p(P,[z]){P[0].meta.favicon?$?$.p(P,z):($=It(P),$.c(),$.m(l,n)):$&&($.d(1),$=null),(!B||z&1)&&o!==(o=P[0].meta.title+"")&&ve(s,o),(!B||z&1&&b!==(b="menu-button-"+P[0].id))&&c(d,"id",b);const le={};z&1&&(le.excludeByQuerySelector=["#menu-button-"+P[0].id,"save-offline-button-"+P[0].id]),z&2097229&&(le.$$scope={dirty:z,ctx:P}),p.$set(le),(!B||z&1&&S!==(S=P[0].id.toString()))&&c(v,"name",S),(!B||z&1&&M!==(M=P[0].id.toString()))&&c(v,"id",M),z&32&&(v.checked=P[5]),(!B||z&1)&&q!==(q=P[0].url+"")&&ve(R,q),(!B||z&1&&F!==(F=P[0].url))&&c(Q,"href",F),P[0].meta.description?K?K.p(P,z):(K=Vt(P),K.c(),K.m(e,G)):K&&(K.d(1),K=null),P[0].tags.length>0?ee?ee.p(P,z):(ee=Gt(P),ee.c(),ee.m(e,null)):ee&&(ee.d(1),ee=null),(!B||z&48&&A!==(A=Ie(`bookmark ${P[5]||P[4]?"active":""}`)+" svelte-odn92f"))&&c(e,"class",A)},i(P){B||(E(p.$$.fragment,P),B=!0)},o(P){I(p.$$.fragment,P),B=!1},d(P){P&&D(e),$&&$.d(),ae(p),K&&K.d(),ee&&ee.d(),Y=!1,fe(J)}}}function ri(t,e,l){let{bookmark:n}=e,{toggleMark:i}=e,o=!1,s=!1;const u=async()=>{try{const O=await we("/bookmarks/"+n.id,"DELETE");ze.delete(n.id)}catch(O){console.debug(O)}},r=()=>{l(4,o=!0)},f=()=>{s||l(4,o=!1)};let d=!1,g=0,w=null;const b=()=>{l(6,d=!d)},k=()=>{we("/bookmarks/"+n.id+"/save","PUT")},p=async()=>{try{const O=await we("/bookmarks/"+n.id+"/meta","PUT");ze.updateOne(n.id,kt(Ze({},n),{meta:O}))}catch(O){console.error(O)}},h=O=>{const{key:Q}=O;(Q==="ArrowUp"||Q==="ArrowDown")&&(O.preventDefault(),Q==="ArrowDown"?l(2,g=(g+1)%6):Q==="ArrowUp"&&(g<=0?l(2,g=5):l(2,g--,g)))};function v(O){Ce[O?"unshift":"push"](()=>{w=O,l(3,w)})}const S=()=>{l(6,d=!1)};function M(){s=this.checked,l(5,s)}const N=()=>i(n.id);return t.$$set=O=>{"bookmark"in O&&l(0,n=O.bookmark),"toggleMark"in O&&l(1,i=O.toggleMark)},t.$$.update=()=>{t.$$.dirty&12&&w&&[...w.children].filter(({tagName:Q})=>Q==="LI")[g].firstElementChild.focus()},[n,i,g,w,o,s,d,u,r,f,b,k,p,h,v,S,M,N]}class ui extends be{constructor(e){super(),ge(this,e,ri,oi,me,{bookmark:0,toggleMark:1})}}function Wt(t,e,l){const n=t.slice();return n[6]=e[l],n}function Yt(t){let e,l;return e=new ui({props:{bookmark:t[6],toggleMark:t[2]}}),{c(){de(e.$$.fragment)},m(n,i){ce(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.bookmark=n[6]),e.$set(o)},i(n){l||(E(e.$$.fragment,n),l=!0)},o(n){I(e.$$.fragment,n),l=!1},d(n){ae(e,n)}}}function fi(t){let e,l,n,i,o,s,u,r=t[0],f=[];for(let g=0;gI(f[g],1,1,()=>{f[g]=null});return{c(){e=m("div"),e.innerHTML=`

Showing 20 of 201

+
`,l=C();for(let g=0;gLoad More",c(e,"class","sticky"),ne(i,"text-align","center")},m(g,w){L(g,e,w),L(g,l,w);for(let b=0;bl(3,n=f)),Ue(t,ze,f=>l(0,i=f)),Ue(t,_e,f=>l(1,o=f)),dt(()=>ze.fetch(n));let s=[];const u=f=>{const d=s.indexOf(f);d===-1?s.push(f):s.splice(d,1),s=s},r=()=>{Ke(_e,o.page++,o)};return t.$$.update=()=>{t.$$.dirty&8&&ze.fetch(n)},[i,o,u,n,r]}class ai extends be{constructor(e){super(),ge(this,e,ci,fi,me,{})}}function Kt(t,e,l){const n=t.slice();return n[11]=e[l],n}function Jt(t){let e,l=t[11].name+"",n,i,o,s,u;function r(){return t[9](t[11])}return{c(){e=m("div"),n=ue(l),i=C(),c(e,"class","tag svelte-1fmor0p"),c(e,"role","checkbox"),c(e,"style",o=`opacity: ${t[1].tags.includes(t[11].id)?1:.5}`)},m(f,d){L(f,e,d),a(e,n),a(e,i),s||(u=U(e,"click",r),s=!0)},p(f,d){t=f,d&1&&l!==(l=t[11].name+"")&&ve(n,l),d&3&&o!==(o=`opacity: ${t[1].tags.includes(t[11].id)?1:.5}`)&&c(e,"style",o)},d(f){f&&D(e),s=!1,u()}}}function di(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h,v,S,M,N,O,Q,q,R,F,V,G,A,B,Y,J,$,K,ee,P,z,le,x,y,T,se,W,oe=t[0],te=[];for(let H=0;Hl(1,n=k));let i=[];dt(async()=>{try{l(0,i=await we("/tags"))}catch(k){console.debug(k)}});const o=[[],[]];function s(){n.search=this.value,_e.set(n)}function u(){n.sortBy=this.__value,_e.set(n)}function r(){n.sortBy=this.__value,_e.set(n)}function f(){n.order=this.__value,_e.set(n)}function d(){n.order=this.__value,_e.set(n)}return[i,n,s,u,o,r,f,d,()=>{Ke(_e,n.tags=[],n)},k=>{const p=n.tags;if(p.includes(k.id)){const h=p.indexOf(k);p.splice(h,1)}else p.push(k.id);Ke(_e,n.tags=p,n)},()=>{document.getElementById("settings").showModal()}]}class mi extends be{constructor(e){super(),ge(this,e,_i,di,me,{})}}function Zt(t,e,l){const n=t.slice();return n[10]=e[l],n}function hi(t){let e,l,n,i,o,s,u=t[0]&&Xt(t);return{c(){e=m("span"),e.textContent="\u25B6",l=C(),u&&u.c(),n=je(),c(e,"class","arrow svelte-u7x5vz"),ie(e,"arrowDown",t[1])},m(r,f){L(r,e,f),L(r,l,f),u&&u.m(r,f),L(r,n,f),i=!0,o||(s=U(e,"click",t[6]),o=!0)},p(r,f){f&2&&ie(e,"arrowDown",r[1]),r[0]?u?(u.p(r,f),f&1&&E(u,1)):(u=Xt(r),u.c(),E(u,1),u.m(n.parentNode,n)):u&&(pe(),I(u,1,1,()=>{u=null}),ke())},i(r){i||(E(u),i=!0)},o(r){I(u),i=!1},d(r){r&&D(e),r&&D(l),u&&u.d(r),r&&D(n),o=!1,s()}}}function Xt(t){let e,l,n=t[5],i=[];for(let s=0;sI(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;sl(2,i=b));let{tree:o}=e;const{name:s,id:u,children:r}=o;let f=$t[u]||!0;const d=()=>{l(0,f=$t[u]=!f)};function g(){i.folder=this.value,_e.set(i)}const w=b=>{b.target.checked?Ke(_e,i.folder=u,i):Ke(_e,i.folder=null,i)};return t.$$set=b=>{"tree"in b&&l(7,o=b.tree)},t.$$.update=()=>{t.$$.dirty&1&&l(1,n=f)},[f,n,i,s,u,r,d,o,g,w]}class hl extends be{constructor(e){super(),ge(this,e,bi,gi,me,{tree:7})}}function el(t,e,l){const n=t.slice();return n[5]=e[l],n[6]=e,n[7]=l,n}function tl(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h,v,S,M,N,O,Q,q,R,F,V,G,A,B,Y,J,$,K;function ee(){t[2].call(u,t[6],t[7])}function P(){t[3].call(k,t[6],t[7])}function z(){t[4].call(R,t[6],t[7])}return{c(){e=m("div"),l=m("div"),n=m("div"),i=m("label"),i.textContent="Pattern",s=C(),u=m("input"),f=C(),d=m("div"),g=m("label"),g.textContent="Match detection",b=C(),k=m("select"),p=m("option"),p.textContent="Starts with (default)",h=m("option"),h.textContent="Regex",v=m("option"),v.textContent="Origin",S=m("option"),S.textContent="Domain",O=C(),Q=m("div"),q=m("div"),R=m("input"),G=C(),A=m("label"),A.textContent="Save offline",B=C(),Y=m("hr"),J=C(),c(i,"for",o="pattern"+t[7]),c(u,"type","text"),c(u,"id",r="pattern"+t[7]),u.readOnly=!0,u.disabled=!0,c(n,"class","col"),ne(n,"flex-grow","3"),c(g,"for",w="matchDetection"+t[7]),p.__value="starts_with",p.value=p.__value,h.__value="regex",h.value=h.__value,v.__value="origin",v.value=v.__value,S.__value="domain",S.value=S.__value,c(k,"id",M="matchDetection"+t[7]),c(k,"name",N="matchDetection"+t[7]),t[5].matchDetection===void 0&&tt(P),c(d,"class","col"),c(l,"class","row w-100"),c(R,"type","checkbox"),c(R,"id",F="saveOffline"+t[7]),c(R,"name",V="saveOffline"+t[7]),c(A,"for","'saveOffline' + i"),c(q,"class","row"),c(Q,"class","row"),c(e,"class","url-action m-b-2 svelte-19q94so")},m(le,x){L(le,e,x),a(e,l),a(l,n),a(n,i),a(n,s),a(n,u),he(u,t[5].pattern),a(l,f),a(l,d),a(d,g),a(d,b),a(d,k),a(k,p),a(k,h),a(k,v),a(k,S),yt(k,t[5].matchDetection),a(e,O),a(e,Q),a(Q,q),a(q,R),he(R,t[5].shouldSaveOffline),a(q,G),a(q,A),a(e,B),a(e,Y),a(e,J),$||(K=[U(u,"input",ee),U(k,"change",P),U(R,"change",z)],$=!0)},p(le,x){t=le,x&1&&u.value!==t[5].pattern&&he(u,t[5].pattern),x&1&&yt(k,t[5].matchDetection),x&1&&he(R,t[5].shouldSaveOffline)},d(le){le&&D(e),$=!1,fe(K)}}}function pi(t){let e,l,n,i,o,s,u,r,f,d,g,w,b,k,p,h=t[0].urlActions,v=[];for(let S=0;SSettings",n=C(),i=m("div"),o=m("div"),s=m("h3"),s.textContent="Save pages offline",u=C(),r=m("input"),f=C(),d=m("h3"),d.textContent="URL Actions",g=C(),w=m("hr"),b=C();for(let S=0;S{l(0,n=await we("/config"))});function i(){n.shouldSaveOffline=this.checked,l(0,n)}function o(r,f){r[f].pattern=this.value,l(0,n)}function s(r,f){r[f].matchDetection=ln(this),l(0,n)}function u(r,f){r[f].shouldSaveOffline=this.value,l(0,n)}return[n,i,o,s,u]}class vi extends be{constructor(e){super(),ge(this,e,ki,pi,me,{})}}function ll(t,e,l){const n=t.slice();return n[2]=e[l],n}function wi(t){return{c:j,m:j,p:j,i:j,o:j,d:j}}function yi(t){let e,l,n=t[1],i=[];for(let s=0;sI(i[s],1,1,()=>{i[s]=null});return{c(){for(let s=0;sf,G.anchor=null,L(A,k,B),L(A,p,B),ce(h,p,null),L(A,v,B),L(A,S,B),ce(M,S,null),L(A,N,B),ce(O,A,B),L(A,Q,B),ce(q,A,B),R=!0,F||(V=U(o,"click",t[0]),F=!0)},p(A,[B]){t=A,ut(G,t,B)},i(A){R||(E(G.block),E(h.$$.fragment,A),E(M.$$.fragment,A),E(O.$$.fragment,A),E(q.$$.fragment,A),R=!0)},o(A){for(let B=0;B<3;B+=1){const Y=G.blocks[B];I(Y)}I(h.$$.fragment,A),I(M.$$.fragment,A),I(O.$$.fragment,A),I(q.$$.fragment,A),R=!1},d(A){A&&D(e),A&&D(r),A&&D(f),G.block.d(),G.token=null,G=null,A&&D(k),A&&D(p),ae(h),A&&D(v),A&&D(S),ae(M),A&&D(N),ae(O,A),A&&D(Q),ae(q,A),F=!1,V()}}}function Ci(t){return[()=>{document.getElementById("add-bookmark-modal").showModal()}]}class Oi extends be{constructor(e){super(),ge(this,e,Ci,Ai,me,{})}}new Oi({target:document.body}); diff --git a/api/frontend-dist/favicon.ico b/api/frontend-dist/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d75d248ef0b15096a95054643a4d97f5d9b60846 GIT binary patch literal 1150 zcmaKqSxA*Z7>4KMS_;~x;8i!JU{-`tpyx!I(n2NFMU)w2L{WiMS3#Lcp@vrpA*5Yp zSy6|`AkYfDD(e{`n8yX0pLf20X1@3RmKkGw`Vte3=0)aUq%ldx zm^49K+Hw0b#^`KboP)QXJOwbuVUFxlAs{RfqJ+twGylWfOp{Hc$s#253LlN1nsFVc zKa>40?h5(7PTC6ltDx)(Y&Ze2xggCq(kK? zTA`;gAfKD!+uFjpxc_A3+Ma(L28W=z4Gvs@r*ECk`;c45=S#;=oA|abt`f&j5&uJO z3Dn+&^gZ%h4JidsaTR{{!_Y8PUx(-%PosPy2gi@qIvBMMYz;e3L1{f~mrd9RdB>pZ zD}4R|sk_C`;=cT&r)c=8u>7h9)u32*SbL`xiq3(pq5C^5-sSOw;<|fv@nfXfl&U`2 z81K5ExDp;bf#DISW%IY%k&2-noShOoz-;kb(u?5RFX-ro?87j3GZdCXrFc8bTx}jd zz_n@djWnxc*TbbCjEq80FPyG}1zQwvjq7R6ZSWuQ@_#A*LN5n<3$BI?X}q%iD!B-s zdSFcNp!EgpJr6CAK?klug4>=)Tv z+F#{yt>6EK)3NU=L&y_W3UNaC?Tg=6YE0)^V;(0Mb0$WJ7>7@Lg0~+3x9d)!Pd + + + + + + Rengoku + + + + + + + + diff --git a/api/go.mod b/api/go.mod index 49c9129..50a6b2e 100644 --- a/api/go.mod +++ b/api/go.mod @@ -27,8 +27,6 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kennygrant/sanitize v1.2.4 // indirect - github.com/kr/pretty v0.3.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-sqlite3 v1.14.13 // indirect @@ -36,7 +34,6 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect - github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/tdewolff/parse/v2 v2.5.29 // indirect github.com/ugorji/go/codec v1.2.7 // indirect diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 77ba767..631732d 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -11,6 +11,6 @@ export default defineConfig({ }, }, build: { - outDir: "../api/dist" + outDir: "../api/frontend-dist" } });