From 4f51cd8d9dee4fe57bf060ae66b9dd180e2625d3 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 14 Jan 2021 00:24:24 +0700 Subject: all: rewrite the web user interface and the APIs --- Makefile | 2 +- README.adoc | 25 +- _doc/rescached.cfg.5.gz | Bin 2636 -> 2643 bytes _doc/rescached.cfg.adoc | 8 +- _www/environment/index.html | 327 ++ _www/favicon.png | Bin 0 -> 12685 bytes _www/hosts.d/index.html | 258 ++ _www/hosts_blocks/index.html | 133 + _www/index.css | 139 + _www/index.html | 131 + _www/index.js | 28 + _www/package-lock.json | 627 --- _www/package.json | 22 - _www/public/build/bundle.css | 13 - _www/public/build/bundle.css.map | 32 - _www/public/build/bundle.js | 8001 -------------------------------------- _www/public/build/bundle.js.map | 1 - _www/public/favicon.png | Bin 12685 -> 0 bytes _www/public/global.css | 79 - _www/public/index.html | 17 - _www/rescached.js | 289 ++ _www/rollup.config.js | 71 - _www/src/App.svelte | 116 - _www/src/Dashboard.svelte | 136 - _www/src/Environment.svelte | 286 -- _www/src/HostsBlock.svelte | 112 - _www/src/HostsDir.svelte | 250 -- _www/src/MasterDir.svelte | 532 --- _www/src/common.js | 29 - _www/src/environment.js | 19 - _www/src/main.js | 7 - _www/zone.d/index.html | 513 +++ environment.go | 4 +- go.mod | 4 +- go.sum | 4 +- httpd.go | 415 +- internal/generate_memfs.go | 2 +- rescached.1.gz | Bin 5613 -> 5619 bytes rescached.go | 17 +- 39 files changed, 2091 insertions(+), 10558 deletions(-) create mode 100644 _www/environment/index.html create mode 100644 _www/favicon.png create mode 100644 _www/hosts.d/index.html create mode 100644 _www/hosts_blocks/index.html create mode 100644 _www/index.css create mode 100644 _www/index.html create mode 100644 _www/index.js delete mode 100644 _www/package-lock.json delete mode 100644 _www/package.json delete mode 100644 _www/public/build/bundle.css delete mode 100644 _www/public/build/bundle.css.map delete mode 100644 _www/public/build/bundle.js delete mode 100644 _www/public/build/bundle.js.map delete mode 100644 _www/public/favicon.png delete mode 100644 _www/public/global.css delete mode 100644 _www/public/index.html create mode 100644 _www/rescached.js delete mode 100644 _www/rollup.config.js delete mode 100644 _www/src/App.svelte delete mode 100644 _www/src/Dashboard.svelte delete mode 100644 _www/src/Environment.svelte delete mode 100644 _www/src/HostsBlock.svelte delete mode 100644 _www/src/HostsDir.svelte delete mode 100644 _www/src/MasterDir.svelte delete mode 100644 _www/src/common.js delete mode 100644 _www/src/environment.js delete mode 100644 _www/src/main.js create mode 100644 _www/zone.d/index.html diff --git a/Makefile b/Makefile index e9c2824..6b80a87 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ clean: install-common: mkdir -p $(PREFIX)/etc/rescached mkdir -p $(PREFIX)/etc/rescached/hosts.d - mkdir -p $(PREFIX)/etc/rescached/master.d + mkdir -p $(PREFIX)/etc/rescached/zone.d cp $(RESCACHED_CFG) $(PREFIX)/etc/rescached/ cp testdata/localhost.cert.pem $(PREFIX)/etc/rescached/ cp testdata/localhost.key.pem $(PREFIX)/etc/rescached/ diff --git a/README.adoc b/README.adoc index ff01fb6..f9debc7 100644 --- a/README.adoc +++ b/README.adoc @@ -1,7 +1,7 @@ RESCACHED(1) ============ -M. Shulhan -2018.09.29 +M. Shulhan +20 January 2021 :doctype: manpage :mansource: rescached :manmanual: rescached @@ -41,14 +41,15 @@ List of current features, - Enable to handle request from UDP and TCP connections - Enable to forward request using UDP or TCP -- Load and serve addresses and hostnames in +/etc/hosts+ +- Load and serve addresses and host names in +/etc/hosts+ - Load and serve hosts formatted files inside directory +/etc/rescached/hosts.d/+ - Blocking ads and/or malicious websites through host list in +/etc/rescached/hosts.d/+ -- Support loading and serving master (zone) file format from - +/etc/rescached/master.d+ +- Support loading and serving zone file format from + +/etc/rescached/zone.d+ - Integration with openresolv +- Support DNS over TLS (DoH) (RFC 7858) - Support DNS over HTTPS (DoH) (RFC 8484) @@ -56,7 +57,7 @@ List of current features, When you open a website, let say 'kilabit.info', in a browser, the first thing that browser do is to translate name address 'kilabit.info' into an internet -address (for example to 35.240.172.103) so browser can make a connection to +address (for example to 18.136.35.199) so browser can make a connection to 'kilabit.info' server. How browser do that? @@ -245,16 +246,16 @@ invoking, All rescached configuration located in file +/etc/rescached/rescached.cfg+. See manual page of *rescached.cfg*(5) for more information. -=== MASTER FILE +=== ZONE FILE -Rescached support loading master file format. +Rescached support loading zone file format. Unlike hosts file format, where each domain name is only mapped to type A -(IPv4 address), in master file, one can define other type that known to +(IPv4 address), in zone file, one can define other type that known to rescached. -All files defined +dir.master+ configuration are considered as master file and +All files defined +zone.d+ configuration are considered as zone file and will be loaded by rescached only if the configuration is not empty. -Example of master file, +Example of zone file, ---- $ORIGIN my-site.vm. @@ -294,7 +295,7 @@ The third RR define a mapping for another relative subdomain The last RR define a mapping for absolute domain "my-site.com." to IP address "10.8.0.1". -For more information about format of master file see RFC 1035 section 5. +For more information about format of zone file see RFC 1035 section 5. === INTEGRATION WITH OPENRESOLV diff --git a/_doc/rescached.cfg.5.gz b/_doc/rescached.cfg.5.gz index d40a07c..da08b6e 100644 Binary files a/_doc/rescached.cfg.5.gz and b/_doc/rescached.cfg.5.gz differ diff --git a/_doc/rescached.cfg.adoc b/_doc/rescached.cfg.adoc index 5f24a06..f8739d3 100644 --- a/_doc/rescached.cfg.adoc +++ b/_doc/rescached.cfg.adoc @@ -200,16 +200,16 @@ Its value must be negative and greater or equal than -1 hour (-3600 seconds). == FILES -[[dir.hosts]] +[[hosts.d]] === /etc/rescached/hosts.d Path to hosts directory where rescached will load all hosts formatted files. -[[dir.master]] -=== /etc/rescached/master.d +[[zone.d]] +=== /etc/rescached/zone.d -Path to master directory where rescached will load all master files. +Path to zone directory where rescached will load all zone files. == EXAMPLE diff --git a/_www/environment/index.html b/_www/environment/index.html new file mode 100644 index 0000000..bca0535 --- /dev/null +++ b/_www/environment/index.html @@ -0,0 +1,327 @@ + + + + + + + + rescached | Environment + + + + + + +
+ +
+

+ This page allow you to change the rescached environment. Upon save, the rescached service + will be restarted. +

+ +

rescached

+ +
+ + + ? + +
+ +
+ + + ? + +
+ +

DNS server

+ +
+ + ? + +
+ +
+ +
+ + + ? + +
+ +
+ + + ? + +
+ +
+ + + ? + +
+ +
+ + + ? + +
+ +
+ + + ? + +
+ +
+ +
+ + Yes +
+ ? + +
+ +
+ +
+ + Yes +
+ ? + +
+ +
+ + + ? + +
+ +
+ + + ? + +
+ +
+
+ +
+
+
+ + + + + + diff --git a/_www/favicon.png b/_www/favicon.png new file mode 100644 index 0000000..0a3c077 Binary files /dev/null and b/_www/favicon.png differ diff --git a/_www/hosts.d/index.html b/_www/hosts.d/index.html new file mode 100644 index 0000000..40d63eb --- /dev/null +++ b/_www/hosts.d/index.html @@ -0,0 +1,258 @@ + + + + + + + + rescached | hosts.d + + + + + + +
+ +
+ + +
+

Select one of the hosts file to manage.

+
+
+ + + + + + diff --git a/_www/hosts_blocks/index.html b/_www/hosts_blocks/index.html new file mode 100644 index 0000000..10c3d99 --- /dev/null +++ b/_www/hosts_blocks/index.html @@ -0,0 +1,133 @@ + + + + + + + + rescached | hosts blocks + + + + + + +
+ +

Configure the source of blocked hosts file.

