@stlite/desktop 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dump_artifacts.js +5 -4
- package/build/asset-manifest.json +43 -42
- package/build/electron/main.js +13 -0
- package/build/electron/preload.js +1 -0
- package/build/index.html +1 -1
- package/build/static/js/1318.57c335d2.chunk.js +1 -0
- package/build/static/js/{142.85e6074f.chunk.js → 142.2b0ffa81.chunk.js} +1 -1
- package/build/static/js/172.599dcb6e.chunk.js +5 -0
- package/build/static/js/2327.b8572a38.chunk.js +1 -0
- package/build/static/js/2775.c1ed54fa.chunk.js +5 -0
- package/build/static/js/291.aa03bc71.chunk.js +1 -0
- package/build/static/js/3580.e292972c.chunk.js +1 -0
- package/build/static/js/3603.c075eadf.chunk.js +2 -0
- package/build/static/js/3603.c075eadf.chunk.js.LICENSE.txt +135 -0
- package/build/static/js/3744.93bd4bad.chunk.js +2 -0
- package/build/static/js/4140.edb6c36a.chunk.js +1 -0
- package/build/static/js/4141.a101e33c.chunk.js +9 -0
- package/build/static/js/5093.304fcb1e.chunk.js +1 -0
- package/build/static/js/5099.c240313c.chunk.js +1 -0
- package/build/static/js/5177.3eb35171.chunk.js +2 -0
- package/build/static/js/5241.0326c97c.chunk.js +1 -0
- package/build/static/js/5440.c723be7c.chunk.js +1 -0
- package/build/static/js/5617.6141af30.chunk.js +1 -0
- package/build/static/js/{9735.0e70600f.chunk.js → 6557.fd2f35c8.chunk.js} +1 -1
- package/build/static/js/{6422.c2900a88.chunk.js → 6683.aab9fa01.chunk.js} +1 -1
- package/build/static/js/{7842.a98fbb15.chunk.js → 6756.2cb6963c.chunk.js} +1 -1
- package/build/static/js/{6242.5e6f91ac.chunk.js → 6862.886eab8e.chunk.js} +1 -1
- package/build/static/js/6913.094a45e2.chunk.js +17 -0
- package/build/static/js/6939.c09d92c1.chunk.js +1 -0
- package/build/static/js/{7073.5619981b.chunk.js → 7073.376b9d76.chunk.js} +1 -1
- package/build/static/js/787.30ab7f34.chunk.js +1 -0
- package/build/static/js/792.45efff32.chunk.js +1 -0
- package/build/static/js/8035.dc118cc9.chunk.js +1 -0
- package/build/static/js/{6097.56c4b02a.chunk.js → 8295.c3cd87de.chunk.js} +1 -1
- package/build/static/js/8418.aed275df.chunk.js +1 -0
- package/build/static/js/8486.e56533d6.chunk.js +1 -0
- package/build/static/js/865.5abdcdc2.chunk.js +1 -0
- package/build/static/js/9004.6a66722a.chunk.js +1 -0
- package/build/static/js/9042.a6fcbc74.chunk.js +5 -0
- package/build/static/js/9107.b49ea9ea.chunk.js +5 -0
- package/build/static/js/9130.8e10440e.chunk.js +1 -0
- package/build/static/js/9166.1a468fb9.chunk.js +2 -0
- package/build/static/js/{5678.729bced9.chunk.js → 9382.c417d448.chunk.js} +1 -1
- package/build/static/js/9615.82cf4bfb.chunk.js +1 -0
- package/build/static/js/{8355.b110abc9.chunk.js → 9915.fe11690a.chunk.js} +1 -1
- package/build/static/js/main.1313208f.js +28 -0
- package/package.json +5 -4
- package/build/static/js/1367.9dcea0bc.chunk.js +0 -9
- package/build/static/js/2116.fd3de825.chunk.js +0 -1
- package/build/static/js/2458.cfb63c88.chunk.js +0 -1
- package/build/static/js/2523.4761d79a.chunk.js +0 -5
- package/build/static/js/2632.de1769ff.chunk.js +0 -1
- package/build/static/js/277.d9ceff66.chunk.js +0 -1
- package/build/static/js/3376.d5aaecc4.chunk.js +0 -1
- package/build/static/js/3392.5ed3420d.chunk.js +0 -1
- package/build/static/js/3977.24eb5fb8.chunk.js +0 -1
- package/build/static/js/4210.945a5966.chunk.js +0 -1
- package/build/static/js/4514.7931bd64.chunk.js +0 -5
- package/build/static/js/464.7c22f33c.chunk.js +0 -1
- package/build/static/js/5070.1d0d565e.chunk.js +0 -1
- package/build/static/js/5608.b4074ab9.chunk.js +0 -1
- package/build/static/js/5752.d5d30939.chunk.js +0 -1
- package/build/static/js/5865.90a40692.chunk.js +0 -17
- package/build/static/js/6223.4bb0039e.chunk.js +0 -2
- package/build/static/js/6668.8cb69721.chunk.js +0 -2
- package/build/static/js/7496.0f941cac.chunk.js +0 -1
- package/build/static/js/761.ca3883de.chunk.js +0 -1
- package/build/static/js/7698.00f5ff0b.chunk.js +0 -1
- package/build/static/js/7858.e4a6aa6d.chunk.js +0 -5
- package/build/static/js/7937.4b1be66e.chunk.js +0 -1
- package/build/static/js/8461.85faefa1.chunk.js +0 -1
- package/build/static/js/8565.f27e3917.chunk.js +0 -1
- package/build/static/js/8910.e6dda87e.chunk.js +0 -2
- package/build/static/js/91.f23bbeac.chunk.js +0 -1
- package/build/static/js/9462.81f9c52a.chunk.js +0 -1
- package/build/static/js/9551.c45b17cf.chunk.js +0 -1
- package/build/static/js/main.e1e5cd43.js +0 -28
- /package/build/static/css/{3376.60b7ada4.chunk.css → 5099.60b7ada4.chunk.css} +0 -0
- /package/build/static/js/{6668.8cb69721.chunk.js.LICENSE.txt → 3744.93bd4bad.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6223.4bb0039e.chunk.js.LICENSE.txt → 5177.3eb35171.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{8910.e6dda87e.chunk.js.LICENSE.txt → 9166.1a468fb9.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.e1e5cd43.js.LICENSE.txt → main.1313208f.js.LICENSE.txt} +0 -0
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
`).filter(t=>!t.startsWith("#")).map(t=>t.trim()).filter(t=>t!=="")}
|
|
2
|
+
var j=Object.create;var w=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var W=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of F(t))!K.call(e,r)&&r!==i&&w(e,r,{get:()=>t[r],enumerable:!(a=S(t,r))||a.enumerable});return e};var p=(e,t,i)=>(i=e!=null?j(x(e)):{},W(t||!e||!e.__esModule?w(i,"default",{value:e,enumerable:!0}):i,e));var v=k(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.parseRequirementsTxt=void 0;function I(e){return e.split(`
|
|
3
|
+
`).filter(t=>!t.startsWith("#")).map(t=>t.trim()).filter(t=>t!=="")}f.parseRequirementsTxt=I});var P=k(d=>{"use strict";var R=d&&d.__createBinding||(Object.create?function(e,t,i,a){a===void 0&&(a=i);var r=Object.getOwnPropertyDescriptor(t,i);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,a,r)}:function(e,t,i,a){a===void 0&&(a=i),e[a]=t[i]}),C=d&&d.__exportStar||function(e,t){for(var i in e)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&R(t,e,i)};Object.defineProperty(d,"__esModule",{value:!0});C(v(),d)});var D=p(require("yargs")),_=require("yargs/helpers"),o=p(require("path")),n=p(require("fs/promises")),y=p(require("fs-extra")),u=p(require("node-fetch")),m=require("pyodide"),q=p(P());global.fetch=u.default;function T(e){return`https://cdn.jsdelivr.net/pyodide/v${m.version}/full/${e}`}async function E(e){console.info("Copy the build directory (the bare built app files) to this directory...");let t=o.default.resolve(__dirname,"../build");if(!(await n.default.stat(t)).isDirectory())throw new Error(`The source ${t} does not exist.`);if(t===e.copyTo){console.warn(`sourceDir == destDir (${t}). Are you in the development environment? Skip copying the directory.`);return}if(e.keepOld)try{await n.default.access(e.copyTo),console.info(`${e.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${e.copyTo} does not exist even though the \`keepOld\` option is specified`)}console.log(`Copy ${t} to ${e.copyTo}`),await n.default.rm(e.copyTo,{recursive:!0,force:!0}),await y.default.copy(t,e.copyTo)}async function L(e){if(e.requirements.length===0)return[];let t=await(0,m.loadPyodide)();await t.loadPackage("micropip");let i=t.pyimport("micropip");return i.add_mock_package("streamlit","1.24.0"),await i.install(e.requirements),Object.entries(t.loadedPackages).filter(([,a])=>a==="default channel").map(([a])=>a)}async function $(){let e=T("repodata.json");return console.log(`Load the Pyodide repodata.json from ${e}`),(await(await(0,u.default)(e)).json()).packages}async function b(e,t){console.log(`Install the local wheel ${t}`);let i=await n.default.readFile(t),a="/tmp/"+o.default.basename(t);e.FS.writeFile(a,i);let r=e.pyimport("micropip"),l=`emfs:${a}`;console.log(`Install ${l}`),await r.install.callKwargs(l,{keep_going:!0})}async function H(e){console.info("Create the site-packages snapshot file...");let t=await(0,m.loadPyodide)();if(await t.loadPackage(["micropip"]),e.useLocalKernelWheels){let c=o.default.dirname(require.resolve("@stlite/kernel")),s=o.default.resolve(c,"../py");await b(t,o.default.join(s,"stlite-server/dist/stlite_server-0.1.0-py3-none-any.whl")),await b(t,o.default.join(s,"streamlit/lib/dist/streamlit-1.24.0-py2.py3-none-any.whl"))}else{let s=require(o.default.resolve(__dirname,"../package.json")).version,B=`https://data.jsdelivr.com/v1/package/npm/@stlite/kernel@${s}/flat`,h=(await(await(0,u.default)(B)).json()).files.filter(g=>g.name.endsWith(".whl")).map(g=>`https://cdn.jsdelivr.net/npm/@stlite/kernel@${s}${g.name}`),O=t.pyimport("micropip");console.log("Install",h),await O.install.callKwargs(h,{keep_going:!0})}let i=t.pyimport("micropip"),a=await $();e.usedBuiltinPackages.length>0&&(console.log("Mocking builtin packages so that they will not be included in the site-packages snapshot because these will be installed from the vendored wheel files at runtime..."),e.usedBuiltinPackages.forEach(c=>{let s=a[c];if(s==null)throw new Error(`Package ${c} is not found in the lock file.`);console.log(`Mock ${s.name} ${s.version}`),i.add_mock_package(s.name,s.version)})),console.log(`Install the requirements ${JSON.stringify(e.requirements)}`),await i.install.callKwargs(e.requirements,{keep_going:!0}),console.log("Archive the site-packages director(y|ies)");let r="/tmp/site-packages-snapshot.tar.gz";await t.runPythonAsync(`
|
|
4
4
|
import tarfile
|
|
5
5
|
import site
|
|
6
6
|
|
|
7
7
|
site_packages_dirs = site.getsitepackages()
|
|
8
8
|
|
|
9
|
-
tar_file_name = '${
|
|
9
|
+
tar_file_name = '${r}'
|
|
10
10
|
with tarfile.open(tar_file_name, mode='w:gz') as gzf:
|
|
11
11
|
for site_packages in site_packages_dirs:
|
|
12
12
|
gzf.add(site_packages)
|
|
13
|
-
`),console.log("Extract the archive file from EMFS");let
|
|
13
|
+
`),console.log("Extract the archive file from EMFS");let l=t.FS.readFile(r);console.log(`Save the archive file (${e.saveTo})`),await n.default.writeFile(e.saveTo,l)}async function U(e){console.info("Copy the Streamlit app directory..."),console.log(`Copy ${e.sourceDir} to ${e.copyTo}`),await n.default.rm(e.copyTo,{recursive:!0,force:!0}),await y.default.copy(e.sourceDir,e.copyTo)}async function J(e){let t=await n.default.readFile(e,{encoding:"utf-8"});return(0,q.parseRequirementsTxt)(t)}async function M(e,t){let i=t.join(`
|
|
14
|
+
`);await n.default.writeFile(e,i,{encoding:"utf-8"})}function z(e){e.forEach(t=>{let i;try{i=new URL(t)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${t})`)})}async function A(e){let t=await $(),a=e.packages.map(r=>t[r]).map(r=>T(r.file_name));console.log("Downloading the used built-in packages..."),await Promise.all(a.map(async r=>{let l=o.default.resolve(e.destDir,"./pyodide",o.default.basename(r));console.log(`Download ${r} to ${l}`);let c=await(0,u.default)(r);if(!c.ok)throw new Error(`Failed to download ${r}: ${c.status} ${c.statusText}`);let s=await c.arrayBuffer();await n.default.writeFile(l,Buffer.from(s))}))}(0,D.default)((0,_.hideBin)(process.argv)).command("* <appHomeDirSource> [packages..]","Put the user code and data and the snapshot of the required packages into the build artifact.",()=>{},e=>{console.info(e)}).positional("appHomeDirSource",{describe:"The source directory of the user code and data that will be mounted in the Pyodide file system at app runtime",type:"string",demandOption:!0}).positional("packages",{describe:"Package names to install.",type:"string",array:!0}).options("requirement",{describe:"Install from the given requirements file. This option can be used multiple times.",array:!0,type:"string",alias:"r",default:[]}).options("localKernelWheels",{describe:"Use the locally installed kernel wheels",type:"boolean",alias:"l",default:!1}).options("keepOldBuild",{type:"boolean",default:!1,alias:"k",describe:"Keep the existing build directory contents except appHomeDir."}).parseAsync().then(async e=>{let t=o.default.resolve(process.cwd(),"./build");try{await n.default.access(e.appHomeDirSource)}catch{throw new Error(`${e.appHomeDirSource} does not exist.`)}let i=e.packages;for(let r of e.requirement)i=i.concat(await J(r));z(i);let a=await L({requirements:i,useLocalKernelWheels:e.localKernelWheels});console.log("The built-in packages loaded for the given requirements:"),console.log(a),await E({copyTo:t,keepOld:e.keepOldBuild}),await H({useLocalKernelWheels:e.localKernelWheels,requirements:i,usedBuiltinPackages:a,saveTo:o.default.resolve(t,"./site-packages-snapshot.tar.gz")}),await M(o.default.resolve(t,"./requirements.txt"),i),await U({sourceDir:e.appHomeDirSource,copyTo:o.default.resolve(t,"./streamlit_app")}),await A({packages:a,destDir:t})});
|
|
@@ -1,60 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "/static/css/main.b43a24ba.css",
|
|
4
|
-
"main.js": "/static/js/main.
|
|
5
|
-
"static/js/7073.
|
|
4
|
+
"main.js": "/static/js/main.1313208f.js",
|
|
5
|
+
"static/js/7073.376b9d76.chunk.js": "/static/js/7073.376b9d76.chunk.js",
|
|
6
6
|
"static/js/4994.551c87ac.chunk.js": "/static/js/4994.551c87ac.chunk.js",
|
|
7
|
-
"static/js/
|
|
8
|
-
"static/js/
|
|
9
|
-
"static/js/
|
|
10
|
-
"static/css/
|
|
11
|
-
"static/js/
|
|
12
|
-
"static/js/
|
|
13
|
-
"static/js/
|
|
14
|
-
"static/js/
|
|
15
|
-
"static/js/
|
|
16
|
-
"static/js/
|
|
17
|
-
"static/js/
|
|
18
|
-
"static/js/
|
|
19
|
-
"static/js/
|
|
20
|
-
"static/js/
|
|
21
|
-
"static/js/
|
|
22
|
-
"static/js/
|
|
23
|
-
"static/js/
|
|
24
|
-
"static/js/
|
|
25
|
-
"static/js/
|
|
26
|
-
"static/js/
|
|
27
|
-
"static/js/
|
|
28
|
-
"static/js/
|
|
29
|
-
"static/js/
|
|
30
|
-
"static/js/
|
|
31
|
-
"static/js/
|
|
32
|
-
"static/js/
|
|
33
|
-
"static/js/
|
|
34
|
-
"static/js/
|
|
35
|
-
"static/js/
|
|
36
|
-
"static/js/
|
|
37
|
-
"static/js/
|
|
38
|
-
"static/js/
|
|
39
|
-
"static/js/
|
|
7
|
+
"static/js/792.45efff32.chunk.js": "/static/js/792.45efff32.chunk.js",
|
|
8
|
+
"static/js/4141.a101e33c.chunk.js": "/static/js/4141.a101e33c.chunk.js",
|
|
9
|
+
"static/js/6913.094a45e2.chunk.js": "/static/js/6913.094a45e2.chunk.js",
|
|
10
|
+
"static/css/5099.60b7ada4.chunk.css": "/static/css/5099.60b7ada4.chunk.css",
|
|
11
|
+
"static/js/5099.c240313c.chunk.js": "/static/js/5099.c240313c.chunk.js",
|
|
12
|
+
"static/js/8035.dc118cc9.chunk.js": "/static/js/8035.dc118cc9.chunk.js",
|
|
13
|
+
"static/js/3603.c075eadf.chunk.js": "/static/js/3603.c075eadf.chunk.js",
|
|
14
|
+
"static/js/5617.6141af30.chunk.js": "/static/js/5617.6141af30.chunk.js",
|
|
15
|
+
"static/js/8418.aed275df.chunk.js": "/static/js/8418.aed275df.chunk.js",
|
|
16
|
+
"static/js/8295.c3cd87de.chunk.js": "/static/js/8295.c3cd87de.chunk.js",
|
|
17
|
+
"static/js/8486.e56533d6.chunk.js": "/static/js/8486.e56533d6.chunk.js",
|
|
18
|
+
"static/js/9615.82cf4bfb.chunk.js": "/static/js/9615.82cf4bfb.chunk.js",
|
|
19
|
+
"static/js/6557.fd2f35c8.chunk.js": "/static/js/6557.fd2f35c8.chunk.js",
|
|
20
|
+
"static/js/9382.c417d448.chunk.js": "/static/js/9382.c417d448.chunk.js",
|
|
21
|
+
"static/js/3580.e292972c.chunk.js": "/static/js/3580.e292972c.chunk.js",
|
|
22
|
+
"static/js/2327.b8572a38.chunk.js": "/static/js/2327.b8572a38.chunk.js",
|
|
23
|
+
"static/js/787.30ab7f34.chunk.js": "/static/js/787.30ab7f34.chunk.js",
|
|
24
|
+
"static/js/5241.0326c97c.chunk.js": "/static/js/5241.0326c97c.chunk.js",
|
|
25
|
+
"static/js/172.599dcb6e.chunk.js": "/static/js/172.599dcb6e.chunk.js",
|
|
26
|
+
"static/js/4140.edb6c36a.chunk.js": "/static/js/4140.edb6c36a.chunk.js",
|
|
27
|
+
"static/js/6862.886eab8e.chunk.js": "/static/js/6862.886eab8e.chunk.js",
|
|
28
|
+
"static/js/6683.aab9fa01.chunk.js": "/static/js/6683.aab9fa01.chunk.js",
|
|
29
|
+
"static/js/5440.c723be7c.chunk.js": "/static/js/5440.c723be7c.chunk.js",
|
|
30
|
+
"static/js/5093.304fcb1e.chunk.js": "/static/js/5093.304fcb1e.chunk.js",
|
|
31
|
+
"static/js/6939.c09d92c1.chunk.js": "/static/js/6939.c09d92c1.chunk.js",
|
|
32
|
+
"static/js/9004.6a66722a.chunk.js": "/static/js/9004.6a66722a.chunk.js",
|
|
33
|
+
"static/js/291.aa03bc71.chunk.js": "/static/js/291.aa03bc71.chunk.js",
|
|
34
|
+
"static/js/1318.57c335d2.chunk.js": "/static/js/1318.57c335d2.chunk.js",
|
|
35
|
+
"static/js/9130.8e10440e.chunk.js": "/static/js/9130.8e10440e.chunk.js",
|
|
36
|
+
"static/js/9107.b49ea9ea.chunk.js": "/static/js/9107.b49ea9ea.chunk.js",
|
|
37
|
+
"static/js/9042.a6fcbc74.chunk.js": "/static/js/9042.a6fcbc74.chunk.js",
|
|
38
|
+
"static/js/9915.fe11690a.chunk.js": "/static/js/9915.fe11690a.chunk.js",
|
|
39
|
+
"static/js/2775.c1ed54fa.chunk.js": "/static/js/2775.c1ed54fa.chunk.js",
|
|
40
|
+
"static/js/6756.2cb6963c.chunk.js": "/static/js/6756.2cb6963c.chunk.js",
|
|
40
41
|
"static/js/2961.e91b0c14.chunk.js": "/static/js/2961.e91b0c14.chunk.js",
|
|
41
42
|
"static/js/7135.57023452.chunk.js": "/static/js/7135.57023452.chunk.js",
|
|
42
43
|
"static/js/6449.702355ee.chunk.js": "/static/js/6449.702355ee.chunk.js",
|
|
43
44
|
"static/js/2909.783348bb.chunk.js": "/static/js/2909.783348bb.chunk.js",
|
|
44
|
-
"static/js/
|
|
45
|
+
"static/js/5177.3eb35171.chunk.js": "/static/js/5177.3eb35171.chunk.js",
|
|
45
46
|
"static/js/1839.410079bf.chunk.js": "/static/js/1839.410079bf.chunk.js",
|
|
46
47
|
"static/css/4320.1edfa457.chunk.css": "/static/css/4320.1edfa457.chunk.css",
|
|
47
48
|
"static/js/4320.8fa60786.chunk.js": "/static/js/4320.8fa60786.chunk.js",
|
|
48
49
|
"static/js/1579.10c95eae.chunk.js": "/static/js/1579.10c95eae.chunk.js",
|
|
49
|
-
"static/js/
|
|
50
|
+
"static/js/3744.93bd4bad.chunk.js": "/static/js/3744.93bd4bad.chunk.js",
|
|
50
51
|
"static/js/9733.0d6a1712.chunk.js": "/static/js/9733.0d6a1712.chunk.js",
|
|
51
|
-
"static/js/
|
|
52
|
+
"static/js/865.5abdcdc2.chunk.js": "/static/js/865.5abdcdc2.chunk.js",
|
|
52
53
|
"static/js/3975.5538132d.chunk.js": "/static/js/3975.5538132d.chunk.js",
|
|
53
|
-
"static/js/142.
|
|
54
|
-
"static/js/
|
|
54
|
+
"static/js/142.2b0ffa81.chunk.js": "/static/js/142.2b0ffa81.chunk.js",
|
|
55
|
+
"static/js/9166.1a468fb9.chunk.js": "/static/js/9166.1a468fb9.chunk.js",
|
|
55
56
|
"static/js/6865.b0803b6b.chunk.js": "/static/js/6865.b0803b6b.chunk.js",
|
|
56
57
|
"static/js/6679.859559e9.chunk.js": "/static/js/6679.859559e9.chunk.js",
|
|
57
|
-
"pypi/streamlit-1.
|
|
58
|
+
"pypi/streamlit-1.24.0-py2.py3-none-any.whl": "/pypi/streamlit-1.24.0-py2.py3-none-any.whl",
|
|
58
59
|
"static/media/SourceSansPro-Regular.ttf": "/static/media/SourceSansPro-Regular.efa76f8326aa5cee3bdd.ttf",
|
|
59
60
|
"static/media/SourceSansPro-SemiBold.ttf": "/static/media/SourceSansPro-SemiBold.43cc81b496222dc9ce3c.ttf",
|
|
60
61
|
"static/media/SourceSansPro-Bold.ttf": "/static/media/SourceSansPro-Bold.12e6acd2589d00c9d0aa.ttf",
|
|
@@ -153,6 +154,6 @@
|
|
|
153
154
|
},
|
|
154
155
|
"entrypoints": [
|
|
155
156
|
"static/css/main.b43a24ba.css",
|
|
156
|
-
"static/js/main.
|
|
157
|
+
"static/js/main.1313208f.js"
|
|
157
158
|
]
|
|
158
159
|
}
|
package/build/electron/main.js
CHANGED
|
@@ -38,6 +38,19 @@ const createWindow = () => {
|
|
|
38
38
|
const archiveFilePath = path.resolve(__dirname, "../site-packages-snapshot.tar.gz");
|
|
39
39
|
return fsPromises.readFile(archiveFilePath);
|
|
40
40
|
});
|
|
41
|
+
electron_1.ipcMain.handle("readRequirements", async (ev) => {
|
|
42
|
+
if (!isValidIpcSender(ev.senderFrame)) {
|
|
43
|
+
throw new Error("Invalid IPC sender");
|
|
44
|
+
}
|
|
45
|
+
const requirementsTxtPath = path.resolve(__dirname, "../requirements.txt");
|
|
46
|
+
const requirementsTxtData = await fsPromises.readFile(requirementsTxtPath, {
|
|
47
|
+
encoding: "utf-8",
|
|
48
|
+
});
|
|
49
|
+
return requirementsTxtData
|
|
50
|
+
.split("\n")
|
|
51
|
+
.map((r) => r.trim())
|
|
52
|
+
.filter((r) => r.length > 0); // Assuming that the input `requirements.txt` file is generated by `dump-artifacts.js` and can be parsed with this simple logic.
|
|
53
|
+
});
|
|
41
54
|
electron_1.ipcMain.handle("readStreamlitAppDirectory", async (ev) => {
|
|
42
55
|
if (!isValidIpcSender(ev.senderFrame)) {
|
|
43
56
|
throw new Error("Invalid IPC sender");
|
|
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const electron_1 = require("electron");
|
|
4
4
|
electron_1.contextBridge.exposeInMainWorld("archives", {
|
|
5
5
|
readSitePackagesSnapshot: () => electron_1.ipcRenderer.invoke("readSitePackagesSnapshot"),
|
|
6
|
+
readRequirements: () => electron_1.ipcRenderer.invoke("readRequirements"),
|
|
6
7
|
readStreamlitAppDirectory: () => electron_1.ipcRenderer.invoke("readStreamlitAppDirectory"),
|
|
7
8
|
});
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><script defer="defer" src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><script defer="defer" src="/static/js/main.1313208f.js"></script><link href="/static/css/main.b43a24ba.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[1318],{61318:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var s=i(5057),o=i(65873),a=i(55790),n=i(31476),r=i(59500),l=i(98209),d=i(98927),h=i(46434),m=i(9187),u=i.n(m),p=i(18950),c=i(4337),g=i(89401),b=i(45490),f=i(59990);const T=(0,b.Z)("div",{target:"ektn3o3"})((({disabled:e,theme:t})=>({alignItems:"center",backgroundColor:e?t.colors.gray:t.colors.primary,borderTopLeftRadius:"100%",borderTopRightRadius:"100%",borderBottomLeftRadius:"100%",borderBottomRightRadius:"100%",borderTopStyle:"none",borderBottomStyle:"none",borderRightStyle:"none",borderLeftStyle:"none",boxShadow:"none",display:"flex",height:t.radii.xl,justifyContent:"center",width:t.radii.xl,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 0.2rem ${(0,f.DZ)(t.colors.primary,.5)}`}})),""),y=(0,b.Z)("div",{target:"ektn3o2"})((({disabled:e,theme:t})=>({fontFamily:t.genericFonts.codeFont,fontSize:t.fontSizes.sm,paddingBottom:t.spacing.twoThirdsSmFont,color:e?t.colors.gray:t.colors.primary,top:"-22px",position:"absolute",whiteSpace:"nowrap",backgroundColor:t.colors.transparent,lineHeight:t.lineHeights.base,fontWeight:"normal"})),""),R=(0,b.Z)("div",{target:"ektn3o1"})((({theme:e})=>({paddingBottom:e.spacing.none,paddingLeft:e.spacing.none,paddingRight:e.spacing.none,paddingTop:e.spacing.twoThirdsSmFont,justifyContent:"space-between",alignItems:"center",display:"flex"})),""),v=(0,b.Z)("div",{target:"ektn3o0"})((({disabled:e,theme:t})=>({lineHeight:t.lineHeights.base,fontWeight:"normal",fontSize:t.fontSizes.sm,fontFamily:t.genericFonts.codeFont,color:e?t.colors.fadedText40:"inherit"})),"");var V=i(96266);class x extends s.PureComponent{constructor(e){super(e),this.formClearHelper=new l.Kz,this.state=void 0,this.sliderRef=s.createRef(),this.thumbRef=[],this.thumbValueRef=[],this.commitWidgetValueDebounced=void 0,this.commitWidgetValue=e=>{this.props.widgetMgr.setDoubleArrayValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=({value:e})=>{this.setState({value:e},(()=>this.commitWidgetValueDebounced({fromUi:!0})))},this.renderThumb=s.forwardRef(((e,t)=>{const{$value:i,$thumbIndex:a}=e,n=a||0;this.thumbRef[n]=t,this.thumbValueRef[n]||=s.createRef();const r=i?this.formatValue(i[a]):"",l=(0,o.pick)(e,["role","style","aria-valuemax","aria-valuemin","aria-valuenow","tabIndex","onKeyUp","onKeyDown","onMouseEnter","onMouseLeave","draggable"]),d={};return(this.props.element.options.length>0||this.isDateTimeType())&&(d["aria-valuetext"]=r),this.thumbValueAlignment(this.thumbRef[n].current,this.thumbValueRef[n].current),(0,V.jsx)(T,{...l,disabled:!0===e.$disabled,ref:this.thumbRef[n],"aria-valuetext":r,"aria-label":this.props.element.label,children:(0,V.jsx)(y,{className:"StyledThumbValue","data-testid":"stThumbValue",disabled:!0===e.$disabled,ref:this.thumbValueRef[n],children:r})})})),this.renderTickBar=()=>{const{disabled:e,element:t}=this.props,{max:i,min:s}=t;return(0,V.jsxs)(R,{"data-testid":"stTickBar",children:[(0,V.jsx)(v,{disabled:e,"data-testid":"stTickBarMin",children:this.formatValue(s)}),(0,V.jsx)(v,{disabled:e,"data-testid":"stTickBarMax",children:this.formatValue(i)})]})},this.commitWidgetValueDebounced=(0,h.Ds)(200,this.commitWidgetValue.bind(this)),this.state={value:this.initialValue}}get initialValue(){const e=this.props.widgetMgr.getDoubleArrayValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){for(let e=0;e<Math.min(this.thumbRef.length,this.thumbValueRef.length);e++)this.thumbValueAlignment(this.thumbRef[e].current,this.thumbValueRef[e].current);this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}get value(){const{min:e,max:t}=this.props.element,{value:i}=this.state;let s=i[0],o=i.length>1?i[1]:i[0];return s>o&&(s=o),s<e&&(s=e),s>t&&(s=t),o<e&&(o=e),o>t&&(o=t),i.length>1?[s,o]:[s]}isDateTimeType(){const{dataType:e}=this.props.element;return e===d.iR.DataType.DATETIME||e===d.iR.DataType.DATE||e===d.iR.DataType.TIME}formatValue(e){const{format:t,options:i}=this.props.element;return this.isDateTimeType()?u().utc(e/1e3).format(t):i.length>0?(0,r.sprintf)(t,i[e]):(0,r.sprintf)(t,e)}thumbValueAlignment(e,t){const i=this.sliderRef.current;if(i&&e&&t){const s=i.getBoundingClientRect(),o=e.getBoundingClientRect(),a=t.getBoundingClientRect(),n=o.left+o.width/2,r=n-a.width/2<s.left,l=n+a.width/2>s.right;t.style.left=r?"0":"",t.style.right=l?"0":""}}render(){var e;const{disabled:t,element:i,theme:s,width:o,widgetMgr:n}=this.props,{colors:r,fonts:l,fontSizes:d,spacing:m}=s,u={width:o};return this.formClearHelper.manageFormClearListener(n,i.formId,this.onFormCleared),(0,V.jsxs)("div",{ref:this.sliderRef,className:"stSlider",style:u,children:[(0,V.jsx)(p.ON,{label:i.label,disabled:t,labelVisibility:(0,h.iF)(null===(e=i.labelVisibility)||void 0===e?void 0:e.value),children:i.help&&(0,V.jsx)(p.dT,{children:(0,V.jsx)(c.ZP,{content:i.help,placement:g.ug.TOP_RIGHT})})}),(0,V.jsx)(a.Z,{min:i.min,max:i.max,step:i.step,value:this.value,onChange:this.handleChange,disabled:t,overrides:{Root:{style:{paddingTop:m.twoThirdsSmFont}},Thumb:this.renderThumb,Tick:{style:{fontFamily:l.monospace,fontSize:d.sm}},Track:{style:{backgroundColor:"none !important",paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:m.twoThirdsSmFont}},InnerTrack:{style:({$disabled:e})=>({height:"4px",...e?{background:r.darkenedBgMix25}:{}})},TickBar:this.renderTickBar}})]})}}const k=(0,n.b)(x)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[142],{55790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>D});var n=r(5057),i=r(44175),o=r(94253),a=r(53381);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=(0,a.zo)("div",{position:"relative",width:"100%"});l.displayName="Root",l.displayName="Root",l.displayName="StyledRoot";var d=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,i=e.$disabled,o=e.$isDragged,a=t.sizing,s="inherit";return i?s="not-allowed":o?s="grabbing":1===n.length&&(s="pointer"),{paddingTop:a.scale600,paddingBottom:a.scale600,paddingRight:a.scale600,paddingLeft:a.scale600,display:"flex",cursor:s,backgroundColor:t.colors.sliderTrackFill}}));d.displayName="Track",d.displayName="Track",d.displayName="StyledTrack";var p=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,o=e.$min,a=e.$max,s=e.$disabled,u=t.colors,c=t.borders,l=t.direction,d=t.borders.useRoundedCorners?c.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:(0,i.getTrackBackground)({values:n,colors:1===n.length?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:o||0,max:a||0,rtl:"rtl"===l}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}}));p.displayName="InnerTrack",p.displayName="InnerTrack",p.displayName="StyledInnerTrack";var h=(0,a.zo)("div",(function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}}));h.displayName="Mark",h.displayName="Mark",h.displayName="StyledMark";var f=(0,a.zo)("div",(function(e){return u(u({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})}));f.displayName="Tick",f.displayName="Tick",f.displayName="StyledTick";var g=(0,a.zo)("div",(function(e){var t=e.$theme.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:t.scale600,paddingLeft:t.scale600,paddingBottom:t.scale400}}));g.displayName="TickBar",g.displayName="TickBar",g.displayName="StyledTickBar";var v=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,i=e.$thumbIndex,o=e.$disabled,a=2===n.length&&0===i,s=2===n.length&&1===i;return"rtl"===t.direction&&(s||a)&&(a=!a,s=!s),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:o?t.colors.sliderHandleFillDisabled:t.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(t.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:o?"not-allowed":"inherit"}}));v.displayName="Thumb",v.displayName="Thumb",v.displayName="StyledThumb";var m=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:t?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}}));m.displayName="InnerThumb",m.displayName="InnerThumb",m.displayName="StyledInnerThumb";var b=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$theme;return u(u({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:t?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})}));b.displayName="ThumbValue",b.displayName="ThumbValue",b.displayName="StyledThumbValue";var y=r(80099),w=r(4710);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O.apply(this,arguments)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var S=function(e){if(e.length>2||0===e.length)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return e};const D=function(e){var t=e.overrides,r=void 0===t?{}:t,a=e.disabled,s=void 0!==a&&a,u=e.marks,c=void 0!==u&&u,k=e.onChange,T=void 0===k?function(){}:k,R=e.onFinalChange,D=void 0===R?function(){}:R,E=e.min,I=void 0===E?0:E,j=e.max,_=void 0===j?100:j,C=e.step,P=void 0===C?1:C,L=e.persistentThumb,z=void 0!==L&&L,$=e.valueToLabel,F=void 0===$?function(e){return e}:$,N=e.value,A=n.useContext(w.N),B=M(n.useState(!1),2),V=B[0],U=B[1],X=M(n.useState(!1),2),Y=X[0],Z=X[1],q=M(n.useState(!1),2),H=q[0],K=q[1],W=M(n.useState(-1),2),J=W[0],G=W[1],Q=n.useCallback((function(e){(0,o.E)(e)&&K(!0);var t=e.target.parentNode.firstChild===e.target?0:1;G(t)}),[]),ee=n.useCallback((function(e){!1!==H&&K(!1),G(-1)}),[]),te=S(N),re={$disabled:s,$step:P,$min:I,$max:_,$marks:c,$value:te,$isFocusVisible:H},ne=M((0,y.jb)(r.Root,l),2),ie=ne[0],oe=ne[1],ae=M((0,y.jb)(r.Track,d),2),se=ae[0],ue=ae[1],ce=M((0,y.jb)(r.InnerTrack,p),2),le=ce[0],de=ce[1],pe=M((0,y.jb)(r.Thumb,v),2),he=pe[0],fe=pe[1],ge=M((0,y.jb)(r.InnerThumb,m),2),ve=ge[0],me=ge[1],be=M((0,y.jb)(r.ThumbValue,b),2),ye=be[0],we=be[1],ke=M((0,y.jb)(r.Tick,f),2),xe=ke[0],Te=ke[1],Oe=M((0,y.jb)(r.TickBar,g),2),Me=Oe[0],Re=Oe[1],Se=M((0,y.jb)(r.Mark,h),2),De=Se[0],Ee=Se[1];return n.createElement(ie,O({"data-baseweb":"slider"},re,oe,{onFocus:(0,o.Ah)(oe,Q),onBlur:(0,o.Z5)(oe,ee)}),n.createElement(i.Range,O({step:P,min:I,max:_,values:te,disabled:s,onChange:function(e){return T({value:e})},onFinalChange:function(e){return D({value:e})},rtl:"rtl"===A.direction,renderTrack:function(e){var t=e.props,r=e.children,i=e.isDragged;return n.createElement(se,O({onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,$isDragged:i},re,ue),n.createElement(le,O({$isDragged:i,ref:t.ref},re,de),r))},renderThumb:function(e){var t=e.props,r=e.index,i=e.isDragged,o=z||(!!r&&Y||!r&&V||i)&&!s;return n.createElement(he,O({},t,{onMouseEnter:function(){0===r?U(!0):Z(!0)},onMouseLeave:function(){0===r?U(!1):Z(!1)},$thumbIndex:r,$isDragged:i,style:x({},t.style)},re,fe,{$isFocusVisible:H&&J===r}),o&&n.createElement(ye,O({$thumbIndex:r,$isDragged:i},re,we),F(te[r])),o&&n.createElement(ve,O({$thumbIndex:r,$isDragged:i},re,me)))}},c?{renderMark:function(e){var t=e.props,r=e.index;return n.createElement(De,O({$markIndex:r},t,re,Ee))}}:{})),n.createElement(Me,O({},re,Re),n.createElement(xe,O({},re,Te),F(I)),n.createElement(xe,O({},re,Te),F(_))))}},96312:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(r(5057)),s=r(41669),u=r(45426),c=["ArrowRight","ArrowUp","k","PageUp"],l=["ArrowLeft","ArrowDown","j","PageDown"],d=function(e){function t(t){var r=e.call(this,t)||this;r.trackRef=a.createRef(),r.thumbRefs=[],r.markRefs=[],r.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(r.props.values.length).fill(0).map((function(e,t){return t})),isChanged:!1,markOffsets:[]},r.getOffsets=function(){var e=r.props,t=e.direction,n=e.values,i=e.min,o=e.max,a=r.trackRef.current,c=a.getBoundingClientRect(),l=s.getPaddingAndBorder(a);return r.getThumbs().map((function(e,r){var a={x:0,y:0},d=e.getBoundingClientRect(),p=s.getMargin(e);switch(t){case u.Direction.Right:return a.x=-1*(p.left+l.left),a.y=-1*((d.height-c.height)/2+l.top),a.x+=c.width*s.relativeValue(n[r],i,o)-d.width/2,a;case u.Direction.Left:return a.x=-1*(p.right+l.right),a.y=-1*((d.height-c.height)/2+l.top),a.x+=c.width-c.width*s.relativeValue(n[r],i,o)-d.width/2,a;case u.Direction.Up:return a.x=-1*((d.width-c.width)/2+p.left+l.left),a.y=-l.left,a.y+=c.height-c.height*s.relativeValue(n[r],i,o)-d.height/2,a;case u.Direction.Down:return a.x=-1*((d.width-c.width)/2+p.left+l.left),a.y=-l.left,a.y+=c.height*s.relativeValue(n[r],i,o)-d.height/2,a;default:return s.assertUnreachable(t)}}))},r.getThumbs=function(){return r.trackRef&&r.trackRef.current?Array.from(r.trackRef.current.children).filter((function(e){return e.hasAttribute("aria-valuenow")})):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},r.getTargetIndex=function(e){return r.getThumbs().findIndex((function(t){return t===e.target||t.contains(e.target)}))},r.addTouchEvents=function(e){document.addEventListener("touchmove",r.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",r.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",r.schdOnEnd,{passive:!1})},r.addMouseEvents=function(e){document.addEventListener("mousemove",r.schdOnMouseMove),document.addEventListener("mouseup",r.schdOnEnd)},r.onMouseDownTrack=function(e){var t;if(0===e.button)if(e.persist(),e.preventDefault(),r.addMouseEvents(e.nativeEvent),r.props.values.length>1&&r.props.draggableTrack){if(r.thumbRefs.some((function(t){var r;return null===(r=t.current)||void 0===r?void 0:r.contains(e.target)})))return;r.setState({draggedTrackPos:[e.clientX,e.clientY]},(function(){return r.onMove(e.clientX,e.clientY)}))}else{var n=s.getClosestThumbIndex(r.thumbRefs.map((function(e){return e.current})),e.clientX,e.clientY,r.props.direction);null===(t=r.thumbRefs[n].current)||void 0===t||t.focus(),r.setState({draggedThumbIndex:n},(function(){return r.onMove(e.clientX,e.clientY)}))}},r.onResize=function(){s.translateThumbs(r.getThumbs(),r.getOffsets(),r.props.rtl),r.calculateMarkOffsets()},r.onTouchStartTrack=function(e){var t;if(e.persist(),r.addTouchEvents(e.nativeEvent),r.props.values.length>1&&r.props.draggableTrack){if(r.thumbRefs.some((function(t){var r;return null===(r=t.current)||void 0===r?void 0:r.contains(e.target)})))return;r.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},(function(){return r.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}else{var n=s.getClosestThumbIndex(r.thumbRefs.map((function(e){return e.current})),e.touches[0].clientX,e.touches[0].clientY,r.props.direction);null===(t=r.thumbRefs[n].current)||void 0===t||t.focus(),r.setState({draggedThumbIndex:n},(function(){return r.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}},r.onMouseOrTouchStart=function(e){if(!r.props.disabled){var t=s.isTouchEvent(e);if(t||0===e.button){var n=r.getTargetIndex(e);-1!==n&&(t?r.addTouchEvents(e):r.addMouseEvents(e),r.setState({draggedThumbIndex:n,thumbZIndexes:r.state.thumbZIndexes.map((function(e,t){return t===n?Math.max.apply(Math,r.state.thumbZIndexes):e<=r.state.thumbZIndexes[n]?e:e-1}))}))}}},r.onMouseMove=function(e){e.preventDefault(),r.onMove(e.clientX,e.clientY)},r.onTouchMove=function(e){e.preventDefault(),r.onMove(e.touches[0].clientX,e.touches[0].clientY)},r.onKeyDown=function(e){var t=r.props,n=t.values,i=t.onChange,o=t.step,a=t.rtl,u=r.state.isChanged,d=r.getTargetIndex(e.nativeEvent),p=a?-1:1;-1!==d&&(c.includes(e.key)?(e.preventDefault(),r.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(n,d,r.normalizeValue(n[d]+p*("PageUp"===e.key?10*o:o),d)))):l.includes(e.key)?(e.preventDefault(),r.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(n,d,r.normalizeValue(n[d]-p*("PageDown"===e.key?10*o:o),d)))):"Tab"===e.key?r.setState({draggedThumbIndex:-1},(function(){u&&r.fireOnFinalChange()})):u&&r.fireOnFinalChange())},r.onKeyUp=function(e){var t=r.state.isChanged;r.setState({draggedThumbIndex:-1},(function(){t&&r.fireOnFinalChange()}))},r.onMove=function(e,t){var n=r.state,i=n.draggedThumbIndex,o=n.draggedTrackPos,a=r.props,c=a.direction,l=a.min,d=a.max,p=a.onChange,h=a.values,f=a.step,g=a.rtl;if(-1===i&&-1===o[0]&&-1===o[1])return null;var v=r.trackRef.current;if(!v)return null;var m=v.getBoundingClientRect(),b=s.isVertical(c)?m.height:m.width;if(-1!==o[0]&&-1!==o[1]){var y=e-o[0],w=t-o[1],k=0;switch(c){case u.Direction.Right:case u.Direction.Left:k=y/b*(d-l)+l;break;case u.Direction.Down:case u.Direction.Up:k=w/b*(d-l)+l;break;default:s.assertUnreachable(c)}if(g&&(k*=-1),Math.abs(k)>=f/2){for(var x=0;x<r.thumbRefs.length;x++){if(h[x]===d&&1===Math.sign(k)||h[x]===l&&-1===Math.sign(k))return;var T=h[x]+k;T>d?k=d-h[x]:T<l&&(k=l-h[x])}var O=h.slice(0);for(x=0;x<r.thumbRefs.length;x++)O=s.replaceAt(O,x,r.normalizeValue(h[x]+k,x));r.setState({draggedTrackPos:[e,t]}),p(O)}}else{var M=0;switch(c){case u.Direction.Right:M=(e-m.left)/b*(d-l)+l;break;case u.Direction.Left:M=(b-(e-m.left))/b*(d-l)+l;break;case u.Direction.Down:M=(t-m.top)/b*(d-l)+l;break;case u.Direction.Up:M=(b-(t-m.top))/b*(d-l)+l;break;default:s.assertUnreachable(c)}g&&(M=d+l-M),Math.abs(h[i]-M)>=f/2&&p(s.replaceAt(h,i,r.normalizeValue(M,i)))}},r.normalizeValue=function(e,t){var n=r.props,i=n.min,o=n.max,a=n.step,u=n.allowOverlap,c=n.values;return s.normalizeValue(e,t,i,o,a,u,c)},r.onEnd=function(e){if(e.preventDefault(),document.removeEventListener("mousemove",r.schdOnMouseMove),document.removeEventListener("touchmove",r.schdOnTouchMove),document.removeEventListener("mouseup",r.schdOnEnd),document.removeEventListener("touchend",r.schdOnEnd),document.removeEventListener("touchcancel",r.schdOnEnd),-1===r.state.draggedThumbIndex&&-1===r.state.draggedTrackPos[0]&&-1===r.state.draggedTrackPos[1])return null;r.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},(function(){r.fireOnFinalChange()}))},r.fireOnFinalChange=function(){r.setState({isChanged:!1});var e=r.props,t=e.onFinalChange,n=e.values;t&&t(n)},r.calculateMarkOffsets=function(){if(r.props.renderMark&&r.trackRef&&null!==r.trackRef.current){for(var e=window.getComputedStyle(r.trackRef.current),t=parseInt(e.width,10),n=parseInt(e.height,10),i=parseInt(e.paddingLeft,10),o=parseInt(e.paddingTop,10),a=[],s=0;s<r.numOfMarks+1;s++){var c=9999,l=9999;if(r.markRefs[s].current){var d=r.markRefs[s].current.getBoundingClientRect();c=d.height,l=d.width}r.props.direction===u.Direction.Left||r.props.direction===u.Direction.Right?a.push([Math.round(t/r.numOfMarks*s+i-l/2),-Math.round((c-n)/2)]):a.push([Math.round(n/r.numOfMarks*s+o-c/2),-Math.round((l-t)/2)])}r.setState({markOffsets:a})}},r.numOfMarks=(t.max-t.min)/r.props.step,r.schdOnMouseMove=s.schd(r.onMouseMove),r.schdOnTouchMove=s.schd(r.onTouchMove),r.schdOnEnd=s.schd(r.onEnd),r.thumbRefs=t.values.map((function(){return a.createRef()}));for(var n=0;n<r.numOfMarks+1;n++)r.markRefs[n]=a.createRef();if(s.isStepDivisible(t.min,t.max,t.step)||console.warn("The difference of `max` and `min` must be divisible by `step`"),0===t.step)throw new Error('"step" property should be a positive number');return r}return n(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.values,n=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",e.onResize)},unobserve:function(){return window.removeEventListener("resize",e.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&s.checkInitialOverlap(this.props.values),this.props.values.forEach((function(t){return s.checkBoundaries(t,e.props.min,e.props.max)})),this.resizeObserver.observe(this.trackRef.current),s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),r.forEach((function(e){s.isStepDivisible(n,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},t.prototype.componentDidUpdate=function(e){s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl)},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},t.prototype.render=function(){var e=this,t=this.props,r=t.renderTrack,n=t.renderThumb,o=t.renderMark,a=void 0===o?function(){return null}:o,c=t.values,l=t.min,d=t.max,p=t.allowOverlap,h=t.disabled,f=this.state,g=f.draggedThumbIndex,v=f.thumbZIndexes,m=f.markOffsets;return r({props:{style:{transform:"scale(1)",cursor:g>-1?"grabbing":this.props.draggableTrack?s.isVertical(this.props.direction)?"ns-resize":"ew-resize":1!==c.length||h?"inherit":"pointer"},onMouseDown:h?s.voidFn:this.onMouseDownTrack,onTouchStart:h?s.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:h,children:i(m.map((function(t,r){return a({props:{style:e.props.direction===u.Direction.Left||e.props.direction===u.Direction.Right?{position:"absolute",left:t[0]+"px",marginTop:t[1]+"px"}:{position:"absolute",top:t[0]+"px",marginLeft:t[1]+"px"},key:"mark"+r,ref:e.markRefs[r]},index:r})})),c.map((function(t,r){var i=e.state.draggedThumbIndex===r;return n({index:r,value:t,isDragged:i,props:{style:{position:"absolute",zIndex:v[r],cursor:h?"inherit":i?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:r,tabIndex:h?void 0:0,"aria-valuemax":p?d:c[r+1]||d,"aria-valuemin":p?l:c[r-1]||l,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[r],role:"slider",onKeyDown:h?s.voidFn:e.onKeyDown,onKeyUp:h?s.voidFn:e.onKeyUp}})})))})},t.defaultProps={step:1,direction:u.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},t}(a.Component);t.default=d},44175:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(96312));t.Range=i.default;var o=r(41669);t.getTrackBackground=o.getTrackBackground,t.useThumbOverlap=o.useThumbOverlap,t.relativeValue=o.relativeValue;var a=r(45426);t.Direction=a.Direction},45426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(t.Direction||(t.Direction={}))},41669:function(e,t,r){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};Object.defineProperty(t,"__esModule",{value:!0});var i=r(5057),o=r(45426);function a(e){return e===o.Direction.Up||e===o.Direction.Down}function s(e,t,r){e.style.transform="translate("+t+"px, "+r+"px)"}t.getStepDecimals=function(e){var t=e.toString().split(".")[1];return t?t.length:0},t.isTouchEvent=function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length},t.isStepDivisible=function(e,t,r){var n=(t-e)/r;return parseInt(n.toString(),10)===n},t.normalizeValue=function(e,r,n,i,o,a,s){var u=1e11;if(e=Math.round(e*u)/u,!a){var c=s[r-1],l=s[r+1];if(c&&c>e)return c;if(l&&l<e)return l}if(e>i)return i;if(e<n)return n;var d=Math.floor(e*u-n*u)%Math.floor(o*u),p=Math.floor(e*u-Math.abs(d)),h=0===d?e:p/u,f=Math.abs(d/u)<o/2?h:h+o,g=t.getStepDecimals(o);return parseFloat(f.toFixed(g))},t.relativeValue=function(e,t,r){return(e-t)/(r-t)},t.isVertical=a,t.checkBoundaries=function(e,t,r){if(t>=r)throw new RangeError("min ("+t+") is equal/bigger than max ("+r+")");if(e<t)throw new RangeError("value ("+e+") is smaller than min ("+t+")");if(e>r)throw new RangeError("value ("+e+") is bigger than max ("+r+")")},t.checkInitialOverlap=function(e){if(!(e.length<2)&&!e.slice(1).every((function(t,r){return e[r]<=t})))throw new RangeError("values={["+e+"]} needs to be sorted when allowOverlap={false}")},t.getMargin=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}},t.getPaddingAndBorder=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10)+parseInt(t["border-top-width"],10),bottom:parseInt(t["padding-bottom"],10)+parseInt(t["border-bottom-width"],10),left:parseInt(t["padding-left"],10)+parseInt(t["border-left-width"],10),right:parseInt(t["padding-right"],10)+parseInt(t["border-right-width"],10)}},t.translateThumbs=function(e,t,r){var n=r?-1:1;e.forEach((function(e,r){return s(e,n*t[r].x,t[r].y)}))},t.getClosestThumbIndex=function(e,t,r,n){for(var i=0,o=c(e[0],t,r,n),a=1;a<e.length;a++){var s=c(e[a],t,r,n);s<o&&(o=s,i=a)}return i},t.translate=s,t.schd=function(e){var t=[],r=null;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];t=n,r||(r=requestAnimationFrame((function(){r=null,e.apply(void 0,t)})))}},t.replaceAt=function(e,t,r){var n=e.slice(0);return n[t]=r,n},t.getTrackBackground=function(e){var t=e.values,r=e.colors,n=e.min,i=e.max,a=e.direction,s=void 0===a?o.Direction.Right:a,u=e.rtl,c=void 0!==u&&u;c&&s===o.Direction.Right?s=o.Direction.Left:c&&o.Direction.Left&&(s=o.Direction.Right);var l=t.slice(0).sort((function(e,t){return e-t})).map((function(e){return(e-n)/(i-n)*100})).reduce((function(e,t,n){return e+", "+r[n]+" "+t+"%, "+r[n+1]+" "+t+"%"}),"");return"linear-gradient("+s+", "+r[0]+" 0%"+l+", "+r[r.length-1]+" 100%)"},t.voidFn=function(){},t.assertUnreachable=function(e){throw new Error("Didn't expect to get here")};var u=function(e,t,r,i,o){return void 0===o&&(o=function(e){return e}),Math.ceil(n([e],Array.from(e.children)).reduce((function(e,n){var a=Math.ceil(n.getBoundingClientRect().width);if(n.innerText&&n.innerText.includes(r)&&0===n.childElementCount){var s=n.cloneNode(!0);s.innerHTML=o(t.toFixed(i)),s.style.visibility="hidden",document.body.appendChild(s),a=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return a>e?a:e}),e.getBoundingClientRect().width))};function c(e,t,r,n){var i=e.getBoundingClientRect(),o=i.x,s=i.y,u=i.width,c=i.height;return a(n)?Math.abs(r-(s+c/2)):Math.abs(t-(o+u/2))}t.useThumbOverlap=function(e,r,o,a,s,c){void 0===a&&(a=.1),void 0===s&&(s=" - "),void 0===c&&(c=function(e){return e});var l=t.getStepDecimals(a),d=i.useState({}),p=d[0],h=d[1],f=i.useState(c(r[o].toFixed(l))),g=f[0],v=f[1];return i.useEffect((function(){if(e){var t=e.getThumbs();if(t.length<1)return;var i={},a=e.getOffsets(),d=function(e,t,r,i,o,a,s){void 0===s&&(s=function(e){return e});var c=[],l=function(e){var d=u(r[e],i[e],o,a,s),p=t[e].x;t.forEach((function(t,h){var f=t.x,g=u(r[h],i[h],o,a,s);e!==h&&(p>=f&&p<=f+g||p+d>=f&&p+d<=f+g)&&(c.includes(h)||(c.push(e),c.push(h),c=n(c,[e,h]),l(h)))}))};return l(e),Array.from(new Set(c.sort()))}(o,a,t,r,s,l,c),p=c(r[o].toFixed(l));if(d.length){var f=d.reduce((function(e,t,r,i){return e.length?n(e,[a[i[r]].x]):[a[i[r]].x]}),[]);if(Math.min.apply(Math,f)===a[o].x){var g=[];d.forEach((function(e){g.push(r[e].toFixed(l))})),p=Array.from(new Set(g.sort((function(e,t){return parseFloat(e)-parseFloat(t)})))).map(c).join(s);var m=Math.min.apply(Math,f),b=Math.max.apply(Math,f),y=t[d[f.indexOf(b)]].getBoundingClientRect().width;i.left=Math.abs(m-(b+y))/2+"px",i.transform="translate(-50%, 0)"}else i.visibility="hidden"}v(p),h(i)}}),[e,r]),[g,p]}},59500:(e,t,r)=>{var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var r,n,a,s,u,c,l,d,p,h=1,f=e.length,g="";for(n=0;n<f;n++)if("string"===typeof e[n])g+=e[n];else if("object"===typeof e[n]){if((s=e[n]).keys)for(r=t[h],a=0;a<s.keys.length;a++){if(void 0==r)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));r=r[s.keys[a]]}else r=s.param_no?t[s.param_no]:t[h++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!==typeof r&&isNaN(r))throw new TypeError(o("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(d=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=r:(!i.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(p+r).length,u=s.width&&l>0?c.repeat(l):"",g+=s.align?p+r+u:"0"===c?p+u+r:u+p+r)}return g}(function(e){if(s[e])return s[e];var t,r=e,n=[],o=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],u=t[2],c=[];if(null===(c=i.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(u=u.substring(c[0].length));)if(null!==(c=i.key_access.exec(u)))a.push(c[1]);else{if(null===(c=i.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=o,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}()}}]);
|
|
1
|
+
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[142],{55790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>D});var n=r(5057),i=r(44175),o=r(94253),a=r(53381);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=(0,a.zo)("div",{position:"relative",width:"100%"});l.displayName="Root",l.displayName="Root",l.displayName="StyledRoot";var d=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,i=e.$disabled,o=e.$isDragged,a=t.sizing,s="inherit";return i?s="not-allowed":o?s="grabbing":1===n.length&&(s="pointer"),{paddingTop:a.scale600,paddingBottom:a.scale600,paddingRight:a.scale600,paddingLeft:a.scale600,display:"flex",cursor:s,backgroundColor:t.colors.sliderTrackFill}}));d.displayName="Track",d.displayName="Track",d.displayName="StyledTrack";var p=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,o=e.$min,a=e.$max,s=e.$disabled,u=t.colors,c=t.borders,l=t.direction,d=t.borders.useRoundedCorners?c.radius100:0;return{borderTopLeftRadius:d,borderTopRightRadius:d,borderBottomRightRadius:d,borderBottomLeftRadius:d,background:(0,i.getTrackBackground)({values:n,colors:1===n.length?[s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque]:[s?u.backgroundSecondary:u.borderOpaque,s?u.borderOpaque:u.primary,s?u.backgroundSecondary:u.borderOpaque],min:o||0,max:a||0,rtl:"rtl"===l}),height:"2px",width:"100%",alignSelf:"center",cursor:s?"not-allowed":"inherit"}}));p.displayName="InnerTrack",p.displayName="InnerTrack",p.displayName="StyledInnerTrack";var h=(0,a.zo)("div",(function(e){return{width:"4px",height:"2px",backgroundColor:e.$theme.colors.backgroundPrimary,marginLeft:"16px"}}));h.displayName="Mark",h.displayName="Mark",h.displayName="StyledMark";var f=(0,a.zo)("div",(function(e){return u(u({},e.$theme.typography.font200),{},{color:e.$theme.colors.contentPrimary})}));f.displayName="Tick",f.displayName="Tick",f.displayName="StyledTick";var g=(0,a.zo)("div",(function(e){var t=e.$theme.sizing;return{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:t.scale600,paddingLeft:t.scale600,paddingBottom:t.scale400}}));g.displayName="TickBar",g.displayName="TickBar",g.displayName="StyledTickBar";var v=(0,a.zo)("div",(function(e){var t=e.$theme,r=e.$value,n=void 0===r?[]:r,i=e.$thumbIndex,o=e.$disabled,a=2===n.length&&0===i,s=2===n.length&&1===i;return"rtl"===t.direction&&(s||a)&&(a=!a,s=!s),{height:"24px",width:"24px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px",borderBottomLeftRadius:"24px",borderBottomRightRadius:"24px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:o?t.colors.sliderHandleFillDisabled:t.colors.sliderHandleFill,outline:"none",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(t.colors.accent):"0 1px 4px rgba(0, 0, 0, 0.12)",cursor:o?"not-allowed":"inherit"}}));v.displayName="Thumb",v.displayName="Thumb",v.displayName="StyledThumb";var m=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$theme;return{position:"absolute",top:"-16px",width:"4px",height:"20px",backgroundColor:t?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill}}));m.displayName="InnerThumb",m.displayName="InnerThumb",m.displayName="StyledInnerThumb";var b=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$theme;return u(u({position:"absolute",top:"-".concat(r.sizing.scale1400)},r.typography.font200),{},{backgroundColor:t?r.colors.sliderHandleFillDisabled:r.colors.sliderHandleInnerFill,color:r.colors.contentInversePrimary,paddingLeft:r.sizing.scale600,paddingRight:r.sizing.scale600,paddingTop:r.sizing.scale500,paddingBottom:r.sizing.scale500,borderBottomLeftRadius:"48px",borderBottomRightRadius:"48px",borderTopLeftRadius:"48px",borderTopRightRadius:"48px",whiteSpace:"nowrap"})}));b.displayName="ThumbValue",b.displayName="ThumbValue",b.displayName="StyledThumbValue";var y=r(80099),w=r(6532);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O.apply(this,arguments)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var S=function(e){if(e.length>2||0===e.length)throw new Error("the value prop represents positions of thumbs, so its length can be only one or two");return e};const D=function(e){var t=e.overrides,r=void 0===t?{}:t,a=e.disabled,s=void 0!==a&&a,u=e.marks,c=void 0!==u&&u,k=e.onChange,T=void 0===k?function(){}:k,R=e.onFinalChange,D=void 0===R?function(){}:R,E=e.min,I=void 0===E?0:E,j=e.max,_=void 0===j?100:j,C=e.step,P=void 0===C?1:C,L=e.persistentThumb,z=void 0!==L&&L,$=e.valueToLabel,F=void 0===$?function(e){return e}:$,N=e.value,A=n.useContext(w.N),B=M(n.useState(!1),2),V=B[0],U=B[1],X=M(n.useState(!1),2),Y=X[0],Z=X[1],q=M(n.useState(!1),2),H=q[0],K=q[1],W=M(n.useState(-1),2),J=W[0],G=W[1],Q=n.useCallback((function(e){(0,o.E)(e)&&K(!0);var t=e.target.parentNode.firstChild===e.target?0:1;G(t)}),[]),ee=n.useCallback((function(e){!1!==H&&K(!1),G(-1)}),[]),te=S(N),re={$disabled:s,$step:P,$min:I,$max:_,$marks:c,$value:te,$isFocusVisible:H},ne=M((0,y.jb)(r.Root,l),2),ie=ne[0],oe=ne[1],ae=M((0,y.jb)(r.Track,d),2),se=ae[0],ue=ae[1],ce=M((0,y.jb)(r.InnerTrack,p),2),le=ce[0],de=ce[1],pe=M((0,y.jb)(r.Thumb,v),2),he=pe[0],fe=pe[1],ge=M((0,y.jb)(r.InnerThumb,m),2),ve=ge[0],me=ge[1],be=M((0,y.jb)(r.ThumbValue,b),2),ye=be[0],we=be[1],ke=M((0,y.jb)(r.Tick,f),2),xe=ke[0],Te=ke[1],Oe=M((0,y.jb)(r.TickBar,g),2),Me=Oe[0],Re=Oe[1],Se=M((0,y.jb)(r.Mark,h),2),De=Se[0],Ee=Se[1];return n.createElement(ie,O({"data-baseweb":"slider"},re,oe,{onFocus:(0,o.Ah)(oe,Q),onBlur:(0,o.Z5)(oe,ee)}),n.createElement(i.Range,O({step:P,min:I,max:_,values:te,disabled:s,onChange:function(e){return T({value:e})},onFinalChange:function(e){return D({value:e})},rtl:"rtl"===A.direction,renderTrack:function(e){var t=e.props,r=e.children,i=e.isDragged;return n.createElement(se,O({onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,$isDragged:i},re,ue),n.createElement(le,O({$isDragged:i,ref:t.ref},re,de),r))},renderThumb:function(e){var t=e.props,r=e.index,i=e.isDragged,o=z||(!!r&&Y||!r&&V||i)&&!s;return n.createElement(he,O({},t,{onMouseEnter:function(){0===r?U(!0):Z(!0)},onMouseLeave:function(){0===r?U(!1):Z(!1)},$thumbIndex:r,$isDragged:i,style:x({},t.style)},re,fe,{$isFocusVisible:H&&J===r}),o&&n.createElement(ye,O({$thumbIndex:r,$isDragged:i},re,we),F(te[r])),o&&n.createElement(ve,O({$thumbIndex:r,$isDragged:i},re,me)))}},c?{renderMark:function(e){var t=e.props,r=e.index;return n.createElement(De,O({$markIndex:r},t,re,Ee))}}:{})),n.createElement(Me,O({},re,Re),n.createElement(xe,O({},re,Te),F(I)),n.createElement(xe,O({},re,Te),F(_))))}},96312:function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(r(5057)),s=r(41669),u=r(45426),c=["ArrowRight","ArrowUp","k","PageUp"],l=["ArrowLeft","ArrowDown","j","PageDown"],d=function(e){function t(t){var r=e.call(this,t)||this;r.trackRef=a.createRef(),r.thumbRefs=[],r.markRefs=[],r.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(r.props.values.length).fill(0).map((function(e,t){return t})),isChanged:!1,markOffsets:[]},r.getOffsets=function(){var e=r.props,t=e.direction,n=e.values,i=e.min,o=e.max,a=r.trackRef.current,c=a.getBoundingClientRect(),l=s.getPaddingAndBorder(a);return r.getThumbs().map((function(e,r){var a={x:0,y:0},d=e.getBoundingClientRect(),p=s.getMargin(e);switch(t){case u.Direction.Right:return a.x=-1*(p.left+l.left),a.y=-1*((d.height-c.height)/2+l.top),a.x+=c.width*s.relativeValue(n[r],i,o)-d.width/2,a;case u.Direction.Left:return a.x=-1*(p.right+l.right),a.y=-1*((d.height-c.height)/2+l.top),a.x+=c.width-c.width*s.relativeValue(n[r],i,o)-d.width/2,a;case u.Direction.Up:return a.x=-1*((d.width-c.width)/2+p.left+l.left),a.y=-l.left,a.y+=c.height-c.height*s.relativeValue(n[r],i,o)-d.height/2,a;case u.Direction.Down:return a.x=-1*((d.width-c.width)/2+p.left+l.left),a.y=-l.left,a.y+=c.height*s.relativeValue(n[r],i,o)-d.height/2,a;default:return s.assertUnreachable(t)}}))},r.getThumbs=function(){return r.trackRef&&r.trackRef.current?Array.from(r.trackRef.current.children).filter((function(e){return e.hasAttribute("aria-valuenow")})):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},r.getTargetIndex=function(e){return r.getThumbs().findIndex((function(t){return t===e.target||t.contains(e.target)}))},r.addTouchEvents=function(e){document.addEventListener("touchmove",r.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",r.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",r.schdOnEnd,{passive:!1})},r.addMouseEvents=function(e){document.addEventListener("mousemove",r.schdOnMouseMove),document.addEventListener("mouseup",r.schdOnEnd)},r.onMouseDownTrack=function(e){var t;if(0===e.button)if(e.persist(),e.preventDefault(),r.addMouseEvents(e.nativeEvent),r.props.values.length>1&&r.props.draggableTrack){if(r.thumbRefs.some((function(t){var r;return null===(r=t.current)||void 0===r?void 0:r.contains(e.target)})))return;r.setState({draggedTrackPos:[e.clientX,e.clientY]},(function(){return r.onMove(e.clientX,e.clientY)}))}else{var n=s.getClosestThumbIndex(r.thumbRefs.map((function(e){return e.current})),e.clientX,e.clientY,r.props.direction);null===(t=r.thumbRefs[n].current)||void 0===t||t.focus(),r.setState({draggedThumbIndex:n},(function(){return r.onMove(e.clientX,e.clientY)}))}},r.onResize=function(){s.translateThumbs(r.getThumbs(),r.getOffsets(),r.props.rtl),r.calculateMarkOffsets()},r.onTouchStartTrack=function(e){var t;if(e.persist(),r.addTouchEvents(e.nativeEvent),r.props.values.length>1&&r.props.draggableTrack){if(r.thumbRefs.some((function(t){var r;return null===(r=t.current)||void 0===r?void 0:r.contains(e.target)})))return;r.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},(function(){return r.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}else{var n=s.getClosestThumbIndex(r.thumbRefs.map((function(e){return e.current})),e.touches[0].clientX,e.touches[0].clientY,r.props.direction);null===(t=r.thumbRefs[n].current)||void 0===t||t.focus(),r.setState({draggedThumbIndex:n},(function(){return r.onMove(e.touches[0].clientX,e.touches[0].clientY)}))}},r.onMouseOrTouchStart=function(e){if(!r.props.disabled){var t=s.isTouchEvent(e);if(t||0===e.button){var n=r.getTargetIndex(e);-1!==n&&(t?r.addTouchEvents(e):r.addMouseEvents(e),r.setState({draggedThumbIndex:n,thumbZIndexes:r.state.thumbZIndexes.map((function(e,t){return t===n?Math.max.apply(Math,r.state.thumbZIndexes):e<=r.state.thumbZIndexes[n]?e:e-1}))}))}}},r.onMouseMove=function(e){e.preventDefault(),r.onMove(e.clientX,e.clientY)},r.onTouchMove=function(e){e.preventDefault(),r.onMove(e.touches[0].clientX,e.touches[0].clientY)},r.onKeyDown=function(e){var t=r.props,n=t.values,i=t.onChange,o=t.step,a=t.rtl,u=r.state.isChanged,d=r.getTargetIndex(e.nativeEvent),p=a?-1:1;-1!==d&&(c.includes(e.key)?(e.preventDefault(),r.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(n,d,r.normalizeValue(n[d]+p*("PageUp"===e.key?10*o:o),d)))):l.includes(e.key)?(e.preventDefault(),r.setState({draggedThumbIndex:d,isChanged:!0}),i(s.replaceAt(n,d,r.normalizeValue(n[d]-p*("PageDown"===e.key?10*o:o),d)))):"Tab"===e.key?r.setState({draggedThumbIndex:-1},(function(){u&&r.fireOnFinalChange()})):u&&r.fireOnFinalChange())},r.onKeyUp=function(e){var t=r.state.isChanged;r.setState({draggedThumbIndex:-1},(function(){t&&r.fireOnFinalChange()}))},r.onMove=function(e,t){var n=r.state,i=n.draggedThumbIndex,o=n.draggedTrackPos,a=r.props,c=a.direction,l=a.min,d=a.max,p=a.onChange,h=a.values,f=a.step,g=a.rtl;if(-1===i&&-1===o[0]&&-1===o[1])return null;var v=r.trackRef.current;if(!v)return null;var m=v.getBoundingClientRect(),b=s.isVertical(c)?m.height:m.width;if(-1!==o[0]&&-1!==o[1]){var y=e-o[0],w=t-o[1],k=0;switch(c){case u.Direction.Right:case u.Direction.Left:k=y/b*(d-l)+l;break;case u.Direction.Down:case u.Direction.Up:k=w/b*(d-l)+l;break;default:s.assertUnreachable(c)}if(g&&(k*=-1),Math.abs(k)>=f/2){for(var x=0;x<r.thumbRefs.length;x++){if(h[x]===d&&1===Math.sign(k)||h[x]===l&&-1===Math.sign(k))return;var T=h[x]+k;T>d?k=d-h[x]:T<l&&(k=l-h[x])}var O=h.slice(0);for(x=0;x<r.thumbRefs.length;x++)O=s.replaceAt(O,x,r.normalizeValue(h[x]+k,x));r.setState({draggedTrackPos:[e,t]}),p(O)}}else{var M=0;switch(c){case u.Direction.Right:M=(e-m.left)/b*(d-l)+l;break;case u.Direction.Left:M=(b-(e-m.left))/b*(d-l)+l;break;case u.Direction.Down:M=(t-m.top)/b*(d-l)+l;break;case u.Direction.Up:M=(b-(t-m.top))/b*(d-l)+l;break;default:s.assertUnreachable(c)}g&&(M=d+l-M),Math.abs(h[i]-M)>=f/2&&p(s.replaceAt(h,i,r.normalizeValue(M,i)))}},r.normalizeValue=function(e,t){var n=r.props,i=n.min,o=n.max,a=n.step,u=n.allowOverlap,c=n.values;return s.normalizeValue(e,t,i,o,a,u,c)},r.onEnd=function(e){if(e.preventDefault(),document.removeEventListener("mousemove",r.schdOnMouseMove),document.removeEventListener("touchmove",r.schdOnTouchMove),document.removeEventListener("mouseup",r.schdOnEnd),document.removeEventListener("touchend",r.schdOnEnd),document.removeEventListener("touchcancel",r.schdOnEnd),-1===r.state.draggedThumbIndex&&-1===r.state.draggedTrackPos[0]&&-1===r.state.draggedTrackPos[1])return null;r.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},(function(){r.fireOnFinalChange()}))},r.fireOnFinalChange=function(){r.setState({isChanged:!1});var e=r.props,t=e.onFinalChange,n=e.values;t&&t(n)},r.calculateMarkOffsets=function(){if(r.props.renderMark&&r.trackRef&&null!==r.trackRef.current){for(var e=window.getComputedStyle(r.trackRef.current),t=parseInt(e.width,10),n=parseInt(e.height,10),i=parseInt(e.paddingLeft,10),o=parseInt(e.paddingTop,10),a=[],s=0;s<r.numOfMarks+1;s++){var c=9999,l=9999;if(r.markRefs[s].current){var d=r.markRefs[s].current.getBoundingClientRect();c=d.height,l=d.width}r.props.direction===u.Direction.Left||r.props.direction===u.Direction.Right?a.push([Math.round(t/r.numOfMarks*s+i-l/2),-Math.round((c-n)/2)]):a.push([Math.round(n/r.numOfMarks*s+o-c/2),-Math.round((l-t)/2)])}r.setState({markOffsets:a})}},r.numOfMarks=(t.max-t.min)/r.props.step,r.schdOnMouseMove=s.schd(r.onMouseMove),r.schdOnTouchMove=s.schd(r.onTouchMove),r.schdOnEnd=s.schd(r.onEnd),r.thumbRefs=t.values.map((function(){return a.createRef()}));for(var n=0;n<r.numOfMarks+1;n++)r.markRefs[n]=a.createRef();if(s.isStepDivisible(t.min,t.max,t.step)||console.warn("The difference of `max` and `min` must be divisible by `step`"),0===t.step)throw new Error('"step" property should be a positive number');return r}return n(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.values,n=t.min,i=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",e.onResize)},unobserve:function(){return window.removeEventListener("resize",e.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&s.checkInitialOverlap(this.props.values),this.props.values.forEach((function(t){return s.checkBoundaries(t,e.props.min,e.props.max)})),this.resizeObserver.observe(this.trackRef.current),s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),r.forEach((function(e){s.isStepDivisible(n,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},t.prototype.componentDidUpdate=function(e){s.translateThumbs(this.getThumbs(),this.getOffsets(),this.props.rtl)},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},t.prototype.render=function(){var e=this,t=this.props,r=t.renderTrack,n=t.renderThumb,o=t.renderMark,a=void 0===o?function(){return null}:o,c=t.values,l=t.min,d=t.max,p=t.allowOverlap,h=t.disabled,f=this.state,g=f.draggedThumbIndex,v=f.thumbZIndexes,m=f.markOffsets;return r({props:{style:{transform:"scale(1)",cursor:g>-1?"grabbing":this.props.draggableTrack?s.isVertical(this.props.direction)?"ns-resize":"ew-resize":1!==c.length||h?"inherit":"pointer"},onMouseDown:h?s.voidFn:this.onMouseDownTrack,onTouchStart:h?s.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:h,children:i(m.map((function(t,r){return a({props:{style:e.props.direction===u.Direction.Left||e.props.direction===u.Direction.Right?{position:"absolute",left:t[0]+"px",marginTop:t[1]+"px"}:{position:"absolute",top:t[0]+"px",marginLeft:t[1]+"px"},key:"mark"+r,ref:e.markRefs[r]},index:r})})),c.map((function(t,r){var i=e.state.draggedThumbIndex===r;return n({index:r,value:t,isDragged:i,props:{style:{position:"absolute",zIndex:v[r],cursor:h?"inherit":i?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:r,tabIndex:h?void 0:0,"aria-valuemax":p?d:c[r+1]||d,"aria-valuemin":p?l:c[r-1]||l,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[r],role:"slider",onKeyDown:h?s.voidFn:e.onKeyDown,onKeyUp:h?s.voidFn:e.onKeyUp}})})))})},t.defaultProps={step:1,direction:u.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},t}(a.Component);t.default=d},44175:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(96312));t.Range=i.default;var o=r(41669);t.getTrackBackground=o.getTrackBackground,t.useThumbOverlap=o.useThumbOverlap,t.relativeValue=o.relativeValue;var a=r(45426);t.Direction=a.Direction},45426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(t.Direction||(t.Direction={}))},41669:function(e,t,r){"use strict";var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n};Object.defineProperty(t,"__esModule",{value:!0});var i=r(5057),o=r(45426);function a(e){return e===o.Direction.Up||e===o.Direction.Down}function s(e,t,r){e.style.transform="translate("+t+"px, "+r+"px)"}t.getStepDecimals=function(e){var t=e.toString().split(".")[1];return t?t.length:0},t.isTouchEvent=function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length},t.isStepDivisible=function(e,t,r){var n=(t-e)/r;return parseInt(n.toString(),10)===n},t.normalizeValue=function(e,r,n,i,o,a,s){var u=1e11;if(e=Math.round(e*u)/u,!a){var c=s[r-1],l=s[r+1];if(c&&c>e)return c;if(l&&l<e)return l}if(e>i)return i;if(e<n)return n;var d=Math.floor(e*u-n*u)%Math.floor(o*u),p=Math.floor(e*u-Math.abs(d)),h=0===d?e:p/u,f=Math.abs(d/u)<o/2?h:h+o,g=t.getStepDecimals(o);return parseFloat(f.toFixed(g))},t.relativeValue=function(e,t,r){return(e-t)/(r-t)},t.isVertical=a,t.checkBoundaries=function(e,t,r){if(t>=r)throw new RangeError("min ("+t+") is equal/bigger than max ("+r+")");if(e<t)throw new RangeError("value ("+e+") is smaller than min ("+t+")");if(e>r)throw new RangeError("value ("+e+") is bigger than max ("+r+")")},t.checkInitialOverlap=function(e){if(!(e.length<2)&&!e.slice(1).every((function(t,r){return e[r]<=t})))throw new RangeError("values={["+e+"]} needs to be sorted when allowOverlap={false}")},t.getMargin=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}},t.getPaddingAndBorder=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10)+parseInt(t["border-top-width"],10),bottom:parseInt(t["padding-bottom"],10)+parseInt(t["border-bottom-width"],10),left:parseInt(t["padding-left"],10)+parseInt(t["border-left-width"],10),right:parseInt(t["padding-right"],10)+parseInt(t["border-right-width"],10)}},t.translateThumbs=function(e,t,r){var n=r?-1:1;e.forEach((function(e,r){return s(e,n*t[r].x,t[r].y)}))},t.getClosestThumbIndex=function(e,t,r,n){for(var i=0,o=c(e[0],t,r,n),a=1;a<e.length;a++){var s=c(e[a],t,r,n);s<o&&(o=s,i=a)}return i},t.translate=s,t.schd=function(e){var t=[],r=null;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];t=n,r||(r=requestAnimationFrame((function(){r=null,e.apply(void 0,t)})))}},t.replaceAt=function(e,t,r){var n=e.slice(0);return n[t]=r,n},t.getTrackBackground=function(e){var t=e.values,r=e.colors,n=e.min,i=e.max,a=e.direction,s=void 0===a?o.Direction.Right:a,u=e.rtl,c=void 0!==u&&u;c&&s===o.Direction.Right?s=o.Direction.Left:c&&o.Direction.Left&&(s=o.Direction.Right);var l=t.slice(0).sort((function(e,t){return e-t})).map((function(e){return(e-n)/(i-n)*100})).reduce((function(e,t,n){return e+", "+r[n]+" "+t+"%, "+r[n+1]+" "+t+"%"}),"");return"linear-gradient("+s+", "+r[0]+" 0%"+l+", "+r[r.length-1]+" 100%)"},t.voidFn=function(){},t.assertUnreachable=function(e){throw new Error("Didn't expect to get here")};var u=function(e,t,r,i,o){return void 0===o&&(o=function(e){return e}),Math.ceil(n([e],Array.from(e.children)).reduce((function(e,n){var a=Math.ceil(n.getBoundingClientRect().width);if(n.innerText&&n.innerText.includes(r)&&0===n.childElementCount){var s=n.cloneNode(!0);s.innerHTML=o(t.toFixed(i)),s.style.visibility="hidden",document.body.appendChild(s),a=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return a>e?a:e}),e.getBoundingClientRect().width))};function c(e,t,r,n){var i=e.getBoundingClientRect(),o=i.x,s=i.y,u=i.width,c=i.height;return a(n)?Math.abs(r-(s+c/2)):Math.abs(t-(o+u/2))}t.useThumbOverlap=function(e,r,o,a,s,c){void 0===a&&(a=.1),void 0===s&&(s=" - "),void 0===c&&(c=function(e){return e});var l=t.getStepDecimals(a),d=i.useState({}),p=d[0],h=d[1],f=i.useState(c(r[o].toFixed(l))),g=f[0],v=f[1];return i.useEffect((function(){if(e){var t=e.getThumbs();if(t.length<1)return;var i={},a=e.getOffsets(),d=function(e,t,r,i,o,a,s){void 0===s&&(s=function(e){return e});var c=[],l=function(e){var d=u(r[e],i[e],o,a,s),p=t[e].x;t.forEach((function(t,h){var f=t.x,g=u(r[h],i[h],o,a,s);e!==h&&(p>=f&&p<=f+g||p+d>=f&&p+d<=f+g)&&(c.includes(h)||(c.push(e),c.push(h),c=n(c,[e,h]),l(h)))}))};return l(e),Array.from(new Set(c.sort()))}(o,a,t,r,s,l,c),p=c(r[o].toFixed(l));if(d.length){var f=d.reduce((function(e,t,r,i){return e.length?n(e,[a[i[r]].x]):[a[i[r]].x]}),[]);if(Math.min.apply(Math,f)===a[o].x){var g=[];d.forEach((function(e){g.push(r[e].toFixed(l))})),p=Array.from(new Set(g.sort((function(e,t){return parseFloat(e)-parseFloat(t)})))).map(c).join(s);var m=Math.min.apply(Math,f),b=Math.max.apply(Math,f),y=t[d[f.indexOf(b)]].getBoundingClientRect().width;i.left=Math.abs(m-(b+y))/2+"px",i.transform="translate(-50%, 0)"}else i.visibility="hidden"}v(p),h(i)}}),[e,r]),[g,p]}},59500:(e,t,r)=>{var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var r,n,a,s,u,c,l,d,p,h=1,f=e.length,g="";for(n=0;n<f;n++)if("string"===typeof e[n])g+=e[n];else if("object"===typeof e[n]){if((s=e[n]).keys)for(r=t[h],a=0;a<s.keys.length;a++){if(void 0==r)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));r=r[s.keys[a]]}else r=s.param_no?t[s.param_no]:t[h++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!==typeof r&&isNaN(r))throw new TypeError(o("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(d=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=r:(!i.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(p+r).length,u=s.width&&l>0?c.repeat(l):"",g+=s.align?p+r+u:"0"===c?p+u+r:u+p+r)}return g}(function(e){if(s[e])return s[e];var t,r=e,n=[],o=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],u=t[2],c=[];if(null===(c=i.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(u=u.substring(c[0].length));)if(null!==(c=i.key_access.exec(u)))a.push(c[1]);else{if(null===(c=i.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=o,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}()}}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[172],{53370:(e,t,r)=>{r.d(t,{Z:()=>c});r(5057);var o=r(46434),n=r(18950),i=r(45490);const a=r(21371).F4`
|
|
2
|
+
50% {
|
|
3
|
+
color: rgba(0, 0, 0, 0);
|
|
4
|
+
}
|
|
5
|
+
`,s=(0,i.Z)("span",{target:"e1y2jo8h0"})((({includeDot:e,shouldBlink:t,theme:r})=>({...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:r.colors.gray,margin:"0 5px"}}:{},...t?{color:r.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=r(96266);const c=({dirty:e,value:t,maxLength:r,className:i,type:a="single"})=>{const c=[],u=(e,t=!1)=>{c.push((0,l.jsx)(s,{includeDot:c.length>0,shouldBlink:t,children:e},c.length))};return e&&("multiline"===a?(0,o.Ge)()?u("Press \u2318+Enter to apply"):u("Press Ctrl+Enter to apply"):"single"===a&&u("Press Enter to apply")),r&&("chat"!==a||e)&&u(`${t.length}/${r}`,e&&t.length>=r),(0,l.jsx)(n.X7,{"data-testid":"InputInstructions",className:i,children:c})}},60172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var o=r(5057),n=r(31476),i=r(85471),a=r(95421),s=o.forwardRef((function(e,t){return o.createElement(a.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("rect",{width:24,height:24,fill:"none"}),o.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(76866),c=r(87509),u=r(53370),d=r(23878),p=r(45490),f=r(98927);const h=(0,p.Z)("div",{target:"ehod42b5"})((({theme:e,width:t,position:r})=>{const o=(0,d.Iy)(e);return{borderRadius:e.radii.lg,display:"flex",...r===f.xg.Position.BOTTOM&&{backgroundColor:o?e.colors.gray20:e.colors.gray90},width:`${t}px`}}),""),y=(0,p.Z)("div",{target:"ehod42b4"})((({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.lg,display:"flex",alignItems:"center"})),""),g=(0,p.Z)("button",{target:"ehod42b3"})((({theme:e,disabled:t,extended:r})=>{const o=(0,d.Iy)(e),[n,i]=o?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:r?e.radii.none:e.radii.lg,borderTopLeftRadius:r?e.radii.lg:e.radii.none,borderBottomRightRadius:e.radii.lg,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:1,margin:0,padding:e.spacing.sm,color:t?n:i,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}}),""),b=(0,p.Z)("div",{target:"ehod42b2"})((({theme:e})=>({position:"fixed",bottom:"0px",paddingBottom:"70px",paddingTop:e.spacing.lg,backgroundColor:e.colors.bgColor,zIndex:e.zIndices.chatInput,[`@media (max-width: ${e.breakpoints.md})`]:{display:"flex",flexDirection:"column",alignItems:"center",left:0,width:"100vw"}})),""),m=(0,p.Z)("div",{target:"ehod42b1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),v=(0,p.Z)("div",{target:"ehod42b0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var x=r(96266);const w=6.5,O=1,j=e=>{const{keyCode:t,key:r}=e;return"Enter"===r||13===t||10===t};const C=function({width:e,element:t,widgetMgr:r}){const i=(0,n.u)(),[a,p]=(0,o.useState)(!1),[f,C]=(0,o.useState)(t.default),[P,S]=(0,o.useState)(0),k=(0,o.useRef)(null),I=(0,o.useRef)({minHeight:0,maxHeight:0}),R=()=>{f&&(r.setStringTriggerValue(t,f,{fromUi:!0}),p(!1),C(""),S(0))};(0,o.useEffect)((()=>{if(t.setValue){t.setValue=!1;const e=t.value||"";C(e),p(""!==e)}}),[t]),(0,o.useEffect)((()=>{if(k.current){const{offsetHeight:e}=k.current;I.current.minHeight=e,I.current.maxHeight=e*w}}),[k]);const{disabled:T,placeholder:$,maxChars:E,position:B}=t,z=(0,d.Iy)(i),{minHeight:Z,maxHeight:F}=I.current,D=z?i.colors.gray70:i.colors.gray80,N=!!(P>0&&k.current)&&Math.abs(P-Z)>O;return(0,x.jsx)(b,{className:"stChatFloatingInputContainer",children:(0,x.jsx)(h,{className:"stChatInputContainer",width:e,position:B,children:(0,x.jsxs)(y,{children:[(0,x.jsx)(l.Z,{"data-testid":"stChatInput",inputRef:k,value:f,placeholder:$,onChange:e=>{const{value:r}=e.target,{maxChars:o}=t;0!==o&&r.length>o||(p(""!==r),C(r),S((()=>{let e=0;const{current:t}=k;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:o}=e;j(e)&&!o&&!r&&!t&&(e.preventDefault(),R())},"aria-label":$,disabled:T,rows:1,overrides:{Root:{style:{outline:"none",backgroundColor:i.colors.transparent,borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px",width:`${e}px`}},InputContainer:{style:{backgroundColor:i.colors.transparent}},Input:{style:{lineHeight:"1.4",backgroundColor:i.colors.transparent,"::placeholder":{color:D},height:N?`${P+O}px`:"auto",maxHeight:F?`${F}px`:"none",paddingRight:"3rem",paddingLeft:i.spacing.sm,paddingBottom:i.spacing.sm,paddingTop:i.spacing.sm}}}}),(0,x.jsx)(v,{children:(0,x.jsx)(u.Z,{dirty:a,value:f,maxLength:E,type:"chat"})}),(0,x.jsx)(m,{children:(0,x.jsx)(g,{onClick:R,disabled:!a||T,extended:N,children:(0,x.jsx)(c.ZP,{content:s,size:"xl",color:"inherit"})})})]})})})}},76866:(e,t,r)=>{r.d(t,{Z:()=>S});var o=r(5057),n=r(80099),i=r(97135),a=r(18150),s=r(53381),l=r(4547);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.zo)("div",(function(e){return u(u({},(0,l.d5)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.zo)("div",(function(e){return(0,l.hB)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.zo)("textarea",(function(e){return u(u({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(l){s=!0,n=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function v(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=j(e);if(t){var n=j(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var P=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,n.jb)(t.Root,p),2),s=r[0],l=r[1],c=(0,n.aO)({Input:{component:h},InputContainer:{component:f}},t);return o.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),o.createElement(i.Z,g({},this.props,{type:a.iB.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Component);C(P,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.NO.default});const S=P},85471:(e,t,r)=>{function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},o.apply(this,arguments)}r.d(t,{Z:()=>o})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[2327],{42327:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});i(5057);var s=i(46401),l=i(21807),d=i(96266);const n=function(e){const{disabled:t,element:i,widgetMgr:n,width:r}=e,a={width:r},o="primary"===i.type?s.nW.PRIMARY:s.nW.SECONDARY;return(0,d.jsx)("div",{className:"row-widget stButton",style:a,children:(0,d.jsx)(s.t2,{help:i.help,children:(0,d.jsx)(s.ZP,{kind:o,size:s.V5.SMALL,disabled:t,fluidWidth:i.useContainerWidth||!1,onClick:()=>n.setTriggerValue(i,{fromUi:!0}),children:(0,d.jsx)(l.Z,{source:i.label,allowHTML:!1,isLabel:!0,isButton:!0})})})})}}}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[2775],{53370:(t,e,i)=>{i.d(e,{Z:()=>d});i(5057);var s=i(46434),o=i(18950),r=i(45490);const n=i(21371).F4`
|
|
2
|
+
50% {
|
|
3
|
+
color: rgba(0, 0, 0, 0);
|
|
4
|
+
}
|
|
5
|
+
`,a=(0,r.Z)("span",{target:"e1y2jo8h0"})((({includeDot:t,shouldBlink:e,theme:i})=>({...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:i.colors.gray,margin:"0 5px"}}:{},...e?{color:i.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=i(96266);const d=({dirty:t,value:e,maxLength:i,className:r,type:n="single"})=>{const d=[],h=(t,e=!1)=>{d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:e,children:t},d.length))};return t&&("multiline"===n?(0,s.Ge)()?h("Press \u2318+Enter to apply"):h("Press Ctrl+Enter to apply"):"single"===n&&h("Press Enter to apply")),i&&("chat"!==n||t)&&h(`${e.length}/${i}`,t&&e.length>=i),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:r,children:d})}},52775:(t,e,i)=>{i.r(e),i.d(e,{default:()=>D});var s=i(5057),o=i(52707),r=i(84332),n=i(59500),a=i(98209),l=i(95870),d=i(98927),h=i(4337),c=i(89401),u=i(87509),p=i(30124),m=i(53370),g=i(18950),b=i(46434),f=i(45490);const y=(0,f.Z)("div",{target:"ellz0s83"})((({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",borderWidth:"1px",borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.lg,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),""),x=(0,f.Z)("div",{target:"ellz0s82"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),v=(0,f.Z)("button",{target:"ellz0s81"})((({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.lg,borderBottomRightRadius:t.radii.lg},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),""),V=(0,f.Z)("div",{target:"ellz0s80"})((({theme:t})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:"64px"})),"");var w=i(96266);class C extends s.PureComponent{constructor(t){super(t),this.formClearHelper=new a.Kz,this.inputRef=s.createRef(),this.formatValue=t=>{const e=function(t){return null==t||""===t?void 0:t}(this.props.element.format);if(null==e)return t.toString();try{return(0,n.sprintf)(e,t)}catch(i){return(0,l.KE)(`Error in sprintf(${e}, ${t}): ${i}`),String(t)}},this.isIntData=()=>this.props.element.dataType===d.Y2.DataType.INT,this.getMin=()=>this.props.element.hasMin?this.props.element.min:-1/0,this.getMax=()=>this.props.element.hasMax?this.props.element.max:1/0,this.getStep=()=>{const{step:t}=this.props.element;return t||(this.isIntData()?1:.01)},this.commitWidgetValue=t=>{const{value:e}=this.state,{element:i,widgetMgr:s}=this.props,o=this.props.element,r=this.getMin(),n=this.getMax();if(r>e||e>n){const t=this.inputRef.current;t&&t.reportValidity()}else{const r=e||0===e?e:o.default;this.isIntData()?s.setIntValue(i,r,t):s.setDoubleValue(i,r,t),this.setState({dirty:!1,value:r,formattedValue:this.formatValue(r)})}},this.onFormCleared=()=>{this.setState(((t,e)=>({value:e.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0}),this.setState({isFocused:!1})},this.onFocus=()=>{this.setState({isFocused:!0})},this.onChange=t=>{const{value:e}=t.target;let i;i=this.isIntData()?parseInt(e,10):parseFloat(e),this.setState({dirty:!0,value:i,formattedValue:e})},this.onKeyDown=t=>{const{key:e}=t;switch(e){case"ArrowUp":t.preventDefault(),this.modifyValueUsingStep("increment")();break;case"ArrowDown":t.preventDefault(),this.modifyValueUsingStep("decrement")()}},this.onKeyPress=t=>{"Enter"===t.key&&this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.modifyValueUsingStep=t=>()=>{const{value:e}=this.state,i=this.getStep();switch(t){case"increment":this.canIncrement&&this.setState({dirty:!0,value:e+i},(()=>{this.commitWidgetValue({fromUi:!0})}));break;case"decrement":this.canDecrement&&this.setState({dirty:!0,value:e-i},(()=>{this.commitWidgetValue({fromUi:!0})}))}},this.state={dirty:!1,value:this.initialValue,formattedValue:this.formatValue(this.initialValue),isFocused:!1}}get initialValue(){const t=this.isIntData()?this.props.widgetMgr.getIntValue(this.props.element):this.props.widgetMgr.getDoubleValue(this.props.element);return void 0!==t?t:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:t,formattedValue:this.formatValue(t)},(()=>{this.commitWidgetValue({fromUi:!1})}))}get canDecrement(){return this.state.value-this.getStep()>=this.getMin()}get canIncrement(){return this.state.value+this.getStep()<=this.getMax()}render(){var t;const{element:e,width:i,disabled:s,widgetMgr:n}=this.props,{formattedValue:a,dirty:l,isFocused:d}=this.state,f={width:i},C=!this.canDecrement||s,D=!this.canIncrement||s;return this.formClearHelper.manageFormClearListener(n,e.formId,this.onFormCleared),(0,w.jsxs)("div",{className:"stNumberInput",style:f,children:[(0,w.jsx)(g.ON,{label:e.label,disabled:s,labelVisibility:(0,b.iF)(null===(t=e.labelVisibility)||void 0===t?void 0:t.value),children:e.help&&(0,w.jsx)(g.dT,{children:(0,w.jsx)(h.ZP,{content:e.help,placement:c.ug.TOP_RIGHT})})}),(0,w.jsxs)(y,{className:d?"focused":"",children:[(0,w.jsx)(p.Z,{type:"number",inputRef:this.inputRef,value:a,onBlur:this.onBlur,onFocus:this.onFocus,onChange:this.onChange,onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,disabled:s,"aria-label":e.label,overrides:{Input:{props:{step:this.getStep(),min:this.getMin(),max:this.getMax()},style:{lineHeight:"1.4",paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),(0,w.jsxs)(x,{children:[(0,w.jsx)(v,{className:"step-down",onClick:this.modifyValueUsingStep("decrement"),disabled:C,children:(0,w.jsx)(u.ZP,{content:o.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,w.jsx)(v,{className:"step-up",onClick:this.modifyValueUsingStep("increment"),disabled:D,children:(0,w.jsx)(u.ZP,{content:r.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),(0,w.jsx)(V,{children:(0,w.jsx)(m.Z,{dirty:l,value:a,className:"input-instructions"})})]})}}const D=C}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[291],{20291:(e,t,i)=>{i.r(t),i.d(t,{default:()=>p});var s=i(5057),o=i(98209),l=i(88707),a=i(46434),r=i(96266);class n extends s.PureComponent{constructor(...e){super(...e),this.formClearHelper=new o.Kz,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setIntValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.onChange=e=>{this.setState({value:e},(()=>this.commitWidgetValue({fromUi:!0})))}}get initialValue(){const e=this.props.widgetMgr.getIntValue(this.props.element);return void 0!==e?e:this.props.element.default}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:e},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){const{options:e,help:t,label:i,labelVisibility:s,formId:o}=this.props.element,{disabled:n,widgetMgr:p}=this.props;return this.formClearHelper.manageFormClearListener(p,o,this.onFormCleared),(0,r.jsx)(l.Z,{label:i,labelVisibility:(0,a.iF)(null===s||void 0===s?void 0:s.value),options:e,disabled:n,width:this.props.width,onChange:this.onChange,value:this.state.value,help:t})}}const p=n}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[3580],{83580:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var s=r(5057),a=r(98927),n=r(98093),i=r(96266);const l=528;function d({element:e,width:t,endpoints:r}){const d=(0,s.useRef)(null),{type:o,url:c}=e,u=(0,n.O0)(c);(0,s.useEffect)((()=>{const t=d.current,r=()=>{t&&(t.currentTime=e.startTime)};return t&&t.addEventListener("loadedmetadata",r),()=>{t&&t.removeEventListener("loadedmetadata",r)}}),[e]);const h=t=>{const{startTime:r}=e;return r?`${t}?start=${r}`:t};if(o===a.nk.Type.YOUTUBE_IFRAME){const e=0!==t?.75*t:l;return(0,i.jsx)("iframe",{title:u,src:h(u),width:t,height:e,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,i.jsx)("video",{ref:d,controls:!0,src:r.buildMediaURL(u),className:"stVideo",style:{width:t,height:0===t?l:void 0}})}}}]);
|