@stlite/desktop 0.43.1 → 0.44.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.
Files changed (74) hide show
  1. package/bin/dump_artifacts.js +1 -1
  2. package/build/asset-manifest.json +40 -38
  3. package/build/index.html +1 -1
  4. package/build/static/js/1122.422f58fc.chunk.js +1 -0
  5. package/build/static/js/{144.2477d27a.chunk.js → 144.046792d9.chunk.js} +1 -1
  6. package/build/static/js/{1729.528431ca.chunk.js → 1729.d59ed152.chunk.js} +1 -1
  7. package/build/static/js/{1740.32a0c10e.chunk.js → 1740.2c71a97a.chunk.js} +1 -1
  8. package/build/static/js/{1839.a1fce0e6.chunk.js → 1839.0d0dcac8.chunk.js} +1 -1
  9. package/build/static/js/2372.844b5190.chunk.js +2 -0
  10. package/build/static/js/2372.844b5190.chunk.js.LICENSE.txt +10 -0
  11. package/build/static/js/2753.c27b6faa.chunk.js +1 -0
  12. package/build/static/js/2873.f5c04f3b.chunk.js +1 -0
  13. package/build/static/js/3208.55e0b2fa.chunk.js +1 -0
  14. package/build/static/js/{4021.16f5498a.chunk.js → 4021.ec2e87b0.chunk.js} +1 -1
  15. package/build/static/js/4482.a9238ad0.chunk.js +1 -0
  16. package/build/static/js/4494.6bb6fb20.chunk.js +1 -0
  17. package/build/static/js/4694.aa16aaee.chunk.js +1 -0
  18. package/build/static/js/4721.2185bda3.chunk.js +1 -0
  19. package/build/static/js/{4724.366489f9.chunk.js → 4724.374578aa.chunk.js} +1 -1
  20. package/build/static/js/4785.76a05d79.chunk.js +1 -0
  21. package/build/static/js/4831.391fe620.chunk.js +1 -0
  22. package/build/static/js/5299.beb80829.chunk.js +1 -0
  23. package/build/static/js/6093.209cd165.chunk.js +1 -0
  24. package/build/static/js/6134.b9e5b2db.chunk.js +1 -0
  25. package/build/static/js/6802.df955c77.chunk.js +1 -0
  26. package/build/static/js/698.116a166b.chunk.js +1 -0
  27. package/build/static/js/7125.afecc159.chunk.js +1 -0
  28. package/build/static/js/7579.ea965a43.chunk.js +1 -0
  29. package/build/static/js/7696.c9589682.chunk.js +1 -0
  30. package/build/static/js/8050.029f3dc8.chunk.js +1 -0
  31. package/build/static/js/8097.4837946f.chunk.js +2 -0
  32. package/build/static/js/8186.2f2e42e5.chunk.js +2 -0
  33. package/build/static/js/8186.2f2e42e5.chunk.js.LICENSE.txt +135 -0
  34. package/build/static/js/8850.6abc7336.chunk.js +1 -0
  35. package/build/static/js/{9166.d35e76c1.chunk.js → 9166.f234f6b4.chunk.js} +2 -2
  36. package/build/static/js/9311.7c7348b0.chunk.js +1 -0
  37. package/build/static/js/{5703.a68ecfdc.chunk.js → 9449.a2c361bb.chunk.js} +2 -2
  38. package/build/static/js/9699.df050cd6.chunk.js +1 -0
  39. package/build/static/js/9813.1821ef79.chunk.js +1 -0
  40. package/build/static/js/main.ca9c9d66.js +28 -0
  41. package/build/static/js/{main.94addb49.js.LICENSE.txt → main.ca9c9d66.js.LICENSE.txt} +0 -20
  42. package/package.json +5 -5
  43. package/build/static/css/7895.c24b25fa.chunk.css +0 -1
  44. package/build/static/js/1619.c039c65c.chunk.js +0 -1
  45. package/build/static/js/1687.a144d952.chunk.js +0 -1
  46. package/build/static/js/2873.cf145dcb.chunk.js +0 -1
  47. package/build/static/js/3185.d317b162.chunk.js +0 -1
  48. package/build/static/js/4232.b0bbe2e6.chunk.js +0 -2
  49. package/build/static/js/4232.b0bbe2e6.chunk.js.LICENSE.txt +0 -52
  50. package/build/static/js/4482.2f210b65.chunk.js +0 -1
  51. package/build/static/js/4494.c6ab91c6.chunk.js +0 -1
  52. package/build/static/js/4694.7e63f0ef.chunk.js +0 -1
  53. package/build/static/js/4785.3ac653c2.chunk.js +0 -1
  54. package/build/static/js/4831.3170175f.chunk.js +0 -1
  55. package/build/static/js/5037.03a99abb.chunk.js +0 -1
  56. package/build/static/js/5299.ad735cb8.chunk.js +0 -1
  57. package/build/static/js/5361.bc476229.chunk.js +0 -2
  58. package/build/static/js/6134.5e3e3f58.chunk.js +0 -1
  59. package/build/static/js/6802.ffb6887c.chunk.js +0 -1
  60. package/build/static/js/698.7dce549b.chunk.js +0 -1
  61. package/build/static/js/7125.21833215.chunk.js +0 -1
  62. package/build/static/js/7579.7b9cc9ee.chunk.js +0 -1
  63. package/build/static/js/7652.f436cbbf.chunk.js +0 -1
  64. package/build/static/js/7696.406d4ef7.chunk.js +0 -1
  65. package/build/static/js/7895.198c568c.chunk.js +0 -1
  66. package/build/static/js/9311.f444417e.chunk.js +0 -1
  67. package/build/static/js/9813.c894655a.chunk.js +0 -1
  68. package/build/static/js/main.94addb49.js +0 -28
  69. /package/build/static/css/{7652.c24b25fa.chunk.css → 8050.c24b25fa.chunk.css} +0 -0
  70. /package/build/static/css/{5703.1edfa457.chunk.css → 9449.1edfa457.chunk.css} +0 -0
  71. /package/build/static/css/{1619.7ce51b75.chunk.css → 9699.7ce51b75.chunk.css} +0 -0
  72. /package/build/static/js/{5361.bc476229.chunk.js.LICENSE.txt → 8097.4837946f.chunk.js.LICENSE.txt} +0 -0
  73. /package/build/static/js/{9166.d35e76c1.chunk.js.LICENSE.txt → 9166.f234f6b4.chunk.js.LICENSE.txt} +0 -0
  74. /package/build/static/js/{5703.a68ecfdc.chunk.js.LICENSE.txt → 9449.a2c361bb.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1,135 @@
1
+ /* flatpickr v4.6.6, @license MIT */
2
+
3
+ /*!
4
+ * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)
5
+ *
6
+ * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
7
+ * All Rights Reserved. Apache Software License 2.0
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ */
11
+
12
+ /*!
13
+ * Sizzle CSS Selector Engine v2.3.6
14
+ * https://sizzlejs.com/
15
+ *
16
+ * Copyright JS Foundation and other contributors
17
+ * Released under the MIT license
18
+ * https://js.foundation/
19
+ *
20
+ * Date: 2021-02-16
21
+ */
22
+
23
+ /*!
24
+ * jQuery JavaScript Library v3.6.0
25
+ * https://jquery.com/
26
+ *
27
+ * Includes Sizzle.js
28
+ * https://sizzlejs.com/
29
+ *
30
+ * Copyright OpenJS Foundation and other contributors
31
+ * Released under the MIT license
32
+ * https://jquery.org/license
33
+ *
34
+ * Date: 2021-03-02T17:08Z
35
+ */
36
+
37
+ /*!
38
+ * jQuery Mousewheel 3.1.13
39
+ *
40
+ * Copyright jQuery Foundation and other contributors
41
+ * Released under the MIT license
42
+ * http://jquery.org/license
43
+ */
44
+
45
+ /*!
46
+ * jquery.event.drag - v 2.3.0
47
+ * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
48
+ * Open Source MIT License - http://threedubmedia.com/code/license
49
+ */
50
+
51
+ /*!
52
+ * jquery.event.drop - v 2.3.0
53
+ * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
54
+ * Open Source MIT License - http://threedubmedia.com/code/license
55
+ */
56
+
57
+ /*!
58
+ * numbro.js
59
+ * version : 1.6.2
60
+ * author : Företagsplatsen AB
61
+ * license : MIT
62
+ * http://www.foretagsplatsen.se
63
+ */
64
+
65
+ /*!
66
+ * Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
67
+ * All rights reserved.
68
+ *
69
+ * Redistribution and use in source and binary forms, with or without modification,
70
+ * are permitted provided that the following conditions are met:
71
+ *
72
+ * Redistributions of source code must retain the above copyright notice,
73
+ * this list of conditions and the following disclaimer.
74
+ *
75
+ * Redistributions in binary form must reproduce the above copyright notice,
76
+ * this list of conditions and the following disclaimer in the documentation
77
+ * and/or other materials provided with the distribution.
78
+ *
79
+ * Neither the name of Anaconda nor the names of any contributors
80
+ * may be used to endorse or promote products derived from this software
81
+ * without specific prior written permission.
82
+ *
83
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
84
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
85
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
86
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
87
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
88
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
89
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
90
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
91
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
92
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
93
+ * THE POSSIBILITY OF SUCH DAMAGE.
94
+ */
95
+
96
+ /*! *****************************************************************************
97
+ Copyright (c) Microsoft Corporation.
98
+
99
+ Permission to use, copy, modify, and/or distribute this software for any
100
+ purpose with or without fee is hereby granted.
101
+
102
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
103
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
104
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
105
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
106
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
107
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
108
+ PERFORMANCE OF THIS SOFTWARE.
109
+ ***************************************************************************** */
110
+
111
+ /*! Hammer.JS - v2.0.7 - 2016-04-22
112
+ * http://hammerjs.github.io/
113
+ *
114
+ * Copyright (c) 2016 Jorik Tangelder;
115
+ * Licensed under the MIT license */
116
+
117
+ /*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
118
+
119
+ /**
120
+ * @license
121
+ * (c) 2009-2016 Michael Leibman
122
+ * michael{dot}leibman{at}gmail{dot}com
123
+ * http://github.com/mleibman/slickgrid
124
+ *
125
+ * Distributed under MIT license.
126
+ * All rights reserved.
127
+ *
128
+ * SlickGrid v2.4
129
+ *
130
+ * NOTES:
131
+ * Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.
132
+ * This increases the speed dramatically, but can only be done safely because there are no event handlers
133
+ * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()
134
+ * and do proper cleanup.
135
+ */
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[8850,2753],{98850:(e,t,r)=>{r.r(t),r.d(t,{FileHandle:()=>h});var n=r(52753),s=r(51059);const{WritableStream:a,TransformStream:i,DOMException:o,Blob:l}=s.Z,{GONE:c}=n.errors,d=/constructor/i.test(window.HTMLElement)||window.safari||window.WebKitPoint;class h{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new o(...c)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await(navigator.serviceWorker?.getRegistration()),r=document.createElement("a"),n=new i,s=n.writable;if(r.download=this.name,d||!t){let e=[];n.readable.pipeTo(new a({write(t){e.push(new l([t]))},close(){const t=new l(e,{type:"application/octet-stream; charset=utf-8"});e=[],r.href=URL.createObjectURL(t),r.click(),setTimeout((()=>URL.revokeObjectURL(r.href)),1e4)}}))}else{const{writable:r,readablePort:s}=new m(a),o=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),l={"content-disposition":"attachment; filename*=UTF-8''"+o,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},c=setTimeout((()=>t.active.postMessage(0)),1e4);n.readable.pipeThrough(new i({transform(e,t){if(e instanceof Uint8Array)return t.enqueue(e);const r=new Response(e).body.getReader(),n=e=>r.read().then((e=>e.done?0:n(t.enqueue(e.value))));return n()}})).pipeTo(r).finally((()=>{clearInterval(c)})),t.active.postMessage({url:t.scope+o,headers:l,readablePort:s},[s]);const d=document.createElement("iframe");d.hidden=!0,d.src=t.scope+o,document.body.appendChild(d)}return s.getWriter()}}class p{constructor(e){e.onmessage=e=>this._onMessage(e.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:0,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:2}),this._port.close()}abort(e){this._port.postMessage({type:1,reason:e}),this._port.close()}_onMessage(e){0===e.type&&this._resolveReady(),1===e.type&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise(((e,t)=>{this._readyResolve=e,this._readyReject=t})),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch((()=>{})),this._readyReject(e),this._readyPending=!1}}class m{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new p(t.port2))}}},52753:(e,t,r)=>{r.r(t),r.d(t,{config:()=>s,errors:()=>n,fromDataTransfer:()=>a,getDirHandlesFromInput:()=>i,getFileHandlesFromInput:()=>o});const n={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:e=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${e}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},s={writable:globalThis.WritableStream};async function a(e){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[t,n,s]=await Promise.all([r.e(4721).then(r.bind(r,34721)),r.e(6093).then(r.bind(r,96093)),Promise.resolve().then(r.bind(r,15532))]),a=new t.FolderHandle("",!1);return a._entries=e.map((e=>e.isFile?new n.FileHandle(e,!1):new n.FolderHandle(e,!1))),new s.FileSystemDirectoryHandle(a)}async function i(e){const{FolderHandle:t,FileHandle:n}=await r.e(4721).then(r.bind(r,34721)),{FileSystemDirectoryHandle:s}=await Promise.resolve().then(r.bind(r,15532)),a=Array.from(e.files),i=a[0].webkitRelativePath.split("/",1)[0],o=new t(i,!1);return a.forEach((e=>{const r=e.webkitRelativePath.split("/");r.shift();const s=r.pop();r.reduce(((e,r)=>(e._entries[r]||(e._entries[r]=new t(r,!1)),e._entries[r])),o)._entries[s]=new n(e.name,e,!1)})),new s(o)}async function o(e){const{FileHandle:t}=await r.e(4721).then(r.bind(r,34721)),{FileSystemFileHandle:n}=await Promise.resolve().then(r.bind(r,11445));return Array.from(e.files).map((e=>new n(new t(e.name,e,!1))))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 9166.d35e76c1.chunk.js.LICENSE.txt */
2
- (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9166],{96457:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var i=r(7896),n=r(5057),o=r(63947),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 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(7896),n=r(5057),o=r(63947),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(7896),n=r(5057),o=r(63947),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&&(s.width=(null===e||void 0===e?void 0:e.width)||s.width,s.height=(null===e||void 0===e?void 0:e.height)||s.height,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.disablePictureInPicture),c=(r.onUserMedia,r.onUserMediaError,r.screenshotFormat,r.screenshotQuality,r.minScreenshotWidth,r.minScreenshotHeight,r.audioConstraints,r.videoConstraints,r.imageSmoothing,r.mirrored),d=r.style,u=void 0===d?{}:d,l=r.children,h=a(r,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),f=c?o(o({},u),{transform:(u.transform||"")+" scaleX(-1)"}):u,p={getScreenshot:this.getScreenshot.bind(this)};return i.createElement(i.Fragment,null,i.createElement("video",o({autoPlay:!0,disablePictureInPicture:s,src:t.src,muted:!n,playsInline:!0,ref:function(t){e.video=t},style:f},h)),l&&l(p))},t.defaultProps={audio:!1,disablePictureInPicture:!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))}}]);
1
+ /*! For license information please see 9166.f234f6b4.chunk.js.LICENSE.txt */
2
+ (globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9166],{96457:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var i=r(7896),n=r(5057),o=r(63947),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 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(7896),n=r(5057),o=r(63947),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(7896),n=r(5057),o=r(63947),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&&(s.width=(null===e||void 0===e?void 0:e.width)||s.width,s.height=(null===e||void 0===e?void 0:e.height)||s.height,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))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_stlite_desktop=globalThis.webpackChunk_stlite_desktop||[]).push([[9311],{9311:(t,e,l)=>{l.r(e),l.d(e,{default:()=>o});var s=l(73746),i=(l(5057),l(96266));function o(t){let{element:e,width:l}=t;const o=e.hasWidth?e.width:l;let n,c;e.scrolling?(n="auto",c={}):(n="no",c={overflow:"hidden"}),c.colorScheme="light dark";const d=r(e.src),h=null!=d?void 0:r(e.srcdoc);return(0,i.jsx)("iframe",{"data-testid":"stIFrame",allow:s.p,style:c,src:d,srcDoc:h,width:o,height:e.height,scrolling:n,sandbox:s.T,title:"st.iframe"})}function r(t){return null==t||""===t?void 0:t}}}]);