@micromag/viewer-build 0.3.446 → 0.3.448

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 (49) hide show
  1. package/build/asset-manifest.json +25 -25
  2. package/build/index.html +1 -1
  3. package/build/static/css/main.151d7a64.css +3 -0
  4. package/build/static/js/127.62d3ad58.chunk.js +1 -0
  5. package/build/static/js/175.22f3c6d5.chunk.js +1 -0
  6. package/build/static/js/224.a93d4351.chunk.js +1 -0
  7. package/build/static/js/278.7ce2d1fd.chunk.js +1 -0
  8. package/build/static/js/310.232aaeef.chunk.js +1 -0
  9. package/build/static/js/348.2f3ae826.chunk.js +1 -0
  10. package/build/static/js/399.8df2833f.chunk.js +1 -0
  11. package/build/static/js/466.b2545363.chunk.js +1 -0
  12. package/build/static/js/50.8b4607c9.chunk.js +2 -0
  13. package/build/static/js/525.1f6a8715.chunk.js +1 -0
  14. package/build/static/js/536.bf000a63.chunk.js +1 -0
  15. package/build/static/js/610.48218718.js +2 -0
  16. package/build/static/js/{458.754925ee.js.LICENSE.txt → 610.48218718.js.LICENSE.txt} +0 -9
  17. package/build/static/js/645.df9a2aa9.chunk.js +2 -0
  18. package/build/static/js/690.6d43fefc.chunk.js +1 -0
  19. package/build/static/js/838.bf67a5f2.chunk.js +1 -0
  20. package/build/static/js/910.6bdc0d76.chunk.js +1 -0
  21. package/build/static/js/955.2e663733.chunk.js +1 -0
  22. package/build/static/js/969.2db36558.chunk.js +1 -0
  23. package/build/static/js/main.e1a9875c.js +2 -0
  24. package/build/static/js/runtime~main.569a9d1b.js +1 -0
  25. package/package.json +6 -7
  26. package/build/static/css/main.12fa6f9c.css +0 -3
  27. package/build/static/js/127.ecee243c.chunk.js +0 -1
  28. package/build/static/js/175.43cc18cc.chunk.js +0 -1
  29. package/build/static/js/224.a7ff47c0.chunk.js +0 -1
  30. package/build/static/js/278.104cc999.chunk.js +0 -1
  31. package/build/static/js/310.57bc752b.chunk.js +0 -1
  32. package/build/static/js/348.46e5aa48.chunk.js +0 -1
  33. package/build/static/js/399.a996319d.chunk.js +0 -1
  34. package/build/static/js/458.754925ee.js +0 -2
  35. package/build/static/js/466.fed09323.chunk.js +0 -1
  36. package/build/static/js/50.30a13049.chunk.js +0 -2
  37. package/build/static/js/525.af68af36.chunk.js +0 -1
  38. package/build/static/js/536.9840925e.chunk.js +0 -1
  39. package/build/static/js/645.00ab18b4.chunk.js +0 -2
  40. package/build/static/js/690.2b6d4b51.chunk.js +0 -1
  41. package/build/static/js/838.bb614050.chunk.js +0 -1
  42. package/build/static/js/910.bde92f36.chunk.js +0 -1
  43. package/build/static/js/955.22d55535.chunk.js +0 -1
  44. package/build/static/js/969.1f600cdd.chunk.js +0 -1
  45. package/build/static/js/main.c218bb22.js +0 -2
  46. package/build/static/js/runtime~main.72b91df2.js +0 -1
  47. /package/build/static/js/{50.30a13049.chunk.js.LICENSE.txt → 50.8b4607c9.chunk.js.LICENSE.txt} +0 -0
  48. /package/build/static/js/{645.00ab18b4.chunk.js.LICENSE.txt → 645.df9a2aa9.chunk.js.LICENSE.txt} +0 -0
  49. /package/build/static/js/{main.c218bb22.js.LICENSE.txt → main.e1a9875c.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_micromag_viewer_build=self.webpackChunk_micromag_viewer_build||[]).push([[969],{56180:function(e){e.exports=function(e,t,i){return new Promise((o=>{e.toBlob(o,t,i)}))}},11688:function(e){const t={"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};e.exports=function(e){return[e]=e.split(";",1),t[e]||null}},45441:function(e,t,i){var o=i(33847);e.exports=()=>(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",fill:"#0097DC",width:"66",height:"55",viewBox:"0 0 66 55"},(0,o.h)("path",{d:"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z",fillRule:"evenodd"}))},97689:function(e,t,i){var o=i(33847);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},s.apply(this,arguments)}const r=i(49473),n=i(22153),c=i(85836),a=i(89831),d=i(85332),h=i(71981);function u(e,t){return-1!==e.indexOf(t)}class p extends o.Component{componentDidMount(){const{onFocus:e}=this.props;e()}componentWillUnmount(){const{onStop:e}=this.props;e()}render(){const{src:e,recordedVideo:t,recording:i,modes:p,supportsRecording:l,videoSources:g,showVideoSourceDropdown:m,showRecordingLength:v,onSubmit:f,i18n:b,mirror:y,onSnapshot:w,onStartRecording:S,onStopRecording:R,onDiscardRecordedVideo:C,recordingLengthSeconds:x}=this.props,P=!!t,k=!P&&l&&(u(p,"video-only")||u(p,"audio-only")||u(p,"video-audio")),I=!P&&u(p,"picture"),M=l&&v&&!P,T=m&&g&&g.length>1,V={playsinline:!0};return t?(V.muted=!1,V.controls=!0,V.src=t,this.videoElement&&(this.videoElement.srcObject=void 0)):(V.muted=!0,V.autoplay=!0,V.srcObject=e),(0,o.h)("div",{className:"uppy uppy-Webcam-container"},(0,o.h)("div",{className:"uppy-Webcam-videoContainer"},(0,o.h)("video",s({ref:e=>this.videoElement=e,className:"uppy-Webcam-video "+(y?"uppy-Webcam-video--mirrored":"")},V))),(0,o.h)("div",{className:"uppy-Webcam-footer"},(0,o.h)("div",{className:"uppy-Webcam-videoSourceContainer"},T?a(this.props):null),(0,o.h)("div",{className:"uppy-Webcam-buttonContainer"},I&&(0,o.h)(r,{onSnapshot:w,i18n:b}),k&&(0,o.h)(n,{recording:i,onStartRecording:S,onStopRecording:R,i18n:b}),P&&(0,o.h)(d,{onSubmit:f,i18n:b}),P&&(0,o.h)(h,{onDiscard:C,i18n:b})),(0,o.h)("div",{className:"uppy-Webcam-recordingLength"},M&&(0,o.h)(c,{recordingLengthSeconds:x,i18n:b}))))}}e.exports=p},71981:function(e,t,i){var o=i(33847);e.exports=function(e){let{onDiscard:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--discard",type:"button",title:i("discardRecordedFile"),"aria-label":i("discardRecordedFile"),onClick:t,"data-uppy-super-focusable":!0},(0,o.h)("svg",{width:"13",height:"13",viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon"},(0,o.h)("g",{fill:"#FFF",fillRule:"evenodd"},(0,o.h)("path",{d:"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z"}),(0,o.h)("path",{d:"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z"}))))}},22338:function(e,t,i){var o=i(33847);e.exports=e=>{let{icon:t,i18n:i,hasCamera:s}=e;return(0,o.h)("div",{className:"uppy-Webcam-permissons"},(0,o.h)("div",{className:"uppy-Webcam-permissonsIcon"},t()),(0,o.h)("h1",{className:"uppy-Webcam-title"},i(s?"allowAccessTitle":"noCameraTitle")),(0,o.h)("p",null,i(s?"allowAccessDescription":"noCameraDescription")))}},22153:function(e,t,i){var o=i(33847);e.exports=function(e){let{recording:t,onStartRecording:i,onStopRecording:s,i18n:r}=e;return t?(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("stopRecording"),"aria-label":r("stopRecording"),onClick:s,"data-uppy-super-focusable":!0},(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100"},(0,o.h)("rect",{x:"15",y:"15",width:"70",height:"70"}))):(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button",type:"button",title:r("startRecording"),"aria-label":r("startRecording"),onClick:i,"data-uppy-super-focusable":!0},(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"100",height:"100",viewBox:"0 0 100 100"},(0,o.h)("circle",{cx:"50",cy:"50",r:"40"})))}},85836:function(e,t,i){var o=i(33847);const s=i(83834);e.exports=function(e){let{recordingLengthSeconds:t,i18n:i}=e;const r=s(t);return(0,o.h)("span",{"aria-label":i("recordingLength",{recording_length:r})},r)}},49473:function(e,t,i){var o=i(33847);const s=i(45441);e.exports=e=>{let{onSnapshot:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture",type:"button",title:i("takePicture"),"aria-label":i("takePicture"),onClick:t,"data-uppy-super-focusable":!0},s())}},85332:function(e,t,i){var o=i(33847);e.exports=function(e){let{onSubmit:t,i18n:i}=e;return(0,o.h)("button",{className:"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--submit",type:"button",title:i("submitRecordedFile"),"aria-label":i("submitRecordedFile"),onClick:t,"data-uppy-super-focusable":!0},(0,o.h)("svg",{width:"12",height:"9",viewBox:"0 0 12 9",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",className:"uppy-c-icon"},(0,o.h)("path",{fill:"#fff",fillRule:"nonzero",d:"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z"})))}},89831:function(e,t,i){var o=i(33847);e.exports=e=>{let{currentDeviceId:t,videoSources:i,onChangeVideoSource:s}=e;return(0,o.h)("div",{className:"uppy-Webcam-videoSource"},(0,o.h)("select",{className:"uppy-u-reset uppy-Webcam-videoSource-select",onChange:e=>{s(e.target.value)}},i.map((e=>(0,o.h)("option",{key:e.deviceId,value:e.deviceId,selected:e.deviceId===t},e.label)))))}},12497:function(e,t,i){var o=i(33847),s=i(42127);function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},r.apply(this,arguments)}function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var c=0;function a(e){return"__private_"+c+++"_"+e}const d=i(11688),h=i(7467),u=i(56180),p=i(31380),l=i(45441),g=i(97689),m=i(22338),v=i(39641);function f(e){return"."===e[0]?h[e.slice(1)]:e}function b(e){return/^video\/[^*]+$/.test(e)}function y(e){return/^image\/[^*]+$/.test(e)}var w=a("enableMirror");class S extends s.UIPlugin{constructor(e,t){super(e,t),Object.defineProperty(this,w,{writable:!0,value:void 0}),this.mediaDevices=navigator.mediaDevices,this.supportsUserMedia=!!this.mediaDevices,this.protocol=location.protocol.match(/https/i)?"https":"http",this.id=this.opts.id||"Webcam",this.type="acquirer",this.capturedMediaFile=null,this.icon=()=>(0,o.h)("svg",{"aria-hidden":"true",focusable:"false",width:"32",height:"32",viewBox:"0 0 32 32"},(0,o.h)("g",{fill:"none",fillRule:"evenodd"},(0,o.h)("rect",{className:"uppy-ProviderIconBg",fill:"#03BFEF",width:"32",height:"32",rx:"16"}),(0,o.h)("path",{d:"M22 11c1.133 0 2 .867 2 2v7.333c0 1.134-.867 2-2 2H10c-1.133 0-2-.866-2-2V13c0-1.133.867-2 2-2h2.333l1.134-1.733C13.6 9.133 13.8 9 14 9h4c.2 0 .4.133.533.267L19.667 11H22zm-6 1.533a3.764 3.764 0 0 0-3.8 3.8c0 2.129 1.672 3.801 3.8 3.801s3.8-1.672 3.8-3.8c0-2.13-1.672-3.801-3.8-3.801zm0 6.261c-1.395 0-2.46-1.066-2.46-2.46 0-1.395 1.065-2.461 2.46-2.461s2.46 1.066 2.46 2.46c0 1.395-1.065 2.461-2.46 2.461z",fill:"#FFF",fillRule:"nonzero"}))),this.defaultLocale=v;const i={onBeforeSnapshot:()=>Promise.resolve(),countdown:!1,modes:["video-audio","video-only","audio-only","picture"],mirror:!0,showVideoSourceDropdown:!1,facingMode:"user",preferredImageMimeType:null,preferredVideoMimeType:null,showRecordingLength:!1};this.opts={...i,...t},this.i18nInit(),this.title=this.i18n("pluginNameCamera"),n(this,w)[w]=this.opts.mirror,this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.takeSnapshot=this.takeSnapshot.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.discardRecordedVideo=this.discardRecordedVideo.bind(this),this.submit=this.submit.bind(this),this.oneTwoThreeSmile=this.oneTwoThreeSmile.bind(this),this.focus=this.focus.bind(this),this.changeVideoSource=this.changeVideoSource.bind(this),this.webcamActive=!1,this.opts.countdown&&(this.opts.onBeforeSnapshot=this.oneTwoThreeSmile),this.setPluginState({hasCamera:!1,cameraReady:!1,cameraError:null,recordingLengthSeconds:0,videoSources:[],currentDeviceId:null})}setOptions(e){super.setOptions({...e,videoConstraints:{...this.opts.videoConstraints,...null==e?void 0:e.videoConstraints}})}hasCameraCheck(){return this.mediaDevices?this.mediaDevices.enumerateDevices().then((e=>e.some((e=>"videoinput"===e.kind)))):Promise.resolve(!1)}isAudioOnly(){return 1===this.opts.modes.length&&"audio-only"===this.opts.modes[0]}getConstraints(e){void 0===e&&(e=null);const t=-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("audio-only"),i=!this.isAudioOnly()&&(-1!==this.opts.modes.indexOf("video-audio")||-1!==this.opts.modes.indexOf("video-only")||-1!==this.opts.modes.indexOf("picture")),o={...this.opts.videoConstraints||{facingMode:this.opts.facingMode},...e?{deviceId:e,facingMode:null}:{}};return{audio:t,video:!!i&&o}}start(e){if(void 0===e&&(e=null),!this.supportsUserMedia)return Promise.reject(new Error("Webcam access not supported"));this.webcamActive=!0,this.opts.mirror&&(n(this,w)[w]=!0);const t=this.getConstraints(e&&e.deviceId?e.deviceId:null);this.hasCameraCheck().then((i=>(this.setPluginState({hasCamera:i}),this.mediaDevices.getUserMedia(t).then((t=>{this.stream=t;let i=null;const o=this.isAudioOnly()?t.getAudioTracks():t.getVideoTracks();e&&e.deviceId?o.forEach((t=>{t.getSettings().deviceId===e.deviceId&&(i=t.getSettings().deviceId)})):i=o[0].getSettings().deviceId,this.updateVideoSources(),this.setPluginState({currentDeviceId:i,cameraReady:!0})})).catch((e=>{this.setPluginState({cameraReady:!1,cameraError:e}),this.uppy.info(e.message,"error")})))))}getMediaRecorderOptions(){const e={};if(MediaRecorder.isTypeSupported){const{restrictions:t}=this.uppy.opts;let i=[];this.opts.preferredVideoMimeType?i=[this.opts.preferredVideoMimeType]:t.allowedFileTypes&&(i=t.allowedFileTypes.map(f).filter(b));const o=e=>MediaRecorder.isTypeSupported(e)&&d(e),s=i.filter(o);s.length>0&&(e.mimeType=s[0])}return e}startRecording(){this.recorder=new MediaRecorder(this.stream,this.getMediaRecorderOptions()),this.recordingChunks=[];let e=!1;this.recorder.addEventListener("dataavailable",(t=>{this.recordingChunks.push(t.data);const{restrictions:i}=this.uppy.opts;if(this.recordingChunks.length>1&&null!=i.maxFileSize&&!e){const t=this.recordingChunks.reduce(((e,t)=>e+t.size),0),o=(t-this.recordingChunks[0].size)/(this.recordingChunks.length-1)*3;t>Math.max(0,i.maxFileSize-o)&&(e=!0,this.uppy.info(this.i18n("recordingStoppedMaxSize"),"warning",4e3),this.stopRecording())}})),this.recorder.start(500),this.opts.showRecordingLength&&(this.recordingLengthTimer=setInterval((()=>{const e=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:e+1})}),1e3)),this.setPluginState({isRecording:!0})}stopRecording(){return new Promise((e=>{this.recorder.addEventListener("stop",(()=>{e()})),this.recorder.stop(),this.opts.showRecordingLength&&(clearInterval(this.recordingLengthTimer),this.setPluginState({recordingLengthSeconds:0}))})).then((()=>(this.setPluginState({isRecording:!1}),this.getVideo()))).then((e=>{try{this.capturedMediaFile=e,this.setPluginState({recordedVideo:URL.createObjectURL(e.data)}),n(this,w)[w]=!1}catch(e){e.isRestriction||this.uppy.log(e)}})).then((()=>{this.recordingChunks=null,this.recorder=null}),(e=>{throw this.recordingChunks=null,this.recorder=null,e}))}discardRecordedVideo(){this.setPluginState({recordedVideo:null}),this.opts.mirror&&(n(this,w)[w]=!0),this.capturedMediaFile=null}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,"error")}}async stop(){if(this.stream){const e=this.stream.getAudioTracks(),t=this.stream.getVideoTracks();e.concat(t).forEach((e=>e.stop()))}this.recorder&&await new Promise((e=>{this.recorder.addEventListener("stop",e,{once:!0}),this.recorder.stop(),this.opts.showRecordingLength&&clearInterval(this.recordingLengthTimer)})),this.recordingChunks=null,this.recorder=null,this.webcamActive=!1,this.stream=null,this.setPluginState({recordedVideo:null,isRecording:!1,recordingLengthSeconds:0})}getVideoElement(){return this.el.querySelector(".uppy-Webcam-video")}oneTwoThreeSmile(){return new Promise(((e,t)=>{let i=this.opts.countdown;const o=setInterval((()=>{if(!this.webcamActive)return clearInterval(o),this.captureInProgress=!1,t(new Error("Webcam is not active"));i>0?(this.uppy.info(`${i}...`,"warning",800),i--):(clearInterval(o),this.uppy.info(this.i18n("smile"),"success",1500),setTimeout((()=>e()),1500))}),1e3)}))}takeSnapshot(){this.captureInProgress||(this.captureInProgress=!0,this.opts.onBeforeSnapshot().catch((e=>{const t="object"==typeof e?e.message:e;return this.uppy.info(t,"error",5e3),Promise.reject(new Error(`onBeforeSnapshot: ${t}`))})).then((()=>this.getImage())).then((e=>{this.captureInProgress=!1;try{this.uppy.addFile(e)}catch(e){e.isRestriction||this.uppy.log(e)}}),(e=>{throw this.captureInProgress=!1,e})))}getImage(){const e=this.getVideoElement();if(!e)return Promise.reject(new Error("No video element found, likely due to the Webcam tab being closed."));const t=e.videoWidth,i=e.videoHeight,o=document.createElement("canvas");o.width=t,o.height=i,o.getContext("2d").drawImage(e,0,0);const{restrictions:s}=this.uppy.opts;let r=[];this.opts.preferredImageMimeType?r=[this.opts.preferredImageMimeType]:s.allowedFileTypes&&(r=s.allowedFileTypes.map(f).filter(y));const n=r[0]||"image/jpeg",c=d(n)||"jpg",a=`cam-${Date.now()}.${c}`;return u(o,n).then((e=>({source:this.id,name:a,data:new Blob([e],{type:n}),type:n})))}getVideo(){const e=this.recordingChunks.find((e=>{var t;return(null==(t=e.type)?void 0:t.length)>0})).type,t=d(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type "${e}"`));const i=`webcam-${Date.now()}.${t}`,o=new Blob(this.recordingChunks,{type:e}),s={source:this.id,name:i,data:new Blob([o],{type:e}),type:e};return Promise.resolve(s)}focus(){this.opts.countdown&&setTimeout((()=>{this.uppy.info(this.i18n("smile"),"success",1500)}),1e3)}changeVideoSource(e){this.stop(),this.start({deviceId:e})}updateVideoSources(){this.mediaDevices.enumerateDevices().then((e=>{this.setPluginState({videoSources:e.filter((e=>"videoinput"===e.kind))})}))}render(){this.webcamActive||this.start();const e=this.getPluginState();return e.cameraReady&&e.hasCamera?(0,o.h)(g,r({},e,{onChangeVideoSource:this.changeVideoSource,onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onDiscardRecordedVideo:this.discardRecordedVideo,onSubmit:this.submit,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,showRecordingLength:this.opts.showRecordingLength,showVideoSourceDropdown:this.opts.showVideoSourceDropdown,supportsRecording:p(),recording:e.isRecording,mirror:n(this,w)[w],src:this.stream})):(0,o.h)(m,{icon:l,i18n:this.i18n,hasCamera:e.hasCamera})}install(){this.setPluginState({cameraReady:!1,recordingLengthSeconds:0});const{target:e}=this.opts;e&&this.mount(e,this),this.mediaDevices&&(this.updateVideoSources(),this.mediaDevices.ondevicechange=()=>{if(this.updateVideoSources(),this.stream){let e=!0;const{videoSources:t,currentDeviceId:i}=this.getPluginState();t.forEach((t=>{i===t.deviceId&&(e=!1)})),e&&(this.stop(),this.start())}})}uninstall(){this.stop(),this.unmount()}onUnmount(){this.stop()}}S.VERSION="2.2.2",e.exports=S},83834:function(e){e.exports=function(e){return`${Math.floor(e/60)}:${String(e%60).padStart(2,0)}`}},60969:function(e,t,i){e.exports=i(12497)},39641:function(e){e.exports={strings:{pluginNameCamera:"Camera",noCameraTitle:"Camera Not Available",noCameraDescription:"In order to take pictures or record video, please connect a camera device",recordingStoppedMaxSize:"Recording stopped because the file size is about to exceed the limit",submitRecordedFile:"Submit recorded file",discardRecordedFile:"Discard recorded file",smile:"Smile!",takePicture:"Take a picture",startRecording:"Begin video recording",stopRecording:"Stop video recording",recordingLength:"Recording length %{recording_length}",allowAccessTitle:"Please allow access to your camera",allowAccessDescription:"In order to take pictures or record video with your camera, please allow camera access for this site."}}},31380:function(e){e.exports=function(){return"function"==typeof MediaRecorder&&!!MediaRecorder.prototype&&"function"==typeof MediaRecorder.prototype.start}}}]);