@stlite/desktop 0.25.0 → 0.26.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 +1 -1
- package/build/asset-manifest.json +150 -82
- package/build/index.html +1 -1
- package/build/static/css/3683.60b7ada4.chunk.css +1 -0
- package/build/static/css/4320.1edfa457.chunk.css +1 -0
- package/build/static/css/main.b43a24ba.css +1 -0
- package/build/static/js/1367.9dcea0bc.chunk.js +9 -0
- package/build/static/js/142.85e6074f.chunk.js +1 -0
- package/build/static/js/1579.10c95eae.chunk.js +1 -0
- package/build/static/js/1839.410079bf.chunk.js +1 -0
- package/build/static/js/2116.2e449b06.chunk.js +1 -0
- package/build/static/js/2458.cfb63c88.chunk.js +1 -0
- package/build/static/js/2523.7919ada5.chunk.js +5 -0
- package/build/static/js/2632.3ed5d578.chunk.js +1 -0
- package/build/static/js/277.fbace0b9.chunk.js +1 -0
- package/build/static/js/2909.783348bb.chunk.js +1 -0
- package/build/static/js/2961.e91b0c14.chunk.js +2 -0
- package/build/static/js/2961.e91b0c14.chunk.js.LICENSE.txt +45 -0
- package/build/static/js/3392.d73d4efc.chunk.js +1 -0
- package/build/static/js/3683.68da2452.chunk.js +1 -0
- package/build/static/js/3975.5538132d.chunk.js +1 -0
- package/build/static/js/3977.8a9ac9d7.chunk.js +1 -0
- package/build/static/js/4210.66c14600.chunk.js +1 -0
- package/build/static/js/4320.8fa60786.chunk.js +2 -0
- package/build/static/js/{7.e8b702b0.chunk.js.LICENSE.txt → 4320.8fa60786.chunk.js.LICENSE.txt} +2 -0
- package/build/static/js/4514.ff4d47b7.chunk.js +5 -0
- package/build/static/js/458.895bbb73.chunk.js +1 -0
- package/build/static/js/464.8a875fdd.chunk.js +1 -0
- package/build/static/js/4994.8f0118ec.chunk.js +1 -0
- package/build/static/js/5070.1d0d565e.chunk.js +1 -0
- package/build/static/js/5608.314b94e4.chunk.js +1 -0
- package/build/static/js/5678.b7f865a0.chunk.js +1 -0
- package/build/static/js/5752.d5d30939.chunk.js +1 -0
- package/build/static/js/5865.90a40692.chunk.js +17 -0
- package/build/static/js/6097.56c4b02a.chunk.js +1 -0
- package/build/static/js/6242.5e6f91ac.chunk.js +1 -0
- package/build/static/js/6391.6cdac98a.chunk.js +1 -0
- package/build/static/js/6422.f69a61a8.chunk.js +1 -0
- package/build/static/js/6449.702355ee.chunk.js +1 -0
- package/build/static/js/6668.8cb69721.chunk.js +2 -0
- package/build/static/js/{9.d99eed24.chunk.js.LICENSE.txt → 6668.8cb69721.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/6679.d28318d1.chunk.js +2 -0
- package/build/static/js/{18.b32ef4e7.chunk.js.LICENSE.txt → 6679.d28318d1.chunk.js.LICENSE.txt} +9 -9
- package/build/static/js/6865.b0803b6b.chunk.js +1 -0
- package/build/static/js/6928.228563da.chunk.js +2 -0
- package/build/static/js/{2.90589c59.chunk.js.LICENSE.txt → 6928.228563da.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/7135.57023452.chunk.js +1 -0
- package/build/static/js/7496.37614377.chunk.js +1 -0
- package/build/static/js/761.e16e6486.chunk.js +1 -0
- package/build/static/js/7698.095351a0.chunk.js +1 -0
- package/build/static/js/7842.a98fbb15.chunk.js +1 -0
- package/build/static/js/7858.fa281cb7.chunk.js +5 -0
- package/build/static/js/7937.a3bc5cdb.chunk.js +1 -0
- package/build/static/js/8355.7352ad1b.chunk.js +1 -0
- package/build/static/js/8461.87a9a578.chunk.js +1 -0
- package/build/static/js/8565.f27e3917.chunk.js +1 -0
- package/build/static/js/8910.e6dda87e.chunk.js +2 -0
- package/build/static/js/{15.b28e3a9f.chunk.js.LICENSE.txt → 8910.e6dda87e.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/91.f23bbeac.chunk.js +1 -0
- package/build/static/js/9462.6616e921.chunk.js +1 -0
- package/build/static/js/9551.e50bee9b.chunk.js +1 -0
- package/build/static/js/9733.aa290ea2.chunk.js +2 -0
- package/build/static/js/9733.aa290ea2.chunk.js.LICENSE.txt +10 -0
- package/build/static/js/9735.0e70600f.chunk.js +1 -0
- package/build/static/js/main.91a73418.js +28 -0
- package/build/static/js/{6.9c8c6dae.chunk.js.LICENSE.txt → main.91a73418.js.LICENSE.txt} +11 -66
- package/build/static/media/{KaTeX_AMS-Regular.73ea273a.woff2 → KaTeX_AMS-Regular.73ea273a72f4aca30ca5.woff2} +0 -0
- package/build/static/media/{KaTeX_AMS-Regular.853be924.ttf → KaTeX_AMS-Regular.853be92419a6c3766b9a.ttf} +0 -0
- package/build/static/media/{KaTeX_AMS-Regular.d562e886.woff → KaTeX_AMS-Regular.d562e886c52f12660a41.woff} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Bold.7489a2fb.ttf → KaTeX_Caligraphic-Bold.7489a2fbfb9bfe704420.ttf} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Bold.a1abf90d.woff2 → KaTeX_Caligraphic-Bold.a1abf90dfd72792a577a.woff2} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Bold.d757c535.woff → KaTeX_Caligraphic-Bold.d757c535a2e5902f1325.woff} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Regular.7e873d38.ttf → KaTeX_Caligraphic-Regular.7e873d3833eb108a0758.ttf} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Regular.d6484fce.woff2 → KaTeX_Caligraphic-Regular.d6484fce1ef428d5bd94.woff2} +0 -0
- package/build/static/media/{KaTeX_Caligraphic-Regular.db074fa2.woff → KaTeX_Caligraphic-Regular.db074fa22cf224af93d7.woff} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Bold.354501ba.woff → KaTeX_Fraktur-Bold.354501bac435c3264834.woff} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Bold.4c761b37.ttf → KaTeX_Fraktur-Bold.4c761b3711973ab04edf.ttf} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Bold.931d67ea.woff2 → KaTeX_Fraktur-Bold.931d67ea207ab37ee693.woff2} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Regular.172d3529.woff2 → KaTeX_Fraktur-Regular.172d3529b26f8cedef6b.woff2} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Regular.6fdf0ac5.woff → KaTeX_Fraktur-Regular.6fdf0ac577be0ba82a4c.woff} +0 -0
- package/build/static/media/{KaTeX_Fraktur-Regular.ed305b54.ttf → KaTeX_Fraktur-Regular.ed305b5434865e06ffde.ttf} +0 -0
- package/build/static/media/{KaTeX_Main-Bold.0c3b8929.woff → KaTeX_Main-Bold.0c3b8929d377c0e9b2f3.woff} +0 -0
- package/build/static/media/{KaTeX_Main-Bold.39890742.woff2 → KaTeX_Main-Bold.39890742bc957b368704.woff2} +0 -0
- package/build/static/media/{KaTeX_Main-Bold.8169508b.ttf → KaTeX_Main-Bold.8169508bf58f8bd92ad8.ttf} +0 -0
- package/build/static/media/{KaTeX_Main-BoldItalic.20f389c4.woff2 → KaTeX_Main-BoldItalic.20f389c4120be058d80a.woff2} +0 -0
- package/build/static/media/{KaTeX_Main-BoldItalic.428978dc.woff → KaTeX_Main-BoldItalic.428978dc7837d46de091.woff} +0 -0
- package/build/static/media/{KaTeX_Main-BoldItalic.828abcb2.ttf → KaTeX_Main-BoldItalic.828abcb200061cffbaae.ttf} +0 -0
- package/build/static/media/{KaTeX_Main-Italic.fa675e5e.ttf → KaTeX_Main-Italic.fa675e5e4bec9eb250b6.ttf} +0 -0
- package/build/static/media/{KaTeX_Main-Italic.fd947498.woff → KaTeX_Main-Italic.fd947498bc16392e76c2.woff} +0 -0
- package/build/static/media/{KaTeX_Main-Italic.fe2176f7.woff2 → KaTeX_Main-Italic.fe2176f79edaa716e621.woff2} +0 -0
- package/build/static/media/{KaTeX_Main-Regular.4f35fbcc.woff → KaTeX_Main-Regular.4f35fbcc9ee8614c2bcc.woff} +0 -0
- package/build/static/media/{KaTeX_Main-Regular.9eba1d77.ttf → KaTeX_Main-Regular.9eba1d77abcf2aa6e94e.ttf} +0 -0
- package/build/static/media/{KaTeX_Main-Regular.f650f111.woff2 → KaTeX_Main-Regular.f650f111a3b890d116f1.woff2} +0 -0
- package/build/static/media/{KaTeX_Math-BoldItalic.3f07ed67.woff → KaTeX_Math-BoldItalic.3f07ed67f06c720120ce.woff} +0 -0
- package/build/static/media/{KaTeX_Math-BoldItalic.bf2d440b.ttf → KaTeX_Math-BoldItalic.bf2d440b3a42ea78a998.ttf} +0 -0
- package/build/static/media/{KaTeX_Math-BoldItalic.dcbcbd93.woff2 → KaTeX_Math-BoldItalic.dcbcbd93bac0470b462d.woff2} +0 -0
- package/build/static/media/{KaTeX_Math-Italic.6d3d25f4.woff2 → KaTeX_Math-Italic.6d3d25f4820d0da8f01f.woff2} +0 -0
- package/build/static/media/{KaTeX_Math-Italic.8a5f9363.ttf → KaTeX_Math-Italic.8a5f936332e8028c7278.ttf} +0 -0
- package/build/static/media/{KaTeX_Math-Italic.96759856.woff → KaTeX_Math-Italic.96759856b4e70f3a8338.woff} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Bold.5b49f499.ttf → KaTeX_SansSerif-Bold.5b49f4993ae22d7975b4.ttf} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Bold.95591a92.woff2 → KaTeX_SansSerif-Bold.95591a929f0d32aa282a.woff2} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Bold.b9cd458a.woff → KaTeX_SansSerif-Bold.b9cd458ac6d5889ff9c3.woff} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Italic.7d393d38.woff2 → KaTeX_SansSerif-Italic.7d393d382f3e7fb1c637.woff2} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Italic.8d593cfa.woff → KaTeX_SansSerif-Italic.8d593cfaa96238d5e2f8.woff} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Italic.b257a18c.ttf → KaTeX_SansSerif-Italic.b257a18c016f37ee4543.ttf} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Regular.02271ec5.woff → KaTeX_SansSerif-Regular.02271ec5cb9f5b4588ac.woff} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Regular.2f7bc363.ttf → KaTeX_SansSerif-Regular.2f7bc363fc5424ebda59.ttf} +0 -0
- package/build/static/media/{KaTeX_SansSerif-Regular.cd5e231e.woff2 → KaTeX_SansSerif-Regular.cd5e231e0cc53b2cb2c0.woff2} +0 -0
- package/build/static/media/{KaTeX_Script-Regular.073b3402.woff → KaTeX_Script-Regular.073b3402d036714b4370.woff} +0 -0
- package/build/static/media/{KaTeX_Script-Regular.c81d1b2a.woff2 → KaTeX_Script-Regular.c81d1b2a4b75d3eded60.woff2} +0 -0
- package/build/static/media/{KaTeX_Script-Regular.fc9ba524.ttf → KaTeX_Script-Regular.fc9ba5249878cd8f8d88.ttf} +0 -0
- package/build/static/media/{KaTeX_Size1-Regular.0108e89c.woff → KaTeX_Size1-Regular.0108e89c9003e8c14ea3.woff} +0 -0
- package/build/static/media/{KaTeX_Size1-Regular.6de7d4b5.ttf → KaTeX_Size1-Regular.6de7d4b539221a49e9e2.ttf} +0 -0
- package/build/static/media/{KaTeX_Size1-Regular.6eec866c.woff2 → KaTeX_Size1-Regular.6eec866c69313624be60.woff2} +0 -0
- package/build/static/media/{KaTeX_Size2-Regular.2960900c.woff2 → KaTeX_Size2-Regular.2960900c4f271311eb36.woff2} +0 -0
- package/build/static/media/{KaTeX_Size2-Regular.3a99e70a.woff → KaTeX_Size2-Regular.3a99e70aee4076660d38.woff} +0 -0
- package/build/static/media/{KaTeX_Size2-Regular.57f5c183.ttf → KaTeX_Size2-Regular.57f5c1837853986ea1db.ttf} +0 -0
- package/build/static/media/{KaTeX_Size3-Regular.7947224e.woff → KaTeX_Size3-Regular.7947224e8a9914fa332b.woff} +0 -0
- package/build/static/media/{KaTeX_Size3-Regular.8d6b6822.ttf → KaTeX_Size3-Regular.8d6b6822586eea3d3b20.ttf} +0 -0
- package/build/static/media/{KaTeX_Size3-Regular.e1951519.woff2 → KaTeX_Size3-Regular.e1951519f6f0596f7356.woff2} +0 -0
- package/build/static/media/{KaTeX_Size4-Regular.4ad7c7e8.ttf → KaTeX_Size4-Regular.4ad7c7e8bb8d10a34bb7.ttf} +0 -0
- package/build/static/media/{KaTeX_Size4-Regular.aeffd802.woff → KaTeX_Size4-Regular.aeffd8025cba3647f1a6.woff} +0 -0
- package/build/static/media/{KaTeX_Size4-Regular.e418bf25.woff2 → KaTeX_Size4-Regular.e418bf257af1052628d8.woff2} +0 -0
- package/build/static/media/{KaTeX_Typewriter-Regular.4c6b94fd.woff → KaTeX_Typewriter-Regular.4c6b94fd1d07f8beff7c.woff} +0 -0
- package/build/static/media/{KaTeX_Typewriter-Regular.c295e7f7.woff2 → KaTeX_Typewriter-Regular.c295e7f71970f03c0549.woff2} +0 -0
- package/build/static/media/{KaTeX_Typewriter-Regular.c5c02d76.ttf → KaTeX_Typewriter-Regular.c5c02d763c89380dcb4e.ttf} +0 -0
- package/build/static/media/{SourceCodePro-Bold.52ac8f30.ttf → SourceCodePro-Bold.52ac8f3034507f1d9e53.ttf} +0 -0
- package/build/static/media/{SourceCodePro-BoldItalic.05b61807.ttf → SourceCodePro-BoldItalic.05b618077343fbbd92b7.ttf} +0 -0
- package/build/static/media/{SourceCodePro-Italic.454577c2.ttf → SourceCodePro-Italic.454577c22304619db035.ttf} +0 -0
- package/build/static/media/{SourceCodePro-Regular.70cc7ff2.ttf → SourceCodePro-Regular.70cc7ff27245e82ad414.ttf} +0 -0
- package/build/static/media/{SourceCodePro-SemiBold.4d4c53c0.ttf → SourceCodePro-SemiBold.4d4c53c06b5bebed1cf3.ttf} +0 -0
- package/build/static/media/{SourceCodePro-SemiBoldItalic.2f5470bc.ttf → SourceCodePro-SemiBoldItalic.2f5470bc8b2cd27a5c4b.ttf} +0 -0
- package/build/static/media/{SourceSansPro-Bold.12e6acd2.ttf → SourceSansPro-Bold.12e6acd2589d00c9d0aa.ttf} +0 -0
- package/build/static/media/{SourceSansPro-BoldItalic.7c4f9b00.ttf → SourceSansPro-BoldItalic.7c4f9b00300acb82f0f6.ttf} +0 -0
- package/build/static/media/{SourceSansPro-Italic.3c01996d.ttf → SourceSansPro-Italic.3c01996d38a55834ddcb.ttf} +0 -0
- package/build/static/media/{SourceSansPro-Regular.efa76f83.ttf → SourceSansPro-Regular.efa76f8326aa5cee3bdd.ttf} +0 -0
- package/build/static/media/{SourceSansPro-SemiBold.43cc81b4.ttf → SourceSansPro-SemiBold.43cc81b496222dc9ce3c.ttf} +0 -0
- package/build/static/media/{SourceSansPro-SemiBoldItalic.c30987e2.ttf → SourceSansPro-SemiBoldItalic.c30987e28fc21daba1ae.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-Bold.bada4fe1.ttf → SourceSerifPro-Bold.bada4fe17051c992f22f.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-BoldItalic.9f9b1eb2.ttf → SourceSerifPro-BoldItalic.9f9b1eb2d82e26bb2f4a.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-Italic.90931d6a.ttf → SourceSerifPro-Italic.90931d6ad253cd8de8e4.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-Regular.6f22301c.ttf → SourceSerifPro-Regular.6f22301c30206f4bad62.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-SemiBold.b27cb117.ttf → SourceSerifPro-SemiBold.b27cb117978bab2c80a3.ttf} +0 -0
- package/build/static/media/{SourceSerifPro-SemiBoldItalic.1266f2c1.ttf → SourceSerifPro-SemiBoldItalic.1266f2c17835efdcff7b.ttf} +0 -0
- package/build/static/media/{balloon-0.0e6e96ec.png → balloon-0.0e6e96ece0ea0719d6b6.png} +0 -0
- package/build/static/media/{balloon-1.a503c271.png → balloon-1.a503c271109e9a0fdd2d.png} +0 -0
- package/build/static/media/{balloon-2.872250f3.png → balloon-2.872250f3bf3a8965d655.png} +0 -0
- package/build/static/media/{balloon-3.e772fafd.png → balloon-3.e772fafd3bfc55fb439b.png} +0 -0
- package/build/static/media/{balloon-4.1a741624.png → balloon-4.1a74162473d81c9cb9ee.png} +0 -0
- package/build/static/media/{balloon-5.edb75c74.png → balloon-5.edb75c74c54165b29856.png} +0 -0
- package/build/static/media/{fireworks.0906f02e.gif → fireworks.0906f02ea43f1018a6d2.gif} +0 -0
- package/build/static/media/{flake-0.beded754.png → flake-0.beded754e8024c73d9d2.png} +0 -0
- package/build/static/media/{flake-1.8077dc15.png → flake-1.8077dc154e0bf900aa73.png} +0 -0
- package/build/static/media/{flake-2.e3f07d06.png → flake-2.e3f07d06933dd0e84c24.png} +0 -0
- package/build/static/media/{icon_running.de1119da.gif → icon_running.de1119daebe465fa5263.gif} +0 -0
- package/build/static/media/index.09797f5e19b3c0491904.cjs +1 -0
- package/build/static/media/index.1e3d64b0fcde879f0060.cjs +1 -0
- package/build/static/media/index.294a0edb7af7d19b781b.cjs +1 -0
- package/build/static/media/index.85823dd8655ed4119d0c.cjs +1 -0
- package/build/static/media/index.b599194a631d76b49328.cjs +1 -0
- package/package.json +12 -11
- package/build/static/css/6.69790b96.chunk.css +0 -1
- package/build/static/css/7.3d0f8b8b.chunk.css +0 -1
- package/build/static/css/9.f71f4f0d.chunk.css +0 -1
- package/build/static/css/main.7bc75681.chunk.css +0 -1
- package/build/static/js/0.1470a040.chunk.js +0 -1
- package/build/static/js/1.75536554.chunk.js +0 -1
- package/build/static/js/10.e9d08ce6.chunk.js +0 -1
- package/build/static/js/11.245d6c33.chunk.js +0 -9
- package/build/static/js/12.a31ecc8c.chunk.js +0 -17
- package/build/static/js/13.6a2e32ae.chunk.js +0 -1
- package/build/static/js/14.1655f4db.chunk.js +0 -1
- package/build/static/js/15.b28e3a9f.chunk.js +0 -2
- package/build/static/js/16.4002de21.chunk.js +0 -1
- package/build/static/js/17.f01379ea.chunk.js +0 -1
- package/build/static/js/18.b32ef4e7.chunk.js +0 -2
- package/build/static/js/19.757ce6cd.chunk.js +0 -1
- package/build/static/js/2.90589c59.chunk.js +0 -2
- package/build/static/js/20.06333e7b.chunk.js +0 -1
- package/build/static/js/21.3fab05ae.chunk.js +0 -5
- package/build/static/js/22.a1775ac4.chunk.js +0 -1
- package/build/static/js/23.fd21f92a.chunk.js +0 -1
- package/build/static/js/24.50f424ba.chunk.js +0 -5
- package/build/static/js/25.3855f89c.chunk.js +0 -1
- package/build/static/js/26.5f51a172.chunk.js +0 -1
- package/build/static/js/27.f075da8f.chunk.js +0 -1
- package/build/static/js/28.e76203d9.chunk.js +0 -5
- package/build/static/js/29.12291bff.chunk.js +0 -1
- package/build/static/js/3.8dacc9e7.chunk.js +0 -1
- package/build/static/js/30.9780f1e6.chunk.js +0 -1
- package/build/static/js/31.622e28f6.chunk.js +0 -1
- package/build/static/js/32.44bddfd2.chunk.js +0 -1
- package/build/static/js/33.e3480cb9.chunk.js +0 -1
- package/build/static/js/34.4e913e44.chunk.js +0 -1
- package/build/static/js/35.d8c3a90e.chunk.js +0 -1
- package/build/static/js/36.d7336b9b.chunk.js +0 -1
- package/build/static/js/37.b06f1532.chunk.js +0 -1
- package/build/static/js/38.2303d913.chunk.js +0 -1
- package/build/static/js/39.9cb4bae4.chunk.js +0 -1
- package/build/static/js/40.b8f90b9a.chunk.js +0 -1
- package/build/static/js/41.bb169dbf.chunk.js +0 -1
- package/build/static/js/42.e8639ee2.chunk.js +0 -1
- package/build/static/js/43.b5e07f4c.chunk.js +0 -1
- package/build/static/js/44.0206e0dc.chunk.js +0 -1
- package/build/static/js/45.db4595ee.chunk.js +0 -1
- package/build/static/js/46.f534e5a2.chunk.js +0 -1
- package/build/static/js/47.89ae0b12.chunk.js +0 -1
- package/build/static/js/48.86b245a1.chunk.js +0 -1
- package/build/static/js/49.1db19a37.chunk.js +0 -1
- package/build/static/js/6.9c8c6dae.chunk.js +0 -2
- package/build/static/js/7.e8b702b0.chunk.js +0 -2
- package/build/static/js/8.348fb43a.chunk.js +0 -2
- package/build/static/js/8.348fb43a.chunk.js.LICENSE.txt +0 -1
- package/build/static/js/9.d99eed24.chunk.js +0 -2
- package/build/static/js/main.f1cf2dec.chunk.js +0 -27
- package/build/static/js/runtime-main.e5a1f36a.js +0 -1
package/build/static/js/{2.90589c59.chunk.js.LICENSE.txt → 6928.228563da.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7135],{97135:(e,r,t)=>{t.d(r,{Z:()=>M});var o=t(5057),n=t(80099),i=t(18150),a=t(4547),l=t(91224),s=t(53381),u=t(44769),c=["title","size","color","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},p.apply(this,arguments)}function d(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function f(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var o,n,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(o=t.next()).done)&&(i.push(o.value),!r||i.length!==r);a=!0);}catch(s){l=!0,n=s}finally{try{a||null==t.return||t.return()}finally{if(l)throw n}}return i}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return b(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(e,r)}(e,r)||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 b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function y(e,r){var t=f((0,s.hQ)(),2)[1],i=e.title,a=void 0===i?"Hide":i,l=e.size,b=e.color,y=e.overrides,h=void 0===y?{}:y,g=d(e,c),m=(0,n.vt)({component:t.icons&&t.icons.Hide?t.icons.Hide:null},h&&h.Svg?(0,n.hq)(h.Svg):{});return o.createElement(u.Z,p({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:b,overrides:{Svg:m}},g),o.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const h=o.forwardRef(y);var g=["title","size","color","overrides"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},m.apply(this,arguments)}function v(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function O(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var o,n,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(o=t.next()).done)&&(i.push(o.value),!r||i.length!==r);a=!0);}catch(s){l=!0,n=s}finally{try{a||null==t.return||t.return()}finally{if(l)throw n}}return i}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return C(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(e,r)}(e,r)||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 C(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function w(e,r){var t=O((0,s.hQ)(),2)[1],i=e.title,a=void 0===i?"Show":i,l=e.size,c=e.color,p=e.overrides,d=void 0===p?{}:p,f=v(e,g),b=(0,n.vt)({component:t.icons&&t.icons.Show?t.icons.Show:null},d&&d.Svg?(0,n.hq)(d.Svg):{});return o.createElement(u.Z,m({viewBox:"0 0 20 20",ref:r,title:a,size:l,color:c,overrides:{Svg:b}},f),o.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const F=o.forwardRef(w);var k=t(94253);function S(e){return S="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},S(e)}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},j.apply(this,arguments)}function x(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var o,n,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(o=t.next()).done)&&(i.push(o.value),!r||i.length!==r);a=!0);}catch(s){l=!0,n=s}finally{try{a||null==t.return||t.return()}finally{if(l)throw n}}return i}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return T(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T(e,r)}(e,r)||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 T(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}function P(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,r){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},R(e,r)}function B(e){var r=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 t,o=z(e);if(r){var n=z(this).constructor;t=Reflect.construct(o,arguments,n)}else t=o.apply(this,arguments);return function(e,r){if(r&&("object"===S(r)||"function"===typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,t)}}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function $(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var I=function(){return null},N=function(e){!function(e,r){if("function"!==typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&R(e,r)}(c,e);var r,t,s,u=B(c);function c(){var e;!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,c);for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return $(E(e=u.call.apply(u,[this].concat(t))),"inputRef",e.props.inputRef||o.createRef()),$(E(e),"state",{isFocused:e.props.autoFocus||!1,isMasked:"password"===e.props.type,initialType:e.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),$(E(e),"onInputKeyDown",(function(r){e.props.clearOnEscape&&"Escape"===r.key&&e.inputRef.current&&!e.props.readOnly&&(e.clearValue(),r.stopPropagation())})),$(E(e),"onClearIconClick",(function(){e.inputRef.current&&e.clearValue(),e.inputRef.current&&e.inputRef.current.focus()})),$(E(e),"onFocus",(function(r){e.setState({isFocused:!0}),e.props.onFocus(r)})),$(E(e),"onBlur",(function(r){e.setState({isFocused:!1}),e.props.onBlur(r)})),$(E(e),"handleFocusForMaskToggle",(function(r){(0,k.E)(r)&&e.setState({isFocusVisibleForMaskToggle:!0})})),$(E(e),"handleBlurForMaskToggle",(function(r){!1!==e.state.isFocusVisibleForMaskToggle&&e.setState({isFocusVisibleForMaskToggle:!1})})),$(E(e),"handleFocusForClear",(function(r){(0,k.E)(r)&&e.setState({isFocusVisibleForClear:!0})})),$(E(e),"handleBlurForClear",(function(r){!1!==e.state.isFocusVisibleForClear&&e.setState({isFocusVisibleForClear:!1})})),e}return r=c,(t=[{key:"componentDidMount",value:function(){var e=this.props,r=e.autoFocus,t=e.clearable;this.inputRef.current&&(r&&this.inputRef.current.focus(),t&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){this.props.clearable&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var e=this.inputRef.current;if(e){var r=Object.getOwnPropertyDescriptor(this.props.type===i.iB.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(r){var t=r.set;if(t){t.call(e,"");var o=function(e){var r;return"function"===typeof window.Event?r=new window.Event(e,{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event")).initEvent(e,!0,!0),r}("input");e.dispatchEvent(o)}}}}},{key:"getInputType",value:function(){return"password"===this.props.type?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var e,r=this;if("password"!==this.props.type)return null;var t=x((0,n.jb)(this.props.overrides.MaskToggleButton,a.ac),2),l=t[0],s=t[1],u=x((0,n.jb)(this.props.overrides.MaskToggleShowIcon,F),2),c=u[0],p=u[1],d=x((0,n.jb)(this.props.overrides.MaskToggleHideIcon,h),2),f=d[0],b=d[1],y=this.state.isMasked?"Show password text":"Hide password text",g=(e={},$(e,i.NO.mini,"12px"),$(e,i.NO.compact,"16px"),$(e,i.NO.default,"20px"),$(e,i.NO.large,"24px"),e)[this.props.size];return o.createElement(l,j({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":y,onClick:function(){return r.setState((function(e){return{isMasked:!e.isMasked}}))},title:y,type:"button"},s,{onFocus:(0,k.Ah)(s,this.handleFocusForMaskToggle),onBlur:(0,k.Z5)(s,this.handleBlurForMaskToggle)}),this.state.isMasked?o.createElement(c,j({size:g,title:y},p)):o.createElement(f,j({size:g,title:y},b)))}},{key:"renderClear",value:function(){var e,r=this,t=this.props,s=t.clearable,u=t.value,c=t.disabled,p=t.readOnly,d=t.overrides,f=void 0===d?{}:d;if(c||p||!s||null==u||"string"===typeof u&&0===u.length)return null;var b=x((0,n.jb)(f.ClearIconContainer,a.Er),2),y=b[0],h=b[1],g=x((0,n.jb)(f.ClearIcon,a.i),2),m=g[0],v=g[1],O="Clear value",C=(0,l.t)(this.props,this.state),w=(e={},$(e,i.NO.mini,"14px"),$(e,i.NO.compact,"14px"),$(e,i.NO.default,"16px"),$(e,i.NO.large,"22px"),e)[this.props.size];return o.createElement(y,j({$alignTop:this.props.type===i.iB.textarea},C,h),o.createElement(m,j({size:w,tabIndex:0,title:O,"aria-label":O,onClick:this.onClearIconClick,onKeyDown:function(e){!e.key||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},C,v,{onFocus:(0,k.Ah)(v,this.handleFocusForClear),onBlur:(0,k.Z5)(v,this.handleBlurForClear)})))}},{key:"render",value:function(){var e=this.props.overrides,r=e.InputContainer,t=e.Input,s=e.Before,u=e.After,p="password"===this.state.initialType&&this.props.autoComplete===c.defaultProps.autoComplete?"new-password":this.props.autoComplete,d=(0,l.t)(this.props,this.state),f=x((0,n.jb)(r,a.fv),2),b=f[0],y=f[1],h=x((0,n.jb)(t,a.II),2),g=h[0],m=h[1],v=x((0,n.jb)(s,I),2),O=v[0],C=v[1],w=x((0,n.jb)(u,I),2),F=w[0],k=w[1];return o.createElement(b,j({"data-baseweb":this.props["data-baseweb"]||"base-input"},d,y),o.createElement(O,j({},d,C)),o.createElement(g,j({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:p,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===i.iB.textarea?this.props.rows:null},d,m)),this.renderClear(),this.renderMaskToggle(),o.createElement(F,j({},d,k)))}}])&&P(r.prototype,t),s&&P(r,s),Object.defineProperty(r,"prototype",{writable:!1}),c}(o.Component);$(N,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:i.y4.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:i.NO.default,type:"text",readOnly:!1});const M=N},4547:(e,r,t)=>{t.d(r,{Er:()=>c,Fp:()=>y,Hx:()=>m,II:()=>v,ac:()=>u,d5:()=>f,fC:()=>b,fv:()=>g,hB:()=>h,i:()=>p});var o=t(53381),n=t(18150),i=t(5722);function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var u=(0,o.zo)("button",(function(e){var r,t=e.$theme,o=e.$size,i=e.$isFocusVisible,a=(r={},s(r,n.NO.mini,t.sizing.scale400),s(r,n.NO.compact,t.sizing.scale400),s(r,n.NO.default,t.sizing.scale300),s(r,n.NO.large,t.sizing.scale200),r)[o];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:a,paddingRight:a,outline:i?"solid 3px ".concat(t.colors.accent):"none",color:t.colors.contentPrimary}}));u.displayName="StyledMaskToggleButton",u.displayName="StyledMaskToggleButton";var c=(0,o.zo)("div",(function(e){var r,t=e.$alignTop,o=void 0!==t&&t,i=e.$size,a=e.$theme,l=(r={},s(r,n.NO.mini,a.sizing.scale200),s(r,n.NO.compact,a.sizing.scale200),s(r,n.NO.default,a.sizing.scale100),s(r,n.NO.large,a.sizing.scale0),r)[i];return{display:"flex",alignItems:o?"flex-start":"center",paddingLeft:l,paddingRight:l,paddingTop:o?a.sizing.scale500:"0px",color:a.colors.contentPrimary}}));c.displayName="StyledClearIconContainer",c.displayName="StyledClearIconContainer";var p=(0,o.zo)(i.Z,(function(e){var r=e.$theme;return{cursor:"pointer",outline:e.$isFocusVisible?"solid 3px ".concat(r.colors.accent):"none"}}));function d(e,r){var t;return(t={},s(t,n.NO.mini,r.font100),s(t,n.NO.compact,r.font200),s(t,n.NO.default,r.font300),s(t,n.NO.large,r.font400),t)[e]}p.displayName="StyledClearIcon",p.displayName="StyledClearIcon";var f=function(e){var r=e.$isFocused,t=e.$adjoined,o=e.$error,i=e.$disabled,a=e.$positive,s=e.$size,u=e.$theme,c=e.$theme,p=c.borders,f=c.colors,b=c.sizing,y=c.typography,h=c.animation,g=e.$hasIconTrailing;return l(l(l(l({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:h.timing200,transitionTimingFunction:h.easeOutCurve},function(e,r){var t=r.inputBorderRadius;return e===n.NO.mini&&(t=r.inputBorderRadiusMini),{borderTopLeftRadius:t,borderBottomLeftRadius:t,borderTopRightRadius:t,borderBottomRightRadius:t}}(s,p)),d(s,y)),function(e,r,t){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:n.inputFillDisabled,borderRightColor:n.inputFillDisabled,borderTopColor:n.inputFillDisabled,borderBottomColor:n.inputFillDisabled,backgroundColor:n.inputFillDisabled}:r?{borderLeftColor:n.borderSelected,borderRightColor:n.borderSelected,borderTopColor:n.borderSelected,borderBottomColor:n.borderSelected,backgroundColor:n.inputFillActive}:t?{borderLeftColor:n.inputBorderError,borderRightColor:n.inputBorderError,borderTopColor:n.inputBorderError,borderBottomColor:n.inputBorderError,backgroundColor:n.inputFillError}:o?{borderLeftColor:n.inputBorderPositive,borderRightColor:n.inputBorderPositive,borderTopColor:n.inputBorderPositive,borderBottomColor:n.inputBorderPositive,backgroundColor:n.inputFillPositive}:{borderLeftColor:n.inputBorder,borderRightColor:n.inputBorder,borderTopColor:n.inputBorder,borderBottomColor:n.inputBorder,backgroundColor:n.inputFill}}(i,r,o,a,f)),function(e,r,t,o,i){var a=e===n.y4.both||e===n.y4.left&&"rtl"!==o||e===n.y4.right&&"rtl"===o||i&&"rtl"===o,l=e===n.y4.both||e===n.y4.right&&"rtl"!==o||e===n.y4.left&&"rtl"===o||i&&"rtl"!==o;return{paddingLeft:a?t.scale550:"0px",paddingRight:l?t.scale550:"0px"}}(t,0,b,u.direction,g))},b=(0,o.zo)("div",f);b.displayName="Root",b.displayName="Root";var y=(0,o.zo)("div",(function(e){var r=e.$size,t=e.$disabled,o=e.$isFocused,i=e.$error,a=e.$positive,u=e.$theme,c=u.colors,p=u.sizing,f=u.typography,b=u.animation;return l(l(l({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:b.timing200,transitionTimingFunction:b.easeOutCurve},d(r,f)),function(e,r){var t;return(t={},s(t,n.NO.mini,{paddingRight:r.scale400,paddingLeft:r.scale400}),s(t,n.NO.compact,{paddingRight:r.scale400,paddingLeft:r.scale400}),s(t,n.NO.default,{paddingRight:r.scale300,paddingLeft:r.scale300}),s(t,n.NO.large,{paddingRight:r.scale200,paddingLeft:r.scale200}),t)[e]}(r,p)),function(e,r,t,o,n){return e?{color:n.inputEnhancerTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(t,o,i,a,c))}));y.displayName="InputEnhancer",y.displayName="InputEnhancer";var h=function(e){var r=e.$isFocused,t=e.$error,o=e.$disabled,n=e.$positive,i=e.$size,a=e.$theme,s=a.colors,u=a.typography,c=a.animation;return l(l({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:c.timing200,transitionTimingFunction:c.easeOutCurve},d(i,u)),function(e,r,t,o,n){return e?{color:n.inputTextDisabled,backgroundColor:n.inputFillDisabled}:r?{color:n.contentPrimary,backgroundColor:n.inputFillActive}:t?{color:n.contentPrimary,backgroundColor:n.inputFillError}:o?{color:n.contentPrimary,backgroundColor:n.inputFillPositive}:{color:n.contentPrimary,backgroundColor:n.inputFill}}(o,r,t,n,s))},g=(0,o.zo)("div",h);g.displayName="InputContainer",g.displayName="InputContainer";var m=function(e){var r=e.$disabled,t=(e.$isFocused,e.$error,e.$size),o=e.$theme,i=o.colors,a=o.sizing;return l(l(l({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},d(t,o.typography)),function(e,r){var t;return(t={},s(t,n.NO.mini,{paddingTop:r.scale100,paddingBottom:r.scale100,paddingLeft:r.scale550,paddingRight:r.scale550}),s(t,n.NO.compact,{paddingTop:r.scale200,paddingBottom:r.scale200,paddingLeft:r.scale550,paddingRight:r.scale550}),s(t,n.NO.default,{paddingTop:r.scale400,paddingBottom:r.scale400,paddingLeft:r.scale550,paddingRight:r.scale550}),s(t,n.NO.large,{paddingTop:r.scale550,paddingBottom:r.scale550,paddingLeft:r.scale550,paddingRight:r.scale550}),t)[e]}(t,a)),function(e,r,t,o){return e?{color:o.inputTextDisabled,"-webkit-text-fill-color":o.inputTextDisabled,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholderDisabled}}:{color:o.contentPrimary,caretColor:o.contentPrimary,"::placeholder":{color:o.inputPlaceholder}}}(r,0,0,i))},v=(0,o.zo)("input",m);v.displayName="Input",v.displayName="Input"},91224:(e,r,t)=>{function o(e,r){var t=e.disabled,o=e.error,n=e.positive,i=e.adjoined,a=e.size,l=e.required,s=e.resize,u=e.readOnly;return{$isFocused:r.isFocused,$disabled:t,$error:o,$positive:n,$adjoined:i,$size:a,$required:l,$resize:s,$isReadOnly:u}}t.d(r,{t:()=>o})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7496],{77390:(e,t,s)=>{s.d(t,{$:()=>c,Z:()=>h});var i=s(5057),r=s(31476),o=s(85493),n=s(99362),a=s(16449),l=s(80099),d=s(96266);let c;!function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"}(c||(c={}));const h=function({value:e,width:t,size:s=c.SMALL,overrides:h}){const g=(0,r.u)(),u={xs:g.spacing.twoXS,sm:g.spacing.sm,md:g.spacing.lg,lg:g.spacing.xl,xl:g.spacing.twoXL},{activeTheme:p}=i.useContext(o.Z),m=!(0,n.MJ)(p),f={BarContainer:{style:{marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none}},Bar:{style:({$theme:e})=>({width:t?t.toString():void 0,marginTop:g.spacing.none,marginBottom:g.spacing.none,marginRight:g.spacing.none,marginLeft:g.spacing.none,height:u[s],backgroundColor:e.colors.progressbarTrackFill,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})},BarProgress:{style:({$theme:e})=>({backgroundColor:m?g.colors.primary:g.colors.blue70,borderTopLeftRadius:g.spacing.twoXS,borderTopRightRadius:g.spacing.twoXS,borderBottomLeftRadius:g.spacing.twoXS,borderBottomRightRadius:g.spacing.twoXS})}};return(0,d.jsx)(a.Z,{value:e,overrides:(0,l.aO)(f,h)})}},77496:(e,t,s)=>{s.r(t),s.d(t,{default:()=>q});var i,r=s(30967),o=s(10458),n=s.n(o),a=s(65873),l=s.n(a),d=s(5057),c=s(32291),h=s(97292),g=s(54840),u=s(8429),p=s(86964),m=s(56846),f=s(52801),S=s(34422),w=s(41605),x=s(77390),R=s(45490),b=s(59990);function F(e,t){switch(e){case i.XSMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.sm}`,fontSize:t.fontSizes.sm};case i.SMALL:return{padding:`${t.spacing.twoXS} ${t.spacing.md}`};case i.LARGE:return{padding:`${t.spacing.md} ${t.spacing.md}`};default:return{padding:`${t.spacing.xs} ${t.spacing.md}`}}}!function(e){e.XSMALL="xsmall",e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(i||(i={}));const C=(0,R.Z)("div",{target:"ejtjsn29"})((({theme:e,width:t})=>({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"})),""),j=(0,R.Z)("div",{target:"ejtjsn28"})((({theme:e,width:t})=>({backgroundColor:e.colors.secondaryBg,borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,width:"100%",height:9*t/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),""),I=(0,R.Z)("p",{target:"ejtjsn27"})((({theme:e})=>({marginTop:e.spacing.sm,textAlign:"center"})),""),v=(0,R.Z)("img",{target:"ejtjsn26"})((({theme:e,opacity:t})=>({borderRadius:`${e.radii.md} ${e.radii.md} 0 0`,objectFit:"contain",opacity:t})),""),E=(0,R.Z)("a",{target:"ejtjsn25"})((({theme:e})=>({color:e.colors.primary,display:"block",textDecoration:"none"})),""),T=(0,R.Z)("span",{target:"ejtjsn24"})((({theme:e})=>({display:"flex",alignItems:"center"})),""),M=(0,R.Z)("div",{target:"ejtjsn23"})((({theme:e})=>({position:"absolute",top:e.spacing.lg,right:e.spacing.lg,zIndex:1,color:e.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),""),P=(0,R.Z)("div",{target:"ejtjsn21"})((({theme:e})=>({height:"fit-content",width:"100%",position:"absolute",bottom:0})),""),y=(0,R.Z)("button",{target:"ejtjsn20"})((({theme:e})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:e.colors.lightenedBg05,border:`1px solid ${e.colors.fadedText10}`,borderRadius:`0 0 ${e.radii.md} ${e.radii.md}`,"&:hover":{borderColor:e.colors.primary,color:e.colors.primary},"&:active":{color:e.colors.white,borderColor:e.colors.primary,backgroundColor:e.colors.primary},"&:focus:not(:active)":{borderColor:e.colors.primary,color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:e.colors.fadedText40},fontWeight:e.fontWeights.normal,padding:`${e.spacing.xs} ${e.spacing.md}`,margin:0,lineHeight:e.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{boxShadow:`0 0 0 0.2rem ${(0,b.DZ)(e.colors.primary,.5)}`,outline:"none"},...F(i.MEDIUM,e)})),"");var L=s(96266);const U=function({disabled:e,onClick:t,children:s,progress:i}){return(0,L.jsxs)(y,{disabled:e||!1,onClick:t||(()=>{}),progress:i||null,"data-testid":"stCameraInputButton",children:[s,i&&(0,L.jsx)(P,{children:(0,L.jsx)(x.Z,{value:i,size:x.$.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarProgress:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}},BarContainer:{style:{borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}}}})})]})};var k=s(90693),$=s(92445),Z=s(3579);let D;!function(e){e.USER="user",e.ENVIRONMENT="environment"}(D||(D={}));const X=({switchFacingMode:e})=>(0,L.jsx)(M,{children:(0,L.jsx)(g.ZP,{content:"Switch camera",placement:g.ug.TOP_RIGHT,children:(0,L.jsx)($.ZP,{kind:$.hY.MINIMAL,onClick:e,children:(0,L.jsx)(h.ZP,{content:k.Z,size:"twoXL",color:Z.Z.white})})})});var O=s(85585),_=s(31476),A=s(11226),B=s(74947),N=s.n(B),z=s(92371);let G;!function(e){e.PENDING="pending",e.SUCCESS="success",e.ERROR="error"}(G||(G={}));const V=({width:e})=>(0,L.jsxs)(j,{width:e,children:[(0,L.jsx)(h.ZP,{size:"threeXL",color:Z.Z.gray60,content:O.n}),(0,L.jsxs)(I,{children:["This app would like to use your camera.",(0,L.jsx)(E,{href:z.U3,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),W=({handleCapture:e,width:t,disabled:s,clearPhotoInProgress:i,setClearPhotoInProgress:r,facingMode:o,setFacingMode:n})=>{const[a,l]=(0,d.useState)(G.PENDING),c=(0,d.useRef)(null),[h,g]=(0,d.useState)(t),u=(0,d.useCallback)((0,S.Ds)(1e3,g),[]);(0,d.useEffect)((()=>{u(t)}),[t]);const p=(0,_.u)();return(0,L.jsxs)(C,{width:h,children:[a===G.SUCCESS||s||i?A.tq&&(0,L.jsx)(X,{switchFacingMode:n}):(0,L.jsx)(V,{width:h}),(0,L.jsx)(j,{hidden:a!==G.SUCCESS&&!s&&!i,width:h,children:!s&&(0,L.jsx)(N(),{audio:!1,ref:c,screenshotFormat:"image/jpeg",screenshotQuality:1,width:h,height:9*h/16,style:{borderRadius:`${p.radii.md} ${p.radii.md} 0 0`},onUserMediaError:()=>{l(G.ERROR)},onUserMedia:()=>{l(G.SUCCESS),r(!1)},videoConstraints:{width:{ideal:h},facingMode:o}})}),(0,L.jsx)(U,{onClick:function(){if(null!==c.current){const t=c.current.getScreenshot();e(t)}},disabled:a!==G.SUCCESS||s||i,children:"Take Photo"})]})};class H extends d.PureComponent{constructor(e){super(e),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new m.Kz,this.getProgress=()=>{if(this.state.files.length>0&&"uploading"===this.state.files[this.state.files.length-1].status.type){return this.state.files[this.state.files.length-1].status.progress}},this.setClearPhotoInProgress=e=>{this.setState({clearPhotoInProgress:e})},this.setFacingMode=()=>{this.setState((e=>({facingMode:e.facingMode===D.USER?D.ENVIRONMENT:D.USER})))},this.handleCapture=e=>{if(null===e)return Promise.resolve();this.setState({imgSrc:e,shutter:!0,minShutterEffectPassed:!1});var t,s;return(t=e,s=`camera-input-${(new Date).toISOString().replace(/:/g,"_")}.jpg`,fetch(t).then((e=>e.arrayBuffer())).then((e=>new File([e],s,{type:"image/jpeg"})))).then((e=>this.uploadFile(e))).then((()=>{return e=150,new Promise((t=>setTimeout(t,e)));var e})).then((()=>{this.setState(((t,s)=>({imgSrc:e,shutter:t.shutter,minShutterEffectPassed:!0})))})).catch((e=>{(0,f.H)(e)}))},this.removeCapture=()=>{0!==this.state.files.length&&(this.state.files.forEach((e=>this.deleteFile(e.id))),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=e=>{const{element:t,widgetMgr:s}=this.props;if(e.disabled!==this.props.disabled&&this.props.disabled)return this.reset(),void s.setFileUploaderStateValue(t,new c.xO,{fromUi:!1});if("ready"!==this.status)return;const i=this.createWidgetValue();if(void 0===i)return;const r=s.getFileUploaderStateValue(t);l().isEqual(i,r)||s.setFileUploaderStateValue(t,i,{fromUi:!0})},this.onFormCleared=()=>{this.setState({files:[]},(()=>{const e=this.createWidgetValue();null!=e&&(this.setState({imgSrc:null}),this.props.widgetMgr.setFileUploaderStateValue(this.props.element,e,{fromUi:!0}))}))},this.deleteFile=e=>{const t=this.getFile(e);null!=t&&("uploading"===t.status.type&&t.status.cancelToken.cancel(),this.removeFile(e))},this.addFile=e=>{this.setState((t=>({files:[...t.files,e]})))},this.removeFile=e=>{this.setState((t=>({files:t.files.filter((t=>t.id!==e))})))},this.getFile=e=>this.state.files.find((t=>t.id===e)),this.updateFile=(e,t)=>{this.setState((s=>({files:s.files.map((s=>s.id===e?t:s))})))},this.onUploadComplete=(e,t)=>{this.setState((e=>({newestServerFileId:Math.max(e.newestServerFileId,t),shutter:!1})));const s=this.getFile(e);null!=s&&"uploading"===s.status.type&&this.updateFile(s.id,s.setStatus({type:"uploaded",serverFileId:t}))},this.onUploadProgress=(e,t)=>{const s=this.getFile(t);if(null==s||"uploading"!==s.status.type)return;const i=Math.round(100*e.loaded/e.total);s.status.progress!==i&&this.updateFile(t,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:i}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=e=>{const t=n().CancelToken.source(),s=new w.R(e.name,e.size,this.nextLocalFileId(),{type:"uploading",cancelToken:t,progress:1});this.addFile(s),this.props.uploadClient.uploadFile(this.props.element,e,(e=>this.onUploadProgress(e,s.id)),t.token).then((e=>this.onUploadComplete(s.id,e))).catch((e=>{n().isCancel(e)||this.updateFile(s.id,s.setStatus({type:"error",errorMessage:e?e.toString():"Unknown error"}))}))},this.state=this.initialValue}get initialValue(){const e={files:[],newestServerFileId:0,imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:D.USER},{widgetMgr:t,element:s}=this.props,i=t.getFileUploaderStateValue(s);if(null==i)return e;const{maxFileId:r,uploadedFileInfo:o}=i;return null==r||0===r||null==o?e:{files:o.map((e=>{const t=e.name,s=e.size,i=e.id;return new w.R(t,s,this.nextLocalFileId(),{type:"uploaded",serverFileId:i})})),newestServerFileId:Number(r),imgSrc:0===o.length?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:D.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){return this.state.files.some((e=>"uploading"===e.status.type))?"updating":"ready"}createWidgetValue(){if(0===this.state.newestServerFileId)return;const e=this.state.files.filter((e=>"uploaded"===e.status.type)).map((e=>{const{name:t,size:s,status:i}=e;return new c.jM({id:i.serverFileId,name:t,size:s})}));return new c.xO({maxFileId:this.state.newestServerFileId,uploadedFileInfo:e})}render(){var e;const{element:t,widgetMgr:s,disabled:i,width:o}=this.props;return this.formClearHelper.manageFormClearListener(s,t.formId,this.onFormCleared),(0,L.jsxs)(C,{width:o,className:"row-widget","data-testid":"stCameraInput",children:[(0,L.jsx)(p.ON,{label:t.label,disabled:i,labelVisibility:(0,S.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),children:t.help&&(0,L.jsx)(p.dT,{children:(0,L.jsx)(u.Z,{content:t.help,placement:g.ug.TOP_RIGHT})})}),this.state.imgSrc?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(j,{width:o,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&(0,L.jsx)(v,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:o,height:9*o/16})}),(0,L.jsx)(U,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||i,children:this.getProgress()?"Uploading...":(0,L.jsxs)(T,{children:[(0,L.jsx)(h.ZP,{content:r.X,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):(0,L.jsx)(W,{handleCapture:this.handleCapture,width:o,disabled:i,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode})]})}nextLocalFileId(){return this.localFileIdCounter++}}const q=H},41605:(e,t,s)=>{s.d(t,{R:()=>i});class i{setStatus(e){return new i(this.name,this.size,this.id,e)}constructor(e,t,s,i){this.name=void 0,this.size=void 0,this.status=void 0,this.id=void 0,this.name=e,this.size=t,this.id=s,this.status=i}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[761],{40761:(e,t,r)=>{r.r(t),r.d(t,{default:()=>se});var o=r(5057),n=r(31476),i=r(80099),a=r(53381);function s(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 l(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 u=0,p=1,d=2;function f(e){return e.$isActive?d:e.$isHovered?p:u}function h(e){var t=e.$theme.colors,r=e.$disabled,o=e.$checked,n=e.$isFocusVisible,i=e.$error;if(r)return t.tickFillDisabled;if(!o)return n?t.borderSelected:i?t.tickBorderError:t.tickBorder;if(i)switch(f(e)){case u:return t.tickFillErrorSelected;case p:return t.tickFillErrorSelectedHover;case d:return t.tickFillErrorSelectedHoverActive}else switch(f(e)){case u:return t.tickFillSelected;case p:return t.tickFillSelectedHover;case d:return t.tickFillSelectedHoverActive}return null}function b(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(f(e)){case u:return t.tickFillError;case p:return t.tickFillErrorHover;case d:return t.tickFillErrorHoverActive}else switch(f(e)){case u:return t.tickFill;case p:return t.tickFillHover;case d:return t.tickFillActive}}function m(e){var t=e.$disabled,r=e.$theme.colors;return t?r.contentSecondary:r.contentPrimary}var y=(0,a.zo)("div",(function(e){var t=e.$disabled,r=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:"horizontal"===r?"row":"column",alignItems:"horizontal"===r?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}}));y.displayName="RadioGroupRoot",y.displayName="RadioGroupRoot";var v=(0,a.zo)("label",(function(e){var t,r=e.$disabled,o=e.$hasDescription,n=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,l="horizontal"===a,u="rtl"===i.direction?"Left":"Right";return c(t={flexDirection:"top"===n||"bottom"===n?"column":"row",display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",marginTop:s.scale200},"margin".concat(u),l?s.scale200:null),c(t,"marginBottom",o&&!l?null:s.scale200),t}));v.displayName="Root",v.displayName="Root";var g=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{backgroundColor:b(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?o.scale200:o.scale550,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve,width:e.$checked?o.scale200:o.scale550}}));g.displayName="RadioMarkInner",g.displayName="RadioMarkInner";var w=(0,a.zo)("div",(function(e){var t=e.$theme,r=t.animation,o=t.sizing;return{alignItems:"center",backgroundColor:h(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:o.scale700,justifyContent:"center",marginTop:o.scale0,marginRight:o.scale0,marginBottom:o.scale0,marginLeft:o.scale0,outline:"none",verticalAlign:"middle",width:o.scale700,flexShrink:0,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve}}));w.displayName="RadioMarkOuter",w.displayName="RadioMarkOuter";var O=(0,a.zo)("div",(function(e){var t=e.$theme.typography;return l(l({verticalAlign:"middle"},function(e){var t,r=e.$labelPlacement,o=void 0===r?"":r,n=e.$theme;switch(o){case"top":t="Bottom";break;case"bottom":t="Top";break;case"left":t="rtl"===n.direction?"Left":"Right";break;default:t="rtl"===n.direction?"Right":"Left"}var i=n.sizing.scale300;return c({},"padding".concat(t),i)}(e)),{},{color:m(e)},t.LabelMedium)}));O.displayName="Label",O.displayName="Label";var R=(0,a.zo)("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});R.displayName="Input",R.displayName="Input";var k=(0,a.zo)("div",(function(e){var t,r=e.$theme,o=e.$align,n="horizontal"===o,i="rtl"===r.direction?"Right":"Left",a="rtl"===r.direction?"Left":"Right";return l(l({},r.typography.ParagraphSmall),{},(c(t={color:r.colors.contentSecondary,cursor:"auto"},"margin".concat(i),"horizontal"===o?null:r.sizing.scale900),c(t,"margin".concat(a),n?r.sizing.scale200:null),c(t,"maxWidth","240px"),t))}));k.displayName="Description",k.displayName="Description";var j=r(94253);function F(e){return F="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},F(e)}function P(){return P=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},P.apply(this,arguments)}function $(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 S(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 S(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 S(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 M(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 E(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=I(e);if(t){var n=I(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C(e)}(this,r)}}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=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)}(s,e);var t,r,n,a=E(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return L(C(e=a.call.apply(a,[this].concat(r))),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),L(C(e),"handleFocus",(function(t,r){(0,j.E)(t)&&e.setState({isFocusVisible:!0}),e.setState({focusedRadioIndex:r}),e.props.onFocus&&e.props.onFocus(t)})),L(C(e),"handleBlur",(function(t,r){!1!==e.state.isFocusVisible&&e.setState({isFocusVisible:!1}),e.setState({focusedRadioIndex:-1}),e.props.onBlur&&e.props.onBlur(t)})),e}return t=s,(r=[{key:"render",value:function(){var e=this,t=this.props.overrides,r=void 0===t?{}:t,n=$((0,i.jb)(r.RadioGroupRoot,y),2),a=n[0],s=n[1];return o.createElement(a,P({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},s),o.Children.map(this.props.children,(function(t,r){if(!o.isValidElement(t))return null;var n=e.props.value===t.props.value;return o.cloneElement(t,{align:e.props.align,autoFocus:e.props.autoFocus,checked:n,disabled:e.props.disabled||t.props.disabled,error:e.props.error,isFocused:e.state.focusedRadioIndex===r,isFocusVisible:e.state.isFocusVisible,tabIndex:0===r&&!e.props.value||n?"0":"-1",labelPlacement:e.props.labelPlacement,name:e.props.name,onBlur:function(t){return e.handleBlur(t,r)},onFocus:function(t){return e.handleFocus(t,r)},onChange:e.props.onChange,onMouseEnter:e.props.onMouseEnter,onMouseLeave:e.props.onMouseLeave})})))}}])&&M(t.prototype,r),n&&M(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);L(T,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});const B=T;var D="vertical",V="horizontal";function A(e){return A="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},A(e)}function z(){return z=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},z.apply(this,arguments)}function _(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 H(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 H(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 H(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 N(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 U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(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=G(e);if(t){var n=G(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return q(e)}(this,r)}}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function K(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(e){return e.stopPropagation()},J=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&&U(e,t)}(s,e);var t,r,n,a=W(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return K(q(e=a.call.apply(a,[this].concat(r))),"state",{isActive:!1,isHovered:!1}),K(q(e),"onMouseEnter",(function(t){e.setState({isHovered:!0}),e.props.onMouseEnter&&e.props.onMouseEnter(t)})),K(q(e),"onMouseLeave",(function(t){e.setState({isHovered:!1}),e.props.onMouseLeave&&e.props.onMouseLeave(t)})),K(q(e),"onMouseDown",(function(t){e.setState({isActive:!0}),e.props.onMouseDown&&e.props.onMouseDown(t)})),K(q(e),"onMouseUp",(function(t){e.setState({isActive:!1}),e.props.onMouseUp&&e.props.onMouseUp(t)})),e}return t=s,(r=[{key:"componentDidMount",value:function(){var e;this.props.autoFocus&&null!==(e=this.props.inputRef)&&void 0!==e&&e.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var e,t=this.props.overrides,r=void 0===t?{}:t,n=_((0,i.jb)(r.Root,v),2),a=n[0],s=n[1],l=_((0,i.jb)(r.Label,O),2),c=l[0],u=l[1],p=_((0,i.jb)(r.Input,R),2),d=p[0],f=p[1],h=_((0,i.jb)(r.Description,k),2),b=h[0],m=h[1],y=_((0,i.jb)(r.RadioMarkInner,g),2),j=y[0],F=y[1],P=_((0,i.jb)(r.RadioMarkOuter,w),2),$=P[0],S=P[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},x=o.createElement(c,z({},M,u),this.props.containsInteractiveElement?o.createElement("div",{onClick:function(e){return e.preventDefault()}},this.props.children):this.props.children);return o.createElement(o.Fragment,null,o.createElement(a,z({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,s),("top"===(e=this.props.labelPlacement)||"left"===e)&&x,o.createElement($,z({},M,S),o.createElement(j,z({},M,F))),o.createElement(d,z({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:Z,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,f)),function(e){return"bottom"===e||"right"===e}(this.props.labelPlacement)&&x),!!this.props.description&&o.createElement(b,z({},M,m),this.props.description))}}])&&N(t.prototype,r),n&&N(t,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);K(J,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:o.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});const Q=J;var X=r(86964),Y=r(8429),ee=r(54840),te=r(96266);class re extends o.PureComponent{constructor(...e){super(...e),this.state={value:this.props.value},this.onChange=e=>{const t=parseInt(e.target.value,10);this.setState({value:t},(()=>this.props.onChange(t)))}}componentDidUpdate(e){e.value!==this.props.value&&this.props.value!==this.state.value&&this.setState(((e,t)=>({value:t.value})))}render(){const{theme:e,width:t,help:r,label:o,horizontal:n,labelVisibility:i}=this.props;let{disabled:a}=this.props;const{colors:s,radii:l}=e,c={width:t},u=[...this.props.options];return 0===u.length&&(u.push("No options to select."),a=!0),(0,te.jsxs)("div",{className:"row-widget stRadio",style:c,children:[(0,te.jsx)(X.ON,{label:o,disabled:a,labelVisibility:i,children:r&&(0,te.jsx)(X.Hp,{children:(0,te.jsx)(Y.Z,{content:r,placement:ee.ug.TOP_RIGHT})})}),(0,te.jsx)(B,{onChange:this.onChange,value:this.state.value.toString(),disabled:a,align:n?V:D,"aria-label":o,children:u.map(((e,t)=>(0,te.jsx)(Q,{value:t.toString(),overrides:{Root:{style:({$isFocusVisible:e})=>({marginBottom:0,marginTop:0,marginRight:"1rem",paddingLeft:0,alignItems:"start",paddingRight:"2px",backgroundColor:e?s.darkenedBgMix25:"",borderTopLeftRadius:l.md,borderTopRightRadius:l.md,borderBottomLeftRadius:l.md,borderBottomRightRadius:l.md})},RadioMarkOuter:{style:({$checked:e})=>({width:"1rem",height:"1rem",marginTop:"0.35rem",marginRight:"0",backgroundColor:e&&!a?s.primary:s.fadedText40})},RadioMarkInner:{style:({$checked:e})=>({height:e?"6px":".75rem",width:e?"6px":".75rem"})},Label:{style:{color:a?s.fadedText40:s.bodyText,position:"relative",top:"1px"}}},children:e},t)))})]})}}const oe=(0,n.b)(re);var ne=r(56846),ie=r(34422);class ae extends o.PureComponent{constructor(...e){super(...e),this.formClearHelper=new ne.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{disabled:e,element:t,width:r,widgetMgr:o}=this.props,{horizontal:n,options:i,label:a,labelVisibility:s,help:l}=t;return this.formClearHelper.manageFormClearListener(o,t.formId,this.onFormCleared),(0,te.jsx)(oe,{label:a,onChange:this.onChange,options:i,width:r,disabled:e,horizontal:n,labelVisibility:(0,ie.iF)(null===s||void 0===s?void 0:s.value),value:this.state.value,help:l})}}const se=ae}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7698],{67698:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var o=s(5057),n=s(31476),i=s(99362),r=s(46540),l=s(85493),a=s(45490),c=s(70765),g=s(69194);const d=(0,a.Z)(c.Q,{shouldForwardProp:g.Z,target:"e17lx80j1"})((({theme:e,$usingCustomTheme:t})=>({marginTop:e.spacing.none,marginBottom:e.spacing.none,marginRight:e.spacing.none,marginLeft:e.spacing.none,borderColor:e.colors.fadedText10,borderTopColor:t?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),""),h=(0,a.Z)("div",{target:"e17lx80j0"})((({theme:e})=>({display:"flex",gap:e.spacing.lg,alignItems:"center",width:"100%"})),"");var p=s(96266);const m=function({width:e,element:t}){const s=(0,n.u)(),{activeTheme:a}=o.useContext(l.Z),c=!(0,i.MJ)(a),g={width:e};return(0,p.jsx)("div",{className:"stSpinner",style:g,children:(0,p.jsxs)(h,{children:[(0,p.jsx)(d,{$size:s.iconSizes.twoXL,$usingCustomTheme:c}),(0,p.jsx)(r.Z,{source:t.text,allowHTML:!1})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7842],{37842:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var n,a=r(65850),o=r(5057);function u(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function i(){}function l(e){return!!(e||"").match(/\d/)}function s(e){return null===e||void 0===e}function c(e){return"number"===typeof e&&isNaN(e)}function f(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function v(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:r,addNegation:n}}function d(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function g(e,t){return Array(t+1).join(e)}function m(e){var t=e+"",r="-"===t[0]?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],o=n[1];if(!(o=Number(o)))return r+a;var u=1+o,i=(a=a.replace(".","")).length;return u<0?a="0."+g("0",Math.abs(u))+a:u>=i?a+=g("0",u-i):a=(a.substring(0,u)||"0")+"."+a.substring(u),r+a}function p(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=(-1!==e.indexOf(".")||r)&&t,a=v(e),o=a.beforeDecimal,u=a.afterDecimal,i=a.hasNegation,l=parseFloat("0."+(u||"0")),s=(u.length<=t?"0."+u:l.toFixed(t)).split(".");return""+(i?"-":"")+o.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0])+(n?".":"")+d(s[1]||"",t,r)}function h(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function S(e){return Math.max(e.selectionStart,e.selectionEnd)}function b(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function y(e,t,r,n){var a,o,u,i=e.length;if(a=t,o=0,u=i,t=Math.min(Math.max(a,o),u),"left"===n){for(;t>=0&&!r[t];)t--;-1===t&&(t=r.indexOf(!0))}else{for(;t<=i&&!r[t];)t++;t>i&&(t=r.lastIndexOf(!0))}return-1===t&&(t=i),t}function w(e){for(var t=Array.from({length:e.length+1}).map((function(){return!0})),r=0,n=t.length;r<n;r++)t[r]=Boolean(l(e[r])||l(e[r-1]));return t}function x(e,t,r,n,a,u){void 0===u&&(u=i);var l=(0,o.useRef)(),f=function(e){var t=(0,o.useRef)(e);t.current=e;var r=(0,o.useRef)((function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return t.current.apply(t,e)}));return r.current}((function(e){var t,o;return s(e)||c(e)?(o="",t=""):"number"===typeof e||r?(o="number"===typeof e?m(e):e,t=n(o)):(o=a(e,void 0),t=e),{formattedValue:t,numAsString:o}})),v=(0,o.useState)((function(){return f(t)})),d=v[0],g=v[1];return(0,o.useMemo)((function(){s(e)?l.current=void 0:(l.current=f(e),g(l.current))}),[e,f]),[d,function(e,t){g({formattedValue:e.formattedValue,numAsString:e.value}),u(e,t)}]}function V(e){return e.replace(/[^0-9]/g,"")}function D(e){return e}function O(e){var t=e.type;void 0===t&&(t="text");var r=e.displayType;void 0===r&&(r="input");var a=e.customInput,s=e.renderText,c=e.getInputRef,f=e.format;void 0===f&&(f=D);var v=e.removeFormatting;void 0===v&&(v=V);var d=e.defaultValue,g=e.valueIsNumericString,m=e.onValueChange,p=e.isAllowed,b=e.onChange;void 0===b&&(b=i);var O=e.onKeyDown;void 0===O&&(O=i);var C=e.onMouseUp;void 0===C&&(C=i);var N=e.onFocus;void 0===N&&(N=i);var T=e.onBlur;void 0===T&&(T=i);var E=e.value,R=e.getCaretBoundary;void 0===R&&(R=w);var A=e.isValidInputCharacter;void 0===A&&(A=l);var B=u(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),I=x(E,d,Boolean(g),f,v,m),j=I[0],k=j.formattedValue,F=j.numAsString,M=I[1],P=(0,o.useRef)();(0,o.useEffect)((function(){var e=f(F);if(void 0===P.current||e!==P.current){var t=U.current,r=v(e,void 0);H({formattedValue:e,numAsString:r,input:t,setCaretPosition:!0,source:n.props,event:void 0})}}));var K=(0,o.useState)(!1),L=K[0],W=K[1],U=(0,o.useRef)(null),_=(0,o.useRef)({setCaretTimeout:null,focusTimeout:null});(0,o.useEffect)((function(){return W(!0),function(){clearTimeout(_.current.setCaretTimeout),clearTimeout(_.current.focusTimeout)}}),[]);var G=f,$=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},z=function(e,t,r){h(e,t),_.current.setCaretTimeout=setTimeout((function(){e.value===r&&h(e,t)}),0)},Z=function(e,t,r){return y(e,t,R(e),r)},q=function(e,t,r){var n=R(t),a=function(e,t,r,n,a,o){var u=a.findIndex((function(e){return e})),i=e.slice(0,u);t||r.startsWith(i)||(r=i+r,n+=i.length);for(var l=r.length,s=e.length,c={},f=new Array(l),v=0;v<l;v++){f[v]=-1;for(var d=0,g=s;d<g;d++)if(r[v]===e[d]&&!0!==c[d]){f[v]=d,c[d]=!0;break}}for(var m=n;m<l&&(-1===f[m]||!o(r[m]));)m++;var p=m===l||-1===f[m]?s:f[m];for(m=n-1;m>0&&-1===f[m];)m--;var h=-1===m||-1===f[m]?0:f[m]+1;return h>p?p:n-h<p-n?h:p}(t,k,e,r,n,A);return a=y(t,a,n)},H=function(e){var t=e.formattedValue;void 0===t&&(t="");var r=e.input,n=e.setCaretPosition;void 0===n&&(n=!0);var a=e.source,o=e.event,u=e.numAsString,i=e.caretPos;if(r){if(void 0===i&&n){var l=e.inputValue||r.value,s=S(r);r.value=t,i=q(l,t,s)}r.value=t,n&&void 0!==i&&z(r,i,t)}t!==k&&function(e,t){P.current=e.formattedValue,M(e,t)}($(t,u),{event:o,source:a})},J=!L||"undefined"===typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",Q=Object.assign({inputMode:J},B,{type:t,value:k,onChange:function(e){var t=function(e,t,r){var n=function(e,t){for(var r=0,n=0,a=e.length,o=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[o-1-n]&&o-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:o-n}}}(k,e),a=Object.assign(Object.assign({},n),{lastValue:k}),o=v(e,a),u=G(o);if(o=v(u,void 0),p&&!p($(u,o))){var i=t.target,l=S(i),s=q(e,k,l);return z(i,s,k),!1}return H({formattedValue:u,numAsString:o,inputValue:e,event:t,source:r,setCaretPosition:!0,input:t.target}),!0}(e.target.value,e,n.event);t&&b(e)},onKeyDown:function(e){var t,r=e.target,n=e.key,a=r.selectionStart,o=r.selectionEnd,u=r.value;if(void 0===u&&(u=""),"ArrowLeft"===n||"Backspace"===n?t=Math.max(a-1,0):"ArrowRight"===n?t=Math.min(a+1,u.length):"Delete"===n&&(t=a),void 0!==t&&a===o){var i=t;if("ArrowLeft"===n||"ArrowRight"===n)i=Z(u,t,"ArrowLeft"===n?"left":"right");else"Delete"!==n||A(u[t])?"Backspace"!==n||A(u[t])||(i=Z(u,t,"left")):i=Z(u,t,"right");i!==t&&z(r,i,u),e.isUnitTestRun&&z(r,i,u),O(e)}else O(e)},onMouseUp:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,a=t.value;if(void 0===a&&(a=""),r===n){var o=Z(a,r);o!==r&&z(t,o,a)}C(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target;U.current=t,_.current.focusTimeout=setTimeout((function(){var r=t.selectionStart,n=t.selectionEnd,a=t.value;void 0===a&&(a="");var o=Z(a,r);o===r||0===r&&n===a.length||z(t,o,a),N(e)}),0)},onBlur:function(e){U.current=null,clearTimeout(_.current.focusTimeout),clearTimeout(_.current.setCaretTimeout),T(e)}});if("text"===r)return s?o.createElement(o.Fragment,null,s(k,B)||null):o.createElement("span",Object.assign({},B,{ref:c}),k);if(a){var X=a;return o.createElement(X,Object.assign({},Q,{ref:c}))}return o.createElement("input",Object.assign({},Q,{ref:c}))}function C(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;void 0===a&&(a="");var o=t.suffix;void 0===o&&(o="");var u=t.allowNegative;void 0===u&&(u=!0);var i=t.thousandsGroupStyle;if(void 0===i&&(i="thousand"),""===e||"-"===e)return e;var l=N(t),s=l.thousandSeparator,c=l.decimalSeparator,f=0!==r&&-1!==e.indexOf(".")||r&&n,g=v(e,u),m=g.beforeDecimal,p=g.afterDecimal,h=g.addNegation;return void 0!==r&&(p=d(p,r,!!n)),s&&(m=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}(m,s,i)),a&&(m=a+m),o&&(p+=o),h&&(m="-"+m),e=m+(f&&c||"")+p}function N(e){var t=e.decimalSeparator;void 0===t&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function T(e,t,r){void 0===t&&(t=b(e));var n=r.allowNegative;void 0===n&&(n=!0);var a=r.prefix;void 0===a&&(a="");var o=r.suffix;void 0===o&&(o="");var u=r.decimalScale,i=t.from,l=t.to,s=l.start,c=l.end,d=N(r),g=d.allowedDecimalSeparators,m=d.decimalSeparator,p=e[c]===m;if(c-s===1&&-1!==g.indexOf(e[s])){var h=0===u?"":m;e=e.substring(0,s)+h+e.substring(s+1,e.length)}var S=!1;a.startsWith("-")?S=e.startsWith("--"):o.startsWith("-")&&e.length===o.length?S=!1:"-"===e[0]&&(S=!0),S&&(e=e.substring(1),s-=1,c-=1);var y=0;e.startsWith(a)?y+=a.length:s<a.length&&(y=s),c-=y;var w=(e=e.substring(y)).length,x=e.length-o.length;e.endsWith(o)?w=x:c>e.length-o.length&&(w=c),e=e.substring(0,w),e=function(e,t){void 0===e&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}(S?"-"+e:e,n),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+f(e),t?"g":void 0)}(m,!0))||[]).join("");var V=e.indexOf(m),D=v(e=e.replace(new RegExp(f(m),"g"),(function(e,t){return t===V?".":""})),n),O=D.beforeDecimal,C=D.afterDecimal,T=D.addNegation;return l.end-l.start<i.end-i.start&&""===O&&p&&!parseFloat(C)&&(e=T?"-":""),e}function E(e){var t=e.decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix,e.allowNegative;var r=e.allowLeadingZeros,a=e.onKeyDown;void 0===a&&(a=i);var o=e.onBlur;void 0===o&&(o=i);var f=e.thousandSeparator,v=e.decimalScale,d=e.fixedDecimalScale,g=e.prefix;void 0===g&&(g="");var S=e.defaultValue,b=e.value,y=e.valueIsNumericString,w=e.onValueChange,V=u(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);!function(e){var t=N(e),r=t.thousandSeparator,n=t.decimalSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ")}(e);var D=function(t){return C(t,e)},O=function(t,r){return T(t,r,e)},E=y;s(b)?s(S)||(E=null!==y&&void 0!==y?y:"number"===typeof S):E=null!==y&&void 0!==y?y:"number"===typeof b;var R=function(e){return s(e)||c(e)?e:("number"===typeof e&&(e=m(e)),E&&"number"===typeof v?p(e,v,Boolean(d)):e)},A=x(R(b),R(S),Boolean(E),D,O,w),B=A[0],I=B.numAsString,j=B.formattedValue,k=A[1];return Object.assign(Object.assign({},V),{value:j,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||l(e)},onValueChange:k,format:D,removeFormatting:O,getCaretBoundary:function(t){return function(e,t){var r=t.prefix;void 0===r&&(r="");var n=t.suffix;void 0===n&&(n="");var a=Array.from({length:e.length+1}).map((function(){return!0})),o="-"===e[0];a.fill(!1,0,r.length+(o?1:0));var u=e.length;return a.fill(!1,u-n.length+1,u+1),a}(t,e)},onKeyDown:function(t){var r=t.target,n=t.key,o=r.selectionStart,u=r.selectionEnd,i=r.value;if(void 0===i&&(i=""),o===u){"Backspace"===n&&"-"===i[0]&&o===g.length+1&&h(r,1);var l=N(e),s=l.decimalSeparator,c=l.allowedDecimalSeparators;"Backspace"===n&&i[o-1]===s&&v&&d&&(h(r,o-1),t.preventDefault()),(null===c||void 0===c?void 0:c.includes(n))&&i[o]===s&&h(r,o+1);var m=!0===f?",":f;"Backspace"===n&&i[o-1]===m&&h(r,o-1),"Delete"===n&&i[o]===m&&h(r,o+1),a(t)}else a(t)},onBlur:function(t){var a=I;if(a.match(/\d/g)||(a=""),r||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}(a)),d&&v&&(a=p(a,v,d)),a!==I){var u=C(a,e);k({formattedValue:u,value:a,floatValue:parseFloat(a)},{event:t,source:n.event})}o(t)}})}function R(e){var t=E(e);return o.createElement(O,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(n||(n={}));var A=(0,a.d)("div")({name:"NumberOverlayEditorStyle",class:"n1czszh3"});function B(){var e,t,r;const n=null==(r=null==(t=null==(e=Intl.NumberFormat())?void 0:e.formatToParts(1.1))?void 0:t.find((e=>"decimal"===e.type)))?void 0:r.value;return null!=n?n:"."}var I=e=>{const{value:t,onChange:r,disabled:n,highlight:a,validatedSelection:u}=e,i=o.useRef();return o.useLayoutEffect((()=>{var e;if(void 0!==u){const t="number"===typeof u?[u,null]:u;null==(e=i.current)||e.setSelectionRange(t[0],t[1])}}),[u]),o.createElement(A,null,o.createElement(R,{autoFocus:!0,getInputRef:i,className:"gdg-input",onFocus:e=>e.target.setSelectionRange(a?0:e.target.value.length,e.target.value.length),disabled:!0===n,thousandSeparator:"."===B()?",":".",decimalSeparator:B(),value:Object.is(t,-0)?"-":null!=t?t:"",onValueChange:r}))}}}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7858],{6757:(t,e,i)=>{i.d(e,{Z:()=>d});i(5057);var s=i(34422),n=i(86964),o=i(45490);const r=i(21371).F4`
|
|
2
|
+
50% {
|
|
3
|
+
color: rgba(0, 0, 0, 0);
|
|
4
|
+
}
|
|
5
|
+
`,a=(0,o.Z)("span",{target:"e1m4n6jn0"})((({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:`${r}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),"");var l=i(96266);const d=({dirty:t,value:e,maxLength:i,className:o,type:r="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"===r?(0,s.Ge)()?h("Press \u2318+Enter to apply"):h("Press Ctrl+Enter to apply"):h("Press Enter to apply")),i&&h(`${e.length}/${i}`,t&&e.length>=i),(0,l.jsx)(n.X7,{className:o,children:d})}},7858:(t,e,i)=>{i.r(e),i.d(e,{default:()=>R});var s=i(5057),n=i(52707),o=i(84332),r=i(59500),a=i(56846),l=i(52801),d=i(32291),h=i(8429),u=i(54840),c=i(97292),m=i(30124),p=i(6757),g=i(86964),b=i(34422),f=i(45490);const y=(0,f.Z)("div",{target:"e1jwn65y3"})((({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",border:"1px solid transparent",transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.md,"&.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:"e1jwn65y2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),v=(0,f.Z)("button",{target:"e1jwn65y1"})((({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.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.md,borderBottomRightRadius:t.radii.md},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),""),V=(0,f.Z)("div",{target:"e1jwn65y0"})((({theme:t})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:"64px"})),"");var w=i(96266);class D 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,r.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,n=this.props.element,o=this.getMin(),r=this.getMax();if(o>e||e>r){const t=this.inputRef.current;t&&t.reportValidity()}else{const o=e||0===e?e:n.default;this.isIntData()?s.setIntValue(i,o,t):s.setDoubleValue(i,o,t),this.setState({dirty:!1,value:o,formattedValue:this.formatValue(o)})}},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:r}=this.props,{formattedValue:a,dirty:l,isFocused:d}=this.state,f={width:i},D=!this.canDecrement||s,R=!this.canIncrement||s;return this.formClearHelper.manageFormClearListener(r,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.Z,{content:e.help,placement:u.ug.TOP_RIGHT})})}),(0,w.jsxs)(y,{className:d?"focused":"",children:[(0,w.jsx)(m.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:D,children:(0,w.jsx)(c.ZP,{content:n.W,size:"xs",color:this.canDecrement?"inherit":"disabled"})}),(0,w.jsx)(v,{className:"step-up",onClick:this.modifyValueUsingStep("increment"),disabled:R,children:(0,w.jsx)(c.ZP,{content:o.v,size:"xs",color:this.canIncrement?"inherit":"disabled"})})]})]}),(0,w.jsx)(V,{children:(0,w.jsx)(p.Z,{dirty:l,value:a,className:"input-instructions"})})]})}}const R=D}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[7937],{47937:(e,t,i)=>{i.r(t),i.d(t,{default:()=>n});i(5057);var s=i(92445),l=i(46540),d=i(96266);const n=function(e){const{disabled:t,element:i,widgetMgr:n,width:r}=e,h={width:r},a="primary"===i.type?s.hY.PRIMARY:s.hY.SECONDARY;return(0,d.jsx)("div",{className:"row-widget stButton",style:h,children:(0,d.jsx)(s.uD,{help:i.help,children:(0,d.jsx)(s.ZP,{kind:a,size:s.$u.SMALL,disabled:t,fluidWidth:i.useContainerWidth||!1,onClick:()=>n.setTriggerValue(i,{fromUi:!0}),children:(0,d.jsx)(l.Z,{source:i.label,allowHTML:!1,isButton:!0})})})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8355],{78355:(e,t,i)=>{i.r(t),i.d(t,{default:()=>m});var s=i(5057),o=i(61839),r=i(56846),a=i(86964),l=i(8429),n=i(54840),d=i(34422),p=i(96266);class h extends s.PureComponent{constructor(...e){super(...e),this.formClearHelper=new r.Kz,this.state={value:this.initialValue},this.commitWidgetValue=e=>{this.props.widgetMgr.setStringValue(this.props.element,this.state.value,e)},this.onFormCleared=()=>{this.setState(((e,t)=>({value:t.element.default})),(()=>this.commitWidgetValue({fromUi:!0})))},this.handleChange=e=>{let t;t=null===e?this.initialValue:this.dateToString(e),this.setState({value:t},(()=>this.commitWidgetValue({fromUi:!0})))},this.stringToDate=e=>{const[t,i]=e.split(":").map(Number),s=new Date;return s.setHours(t),s.setMinutes(i),s},this.dateToString=e=>`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}get initialValue(){const e=this.props.widgetMgr.getStringValue(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(){var e;const{disabled:t,width:i,element:s,widgetMgr:r}=this.props,h={width:i},m={Select:{props:{disabled:t,overrides:{ControlContainer:{style:{borderLeftWidth:"1px",borderRightWidth:"1px",borderTopWidth:"1px",borderBottomWidth:"1px"}},IconsContainer:{style:()=>({paddingRight:".5rem"})},ValueContainer:{style:()=>({paddingRight:".5rem",paddingLeft:".5rem",paddingBottom:".5rem",paddingTop:".5rem"})},Dropdown:{style:()=>({paddingTop:0,paddingBottom:0})},Popover:{props:{overrides:{Body:{style:()=>({marginTop:"1px"})}}}}}}}};return this.formClearHelper.manageFormClearListener(r,s.formId,this.onFormCleared),(0,p.jsxs)("div",{className:"stTimeInput",style:h,children:[(0,p.jsx)(a.ON,{label:s.label,disabled:t,labelVisibility:(0,d.iF)(null===(e=s.labelVisibility)||void 0===e?void 0:e.value),children:s.help&&(0,p.jsx)(a.dT,{children:(0,p.jsx)(l.Z,{content:s.help,placement:n.ug.TOP_RIGHT})})}),(0,p.jsx)(o.Z,{format:"24",value:this.stringToDate(this.state.value),onChange:this.handleChange,overrides:m,creatable:!0,"aria-label":s.label})]})}}const m=h}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8461],{88461:(t,e,o)=>{o.r(e),o.d(e,{default:()=>F});var i=o(5057),n=o(31476),a=o(86928),s=o(12808),r=o(79220),l=o(52801),d=o(62658),c=o(47143),h=o(89163),g=o(65873),u=o(99362);function m(t,e){const o={font:e.genericFonts.bodyFont,background:e.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:e.colors.headingColor,titleFontStyle:"normal",fontWeight:e.fontWeights.bold,fontSize:e.fontSizes.smPx+2,orient:"top",offset:26},axis:{labelFontSize:e.fontSizes.twoSmPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,u.Xy)(e),labelFontStyle:"normal",titleFontWeight:e.fontWeights.normal,titleFontSize:e.fontSizes.smPx,titleColor:(0,u.Xy)(e),titleFontStyle:"normal",ticks:!1,gridColor:(0,u.ny)(e),domain:!1,domainWidth:1,domainColor:(0,u.ny)(e),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:e.spacing.lgPx,labelPadding:e.spacing.lgPx,labelSeparation:e.spacing.twoXSPx,labelOverlap:!0},legend:{labelFontSize:e.fontSizes.smPx,labelFontWeight:e.fontWeights.normal,labelColor:(0,u.Xy)(e),titleFontSize:e.fontSizes.smPx,titleFontWeight:e.fontWeights.normal,titleFontStyle:"normal",titleColor:(0,u.Xy)(e),titlePadding:e.spacing.mdPx,labelPadding:e.spacing.lgPx,columnPadding:e.spacing.smPx,rowPadding:e.spacing.twoXSPx,padding:7,symbolStrokeWidth:4},range:{category:(0,u.iY)(e),diverging:(0,u.ru)(e),ramp:(0,u.Gy)(e),heatmap:(0,u.Gy)(e)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:350,continuousWidth:400},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,...(0,u.Iy)(e)?{color:"#0068C9"}:{color:"#83C9FF"}},bar:{binSpacing:e.spacing.twoXSPx,discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return t?(0,g.mergeWith)({},o,t,((t,e)=>(0,g.isArray)(e)?e:void 0)):o}const p=(0,o(45490).Z)("div",{target:"everg990"})((({theme:t})=>({"&.vega-embed":{"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&.has-actions":{paddingRight:0},".vega-actions":{zIndex:t.zIndices.popupMenu,backgroundColor:t.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`1px solid ${t.colors.fadedText10}`,a:{fontFamily:t.genericFonts.bodyFont,fontWeight:t.fontWeights.normal,fontSize:t.fontSizes.md,margin:0,padding:`${t.spacing.twoXS} ${t.spacing.twoXL}`,color:t.colors.bodyText},"a:hover":{backgroundColor:t.colors.secondaryBg,color:t.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},summary:{opacity:0,height:"auto",zIndex:t.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:t.radii.md,color:t.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms","&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:t.colors.bodyText,opacity:"1 !important",background:t.colors.darkenedBgMix25}}}})),"");var f=o(96266);const b={DATAFRAME_INDEX:"(index)"},w="source",y=new Set([h.GI.DatetimeIndex,h.GI.Float64Index,h.GI.Int64Index,h.GI.RangeIndex,h.GI.UInt64Index]);class v extends i.PureComponent{constructor(...t){super(...t),this.vegaView=void 0,this.vegaFinalizer=void 0,this.defaultDataName=w,this.element=null,this.state={error:void 0},this.finalizeView=()=>{this.vegaFinalizer&&this.vegaFinalizer(),this.vegaFinalizer=void 0,this.vegaView=void 0},this.generateSpec=()=>{var t,e;const{element:o,theme:i}=this.props,n=JSON.parse(o.spec),{useContainerWidth:a}=o;if("streamlit"===o.vegaLiteTheme?n.config=m(n.config,i):"streamlit"===(null===(t=n.usermeta)||void 0===t||null===(e=t.embedOptions)||void 0===e?void 0:e.theme)?(n.config=m(n.config,i),n.usermeta.embedOptions.theme=void 0):n.config=function(t,e){const{colors:o,fontSizes:i,genericFonts:n}=e,a={labelFont:n.bodyFont,titleFont:n.bodyFont,labelFontSize:i.twoSmPx,titleFontSize:i.twoSmPx},s={background:o.bgColor,axis:{labelColor:o.bodyText,titleColor:o.bodyText,gridColor:(0,u.ny)(e),...a},legend:{labelColor:o.bodyText,titleColor:o.bodyText,...a},title:{color:o.bodyText,subtitleColor:o.bodyText,...a},header:{labelColor:o.bodyText},view:{continuousHeight:350,continuousWidth:400},mark:{tooltip:!0}};return t?(0,g.merge)({},s,t):s}(n.config,i),this.props.height?(n.width=this.props.width,n.height=this.props.height):a&&(n.width=this.props.width),n.padding||(n.padding={}),null==n.padding.bottom&&(n.padding.bottom=20),n.datasets)throw new Error("Datasets should not be passed as part of the spec");return n}}async componentDidMount(){try{await this.createView()}catch(t){const e=(0,c.b)(t);this.setState({error:e})}}componentWillUnmount(){this.finalizeView()}async componentDidUpdate(t){const{element:e,theme:o}=t,{element:i,theme:n}=this.props,a=e.spec,{spec:s}=i;if(!this.vegaView||a!==s||o!==n||t.width!==this.props.width||t.height!==this.props.height||t.element.vegaLiteTheme!==this.props.element.vegaLiteTheme){(0,l.ji)("Vega spec changed.");try{await this.createView()}catch(u){const t=(0,c.b)(u);this.setState({error:t})}return}const r=e.data,{data:d}=i;(r||d)&&this.updateData(this.defaultDataName,r,d);const h=x(e)||{},g=x(i)||{};for(const[l,c]of Object.entries(g)){const t=l||this.defaultDataName,e=h[t];this.updateData(t,e,c)}for(const l of Object.keys(h))g.hasOwnProperty(l)||l===this.defaultDataName||this.updateData(l,null,null);this.vegaView.resize().runAsync()}updateData(t,e,o){if(!this.vegaView)throw new Error("Chart has not been drawn yet");if(!o||0===o.data.numRows){return void(this.vegaView._runtime.data.hasOwnProperty(t)&&this.vegaView.remove(t,s.truthy))}if(!e||0===e.data.numRows)return void this.vegaView.insert(t,S(o));const{dataRows:i,dataColumns:n}=e.dimensions,{dataRows:a,dataColumns:r}=o.dimensions;if(function(t,e,o,i,n,a){if(o!==a)return!1;if(e>=n)return!1;if(0===e)return!1;const s=a-1,r=e-1;if(t.getDataValue(0,s)!==i.getDataValue(0,s)||t.getDataValue(r,s)!==i.getDataValue(r,s))return!1;return!0}(e,i,n,o,a,r))i<a&&this.vegaView.insert(t,S(o,i));else{const e=s.changeset().remove(s.truthy).insert(S(o));this.vegaView.change(t,e),(0,l.ji)(`Had to clear the ${t} dataset before inserting data through Vega view.`)}}async createView(){if((0,l.ji)("Creating a new Vega view."),!this.element)throw Error("Element missing.");this.finalizeView();const t=this.props.element,e=this.generateSpec(),o={defaultStyle:!0,ast:!0,expr:r.N},{vgSpec:i,view:n,finalize:s}=await(0,a.ZP)(this.element,e,o);this.vegaView=n,this.vegaFinalizer=s;const d=function(t){const e=x(t);if(null==e)return null;const o={};for(const[i,n]of Object.entries(e))o[i]=S(n);return o}(t),c=d?Object.keys(d):[];if(1===c.length){const[t]=c;this.defaultDataName=t}else 0===c.length&&i.data&&(this.defaultDataName=w);const h=function(t){const e=t.data;if(!e||0===e.data.numRows)return null;return S(e)}(t);if(h&&n.insert(this.defaultDataName,h),d)for(const[a,r]of Object.entries(d))n.insert(a,r);await n.runAsync(),this.vegaView.resize().runAsync()}render(){if(this.state.error)throw this.state.error;return(0,f.jsx)(p,{"data-testid":"stArrowVegaLiteChart",ref:t=>{this.element=t}})}}function x(t){var e;if(0===(null===(e=t.datasets)||void 0===e?void 0:e.length))return null;const o={};return t.datasets.forEach((t=>{if(!t)return;const e=t.hasName?t.name:null;o[e]=t.data})),o}function S(t,e=0){if(t.isEmpty())return[];const o=[],{dataRows:i,dataColumns:n}=t.dimensions,a=h.fu.getTypeName(t.types.index[0]),s=y.has(a);for(let r=e;r<i;r++){const e={};if(s){const o=t.getIndexValue(r,0);e[b.DATAFRAME_INDEX]="bigint"===typeof o?Number(o):o}for(let o=0;o<n;o++){const i=t.getDataValue(r,o);e[t.columns[0][o]]="bigint"===typeof i?Number(i):i}o.push(e)}return o}const F=(0,n.b)((0,d.Z)(v))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8565],{68565:(e,t,o)=>{o.r(t),o.d(t,{default:()=>H});var n=o(5057),r=o(53812),i=o(62658),l=o(42429);let d;!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(d||(d={}));var s=o(45490);const a=(0,s.Z)("div",{target:"e10os9ge8"})((({width:e,theme:t})=>({width:e,border:`1px solid ${t.colors.fadedText05}`,boxSizing:"content-box","& .table-top-right":{overflow:"hidden !important",paddingRight:"6px"},"& .table-bottom-left":{overflow:"hidden !important",paddingBottom:"6px"},"& .table-bottom-right":{overflow:"overlay !important"},"& .table-bottom-right:focus-visible":{outline:"none"},"& .table-bottom-right:focus":{outline:"none"}})),""),c=(0,s.Z)("div",{target:"e10os9ge7"})((({theme:e})=>({padding:`${e.spacing.twoXS} ${e.spacing.xs}`,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,fontSize:e.fontSizes.md,fontFamily:e.fonts.sansSerif,lineHeight:e.lineHeights.table,display:"flex",alignItems:"center",justifyContent:"flex-start"})),""),h=e=>({color:e.colors.fadedText60,borderBottom:`1px solid ${e.colors.fadedText05}`,borderRight:`1px solid ${e.colors.fadedText05}`,zIndex:1}),m=e=>({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",lineHeight:e.lineHeights.table}),u=(0,s.Z)(c,{target:"e10os9ge6"})((({theme:e})=>h(e)),""),g=(0,s.Z)(c,{target:"e10os9ge5"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),f=(0,s.Z)(c,{target:"e10os9ge4"})((({theme:e})=>({userSelect:"none",...h(e),...m(e)})),""),w=(0,s.Z)(c,{target:"e10os9ge3"})((({theme:e})=>m(e)),""),x=(0,s.Z)("div",{target:"e10os9ge2"})((({verticalLocator:e,horizontalLocator:t,width:o,height:n})=>({position:"absolute",[e]:"0px",[t]:"0px",width:o,height:n})),""),p=(0,s.Z)("div",{target:"e10os9ge1"})((({theme:e})=>({fontFamily:e.fonts.monospace,color:e.colors.fadedText60,fontStyle:"italic",fontSize:e.fontSizes.md,textAlign:"center"})),""),b=(0,s.Z)("span",{target:"e10os9ge0"})((({theme:e})=>({color:e.colors.fadedText05,verticalAlign:"top"})),"");var C=o(52068),y=o(52801);const S=!("undefined"===typeof window||!window.document||!window.document.createElement);let v;function N(e){if((!v&&0!==v||e)&&S){const e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),v=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return v}var I=o(72849);const D=10,E=2*I.CH.smPx,R=25,G=200,k=400,A=(e,t,o,n)=>{const{headerRows:r,headerCols:i,dataRows:d,cols:s,rows:a}=(0,l.kG)(o),c=E*r,h=t-2-N(),m=function(e,t,o,n,r,i){const l=R,d=e>2?G:k,s=({index:e})=>{const o=e,r=8*10/10,d=14+D,s=100;let a=l;for(let l=0;l<Math.min(t,s);l++){let e=-1;e=l<n?l:t>s?Math.floor(Math.random()*t):l;const{contents:c}=i(o,e),h=(c?c.length:0)*r+d;h>a&&(a=h)}return a};let a=[];const c=Array.from(Array(e),((e,t)=>s({index:t}))),h=c.reduce(((e,t)=>e+t),0),m=r-h,u=e=>e.filter((e=>e>d));if(m<0)a=c.map((e=>e>d?d:e));else{const e=u(c),t=m/e.length;a=c.map(((o,n)=>n in e.keys()?o+t:o))}let g=a.reduce(((e,t)=>e+t),0);if(g>r*(2/3)&&g<r){const t=(r-g)/e;a=a.map((e=>e+t)),g=a.reduce(((e,t)=>e+t),0)}const f=Math.min(g,r),w=({index:e})=>a[e],x=a.slice(0,o).reduce(((e,t)=>e+t));return{elementWidth:f,columnWidth:w,headerWidth:x}}(s,a,i,r,h,n);let{elementWidth:u,columnWidth:g,headerWidth:f}=m;if(0===d&&u<60){u=60,f=60;let e=0;for(let t=0;t<s;t++)e+=g({index:t});e<60&&(g=()=>60/s)}const w=a*E,x=(e||300)-2;e=Math.min(w,x);return u+=w>x?N():0,{rowHeight:E,headerHeight:c,border:2,columnWidth:g,headerWidth:f,elementWidth:u,height:e}},T={corner:u,"col-header":g,"row-header":f,data:w};var W=o(31478),z=o(95421),Z=n.forwardRef((function(e,t){return n.createElement(z.D,(0,W.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M4 1L0 5l1.5 1.5L4 4l2.5 2.5L8 5 4 1z"}))}));Z.displayName="ChevronTop";var $=n.forwardRef((function(e,t){return n.createElement(z.D,(0,W.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.5 1L0 2.5l4 4 4-4L6.5 1 4 3.5 1.5 1z"}))}));$.displayName="ChevronBottom";var j=o(97292),B=o(96266);function L({CellType:e,columnIndex:t,contents:o,rowIndex:n,sortedByUser:r,style:i,columnSortDirection:l,headerClickedCallback:s}){let a,c,h,m=o;const u=l===d.DESCENDING;null!=s&&0===n&&(a=()=>s(t),c="button",h=0,m=null==l?`Sort by column "${o}"`:`Sorted by column "${o}" (${u?"descending":"ascending"})`);const g=0===n?function(e){switch(e){case d.ASCENDING:return(0,B.jsx)(b,{"data-testid":"sortIcon",children:(0,B.jsx)(j.ZP,{content:Z,size:"xs",margin:"0 0 0 twoXS"})});case d.DESCENDING:return(0,B.jsx)(b,{"data-testid":"sortIcon",children:(0,B.jsx)(j.ZP,{content:$,size:"xs",margin:"0 0 0 twoXS"})});default:return null}}(l):void 0;return(0,B.jsxs)(e,{style:i,onClick:a,role:c,tabIndex:h,title:m,"data-testid":e.displayName,"data-test-sort-direction":l,children:[o,r?g:""]})}const H=(0,i.Z)((function({element:e,height:t,width:o}){const i=n.useRef(null),[s,c]=(0,n.useState)(!1),[h,m]=(0,n.useState)(0),[u,g]=(0,n.useState)(d.ASCENDING),[,f]=(0,l.oo)(e.get("data")),{headerRows:w,headerCols:b,dataRows:S,cols:v,rows:N}=(0,l.kG)(e),I=e=>{let t=d.ASCENDING;h===e&&(t=u===d.ASCENDING?d.DESCENDING:d.ASCENDING),m(e),g(t),c(!0)},D=(t=>{const{headerCols:o,dataRows:n}=(0,l.kG)(e),r=u!==d.DESCENDING;if(h<o||h-o>=t){const e=new Array(n);for(let t=0;t<n;t+=1)e[t]=r?t:n-(t+1);return e}return(0,l.X_)(e,h-o,r)})(f),E=function({element:e,headerRows:t,sortedDataRowIndices:o}){return(n,r)=>{if(null!=o&&r>=t){const e=r-t;e>=0&&e<o.length?(r=o[e],r+=t):(0,y.KE)(`Bad sortedDataRowIndices (rowIndex=${r}, headerRows=${t}, sortedDataRowIndices.length=${o.length}`)}const{contents:i,styles:d,type:s}=(0,l.me)(e,n,r);return{Component:T[s],styles:d,contents:(0,C.H7)(i)}}}({element:e,headerRows:w,sortedDataRowIndices:D}),R=function(e){return({columnIndex:t,key:o,rowIndex:n,style:r})=>{const{Component:i,styles:l,contents:d}=e(t,n),a=0===n?I:void 0,c=t===h?u:void 0,m={...r,...l,borderBottom:n===S?"none":void 0,borderRight:t===v-b?"none":void 0};return(0,B.jsx)(L,{CellType:i,columnIndex:t,rowIndex:n,style:m,contents:d,sortedByUser:s,columnSortDirection:c,headerClickedCallback:a},o)}}(E),{rowHeight:G,headerHeight:k,border:W,height:z,elementWidth:Z,columnWidth:$,headerWidth:j}=A(t,o,e,E);return setTimeout((()=>{null!=i.current&&i.current.recomputeGridSize()}),0),(0,n.useEffect)((()=>{h-b>=f&&(m(0),g(d.ASCENDING),c(!1))}),[h,b,f]),(0,B.jsxs)(a,{width:Z,className:"stDataFrame",children:[(0,B.jsx)(r.yR,{cellRenderer:R,fixedColumnCount:b,fixedRowCount:w,columnWidth:$,columnCount:v,enableFixedColumnScroll:!1,enableFixedRowScroll:!1,height:z,rowHeight:G,rowCount:N,width:Z,classNameBottomLeftGrid:"table-bottom-left",classNameBottomRightGrid:"table-bottom-right",classNameTopRightGrid:"table-top-right",ref:i}),(0,B.jsx)(x,{verticalLocator:"top",horizontalLocator:"right",width:W,height:k}),(0,B.jsx)(x,{verticalLocator:"bottom",horizontalLocator:"left",width:j,height:W}),0===S?(0,B.jsx)(p,{children:"empty"}):null]})}))}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8910.e6dda87e.chunk.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8910],{90693:(e,t,r)=>{"use strict";function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},i.apply(this,arguments)}r.d(t,{Z:()=>a});var n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,i({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))}));a.displayName="SwitchCamera"},85585:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))}));a.displayName="Video"},30967:(e,t,r)=>{"use strict";r.d(t,{X:()=>a});var i=r(31478),n=r(5057),o=r(95421),a=n.forwardRef((function(e,t){return n.createElement(o.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),n.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))}));a.displayName="X"},74947:function(e,t,r){var i;i=function(e){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(e,t,r){"use strict";r.r(t);var i=r("react"),n=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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),o=function(){return o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)},a=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};function s(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)}"undefined"!==typeof window&&(void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(r,i){t.call(navigator,e,r,i)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}));var c=function(e){function t(t){var r=e.call(this,t)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return n(t,e),t.prototype.componentDidMount=function(){var e=this.state,t=this.props;this.unmounted=!1,s()?(e.hasUserMedia||this.requestUserMedia(),t.children&&"function"!=typeof t.children&&console.warn("children must be a function")):t.onUserMediaError("getUserMedia not supported")},t.prototype.componentDidUpdate=function(e){var t=this.props;if(s()){var r=JSON.stringify(e.audioConstraints)!==JSON.stringify(t.audioConstraints),i=JSON.stringify(e.videoConstraints)!==JSON.stringify(t.videoConstraints),n=e.minScreenshotWidth!==t.minScreenshotWidth,o=e.minScreenshotHeight!==t.minScreenshotHeight;(i||n||o)&&(this.canvas=null,this.ctx=null),(r||i)&&(this.stopAndCleanup(),this.requestUserMedia())}else t.onUserMediaError("getUserMedia not supported")},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},t.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map((function(t){e.removeTrack(t),t.stop()})),e.getAudioTracks().map((function(t){e.removeTrack(t),t.stop()}))):e.stop())},t.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(t.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},t.prototype.getScreenshot=function(e){var t=this.state,r=this.props;if(!t.hasUserMedia)return null;var i=this.getCanvas(e);return i&&i.toDataURL(r.screenshotFormat,r.screenshotQuality)},t.prototype.getCanvas=function(e){var t=this.state,r=this.props;if(!this.video)return null;if(!t.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var i=this.video.videoWidth,n=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var o=i/n;n=(i=r.minScreenshotWidth||this.video.clientWidth)/o,r.minScreenshotHeight&&n<r.minScreenshotHeight&&(i=(n=r.minScreenshotHeight)*o)}this.canvas=document.createElement("canvas"),this.canvas.width=(null===e||void 0===e?void 0:e.width)||i,this.canvas.height=(null===e||void 0===e?void 0:e.height)||n,this.ctx=this.canvas.getContext("2d")}var a=this.ctx,s=this.canvas;return a&&s&&(r.mirrored&&(a.translate(s.width,0),a.scale(-1,1)),a.imageSmoothingEnabled=r.imageSmoothing,a.drawImage(this.video,0,0,(null===e||void 0===e?void 0:e.width)||s.width,(null===e||void 0===e?void 0:e.height)||s.height),r.mirrored&&(a.scale(-1,1),a.translate(-s.width,0))),s},t.prototype.requestUserMedia=function(){var e=this,r=this.props,i=function(i,n){var o={video:"undefined"===typeof n||n};r.audio&&(o.audio="undefined"===typeof i||i),e.requestUserMediaId++;var a=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(o).then((function(r){e.unmounted||a!==e.requestUserMediaId?t.stopMediaStream(r):e.handleUserMedia(null,r)})).catch((function(t){e.handleUserMedia(t)}))};if("mediaDevices"in navigator)i(r.audioConstraints,r.videoConstraints);else{var n=function(e){return{optional:[{sourceId:e}]}},o=function(e){var t=e.deviceId;return"string"===typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"===typeof t&&t.ideal?t.ideal:null};MediaStreamTrack.getSources((function(e){var t=null,a=null;e.forEach((function(e){"audio"===e.kind?t=e.id:"video"===e.kind&&(a=e.id)}));var s=o(r.audioConstraints);s&&(t=s);var c=o(r.videoConstraints);c&&(a=c),i(n(t),n(a))}))}},t.prototype.handleUserMedia=function(e,t){var r=this.props;if(e||!t)return this.setState({hasUserMedia:!1}),void r.onUserMediaError(e);this.stream=t;try{this.video&&(this.video.srcObject=t),this.setState({hasUserMedia:!0})}catch(i){this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(t)})}r.onUserMedia(t)},t.prototype.render=function(){var e=this,t=this.state,r=this.props,n=r.audio,s=(r.forceScreenshotSourceSize,r.onUserMedia,r.onUserMediaError,r.screenshotFormat,r.screenshotQuality,r.minScreenshotWidth,r.minScreenshotHeight,r.audioConstraints,r.videoConstraints,r.imageSmoothing,r.mirrored),c=r.style,d=void 0===c?{}:c,u=r.children,l=a(r,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),h=s?o(o({},d),{transform:(d.transform||"")+" scaleX(-1)"}):d,f={getScreenshot:this.getScreenshot.bind(this)};return i.createElement(i.Fragment,null,i.createElement("video",o({autoPlay:!0,src:t.src,muted:!n,playsInline:!0,ref:function(t){e.video=t},style:h},l)),u&&u(f))},t.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},t}(i.Component);t.default=c},react:function(t,r){t.exports=e}}).default},e.exports=i(r(5057))}}]);
|
package/build/static/js/{15.b28e3a9f.chunk.js.LICENSE.txt → 8910.e6dda87e.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[91],{20091:(t,e,l)=>{l.r(e),l.d(e,{default:()=>o});var s=l(4584),i=(l(5057),l(96266));function o({element:t,width:e}){const l=t.hasWidth?t.width:e;let o,r;t.scrolling?(o="auto",r={}):(o="no",r={overflow:"hidden"});const c=n(t.src),h=null!=c?void 0:n(t.srcdoc);return(0,i.jsx)("iframe",{allow:s.p,style:r,src:c,srcDoc:h,width:l,height:t.height,scrolling:o,sandbox:s.T,title:"st.iframe"})}function n(t){return null==t||""===t?void 0:t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9462],{69462:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n});var r=s(5057),u=s(85493),i=s(22199),a=s(13294),l=s(96266);function n({element:t,width:e}){const s=(0,r.useRef)(null),{getBaseUriParts:n}=(0,r.useContext)(u.Z);(0,r.useEffect)((()=>{s.current&&(s.current.currentTime=t.startTime)}),[t.startTime]);const c=(0,a.O0)(t.url),o=(0,i.Bz)(c,n());return(0,l.jsx)("audio",{id:"audio",ref:s,controls:!0,src:o,className:"stAudio",style:{width:e}})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9551],{29551:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var s=r(5057),a=r(85493),n=r(32291),i=r(22199),l=r(13294),o=r(96266);const d=528;function c({element:e,width:t}){const r=(0,s.useRef)(null),{getBaseUriParts:c}=(0,s.useContext)(a.Z),{type:u,url:h}=e,m=(0,l.O0)(h);(0,s.useEffect)((()=>{const t=r.current,s=()=>{t&&(t.currentTime=e.startTime)};return t&&t.addEventListener("loadedmetadata",s),()=>{t&&t.removeEventListener("loadedmetadata",s)}}),[e]);const f=t=>{const{startTime:r}=e;return r?`${t}?start=${r}`:t};if(u===n.nk.Type.YOUTUBE_IFRAME){const e=0!==t?.75*t:d;return(0,o.jsx)("iframe",{title:m,src:f(m),width:t,height:e,frameBorder:"0",allow:"autoplay; encrypted-media",allowFullScreen:!0})}return(0,o.jsx)("video",{ref:r,controls:!0,src:(0,i.Bz)(m,c()),className:"stVideo",style:{width:t,height:0===t?d:void 0}})}}}]);
|