+ +
+
+ Enabled + Name +
+
+
+ +
+ +
+ + + + + + diff --git a/_www/index.css b/_www/index.css new file mode 100644 index 0000000..34dd919 --- /dev/null +++ b/_www/index.css @@ -0,0 +1,139 @@ +html, +body { + position: relative; + width: 100%; + height: 100%; +} + +body { + background-color: floralwhite; + color: #333; + margin: 0; + padding: 8px; + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; +} + +a { + color: rgb(0, 100, 200); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:visited { + color: rgb(0, 80, 160); +} + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + padding: 0.4em; + margin: 0.5em 0; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 2px; +} + +input:disabled { + color: #ccc; +} + +input[type="range"] { + height: 0; +} + +button { + color: #333; + background-color: lavender; + outline: none; +} + +button:disabled { + color: #999; +} + +button:not(:disabled):active { + background-color: #ddd; +} + +button:focus { + border-color: #666; +} + +h1, +h2 { + color: #ff3e00; + text-transform: uppercase; + font-weight: 100; +} + +body { + margin: 0 auto; + width: 800px; + padding: 1em; +} + +#notif { + position: fixed; + top: 1em; + width: 70%; +} +#notif > .error { + background-color: salmon; + padding: 1em; +} +#notif > .info { + background-color: lightblue; + padding: 1em; +} + +nav.menu { + color: #ff3e00; + text-transform: uppercase; + font-weight: 100; + margin-bottom: 2em; +} +.active { + padding-bottom: 4px; + border-bottom: 4px solid #ff3e00; +} + +.input > label { + width: 8em; + display: inline-block; +} +.input > input, +.input > select { + width: calc(100% - 11em); + display: inline-block; +} +.input > .input-info-toggler { + border-radius: 50%; + border: 1px solid grey; + cursor: pointer; + display: inline-block; + font-size: 12px; + height: 14px; + line-height: 14px; + padding: 2px; + text-align: center; + width: 14px; +} +.input > .input-info { + background-color: #eee; + margin: 8px 0px; + padding: 1em; +} + +@media (max-width: 900px) { + body { + width: calc(100% - 2em); + } +} diff --git a/_www/index.html b/_www/index.html new file mode 100644 index 0000000..3403751 --- /dev/null +++ b/_www/index.html @@ -0,0 +1,131 @@ + + + + + + + + rescached + + + + + + +
+
+ + + + + + diff --git a/_www/index.js b/_www/index.js new file mode 100644 index 0000000..2f4ed6e --- /dev/null +++ b/_www/index.js @@ -0,0 +1,28 @@ +function notifError(msg) { + displayNotif("error", msg) +} + +function notifInfo(msg) { + displayNotif("info", msg) +} + +function displayNotif(className, msg) { + let notif = document.getElementById("notif") + let el = document.createElement("div") + el.classList.add(className) + el.innerHTML = msg + notif.appendChild(el) + + setTimeout(function () { + notif.removeChild(notif.children[0]) + }, 5000) +} + +function toggleInfo(id) { + let el = document.getElementById(id) + if (el.style.display === "none") { + el.style.display = "block" + } else { + el.style.display = "none" + } +} diff --git a/_www/package-lock.json b/_www/package-lock.json deleted file mode 100644 index 7078c4e..0000000 --- a/_www/package-lock.json +++ /dev/null @@ -1,627 +0,0 @@ -{ - "name": "rescached-wui", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@polka/url": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-0.5.0.tgz", - "integrity": "sha512-oZLYFEAzUKyi3SKnXvj32ZCEGH6RDnao7COuCVhDydMS9NrCSVXhM79VaKyP5+Zc33m0QXEd2DN3UkU7OsHcfw==" - }, - "@rollup/plugin-commonjs": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz", - "integrity": "sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.0", - "estree-walker": "^1.0.1", - "is-reference": "^1.1.2", - "magic-string": "^0.25.2", - "resolve": "^1.11.0" - } - }, - "@rollup/plugin-node-resolve": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", - "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.8", - "@types/resolve": "0.0.8", - "builtin-modules": "^3.1.0", - "is-module": "^1.0.0", - "resolve": "^1.14.2" - } - }, - "@rollup/pluginutils": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz", - "integrity": "sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - } - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/node": { - "version": "13.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", - "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==", - "dev": true - }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "acorn": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", - "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "builtin-modules": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", - "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chokidar": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", - "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "console-clear": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/console-clear/-/console-clear-1.1.1.tgz", - "integrity": "sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-reference": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", - "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", - "dev": true, - "requires": { - "@types/estree": "0.0.39" - } - }, - "jest-worker": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", - "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==" - }, - "livereload": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.1.tgz", - "integrity": "sha512-9g7sua11kkyZNo2hLRCG3LuZZwqexoyEyecSlV8cAsfAVVCZqLzVir6XDqmH0r+Vzgnd5LrdHDMyjtFnJQLAYw==", - "dev": true, - "requires": { - "chokidar": "^3.3.0", - "livereload-js": "^3.1.0", - "opts": ">= 1.2.0", - "ws": "^6.2.1" - } - }, - "livereload-js": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.2.2.tgz", - "integrity": "sha512-xhScbNeC687ZINjEf/bD+BMiPx4s4q0mehcLb3zCc8+mykOtmaBR4vqzyIV9rIGdG9JjHaT0LiFdscvivCjX1Q==", - "dev": true - }, - "local-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/local-access/-/local-access-1.0.1.tgz", - "integrity": "sha512-ykt2pgN0aqIy6KQC1CqdWTWkmUwNgaOS6dcpHVjyBJONA+Xi7AtSB1vuxC/U/0tjIP3wcRudwQk1YYzUvzk2bA==" - }, - "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.4" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "mime": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz", - "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==" - }, - "mri": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", - "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==" - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "opts": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/opts/-/opts-1.2.7.tgz", - "integrity": "sha512-hwZhzGGG/GQ7igxAVFOEun2N4fWul31qE9nfBdCnZGQCB5+L7tN9xZ+94B4aUpLOJx/of3zZs5XsuubayQYQjA==", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "require-relative": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", - "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "rollup": { - "version": "1.32.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz", - "integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/node": "*", - "acorn": "^7.1.0" - } - }, - "rollup-plugin-livereload": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-livereload/-/rollup-plugin-livereload-1.3.0.tgz", - "integrity": "sha512-abyqXaB21+nFHo+vJULBqfzNx6zXABC19UyvqgDfdoxR/8pFAd041GO+GIUe8ZYC2DbuMUmioh1Lvbk14YLZgw==", - "dev": true, - "requires": { - "livereload": "^0.9.1" - } - }, - "rollup-plugin-svelte": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.2.3.tgz", - "integrity": "sha512-513vOht9A93OV7fvmpIq8mD1JFgTZ5LidmpULKM2Od9P1l8oI5KwvO32fwCnASuVJS1EkRfvCnS7vKQ8DF4srg==", - "dev": true, - "requires": { - "require-relative": "^0.8.7", - "rollup-pluginutils": "^2.8.2", - "sourcemap-codec": "^1.4.8" - } - }, - "rollup-plugin-terser": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.1.tgz", - "integrity": "sha512-HL0dgzSxBYG/Ly9i/E5Sc+PuKKZ0zBzk11VmLCfdUtpqH4yYqkLclPkTqRy85FU9246yetImOClaQ/ufnj08vg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - } - }, - "rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - }, - "dependencies": { - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - } - } - }, - "sade": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.3.tgz", - "integrity": "sha512-m4BctppMvJ60W1dXnHq7jMmFe3hPJZDAH85kQ3ACTo7XZNVUuTItCQ+2HfyaMeV5cKrbw7l4vD/6We3GBxvdJw==", - "requires": { - "mri": "^1.1.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "sirv": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-0.4.6.tgz", - "integrity": "sha512-rYpOXlNbpHiY4nVXxuDf4mXPvKz1reZGap/LkWp9TvcZ84qD/nPBjjH/6GZsgIjVMbOslnY8YYULAyP8jMn1GQ==", - "requires": { - "@polka/url": "^0.5.0", - "mime": "^2.3.1" - } - }, - "sirv-cli": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.6.tgz", - "integrity": "sha512-/Vj85/kBvPL+n9ibgX6FicLE8VjidC1BhlX67PYPBfbBAphzR6i0k0HtU5c2arejfU3uzq8l3SYPCwl1x7z6Ww==", - "requires": { - "console-clear": "^1.1.0", - "get-port": "^3.2.0", - "kleur": "^3.0.0", - "local-access": "^1.0.1", - "sade": "^1.4.0", - "sirv": "^0.4.6", - "tinydate": "^1.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "svelte": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.24.1.tgz", - "integrity": "sha512-OX/IBVUJSFo1rnznXdwf9rv6LReJ3qQ0PwRjj76vfUWyTfbHbR9OXqJBnUrpjyis2dwYcbT2Zm1DFjOOF1ZbbQ==", - "dev": true - }, - "terser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.0.tgz", - "integrity": "sha512-XTT3D3AwxC54KywJijmY2mxZ8nJiEjBHVYzq8l9OaYuRFWeQNBwvipuzzYEP4e+/AVcd1hqG/CqgsdIRyT45Fg==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - } - }, - "tinydate": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.2.0.tgz", - "integrity": "sha512-3GwPk8VhDFnUZ2TrgkhXJs6hcMAIIw4x/xkz+ayK6dGoQmp2nUwKzBXK0WnMsqkh6vfUhpqQicQF3rbshfyJkg==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, - "wui.svelte": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/wui.svelte/-/wui.svelte-0.2.2.tgz", - "integrity": "sha512-lz6ZTUo/sxnjOTrn71pV9XlDdPrX1oIPFrL5iAfvKDjQVMUTsNUr9CeDcW0asT+uWS3SRPw34Zwb4p0YBJuYPQ==" - } - } -} diff --git a/_www/package.json b/_www/package.json deleted file mode 100644 index 6d942c9..0000000 --- a/_www/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "rescached-wui", - "version": "1.0.0", - "scripts": { - "build": "rollup -c", - "dev": "rollup -c -w", - "start": "sirv public" - }, - "devDependencies": { - "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-node-resolve": "^7.0.0", - "rollup": "^1.20.0", - "rollup-plugin-livereload": "^1.0.0", - "rollup-plugin-svelte": "^5.2.3", - "rollup-plugin-terser": "^7.0.1", - "svelte": "^3.24.1" - }, - "dependencies": { - "sirv-cli": "^0.4.6", - "wui.svelte": "^0.2.2" - } -} diff --git a/_www/public/build/bundle.css b/_www/public/build/bundle.css deleted file mode 100644 index 50afc4e..0000000 --- a/_www/public/build/bundle.css +++ /dev/null @@ -1,13 +0,0 @@ -.wui-input-ipport.svelte-sy39ke.svelte-sy39ke{display:inline-block;width:100%}.wui-input-ipport.svelte-sy39ke input.svelte-sy39ke{width:100%}.invalid.svelte-sy39ke.svelte-sy39ke{color:red}div.invalid.svelte-sy39ke.svelte-sy39ke{font-size:12px} -.wui-input-number.svelte-1qrd8wr.svelte-1qrd8wr{width:100%}.wui-input-number.svelte-1qrd8wr input.svelte-1qrd8wr{display:inline-block;width:70%}.wui-input-number.svelte-1qrd8wr .suffix.svelte-1qrd8wr{width:30%} -.label-hint.svelte-1weevo5{display:inline-flex;margin-top:1em;width:100%}.title.svelte-1weevo5{margin-bottom:4px}.title.svelte-1weevo5{display:inline-block}.toggle.svelte-1weevo5{border-radius:50%;border:1px solid grey;cursor:pointer;display:inline-block;font-size:12px;height:14px;line-height:14px;padding:2px;text-align:center;width:14px}.info.svelte-1weevo5{background-color:#eee;margin:8px 0px;padding:1em}@media(max-width: 720px){.label-hint.svelte-1weevo5{display:block}} -.wui-notif.svelte-xdooa2{position:fixed;top:5px;left:calc((100% - 400px)/2);width:400px}@media(max-width: 500px){.wui-notif.svelte-xdooa2{left:1em;width:calc(100% - 2em)}} -.wui-notif-item.svelte-1n99njq{background-color:white;border:1px solid black;box-shadow:3px 3px;padding:1em;margin-bottom:1em;z-index:1000}.wui-notif-item.error.svelte-1n99njq{border:1px solid red;box-shadow:3px 3px red} -div.main.svelte-jyzzth{margin:0 auto;width:800px;padding:0px 1em}nav.menu.svelte-jyzzth{color:#ff3e00;text-transform:uppercase;font-weight:100;margin-bottom:2em}.active.svelte-jyzzth{padding-bottom:4px;border-bottom:4px solid #ff3e00}@media(max-width: 900px){div.main.svelte-jyzzth{width:calc(100% - 2em)}} -.message.svelte-1d4jf0i.svelte-1d4jf0i{padding:1em 0px;border-bottom:1px solid silver}.rr.svelte-1d4jf0i.svelte-1d4jf0i{margin-left:1em;width:100%}.rr.header.svelte-1d4jf0i.svelte-1d4jf0i{font-weight:bold}.rr.svelte-1d4jf0i span.svelte-1d4jf0i{display:inline-block}.kind.svelte-1d4jf0i.svelte-1d4jf0i{width:9em}.type.svelte-1d4jf0i.svelte-1d4jf0i{width:5em}.ttl.svelte-1d4jf0i.svelte-1d4jf0i{width:6em}.value.svelte-1d4jf0i.svelte-1d4jf0i{word-wrap:anywhere;width:calc(100% - 24em)} -input.svelte-ivqrh9.svelte-ivqrh9{width:100%}.input-deletable.svelte-ivqrh9.svelte-ivqrh9{width:100%}.input-deletable.svelte-ivqrh9>input.svelte-ivqrh9{max-width:calc(100% - 100px)}.input-deletable.svelte-ivqrh9>button.svelte-ivqrh9{width:80px}.input-checkbox.svelte-ivqrh9.svelte-ivqrh9{width:100%}.input-checkbox.svelte-ivqrh9 input[type="checkbox"].svelte-ivqrh9{width:auto}.section-bottom.svelte-ivqrh9.svelte-ivqrh9{margin:2em 0px 0px 0px;padding:1em;border-top:1px solid black} -.block_source.svelte-ze2due.svelte-ze2due{width:calc(100% - 2em);overflow:auto;font-size:12px}.block_source.svelte-ze2due input.svelte-ze2due:disabled{color:black}.item.svelte-ze2due span.svelte-ze2due{display:inline-block;margin-right:1em}.item.header.svelte-ze2due.svelte-ze2due{font-weight:bold;margin-bottom:1em;border-bottom:1px solid silver}.item.svelte-ze2due>span.svelte-ze2due:nth-child(1){width:4em}.item.svelte-ze2due>span.svelte-ze2due:nth-child(2){width:15em}.item.svelte-ze2due>span.svelte-ze2due:nth-child(3){width:23em}.item.svelte-ze2due>span:nth-child(3) input.svelte-ze2due{width:100%}.item.svelte-ze2due>span.svelte-ze2due:nth-child(4){width:16em} -.nav-left.svelte-1w15y7z.svelte-1w15y7z{padding:0px;width:280px;float:left}.nav-left.svelte-1w15y7z .item.svelte-1w15y7z{margin:4px 0px}.content.svelte-1w15y7z.svelte-1w15y7z{float:left;width:calc(100% - 300px)}.host.svelte-1w15y7z.svelte-1w15y7z{font-family:monospace;width:100%}.host.header.svelte-1w15y7z.svelte-1w15y7z{margin:1em 0px;font-weight:bold;border-bottom:1px solid silver}.host_name.svelte-1w15y7z.svelte-1w15y7z{display:inline-block;width:240px;word-wrap:break-word}.host_value.svelte-1w15y7z.svelte-1w15y7z{display:inline-block;width:140px} -h4.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{border-bottom:1px solid silver}.nav-left.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{padding:0px;width:280px;float:left}.nav-left.svelte-yu4l71.svelte-yu4l71 .item.svelte-yu4l71.svelte-yu4l71{margin:4px 0px;cursor:pointer;color:rgb(0, 100, 200)}.content.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{float:left;width:calc(100% - 300px)}.action-delete.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{margin-left:1em}.actions.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{padding:1em}.actions.svelte-yu4l71.svelte-yu4l71 button.svelte-yu4l71.svelte-yu4l71{width:100%}form.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{margin:1em 0px;padding:10px 10px 0px 10px;border:1px solid silver}form.svelte-yu4l71>label.svelte-yu4l71>span.svelte-yu4l71{width:7em;display:inline-block}form.svelte-yu4l71>label.svelte-yu4l71>input.svelte-yu4l71{width:calc(100% - 8em)}form.svelte-yu4l71>label.svelte-yu4l71>input.name.svelte-yu4l71{width:12em}.rr.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{font-family:monospace;width:100%;padding:1em 0px}.rr.header.svelte-yu4l71.svelte-yu4l71.svelte-yu4l71{font-weight:bold}.rr.svelte-yu4l71.svelte-yu4l71>.name.svelte-yu4l71.svelte-yu4l71{width:20em;display:inline-block;word-wrap:break-word}.rr.svelte-yu4l71.svelte-yu4l71>.type.svelte-yu4l71.svelte-yu4l71{width:4em;display:inline-block}.rr.svelte-yu4l71.svelte-yu4l71>.value.svelte-yu4l71.svelte-yu4l71{display:inline-block;word-wrap:break-word} - -/*# sourceMappingURL=bundle.css.map */ \ No newline at end of file diff --git a/_www/public/build/bundle.css.map b/_www/public/build/bundle.css.map deleted file mode 100644 index 59cba63..0000000 --- a/_www/public/build/bundle.css.map +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": 3, - "file": "bundle.css", - "sources": [ - "../../InputIPPort.svelte", - "../../InputNumber.svelte", - "../../LabelHint.svelte", - "../../Notif.svelte", - "../../NotifItem.svelte", - "../../App.svelte", - "../../Dashboard.svelte", - "../../Environment.svelte", - "../../HostsBlock.svelte", - "../../HostsDir.svelte", - "../../MasterDir.svelte" - ], - "sourcesContent": [ - "\n\n\n\n
\n\t\n\t{#if isInvalid}\n\t
{error}
\n\t{/if}\n
\n", - "\n\n\n\n
\n\t\n\t{#if unit !== ''}\n\t\t\n\t\t\t{unit}\n\t\t\n\t{/if}\n
\n", - "\n\n\n\n\n\n{#if showInfo}\n
\n\t{@html info}\n
\n{/if}\n", - "\n\n\n\n\n
\n\t{#each $messages as msg (msg)}\n\t\n\t{/each}\n
\n", - "\n\n\n\n
\n\t{text}\n
\n", - "\n\n\n\n\n\n
\n\t\n\n\t{#if state === stateEnvironment}\n\t\t\n\t{:else if state === stateHostsBlock}\n\t\t\n\t{:else if state === stateHostsDir}\n\t\t\n\t{:else if state === stateMasterDir}\n\t\t\n\t{:else}\n\t\t\n\t{/if}\n
\n", - "\n\n\n\n
\n\t
\n\t\tCaches:\n\t\t\n\t\t\n\t
\n\t{#each listMsg as msg (msg)}\n\t\t
\n\t\t\t
\n\t\t\t\t{msg.Question.Name}\n\n\t\t\t\t\n\t\t\t\t\tRemove from caches\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t \n\t\t\t\t Type \n\t\t\t\t TTL \n\t\t\t\t Value \n\t\t\t
\n\n\t\t\t{#if msg.Answer !== null && msg.Answer.length > 0}\n\t\t\t\t{#each msg.Answer as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Answer \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t\t{#if msg.Authority !== null && msg.Authority.length > 0}\n\t\t\t\t{#each msg.Authority as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Authority \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t\t{#if msg.Additional !== null && msg.Additional.length > 0}\n\t\t\t\t{#each msg.Additional as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Additional \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t
\n\t{/each}\n
\n", - "\n\n\n\n
\n

\nThis page allow you to change the rescached environment.\nUpon save, the rescached service will be restarted.\n

\n\n

rescached

\n
\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n
\n\n

DNS server

\n
\n\t\n\t\n\n\t{#each env.NameServers as ns}\n\t
\n\t\t\n\t\t\n\t
\n\t{/each}\n\n\t\n\t\tAdd\n\t\n\n\t\nIf you want rescached to serve a query from another host in your local\nnetwork, change this value to 0.0.0.0:53.\"\n\t>\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\tYes\n\t\t\t\n\t\t
\n\t\n\n\t\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\tYes\n\t\t\t\n\t\t
\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n
\n\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n", - "\n\n\n\n
\n\t

\n\tConfigure the source of blocked hosts file.\n\t

\n\n\t
\n\t\t
\n\t\t\t Enabled \n\t\t\t Name \n\t\t\t URL \n\t\t\t Last updated \n\t\t
\n\t\t{#each env.HostsBlocks as hostsBlock}\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{hostsBlock.Name}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{hostsBlock.LastUpdated}\n\t\t\t\n\t\t
\n\t\t{/each}\n\t
\n\n\t
\n\t\t\n\t
\n
\n", - "\n\n\n\n
\n\t
\n\t\t{#each Object.entries(env.HostsFiles) as [name,hf], name }\n\t\t\n\t\t{/each}\n\n\t\t
\n\n\t\t\n\t\t\n\t
\n\n\t
\n\t\t{#if hostsFile.Name === \"\"}\n\t\t\t
\n\t\t\t\tSelect one of the hosts file to manage.\n\t\t\t
\n\t\t{:else}\n\t\t\t

\n\t\t\t\t{hostsFile.Name} ({hostsFile.Records.length} records)\n\t\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\n\t\t\t{#if newRecord !== null}\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t{/if}\n\n\t\t\t
\n\t\t\t\t Domain name \n\t\t\t\t IP address \n\t\t\t
\n\n\t\t\t{#each hostsFile.Records as rr, idx (idx)}\n\t\t\t\t
\n\t\t\t\t\t {rr.Name} \n\t\t\t\t\t {rr.Value} \n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t{/each}\n\t\t{/if}\n\t
\n
\n", - "\n\n\n\n
\n\t
\n\t\t{#each Object.entries(env.ZoneFiles) as [name, zoneFile]}\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{zoneFile.Name}\n\t\t\t\t\n\t\t\t
\n\t\t{/each}\n\t\t
\n\n\t\t\n\t\t\n\t
\n\n\t
\n\t\t{#if activeZone.Name === \"\"}\n\t\t\t

\n\t\t\t\tSelect one of the zone file to manage.\n\t\t\t

\n\t\t{:else}\n\t\t\t

\n\t\t\t\t{activeZone.Name}\n\t\t\t\t\n\t\t\t\t\tDelete\n\t\t\t\t\n\t\t\t

\n\n\t\t\t

\n\t\t\t\tSOA record\n\t\t\t\t\n\t\t\t\t\tDelete\n\t\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t

List records

\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\tName\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tType\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tValue\n\t\t\t\t\n\t\t\t
\n\n\t\t\t{#each Object.entries(activeZone.Records) as [dname, listRR]}\n\t\t\t\t{#each listRR as rr, idx}\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{rr.Name}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{getTypeName(rr.Type)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{rr.Value}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/each}\n\n\t\t\t
\n\t\t\t\t\n\n\t\t\t\t{#if _rr.Type === 1 || _rr.Type === 2 || _rr.Type === 5 ||\n\t\t\t\t\t_rr.Type === 16 || _rr.Type === 28\n\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t{:else if _rr.Type === 12} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t{:else if _rr.Type === 15} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t{/if}\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t{/if}\n\t
\n
\n" - ], - "names": [], - "mappings": "AA8BC,iBAAiB,4BAAC,CAAC,AAClB,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,IAAI,AACZ,CAAC,AACD,+BAAiB,CAAC,KAAK,cAAC,CAAC,AACxB,KAAK,CAAE,IAAI,AACZ,CAAC,AACD,QAAQ,4BAAC,CAAC,AACT,KAAK,CAAE,GAAG,AACX,CAAC,AACD,GAAG,QAAQ,4BAAC,CAAC,AACZ,SAAS,CAAE,IAAI,AAChB,CAAC;ACvBD,iBAAiB,8BAAC,CAAC,AAClB,KAAK,CAAE,IAAI,AACZ,CAAC,AACD,gCAAiB,CAAC,KAAK,eAAC,CAAC,AACxB,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,GAAG,AACX,CAAC,AACD,gCAAiB,CAAC,OAAO,eAAC,CAAC,AAC1B,KAAK,CAAE,GAAG,AACX,CAAC;ACpBD,WAAW,eAAC,CAAC,AACZ,OAAO,CAAE,WAAW,CACpB,UAAU,CAAE,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,GAAG,CAAC,GAAG,AACjB,CAAC,AACD,GAAG,OAAO,0CAAC,CAAC,AACX,WAAW,CAAE,IAAI,AAClB,CAAC,AACD,+BAAG,CAAG,KAAK,4BAAC,CAAC,AACZ,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,YAAY,CACrB,SAAS,CAAE,UAAU,AACtB,CAAC,AACD,+BAAG,CAAG,KAAK,4BAAC,CAAC,AACZ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,YAAY,AACtB,CAAC,AAKD,+BAAG,CAAG,MAAM,4BAAC,CAAC,AACb,OAAO,CAAE,YAAY,CACrB,SAAS,CAAE,UAAU,AACtB,CAAC" -} \ No newline at end of file diff --git a/_www/public/build/bundle.js b/_www/public/build/bundle.js deleted file mode 100644 index 7e3c5f6..0000000 --- a/_www/public/build/bundle.js +++ /dev/null @@ -1,8001 +0,0 @@ - -(function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(window.document); -var app = (function () { - 'use strict'; - - function noop() { } - const identity = x => x; - function assign(tar, src) { - // @ts-ignore - for (const k in src) - tar[k] = src[k]; - return tar; - } - function add_location(element, file, line, column, char) { - element.__svelte_meta = { - loc: { file, line, column, char } - }; - } - function run(fn) { - return fn(); - } - function blank_object() { - return Object.create(null); - } - function run_all(fns) { - fns.forEach(run); - } - function is_function(thing) { - return typeof thing === 'function'; - } - function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); - } - function is_empty(obj) { - return Object.keys(obj).length === 0; - } - function validate_store(store, name) { - if (store != null && typeof store.subscribe !== 'function') { - throw new Error(`'${name}' is not a store with a 'subscribe' method`); - } - } - function subscribe(store, ...callbacks) { - if (store == null) { - return noop; - } - const unsub = store.subscribe(...callbacks); - return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub; - } - function component_subscribe(component, store, callback) { - component.$$.on_destroy.push(subscribe(store, callback)); - } - function create_slot(definition, ctx, $$scope, fn) { - if (definition) { - const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); - return definition[0](slot_ctx); - } - } - function get_slot_context(definition, ctx, $$scope, fn) { - return definition[1] && fn - ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) - : $$scope.ctx; - } - function get_slot_changes(definition, $$scope, dirty, fn) { - if (definition[2] && fn) { - const lets = definition[2](fn(dirty)); - if ($$scope.dirty === undefined) { - return lets; - } - if (typeof lets === 'object') { - const merged = []; - const len = Math.max($$scope.dirty.length, lets.length); - for (let i = 0; i < len; i += 1) { - merged[i] = $$scope.dirty[i] | lets[i]; - } - return merged; - } - return $$scope.dirty | lets; - } - return $$scope.dirty; - } - function update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) { - const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn); - if (slot_changes) { - const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); - slot.p(slot_context, slot_changes); - } - } - - const is_client = typeof window !== 'undefined'; - let now = is_client - ? () => window.performance.now() - : () => Date.now(); - let raf = is_client ? cb => requestAnimationFrame(cb) : noop; - - const tasks = new Set(); - function run_tasks(now) { - tasks.forEach(task => { - if (!task.c(now)) { - tasks.delete(task); - task.f(); - } - }); - if (tasks.size !== 0) - raf(run_tasks); - } - /** - * Creates a new task that runs on each raf frame - * until it returns a falsy value or is aborted - */ - function loop(callback) { - let task; - if (tasks.size === 0) - raf(run_tasks); - return { - promise: new Promise(fulfill => { - tasks.add(task = { c: callback, f: fulfill }); - }), - abort() { - tasks.delete(task); - } - }; - } - - function append(target, node) { - target.appendChild(node); - } - function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); - } - function detach(node) { - node.parentNode.removeChild(node); - } - function destroy_each(iterations, detaching) { - for (let i = 0; i < iterations.length; i += 1) { - if (iterations[i]) - iterations[i].d(detaching); - } - } - function element(name) { - return document.createElement(name); - } - function text(data) { - return document.createTextNode(data); - } - function space() { - return text(' '); - } - function empty() { - return text(''); - } - function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); - } - function prevent_default(fn) { - return function (event) { - event.preventDefault(); - // @ts-ignore - return fn.call(this, event); - }; - } - function attr(node, attribute, value) { - if (value == null) - node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) - node.setAttribute(attribute, value); - } - function to_number(value) { - return value === '' ? undefined : +value; - } - function children(element) { - return Array.from(element.childNodes); - } - function set_input_value(input, value) { - input.value = value == null ? '' : value; - } - function set_style(node, key, value, important) { - node.style.setProperty(key, value, important ? 'important' : ''); - } - function select_option(select, value) { - for (let i = 0; i < select.options.length; i += 1) { - const option = select.options[i]; - if (option.__value === value) { - option.selected = true; - return; - } - } - } - function select_value(select) { - const selected_option = select.querySelector(':checked') || select.options[0]; - return selected_option && selected_option.__value; - } - function toggle_class(element, name, toggle) { - element.classList[toggle ? 'add' : 'remove'](name); - } - function custom_event(type, detail) { - const e = document.createEvent('CustomEvent'); - e.initCustomEvent(type, false, false, detail); - return e; - } - - const active_docs = new Set(); - let active = 0; - // https://github.com/darkskyapp/string-hash/blob/master/index.js - function hash(str) { - let hash = 5381; - let i = str.length; - while (i--) - hash = ((hash << 5) - hash) ^ str.charCodeAt(i); - return hash >>> 0; - } - function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) { - const step = 16.666 / duration; - let keyframes = '{\n'; - for (let p = 0; p <= 1; p += step) { - const t = a + (b - a) * ease(p); - keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`; - } - const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`; - const name = `__svelte_${hash(rule)}_${uid}`; - const doc = node.ownerDocument; - active_docs.add(doc); - const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet); - const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {}); - if (!current_rules[name]) { - current_rules[name] = true; - stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); - } - const animation = node.style.animation || ''; - node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`; - active += 1; - return name; - } - function delete_rule(node, name) { - const previous = (node.style.animation || '').split(', '); - const next = previous.filter(name - ? anim => anim.indexOf(name) < 0 // remove specific animation - : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations - ); - const deleted = previous.length - next.length; - if (deleted) { - node.style.animation = next.join(', '); - active -= deleted; - if (!active) - clear_rules(); - } - } - function clear_rules() { - raf(() => { - if (active) - return; - active_docs.forEach(doc => { - const stylesheet = doc.__svelte_stylesheet; - let i = stylesheet.cssRules.length; - while (i--) - stylesheet.deleteRule(i); - doc.__svelte_rules = {}; - }); - active_docs.clear(); - }); - } - - let current_component; - function set_current_component(component) { - current_component = component; - } - function get_current_component() { - if (!current_component) - throw new Error(`Function called outside component initialization`); - return current_component; - } - function onMount(fn) { - get_current_component().$$.on_mount.push(fn); - } - function onDestroy(fn) { - get_current_component().$$.on_destroy.push(fn); - } - - const dirty_components = []; - const binding_callbacks = []; - const render_callbacks = []; - const flush_callbacks = []; - const resolved_promise = Promise.resolve(); - let update_scheduled = false; - function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } - } - function add_render_callback(fn) { - render_callbacks.push(fn); - } - function add_flush_callback(fn) { - flush_callbacks.push(fn); - } - let flushing = false; - const seen_callbacks = new Set(); - function flush() { - if (flushing) - return; - flushing = true; - do { - // first, call beforeUpdate functions - // and update components - for (let i = 0; i < dirty_components.length; i += 1) { - const component = dirty_components[i]; - set_current_component(component); - update(component.$$); - } - dirty_components.length = 0; - while (binding_callbacks.length) - binding_callbacks.pop()(); - // then, once components are updated, call - // afterUpdate functions. This may cause - // subsequent updates... - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - // ...so guard against infinite loops - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - flushing = false; - seen_callbacks.clear(); - } - function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } - } - - let promise; - function wait() { - if (!promise) { - promise = Promise.resolve(); - promise.then(() => { - promise = null; - }); - } - return promise; - } - function dispatch(node, direction, kind) { - node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`)); - } - const outroing = new Set(); - let outros; - function group_outros() { - outros = { - r: 0, - c: [], - p: outros // parent group - }; - } - function check_outros() { - if (!outros.r) { - run_all(outros.c); - } - outros = outros.p; - } - function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } - } - function transition_out(block, local, detach, callback) { - if (block && block.o) { - if (outroing.has(block)) - return; - outroing.add(block); - outros.c.push(() => { - outroing.delete(block); - if (callback) { - if (detach) - block.d(1); - callback(); - } - }); - block.o(local); - } - } - const null_transition = { duration: 0 }; - function create_bidirectional_transition(node, fn, params, intro) { - let config = fn(node, params); - let t = intro ? 0 : 1; - let running_program = null; - let pending_program = null; - let animation_name = null; - function clear_animation() { - if (animation_name) - delete_rule(node, animation_name); - } - function init(program, duration) { - const d = program.b - t; - duration *= Math.abs(d); - return { - a: t, - b: program.b, - d, - duration, - start: program.start, - end: program.start + duration, - group: program.group - }; - } - function go(b) { - const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition; - const program = { - start: now() + delay, - b - }; - if (!b) { - // @ts-ignore todo: improve typings - program.group = outros; - outros.r += 1; - } - if (running_program) { - pending_program = program; - } - else { - // if this is an intro, and there's a delay, we need to do - // an initial tick and/or apply CSS animation immediately - if (css) { - clear_animation(); - animation_name = create_rule(node, t, b, duration, delay, easing, css); - } - if (b) - tick(0, 1); - running_program = init(program, duration); - add_render_callback(() => dispatch(node, b, 'start')); - loop(now => { - if (pending_program && now > pending_program.start) { - running_program = init(pending_program, duration); - pending_program = null; - dispatch(node, running_program.b, 'start'); - if (css) { - clear_animation(); - animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css); - } - } - if (running_program) { - if (now >= running_program.end) { - tick(t = running_program.b, 1 - t); - dispatch(node, running_program.b, 'end'); - if (!pending_program) { - // we're done - if (running_program.b) { - // intro — we can tidy up immediately - clear_animation(); - } - else { - // outro — needs to be coordinated - if (!--running_program.group.r) - run_all(running_program.group.c); - } - } - running_program = null; - } - else if (now >= running_program.start) { - const p = now - running_program.start; - t = running_program.a + running_program.d * easing(p / running_program.duration); - tick(t, 1 - t); - } - } - return !!(running_program || pending_program); - }); - } - } - return { - run(b) { - if (is_function(config)) { - wait().then(() => { - // @ts-ignore - config = config(); - go(b); - }); - } - else { - go(b); - } - }, - end() { - clear_animation(); - running_program = pending_program = null; - } - }; - } - - const globals = (typeof window !== 'undefined' - ? window - : typeof globalThis !== 'undefined' - ? globalThis - : global); - - function destroy_block(block, lookup) { - block.d(1); - lookup.delete(block.key); - } - function outro_and_destroy_block(block, lookup) { - transition_out(block, 1, 1, () => { - lookup.delete(block.key); - }); - } - function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { - let o = old_blocks.length; - let n = list.length; - let i = o; - const old_indexes = {}; - while (i--) - old_indexes[old_blocks[i].key] = i; - const new_blocks = []; - const new_lookup = new Map(); - const deltas = new Map(); - i = n; - while (i--) { - const child_ctx = get_context(ctx, list, i); - const key = get_key(child_ctx); - let block = lookup.get(key); - if (!block) { - block = create_each_block(key, child_ctx); - block.c(); - } - else if (dynamic) { - block.p(child_ctx, dirty); - } - new_lookup.set(key, new_blocks[i] = block); - if (key in old_indexes) - deltas.set(key, Math.abs(i - old_indexes[key])); - } - const will_move = new Set(); - const did_move = new Set(); - function insert(block) { - transition_in(block, 1); - block.m(node, next); - lookup.set(block.key, block); - next = block.first; - n--; - } - while (o && n) { - const new_block = new_blocks[n - 1]; - const old_block = old_blocks[o - 1]; - const new_key = new_block.key; - const old_key = old_block.key; - if (new_block === old_block) { - // do nothing - next = new_block.first; - o--; - n--; - } - else if (!new_lookup.has(old_key)) { - // remove old block - destroy(old_block, lookup); - o--; - } - else if (!lookup.has(new_key) || will_move.has(new_key)) { - insert(new_block); - } - else if (did_move.has(old_key)) { - o--; - } - else if (deltas.get(new_key) > deltas.get(old_key)) { - did_move.add(new_key); - insert(new_block); - } - else { - will_move.add(old_key); - o--; - } - } - while (o--) { - const old_block = old_blocks[o]; - if (!new_lookup.has(old_block.key)) - destroy(old_block, lookup); - } - while (n) - insert(new_blocks[n - 1]); - return new_blocks; - } - function validate_each_keys(ctx, list, get_context, get_key) { - const keys = new Set(); - for (let i = 0; i < list.length; i++) { - const key = get_key(get_context(ctx, list, i)); - if (keys.has(key)) { - throw new Error(`Cannot have duplicate keys in a keyed each`); - } - keys.add(key); - } - } - - function bind(component, name, callback) { - const index = component.$$.props[name]; - if (index !== undefined) { - component.$$.bound[index] = callback; - callback(component.$$.ctx[index]); - } - } - function create_component(block) { - block && block.c(); - } - function mount_component(component, target, anchor) { - const { fragment, on_mount, on_destroy, after_update } = component.$$; - fragment && fragment.m(target, anchor); - // onMount happens before the initial afterUpdate - add_render_callback(() => { - const new_on_destroy = on_mount.map(run).filter(is_function); - if (on_destroy) { - on_destroy.push(...new_on_destroy); - } - else { - // Edge case - component was destroyed immediately, - // most likely as a result of a binding initialising - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - after_update.forEach(add_render_callback); - } - function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - // TODO null out other refs, including component.$$ (but need to - // preserve final state?) - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } - } - function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); - } - function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { - const parent_component = current_component; - set_current_component(component); - const prop_values = options.props || {}; - const $$ = component.$$ = { - fragment: null, - ctx: null, - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - before_update: [], - after_update: [], - context: new Map(parent_component ? parent_component.$$.context : []), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false - }; - let ready = false; - $$.ctx = instance - ? instance(component, prop_values, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { - if (!$$.skip_bound && $$.bound[i]) - $$.bound[i](value); - if (ready) - make_dirty(component, i); - } - return ret; - }) - : []; - $$.update(); - ready = true; - run_all($$.before_update); - // `false` as a special case of no DOM component - $$.fragment = create_fragment ? create_fragment($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - const nodes = children(options.target); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } - else { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment && $$.fragment.c(); - } - if (options.intro) - transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor); - flush(); - } - set_current_component(parent_component); - } - class SvelteComponent { - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) - callbacks.splice(index, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } - } - } - - function dispatch_dev(type, detail) { - document.dispatchEvent(custom_event(type, Object.assign({ version: '3.24.1' }, detail))); - } - function append_dev(target, node) { - dispatch_dev("SvelteDOMInsert", { target, node }); - append(target, node); - } - function insert_dev(target, node, anchor) { - dispatch_dev("SvelteDOMInsert", { target, node, anchor }); - insert(target, node, anchor); - } - function detach_dev(node) { - dispatch_dev("SvelteDOMRemove", { node }); - detach(node); - } - function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { - const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : []; - if (has_prevent_default) - modifiers.push('preventDefault'); - if (has_stop_propagation) - modifiers.push('stopPropagation'); - dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers }); - const dispose = listen(node, event, handler, options); - return () => { - dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers }); - dispose(); - }; - } - function attr_dev(node, attribute, value) { - attr(node, attribute, value); - if (value == null) - dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute }); - else - dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value }); - } - function set_data_dev(text, data) { - data = '' + data; - if (text.wholeText === data) - return; - dispatch_dev("SvelteDOMSetData", { node: text, data }); - text.data = data; - } - function validate_each_argument(arg) { - if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { - let msg = '{#each} only iterates over array-like objects.'; - if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { - msg += ' You can use a spread to convert this iterable into an array.'; - } - throw new Error(msg); - } - } - function validate_slots(name, slot, keys) { - for (const slot_key of Object.keys(slot)) { - if (!~keys.indexOf(slot_key)) { - console.warn(`<${name}> received an unexpected slot "${slot_key}".`); - } - } - } - class SvelteComponentDev extends SvelteComponent { - constructor(options) { - if (!options || (!options.target && !options.$$inline)) { - throw new Error(`'target' is a required option`); - } - super(); - } - $destroy() { - super.$destroy(); - this.$destroy = () => { - console.warn(`Component was already destroyed`); // eslint-disable-line no-console - }; - } - $capture_state() { } - $inject_state() { } - } - - /* node_modules/wui.svelte/src/components/InputIPPort.svelte generated by Svelte v3.24.1 */ - - const file = "node_modules/wui.svelte/src/components/InputIPPort.svelte"; - - // (54:1) {#if isInvalid} - function create_if_block(ctx) { - let div; - let t; - - const block = { - c: function create() { - div = element("div"); - t = text(/*error*/ ctx[2]); - attr_dev(div, "class", "invalid svelte-sy39ke"); - add_location(div, file, 54, 1, 911); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, t); - }, - p: function update(ctx, dirty) { - if (dirty & /*error*/ 4) set_data_dev(t, /*error*/ ctx[2]); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(54:1) {#if isInvalid}", - ctx - }); - - return block; - } - - function create_fragment(ctx) { - let div; - let input; - let t; - let mounted; - let dispose; - let if_block = /*isInvalid*/ ctx[1] && create_if_block(ctx); - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t = space(); - if (if_block) if_block.c(); - attr_dev(input, "type", "text"); - attr_dev(input, "placeholder", "127.0.0.1:8080"); - attr_dev(input, "class", "svelte-sy39ke"); - toggle_class(input, "invalid", /*isInvalid*/ ctx[1]); - add_location(input, file, 46, 1, 770); - attr_dev(div, "class", "wui-input-ipport svelte-sy39ke"); - add_location(div, file, 45, 0, 738); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - set_input_value(input, /*value*/ ctx[0]); - append_dev(div, t); - if (if_block) if_block.m(div, null); - - if (!mounted) { - dispose = [ - listen_dev(input, "input", /*input_input_handler*/ ctx[4]), - listen_dev(input, "blur", /*onBlur*/ ctx[3], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*value*/ 1 && input.value !== /*value*/ ctx[0]) { - set_input_value(input, /*value*/ ctx[0]); - } - - if (dirty & /*isInvalid*/ 2) { - toggle_class(input, "invalid", /*isInvalid*/ ctx[1]); - } - - if (/*isInvalid*/ ctx[1]) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block(ctx); - if_block.c(); - if_block.m(div, null); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - if (if_block) if_block.d(); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance($$self, $$props, $$invalidate) { - let { value = "" } = $$props; - let isInvalid = false; - let error = ""; - - function onBlur() { - if (value === "") { - $$invalidate(1, isInvalid = false); - $$invalidate(2, error = ""); - return; - } - - const ipport = value.split(":"); - - if (ipport.length !== 2) { - $$invalidate(1, isInvalid = true); - $$invalidate(2, error = "missing port number"); - return; - } - - const ip = ipport[0]; - const port = parseInt(ipport[1]); - - if (isNaN(port) || port <= 0 || port >= 65535) { - $$invalidate(1, isInvalid = true); - $$invalidate(2, error = "invalid port number"); - return; - } - - $$invalidate(1, isInvalid = false); - $$invalidate(0, value = ip + ":" + port); - } - - const writable_props = ["value"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("InputIPPort", $$slots, []); - - function input_input_handler() { - value = this.value; - $$invalidate(0, value); - } - - $$self.$$set = $$props => { - if ("value" in $$props) $$invalidate(0, value = $$props.value); - }; - - $$self.$capture_state = () => ({ value, isInvalid, error, onBlur }); - - $$self.$inject_state = $$props => { - if ("value" in $$props) $$invalidate(0, value = $$props.value); - if ("isInvalid" in $$props) $$invalidate(1, isInvalid = $$props.isInvalid); - if ("error" in $$props) $$invalidate(2, error = $$props.error); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [value, isInvalid, error, onBlur, input_input_handler]; - } - - class InputIPPort extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance, create_fragment, safe_not_equal, { value: 0 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "InputIPPort", - options, - id: create_fragment.name - }); - } - - get value() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set value(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* node_modules/wui.svelte/src/components/InputNumber.svelte generated by Svelte v3.24.1 */ - - const file$1 = "node_modules/wui.svelte/src/components/InputNumber.svelte"; - - // (34:1) {#if unit !== ''} - function create_if_block$1(ctx) { - let span; - let t; - - const block = { - c: function create() { - span = element("span"); - t = text(/*unit*/ ctx[1]); - attr_dev(span, "class", "suffix svelte-1qrd8wr"); - add_location(span, file$1, 34, 2, 547); - }, - m: function mount(target, anchor) { - insert_dev(target, span, anchor); - append_dev(span, t); - }, - p: function update(ctx, dirty) { - if (dirty & /*unit*/ 2) set_data_dev(t, /*unit*/ ctx[1]); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(span); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$1.name, - type: "if", - source: "(34:1) {#if unit !== ''}", - ctx - }); - - return block; - } - - function create_fragment$1(ctx) { - let div; - let input; - let t; - let mounted; - let dispose; - let if_block = /*unit*/ ctx[1] !== "" && create_if_block$1(ctx); - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t = space(); - if (if_block) if_block.c(); - attr_dev(input, "type", "number"); - attr_dev(input, "class", "svelte-1qrd8wr"); - add_location(input, file$1, 32, 1, 468); - attr_dev(div, "class", "wui-input-number svelte-1qrd8wr"); - add_location(div, file$1, 31, 0, 436); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - set_input_value(input, /*value*/ ctx[0]); - append_dev(div, t); - if (if_block) if_block.m(div, null); - - if (!mounted) { - dispose = [ - listen_dev(input, "blur", /*onBlur*/ ctx[2], false, false, false), - listen_dev(input, "input", /*input_input_handler*/ ctx[5]) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*value*/ 1 && to_number(input.value) !== /*value*/ ctx[0]) { - set_input_value(input, /*value*/ ctx[0]); - } - - if (/*unit*/ ctx[1] !== "") { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block$1(ctx); - if_block.c(); - if_block.m(div, null); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - if (if_block) if_block.d(); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$1.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$1($$self, $$props, $$invalidate) { - let { min } = $$props; - let { max } = $$props; - let { value = 0 } = $$props; - let { unit } = $$props; - - function onBlur() { - $$invalidate(0, value = +value); - - if (isNaN(value)) { - $$invalidate(0, value = max); - } else if (value < min) { - $$invalidate(0, value = min); - } else if (value > max) { - $$invalidate(0, value = max); - } - } - - const writable_props = ["min", "max", "value", "unit"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("InputNumber", $$slots, []); - - function input_input_handler() { - value = to_number(this.value); - $$invalidate(0, value); - } - - $$self.$$set = $$props => { - if ("min" in $$props) $$invalidate(3, min = $$props.min); - if ("max" in $$props) $$invalidate(4, max = $$props.max); - if ("value" in $$props) $$invalidate(0, value = $$props.value); - if ("unit" in $$props) $$invalidate(1, unit = $$props.unit); - }; - - $$self.$capture_state = () => ({ min, max, value, unit, onBlur }); - - $$self.$inject_state = $$props => { - if ("min" in $$props) $$invalidate(3, min = $$props.min); - if ("max" in $$props) $$invalidate(4, max = $$props.max); - if ("value" in $$props) $$invalidate(0, value = $$props.value); - if ("unit" in $$props) $$invalidate(1, unit = $$props.unit); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [value, unit, onBlur, min, max, input_input_handler]; - } - - class InputNumber extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$1, create_fragment$1, safe_not_equal, { min: 3, max: 4, value: 0, unit: 1 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "InputNumber", - options, - id: create_fragment$1.name - }); - - const { ctx } = this.$$; - const props = options.props || {}; - - if (/*min*/ ctx[3] === undefined && !("min" in props)) { - console.warn(" was created without expected prop 'min'"); - } - - if (/*max*/ ctx[4] === undefined && !("max" in props)) { - console.warn(" was created without expected prop 'max'"); - } - - if (/*unit*/ ctx[1] === undefined && !("unit" in props)) { - console.warn(" was created without expected prop 'unit'"); - } - } - - get min() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set min(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get max() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set max(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get value() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set value(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get unit() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set unit(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* node_modules/wui.svelte/src/components/LabelHint.svelte generated by Svelte v3.24.1 */ - - const file$2 = "node_modules/wui.svelte/src/components/LabelHint.svelte"; - - // (57:0) {#if showInfo} - function create_if_block$2(ctx) { - let div; - - const block = { - c: function create() { - div = element("div"); - attr_dev(div, "class", "info svelte-1weevo5"); - add_location(div, file$2, 57, 0, 859); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - div.innerHTML = /*info*/ ctx[1]; - }, - p: function update(ctx, dirty) { - if (dirty & /*info*/ 2) div.innerHTML = /*info*/ ctx[1]; }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$2.name, - type: "if", - source: "(57:0) {#if showInfo}", - ctx - }); - - return block; - } - - function create_fragment$2(ctx) { - let label; - let span1; - let t0; - let t1; - let span0; - let t3; - let t4; - let if_block_anchor; - let current; - let mounted; - let dispose; - const default_slot_template = /*$$slots*/ ctx[5].default; - const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[4], null); - let if_block = /*showInfo*/ ctx[3] && create_if_block$2(ctx); - - const block = { - c: function create() { - label = element("label"); - span1 = element("span"); - t0 = text(/*title*/ ctx[0]); - t1 = space(); - span0 = element("span"); - span0.textContent = "?"; - t3 = space(); - if (default_slot) default_slot.c(); - t4 = space(); - if (if_block) if_block.c(); - if_block_anchor = empty(); - attr_dev(span0, "class", "toggle svelte-1weevo5"); - add_location(span0, file$2, 46, 2, 731); - attr_dev(span1, "class", "title svelte-1weevo5"); - set_style(span1, "width", /*title_width*/ ctx[2]); - add_location(span1, file$2, 44, 1, 669); - attr_dev(label, "class", "label-hint svelte-1weevo5"); - add_location(label, file$2, 43, 0, 641); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, label, anchor); - append_dev(label, span1); - append_dev(span1, t0); - append_dev(span1, t1); - append_dev(span1, span0); - append_dev(label, t3); - - if (default_slot) { - default_slot.m(label, null); - } - - insert_dev(target, t4, anchor); - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - current = true; - - if (!mounted) { - dispose = listen_dev(span0, "click", /*click_handler*/ ctx[6], false, false, false); - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (!current || dirty & /*title*/ 1) set_data_dev(t0, /*title*/ ctx[0]); - - if (!current || dirty & /*title_width*/ 4) { - set_style(span1, "width", /*title_width*/ ctx[2]); - } - - if (default_slot) { - if (default_slot.p && dirty & /*$$scope*/ 16) { - update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[4], dirty, null, null); - } - } - - if (/*showInfo*/ ctx[3]) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block$2(ctx); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: function intro(local) { - if (current) return; - transition_in(default_slot, local); - current = true; - }, - o: function outro(local) { - transition_out(default_slot, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(label); - if (default_slot) default_slot.d(detaching); - if (detaching) detach_dev(t4); - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$2.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$2($$self, $$props, $$invalidate) { - let { title } = $$props; - let { info } = $$props; - let { title_width = "300px" } = $$props; - let showInfo = false; - const writable_props = ["title", "info", "title_width"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("LabelHint", $$slots, ['default']); - const click_handler = () => $$invalidate(3, showInfo = !showInfo); - - $$self.$$set = $$props => { - if ("title" in $$props) $$invalidate(0, title = $$props.title); - if ("info" in $$props) $$invalidate(1, info = $$props.info); - if ("title_width" in $$props) $$invalidate(2, title_width = $$props.title_width); - if ("$$scope" in $$props) $$invalidate(4, $$scope = $$props.$$scope); - }; - - $$self.$capture_state = () => ({ title, info, title_width, showInfo }); - - $$self.$inject_state = $$props => { - if ("title" in $$props) $$invalidate(0, title = $$props.title); - if ("info" in $$props) $$invalidate(1, info = $$props.info); - if ("title_width" in $$props) $$invalidate(2, title_width = $$props.title_width); - if ("showInfo" in $$props) $$invalidate(3, showInfo = $$props.showInfo); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [title, info, title_width, showInfo, $$scope, $$slots, click_handler]; - } - - class LabelHint extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$2, create_fragment$2, safe_not_equal, { title: 0, info: 1, title_width: 2 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "LabelHint", - options, - id: create_fragment$2.name - }); - - const { ctx } = this.$$; - const props = options.props || {}; - - if (/*title*/ ctx[0] === undefined && !("title" in props)) { - console.warn(" was created without expected prop 'title'"); - } - - if (/*info*/ ctx[1] === undefined && !("info" in props)) { - console.warn(" was created without expected prop 'info'"); - } - } - - get title() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set title(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get info() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set info(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get title_width() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set title_width(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - function fade(node, { delay = 0, duration = 400, easing = identity }) { - const o = +getComputedStyle(node).opacity; - return { - delay, - duration, - easing, - css: t => `opacity: ${t * o}` - }; - } - - const subscriber_queue = []; - /** - * Create a `Writable` store that allows both updating and reading by subscription. - * @param {*=}value initial value - * @param {StartStopNotifier=}start start and stop notifications for subscriptions - */ - function writable(value, start = noop) { - let stop; - const subscribers = []; - function set(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { // store is ready - const run_queue = !subscriber_queue.length; - for (let i = 0; i < subscribers.length; i += 1) { - const s = subscribers[i]; - s[1](); - subscriber_queue.push(s, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update(fn) { - set(fn(value)); - } - function subscribe(run, invalidate = noop) { - const subscriber = [run, invalidate]; - subscribers.push(subscriber); - if (subscribers.length === 1) { - stop = start(set) || noop; - } - run(value); - return () => { - const index = subscribers.indexOf(subscriber); - if (index !== -1) { - subscribers.splice(index, 1); - } - if (subscribers.length === 0) { - stop(); - stop = null; - } - }; - } - return { set, update, subscribe }; - } - - const messages = writable([]); - - /* node_modules/wui.svelte/src/components/NotifItem.svelte generated by Svelte v3.24.1 */ - const file$3 = "node_modules/wui.svelte/src/components/NotifItem.svelte"; - - function create_fragment$3(ctx) { - let div; - let t; - let div_class_value; - let div_transition; - let current; - - const block = { - c: function create() { - div = element("div"); - t = text(/*text*/ ctx[0]); - attr_dev(div, "class", div_class_value = "wui-notif-item " + /*kind*/ ctx[1] + " svelte-1n99njq"); - add_location(div, file$3, 35, 0, 625); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, t); - current = true; - }, - p: function update(ctx, [dirty]) { - if (!current || dirty & /*text*/ 1) set_data_dev(t, /*text*/ ctx[0]); - - if (!current || dirty & /*kind*/ 2 && div_class_value !== (div_class_value = "wui-notif-item " + /*kind*/ ctx[1] + " svelte-1n99njq")) { - attr_dev(div, "class", div_class_value); - } - }, - i: function intro(local) { - if (current) return; - - add_render_callback(() => { - if (!div_transition) div_transition = create_bidirectional_transition(div, fade, {}, true); - div_transition.run(1); - }); - - current = true; - }, - o: function outro(local) { - if (!div_transition) div_transition = create_bidirectional_transition(div, fade, {}, false); - div_transition.run(0); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - if (detaching && div_transition) div_transition.end(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$3.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - function instance$3($$self, $$props, $$invalidate) { - let { text = "" } = $$props; - let { kind = "" } = $$props; - let { timeout = 5000 } = $$props; - - onMount(() => { - let timerID = setTimeout( - () => { - messages.update(msgs => { - msgs.splice(0, 1); - msgs = msgs; - return msgs; - }); - }, - timeout - ); - }); - - const writable_props = ["text", "kind", "timeout"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("NotifItem", $$slots, []); - - $$self.$$set = $$props => { - if ("text" in $$props) $$invalidate(0, text = $$props.text); - if ("kind" in $$props) $$invalidate(1, kind = $$props.kind); - if ("timeout" in $$props) $$invalidate(2, timeout = $$props.timeout); - }; - - $$self.$capture_state = () => ({ - onMount, - fade, - messages, - text, - kind, - timeout - }); - - $$self.$inject_state = $$props => { - if ("text" in $$props) $$invalidate(0, text = $$props.text); - if ("kind" in $$props) $$invalidate(1, kind = $$props.kind); - if ("timeout" in $$props) $$invalidate(2, timeout = $$props.timeout); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [text, kind, timeout]; - } - - class NotifItem extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$3, create_fragment$3, safe_not_equal, { text: 0, kind: 1, timeout: 2 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "NotifItem", - options, - id: create_fragment$3.name - }); - } - - get text() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set text(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get kind() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set kind(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - - get timeout() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set timeout(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - /* node_modules/wui.svelte/src/components/Notif.svelte generated by Svelte v3.24.1 */ - const file$4 = "node_modules/wui.svelte/src/components/Notif.svelte"; - - function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[2] = list[i]; - return child_ctx; - } - - // (41:1) {#each $messages as msg (msg)} - function create_each_block(key_1, ctx) { - let first; - let notifitem; - let current; - - notifitem = new NotifItem({ - props: { - text: /*msg*/ ctx[2].text, - kind: /*msg*/ ctx[2].kind, - timeout: /*timeout*/ ctx[0] - }, - $$inline: true - }); - - const block = { - key: key_1, - first: null, - c: function create() { - first = empty(); - create_component(notifitem.$$.fragment); - this.first = first; - }, - m: function mount(target, anchor) { - insert_dev(target, first, anchor); - mount_component(notifitem, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const notifitem_changes = {}; - if (dirty & /*$messages*/ 2) notifitem_changes.text = /*msg*/ ctx[2].text; - if (dirty & /*$messages*/ 2) notifitem_changes.kind = /*msg*/ ctx[2].kind; - if (dirty & /*timeout*/ 1) notifitem_changes.timeout = /*timeout*/ ctx[0]; - notifitem.$set(notifitem_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(notifitem.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(notifitem.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(first); - destroy_component(notifitem, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(41:1) {#each $messages as msg (msg)}", - ctx - }); - - return block; - } - - function create_fragment$4(ctx) { - let div; - let each_blocks = []; - let each_1_lookup = new Map(); - let current; - let each_value = /*$messages*/ ctx[1]; - validate_each_argument(each_value); - const get_key = ctx => /*msg*/ ctx[2]; - validate_each_keys(ctx, each_value, get_each_context, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); - } - - const block = { - c: function create() { - div = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(div, "class", "wui-notif svelte-xdooa2"); - add_location(div, file$4, 39, 0, 670); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - - current = true; - }, - p: function update(ctx, [dirty]) { - if (dirty & /*$messages, timeout*/ 3) { - const each_value = /*$messages*/ ctx[1]; - validate_each_argument(each_value); - group_outros(); - validate_each_keys(ctx, each_value, get_each_context, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block, null, get_each_context); - check_outros(); - } - }, - i: function intro(local) { - if (current) return; - - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - - current = true; - }, - o: function outro(local) { - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$4.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const WuiPushNotif = { - Info(text) { - const msg = { text }; - messages.update(msgs => msgs = [...msgs, msg]); - }, - Error(text) { - const msg = { text, kind: "error" }; - messages.update(msgs => msgs = [...msgs, msg]); - } - }; - - function instance$4($$self, $$props, $$invalidate) { - let $messages; - validate_store(messages, "messages"); - component_subscribe($$self, messages, $$value => $$invalidate(1, $messages = $$value)); - let { timeout = 5000 } = $$props; - const writable_props = ["timeout"]; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("Notif", $$slots, []); - - $$self.$$set = $$props => { - if ("timeout" in $$props) $$invalidate(0, timeout = $$props.timeout); - }; - - $$self.$capture_state = () => ({ - messages, - NotifItem, - WuiPushNotif, - timeout, - $messages - }); - - $$self.$inject_state = $$props => { - if ("timeout" in $$props) $$invalidate(0, timeout = $$props.timeout); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [timeout, $messages]; - } - - class Notif extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$4, create_fragment$4, safe_not_equal, { timeout: 0 }); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Notif", - options, - id: create_fragment$4.name - }); - } - - get timeout() { - throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ''"); - } - - set timeout(value) { - throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ''"); - } - } - - const apiEnvironment = "/api/environment"; - const environment = writable({ - NameServers: [], - HostsBlocks: [], - HostsFiles: {}, - ZoneFiles: [], - }); - const nanoSeconds = 1000000000; - - async function setEnvironment(got) { - got.PruneDelay = got.PruneDelay / nanoSeconds; - got.PruneThreshold = got.PruneThreshold / nanoSeconds; - for (const [key, value] of Object.entries(got.HostsFiles)) { - got.HostsFiles[key].Records = []; - } - environment.set(got); - } - - const RRTypes = { - 1: "A", - 2: "NS", - 3: "MD", - 4: "MF", - 5: "CNAME", - 6: "SOA", - 7: "MB", - 8: "MG", - 9: "MR", - 10: "NULL", - 11: "WKS", - 12: "PTR", - 13: "HINFO", - 14: "MINFO", - 15: "MX", - 16: "TXT", - 28: "AAAA", - 33: "SRV", - 41: "OPT", - }; - - function getRRTypeName(k) { - let v = RRTypes[k]; - if (v === "") { - return k - } - return v - } - - /* src/Dashboard.svelte generated by Svelte v3.24.1 */ - const file$5 = "src/Dashboard.svelte"; - - function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[8] = list[i]; - return child_ctx; - } - - function get_each_context_2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[8] = list[i]; - return child_ctx; - } - - function get_each_context_3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[8] = list[i]; - return child_ctx; - } - - function get_each_context$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[5] = list[i]; - return child_ctx; - } - - // (104:3) {#if msg.Answer !== null && msg.Answer.length > 0} - function create_if_block_2(ctx) { - let each_1_anchor; - let each_value_3 = /*msg*/ ctx[5].Answer; - validate_each_argument(each_value_3); - let each_blocks = []; - - for (let i = 0; i < each_value_3.length; i += 1) { - each_blocks[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); - } - - const block = { - c: function create() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m: function mount(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*JSON, listMsg, getRRTypeName*/ 2) { - each_value_3 = /*msg*/ ctx[5].Answer; - validate_each_argument(each_value_3); - let i; - - for (i = 0; i < each_value_3.length; i += 1) { - const child_ctx = get_each_context_3(ctx, each_value_3, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_3(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_3.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_2.name, - type: "if", - source: "(104:3) {#if msg.Answer !== null && msg.Answer.length > 0}", - ctx - }); - - return block; - } - - // (105:4) {#each msg.Answer as rr} - function create_each_block_3(ctx) { - let div; - let span0; - let t1; - let span1; - let t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + ""; - let t2; - let t3; - let span2; - let t4_value = /*rr*/ ctx[8].TTL + ""; - let t4; - let t5; - let span3; - let t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + ""; - let t6; - let t7; - - const block = { - c: function create() { - div = element("div"); - span0 = element("span"); - span0.textContent = "Answer"; - t1 = space(); - span1 = element("span"); - t2 = text(t2_value); - t3 = space(); - span2 = element("span"); - t4 = text(t4_value); - t5 = space(); - span3 = element("span"); - t6 = text(t6_value); - t7 = space(); - attr_dev(span0, "class", "kind svelte-1d4jf0i"); - add_location(span0, file$5, 106, 6, 1952); - attr_dev(span1, "class", "type svelte-1d4jf0i"); - add_location(span1, file$5, 107, 6, 1993); - attr_dev(span2, "class", "ttl svelte-1d4jf0i"); - add_location(span2, file$5, 108, 6, 2052); - attr_dev(span3, "class", "value svelte-1d4jf0i"); - add_location(span3, file$5, 109, 6, 2094); - attr_dev(div, "class", "rr svelte-1d4jf0i"); - add_location(div, file$5, 105, 5, 1929); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(div, t1); - append_dev(div, span1); - append_dev(span1, t2); - append_dev(div, t3); - append_dev(div, span2); - append_dev(span2, t4); - append_dev(div, t5); - append_dev(div, span3); - append_dev(span3, t6); - append_dev(div, t7); - }, - p: function update(ctx, dirty) { - if (dirty & /*listMsg*/ 2 && t2_value !== (t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + "")) set_data_dev(t2, t2_value); - if (dirty & /*listMsg*/ 2 && t4_value !== (t4_value = /*rr*/ ctx[8].TTL + "")) set_data_dev(t4, t4_value); - if (dirty & /*listMsg*/ 2 && t6_value !== (t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + "")) set_data_dev(t6, t6_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_3.name, - type: "each", - source: "(105:4) {#each msg.Answer as rr}", - ctx - }); - - return block; - } - - // (114:3) {#if msg.Authority !== null && msg.Authority.length > 0} - function create_if_block_1(ctx) { - let each_1_anchor; - let each_value_2 = /*msg*/ ctx[5].Authority; - validate_each_argument(each_value_2); - let each_blocks = []; - - for (let i = 0; i < each_value_2.length; i += 1) { - each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); - } - - const block = { - c: function create() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m: function mount(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*JSON, listMsg, getRRTypeName*/ 2) { - each_value_2 = /*msg*/ ctx[5].Authority; - validate_each_argument(each_value_2); - let i; - - for (i = 0; i < each_value_2.length; i += 1) { - const child_ctx = get_each_context_2(ctx, each_value_2, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_2(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_2.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1.name, - type: "if", - source: "(114:3) {#if msg.Authority !== null && msg.Authority.length > 0}", - ctx - }); - - return block; - } - - // (115:4) {#each msg.Authority as rr} - function create_each_block_2(ctx) { - let div; - let span0; - let t1; - let span1; - let t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + ""; - let t2; - let t3; - let span2; - let t4_value = /*rr*/ ctx[8].TTL + ""; - let t4; - let t5; - let span3; - let t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + ""; - let t6; - let t7; - - const block = { - c: function create() { - div = element("div"); - span0 = element("span"); - span0.textContent = "Authority"; - t1 = space(); - span1 = element("span"); - t2 = text(t2_value); - t3 = space(); - span2 = element("span"); - t4 = text(t4_value); - t5 = space(); - span3 = element("span"); - t6 = text(t6_value); - t7 = space(); - attr_dev(span0, "class", "kind svelte-1d4jf0i"); - add_location(span0, file$5, 116, 6, 2312); - attr_dev(span1, "class", "type svelte-1d4jf0i"); - add_location(span1, file$5, 117, 6, 2356); - attr_dev(span2, "class", "ttl svelte-1d4jf0i"); - add_location(span2, file$5, 118, 6, 2415); - attr_dev(span3, "class", "value svelte-1d4jf0i"); - add_location(span3, file$5, 119, 6, 2457); - attr_dev(div, "class", "rr svelte-1d4jf0i"); - add_location(div, file$5, 115, 5, 2289); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(div, t1); - append_dev(div, span1); - append_dev(span1, t2); - append_dev(div, t3); - append_dev(div, span2); - append_dev(span2, t4); - append_dev(div, t5); - append_dev(div, span3); - append_dev(span3, t6); - append_dev(div, t7); - }, - p: function update(ctx, dirty) { - if (dirty & /*listMsg*/ 2 && t2_value !== (t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + "")) set_data_dev(t2, t2_value); - if (dirty & /*listMsg*/ 2 && t4_value !== (t4_value = /*rr*/ ctx[8].TTL + "")) set_data_dev(t4, t4_value); - if (dirty & /*listMsg*/ 2 && t6_value !== (t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + "")) set_data_dev(t6, t6_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_2.name, - type: "each", - source: "(115:4) {#each msg.Authority as rr}", - ctx - }); - - return block; - } - - // (124:3) {#if msg.Additional !== null && msg.Additional.length > 0} - function create_if_block$3(ctx) { - let each_1_anchor; - let each_value_1 = /*msg*/ ctx[5].Additional; - validate_each_argument(each_value_1); - let each_blocks = []; - - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); - } - - const block = { - c: function create() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m: function mount(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty & /*JSON, listMsg, getRRTypeName*/ 2) { - each_value_1 = /*msg*/ ctx[5].Additional; - validate_each_argument(each_value_1); - let i; - - for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1(ctx, each_value_1, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_1(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_1.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$3.name, - type: "if", - source: "(124:3) {#if msg.Additional !== null && msg.Additional.length > 0}", - ctx - }); - - return block; - } - - // (125:4) {#each msg.Additional as rr} - function create_each_block_1(ctx) { - let div; - let span0; - let t1; - let span1; - let t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + ""; - let t2; - let t3; - let span2; - let t4_value = /*rr*/ ctx[8].TTL + ""; - let t4; - let t5; - let span3; - let t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + ""; - let t6; - let t7; - - const block = { - c: function create() { - div = element("div"); - span0 = element("span"); - span0.textContent = "Additional"; - t1 = space(); - span1 = element("span"); - t2 = text(t2_value); - t3 = space(); - span2 = element("span"); - t4 = text(t4_value); - t5 = space(); - span3 = element("span"); - t6 = text(t6_value); - t7 = space(); - attr_dev(span0, "class", "kind svelte-1d4jf0i"); - add_location(span0, file$5, 126, 6, 2678); - attr_dev(span1, "class", "type svelte-1d4jf0i"); - add_location(span1, file$5, 127, 6, 2723); - attr_dev(span2, "class", "ttl svelte-1d4jf0i"); - add_location(span2, file$5, 128, 6, 2782); - attr_dev(span3, "class", "value svelte-1d4jf0i"); - add_location(span3, file$5, 129, 6, 2824); - attr_dev(div, "class", "rr svelte-1d4jf0i"); - add_location(div, file$5, 125, 5, 2655); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(div, t1); - append_dev(div, span1); - append_dev(span1, t2); - append_dev(div, t3); - append_dev(div, span2); - append_dev(span2, t4); - append_dev(div, t5); - append_dev(div, span3); - append_dev(span3, t6); - append_dev(div, t7); - }, - p: function update(ctx, dirty) { - if (dirty & /*listMsg*/ 2 && t2_value !== (t2_value = getRRTypeName(/*rr*/ ctx[8].Type) + "")) set_data_dev(t2, t2_value); - if (dirty & /*listMsg*/ 2 && t4_value !== (t4_value = /*rr*/ ctx[8].TTL + "")) set_data_dev(t4, t4_value); - if (dirty & /*listMsg*/ 2 && t6_value !== (t6_value = JSON.stringify(/*rr*/ ctx[8].Value, null, 2) + "")) set_data_dev(t6, t6_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1.name, - type: "each", - source: "(125:4) {#each msg.Additional as rr}", - ctx - }); - - return block; - } - - // (85:1) {#each listMsg as msg (msg)} - function create_each_block$1(key_1, ctx) { - let div2; - let div0; - let t0_value = /*msg*/ ctx[5].Question.Name + ""; - let t0; - let t1; - let button; - let t3; - let div1; - let span0; - let t4; - let span1; - let t6; - let span2; - let t8; - let span3; - let t10; - let t11; - let t12; - let t13; - let mounted; - let dispose; - let if_block0 = /*msg*/ ctx[5].Answer !== null && /*msg*/ ctx[5].Answer.length > 0 && create_if_block_2(ctx); - let if_block1 = /*msg*/ ctx[5].Authority !== null && /*msg*/ ctx[5].Authority.length > 0 && create_if_block_1(ctx); - let if_block2 = /*msg*/ ctx[5].Additional !== null && /*msg*/ ctx[5].Additional.length > 0 && create_if_block$3(ctx); - - const block = { - key: key_1, - first: null, - c: function create() { - div2 = element("div"); - div0 = element("div"); - t0 = text(t0_value); - t1 = space(); - button = element("button"); - button.textContent = "Remove from caches"; - t3 = space(); - div1 = element("div"); - span0 = element("span"); - t4 = space(); - span1 = element("span"); - span1.textContent = "Type"; - t6 = space(); - span2 = element("span"); - span2.textContent = "TTL"; - t8 = space(); - span3 = element("span"); - span3.textContent = "Value"; - t10 = space(); - if (if_block0) if_block0.c(); - t11 = space(); - if (if_block1) if_block1.c(); - t12 = space(); - if (if_block2) if_block2.c(); - t13 = space(); - attr_dev(button, "class", "b-remove"); - add_location(button, file$5, 89, 4, 1518); - attr_dev(div0, "class", "qname"); - add_location(div0, file$5, 86, 3, 1469); - attr_dev(span0, "class", "kind svelte-1d4jf0i"); - add_location(span0, file$5, 97, 4, 1691); - attr_dev(span1, "class", "type svelte-1d4jf0i"); - add_location(span1, file$5, 98, 4, 1723); - attr_dev(span2, "class", "ttl svelte-1d4jf0i"); - add_location(span2, file$5, 99, 4, 1760); - attr_dev(span3, "class", "value svelte-1d4jf0i"); - add_location(span3, file$5, 100, 4, 1795); - attr_dev(div1, "class", "rr header svelte-1d4jf0i"); - add_location(div1, file$5, 96, 3, 1663); - attr_dev(div2, "class", "message svelte-1d4jf0i"); - add_location(div2, file$5, 85, 2, 1444); - this.first = div2; - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div0); - append_dev(div0, t0); - append_dev(div0, t1); - append_dev(div0, button); - append_dev(div2, t3); - append_dev(div2, div1); - append_dev(div1, span0); - append_dev(div1, t4); - append_dev(div1, span1); - append_dev(div1, t6); - append_dev(div1, span2); - append_dev(div1, t8); - append_dev(div1, span3); - append_dev(div2, t10); - if (if_block0) if_block0.m(div2, null); - append_dev(div2, t11); - if (if_block1) if_block1.m(div2, null); - append_dev(div2, t12); - if (if_block2) if_block2.m(div2, null); - append_dev(div2, t13); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*handleRemoveFromCaches*/ ctx[3](/*msg*/ ctx[5].Question.Name))) /*handleRemoveFromCaches*/ ctx[3](/*msg*/ ctx[5].Question.Name).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*listMsg*/ 2 && t0_value !== (t0_value = /*msg*/ ctx[5].Question.Name + "")) set_data_dev(t0, t0_value); - - if (/*msg*/ ctx[5].Answer !== null && /*msg*/ ctx[5].Answer.length > 0) { - if (if_block0) { - if_block0.p(ctx, dirty); - } else { - if_block0 = create_if_block_2(ctx); - if_block0.c(); - if_block0.m(div2, t11); - } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; - } - - if (/*msg*/ ctx[5].Authority !== null && /*msg*/ ctx[5].Authority.length > 0) { - if (if_block1) { - if_block1.p(ctx, dirty); - } else { - if_block1 = create_if_block_1(ctx); - if_block1.c(); - if_block1.m(div2, t12); - } - } else if (if_block1) { - if_block1.d(1); - if_block1 = null; - } - - if (/*msg*/ ctx[5].Additional !== null && /*msg*/ ctx[5].Additional.length > 0) { - if (if_block2) { - if_block2.p(ctx, dirty); - } else { - if_block2 = create_if_block$3(ctx); - if_block2.c(); - if_block2.m(div2, t13); - } - } else if (if_block2) { - if_block2.d(1); - if_block2 = null; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - if (if_block0) if_block0.d(); - if (if_block1) if_block1.d(); - if (if_block2) if_block2.d(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$1.name, - type: "each", - source: "(85:1) {#each listMsg as msg (msg)}", - ctx - }); - - return block; - } - - function create_fragment$5(ctx) { - let div1; - let div0; - let t0; - let input; - let t1; - let button; - let t3; - let each_blocks = []; - let each_1_lookup = new Map(); - let mounted; - let dispose; - let each_value = /*listMsg*/ ctx[1]; - validate_each_argument(each_value); - const get_key = ctx => /*msg*/ ctx[5]; - validate_each_keys(ctx, each_value, get_each_context$1, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$1(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx)); - } - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - t0 = text("Caches:\n\t\t"); - input = element("input"); - t1 = space(); - button = element("button"); - button.textContent = "Search"; - t3 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - add_location(input, file$5, 79, 2, 1320); - add_location(button, file$5, 80, 2, 1349); - attr_dev(div0, "class", "search"); - add_location(div0, file$5, 77, 1, 1287); - attr_dev(div1, "class", "dashboard"); - add_location(div1, file$5, 76, 0, 1262); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, div0); - append_dev(div0, t0); - append_dev(div0, input); - set_input_value(input, /*query*/ ctx[0]); - append_dev(div0, t1); - append_dev(div0, button); - append_dev(div1, t3); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - if (!mounted) { - dispose = [ - listen_dev(input, "input", /*input_input_handler*/ ctx[4]), - listen_dev(button, "click", /*handleSearch*/ ctx[2], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*query*/ 1 && input.value !== /*query*/ ctx[0]) { - set_input_value(input, /*query*/ ctx[0]); - } - - if (dirty & /*listMsg, JSON, getRRTypeName, handleRemoveFromCaches*/ 10) { - const each_value = /*listMsg*/ ctx[1]; - validate_each_argument(each_value); - validate_each_keys(ctx, each_value, get_each_context$1, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div1, destroy_block, create_each_block$1, null, get_each_context$1); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(); - } - - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$5.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const apiCaches = "/api/caches"; - - function instance$5($$self, $$props, $$invalidate) { - let query = ""; - let listMsg = []; - - async function handleSearch() { - const res = await fetch(apiCaches + "?query=" + query); - - if (res.status >= 400) { - const resbody = await res.json(); - WuiPushNotif.Error("ERROR: " + resbody.message); - return; - } - - $$invalidate(1, listMsg = await res.json()); - } - - async function handleRemoveFromCaches(name) { - const res = await fetch(apiCaches + "?name=" + name, { method: "DELETE" }); - - if (res.status >= 400) { - const resbody = await res.json(); - WuiPushNotif.Error("ERROR: " + resbody.message); - return; - } - - for (let x = 0; x < listMsg.length; x++) { - if (listMsg[x].Question.Name === name) { - listMsg.splice(x, 1); - $$invalidate(1, listMsg); - break; - } - } - - const msg = await res.json(); - WuiPushNotif.Info(msg.message); - } - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("Dashboard", $$slots, []); - - function input_input_handler() { - query = this.value; - $$invalidate(0, query); - } - - $$self.$capture_state = () => ({ - WuiPushNotif, - getRRTypeName, - apiCaches, - query, - listMsg, - handleSearch, - handleRemoveFromCaches - }); - - $$self.$inject_state = $$props => { - if ("query" in $$props) $$invalidate(0, query = $$props.query); - if ("listMsg" in $$props) $$invalidate(1, listMsg = $$props.listMsg); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [query, listMsg, handleSearch, handleRemoveFromCaches, input_input_handler]; - } - - class Dashboard extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$5, create_fragment$5, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Dashboard", - options, - id: create_fragment$5.name - }); - } - } - - /* src/Environment.svelte generated by Svelte v3.24.1 */ - - const { Object: Object_1 } = globals; - const file$6 = "src/Environment.svelte"; - - function get_each_context$2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[17] = list[i]; - child_ctx[18] = list; - child_ctx[19] = i; - return child_ctx; - } - - // (97:1) - function create_default_slot_11(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 104, 2, 2224); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*env*/ ctx[0].FileResolvConf); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler*/ ctx[4]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*env*/ 1 && input.value !== /*env*/ ctx[0].FileResolvConf) { - set_input_value(input, /*env*/ ctx[0].FileResolvConf); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_11.name, - type: "slot", - source: "(97:1) ", - ctx - }); - - return block; - } - - // (110:1) - function create_default_slot_10(ctx) { - let wuiinputnumber; - let updating_value; - let current; - - function wuiinputnumber_value_binding(value) { - /*wuiinputnumber_value_binding*/ ctx[5].call(null, value); - } - - let wuiinputnumber_props = { min: "0", max: "3", unit: "" }; - - if (/*env*/ ctx[0].Debug !== void 0) { - wuiinputnumber_props.value = /*env*/ ctx[0].Debug; - } - - wuiinputnumber = new InputNumber({ - props: wuiinputnumber_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputnumber, "value", wuiinputnumber_value_binding)); - - const block = { - c: function create() { - create_component(wuiinputnumber.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputnumber, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputnumber_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputnumber_changes.value = /*env*/ ctx[0].Debug; - add_flush_callback(() => updating_value = false); - } - - wuiinputnumber.$set(wuiinputnumber_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputnumber.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputnumber.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputnumber, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_10.name, - type: "slot", - source: "(110:1) ", - ctx - }); - - return block; - } - - // (134:1) {#each env.NameServers as ns} - function create_each_block$2(ctx) { - let div; - let input; - let t0; - let button; - let mounted; - let dispose; - - function input_input_handler_1() { - /*input_input_handler_1*/ ctx[6].call(input, /*each_value*/ ctx[18], /*ns_index*/ ctx[19]); - } - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t0 = space(); - button = element("button"); - button.textContent = "Delete"; - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 135, 2, 2820); - attr_dev(button, "class", "svelte-ivqrh9"); - add_location(button, file$6, 136, 2, 2846); - attr_dev(div, "class", "input-deletable svelte-ivqrh9"); - add_location(div, file$6, 134, 1, 2788); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - set_input_value(input, /*ns*/ ctx[17]); - append_dev(div, t0); - append_dev(div, button); - - if (!mounted) { - dispose = [ - listen_dev(input, "input", input_input_handler_1), - listen_dev( - button, - "click", - function () { - if (is_function(/*deleteNameServer*/ ctx[2](/*ns*/ ctx[17]))) /*deleteNameServer*/ ctx[2](/*ns*/ ctx[17]).apply(this, arguments); - }, - false, - false, - false - ) - ]; - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (dirty & /*env*/ 1 && input.value !== /*ns*/ ctx[17]) { - set_input_value(input, /*ns*/ ctx[17]); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$2.name, - type: "each", - source: "(134:1) {#each env.NameServers as ns}", - ctx - }); - - return block; - } - - // (149:1) - function create_default_slot_8(ctx) { - let wuiinputipport; - let updating_value; - let current; - - function wuiinputipport_value_binding(value) { - /*wuiinputipport_value_binding*/ ctx[7].call(null, value); - } - - let wuiinputipport_props = {}; - - if (/*env*/ ctx[0].ListenAddress !== void 0) { - wuiinputipport_props.value = /*env*/ ctx[0].ListenAddress; - } - - wuiinputipport = new InputIPPort({ - props: wuiinputipport_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputipport, "value", wuiinputipport_value_binding)); - - const block = { - c: function create() { - create_component(wuiinputipport.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputipport, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputipport_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputipport_changes.value = /*env*/ ctx[0].ListenAddress; - add_flush_callback(() => updating_value = false); - } - - wuiinputipport.$set(wuiinputipport_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputipport.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputipport.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputipport, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_8.name, - type: "slot", - source: "(149:1) If you want rescached to serve a query from another host in your local network, change this value to 0.0.0.0:53.\\\" >", - ctx - }); - - return block; - } - - // (163:1) - function create_default_slot_7(ctx) { - let wuiinputnumber; - let updating_value; - let current; - - function wuiinputnumber_value_binding_1(value) { - /*wuiinputnumber_value_binding_1*/ ctx[8].call(null, value); - } - - let wuiinputnumber_props = { min: "0", max: "65535", unit: "" }; - - if (/*env*/ ctx[0].HTTPPort !== void 0) { - wuiinputnumber_props.value = /*env*/ ctx[0].HTTPPort; - } - - wuiinputnumber = new InputNumber({ - props: wuiinputnumber_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputnumber, "value", wuiinputnumber_value_binding_1)); - - const block = { - c: function create() { - create_component(wuiinputnumber.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputnumber, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputnumber_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputnumber_changes.value = /*env*/ ctx[0].HTTPPort; - add_flush_callback(() => updating_value = false); - } - - wuiinputnumber.$set(wuiinputnumber_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputnumber.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputnumber.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputnumber, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_7.name, - type: "slot", - source: "(163:1) ", - ctx - }); - - return block; - } - - // (176:1) - function create_default_slot_6(ctx) { - let wuiinputnumber; - let updating_value; - let current; - - function wuiinputnumber_value_binding_2(value) { - /*wuiinputnumber_value_binding_2*/ ctx[9].call(null, value); - } - - let wuiinputnumber_props = { min: "0", max: "65535", unit: "" }; - - if (/*env*/ ctx[0].TLSPort !== void 0) { - wuiinputnumber_props.value = /*env*/ ctx[0].TLSPort; - } - - wuiinputnumber = new InputNumber({ - props: wuiinputnumber_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputnumber, "value", wuiinputnumber_value_binding_2)); - - const block = { - c: function create() { - create_component(wuiinputnumber.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputnumber, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputnumber_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputnumber_changes.value = /*env*/ ctx[0].TLSPort; - add_flush_callback(() => updating_value = false); - } - - wuiinputnumber.$set(wuiinputnumber_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputnumber.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputnumber.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputnumber, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_6.name, - type: "slot", - source: "(176:1) ", - ctx - }); - - return block; - } - - // (189:1) - function create_default_slot_5(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "placeholder", "/path/to/certificate"); - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 193, 2, 3948); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*env*/ ctx[0].TLSCertFile); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_2*/ ctx[10]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*env*/ 1 && input.value !== /*env*/ ctx[0].TLSCertFile) { - set_input_value(input, /*env*/ ctx[0].TLSCertFile); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_5.name, - type: "slot", - source: "(189:1) ", - ctx - }); - - return block; - } - - // (200:1) - function create_default_slot_4(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "placeholder", "/path/to/certificate/private.key"); - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 205, 2, 4205); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*env*/ ctx[0].TLSPrivateKey); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_3*/ ctx[11]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*env*/ 1 && input.value !== /*env*/ ctx[0].TLSPrivateKey) { - set_input_value(input, /*env*/ ctx[0].TLSPrivateKey); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_4.name, - type: "slot", - source: "(200:1) ", - ctx - }); - - return block; - } - - // (212:1) - function create_default_slot_3(ctx) { - let div; - let input; - let t0; - let span; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t0 = space(); - span = element("span"); - span.textContent = "Yes"; - attr_dev(input, "type", "checkbox"); - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 218, 3, 4510); - attr_dev(span, "class", "suffix"); - add_location(span, file$6, 222, 3, 4583); - attr_dev(div, "class", "input-checkbox svelte-ivqrh9"); - add_location(div, file$6, 217, 2, 4478); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - input.checked = /*env*/ ctx[0].TLSAllowInsecure; - append_dev(div, t0); - append_dev(div, span); - - if (!mounted) { - dispose = listen_dev(input, "change", /*input_change_handler*/ ctx[12]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*env*/ 1) { - input.checked = /*env*/ ctx[0].TLSAllowInsecure; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_3.name, - type: "slot", - source: "(212:1) ", - ctx - }); - - return block; - } - - // (229:1) - function create_default_slot_2(ctx) { - let div; - let input; - let t0; - let span; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - input = element("input"); - t0 = space(); - span = element("span"); - span.textContent = "Yes"; - attr_dev(input, "type", "checkbox"); - attr_dev(input, "class", "svelte-ivqrh9"); - add_location(input, file$6, 236, 3, 4914); - attr_dev(span, "class", "suffix"); - add_location(span, file$6, 240, 3, 4985); - attr_dev(div, "class", "input-checkbox svelte-ivqrh9"); - add_location(div, file$6, 235, 2, 4882); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input); - input.checked = /*env*/ ctx[0].DoHBehindProxy; - append_dev(div, t0); - append_dev(div, span); - - if (!mounted) { - dispose = listen_dev(input, "change", /*input_change_handler_1*/ ctx[13]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*env*/ 1) { - input.checked = /*env*/ ctx[0].DoHBehindProxy; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_2.name, - type: "slot", - source: "(229:1) ", - ctx - }); - - return block; - } - - // (247:1) - function create_default_slot_1(ctx) { - let wuiinputnumber; - let updating_value; - let current; - - function wuiinputnumber_value_binding_3(value) { - /*wuiinputnumber_value_binding_3*/ ctx[14].call(null, value); - } - - let wuiinputnumber_props = { - min: "3600", - max: "36000", - unit: "seconds" - }; - - if (/*env*/ ctx[0].PruneDelay !== void 0) { - wuiinputnumber_props.value = /*env*/ ctx[0].PruneDelay; - } - - wuiinputnumber = new InputNumber({ - props: wuiinputnumber_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputnumber, "value", wuiinputnumber_value_binding_3)); - - const block = { - c: function create() { - create_component(wuiinputnumber.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputnumber, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputnumber_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputnumber_changes.value = /*env*/ ctx[0].PruneDelay; - add_flush_callback(() => updating_value = false); - } - - wuiinputnumber.$set(wuiinputnumber_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputnumber.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputnumber.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputnumber, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_1.name, - type: "slot", - source: "(247:1) ", - ctx - }); - - return block; - } - - // (264:1) - function create_default_slot(ctx) { - let wuiinputnumber; - let updating_value; - let current; - - function wuiinputnumber_value_binding_4(value) { - /*wuiinputnumber_value_binding_4*/ ctx[15].call(null, value); - } - - let wuiinputnumber_props = { - min: "-36000", - max: "-3600", - unit: "seconds" - }; - - if (/*env*/ ctx[0].PruneThreshold !== void 0) { - wuiinputnumber_props.value = /*env*/ ctx[0].PruneThreshold; - } - - wuiinputnumber = new InputNumber({ - props: wuiinputnumber_props, - $$inline: true - }); - - binding_callbacks.push(() => bind(wuiinputnumber, "value", wuiinputnumber_value_binding_4)); - - const block = { - c: function create() { - create_component(wuiinputnumber.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(wuiinputnumber, target, anchor); - current = true; - }, - p: function update(ctx, dirty) { - const wuiinputnumber_changes = {}; - - if (!updating_value && dirty & /*env*/ 1) { - updating_value = true; - wuiinputnumber_changes.value = /*env*/ ctx[0].PruneThreshold; - add_flush_callback(() => updating_value = false); - } - - wuiinputnumber.$set(wuiinputnumber_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuiinputnumber.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuiinputnumber.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuiinputnumber, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot.name, - type: "slot", - source: "(264:1) ", - ctx - }); - - return block; - } - - function create_fragment$6(ctx) { - let div4; - let p; - let t1; - let h30; - let t3; - let div0; - let wuilabelhint0; - let t4; - let wuilabelhint1; - let t5; - let h31; - let t7; - let div1; - let wuilabelhint2; - let t8; - let t9; - let button0; - let t11; - let wuilabelhint3; - let t12; - let wuilabelhint4; - let t13; - let wuilabelhint5; - let t14; - let wuilabelhint6; - let t15; - let wuilabelhint7; - let t16; - let wuilabelhint8; - let t17; - let wuilabelhint9; - let t18; - let wuilabelhint10; - let t19; - let wuilabelhint11; - let t20; - let div3; - let div2; - let button1; - let current; - let mounted; - let dispose; - - wuilabelhint0 = new LabelHint({ - props: { - title: "System resolv.conf", - title_width: defTitleWidth, - info: "A path to dynamically generated resolv.conf(5) by\nresolvconf(8). If set, the nameserver values in referenced file will\nreplace 'parent' value and 'parent' will become a fallback in\ncase the referenced file being deleted or can not be parsed.", - $$slots: { default: [create_default_slot_11] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint1 = new LabelHint({ - props: { - title: "Debug level", - title_width: defTitleWidth, - info: "This option only used for debugging program or if user\nwant to monitor what kind of traffic goes in and out of rescached.", - $$slots: { default: [create_default_slot_10] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint2 = new LabelHint({ - props: { - title: "Parent name servers", - title_width: defTitleWidth, - info: "List of parent DNS servers." - }, - $$inline: true - }); - - let each_value = /*env*/ ctx[0].NameServers; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); - } - - wuilabelhint3 = new LabelHint({ - props: { - title: "Listen address", - title_width: defTitleWidth, - info: "Address in local network where rescached will\nlistening for query from client through UDP and TCP.\n
\nIf you want rescached to serve a query from another host in your local\nnetwork, change this value to 0.0.0.0:53.", - $$slots: { default: [create_default_slot_8] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint4 = new LabelHint({ - props: { - title: "HTTP listen port", - title_width: defTitleWidth, - info: "Port to serve DNS over HTTP", - $$slots: { default: [create_default_slot_7] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint5 = new LabelHint({ - props: { - title: "TLS listen port", - title_width: defTitleWidth, - info: "Port to listen for DNS over TLS", - $$slots: { default: [create_default_slot_6] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint6 = new LabelHint({ - props: { - title: "TLS certificate", - title_width: defTitleWidth, - info: "Path to certificate file to serve DNS over TLS and\nHTTPS", - $$slots: { default: [create_default_slot_5] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint7 = new LabelHint({ - props: { - title: "TLS private key", - title_width: defTitleWidth, - info: "Path to certificate private key file to serve DNS over TLS and\nHTTPS.", - $$slots: { default: [create_default_slot_4] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint8 = new LabelHint({ - props: { - title: "TLS allow insecure", - title_width: defTitleWidth, - info: "If its true, allow serving DoH and DoT with self signed\ncertificate.", - $$slots: { default: [create_default_slot_3] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint9 = new LabelHint({ - props: { - title: "DoH behind proxy", - title_width: defTitleWidth, - info: "If its true, serve DNS over HTTP only, even if\ncertificate files is defined.\nThis allow serving DNS request forwarded by another proxy server.", - $$slots: { default: [create_default_slot_2] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint10 = new LabelHint({ - props: { - title: "Prune delay", - title_width: defTitleWidth, - info: "Delay for pruning caches.\nEvery N seconds, rescached will traverse all caches and remove response that\nhas not been accessed less than cache.prune_threshold.\nIts value must be equal or greater than 1 hour (3600 seconds).\n", - $$slots: { default: [create_default_slot_1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint11 = new LabelHint({ - props: { - title: "Prune threshold", - title_width: defTitleWidth, - info: "The duration when the cache will be considered expired.\nIts value must be negative and greater or equal than -1 hour (-3600 seconds).", - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - }, - $$inline: true - }); - - const block = { - c: function create() { - div4 = element("div"); - p = element("p"); - p.textContent = "This page allow you to change the rescached environment.\nUpon save, the rescached service will be restarted."; - t1 = space(); - h30 = element("h3"); - h30.textContent = "rescached"; - t3 = space(); - div0 = element("div"); - create_component(wuilabelhint0.$$.fragment); - t4 = space(); - create_component(wuilabelhint1.$$.fragment); - t5 = space(); - h31 = element("h3"); - h31.textContent = "DNS server"; - t7 = space(); - div1 = element("div"); - create_component(wuilabelhint2.$$.fragment); - t8 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t9 = space(); - button0 = element("button"); - button0.textContent = "Add"; - t11 = space(); - create_component(wuilabelhint3.$$.fragment); - t12 = space(); - create_component(wuilabelhint4.$$.fragment); - t13 = space(); - create_component(wuilabelhint5.$$.fragment); - t14 = space(); - create_component(wuilabelhint6.$$.fragment); - t15 = space(); - create_component(wuilabelhint7.$$.fragment); - t16 = space(); - create_component(wuilabelhint8.$$.fragment); - t17 = space(); - create_component(wuilabelhint9.$$.fragment); - t18 = space(); - create_component(wuilabelhint10.$$.fragment); - t19 = space(); - create_component(wuilabelhint11.$$.fragment); - t20 = space(); - div3 = element("div"); - div2 = element("div"); - button1 = element("button"); - button1.textContent = "Save"; - add_location(p, file$6, 89, 0, 1747); - add_location(h30, file$6, 94, 0, 1866); - add_location(div0, file$6, 95, 0, 1885); - add_location(h31, file$6, 124, 0, 2595); - add_location(button0, file$6, 142, 1, 2928); - add_location(div1, file$6, 125, 0, 2615); - add_location(button1, file$6, 280, 3, 5859); - add_location(div2, file$6, 279, 2, 5850); - attr_dev(div3, "class", "section-bottom svelte-ivqrh9"); - add_location(div3, file$6, 278, 1, 5819); - attr_dev(div4, "class", "environment"); - add_location(div4, file$6, 88, 0, 1721); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div4, anchor); - append_dev(div4, p); - append_dev(div4, t1); - append_dev(div4, h30); - append_dev(div4, t3); - append_dev(div4, div0); - mount_component(wuilabelhint0, div0, null); - append_dev(div0, t4); - mount_component(wuilabelhint1, div0, null); - append_dev(div4, t5); - append_dev(div4, h31); - append_dev(div4, t7); - append_dev(div4, div1); - mount_component(wuilabelhint2, div1, null); - append_dev(div1, t8); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - append_dev(div1, t9); - append_dev(div1, button0); - append_dev(div1, t11); - mount_component(wuilabelhint3, div1, null); - append_dev(div1, t12); - mount_component(wuilabelhint4, div1, null); - append_dev(div1, t13); - mount_component(wuilabelhint5, div1, null); - append_dev(div1, t14); - mount_component(wuilabelhint6, div1, null); - append_dev(div1, t15); - mount_component(wuilabelhint7, div1, null); - append_dev(div1, t16); - mount_component(wuilabelhint8, div1, null); - append_dev(div1, t17); - mount_component(wuilabelhint9, div1, null); - append_dev(div1, t18); - mount_component(wuilabelhint10, div1, null); - append_dev(div1, t19); - mount_component(wuilabelhint11, div1, null); - append_dev(div4, t20); - append_dev(div4, div3); - append_dev(div3, div2); - append_dev(div2, button1); - current = true; - - if (!mounted) { - dispose = [ - listen_dev(button0, "click", /*addNameServer*/ ctx[1], false, false, false), - listen_dev(button1, "click", /*updateEnvironment*/ ctx[3], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - const wuilabelhint0_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint0_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint0.$set(wuilabelhint0_changes); - const wuilabelhint1_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint1_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint1.$set(wuilabelhint1_changes); - const wuilabelhint2_changes = {}; - - if (dirty & /*$$scope*/ 1048576) { - wuilabelhint2_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint2.$set(wuilabelhint2_changes); - - if (dirty & /*deleteNameServer, env*/ 5) { - each_value = /*env*/ ctx[0].NameServers; - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$2(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$2(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div1, t9); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - - const wuilabelhint3_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint3_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint3.$set(wuilabelhint3_changes); - const wuilabelhint4_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint4_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint4.$set(wuilabelhint4_changes); - const wuilabelhint5_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint5_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint5.$set(wuilabelhint5_changes); - const wuilabelhint6_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint6_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint6.$set(wuilabelhint6_changes); - const wuilabelhint7_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint7_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint7.$set(wuilabelhint7_changes); - const wuilabelhint8_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint8_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint8.$set(wuilabelhint8_changes); - const wuilabelhint9_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint9_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint9.$set(wuilabelhint9_changes); - const wuilabelhint10_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint10_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint10.$set(wuilabelhint10_changes); - const wuilabelhint11_changes = {}; - - if (dirty & /*$$scope, env*/ 1048577) { - wuilabelhint11_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint11.$set(wuilabelhint11_changes); - }, - i: function intro(local) { - if (current) return; - transition_in(wuilabelhint0.$$.fragment, local); - transition_in(wuilabelhint1.$$.fragment, local); - transition_in(wuilabelhint2.$$.fragment, local); - transition_in(wuilabelhint3.$$.fragment, local); - transition_in(wuilabelhint4.$$.fragment, local); - transition_in(wuilabelhint5.$$.fragment, local); - transition_in(wuilabelhint6.$$.fragment, local); - transition_in(wuilabelhint7.$$.fragment, local); - transition_in(wuilabelhint8.$$.fragment, local); - transition_in(wuilabelhint9.$$.fragment, local); - transition_in(wuilabelhint10.$$.fragment, local); - transition_in(wuilabelhint11.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuilabelhint0.$$.fragment, local); - transition_out(wuilabelhint1.$$.fragment, local); - transition_out(wuilabelhint2.$$.fragment, local); - transition_out(wuilabelhint3.$$.fragment, local); - transition_out(wuilabelhint4.$$.fragment, local); - transition_out(wuilabelhint5.$$.fragment, local); - transition_out(wuilabelhint6.$$.fragment, local); - transition_out(wuilabelhint7.$$.fragment, local); - transition_out(wuilabelhint8.$$.fragment, local); - transition_out(wuilabelhint9.$$.fragment, local); - transition_out(wuilabelhint10.$$.fragment, local); - transition_out(wuilabelhint11.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div4); - destroy_component(wuilabelhint0); - destroy_component(wuilabelhint1); - destroy_component(wuilabelhint2); - destroy_each(each_blocks, detaching); - destroy_component(wuilabelhint3); - destroy_component(wuilabelhint4); - destroy_component(wuilabelhint5); - destroy_component(wuilabelhint6); - destroy_component(wuilabelhint7); - destroy_component(wuilabelhint8); - destroy_component(wuilabelhint9); - destroy_component(wuilabelhint10); - destroy_component(wuilabelhint11); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$6.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const defTitleWidth = "300px"; - - function instance$6($$self, $$props, $$invalidate) { - let env = { - NameServers: [], - HostsBlocks: [], - HostsFiles: {} - }; - - const envUnsubscribe = environment.subscribe(value => { - $$invalidate(0, env = value); - }); - - onDestroy(envUnsubscribe); - - function addNameServer() { - $$invalidate(0, env.NameServers = [...env.NameServers, ""], env); - } - - function deleteNameServer(ns) { - for (let x = 0; x < env.NameServers.length; x++) { - if (env.NameServers[x] === ns) { - env.NameServers.splice(x, 1); - $$invalidate(0, env); - break; - } - } - } - - async function updateEnvironment() { - let got = {}; - Object.assign(got, env); - environment.set(env); - got.PruneDelay = got.PruneDelay * nanoSeconds; - got.PruneThreshold = got.PruneThreshold * nanoSeconds; - - const res = await fetch(apiEnvironment, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(got) - }); - - if (res.status >= 400) { - const resbody = await res.json(); - WuiPushNotif.Error("ERROR: ", resbody.message); - return; - } - - WuiPushNotif.Info("The environment succesfully updated ..."); - } - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("Environment", $$slots, []); - - function input_input_handler() { - env.FileResolvConf = this.value; - $$invalidate(0, env); - } - - function wuiinputnumber_value_binding(value) { - env.Debug = value; - $$invalidate(0, env); - } - - function input_input_handler_1(each_value, ns_index) { - each_value[ns_index] = this.value; - $$invalidate(0, env); - } - - function wuiinputipport_value_binding(value) { - env.ListenAddress = value; - $$invalidate(0, env); - } - - function wuiinputnumber_value_binding_1(value) { - env.HTTPPort = value; - $$invalidate(0, env); - } - - function wuiinputnumber_value_binding_2(value) { - env.TLSPort = value; - $$invalidate(0, env); - } - - function input_input_handler_2() { - env.TLSCertFile = this.value; - $$invalidate(0, env); - } - - function input_input_handler_3() { - env.TLSPrivateKey = this.value; - $$invalidate(0, env); - } - - function input_change_handler() { - env.TLSAllowInsecure = this.checked; - $$invalidate(0, env); - } - - function input_change_handler_1() { - env.DoHBehindProxy = this.checked; - $$invalidate(0, env); - } - - function wuiinputnumber_value_binding_3(value) { - env.PruneDelay = value; - $$invalidate(0, env); - } - - function wuiinputnumber_value_binding_4(value) { - env.PruneThreshold = value; - $$invalidate(0, env); - } - - $$self.$capture_state = () => ({ - onDestroy, - apiEnvironment, - environment, - nanoSeconds, - WuiPushNotif, - WuiLabelHint: LabelHint, - WuiInputNumber: InputNumber, - WuiInputIPPort: InputIPPort, - env, - envUnsubscribe, - defTitleWidth, - addNameServer, - deleteNameServer, - updateEnvironment - }); - - $$self.$inject_state = $$props => { - if ("env" in $$props) $$invalidate(0, env = $$props.env); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - env, - addNameServer, - deleteNameServer, - updateEnvironment, - input_input_handler, - wuiinputnumber_value_binding, - input_input_handler_1, - wuiinputipport_value_binding, - wuiinputnumber_value_binding_1, - wuiinputnumber_value_binding_2, - input_input_handler_2, - input_input_handler_3, - input_change_handler, - input_change_handler_1, - wuiinputnumber_value_binding_3, - wuiinputnumber_value_binding_4 - ]; - } - - class Environment extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$6, create_fragment$6, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "Environment", - options, - id: create_fragment$6.name - }); - } - } - - /* src/HostsBlock.svelte generated by Svelte v3.24.1 */ - const file$7 = "src/HostsBlock.svelte"; - - function get_each_context$3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[5] = list[i]; - child_ctx[6] = list; - child_ctx[7] = i; - return child_ctx; - } - - // (83:2) {#each env.HostsBlocks as hostsBlock} - function create_each_block$3(ctx) { - let div; - let span0; - let input0; - let t0; - let span1; - let t1_value = /*hostsBlock*/ ctx[5].Name + ""; - let t1; - let t2; - let span2; - let input1; - let t3; - let span3; - let t4_value = /*hostsBlock*/ ctx[5].LastUpdated + ""; - let t4; - let t5; - let mounted; - let dispose; - - function input0_change_handler() { - /*input0_change_handler*/ ctx[2].call(input0, /*each_value*/ ctx[6], /*hostsBlock_index*/ ctx[7]); - } - - function input1_input_handler() { - /*input1_input_handler*/ ctx[3].call(input1, /*each_value*/ ctx[6], /*hostsBlock_index*/ ctx[7]); - } - - const block = { - c: function create() { - div = element("div"); - span0 = element("span"); - input0 = element("input"); - t0 = space(); - span1 = element("span"); - t1 = text(t1_value); - t2 = space(); - span2 = element("span"); - input1 = element("input"); - t3 = space(); - span3 = element("span"); - t4 = text(t4_value); - t5 = space(); - attr_dev(input0, "type", "checkbox"); - attr_dev(input0, "class", "svelte-ze2due"); - add_location(input0, file$7, 85, 4, 1632); - attr_dev(span0, "class", "svelte-ze2due"); - add_location(span0, file$7, 84, 3, 1621); - attr_dev(span1, "class", "svelte-ze2due"); - add_location(span1, file$7, 90, 3, 1719); - input1.disabled = true; - attr_dev(input1, "class", "svelte-ze2due"); - add_location(input1, file$7, 94, 4, 1773); - attr_dev(span2, "class", "svelte-ze2due"); - add_location(span2, file$7, 93, 3, 1762); - attr_dev(span3, "class", "svelte-ze2due"); - add_location(span3, file$7, 99, 3, 1847); - attr_dev(div, "class", "item svelte-ze2due"); - add_location(div, file$7, 83, 2, 1599); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(span0, input0); - input0.checked = /*hostsBlock*/ ctx[5].IsEnabled; - append_dev(div, t0); - append_dev(div, span1); - append_dev(span1, t1); - append_dev(div, t2); - append_dev(div, span2); - append_dev(span2, input1); - set_input_value(input1, /*hostsBlock*/ ctx[5].URL); - append_dev(div, t3); - append_dev(div, span3); - append_dev(span3, t4); - append_dev(div, t5); - - if (!mounted) { - dispose = [ - listen_dev(input0, "change", input0_change_handler), - listen_dev(input1, "input", input1_input_handler) - ]; - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (dirty & /*env*/ 1) { - input0.checked = /*hostsBlock*/ ctx[5].IsEnabled; - } - - if (dirty & /*env*/ 1 && t1_value !== (t1_value = /*hostsBlock*/ ctx[5].Name + "")) set_data_dev(t1, t1_value); - - if (dirty & /*env*/ 1 && input1.value !== /*hostsBlock*/ ctx[5].URL) { - set_input_value(input1, /*hostsBlock*/ ctx[5].URL); - } - - if (dirty & /*env*/ 1 && t4_value !== (t4_value = /*hostsBlock*/ ctx[5].LastUpdated + "")) set_data_dev(t4, t4_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$3.name, - type: "each", - source: "(83:2) {#each env.HostsBlocks as hostsBlock}", - ctx - }); - - return block; - } - - function create_fragment$7(ctx) { - let div3; - let p; - let t1; - let div1; - let div0; - let span0; - let t3; - let span1; - let t5; - let span2; - let t7; - let span3; - let t9; - let t10; - let div2; - let button; - let mounted; - let dispose; - let each_value = /*env*/ ctx[0].HostsBlocks; - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i)); - } - - const block = { - c: function create() { - div3 = element("div"); - p = element("p"); - p.textContent = "Configure the source of blocked hosts file."; - t1 = space(); - div1 = element("div"); - div0 = element("div"); - span0 = element("span"); - span0.textContent = "Enabled"; - t3 = space(); - span1 = element("span"); - span1.textContent = "Name"; - t5 = space(); - span2 = element("span"); - span2.textContent = "URL"; - t7 = space(); - span3 = element("span"); - span3.textContent = "Last updated"; - t9 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t10 = space(); - div2 = element("div"); - button = element("button"); - button.textContent = "Save"; - add_location(p, file$7, 71, 1, 1334); - attr_dev(span0, "class", "svelte-ze2due"); - add_location(span0, file$7, 77, 3, 1449); - attr_dev(span1, "class", "svelte-ze2due"); - add_location(span1, file$7, 78, 3, 1475); - attr_dev(span2, "class", "svelte-ze2due"); - add_location(span2, file$7, 79, 3, 1498); - attr_dev(span3, "class", "svelte-ze2due"); - add_location(span3, file$7, 80, 3, 1520); - attr_dev(div0, "class", "item header svelte-ze2due"); - add_location(div0, file$7, 76, 2, 1420); - attr_dev(div1, "class", "block_source svelte-ze2due"); - add_location(div1, file$7, 75, 1, 1391); - add_location(button, file$7, 107, 2, 1931); - add_location(div2, file$7, 106, 1, 1923); - attr_dev(div3, "class", "hosts-block"); - add_location(div3, file$7, 70, 0, 1307); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div3, anchor); - append_dev(div3, p); - append_dev(div3, t1); - append_dev(div3, div1); - append_dev(div1, div0); - append_dev(div0, span0); - append_dev(div0, t3); - append_dev(div0, span1); - append_dev(div0, t5); - append_dev(div0, span2); - append_dev(div0, t7); - append_dev(div0, span3); - append_dev(div1, t9); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - append_dev(div3, t10); - append_dev(div3, div2); - append_dev(div2, button); - - if (!mounted) { - dispose = listen_dev(button, "click", /*updateHostsBlocks*/ ctx[1], false, false, false); - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*env*/ 1) { - each_value = /*env*/ ctx[0].HostsBlocks; - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$3(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$3(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div1, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div3); - destroy_each(each_blocks, detaching); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$7.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const apiHostsBlock = "/api/hosts_block"; - - function instance$7($$self, $$props, $$invalidate) { - let env = { - NameServers: [], - HostsBlocks: [], - HostsFiles: {} - }; - - const envUnsubscribe = environment.subscribe(value => { - $$invalidate(0, env = value); - }); - - onDestroy(envUnsubscribe); - - async function updateHostsBlocks() { - const res = await fetch(apiHostsBlock, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(env.HostsBlocks) - }); - - if (res.status >= 400) { - WuiPushNotif.Error("ERROR: ", res.status, res.statusText); - return; - } - - setEnvironment(await res.json()); - } - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("HostsBlock", $$slots, []); - - function input0_change_handler(each_value, hostsBlock_index) { - each_value[hostsBlock_index].IsEnabled = this.checked; - $$invalidate(0, env); - } - - function input1_input_handler(each_value, hostsBlock_index) { - each_value[hostsBlock_index].URL = this.value; - $$invalidate(0, env); - } - - $$self.$capture_state = () => ({ - onDestroy, - WuiPushNotif, - environment, - nanoSeconds, - setEnvironment, - apiHostsBlock, - env, - envUnsubscribe, - updateHostsBlocks - }); - - $$self.$inject_state = $$props => { - if ("env" in $$props) $$invalidate(0, env = $$props.env); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [env, updateHostsBlocks, input0_change_handler, input1_input_handler]; - } - - class HostsBlock extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$7, create_fragment$7, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "HostsBlock", - options, - id: create_fragment$7.name - }); - } - } - - /* src/HostsDir.svelte generated by Svelte v3.24.1 */ - - const { Object: Object_1$1 } = globals; - const file$8 = "src/HostsDir.svelte"; - - function get_each_context$4(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[15] = list[i]; - child_ctx[17] = i; - return child_ctx; - } - - function get_each_context_1$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[18] = list[i][0]; - child_ctx[19] = list[i][1]; - child_ctx[18] = i; - return child_ctx; - } - - // (178:2) {#each Object.entries(env.HostsFiles) as [name,hf], name } - function create_each_block_1$1(ctx) { - let div; - let a; - let t_value = /*hf*/ ctx[19].Name + ""; - let t; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - a = element("a"); - t = text(t_value); - attr_dev(a, "href", "#"); - add_location(a, file$8, 179, 3, 3810); - attr_dev(div, "class", "item svelte-1w15y7z"); - add_location(div, file$8, 178, 2, 3788); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, a); - append_dev(a, t); - - if (!mounted) { - dispose = listen_dev( - a, - "click", - function () { - if (is_function(/*getHostsFile*/ ctx[4](/*hf*/ ctx[19]))) /*getHostsFile*/ ctx[4](/*hf*/ ctx[19]).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*env*/ 1 && t_value !== (t_value = /*hf*/ ctx[19].Name + "")) set_data_dev(t, t_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1$1.name, - type: "each", - source: "(178:2) {#each Object.entries(env.HostsFiles) as [name,hf], name }", - ctx - }); - - return block; - } - - // (203:2) {:else} - function create_else_block(ctx) { - let p; - let t0_value = /*hostsFile*/ ctx[1].Name + ""; - let t0; - let t1; - let t2_value = /*hostsFile*/ ctx[1].Records.length + ""; - let t2; - let t3; - let button0; - let t5; - let div0; - let button1; - let t7; - let t8; - let div1; - let span0; - let t10; - let span1; - let t12; - let each_blocks = []; - let each_1_lookup = new Map(); - let each_1_anchor; - let mounted; - let dispose; - let if_block = /*newRecord*/ ctx[2] !== null && create_if_block_1$1(ctx); - let each_value = /*hostsFile*/ ctx[1].Records; - validate_each_argument(each_value); - const get_key = ctx => /*idx*/ ctx[17]; - validate_each_keys(ctx, each_value, get_each_context$4, get_key); - - for (let i = 0; i < each_value.length; i += 1) { - let child_ctx = get_each_context$4(ctx, each_value, i); - let key = get_key(child_ctx); - each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx)); - } - - const block = { - c: function create() { - p = element("p"); - t0 = text(t0_value); - t1 = text(" ("); - t2 = text(t2_value); - t3 = text(" records)\n\t\t\t\t"); - button0 = element("button"); - button0.textContent = "Delete"; - t5 = space(); - div0 = element("div"); - button1 = element("button"); - button1.textContent = "Add"; - t7 = space(); - if (if_block) if_block.c(); - t8 = space(); - div1 = element("div"); - span0 = element("span"); - span0.textContent = "Domain name"; - t10 = space(); - span1 = element("span"); - span1.textContent = "IP address"; - t12 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - add_location(button0, file$8, 205, 4, 4265); - add_location(p, file$8, 203, 3, 4199); - add_location(button1, file$8, 210, 4, 4359); - add_location(div0, file$8, 209, 3, 4349); - attr_dev(span0, "class", "host_name svelte-1w15y7z"); - add_location(span0, file$8, 234, 4, 4824); - attr_dev(span1, "class", "host_value svelte-1w15y7z"); - add_location(span1, file$8, 235, 4, 4873); - attr_dev(div1, "class", "host header svelte-1w15y7z"); - add_location(div1, file$8, 233, 3, 4794); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - append_dev(p, t0); - append_dev(p, t1); - append_dev(p, t2); - append_dev(p, t3); - append_dev(p, button0); - insert_dev(target, t5, anchor); - insert_dev(target, div0, anchor); - append_dev(div0, button1); - insert_dev(target, t7, anchor); - if (if_block) if_block.m(target, anchor); - insert_dev(target, t8, anchor); - insert_dev(target, div1, anchor); - append_dev(div1, span0); - append_dev(div1, t10); - append_dev(div1, span1); - insert_dev(target, t12, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - - if (!mounted) { - dispose = [ - listen_dev( - button0, - "click", - function () { - if (is_function(/*deleteHostsFile*/ ctx[9](/*hostsFile*/ ctx[1]))) /*deleteHostsFile*/ ctx[9](/*hostsFile*/ ctx[1]).apply(this, arguments); - }, - false, - false, - false - ), - listen_dev(button1, "click", /*addRecord*/ ctx[6], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*hostsFile*/ 2 && t0_value !== (t0_value = /*hostsFile*/ ctx[1].Name + "")) set_data_dev(t0, t0_value); - if (dirty & /*hostsFile*/ 2 && t2_value !== (t2_value = /*hostsFile*/ ctx[1].Records.length + "")) set_data_dev(t2, t2_value); - - if (/*newRecord*/ ctx[2] !== null) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block_1$1(ctx); - if_block.c(); - if_block.m(t8.parentNode, t8); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - - if (dirty & /*handleHostsRecordDelete, hostsFile*/ 258) { - const each_value = /*hostsFile*/ ctx[1].Records; - validate_each_argument(each_value); - validate_each_keys(ctx, each_value, get_each_context$4, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, destroy_block, create_each_block$4, each_1_anchor, get_each_context$4); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - if (detaching) detach_dev(t5); - if (detaching) detach_dev(div0); - if (detaching) detach_dev(t7); - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(t8); - if (detaching) detach_dev(div1); - if (detaching) detach_dev(t12); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].d(detaching); - } - - if (detaching) detach_dev(each_1_anchor); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block.name, - type: "else", - source: "(203:2) {:else}", - ctx - }); - - return block; - } - - // (199:2) {#if hostsFile.Name === ""} - function create_if_block$4(ctx) { - let div; - - const block = { - c: function create() { - div = element("div"); - div.textContent = "Select one of the hosts file to manage."; - add_location(div, file$8, 199, 3, 4126); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$4.name, - type: "if", - source: "(199:2) {#if hostsFile.Name === \\\"\\\"}", - ctx - }); - - return block; - } - - // (216:3) {#if newRecord !== null} - function create_if_block_1$1(ctx) { - let div; - let input0; - let t0; - let input1; - let t1; - let button; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - input0 = element("input"); - t0 = space(); - input1 = element("input"); - t1 = space(); - button = element("button"); - button.textContent = "Create"; - attr_dev(input0, "class", "host_name svelte-1w15y7z"); - attr_dev(input0, "placeholder", "Domain name"); - add_location(input0, file$8, 217, 5, 4479); - attr_dev(input1, "class", "host_value svelte-1w15y7z"); - attr_dev(input1, "placeholder", "IP address"); - add_location(input1, file$8, 222, 5, 4588); - add_location(button, file$8, 227, 5, 4698); - attr_dev(div, "class", "host svelte-1w15y7z"); - add_location(div, file$8, 216, 4, 4455); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, input0); - set_input_value(input0, /*newRecord*/ ctx[2].Name); - append_dev(div, t0); - append_dev(div, input1); - set_input_value(input1, /*newRecord*/ ctx[2].Value); - append_dev(div, t1); - append_dev(div, button); - - if (!mounted) { - dispose = [ - listen_dev(input0, "input", /*input0_input_handler*/ ctx[11]), - listen_dev(input1, "input", /*input1_input_handler*/ ctx[12]), - listen_dev(button, "click", /*handleHostsRecordCreate*/ ctx[7], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*newRecord*/ 4 && input0.value !== /*newRecord*/ ctx[2].Name) { - set_input_value(input0, /*newRecord*/ ctx[2].Name); - } - - if (dirty & /*newRecord*/ 4 && input1.value !== /*newRecord*/ ctx[2].Value) { - set_input_value(input1, /*newRecord*/ ctx[2].Value); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1$1.name, - type: "if", - source: "(216:3) {#if newRecord !== null}", - ctx - }); - - return block; - } - - // (239:3) {#each hostsFile.Records as rr, idx (idx)} - function create_each_block$4(key_1, ctx) { - let div; - let span0; - let t0_value = /*rr*/ ctx[15].Name + ""; - let t0; - let t1; - let span1; - let t2_value = /*rr*/ ctx[15].Value + ""; - let t2; - let t3; - let button; - let t5; - let mounted; - let dispose; - - const block = { - key: key_1, - first: null, - c: function create() { - div = element("div"); - span0 = element("span"); - t0 = text(t0_value); - t1 = space(); - span1 = element("span"); - t2 = text(t2_value); - t3 = space(); - button = element("button"); - button.textContent = "X"; - t5 = space(); - attr_dev(span0, "class", "host_name svelte-1w15y7z"); - add_location(span0, file$8, 240, 5, 5003); - attr_dev(span1, "class", "host_value svelte-1w15y7z"); - add_location(span1, file$8, 241, 5, 5051); - add_location(button, file$8, 242, 5, 5101); - attr_dev(div, "class", "host svelte-1w15y7z"); - add_location(div, file$8, 239, 4, 4979); - this.first = div; - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(span0, t0); - append_dev(div, t1); - append_dev(div, span1); - append_dev(span1, t2); - append_dev(div, t3); - append_dev(div, button); - append_dev(div, t5); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*handleHostsRecordDelete*/ ctx[8](/*rr*/ ctx[15], /*idx*/ ctx[17]))) /*handleHostsRecordDelete*/ ctx[8](/*rr*/ ctx[15], /*idx*/ ctx[17]).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*hostsFile*/ 2 && t0_value !== (t0_value = /*rr*/ ctx[15].Name + "")) set_data_dev(t0, t0_value); - if (dirty & /*hostsFile*/ 2 && t2_value !== (t2_value = /*rr*/ ctx[15].Value + "")) set_data_dev(t2, t2_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$4.name, - type: "each", - source: "(239:3) {#each hostsFile.Records as rr, idx (idx)}", - ctx - }); - - return block; - } - - function create_fragment$8(ctx) { - let div2; - let div0; - let t0; - let br0; - let t1; - let label; - let span; - let t3; - let br1; - let t4; - let input; - let t5; - let button; - let t7; - let div1; - let mounted; - let dispose; - let each_value_1 = Object.entries(/*env*/ ctx[0].HostsFiles); - validate_each_argument(each_value_1); - let each_blocks = []; - - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks[i] = create_each_block_1$1(get_each_context_1$1(ctx, each_value_1, i)); - } - - function select_block_type(ctx, dirty) { - if (/*hostsFile*/ ctx[1].Name === "") return create_if_block$4; - return create_else_block; - } - - let current_block_type = select_block_type(ctx); - let if_block = current_block_type(ctx); - - const block = { - c: function create() { - div2 = element("div"); - div0 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t0 = space(); - br0 = element("br"); - t1 = space(); - label = element("label"); - span = element("span"); - span.textContent = "New hosts file:"; - t3 = space(); - br1 = element("br"); - t4 = space(); - input = element("input"); - t5 = space(); - button = element("button"); - button.textContent = "Create"; - t7 = space(); - div1 = element("div"); - if_block.c(); - add_location(br0, file$8, 185, 2, 3895); - add_location(span, file$8, 188, 3, 3915); - add_location(br1, file$8, 189, 3, 3947); - add_location(input, file$8, 190, 3, 3956); - add_location(label, file$8, 187, 2, 3904); - add_location(button, file$8, 192, 2, 4003); - attr_dev(div0, "class", "nav-left svelte-1w15y7z"); - add_location(div0, file$8, 176, 1, 3702); - attr_dev(div1, "class", "content svelte-1w15y7z"); - add_location(div1, file$8, 197, 1, 4071); - attr_dev(div2, "class", "hosts_d"); - add_location(div2, file$8, 175, 0, 3679); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div0); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - - append_dev(div0, t0); - append_dev(div0, br0); - append_dev(div0, t1); - append_dev(div0, label); - append_dev(label, span); - append_dev(label, t3); - append_dev(label, br1); - append_dev(label, t4); - append_dev(label, input); - set_input_value(input, /*newHostsFile*/ ctx[3]); - append_dev(div0, t5); - append_dev(div0, button); - append_dev(div2, t7); - append_dev(div2, div1); - if_block.m(div1, null); - - if (!mounted) { - dispose = [ - listen_dev(input, "input", /*input_input_handler*/ ctx[10]), - listen_dev(button, "click", /*createHostsFile*/ ctx[5], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*getHostsFile, Object, env*/ 17) { - each_value_1 = Object.entries(/*env*/ ctx[0].HostsFiles); - validate_each_argument(each_value_1); - let i; - - for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1$1(ctx, each_value_1, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_1$1(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div0, t0); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_1.length; - } - - if (dirty & /*newHostsFile*/ 8 && input.value !== /*newHostsFile*/ ctx[3]) { - set_input_value(input, /*newHostsFile*/ ctx[3]); - } - - if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { - if_block.p(ctx, dirty); - } else { - if_block.d(1); - if_block = current_block_type(ctx); - - if (if_block) { - if_block.c(); - if_block.m(div1, null); - } - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - destroy_each(each_blocks, detaching); - if_block.d(); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$8.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const apiHostsDir = "/api/hosts.d"; - - function instance$8($$self, $$props, $$invalidate) { - let env = { HostsFiles: {} }; - let hostsFile = { Name: "", Records: [] }; - let newRecord = null; - let newHostsFile = ""; - - const envUnsubscribe = environment.subscribe(value => { - $$invalidate(0, env = value); - }); - - onDestroy(envUnsubscribe); - - async function getHostsFile(hf) { - if (hf.Records === null) { - hf.Records = []; - } - - if (hf.Records.length > 0) { - $$invalidate(1, hostsFile = hf); - return; - } - - const res = await fetch(apiHostsDir + "/" + hf.Name); - hf.Records = await res.json(); - $$invalidate(1, hostsFile = hf); - } - - async function createHostsFile() { - if (newHostsFile === "") { - return; - } - - const res = await fetch(apiHostsDir + "/" + newHostsFile, { method: "PUT" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: createHostsFile: ", resError.message); - return; - } - - const hf = { Name: newHostsFile, Records: [] }; - $$invalidate(0, env.HostsFiles[newHostsFile] = hf, env); - $$invalidate(0, env); - WuiPushNotif.Info("The new host file '" + newHostsFile + "' has been created"); - } - - async function updateHostsFile() { - const res = await fetch(apiHostsDir + "/" + hostsFile.Name, { - method: "POST", - body: JSON.stringify(hostsFile.Records) - }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: updateHostsFile: ", resError.message); - return; - } - - $$invalidate(1, hostsFile.Records = await res.json(), hostsFile); - WuiPushNotif.Info("The host file '" + hostsFile.Name + "' has been updated"); - } - - function addRecord() { - if (newRecord !== null) { - return; - } - - $$invalidate(2, newRecord = { Name: "", Value: "" }); - } - - async function handleHostsRecordCreate() { - const api = apiHostsDir + "/" + hostsFile.Name + "/rr" + "?domain=" + newRecord.Name + "&value=" + newRecord.Value; - const res = await fetch(api, { method: "POST" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: " + resError.message); - return; - } - - const rr = await res.json(); - hostsFile.Records.push(rr); - $$invalidate(1, hostsFile); - $$invalidate(2, newRecord = null); - WuiPushNotif.Info("Record '" + rr.Name + "' has been created"); - } - - async function handleHostsRecordDelete(rr, idx) { - const api = apiHostsDir + "/" + hostsFile.Name + "/rr" + "?domain=" + rr.Name; - const res = await fetch(api, { method: "DELETE" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: " + resError.message); - return; - } - - hostsFile.Records.splice(idx, 1); - $$invalidate(1, hostsFile); - WuiPushNotif.Info("Record '" + rr.Name + "' has been deleted"); - } - - async function deleteHostsFile(hfile) { - const res = await fetch(apiHostsDir + "/" + hfile.Name, { method: "DELETE" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: deleteHostsFile: ", resError.message); - return; - } - - delete env.HostsFiles[hfile.Name]; - $$invalidate(0, env); - $$invalidate(1, hostsFile = { Name: "", Records: [] }); - WuiPushNotif.Info("The host file '" + hfile.Name + "' has been deleted"); - } - - const writable_props = []; - - Object_1$1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("HostsDir", $$slots, []); - - function input_input_handler() { - newHostsFile = this.value; - $$invalidate(3, newHostsFile); - } - - function input0_input_handler() { - newRecord.Name = this.value; - $$invalidate(2, newRecord); - } - - function input1_input_handler() { - newRecord.Value = this.value; - $$invalidate(2, newRecord); - } - - $$self.$capture_state = () => ({ - onDestroy, - WuiPushNotif, - apiEnvironment, - environment, - nanoSeconds, - apiHostsDir, - env, - hostsFile, - newRecord, - newHostsFile, - envUnsubscribe, - getHostsFile, - createHostsFile, - updateHostsFile, - addRecord, - handleHostsRecordCreate, - handleHostsRecordDelete, - deleteHostsFile - }); - - $$self.$inject_state = $$props => { - if ("env" in $$props) $$invalidate(0, env = $$props.env); - if ("hostsFile" in $$props) $$invalidate(1, hostsFile = $$props.hostsFile); - if ("newRecord" in $$props) $$invalidate(2, newRecord = $$props.newRecord); - if ("newHostsFile" in $$props) $$invalidate(3, newHostsFile = $$props.newHostsFile); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - env, - hostsFile, - newRecord, - newHostsFile, - getHostsFile, - createHostsFile, - addRecord, - handleHostsRecordCreate, - handleHostsRecordDelete, - deleteHostsFile, - input_input_handler, - input0_input_handler, - input1_input_handler - ]; - } - - class HostsDir extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$8, create_fragment$8, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "HostsDir", - options, - id: create_fragment$8.name - }); - } - } - - /* src/MasterDir.svelte generated by Svelte v3.24.1 */ - - const { Object: Object_1$2 } = globals; - const file$9 = "src/MasterDir.svelte"; - - function get_each_context$5(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[32] = list[i][0]; - child_ctx[33] = list[i][1]; - return child_ctx; - } - - function get_each_context_2$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[40] = list[i]; - child_ctx[42] = i; - return child_ctx; - } - - function get_each_context_1$2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[36] = list[i][0]; - child_ctx[37] = list[i][1]; - return child_ctx; - } - - function get_each_context_3$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[43] = list[i][0]; - child_ctx[44] = list[i][1]; - return child_ctx; - } - - // (282:2) {#each Object.entries(env.ZoneFiles) as [name, zoneFile]} - function create_each_block_3$1(ctx) { - let div; - let span; - let t_value = /*zoneFile*/ ctx[44].Name + ""; - let t; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - span = element("span"); - t = text(t_value); - add_location(span, file$9, 283, 4, 5107); - attr_dev(div, "class", "item svelte-yu4l71"); - add_location(div, file$9, 282, 3, 5084); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span); - append_dev(span, t); - - if (!mounted) { - dispose = listen_dev( - span, - "click", - function () { - if (is_function(/*setActiveZone*/ ctx[6](/*zoneFile*/ ctx[44]))) /*setActiveZone*/ ctx[6](/*zoneFile*/ ctx[44]).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty[0] & /*env*/ 1 && t_value !== (t_value = /*zoneFile*/ ctx[44].Name + "")) set_data_dev(t, t_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_3$1.name, - type: "each", - source: "(282:2) {#each Object.entries(env.ZoneFiles) as [name, zoneFile]}", - ctx - }); - - return block; - } - - // (306:2) {:else} - function create_else_block$1(ctx) { - let h3; - let t0_value = /*activeZone*/ ctx[2].Name + ""; - let t0; - let t1; - let button0; - let t3; - let h40; - let t4; - let button1; - let t6; - let div1; - let wuilabelhint0; - let t7; - let wuilabelhint1; - let t8; - let wuilabelhint2; - let t9; - let wuilabelhint3; - let t10; - let wuilabelhint4; - let t11; - let wuilabelhint5; - let t12; - let wuilabelhint6; - let t13; - let div0; - let button2; - let t15; - let h41; - let t17; - let div2; - let span0; - let t19; - let span1; - let t21; - let span2; - let t23; - let t24; - let form; - let label; - let span3; - let t26; - let select; - let t27; - let t28; - let div3; - let button3; - let current; - let mounted; - let dispose; - - wuilabelhint0 = new LabelHint({ - props: { - title: "Name server", - title_width: "150px", - info: "The domain-name of the name server that was the\noriginal or primary source of data for this zone.\nIt should be domain-name where the rescached run.", - $$slots: { default: [create_default_slot_6$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint1 = new LabelHint({ - props: { - title: "Admin email", - title_width: "150px", - info: "Email address of the administrator responsible for\nthis zone.\nThe \"@\" on email address is replaced with dot, and if there is a dot before\n\"@\" it should be escaped with \"\\\".\nFor example, \"dns.admin@domain.tld\" would be written as\n\"dns\\.admin.domain.tld\".", - $$slots: { default: [create_default_slot_5$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint2 = new LabelHint({ - props: { - title: "Serial", - title_width: "150px", - info: "Serial number for this zone. If a secondary name\nserver observes an increase in this number, the server will assume that the\nzone has been updated and initiate a zone transfer.", - $$slots: { default: [create_default_slot_4$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint3 = new LabelHint({ - props: { - title: "Refresh", - title_width: "150px", - info: "Number of seconds after which secondary name servers\nshould query the master for the SOA record, to detect zone changes.\nRecommendation for small and stable zones is 86400 seconds (24 hours).", - $$slots: { default: [create_default_slot_3$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint4 = new LabelHint({ - props: { - title: "Retry", - title_width: "150px", - info: "Number of seconds after which secondary name servers\nshould retry to request the serial number from the master if the master does\nnot respond.\nIt must be less than Refresh.\nRecommendation for small and stable zones is 7200 seconds (2 hours).", - $$slots: { default: [create_default_slot_2$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint5 = new LabelHint({ - props: { - title: "Expire", - title_width: "150px", - info: "Number of seconds after which secondary name servers\nshould stop answering request for this zone if the master does not respond.\nThis value must be bigger than the sum of Refresh and Retry.\nRecommendation for small and stable zones is 3600000 seconds (1000 hours).", - $$slots: { default: [create_default_slot_1$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - wuilabelhint6 = new LabelHint({ - props: { - title: "Minimum", - title_width: "150px", - info: "Time to live for purposes of negative caching.\nRecommendation for small and stable zones is 1800 seconds (30 min).", - $$slots: { default: [create_default_slot$1] }, - $$scope: { ctx } - }, - $$inline: true - }); - - let each_value_1 = Object.entries(/*activeZone*/ ctx[2].Records); - validate_each_argument(each_value_1); - let each_blocks_1 = []; - - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1$2(get_each_context_1$2(ctx, each_value_1, i)); - } - - let each_value = Object.entries(/*RRTypes*/ ctx[5]); - validate_each_argument(each_value); - let each_blocks = []; - - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i)); - } - - function select_block_type_1(ctx, dirty) { - if (/*_rr*/ ctx[3].Type === 1 || /*_rr*/ ctx[3].Type === 2 || /*_rr*/ ctx[3].Type === 5 || /*_rr*/ ctx[3].Type === 16 || /*_rr*/ ctx[3].Type === 28) return create_if_block_1$2; - if (/*_rr*/ ctx[3].Type === 12) return create_if_block_2$1; - if (/*_rr*/ ctx[3].Type === 15) return create_if_block_3; - } - - let current_block_type = select_block_type_1(ctx); - let if_block = current_block_type && current_block_type(ctx); - - const block = { - c: function create() { - h3 = element("h3"); - t0 = text(t0_value); - t1 = space(); - button0 = element("button"); - button0.textContent = "Delete"; - t3 = space(); - h40 = element("h4"); - t4 = text("SOA record\n\t\t\t\t"); - button1 = element("button"); - button1.textContent = "Delete"; - t6 = space(); - div1 = element("div"); - create_component(wuilabelhint0.$$.fragment); - t7 = space(); - create_component(wuilabelhint1.$$.fragment); - t8 = space(); - create_component(wuilabelhint2.$$.fragment); - t9 = space(); - create_component(wuilabelhint3.$$.fragment); - t10 = space(); - create_component(wuilabelhint4.$$.fragment); - t11 = space(); - create_component(wuilabelhint5.$$.fragment); - t12 = space(); - create_component(wuilabelhint6.$$.fragment); - t13 = space(); - div0 = element("div"); - button2 = element("button"); - button2.textContent = "Save"; - t15 = space(); - h41 = element("h4"); - h41.textContent = "List records"; - t17 = space(); - div2 = element("div"); - span0 = element("span"); - span0.textContent = "Name"; - t19 = space(); - span1 = element("span"); - span1.textContent = "Type"; - t21 = space(); - span2 = element("span"); - span2.textContent = "Value"; - t23 = space(); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - - t24 = space(); - form = element("form"); - label = element("label"); - span3 = element("span"); - span3.textContent = "Type:"; - t26 = space(); - select = element("select"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t27 = space(); - if (if_block) if_block.c(); - t28 = space(); - div3 = element("div"); - button3 = element("button"); - button3.textContent = "Create"; - attr_dev(button0, "class", "action-delete svelte-yu4l71"); - add_location(button0, file$9, 308, 4, 5538); - add_location(h3, file$9, 306, 3, 5507); - attr_dev(button1, "class", "action-delete svelte-yu4l71"); - add_location(button1, file$9, 318, 4, 5679); - attr_dev(h40, "class", "svelte-yu4l71"); - add_location(h40, file$9, 316, 3, 5655); - attr_dev(button2, "class", "svelte-yu4l71"); - add_location(button2, file$9, 415, 5, 8540); - attr_dev(div0, "class", "actions svelte-yu4l71"); - add_location(div0, file$9, 414, 4, 8513); - attr_dev(div1, "class", "rr-soa"); - add_location(div1, file$9, 325, 3, 5790); - attr_dev(h41, "class", "svelte-yu4l71"); - add_location(h41, file$9, 421, 3, 8625); - attr_dev(span0, "class", "name svelte-yu4l71"); - add_location(span0, file$9, 423, 4, 8680); - attr_dev(span1, "class", "type svelte-yu4l71"); - add_location(span1, file$9, 426, 4, 8726); - attr_dev(span2, "class", "value svelte-yu4l71"); - add_location(span2, file$9, 429, 4, 8772); - attr_dev(div2, "class", "rr header svelte-yu4l71"); - add_location(div2, file$9, 422, 3, 8652); - attr_dev(span3, "class", "svelte-yu4l71"); - add_location(span3, file$9, 455, 5, 9310); - if (/*_rr*/ ctx[3].Type === void 0) add_render_callback(() => /*select_change_handler*/ ctx[23].call(select)); - add_location(select, file$9, 458, 5, 9347); - attr_dev(label, "class", "svelte-yu4l71"); - add_location(label, file$9, 454, 4, 9297); - attr_dev(button3, "class", "create svelte-yu4l71"); - attr_dev(button3, "type", "submit"); - add_location(button3, file$9, 524, 5, 10707); - attr_dev(div3, "class", "actions svelte-yu4l71"); - add_location(div3, file$9, 523, 4, 10680); - attr_dev(form, "class", "svelte-yu4l71"); - add_location(form, file$9, 453, 3, 9244); - }, - m: function mount(target, anchor) { - insert_dev(target, h3, anchor); - append_dev(h3, t0); - append_dev(h3, t1); - append_dev(h3, button0); - insert_dev(target, t3, anchor); - insert_dev(target, h40, anchor); - append_dev(h40, t4); - append_dev(h40, button1); - insert_dev(target, t6, anchor); - insert_dev(target, div1, anchor); - mount_component(wuilabelhint0, div1, null); - append_dev(div1, t7); - mount_component(wuilabelhint1, div1, null); - append_dev(div1, t8); - mount_component(wuilabelhint2, div1, null); - append_dev(div1, t9); - mount_component(wuilabelhint3, div1, null); - append_dev(div1, t10); - mount_component(wuilabelhint4, div1, null); - append_dev(div1, t11); - mount_component(wuilabelhint5, div1, null); - append_dev(div1, t12); - mount_component(wuilabelhint6, div1, null); - append_dev(div1, t13); - append_dev(div1, div0); - append_dev(div0, button2); - insert_dev(target, t15, anchor); - insert_dev(target, h41, anchor); - insert_dev(target, t17, anchor); - insert_dev(target, div2, anchor); - append_dev(div2, span0); - append_dev(div2, t19); - append_dev(div2, span1); - append_dev(div2, t21); - append_dev(div2, span2); - insert_dev(target, t23, anchor); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(target, anchor); - } - - insert_dev(target, t24, anchor); - insert_dev(target, form, anchor); - append_dev(form, label); - append_dev(label, span3); - append_dev(label, t26); - append_dev(label, select); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(select, null); - } - - select_option(select, /*_rr*/ ctx[3].Type); - append_dev(form, t27); - if (if_block) if_block.m(form, null); - append_dev(form, t28); - append_dev(form, div3); - append_dev(div3, button3); - current = true; - - if (!mounted) { - dispose = [ - listen_dev(button0, "click", /*handleZoneFileDelete*/ ctx[8], false, false, false), - listen_dev(button1, "click", /*handleSOADelete*/ ctx[10], false, false, false), - listen_dev(button2, "click", /*handleSOASave*/ ctx[11], false, false, false), - listen_dev(select, "change", /*select_change_handler*/ ctx[23]), - listen_dev(select, "blur", /*onSelectRRType*/ ctx[9], false, false, false), - listen_dev(form, "submit", prevent_default(/*handleCreateRR*/ ctx[12]), false, true, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if ((!current || dirty[0] & /*activeZone*/ 4) && t0_value !== (t0_value = /*activeZone*/ ctx[2].Name + "")) set_data_dev(t0, t0_value); - const wuilabelhint0_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint0_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint0.$set(wuilabelhint0_changes); - const wuilabelhint1_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint1_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint1.$set(wuilabelhint1_changes); - const wuilabelhint2_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint2_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint2.$set(wuilabelhint2_changes); - const wuilabelhint3_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint3_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint3.$set(wuilabelhint3_changes); - const wuilabelhint4_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint4_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint4.$set(wuilabelhint4_changes); - const wuilabelhint5_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint5_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint5.$set(wuilabelhint5_changes); - const wuilabelhint6_changes = {}; - - if (dirty[0] & /*activeZone*/ 4 | dirty[1] & /*$$scope*/ 65536) { - wuilabelhint6_changes.$$scope = { dirty, ctx }; - } - - wuilabelhint6.$set(wuilabelhint6_changes); - - if (dirty[0] & /*activeZone, handleDeleteRR, getTypeName*/ 24580) { - each_value_1 = Object.entries(/*activeZone*/ ctx[2].Records); - validate_each_argument(each_value_1); - let i; - - for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1$2(ctx, each_value_1, i); - - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - } else { - each_blocks_1[i] = create_each_block_1$2(child_ctx); - each_blocks_1[i].c(); - each_blocks_1[i].m(t24.parentNode, t24); - } - } - - for (; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].d(1); - } - - each_blocks_1.length = each_value_1.length; - } - - if (dirty[0] & /*RRTypes*/ 32) { - each_value = Object.entries(/*RRTypes*/ ctx[5]); - validate_each_argument(each_value); - let i; - - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$5(ctx, each_value, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$5(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(select, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - - if (dirty[0] & /*_rr, RRTypes*/ 40) { - select_option(select, /*_rr*/ ctx[3].Type); - } - - if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) { - if_block.p(ctx, dirty); - } else { - if (if_block) if_block.d(1); - if_block = current_block_type && current_block_type(ctx); - - if (if_block) { - if_block.c(); - if_block.m(form, t28); - } - } - }, - i: function intro(local) { - if (current) return; - transition_in(wuilabelhint0.$$.fragment, local); - transition_in(wuilabelhint1.$$.fragment, local); - transition_in(wuilabelhint2.$$.fragment, local); - transition_in(wuilabelhint3.$$.fragment, local); - transition_in(wuilabelhint4.$$.fragment, local); - transition_in(wuilabelhint5.$$.fragment, local); - transition_in(wuilabelhint6.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(wuilabelhint0.$$.fragment, local); - transition_out(wuilabelhint1.$$.fragment, local); - transition_out(wuilabelhint2.$$.fragment, local); - transition_out(wuilabelhint3.$$.fragment, local); - transition_out(wuilabelhint4.$$.fragment, local); - transition_out(wuilabelhint5.$$.fragment, local); - transition_out(wuilabelhint6.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(h3); - if (detaching) detach_dev(t3); - if (detaching) detach_dev(h40); - if (detaching) detach_dev(t6); - if (detaching) detach_dev(div1); - destroy_component(wuilabelhint0); - destroy_component(wuilabelhint1); - destroy_component(wuilabelhint2); - destroy_component(wuilabelhint3); - destroy_component(wuilabelhint4); - destroy_component(wuilabelhint5); - destroy_component(wuilabelhint6); - if (detaching) detach_dev(t15); - if (detaching) detach_dev(h41); - if (detaching) detach_dev(t17); - if (detaching) detach_dev(div2); - if (detaching) detach_dev(t23); - destroy_each(each_blocks_1, detaching); - if (detaching) detach_dev(t24); - if (detaching) detach_dev(form); - destroy_each(each_blocks, detaching); - - if (if_block) { - if_block.d(); - } - - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block$1.name, - type: "else", - source: "(306:2) {:else}", - ctx - }); - - return block; - } - - // (302:2) {#if activeZone.Name === ""} - function create_if_block$5(ctx) { - let p; - - const block = { - c: function create() { - p = element("p"); - p.textContent = "Select one of the zone file to manage."; - add_location(p, file$9, 302, 3, 5439); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$5.name, - type: "if", - source: "(302:2) {#if activeZone.Name === \\\"\\\"}", - ctx - }); - - return block; - } - - // (327:4) - function create_default_slot_6$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - add_location(input, file$9, 333, 5, 6050); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.MName); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_1*/ ctx[16]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && input.value !== /*activeZone*/ ctx[2].SOA.Value.MName) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.MName); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_6$1.name, - type: "slot", - source: "(327:4) ", - ctx - }); - - return block; - } - - // (336:4) - function create_default_slot_5$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - add_location(input, file$9, 345, 5, 6463); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.RName); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_2*/ ctx[17]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && input.value !== /*activeZone*/ ctx[2].SOA.Value.RName) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.RName); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_5$1.name, - type: "slot", - source: "(336:4) ", - ctx - }); - - return block; - } - - // (348:4) - function create_default_slot_4$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "type", "number"); - attr_dev(input, "min", "0"); - add_location(input, file$9, 354, 5, 6794); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Serial); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_3*/ ctx[18]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && to_number(input.value) !== /*activeZone*/ ctx[2].SOA.Value.Serial) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Serial); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_4$1.name, - type: "slot", - source: "(348:4) ", - ctx - }); - - return block; - } - - // (361:4) - function create_default_slot_3$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "type", "number"); - attr_dev(input, "min", "0"); - add_location(input, file$9, 367, 5, 7184); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Refresh); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_4*/ ctx[19]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && to_number(input.value) !== /*activeZone*/ ctx[2].SOA.Value.Refresh) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Refresh); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_3$1.name, - type: "slot", - source: "(361:4) ", - ctx - }); - - return block; - } - - // (374:4) - function create_default_slot_2$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "type", "number"); - attr_dev(input, "min", "0"); - add_location(input, file$9, 382, 5, 7623); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Retry); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_5*/ ctx[20]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && to_number(input.value) !== /*activeZone*/ ctx[2].SOA.Value.Retry) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Retry); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_2$1.name, - type: "slot", - source: "(374:4) ", - ctx - }); - - return block; - } - - // (389:4) - function create_default_slot_1$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "type", "number"); - attr_dev(input, "min", "0"); - add_location(input, file$9, 396, 5, 8084); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Expire); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_6*/ ctx[21]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && to_number(input.value) !== /*activeZone*/ ctx[2].SOA.Value.Expire) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Expire); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot_1$1.name, - type: "slot", - source: "(389:4) ", - ctx - }); - - return block; - } - - // (403:4) - function create_default_slot$1(ctx) { - let input; - let mounted; - let dispose; - - const block = { - c: function create() { - input = element("input"); - attr_dev(input, "type", "number"); - attr_dev(input, "min", "0"); - add_location(input, file$9, 408, 5, 8397); - }, - m: function mount(target, anchor) { - insert_dev(target, input, anchor); - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Minimum); - - if (!mounted) { - dispose = listen_dev(input, "input", /*input_input_handler_7*/ ctx[22]); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*activeZone*/ 4 && to_number(input.value) !== /*activeZone*/ ctx[2].SOA.Value.Minimum) { - set_input_value(input, /*activeZone*/ ctx[2].SOA.Value.Minimum); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(input); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_default_slot$1.name, - type: "slot", - source: "(403:4) ", - ctx - }); - - return block; - } - - // (436:4) {#each listRR as rr, idx} - function create_each_block_2$1(ctx) { - let div; - let span0; - let t0_value = /*rr*/ ctx[40].Name + ""; - let t0; - let t1; - let span1; - let t2_value = /*getTypeName*/ ctx[14](/*rr*/ ctx[40].Type) + ""; - let t2; - let t3; - let span2; - let t4_value = /*rr*/ ctx[40].Value + ""; - let t4; - let t5; - let button; - let mounted; - let dispose; - - const block = { - c: function create() { - div = element("div"); - span0 = element("span"); - t0 = text(t0_value); - t1 = space(); - span1 = element("span"); - t2 = text(t2_value); - t3 = space(); - span2 = element("span"); - t4 = text(t4_value); - t5 = space(); - button = element("button"); - button.textContent = "X"; - attr_dev(span0, "class", "name svelte-yu4l71"); - add_location(span0, file$9, 437, 6, 8950); - attr_dev(span1, "class", "type svelte-yu4l71"); - add_location(span1, file$9, 440, 6, 9007); - attr_dev(span2, "class", "value svelte-yu4l71"); - add_location(span2, file$9, 443, 6, 9077); - add_location(button, file$9, 446, 6, 9136); - attr_dev(div, "class", "rr svelte-yu4l71"); - add_location(div, file$9, 436, 5, 8927); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, span0); - append_dev(span0, t0); - append_dev(div, t1); - append_dev(div, span1); - append_dev(span1, t2); - append_dev(div, t3); - append_dev(div, span2); - append_dev(span2, t4); - append_dev(div, t5); - append_dev(div, button); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*handleDeleteRR*/ ctx[13](/*rr*/ ctx[40], /*idx*/ ctx[42]))) /*handleDeleteRR*/ ctx[13](/*rr*/ ctx[40], /*idx*/ ctx[42]).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty[0] & /*activeZone*/ 4 && t0_value !== (t0_value = /*rr*/ ctx[40].Name + "")) set_data_dev(t0, t0_value); - if (dirty[0] & /*activeZone*/ 4 && t2_value !== (t2_value = /*getTypeName*/ ctx[14](/*rr*/ ctx[40].Type) + "")) set_data_dev(t2, t2_value); - if (dirty[0] & /*activeZone*/ 4 && t4_value !== (t4_value = /*rr*/ ctx[40].Value + "")) set_data_dev(t4, t4_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_2$1.name, - type: "each", - source: "(436:4) {#each listRR as rr, idx}", - ctx - }); - - return block; - } - - // (435:3) {#each Object.entries(activeZone.Records) as [dname, listRR]} - function create_each_block_1$2(ctx) { - let each_1_anchor; - let each_value_2 = /*listRR*/ ctx[37]; - validate_each_argument(each_value_2); - let each_blocks = []; - - for (let i = 0; i < each_value_2.length; i += 1) { - each_blocks[i] = create_each_block_2$1(get_each_context_2$1(ctx, each_value_2, i)); - } - - const block = { - c: function create() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m: function mount(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*handleDeleteRR, activeZone, getTypeName*/ 24580) { - each_value_2 = /*listRR*/ ctx[37]; - validate_each_argument(each_value_2); - let i; - - for (i = 0; i < each_value_2.length; i += 1) { - const child_ctx = get_each_context_2$1(ctx, each_value_2, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_2$1(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_2.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1$2.name, - type: "each", - source: "(435:3) {#each Object.entries(activeZone.Records) as [dname, listRR]}", - ctx - }); - - return block; - } - - // (463:6) {#each Object.entries(RRTypes) as [k, v]} - function create_each_block$5(ctx) { - let option; - let t0_value = /*v*/ ctx[33] + ""; - let t0; - let t1; - let option_value_value; - - const block = { - c: function create() { - option = element("option"); - t0 = text(t0_value); - t1 = space(); - option.__value = option_value_value = parseInt(/*k*/ ctx[32]); - option.value = option.__value; - add_location(option, file$9, 463, 7, 9476); - }, - m: function mount(target, anchor) { - insert_dev(target, option, anchor); - append_dev(option, t0); - append_dev(option, t1); - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(option); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block$5.name, - type: "each", - source: "(463:6) {#each Object.entries(RRTypes) as [k, v]}", - ctx - }); - - return block; - } - - // (502:30) - function create_if_block_3(ctx) { - let label0; - let span0; - let t1; - let input0; - let t2; - let t3_value = /*activeZone*/ ctx[2].Name + ""; - let t3; - let t4; - let label1; - let span1; - let t6; - let input1; - let t7; - let label2; - let span2; - let t9; - let input2; - let mounted; - let dispose; - - const block = { - c: function create() { - label0 = element("label"); - span0 = element("span"); - span0.textContent = "Name:"; - t1 = space(); - input0 = element("input"); - t2 = text("\n\t\t\t\t\t\t."); - t3 = text(t3_value); - t4 = space(); - label1 = element("label"); - span1 = element("span"); - span1.textContent = "Preference:"; - t6 = space(); - input1 = element("input"); - t7 = space(); - label2 = element("label"); - span2 = element("span"); - span2.textContent = "Exchange:"; - t9 = space(); - input2 = element("input"); - attr_dev(span0, "class", "svelte-yu4l71"); - add_location(span0, file$9, 503, 6, 10285); - attr_dev(input0, "class", "name svelte-yu4l71"); - add_location(input0, file$9, 506, 6, 10325); - attr_dev(label0, "class", "svelte-yu4l71"); - add_location(label0, file$9, 502, 5, 10271); - attr_dev(span1, "class", "svelte-yu4l71"); - add_location(span1, file$9, 510, 6, 10426); - attr_dev(input1, "type", "number"); - attr_dev(input1, "min", "1"); - attr_dev(input1, "max", "65535"); - attr_dev(input1, "class", "svelte-yu4l71"); - add_location(input1, file$9, 513, 6, 10472); - attr_dev(label1, "class", "svelte-yu4l71"); - add_location(label1, file$9, 509, 5, 10412); - attr_dev(span2, "class", "svelte-yu4l71"); - add_location(span2, file$9, 516, 6, 10571); - attr_dev(input2, "class", "svelte-yu4l71"); - add_location(input2, file$9, 519, 6, 10615); - attr_dev(label2, "class", "svelte-yu4l71"); - add_location(label2, file$9, 515, 5, 10557); - }, - m: function mount(target, anchor) { - insert_dev(target, label0, anchor); - append_dev(label0, span0); - append_dev(label0, t1); - append_dev(label0, input0); - set_input_value(input0, /*_rr*/ ctx[3].Name); - append_dev(label0, t2); - append_dev(label0, t3); - insert_dev(target, t4, anchor); - insert_dev(target, label1, anchor); - append_dev(label1, span1); - append_dev(label1, t6); - append_dev(label1, input1); - set_input_value(input1, /*_rrMX*/ ctx[4].Preference); - insert_dev(target, t7, anchor); - insert_dev(target, label2, anchor); - append_dev(label2, span2); - append_dev(label2, t9); - append_dev(label2, input2); - set_input_value(input2, /*_rrMX*/ ctx[4].Exchange); - - if (!mounted) { - dispose = [ - listen_dev(input0, "input", /*input0_input_handler_2*/ ctx[28]), - listen_dev(input1, "input", /*input1_input_handler_2*/ ctx[29]), - listen_dev(input2, "input", /*input2_input_handler*/ ctx[30]) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*_rr, RRTypes*/ 40 && input0.value !== /*_rr*/ ctx[3].Name) { - set_input_value(input0, /*_rr*/ ctx[3].Name); - } - - if (dirty[0] & /*activeZone*/ 4 && t3_value !== (t3_value = /*activeZone*/ ctx[2].Name + "")) set_data_dev(t3, t3_value); - - if (dirty[0] & /*_rrMX*/ 16 && to_number(input1.value) !== /*_rrMX*/ ctx[4].Preference) { - set_input_value(input1, /*_rrMX*/ ctx[4].Preference); - } - - if (dirty[0] & /*_rrMX*/ 16 && input2.value !== /*_rrMX*/ ctx[4].Exchange) { - set_input_value(input2, /*_rrMX*/ ctx[4].Exchange); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(label0); - if (detaching) detach_dev(t4); - if (detaching) detach_dev(label1); - if (detaching) detach_dev(t7); - if (detaching) detach_dev(label2); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_3.name, - type: "if", - source: "(502:30) ", - ctx - }); - - return block; - } - - // (488:30) - function create_if_block_2$1(ctx) { - let label0; - let span0; - let t1; - let input0; - let t2; - let label1; - let span1; - let t4; - let input1; - let t5; - let t6_value = /*activeZone*/ ctx[2].Name + ""; - let t6; - let mounted; - let dispose; - - const block = { - c: function create() { - label0 = element("label"); - span0 = element("span"); - span0.textContent = "Name:"; - t1 = space(); - input0 = element("input"); - t2 = space(); - label1 = element("label"); - span1 = element("span"); - span1.textContent = "Value:"; - t4 = space(); - input1 = element("input"); - t5 = text("\n\t\t\t\t\t\t."); - t6 = text(t6_value); - attr_dev(span0, "class", "svelte-yu4l71"); - add_location(span0, file$9, 489, 6, 9996); - attr_dev(input0, "class", "svelte-yu4l71"); - add_location(input0, file$9, 492, 6, 10036); - attr_dev(label0, "class", "svelte-yu4l71"); - add_location(label0, file$9, 488, 5, 9982); - attr_dev(span1, "class", "svelte-yu4l71"); - add_location(span1, file$9, 495, 6, 10099); - attr_dev(input1, "class", "name svelte-yu4l71"); - add_location(input1, file$9, 498, 6, 10140); - attr_dev(label1, "class", "svelte-yu4l71"); - add_location(label1, file$9, 494, 5, 10085); - }, - m: function mount(target, anchor) { - insert_dev(target, label0, anchor); - append_dev(label0, span0); - append_dev(label0, t1); - append_dev(label0, input0); - set_input_value(input0, /*_rr*/ ctx[3].Name); - insert_dev(target, t2, anchor); - insert_dev(target, label1, anchor); - append_dev(label1, span1); - append_dev(label1, t4); - append_dev(label1, input1); - set_input_value(input1, /*_rr*/ ctx[3].Value); - append_dev(label1, t5); - append_dev(label1, t6); - - if (!mounted) { - dispose = [ - listen_dev(input0, "input", /*input0_input_handler_1*/ ctx[26]), - listen_dev(input1, "input", /*input1_input_handler_1*/ ctx[27]) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*_rr, RRTypes*/ 40 && input0.value !== /*_rr*/ ctx[3].Name) { - set_input_value(input0, /*_rr*/ ctx[3].Name); - } - - if (dirty[0] & /*_rr, RRTypes*/ 40 && input1.value !== /*_rr*/ ctx[3].Value) { - set_input_value(input1, /*_rr*/ ctx[3].Value); - } - - if (dirty[0] & /*activeZone*/ 4 && t6_value !== (t6_value = /*activeZone*/ ctx[2].Name + "")) set_data_dev(t6, t6_value); - }, - d: function destroy(detaching) { - if (detaching) detach_dev(label0); - if (detaching) detach_dev(t2); - if (detaching) detach_dev(label1); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_2$1.name, - type: "if", - source: "(488:30) ", - ctx - }); - - return block; - } - - // (471:4) {#if _rr.Type === 1 || _rr.Type === 2 || _rr.Type === 5 || _rr.Type === 16 || _rr.Type === 28 } - function create_if_block_1$2(ctx) { - let label0; - let span0; - let t1; - let input0; - let t2; - let t3_value = /*activeZone*/ ctx[2].Name + ""; - let t3; - let t4; - let label1; - let span1; - let t6; - let input1; - let mounted; - let dispose; - - const block = { - c: function create() { - label0 = element("label"); - span0 = element("span"); - span0.textContent = "Name:"; - t1 = space(); - input0 = element("input"); - t2 = text("\n\t\t\t\t\t\t."); - t3 = text(t3_value); - t4 = space(); - label1 = element("label"); - span1 = element("span"); - span1.textContent = "Value:"; - t6 = space(); - input1 = element("input"); - attr_dev(span0, "class", "svelte-yu4l71"); - add_location(span0, file$9, 474, 6, 9705); - attr_dev(input0, "class", "name svelte-yu4l71"); - add_location(input0, file$9, 477, 6, 9745); - attr_dev(label0, "class", "svelte-yu4l71"); - add_location(label0, file$9, 473, 5, 9691); - attr_dev(span1, "class", "svelte-yu4l71"); - add_location(span1, file$9, 482, 6, 9847); - attr_dev(input1, "class", "svelte-yu4l71"); - add_location(input1, file$9, 485, 6, 9888); - attr_dev(label1, "class", "svelte-yu4l71"); - add_location(label1, file$9, 481, 5, 9833); - }, - m: function mount(target, anchor) { - insert_dev(target, label0, anchor); - append_dev(label0, span0); - append_dev(label0, t1); - append_dev(label0, input0); - set_input_value(input0, /*_rr*/ ctx[3].Name); - append_dev(label0, t2); - append_dev(label0, t3); - insert_dev(target, t4, anchor); - insert_dev(target, label1, anchor); - append_dev(label1, span1); - append_dev(label1, t6); - append_dev(label1, input1); - set_input_value(input1, /*_rr*/ ctx[3].Value); - - if (!mounted) { - dispose = [ - listen_dev(input0, "input", /*input0_input_handler*/ ctx[24]), - listen_dev(input1, "input", /*input1_input_handler*/ ctx[25]) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*_rr, RRTypes*/ 40 && input0.value !== /*_rr*/ ctx[3].Name) { - set_input_value(input0, /*_rr*/ ctx[3].Name); - } - - if (dirty[0] & /*activeZone*/ 4 && t3_value !== (t3_value = /*activeZone*/ ctx[2].Name + "")) set_data_dev(t3, t3_value); - - if (dirty[0] & /*_rr, RRTypes*/ 40 && input1.value !== /*_rr*/ ctx[3].Value) { - set_input_value(input1, /*_rr*/ ctx[3].Value); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(label0); - if (detaching) detach_dev(t4); - if (detaching) detach_dev(label1); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1$2.name, - type: "if", - source: "(471:4) {#if _rr.Type === 1 || _rr.Type === 2 || _rr.Type === 5 || _rr.Type === 16 || _rr.Type === 28 }", - ctx - }); - - return block; - } - - function create_fragment$9(ctx) { - let div2; - let div0; - let t0; - let br0; - let t1; - let label; - let span; - let t3; - let br1; - let t4; - let input; - let t5; - let button; - let t7; - let div1; - let current_block_type_index; - let if_block; - let current; - let mounted; - let dispose; - let each_value_3 = Object.entries(/*env*/ ctx[0].ZoneFiles); - validate_each_argument(each_value_3); - let each_blocks = []; - - for (let i = 0; i < each_value_3.length; i += 1) { - each_blocks[i] = create_each_block_3$1(get_each_context_3$1(ctx, each_value_3, i)); - } - - const if_block_creators = [create_if_block$5, create_else_block$1]; - const if_blocks = []; - - function select_block_type(ctx, dirty) { - if (/*activeZone*/ ctx[2].Name === "") return 0; - return 1; - } - - current_block_type_index = select_block_type(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - - const block = { - c: function create() { - div2 = element("div"); - div0 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t0 = space(); - br0 = element("br"); - t1 = space(); - label = element("label"); - span = element("span"); - span.textContent = "New zone file:"; - t3 = space(); - br1 = element("br"); - t4 = space(); - input = element("input"); - t5 = space(); - button = element("button"); - button.textContent = "Create"; - t7 = space(); - div1 = element("div"); - if_block.c(); - add_location(br0, file$9, 288, 2, 5204); - add_location(span, file$9, 291, 3, 5224); - add_location(br1, file$9, 292, 3, 5255); - add_location(input, file$9, 293, 3, 5264); - add_location(label, file$9, 290, 2, 5213); - add_location(button, file$9, 295, 2, 5310); - attr_dev(div0, "class", "nav-left svelte-yu4l71"); - add_location(div0, file$9, 280, 1, 4998); - attr_dev(div1, "class", "content svelte-yu4l71"); - add_location(div1, file$9, 300, 1, 5383); - attr_dev(div2, "class", "master_d"); - add_location(div2, file$9, 279, 0, 4974); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div0); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - - append_dev(div0, t0); - append_dev(div0, br0); - append_dev(div0, t1); - append_dev(div0, label); - append_dev(label, span); - append_dev(label, t3); - append_dev(label, br1); - append_dev(label, t4); - append_dev(label, input); - set_input_value(input, /*newZoneFile*/ ctx[1]); - append_dev(div0, t5); - append_dev(div0, button); - append_dev(div2, t7); - append_dev(div2, div1); - if_blocks[current_block_type_index].m(div1, null); - current = true; - - if (!mounted) { - dispose = [ - listen_dev(input, "input", /*input_input_handler*/ ctx[15]), - listen_dev(button, "click", /*handleZoneFileCreate*/ ctx[7], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*setActiveZone, env*/ 65) { - each_value_3 = Object.entries(/*env*/ ctx[0].ZoneFiles); - validate_each_argument(each_value_3); - let i; - - for (i = 0; i < each_value_3.length; i += 1) { - const child_ctx = get_each_context_3$1(ctx, each_value_3, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_3$1(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div0, t0); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_3.length; - } - - if (dirty[0] & /*newZoneFile*/ 2 && input.value !== /*newZoneFile*/ ctx[1]) { - set_input_value(input, /*newZoneFile*/ ctx[1]); - } - - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx); - - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx, dirty); - } else { - group_outros(); - - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - - check_outros(); - if_block = if_blocks[current_block_type_index]; - - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - if_block.c(); - } - - transition_in(if_block, 1); - if_block.m(div1, null); - } - }, - i: function intro(local) { - if (current) return; - transition_in(if_block); - current = true; - }, - o: function outro(local) { - transition_out(if_block); - current = false; - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - destroy_each(each_blocks, detaching); - if_blocks[current_block_type_index].d(); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$9.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const apiMasterd = "/api/master.d/"; - - function newRR() { - return { Name: "", Type: 1, Value: "" }; - } - - function newMX() { - return { Preference: 1, Exchange: "" }; - } - - function newSOA() { - return { - Name: "", - Type: 6, - Value: { - MName: "", - RName: "", - Serial: 0, - Refresh: 0, - Retry: 0, - Expire: 0, - Minimum: 0 - } - }; - } - - function instance$9($$self, $$props, $$invalidate) { - let env = { - NameServers: [], - HostsBlocks: [], - HostsFiles: [], - ZoneFiles: {} - }; - - let newZoneFile = ""; - let activeZone = { Name: "" }; - - let RRTypes = { - 1: "A", - 2: "NS", - 5: "CNAME", - 12: "PTR", - 15: "MX", - 16: "TXT", - 28: "AAAA" - }; - - let _rr = newRR(); - let _rrMX = newMX(); - - const envUnsubscribe = environment.subscribe(value => { - $$invalidate(0, env = value); - }); - - onDestroy(envUnsubscribe); - - function setActiveZone(zone) { - if (zone.SOA === null) { - zone.SOA = newSOA(); - } - - $$invalidate(2, activeZone = zone); - } - - async function handleZoneFileCreate() { - const res = await fetch(apiMasterd + newZoneFile, { method: "PUT" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: handleZoneFileCreate: " + resError.message); - return; - } - - $$invalidate(2, activeZone = await res.json()); - $$invalidate(2, activeZone.SOA = newSOA(), activeZone); - $$invalidate(0, env.ZoneFiles[activeZone.Name] = activeZone, env); - WuiPushNotif.Info("The new zone file '" + newZoneFile + "' has been created"); - } - - async function handleZoneFileDelete() { - let api = apiMasterd + activeZone.Name; - const res = await fetch(api, { method: "DELETE" }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: handleZoneFileDelete: " + resError.message); - return; - } - - WuiPushNotif.Info("The zone file '" + activeZone.Name + "' has beed deleted"); - delete env.ZoneFiles[activeZone.Name]; - $$invalidate(2, activeZone = { Name: "" }); - $$invalidate(0, env); - } - - function onSelectRRType() { - switch (_rr.Type) { - case 15: - $$invalidate(4, _rrMX = newMX()); - break; - } - } - - async function handleSOADelete() { - return handleDeleteRR(activeZone.SOA, -1); - } - - async function handleSOASave() { - $$invalidate(3, _rr = activeZone.SOA); - return handleCreateRR(); - } - - async function handleCreateRR() { - switch (_rr.Type) { - case 15: - $$invalidate(3, _rr.Value = _rrMX, _rr); - break; - } - - let api = apiMasterd + activeZone.Name + "/rr/" + _rr.Type; - - const res = await fetch(api, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(_rr) - }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: handleCreateRR: " + resError.message); - return; - } - - let resRR = await res.json(); - - if (resRR.Type === 6) { - $$invalidate(2, activeZone.SOA = resRR, activeZone); - WuiPushNotif.Info("SOA record has been saved"); - } else { - let listRR = activeZone.Records[resRR.Name]; - - if (typeof listRR === "undefined") { - listRR = []; - } - - listRR.push(resRR); - $$invalidate(2, activeZone.Records[resRR.Name] = listRR, activeZone); - WuiPushNotif.Info("The new record '" + resRR.Name + "' has been created"); - } - } - - async function handleDeleteRR(rr, idx) { - let api = apiMasterd + activeZone.Name + "/rr/" + rr.Type; - - const res = await fetch(api, { - method: "DELETE", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify(rr) - }); - - if (res.status >= 400) { - const resError = await res.json(); - WuiPushNotif.Error("ERROR: handleDeleteRR: " + resError.message); - return; - } - - WuiPushNotif.Info("The record '" + rr.Name + "' has been deleted"); - - if (rr.Type == 6) { - // SOA. - $$invalidate(2, activeZone.SOA = newSOA(), activeZone); - } else { - let listRR = activeZone.Records[rr.Name]; - listRR.splice(idx, 1); - $$invalidate(2, activeZone.Records[rr.Name] = listRR, activeZone); - } - - let resbody = await res.json(); - } - - function getTypeName(k) { - let v = RRTypes[k]; - - if (v === "") { - return k; - } - - return v; - } - - const writable_props = []; - - Object_1$2.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("MasterDir", $$slots, []); - - function input_input_handler() { - newZoneFile = this.value; - $$invalidate(1, newZoneFile); - } - - function input_input_handler_1() { - activeZone.SOA.Value.MName = this.value; - $$invalidate(2, activeZone); - } - - function input_input_handler_2() { - activeZone.SOA.Value.RName = this.value; - $$invalidate(2, activeZone); - } - - function input_input_handler_3() { - activeZone.SOA.Value.Serial = to_number(this.value); - $$invalidate(2, activeZone); - } - - function input_input_handler_4() { - activeZone.SOA.Value.Refresh = to_number(this.value); - $$invalidate(2, activeZone); - } - - function input_input_handler_5() { - activeZone.SOA.Value.Retry = to_number(this.value); - $$invalidate(2, activeZone); - } - - function input_input_handler_6() { - activeZone.SOA.Value.Expire = to_number(this.value); - $$invalidate(2, activeZone); - } - - function input_input_handler_7() { - activeZone.SOA.Value.Minimum = to_number(this.value); - $$invalidate(2, activeZone); - } - - function select_change_handler() { - _rr.Type = select_value(this); - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input0_input_handler() { - _rr.Name = this.value; - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input1_input_handler() { - _rr.Value = this.value; - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input0_input_handler_1() { - _rr.Name = this.value; - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input1_input_handler_1() { - _rr.Value = this.value; - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input0_input_handler_2() { - _rr.Name = this.value; - $$invalidate(3, _rr); - $$invalidate(5, RRTypes); - } - - function input1_input_handler_2() { - _rrMX.Preference = to_number(this.value); - $$invalidate(4, _rrMX); - } - - function input2_input_handler() { - _rrMX.Exchange = this.value; - $$invalidate(4, _rrMX); - } - - $$self.$capture_state = () => ({ - onDestroy, - WuiPushNotif, - WuiLabelHint: LabelHint, - environment, - nanoSeconds, - setEnvironment, - apiMasterd, - env, - newZoneFile, - activeZone, - RRTypes, - _rr, - _rrMX, - envUnsubscribe, - setActiveZone, - handleZoneFileCreate, - handleZoneFileDelete, - onSelectRRType, - handleSOADelete, - handleSOASave, - handleCreateRR, - handleDeleteRR, - getTypeName, - newRR, - newMX, - newSOA - }); - - $$self.$inject_state = $$props => { - if ("env" in $$props) $$invalidate(0, env = $$props.env); - if ("newZoneFile" in $$props) $$invalidate(1, newZoneFile = $$props.newZoneFile); - if ("activeZone" in $$props) $$invalidate(2, activeZone = $$props.activeZone); - if ("RRTypes" in $$props) $$invalidate(5, RRTypes = $$props.RRTypes); - if ("_rr" in $$props) $$invalidate(3, _rr = $$props._rr); - if ("_rrMX" in $$props) $$invalidate(4, _rrMX = $$props._rrMX); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - env, - newZoneFile, - activeZone, - _rr, - _rrMX, - RRTypes, - setActiveZone, - handleZoneFileCreate, - handleZoneFileDelete, - onSelectRRType, - handleSOADelete, - handleSOASave, - handleCreateRR, - handleDeleteRR, - getTypeName, - input_input_handler, - input_input_handler_1, - input_input_handler_2, - input_input_handler_3, - input_input_handler_4, - input_input_handler_5, - input_input_handler_6, - input_input_handler_7, - select_change_handler, - input0_input_handler, - input1_input_handler, - input0_input_handler_1, - input1_input_handler_1, - input0_input_handler_2, - input1_input_handler_2, - input2_input_handler - ]; - } - - class MasterDir extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$9, create_fragment$9, safe_not_equal, {}, [-1, -1]); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "MasterDir", - options, - id: create_fragment$9.name - }); - } - } - - /* src/App.svelte generated by Svelte v3.24.1 */ - const file$a = "src/App.svelte"; - - // (113:1) {:else} - function create_else_block$2(ctx) { - let dashboard; - let current; - dashboard = new Dashboard({ $$inline: true }); - - const block = { - c: function create() { - create_component(dashboard.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(dashboard, target, anchor); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(dashboard.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(dashboard.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(dashboard, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block$2.name, - type: "else", - source: "(113:1) {:else}", - ctx - }); - - return block; - } - - // (111:36) - function create_if_block_3$1(ctx) { - let masterdir; - let current; - masterdir = new MasterDir({ $$inline: true }); - - const block = { - c: function create() { - create_component(masterdir.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(masterdir, target, anchor); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(masterdir.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(masterdir.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(masterdir, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_3$1.name, - type: "if", - source: "(111:36) ", - ctx - }); - - return block; - } - - // (109:35) - function create_if_block_2$2(ctx) { - let hostsdir; - let current; - hostsdir = new HostsDir({ $$inline: true }); - - const block = { - c: function create() { - create_component(hostsdir.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(hostsdir, target, anchor); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(hostsdir.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(hostsdir.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(hostsdir, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_2$2.name, - type: "if", - source: "(109:35) ", - ctx - }); - - return block; - } - - // (107:37) - function create_if_block_1$3(ctx) { - let hostsblock; - let current; - hostsblock = new HostsBlock({ $$inline: true }); - - const block = { - c: function create() { - create_component(hostsblock.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(hostsblock, target, anchor); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(hostsblock.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(hostsblock.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(hostsblock, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1$3.name, - type: "if", - source: "(107:37) ", - ctx - }); - - return block; - } - - // (105:1) {#if state === stateEnvironment} - function create_if_block$6(ctx) { - let environment_1; - let current; - environment_1 = new Environment({ $$inline: true }); - - const block = { - c: function create() { - create_component(environment_1.$$.fragment); - }, - m: function mount(target, anchor) { - mount_component(environment_1, target, anchor); - current = true; - }, - i: function intro(local) { - if (current) return; - transition_in(environment_1.$$.fragment, local); - current = true; - }, - o: function outro(local) { - transition_out(environment_1.$$.fragment, local); - current = false; - }, - d: function destroy(detaching) { - destroy_component(environment_1, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block$6.name, - type: "if", - source: "(105:1) {#if state === stateEnvironment}", - ctx - }); - - return block; - } - - function create_fragment$a(ctx) { - let wuinotif; - let t0; - let div; - let nav; - let a0; - let t2; - let a1; - let t4; - let a2; - let t5; - let a2_href_value; - let t6; - let a3; - let t7; - let a3_href_value; - let t8; - let a4; - let t9; - let a4_href_value; - let t10; - let current_block_type_index; - let if_block; - let current; - let mounted; - let dispose; - - wuinotif = new Notif({ - props: { timeout: "3000" }, - $$inline: true - }); - - const if_block_creators = [ - create_if_block$6, - create_if_block_1$3, - create_if_block_2$2, - create_if_block_3$1, - create_else_block$2 - ]; - - const if_blocks = []; - - function select_block_type(ctx, dirty) { - if (/*state*/ ctx[0] === stateEnvironment) return 0; - if (/*state*/ ctx[0] === stateHostsBlock) return 1; - if (/*state*/ ctx[0] === stateHostsDir) return 2; - if (/*state*/ ctx[0] === stateMasterDir) return 3; - return 4; - } - - current_block_type_index = select_block_type(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - - const block = { - c: function create() { - create_component(wuinotif.$$.fragment); - t0 = space(); - div = element("div"); - nav = element("nav"); - a0 = element("a"); - a0.textContent = "rescached"; - t2 = text("\n\t\t/\n\t\t"); - a1 = element("a"); - a1.textContent = "Environment"; - t4 = text("\n\t\t/\n\t\t"); - a2 = element("a"); - t5 = text("Hosts blocks"); - t6 = text("\n\t\t/\n\t\t"); - a3 = element("a"); - t7 = text("hosts.d"); - t8 = text("\n\t\t/\n\t\t"); - a4 = element("a"); - t9 = text("master.d"); - t10 = space(); - if_block.c(); - attr_dev(a0, "href", "#home"); - attr_dev(a0, "class", "svelte-jyzzth"); - toggle_class(a0, "active", /*state*/ ctx[0] === "" || /*state*/ ctx[0] === "home"); - add_location(a0, file$a, 63, 2, 1357); - attr_dev(a1, "href", "#environment"); - attr_dev(a1, "class", "svelte-jyzzth"); - toggle_class(a1, "active", /*state*/ ctx[0] === stateEnvironment); - add_location(a1, file$a, 71, 2, 1480); - attr_dev(a2, "href", a2_href_value = "#" + stateHostsBlock); - attr_dev(a2, "class", "svelte-jyzzth"); - toggle_class(a2, "active", /*state*/ ctx[0] === stateHostsBlock); - add_location(a2, file$a, 79, 2, 1624); - attr_dev(a3, "href", a3_href_value = "#" + stateHostsDir); - attr_dev(a3, "class", "svelte-jyzzth"); - toggle_class(a3, "active", /*state*/ ctx[0] === stateHostsDir); - add_location(a3, file$a, 87, 2, 1773); - attr_dev(a4, "href", a4_href_value = "#" + stateMasterDir); - attr_dev(a4, "class", "svelte-jyzzth"); - toggle_class(a4, "active", /*state*/ ctx[0] === stateMasterDir); - add_location(a4, file$a, 95, 2, 1913); - attr_dev(nav, "class", "menu svelte-jyzzth"); - add_location(nav, file$a, 62, 1, 1336); - attr_dev(div, "class", "main svelte-jyzzth"); - add_location(div, file$a, 61, 0, 1316); - }, - l: function claim(nodes) { - throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); - }, - m: function mount(target, anchor) { - mount_component(wuinotif, target, anchor); - insert_dev(target, t0, anchor); - insert_dev(target, div, anchor); - append_dev(div, nav); - append_dev(nav, a0); - append_dev(nav, t2); - append_dev(nav, a1); - append_dev(nav, t4); - append_dev(nav, a2); - append_dev(a2, t5); - append_dev(nav, t6); - append_dev(nav, a3); - append_dev(a3, t7); - append_dev(nav, t8); - append_dev(nav, a4); - append_dev(a4, t9); - append_dev(div, t10); - if_blocks[current_block_type_index].m(div, null); - current = true; - - if (!mounted) { - dispose = [ - listen_dev(a0, "click", /*click_handler*/ ctx[1], false, false, false), - listen_dev(a1, "click", /*click_handler_1*/ ctx[2], false, false, false), - listen_dev(a2, "click", /*click_handler_2*/ ctx[3], false, false, false), - listen_dev(a3, "click", /*click_handler_3*/ ctx[4], false, false, false), - listen_dev(a4, "click", /*click_handler_4*/ ctx[5], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*state*/ 1) { - toggle_class(a0, "active", /*state*/ ctx[0] === "" || /*state*/ ctx[0] === "home"); - } - - if (dirty & /*state, stateEnvironment*/ 1) { - toggle_class(a1, "active", /*state*/ ctx[0] === stateEnvironment); - } - - if (dirty & /*state, stateHostsBlock*/ 1) { - toggle_class(a2, "active", /*state*/ ctx[0] === stateHostsBlock); - } - - if (dirty & /*state, stateHostsDir*/ 1) { - toggle_class(a3, "active", /*state*/ ctx[0] === stateHostsDir); - } - - if (dirty & /*state, stateMasterDir*/ 1) { - toggle_class(a4, "active", /*state*/ ctx[0] === stateMasterDir); - } - - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx); - - if (current_block_type_index !== previous_block_index) { - group_outros(); - - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - - check_outros(); - if_block = if_blocks[current_block_type_index]; - - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - if_block.c(); - } - - transition_in(if_block, 1); - if_block.m(div, null); - } - }, - i: function intro(local) { - if (current) return; - transition_in(wuinotif.$$.fragment, local); - transition_in(if_block); - current = true; - }, - o: function outro(local) { - transition_out(wuinotif.$$.fragment, local); - transition_out(if_block); - current = false; - }, - d: function destroy(detaching) { - destroy_component(wuinotif, detaching); - if (detaching) detach_dev(t0); - if (detaching) detach_dev(div); - if_blocks[current_block_type_index].d(); - mounted = false; - run_all(dispose); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment$a.name, - type: "component", - source: "", - ctx - }); - - return block; - } - - const stateEnvironment = "environment"; - const stateHostsBlock = "hosts_block"; - const stateHostsDir = "hosts_d"; - const stateMasterDir = "master_d"; - - function instance$a($$self, $$props, $$invalidate) { - let state; - - let env = { - NameServers: [], - HostsBlocks: [], - HostsFiles: {} - }; - - onMount(async () => { - const res = await fetch(apiEnvironment); - - if (res.status >= 400) { - WuiPushNotif.Error("ERROR: {apiEnvironment}: ", res.status, res.statusText); - return; - } - - setEnvironment(await res.json()); - $$invalidate(0, state = window.location.hash.slice(1)); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`); - }); - - let { $$slots = {}, $$scope } = $$props; - validate_slots("App", $$slots, []); - const click_handler = () => $$invalidate(0, state = ""); - const click_handler_1 = () => $$invalidate(0, state = stateEnvironment); - const click_handler_2 = () => $$invalidate(0, state = stateHostsBlock); - const click_handler_3 = () => $$invalidate(0, state = stateHostsDir); - const click_handler_4 = () => $$invalidate(0, state = stateMasterDir); - - $$self.$capture_state = () => ({ - onMount, - WuiNotif: Notif, - WuiPushNotif, - apiEnvironment, - environment, - nanoSeconds, - setEnvironment, - Dashboard, - Environment, - HostsBlock, - HostsDir, - MasterDir, - stateEnvironment, - stateHostsBlock, - stateHostsDir, - stateMasterDir, - state, - env - }); - - $$self.$inject_state = $$props => { - if ("state" in $$props) $$invalidate(0, state = $$props.state); - if ("env" in $$props) env = $$props.env; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - state, - click_handler, - click_handler_1, - click_handler_2, - click_handler_3, - click_handler_4 - ]; - } - - class App extends SvelteComponentDev { - constructor(options) { - super(options); - init(this, options, instance$a, create_fragment$a, safe_not_equal, {}); - - dispatch_dev("SvelteRegisterComponent", { - component: this, - tagName: "App", - options, - id: create_fragment$a.name - }); - } - } - - const app = new App({ - target: document.body, - }); - - return app; - -}()); -//# sourceMappingURL=bundle.js.map diff --git a/_www/public/build/bundle.js.map b/_www/public/build/bundle.js.map deleted file mode 100644 index 408e83e..0000000 --- a/_www/public/build/bundle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/wui.svelte/src/components/InputIPPort.svelte","../../node_modules/wui.svelte/src/components/InputNumber.svelte","../../node_modules/wui.svelte/src/components/LabelHint.svelte","../../node_modules/svelte/transition/index.mjs","../../node_modules/svelte/store/index.mjs","../../node_modules/wui.svelte/src/components/Notif.store.js","../../node_modules/wui.svelte/src/components/NotifItem.svelte","../../node_modules/wui.svelte/src/components/Notif.svelte","../../src/environment.js","../../src/common.js","../../src/Dashboard.svelte","../../src/Environment.svelte","../../src/HostsBlock.svelte","../../src/HostsDir.svelte","../../src/MasterDir.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n const z_index = (parseInt(computed_style.zIndex) || 0) - 1;\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', `display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ` +\n `overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: ${z_index};`);\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = `data:text/html,`;\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error(`Cannot have duplicate keys in a keyed each`);\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.24.1' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","\n\n\n\n
\n\t\n\t{#if isInvalid}\n\t
{error}
\n\t{/if}\n
\n","\n\n\n\n
\n\t\n\t{#if unit !== ''}\n\t\t\n\t\t\t{unit}\n\t\t\n\t{/if}\n
\n","\n\n\n\n\n\n{#if showInfo}\n
\n\t{@html info}\n
\n{/if}\n","import { cubicInOut, linear, cubicOut } from '../easing';\nimport { is_function, assign } from '../internal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 }) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear }) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 }) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut }) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => `overflow: hidden;` +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 }) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut }) {\n const len = node.getTotalLength();\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\n}\n\nexport { blur, crossfade, draw, fade, fly, scale, slide };\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal';\nexport { get_store_value as get } from '../internal';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe,\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = [];\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (let i = 0; i < subscribers.length; i += 1) {\n const s = subscribers[i];\n s[1]();\n subscriber_queue.push(s, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.push(subscriber);\n if (subscribers.length === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n const index = subscribers.indexOf(subscriber);\n if (index !== -1) {\n subscribers.splice(index, 1);\n }\n if (subscribers.length === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from 'svelte/store';\n\nexport const messages = writable([]);\n","\n\n\n\n
\n\t{text}\n
\n","\n\n\n\n\n
\n\t{#each $messages as msg (msg)}\n\t\n\t{/each}\n
\n","import { writable } from \"svelte/store\"\n\nexport const apiEnvironment = \"/api/environment\"\nexport const environment = writable({\n\tNameServers: [],\n\tHostsBlocks: [],\n\tHostsFiles: {},\n\tZoneFiles: [],\n})\nexport const nanoSeconds = 1000000000\n\nexport async function setEnvironment(got) {\n\tgot.PruneDelay = got.PruneDelay / nanoSeconds\n\tgot.PruneThreshold = got.PruneThreshold / nanoSeconds\n\tfor (const [key, value] of Object.entries(got.HostsFiles)) {\n\t\tgot.HostsFiles[key].Records = []\n\t}\n\tenvironment.set(got)\n}\n","const RRTypes = {\n\t1: \"A\",\n\t2: \"NS\",\n\t3: \"MD\",\n\t4: \"MF\",\n\t5: \"CNAME\",\n\t6: \"SOA\",\n\t7: \"MB\",\n\t8: \"MG\",\n\t9: \"MR\",\n\t10: \"NULL\",\n\t11: \"WKS\",\n\t12: \"PTR\",\n\t13: \"HINFO\",\n\t14: \"MINFO\",\n\t15: \"MX\",\n\t16: \"TXT\",\n\t28: \"AAAA\",\n\t33: \"SRV\",\n\t41: \"OPT\",\n}\n\nexport function getRRTypeName(k) {\n\tlet v = RRTypes[k]\n\tif (v === \"\") {\n\t\treturn k\n\t}\n\treturn v\n}\n","\n\n\n\n
\n\t
\n\t\tCaches:\n\t\t\n\t\t\n\t
\n\t{#each listMsg as msg (msg)}\n\t\t
\n\t\t\t
\n\t\t\t\t{msg.Question.Name}\n\n\t\t\t\t\n\t\t\t\t\tRemove from caches\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t \n\t\t\t\t Type \n\t\t\t\t TTL \n\t\t\t\t Value \n\t\t\t
\n\n\t\t\t{#if msg.Answer !== null && msg.Answer.length > 0}\n\t\t\t\t{#each msg.Answer as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Answer \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t\t{#if msg.Authority !== null && msg.Authority.length > 0}\n\t\t\t\t{#each msg.Authority as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Authority \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t\t{#if msg.Additional !== null && msg.Additional.length > 0}\n\t\t\t\t{#each msg.Additional as rr}\n\t\t\t\t\t
\n\t\t\t\t\t\t Additional \n\t\t\t\t\t\t {getRRTypeName(rr.Type)} \n\t\t\t\t\t\t {rr.TTL} \n\t\t\t\t\t\t {JSON.stringify(rr.Value, null, 2)} \n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/if}\n\t\t
\n\t{/each}\n
\n","\n\n\n\n
\n

\nThis page allow you to change the rescached environment.\nUpon save, the rescached service will be restarted.\n

\n\n

rescached

\n
\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n
\n\n

DNS server

\n
\n\t\n\t\n\n\t{#each env.NameServers as ns}\n\t
\n\t\t\n\t\t\n\t
\n\t{/each}\n\n\t\n\t\tAdd\n\t\n\n\t\nIf you want rescached to serve a query from another host in your local\nnetwork, change this value to 0.0.0.0:53.\"\n\t>\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\tYes\n\t\t\t\n\t\t
\n\t\n\n\t\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\tYes\n\t\t\t\n\t\t
\n\t\n\n\t\n\t\t\n\t\n\n\t\n\t\t\n\t\n
\n\n\t
\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n","\n\n\n\n
\n\t

\n\tConfigure the source of blocked hosts file.\n\t

\n\n\t
\n\t\t
\n\t\t\t Enabled \n\t\t\t Name \n\t\t\t URL \n\t\t\t Last updated \n\t\t
\n\t\t{#each env.HostsBlocks as hostsBlock}\n\t\t
\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{hostsBlock.Name}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{hostsBlock.LastUpdated}\n\t\t\t\n\t\t
\n\t\t{/each}\n\t
\n\n\t
\n\t\t\n\t
\n
\n","\n\n\n\n
\n\t
\n\t\t{#each Object.entries(env.HostsFiles) as [name,hf], name }\n\t\t\n\t\t{/each}\n\n\t\t
\n\n\t\t\n\t\t\n\t
\n\n\t
\n\t\t{#if hostsFile.Name === \"\"}\n\t\t\t
\n\t\t\t\tSelect one of the hosts file to manage.\n\t\t\t
\n\t\t{:else}\n\t\t\t

\n\t\t\t\t{hostsFile.Name} ({hostsFile.Records.length} records)\n\t\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\n\t\t\t{#if newRecord !== null}\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t{/if}\n\n\t\t\t
\n\t\t\t\t Domain name \n\t\t\t\t IP address \n\t\t\t
\n\n\t\t\t{#each hostsFile.Records as rr, idx (idx)}\n\t\t\t\t
\n\t\t\t\t\t {rr.Name} \n\t\t\t\t\t {rr.Value} \n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t{/each}\n\t\t{/if}\n\t
\n
\n","\n\n\n\n
\n\t
\n\t\t{#each Object.entries(env.ZoneFiles) as [name, zoneFile]}\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t{zoneFile.Name}\n\t\t\t\t\n\t\t\t
\n\t\t{/each}\n\t\t
\n\n\t\t\n\t\t\n\t
\n\n\t
\n\t\t{#if activeZone.Name === \"\"}\n\t\t\t

\n\t\t\t\tSelect one of the zone file to manage.\n\t\t\t

\n\t\t{:else}\n\t\t\t

\n\t\t\t\t{activeZone.Name}\n\t\t\t\t\n\t\t\t\t\tDelete\n\t\t\t\t\n\t\t\t

\n\n\t\t\t

\n\t\t\t\tSOA record\n\t\t\t\t\n\t\t\t\t\tDelete\n\t\t\t\t\n\t\t\t

\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\n\t\t\t

List records

\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\tName\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tType\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tValue\n\t\t\t\t\n\t\t\t
\n\n\t\t\t{#each Object.entries(activeZone.Records) as [dname, listRR]}\n\t\t\t\t{#each listRR as rr, idx}\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{rr.Name}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{getTypeName(rr.Type)}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{rr.Value}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t{/each}\n\t\t\t{/each}\n\n\t\t\t
\n\t\t\t\t\n\n\t\t\t\t{#if _rr.Type === 1 || _rr.Type === 2 || _rr.Type === 5 ||\n\t\t\t\t\t_rr.Type === 16 || _rr.Type === 28\n\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t{:else if _rr.Type === 12} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t{:else if _rr.Type === 15} \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t{/if}\n\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t{/if}\n\t
\n
\n","\n\n\n\n\n\n
\n\t\n\n\t{#if state === stateEnvironment}\n\t\t\n\t{:else if state === stateHostsBlock}\n\t\t\n\t{:else if state === stateHostsDir}\n\t\t\n\t{:else if state === stateMasterDir}\n\t\t\n\t{:else}\n\t\t\n\t{/if}\n
\n","import App from \"./App.svelte\"\n\nconst app = new App({\n\ttarget: document.body,\n})\n\nexport default app\n"],"names":["linear"],"mappings":";;;;;IAAA,SAAS,IAAI,GAAG,GAAG;IACnB,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE;IAC1B;IACA,IAAI,KAAK,MAAM,CAAC,IAAI,GAAG;IACvB,QAAQ,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,OAAO,GAAG,CAAC;IACf,CAAC;IAID,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,IAAI,OAAO,CAAC,aAAa,GAAG;IAC5B,QAAQ,GAAG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;;"} \ No newline at end of file diff --git a/_www/public/favicon.png b/_www/public/favicon.png deleted file mode 100644 index 0a3c077..0000000 Binary files a/_www/public/favicon.png and /dev/null differ diff --git a/_www/public/global.css b/_www/public/global.css deleted file mode 100644 index 2546012..0000000 --- a/_www/public/global.css +++ /dev/null @@ -1,79 +0,0 @@ -html, -body { - position: relative; - width: 100%; - height: 100%; -} - -body { - color: #333; - margin: 0; - padding: 8px; - box-sizing: border-box; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -} - -a { - color: rgb(0, 100, 200); - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -a:visited { - color: rgb(0, 80, 160); -} - -label { - display: block; -} - -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - padding: 0.4em; - margin: 0 0 0.5em 0; - box-sizing: border-box; - border: 1px solid #ccc; - border-radius: 2px; -} - -input:disabled { - color: #ccc; -} - -input[type="range"] { - height: 0; -} - -button { - color: #333; - background-color: #f4f4f4; - outline: none; -} - -button:disabled { - color: #999; -} - -button:not(:disabled):active { - background-color: #ddd; -} - -button:focus { - border-color: #666; -} - -h1, -h2 { - color: #ff3e00; - text-transform: uppercase; - font-size: normal; - font-weight: 100; -} diff --git a/_www/public/index.html b/_www/public/index.html deleted file mode 100644 index e8e6f92..0000000 --- a/_www/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - rescached - - - - - - - - - - diff --git a/_www/rescached.js b/_www/rescached.js new file mode 100644 index 0000000..5610e4e --- /dev/null +++ b/_www/rescached.js @@ -0,0 +1,289 @@ +const RRTypes = { + 1: "A", + 2: "NS", + 3: "MD", + 4: "MF", + 5: "CNAME", + 6: "SOA", + 7: "MB", + 8: "MG", + 9: "MR", + 10: "NULL", + 11: "WKS", + 12: "PTR", + 13: "HINFO", + 14: "MINFO", + 15: "MX", + 16: "TXT", + 28: "AAAA", + 33: "SRV", + 41: "OPT", +} + +function getRRTypeName(k) { + let v = RRTypes[k] + if (v === "") { + return k + } + return v +} + +class Rescached { + static nanoSeconds = 1000000000 + static apiHostsd = "/api/hosts.d/" + static apiZoned = "/api/zone.d/" + + constructor(server) { + this.server = server + this.env = {} + } + + async HostsFileCreate(name) { + const httpRes = await fetch( + this.server + Rescached.apiHostsd + name, + { + method: "PUT", + }, + ) + let res = await httpRes.json() + if (res.code === 200) { + this.env.HostsFiles[name] = { + Name: name, + Records: [], + } + } + return res + } + + async Search(query) { + console.log("Search: ", query) + const res = await fetch( + this.server + "/api/caches" + "?query=" + query, + ) + return await res.json() + } + + async getEnvironment() { + const httpRes = await fetch(this.server + "/api/environment") + const res = await httpRes.json() + + if (httpRes.status === 200) { + res.data.PruneDelay = + res.data.PruneDelay / Rescached.nanoSeconds + res.data.PruneThreshold = + res.data.PruneThreshold / + Rescached.nanoSeconds + + for (let k in res.data.HostsFiles) { + if (!res.data.HostsFiles.hasOwnProperty(k)) { + continue + } + let hf = res.data.HostsFiles[k] + if (typeof hf.Records === "undefined") { + hf.Records = [] + } + } + this.env = res.data + } + return res + } + + GetRRTypeName(k) { + let v = RRTypes[k] + if (v === "") { + return k + } + return v + } + + async HostsFileDelete(name) { + const httpRes = await fetch( + this.server + Rescached.apiHostsd + name, + { + method: "DELETE", + }, + ) + const res = await httpRes.json() + if (httpRes.status === 200) { + delete this.env.HostsFiles[name] + } + return res + } + + async HostsFileGet(name) { + const httpRes = await fetch( + this.server + Rescached.apiHostsd + name, + ) + let res = await httpRes.json() + if (httpRes.Status === 200) { + this.env.HostsFiles[name] = { + Name: name, + Records: res.data, + } + } + return res + } + + async HostsFileRecordAdd(hostsFile, domain, value) { + let params = new URLSearchParams() + params.set("domain", domain) + params.set("value", value) + + const api = + this.server + + Rescached.apiHostsd + + hostsFile + + "/rr" + + "?" + + params.toString() + + const httpRes = await fetch(api, { + method: "POST", + }) + const res = await httpRes.json() + if (httpRes.Status === 200) { + let hf = this.env.HostsFiles[hostsFile] + hf.Records.push(res.data) + } + return res + } + + async HostsFileRecordDelete(hostsFile, domain) { + let params = new URLSearchParams() + params.set("domain", domain) + + const api = + this.server + + Rescached.apiHostsd + + hostsFile + + "/rr" + + "?" + + params.toString() + + const httpRes = await fetch(api, { + method: "DELETE", + }) + const res = await httpRes.json() + if (httpRes.Status === 200) { + let hf = this.env.HostsFiles[hostsFile] + for (let x = 0; x < hf.Records.length; x++) { + if (hf.Records[x].Name === domain) { + hf.Records.splice(x, 1) + } + } + } + return res + } + + async updateEnvironment() { + let got = {} + + Object.assign(got, this.env) + + got.PruneDelay = got.PruneDelay * this.nanoSeconds + got.PruneThreshold = got.PruneThreshold * this.nanoSeconds + + const httpRes = await fetch( + this.server + "/api/environment", + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(got), + }, + ) + + return await httpRes.json() + } + + async updateHostsBlocks(hostsBlocks) { + const httpRes = await fetch( + this.server + "/api/hosts_block", + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(hostsBlocks), + }, + ) + return await httpRes.json() + } + + async ZoneFileCreate(name) { + const httpRes = await fetch( + this.server + Rescached.apiZoned + name, + { + method: "PUT", + }, + ) + let res = await httpRes.json() + if (res.code == 200) { + this.env.ZoneFiles[name] = res.data + } + return res + } + + async ZoneFileDelete(name) { + const httpRes = await fetch( + this.server + Rescached.apiZoned + name, + { + method: "DELETE", + }, + ) + let res = await httpRes.json() + if (res.code == 200) { + delete this.env.ZoneFiles[name] + } + return res + } + + async ZoneFileRecordCreate(name, rr) { + let api = + this.server + + Rescached.apiZoned + + name + + "/rr/" + + rr.Type + const httpRes = await fetch(api, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(rr), + }) + let res = await httpRes.json() + if (httpRes.status === 200) { + let zf = this.env.ZoneFiles[name] + if (rr.Type == 6) { + // SOA. + zf.SOA = res.data + } else { + zf.Records = res.data + } + } + return res + } + + async ZoneFileRecordDelete(name, rr) { + let api = + this.server + + Rescached.apiZoned + + name + + "/rr/" + + rr.Type + const httpRes = await fetch(api, { + method: "DELETE", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(rr), + }) + let res = await httpRes.json() + if (httpRes.status === 200) { + this.env.ZoneFiles[name].Records = res.data + } + return res + } +} diff --git a/_www/rollup.config.js b/_www/rollup.config.js deleted file mode 100644 index ce3c9eb..0000000 --- a/_www/rollup.config.js +++ /dev/null @@ -1,71 +0,0 @@ -import svelte from 'rollup-plugin-svelte'; -import resolve from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import livereload from 'rollup-plugin-livereload'; -import { terser } from 'rollup-plugin-terser'; - -const production = !process.env.ROLLUP_WATCH; - -export default { - input: 'src/main.js', - output: { - sourcemap: true, - format: 'iife', - name: 'app', - file: 'public/build/bundle.js' - }, - plugins: [ - svelte({ - // enable run-time checks when not in production - dev: !production, - // we'll extract any component CSS out into - // a separate file - better for performance - css: css => { - css.write('public/build/bundle.css'); - } - }), - - // If you have external dependencies installed from - // npm, you'll most likely need these plugins. In - // some cases you'll need additional configuration - - // consult the documentation for details: - // https://github.com/rollup/plugins/tree/master/packages/commonjs - resolve({ - browser: true, - dedupe: ['svelte'] - }), - commonjs(), - - // In dev mode, call `npm run start` once - // the bundle has been generated - !production && serve(), - - // Watch the `public` directory and refresh the - // browser on changes when not in production - !production && livereload('public'), - - // If we're building for production (npm run build - // instead of npm run dev), minify - production && terser() - ], - watch: { - clearScreen: false - } -}; - -function serve() { - let started = false; - - return { - writeBundle() { - if (!started) { - started = true; - - require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], { - stdio: ['ignore', 'inherit', 'inherit'], - shell: true - }); - } - } - }; -} diff --git a/_www/src/App.svelte b/_www/src/App.svelte deleted file mode 100644 index caacc4d..0000000 --- a/_www/src/App.svelte +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - diff --git a/_www/src/Dashboard.svelte b/_www/src/Dashboard.svelte deleted file mode 100644 index 97db3a7..0000000 --- a/_www/src/Dashboard.svelte +++ /dev/null @@ -1,136 +0,0 @@ - - - - -
- - {#each listMsg as msg (msg)} -
-
- {msg.Question.Name} - - -
-
- - Type - TTL - Value -
- - {#if msg.Answer !== null && msg.Answer.length > 0} - {#each msg.Answer as rr} -
- Answer - {getRRTypeName(rr.Type)} - {rr.TTL} - {JSON.stringify(rr.Value, null, 2)} -
- {/each} - {/if} - {#if msg.Authority !== null && msg.Authority.length > 0} - {#each msg.Authority as rr} -
- Authority - {getRRTypeName(rr.Type)} - {rr.TTL} - {JSON.stringify(rr.Value, null, 2)} -
- {/each} - {/if} - {#if msg.Additional !== null && msg.Additional.length > 0} - {#each msg.Additional as rr} -
- Additional - {getRRTypeName(rr.Type)} - {rr.TTL} - {JSON.stringify(rr.Value, null, 2)} -
- {/each} - {/if} -
- {/each} -
diff --git a/_www/src/Environment.svelte b/_www/src/Environment.svelte deleted file mode 100644 index 1b284b5..0000000 --- a/_www/src/Environment.svelte +++ /dev/null @@ -1,286 +0,0 @@ - - - - -
-

-This page allow you to change the rescached environment. -Upon save, the rescached service will be restarted. -

- -

rescached

-
- - - - - - - -
- -

DNS server

-
- - - - {#each env.NameServers as ns} -
- - -
- {/each} - - - - - - - - - - - - - - - - - - - - - - - - -
- - - Yes - -
-
- - -
- - - Yes - -
-
- - - - - - - - -
- -
-
- -
-
-
diff --git a/_www/src/HostsBlock.svelte b/_www/src/HostsBlock.svelte deleted file mode 100644 index 71f720a..0000000 --- a/_www/src/HostsBlock.svelte +++ /dev/null @@ -1,112 +0,0 @@ - - - - -
-

- Configure the source of blocked hosts file. -

- -
-
- Enabled - Name - URL - Last updated -
- {#each env.HostsBlocks as hostsBlock} -
- - - - - {hostsBlock.Name} - - - - - - {hostsBlock.LastUpdated} - -
- {/each} -
- -
- -
-
diff --git a/_www/src/HostsDir.svelte b/_www/src/HostsDir.svelte deleted file mode 100644 index f45732d..0000000 --- a/_www/src/HostsDir.svelte +++ /dev/null @@ -1,250 +0,0 @@ - - - - -
- - -
- {#if hostsFile.Name === ""} -
- Select one of the hosts file to manage. -
- {:else} -

- {hostsFile.Name} ({hostsFile.Records.length} records) - -

-
- -
- - {#if newRecord !== null} -
- - - -
- {/if} - -
- Domain name - IP address -
- - {#each hostsFile.Records as rr, idx (idx)} -
- {rr.Name} - {rr.Value} - -
- {/each} - {/if} -
-
diff --git a/_www/src/MasterDir.svelte b/_www/src/MasterDir.svelte deleted file mode 100644 index 442f13f..0000000 --- a/_www/src/MasterDir.svelte +++ /dev/null @@ -1,532 +0,0 @@ - - - - -
- - -
- {#if activeZone.Name === ""} -

- Select one of the zone file to manage. -

- {:else} -

- {activeZone.Name} - -

- -

- SOA record - -

-
- - - - - - - - - - - - - - - - - - - - - -
- -
-
- -

List records

-
- - Name - - - Type - - - Value - -
- - {#each Object.entries(activeZone.Records) as [dname, listRR]} - {#each listRR as rr, idx} -
- - {rr.Name} - - - {getTypeName(rr.Type)} - - - {rr.Value} - - -
- {/each} - {/each} - -
- - - {#if _rr.Type === 1 || _rr.Type === 2 || _rr.Type === 5 || - _rr.Type === 16 || _rr.Type === 28 - } - - - - {:else if _rr.Type === 12} - - - {:else if _rr.Type === 15} - - - - {/if} - -
- -
-
- {/if} -
-
diff --git a/_www/src/common.js b/_www/src/common.js deleted file mode 100644 index 2f49f69..0000000 --- a/_www/src/common.js +++ /dev/null @@ -1,29 +0,0 @@ -const RRTypes = { - 1: "A", - 2: "NS", - 3: "MD", - 4: "MF", - 5: "CNAME", - 6: "SOA", - 7: "MB", - 8: "MG", - 9: "MR", - 10: "NULL", - 11: "WKS", - 12: "PTR", - 13: "HINFO", - 14: "MINFO", - 15: "MX", - 16: "TXT", - 28: "AAAA", - 33: "SRV", - 41: "OPT", -} - -export function getRRTypeName(k) { - let v = RRTypes[k] - if (v === "") { - return k - } - return v -} diff --git a/_www/src/environment.js b/_www/src/environment.js deleted file mode 100644 index b85b587..0000000 --- a/_www/src/environment.js +++ /dev/null @@ -1,19 +0,0 @@ -import { writable } from "svelte/store" - -export const apiEnvironment = "/api/environment" -export const environment = writable({ - NameServers: [], - HostsBlocks: [], - HostsFiles: {}, - ZoneFiles: [], -}) -export const nanoSeconds = 1000000000 - -export async function setEnvironment(got) { - got.PruneDelay = got.PruneDelay / nanoSeconds - got.PruneThreshold = got.PruneThreshold / nanoSeconds - for (const [key, value] of Object.entries(got.HostsFiles)) { - got.HostsFiles[key].Records = [] - } - environment.set(got) -} diff --git a/_www/src/main.js b/_www/src/main.js deleted file mode 100644 index ecbe53c..0000000 --- a/_www/src/main.js +++ /dev/null @@ -1,7 +0,0 @@ -import App from "./App.svelte" - -const app = new App({ - target: document.body, -}) - -export default app diff --git a/_www/zone.d/index.html b/_www/zone.d/index.html new file mode 100644 index 0000000..77bfb8c --- /dev/null +++ b/_www/zone.d/index.html @@ -0,0 +1,513 @@ + + + + + + + + rescached | zone.d + + + + + +
+ + + +
+
+ + + + + + +
+ + + + + + diff --git a/environment.go b/environment.go index f8b574e..d976702 100644 --- a/environment.go +++ b/environment.go @@ -46,8 +46,8 @@ const ( keyTLSPort = "tls.port" keyTLSPrivateKey = "tls.private_key" - dirHosts = "/etc/rescached/hosts.d" - dirMaster = "/etc/rescached/master.d" + dirHosts = "/etc/rescached/hosts.d" + dirZone = "/etc/rescached/zone.d" ) // diff --git a/go.mod b/go.mod index cdf139d..2c383a0 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/shuLhan/rescached-go/v3 -go 1.13 +go 1.14 -require github.com/shuLhan/share v0.22.1-0.20210111194332-8df2d3ff4b02 +require github.com/shuLhan/share v0.22.1-0.20210119183627-da9256c28c9c //replace github.com/shuLhan/share => ../share diff --git a/go.sum b/go.sum index b564bce..4bebf00 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ github.com/shuLhan/share v0.20.2-0.20201122173411-e8b3bf5ee6e9/go.mod h1:oBv+CGH github.com/shuLhan/share v0.20.2-0.20201205202022-66069b9e49fe/go.mod h1:oBv+CGHG6u4Sa71+nJJJji8mCgPAadywjsB3I3k/b0o= github.com/shuLhan/share v0.22.1-0.20210109185915-0490a19341d9 h1:Kqmfgkwq5dn68epHLBmPVkkLRDk3XFftqO/o3X84Mqg= github.com/shuLhan/share v0.22.1-0.20210109185915-0490a19341d9/go.mod h1:u9caerexlcxmPVDttj7PnkxCBDY6yBRTZ+gGR+1tO98= -github.com/shuLhan/share v0.22.1-0.20210111194332-8df2d3ff4b02 h1:rlaqzCiWaoJS1VqvK3YUAMtcRwS3c/jq7Egg++aA7x8= -github.com/shuLhan/share v0.22.1-0.20210111194332-8df2d3ff4b02/go.mod h1:y4+p5vUmKNNhMMhU6yGgE6QxTgJxA4nv6OOq+cIf7wU= +github.com/shuLhan/share v0.22.1-0.20210119183627-da9256c28c9c h1:LrwXdGkzOKcszqS+IX9SQ94l8p6eAzcaml5ZFfW/Mz4= +github.com/shuLhan/share v0.22.1-0.20210119183627-da9256c28c9c/go.mod h1:y4+p5vUmKNNhMMhU6yGgE6QxTgJxA4nv6OOq+cIf7wU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/httpd.go b/httpd.go index 90d90cd..149326f 100644 --- a/httpd.go +++ b/httpd.go @@ -9,7 +9,7 @@ import ( "errors" "fmt" "log" - stdhttp "net/http" + "net/http" "os" "path/filepath" "regexp" @@ -18,7 +18,7 @@ import ( "github.com/shuLhan/share/lib/dns" liberrors "github.com/shuLhan/share/lib/errors" - "github.com/shuLhan/share/lib/http" + libhttp "github.com/shuLhan/share/lib/http" "github.com/shuLhan/share/lib/memfs" libnet "github.com/shuLhan/share/lib/net" ) @@ -26,23 +26,32 @@ import ( var memFS *memfs.MemFS const ( - defHTTPDRootDir = "_www/public/" - paramNameDomain = "domain" - paramNameName = "name" - paramNameQuery = "query" - paramNameType = "type" - paramNameValue = "value" - apiCaches = "/api/caches" - apiEnvironment = "/api/environment" - apiHostsBlock = "/api/hosts_block" - apiHostsDir = "/api/hosts.d/:name" - apiHostsDirRR = "/api/hosts.d/:name/rr" - apiMasterFile = "/api/master.d/:name" - apiMasterFileRRType = "/api/master.d/:name/rr/:type" + defHTTPDRootDir = "_www" + paramNameDomain = "domain" + paramNameName = "name" + paramNameQuery = "query" + paramNameType = "type" + paramNameValue = "value" + apiCaches = "/api/caches" + apiEnvironment = "/api/environment" + apiHostsBlock = "/api/hosts_block" + apiHostsDir = "/api/hosts.d/:name" + apiHostsDirRR = "/api/hosts.d/:name/rr" + apiZoneFile = "/api/zone.d/:name" + apiZoneFileRRType = "/api/zone.d/:name/rr/:type" ) +type response struct { + liberrors.E + Data interface{} `json:"data"` +} + +func (r *response) Unwrap() error { + return &r.E +} + func (srv *Server) httpdInit() (err error) { - env := &http.ServerOptions{ + env := &libhttp.ServerOptions{ Options: memfs.Options{ Root: defHTTPDRootDir, Includes: []string{ @@ -59,11 +68,11 @@ func (srv *Server) httpdInit() (err error) { "http://127.0.0.1:5000", }, CORSAllowHeaders: []string{ - http.HeaderContentType, + libhttp.HeaderContentType, }, } - srv.httpd, err = http.NewServer(env) + srv.httpd, err = libhttp.NewServer(env) if err != nil { return fmt.Errorf("newHTTPServer: %w", err) } @@ -77,32 +86,32 @@ func (srv *Server) httpdInit() (err error) { } func (srv *Server) httpdRegisterEndpoints() (err error) { - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodGet, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodGet, Path: apiCaches, - RequestType: http.RequestTypeQuery, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeQuery, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.httpdAPIGetCaches, }) if err != nil { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodDelete, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodDelete, Path: apiCaches, - RequestType: http.RequestTypeQuery, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeQuery, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.httpdAPIDeleteCaches, }) if err != nil { return err } - epAPIGetEnvironment := &http.Endpoint{ - Method: http.RequestMethodGet, + epAPIGetEnvironment := &libhttp.Endpoint{ + Method: libhttp.RequestMethodGet, Path: apiEnvironment, - RequestType: http.RequestTypeJSON, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeJSON, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.httpdAPIGetEnvironment, } @@ -111,11 +120,11 @@ func (srv *Server) httpdRegisterEndpoints() (err error) { return err } - epAPIPostEnvironment := &http.Endpoint{ - Method: http.RequestMethodPost, + epAPIPostEnvironment := &libhttp.Endpoint{ + Method: libhttp.RequestMethodPost, Path: apiEnvironment, - RequestType: http.RequestTypeJSON, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeJSON, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.httpdAPIPostEnvironment, } @@ -124,11 +133,11 @@ func (srv *Server) httpdRegisterEndpoints() (err error) { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodPost, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodPost, Path: apiHostsBlock, - RequestType: http.RequestTypeJSON, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeJSON, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsBlockUpdate, }) if err != nil { @@ -136,33 +145,33 @@ func (srv *Server) httpdRegisterEndpoints() (err error) { } // Register API to create new hosts file. - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodPut, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodPut, Path: apiHostsDir, - RequestType: http.RequestTypeNone, - ResponseType: http.ResponseTypeNone, + RequestType: libhttp.RequestTypeNone, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsFileCreate, }) if err != nil { return err } // Register API to get content of hosts file. - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodGet, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodGet, Path: apiHostsDir, - RequestType: http.RequestTypeNone, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeNone, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsFileGet, }) if err != nil { return err } // Register API to delete hosts file. - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodDelete, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodDelete, Path: apiHostsDir, - RequestType: http.RequestTypeNone, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeNone, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsFileDelete, }) if err != nil { @@ -170,64 +179,65 @@ func (srv *Server) httpdRegisterEndpoints() (err error) { } // Register API to create one record in hosts file. - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodPost, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodPost, Path: apiHostsDirRR, - RequestType: http.RequestTypeQuery, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeQuery, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsFileRRCreate, }) if err != nil { return err } + // Register API to delete a record from hosts file. - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodDelete, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodDelete, Path: apiHostsDirRR, - RequestType: http.RequestTypeQuery, - ResponseType: http.ResponseTypeJSON, + RequestType: libhttp.RequestTypeQuery, + ResponseType: libhttp.ResponseTypeJSON, Call: srv.apiHostsFileRRDelete, }) if err != nil { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodPut, - Path: apiMasterFile, - RequestType: http.RequestTypeNone, - ResponseType: http.ResponseTypeJSON, - Call: srv.apiMasterFileCreate, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodPut, + Path: apiZoneFile, + RequestType: libhttp.RequestTypeNone, + ResponseType: libhttp.ResponseTypeJSON, + Call: srv.apiZoneFileCreate, }) if err != nil { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodDelete, - Path: apiMasterFile, - RequestType: http.RequestTypeNone, - ResponseType: http.ResponseTypeJSON, - Call: srv.apiMasterFileDelete, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodDelete, + Path: apiZoneFile, + RequestType: libhttp.RequestTypeNone, + ResponseType: libhttp.ResponseTypeJSON, + Call: srv.apiZoneFileDelete, }) if err != nil { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodPost, - Path: apiMasterFileRRType, - RequestType: http.RequestTypeJSON, - ResponseType: http.ResponseTypeJSON, - Call: srv.apiMasterFileCreateRR, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodPost, + Path: apiZoneFileRRType, + RequestType: libhttp.RequestTypeJSON, + ResponseType: libhttp.ResponseTypeJSON, + Call: srv.apiZoneFileRRCreate, }) if err != nil { return err } - err = srv.httpd.RegisterEndpoint(&http.Endpoint{ - Method: http.RequestMethodDelete, - Path: apiMasterFileRRType, - RequestType: http.RequestTypeJSON, - ResponseType: http.ResponseTypeJSON, - Call: srv.apiMasterFileDeleteRR, + err = srv.httpd.RegisterEndpoint(&libhttp.Endpoint{ + Method: libhttp.RequestMethodDelete, + Path: apiZoneFileRRType, + RequestType: libhttp.RequestTypeJSON, + ResponseType: libhttp.ResponseTypeJSON, + Call: srv.apiZoneFileRRDelete, }) if err != nil { return err @@ -253,12 +263,14 @@ func (srv *Server) httpdRun() { } func (srv *Server) httpdAPIGetCaches( - _ stdhttp.ResponseWriter, req *stdhttp.Request, _ []byte, + _ http.ResponseWriter, req *http.Request, _ []byte, ) ( resBody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusInternalServerError, + res := response{ + E: liberrors.E{ + Code: http.StatusInternalServerError, + }, } q := req.Form.Get(paramNameQuery) @@ -266,7 +278,7 @@ func (srv *Server) httpdAPIGetCaches( re, err := regexp.Compile(q) if err != nil { res.Message = err.Error() - return nil, res + return nil, &res } listMsg := srv.dns.SearchCaches(re) @@ -274,16 +286,19 @@ func (srv *Server) httpdAPIGetCaches( listMsg = make([]*dns.Message, 0) } - return json.Marshal(listMsg) + res.Code = http.StatusOK + res.Data = listMsg + + return json.Marshal(res) } func (srv *Server) httpdAPIDeleteCaches( - _ stdhttp.ResponseWriter, req *stdhttp.Request, _ []byte, + _ http.ResponseWriter, req *http.Request, _ []byte, ) ( resBody []byte, err error, ) { res := &liberrors.E{ - Code: stdhttp.StatusInternalServerError, + Code: http.StatusInternalServerError, } q := req.Form.Get(paramNameName) @@ -294,28 +309,34 @@ func (srv *Server) httpdAPIDeleteCaches( srv.dns.RemoveCachesByNames([]string{q}) - res.Code = stdhttp.StatusOK + res.Code = http.StatusOK res.Message = fmt.Sprintf("%q has been removed from caches", q) return json.Marshal(res) } func (srv *Server) httpdAPIGetEnvironment( - httpRes stdhttp.ResponseWriter, req *stdhttp.Request, reqBody []byte, + httpRes http.ResponseWriter, req *http.Request, reqBody []byte, ) ( resBody []byte, err error, ) { - return json.Marshal(srv.env) + res := &response{} + res.Code = http.StatusOK + res.Data = srv.env + + return json.Marshal(res) } func (srv *Server) httpdAPIPostEnvironment( - httpRes stdhttp.ResponseWriter, req *stdhttp.Request, reqBody []byte, + httpRes http.ResponseWriter, req *http.Request, reqBody []byte, ) ( resBody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusOK, - Message: "Restarting DNS server", + res := &response{ + E: liberrors.E{ + Code: http.StatusOK, + Message: "Restarting DNS server", + }, } newOpts := new(environment) @@ -325,7 +346,7 @@ func (srv *Server) httpdAPIPostEnvironment( } if len(newOpts.NameServers) == 0 { - res.Code = stdhttp.StatusBadRequest + res.Code = http.StatusBadRequest res.Message = "at least one parent name servers must be defined" return nil, res } @@ -336,7 +357,7 @@ func (srv *Server) httpdAPIPostEnvironment( err = newOpts.write(srv.fileConfig) if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } @@ -346,7 +367,7 @@ func (srv *Server) httpdAPIPostEnvironment( srv.Stop() err = srv.Start() if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } @@ -357,14 +378,14 @@ func (srv *Server) httpdAPIPostEnvironment( // // apiHostsBlockUpdate set the HostsBlock to be enabled or disabled. // -// If its status changes to enabled, unhide it file, populate the hosts back -// to caches, and add it to list of HostsFiles. +// If its status changes to enabled, unhide the hosts block file, populate the +// hosts back to caches, and add it to list of HostsFiles. // // If its status changes to disabled, remove the hosts from caches, hide it, // and remove it from list of HostsFiles. // func (srv *Server) apiHostsBlockUpdate( - httpRes stdhttp.ResponseWriter, req *stdhttp.Request, reqBody []byte, + httpRes http.ResponseWriter, req *http.Request, reqBody []byte, ) ( resBody []byte, err error, ) { @@ -375,8 +396,10 @@ func (srv *Server) apiHostsBlockUpdate( return nil, err } - res := &liberrors.E{ - Code: stdhttp.StatusInternalServerError, + res := &response{ + E: liberrors.E{ + Code: http.StatusInternalServerError, + }, } for _, hbx := range hostsBlocks { @@ -413,7 +436,10 @@ func (srv *Server) apiHostsBlockUpdate( return nil, res } - return json.Marshal(srv.env) + res.Code = http.StatusOK + res.Data = hostsBlocks + + return json.Marshal(res) } func (srv *Server) hostsBlockEnable(hb *hostsBlock) (err error) { @@ -469,16 +495,17 @@ func (srv *Server) hostsBlockDisable(hb *hostsBlock) (err error) { } func (srv *Server) apiHostsFileCreate( - httpres stdhttp.ResponseWriter, httpreq *stdhttp.Request, _ []byte, + httpres http.ResponseWriter, httpreq *http.Request, _ []byte, ) ( resbody []byte, err error, ) { + res := &response{} + name := httpreq.Form.Get(paramNameName) if len(name) == 0 { - return nil, &liberrors.E{ - Code: stdhttp.StatusBadRequest, - Message: "hosts file name is invalid or empty", - } + res.Code = http.StatusBadRequest + res.Message = "hosts file name is invalid or empty" + return nil, res } _, found := srv.env.HostsFiles[name] @@ -486,51 +513,61 @@ func (srv *Server) apiHostsFileCreate( path := filepath.Join(dirHosts, name) hfile, err := dns.NewHostsFile(path, nil) if err != nil { - return nil, &liberrors.E{ - Code: stdhttp.StatusInternalServerError, - Message: err.Error(), - } + res.Code = http.StatusInternalServerError + res.Message = err.Error() + return nil, res } srv.env.HostsFiles[hfile.Name] = hfile } - httpres.WriteHeader(stdhttp.StatusCreated) + res.Code = http.StatusOK + res.Message = fmt.Sprintf("Hosts file %q has been created", name) - return nil, nil + return json.Marshal(res) } func (srv *Server) apiHostsFileGet( - _ stdhttp.ResponseWriter, httpreq *stdhttp.Request, _ []byte, + _ http.ResponseWriter, httpreq *http.Request, _ []byte, ) ( resbody []byte, err error, ) { + res := &response{} + name := httpreq.Form.Get(paramNameName) - hfile, found := srv.env.HostsFiles[name] - if !found || hfile.Records == nil { - return []byte("[]"), nil + hf, found := srv.env.HostsFiles[name] + if !found { + res.Code = http.StatusNotFound + res.Message = "invalid or empty hosts file " + name + return nil, res } + if hf.Records == nil || cap(hf.Records) == 0 { + hf.Records = make([]*dns.ResourceRecord, 0, 1) + } + + res.Code = http.StatusOK + res.Data = hf.Records - return json.Marshal(&hfile.Records) + return json.Marshal(res) } func (srv *Server) apiHostsFileDelete( - _ stdhttp.ResponseWriter, httpreq *stdhttp.Request, reqbody []byte, + _ http.ResponseWriter, httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusOK, - } + res := &response{} name := httpreq.Form.Get(paramNameName) if len(name) == 0 { + res.Code = http.StatusBadRequest res.Message = "empty or invalid host file name" return nil, res } hfile, found := srv.env.HostsFiles[name] if !found { + res.Code = http.StatusBadRequest res.Message = "apiDeleteHostsFile: " + name + " not found" return nil, res } @@ -540,12 +577,14 @@ func (srv *Server) apiHostsFileDelete( err = hfile.Delete() if err != nil { + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } delete(srv.env.HostsFiles, name) + res.Code = http.StatusOK res.Message = name + " has been deleted" return json.Marshal(res) } @@ -554,13 +593,12 @@ func (srv *Server) apiHostsFileDelete( // apiHostsFileRRCreate create new record and save it to the hosts file. // func (srv *Server) apiHostsFileRRCreate( - _ stdhttp.ResponseWriter, httpreq *stdhttp.Request, _ []byte, + _ http.ResponseWriter, httpreq *http.Request, _ []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, - } + res := &response{} + res.Code = http.StatusBadRequest hostsFileName := httpreq.Form.Get(paramNameName) if len(hostsFileName) == 0 { @@ -597,28 +635,31 @@ func (srv *Server) apiHostsFileRRCreate( err = hfile.AppendAndSaveRecord(rr) if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } err = srv.dns.PopulateCachesByRR([]*dns.ResourceRecord{rr}, hostsFileName) if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } - return json.Marshal(rr) + res.Code = http.StatusOK + res.Data = rr + + return json.Marshal(res) } func (srv *Server) apiHostsFileRRDelete( - _ stdhttp.ResponseWriter, httpreq *stdhttp.Request, reqbody []byte, + _ http.ResponseWriter, httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, + Code: http.StatusBadRequest, } hostsFileName := httpreq.Form.Get(paramNameName) @@ -646,29 +687,28 @@ func (srv *Server) apiHostsFileRRDelete( } err = hfile.Save() if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } srv.dns.RemoveLocalCachesByNames([]string{domainName}) - res.Code = stdhttp.StatusOK + res.Code = http.StatusOK res.Message = "domain name '" + domainName + "' has been removed from hosts file" return json.Marshal(res) } -func (srv *Server) apiMasterFileCreate( - _ stdhttp.ResponseWriter, - httpreq *stdhttp.Request, +func (srv *Server) apiZoneFileCreate( + _ http.ResponseWriter, + httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, - } + res := &response{} + res.Code = http.StatusBadRequest zoneName := httpreq.Form.Get(paramNameName) if len(zoneName) == 0 { @@ -683,33 +723,37 @@ func (srv *Server) apiMasterFileCreate( mf, ok := srv.env.ZoneFiles[zoneName] if ok { - return json.Marshal(mf) + res.Code = http.StatusOK + res.Data = mf + return json.Marshal(res) } - zoneFile := filepath.Join(dirMaster, zoneName) + zoneFile := filepath.Join(dirZone, zoneName) mf = dns.NewZoneFile(zoneFile, zoneName) err = mf.Save() if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } srv.env.ZoneFiles[zoneName] = mf - return json.Marshal(mf) + res.Code = http.StatusOK + res.Data = mf + + return json.Marshal(res) } -func (srv *Server) apiMasterFileDelete( - _ stdhttp.ResponseWriter, - httpreq *stdhttp.Request, +func (srv *Server) apiZoneFileDelete( + _ http.ResponseWriter, + httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, - } + res := &response{} + res.Code = http.StatusBadRequest zoneName := httpreq.Form.Get(paramNameName) if len(zoneName) == 0 { @@ -733,40 +777,39 @@ func (srv *Server) apiMasterFileDelete( err = mf.Delete() if err != nil { - res.Code = stdhttp.StatusInternalServerError + res.Code = http.StatusInternalServerError res.Message = err.Error() return nil, res } - res.Code = stdhttp.StatusOK + res.Code = http.StatusOK res.Message = zoneName + " has been deleted" return json.Marshal(res) } // -// apiMasterFileCreateRR create new RR for the master file. +// apiZoneFileRRCreate create new RR for the zone file. // -func (srv *Server) apiMasterFileCreateRR( - _ stdhttp.ResponseWriter, - httpreq *stdhttp.Request, +func (srv *Server) apiZoneFileRRCreate( + _ http.ResponseWriter, + httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, - } + res := &response{} + res.Code = http.StatusBadRequest zoneFileName := httpreq.Form.Get(paramNameName) if len(zoneFileName) == 0 { - res.Message = "empty or invalid master file name" + res.Message = "empty or invalid zone file name" return nil, res } zoneFile := srv.env.ZoneFiles[zoneFileName] if zoneFile == nil { - res.Message = "unknown master file name " + zoneFileName + res.Message = "unknown zone file name " + zoneFileName return nil, res } @@ -778,14 +821,14 @@ func (srv *Server) apiMasterFileCreateRR( return nil, res } - rr := dns.ResourceRecord{} + rr := &dns.ResourceRecord{} switch uint16(rrType) { case dns.QueryTypeSOA: rr.Value = &dns.RDataSOA{} case dns.QueryTypeMX: rr.Value = &dns.RDataMX{} } - err = json.Unmarshal(reqbody, &rr) + err = json.Unmarshal(reqbody, rr) if err != nil { res.Message = "json.Unmarshal:" + err.Error() return nil, res @@ -812,37 +855,45 @@ func (srv *Server) apiMasterFileCreateRR( } } - listRR := []*dns.ResourceRecord{&rr} + listRR := []*dns.ResourceRecord{rr} err = srv.dns.PopulateCachesByRR(listRR, zoneFile.Path) if err != nil { - res.Message = "UpsertCacheByRR: " + err.Error() + res.Code = http.StatusBadRequest + res.Message = "PopulateCacheByRR: " + err.Error() return nil, res } - // Update the Master file. - zoneFile.Add(&rr) + // Update the Zone file. + zoneFile.Add(rr) err = zoneFile.Save() if err != nil { res.Message = err.Error() return nil, res } - return json.Marshal(&rr) + res.Code = http.StatusOK + res.Message = fmt.Sprintf("%s record has been saved", dns.QueryTypeNames[rr.Type]) + if rr.Type == dns.QueryTypeSOA { + res.Data = rr + } else { + res.Data = zoneFile.Records + } + + return json.Marshal(res) } // -// apiMasterFileDeleteRR delete RR from the master file. +// apiZoneFileRRDelete delete RR from the zone file. // -func (srv *Server) apiMasterFileDeleteRR( - _ stdhttp.ResponseWriter, - httpreq *stdhttp.Request, +func (srv *Server) apiZoneFileRRDelete( + _ http.ResponseWriter, + httpreq *http.Request, reqbody []byte, ) ( resbody []byte, err error, ) { - res := &liberrors.E{ - Code: stdhttp.StatusBadRequest, - } + res := &response{} + res.Code = http.StatusBadRequest zoneFileName := httpreq.Form.Get(paramNameName) if len(zoneFileName) == 0 { @@ -852,14 +903,15 @@ func (srv *Server) apiMasterFileDeleteRR( mf := srv.env.ZoneFiles[zoneFileName] if mf == nil { - res.Message = "unknown master file name " + zoneFileName + res.Message = "unknown zone file name " + zoneFileName return nil, res } v := httpreq.Form.Get(paramNameType) rrType, err := strconv.Atoi(v) if err != nil { - res.Message = err.Error() + res.Message = fmt.Sprintf("invalid or empty param type %s: %s", + paramNameType, err) return nil, res } @@ -895,7 +947,10 @@ func (srv *Server) apiMasterFileDeleteRR( return nil, res } - res.Code = stdhttp.StatusOK + res.Code = http.StatusOK + res.Message = fmt.Sprintf("The RR type %d and name %s has been deleted", + rr.Type, rr.Name) + res.Data = mf.Records return json.Marshal(res) } diff --git a/internal/generate_memfs.go b/internal/generate_memfs.go index e51fbc3..80586f4 100644 --- a/internal/generate_memfs.go +++ b/internal/generate_memfs.go @@ -14,7 +14,7 @@ import ( func main() { opts := memfs.Options{ - Root: "_www/public/", + Root: "_www", Includes: []string{ `.*\.html`, `.*\.js`, diff --git a/rescached.1.gz b/rescached.1.gz index e0485c9..a41425f 100644 Binary files a/rescached.1.gz and b/rescached.1.gz differ diff --git a/rescached.go b/rescached.go index 710f3e1..6d6464f 100644 --- a/rescached.go +++ b/rescached.go @@ -6,8 +6,10 @@ package rescached import ( + "errors" "fmt" "log" + "os" "sync" "github.com/shuLhan/share/lib/debug" @@ -82,12 +84,19 @@ func (srv *Server) Start() (err error) { } } - srv.env.ZoneFiles, err = dns.LoadMasterDir(dirMaster) + srv.env.ZoneFiles, err = dns.LoadZoneDir(dirZone) if err != nil { - return err + if !errors.Is(err, os.ErrNotExist) { + return err + } + err = os.MkdirAll(dirZone, 0700) + if err != nil { + return err + } + err = nil } - for _, masterFile := range srv.env.ZoneFiles { - srv.dns.PopulateCaches(masterFile.Messages(), masterFile.Path) + for _, zoneFile := range srv.env.ZoneFiles { + srv.dns.PopulateCaches(zoneFile.Messages(), zoneFile.Path) } if len(srv.env.FileResolvConf) > 0 { -- cgit v1.3