!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=339)}({339:function(t,e,n){window.MediaRecorder=n(340)},340:function(t,e,n){var i,r=window.AudioContext||window.webkitAudioContext;function s(t){var e=new Event("error");return e.data=new Error("Wrong state for "+t),e}function a(t){var e,n,i;this.stream=t,this.state="inactive",this.em=document.createDocumentFragment(),this.encoder=(e=a.encoder,n=e.toString().replace(/^function\s*\(\)\s*{/,"").replace(/}$/,""),i=new Blob([n]),new Worker(URL.createObjectURL(i)));var r=this;this.encoder.addEventListener("message",function(t){var e=new Event("dataavailable");e.data=new Blob([t.data],{type:r.mimeType}),r.em.dispatchEvent(e),"inactive"===r.state&&r.em.dispatchEvent(new Event("stop"))})}a.prototype={mimeType:"audio/wav",start:function(t){if("inactive"!==this.state)return this.em.dispatchEvent(s("start"));this.state="recording",i||(i=new r);var e=i.createMediaStreamSource(this.stream),n=i.createScriptProcessor(2048,1,1),a=this;n.onaudioprocess=function(t){"recording"===a.state&&a.encoder.postMessage(["encode",t.inputBuffer.getChannelData(0)])},e.connect(n),n.connect(i.destination),this.em.dispatchEvent(new Event("start")),t&&(this.slicing=setInterval(function(){"recording"===a.state&&a.requestData()},t))},stop:function(){return"inactive"===this.state?this.em.dispatchEvent(s("stop")):(this.requestData(),this.state="inactive",clearInterval(this.slicing))},pause:function(){return"recording"!==this.state?this.em.dispatchEvent(s("pause")):(this.state="paused",this.em.dispatchEvent(new Event("pause")))},resume:function(){return"paused"!==this.state?this.em.dispatchEvent(s("resume")):(this.state="recording",this.em.dispatchEvent(new Event("resume")))},requestData:function(){return"inactive"===this.state?this.em.dispatchEvent(s("requestData")):this.encoder.postMessage(["dump",i.sampleRate])},addEventListener:function(){this.em.addEventListener.apply(this.em,arguments)},removeEventListener:function(){this.em.removeEventListener.apply(this.em,arguments)},dispatchEvent:function(){this.em.dispatchEvent.apply(this.em,arguments)}},a.isTypeSupported=function(t){return/audio\/wave?/.test(t)},a.notSupported=!navigator.mediaDevices||!r,a.encoder=n(341),t.exports=a},341:function(t,e){t.exports=function(){var t=2,e=[];onmessage=function(n){"encode"===n.data[0]?function(n){for(var i=n.length,r=new Uint8Array(i*t),s=0;s<i;s++){var a=s*t,o=n[s];o>1?o=1:o<-1&&(o=-1),o*=32768,r[a]=o,r[a+1]=o>>8}e.push(r)}(n.data[1]):function(n){var i=e.length?e[0].length:0,r=e.length*i,s=new Uint8Array(44+r),a=new DataView(s.buffer);a.setUint32(0,1380533830,!1),a.setUint32(4,36+r,!0),a.setUint32(8,1463899717,!1),a.setUint32(12,1718449184,!1),a.setUint32(16,16,!0),a.setUint16(20,1,!0),a.setUint16(22,1,!0),a.setUint32(24,n,!0),a.setUint32(28,n*t,!0),a.setUint16(32,t,!0),a.setUint16(34,8*t,!0),a.setUint32(36,1684108385,!1),a.setUint32(40,r,!0);for(var o=0;o<e.length;o++)s.set(e[o],o*i+44);e=[],postMessage(s.buffer,[s.buffer])}(n.data[1])}}}});