media-encoder-host
Advanced tools
Comparing version 8.0.98 to 8.0.99
@@ -1,2 +0,2 @@ | ||
export declare const worker = "(()=>{var e={775:function(e,t,r){!function(e,t,r,n){\"use strict\";var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var o=e.charAt(0).toUpperCase(),s=e.slice(1);return\"\".concat(o).concat(s)}return\"dashify\"===t?r(e):\"prependIndefiniteArticle\"===t?\"\".concat(n(e),\" \").concat(e):e}),e)},s=function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")},a=function(e,r){for(var n=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,a=[],i=n.exec(e);null!==i;){var c={modifiers:[],name:i[1]};if(void 0!==i[3])for(var u=/\\.[^(]+\\(\\)/g,l=u.exec(i[2]);null!==l;)c.modifiers.push(l[0].slice(1,-2)),l=u.exec(i[2]);a.push(c),i=n.exec(e)}var d=a.reduce((function(e,n){return e.map((function(e){return\"string\"==typeof e?e.split(s(n)).reduce((function(e,s,a){return 0===a?[s]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),s]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},s])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return d.reduce((function(r,n){return[].concat(t(r),\"string\"==typeof n?[n]:[n(e)])}),[]).join(\"\")}},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,s=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=s.cause,i=s.missingParameters,c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=i}(t,r(106),r(881),r(507))},881:e=>{\"use strict\";e.exports=(e,t)=>{if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(e=>/[\u00C0-\u017E]/.test(e)?e:\"-\")).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(e=>t&&t.condense?\"-\":e)).toLowerCase()}},107:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,s=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<s?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*s);return e(r,i)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,c=r(i),u=a(c,i),l=t(u);e.addUniqueNumber=l,e.generateUniqueNumber=u}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),s=[\"honest\",\"hour\",\"hono\"];for(t in s)if(0==o.indexOf(s[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},768:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},907:(e,t,r)=>{var n=r(768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},642:e=>{e.exports=function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},344:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},106:(e,t,r)=>{var n=r(907),o=r(642),s=r(906),a=r(344);e.exports=function(e){return n(e)||o(e)||s(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},906:(e,t,r)=>{var n=r(768);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(()=>{\"use strict\";var e=r(775);const t=-32603,n=-32602,o=-32601,s=(0,e.compile)({message:'The requested method called \"${method}\" is not supported.',status:o}),a=(0,e.compile)({message:'The handler of the method called \"${method}\" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:t}),c=(0,e.compile)({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:n});var u=r(107);const l=new Map,d=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=(0,u.generateUniqueNumber)(l);return l.set(s,(()=>{o(),n.close(),l.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=l.get(t);if(void 0===r)throw c({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=function(e,t){const r=d(f,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:c}}=r;const u=t[o];try{if(void 0===u)throw s({method:o});const t=void 0===c?u():u(c);if(void 0===t)throw a({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw i({method:o})}else{if(void 0===r.result)throw i({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener(\"message\",n),()=>e.removeEventListener(\"message\",n)},p=e=>{e.onmessage=null,e.close()},m=new WeakMap,h=new WeakMap,g=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t(\"connect\",{port:e},[e]);return m.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=m.get(e);if(void 0===r)throw new Error(\"The given port is not connected.\");await t(\"disconnect\",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t(\"isSupported\")}});var r;return e=>{const r=(e=>{if(h.has(e))return h.get(e);const t=new Map;return h.set(e,t),t})(e);e.addEventListener(\"message\",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>\"function\"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=(0,u.generateUniqueNumber)(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t(\"characterize\")},encode:e=>{let{call:t}=e;return(e,r)=>t(\"encode\",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t(\"record\",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),v=async(e,t)=>{const r=g(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error(\"There is already an encoder stored which handles exactly the same mime types.\");return e.set(o,[n,r]),n},w=new Map,x=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error(\"There was no instance of an encoder stored with the given id.\");return r})(w),y=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(w,x),M=new Map,b=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(p,y),E=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error(\"There is no encoder registered which could handle the given mimeType.\")})(M),A=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called \"'.concat(n,'\".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,u=[a,i,!0,s];return t.set(n,u),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),u[2]=!1):a.record(n,s,r.map((e=>\"number\"==typeof e?new Float32Array(e):e)))},c})(p,w,E),I=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(x);f(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await b(t):await I(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=A(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await v(M,t)}}})})()})();"; | ||
export declare const worker = "(()=>{var e={881:e=>{\"use strict\";e.exports=(e,t)=>{if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(e=>/[\u00C0-\u017E]/.test(e)?e:\"-\")).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(e=>t&&t.condense?\"-\":e)).toLowerCase()}},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),s=[\"honest\",\"hour\",\"hono\"];for(t in s)if(0==o.indexOf(s[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";var e=r(881),t=r.n(e),n=r(507),o=r.n(n);const s=(e,r)=>void 0===r?e:r.reduce(((e,r)=>{if(\"capitalize\"===r){const t=e.charAt(0).toUpperCase(),r=e.slice(1);return\"\".concat(t).concat(r)}return\"dashify\"===r?t()(e):\"prependIndefiniteArticle\"===r?\"\".concat(o()(e),\" \").concat(e):e}),e),a=(e,t)=>{const r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[];let o=r.exec(e);for(;null!==o;){const t={modifiers:[],name:o[1]};if(void 0!==o[3]){const e=/\\.[^(]+\\(\\)/g;let r=e.exec(o[2]);for(;null!==r;)t.modifiers.push(r[0].slice(1,-2)),r=e.exec(o[2])}n.push(t),o=r.exec(e)}const a=n.reduce(((e,r)=>e.map((e=>\"string\"==typeof e?e.split((e=>{const t=e.name+e.modifiers.map((e=>\"\\\\.\".concat(e,\"\\\\(\\\\)\"))).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")})(r)).reduce(((e,n,o)=>0===o?[n]:r.name in t?[...e,s(t[r.name],r.modifiers),n]:[...e,e=>s(e[r.name],r.modifiers),n]),[]):[e])).reduce(((e,t)=>[...e,...t]),[])),[e]);return e=>a.reduce(((t,r)=>\"string\"==typeof r?[...t,r]:[...t,r(e)]),[]).join(\"\")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;const s=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9)),{cause:a,missingParameters:i}=s?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}},c=-32603,d=-32602,l=i({message:'The requested method called \"${method}\" is not supported.',status:-32601}),u=i({message:'The handler of the method called \"${method}\" returned no required result.',status:c}),h=i({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:c}),m=i({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:d}),p=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,f=536870912,g=1073741824,w=new WeakMap;var v;const y=((e,t)=>r=>{const n=t.get(r);let o=void 0===n?r.size:n<g?n+1:0;if(!r.has(o))return e(r,o);if(r.size<f){for(;r.has(o);)o=Math.floor(Math.random()*g);return e(r,o)}if(r.size>p)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(o);)o=Math.floor(Math.random()*p);return e(r,o)})((v=w,(e,t)=>(v.set(e,t),t)),w),M=((e=>{})(y),new Map),E=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=y(M);return M.set(s,(()=>{o(),n.close(),M.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=M.get(t);if(void 0===r)throw m({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),x=function(e,t){const r=E(x,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:s}}=r;const a=t[o];try{if(void 0===a)throw l({method:o});const t=void 0===s?a():a(s);if(void 0===t)throw u({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw h({method:o})}else{if(void 0===r.result)throw h({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener(\"message\",n),()=>e.removeEventListener(\"message\",n)},b=e=>{e.onmessage=null,e.close()},A=new WeakMap,T=new WeakMap,I=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t(\"connect\",{port:e},[e]);return A.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=A.get(e);if(void 0===r)throw new Error(\"The given port is not connected.\");await t(\"disconnect\",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t(\"isSupported\")}});var r;return e=>{const r=(e=>{if(T.has(e))return T.get(e);const t=new Map;return T.set(e,t),t})(e);e.addEventListener(\"message\",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>\"function\"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=y(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t(\"characterize\")},encode:e=>{let{call:t}=e;return(e,r)=>t(\"encode\",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t(\"record\",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),O=async(e,t)=>{const r=I(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error(\"There is already an encoder stored which handles exactly the same mime types.\");return e.set(o,[n,r]),n},L=new Map,P=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error(\"There was no instance of an encoder stored with the given id.\");return r})(L),S=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(L,P),N=new Map,C=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(b,S),R=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error(\"There is no encoder registered which could handle the given mimeType.\")})(N),$=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called \"'.concat(n,'\".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,d=[a,i,!0,s];return t.set(n,d),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),d[2]=!1):a.record(n,s,r.map((e=>\"number\"==typeof e?new Float32Array(e):e)))},c})(b,L,R),j=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(P);x(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await C(t):await j(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=$(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await O(N,t)}}})})()})();"; | ||
//# sourceMappingURL=worker.d.ts.map |
// This is the minified and stringified code of the media-encoder-host-worker package. | ||
export const worker = `(()=>{var e={775:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),s=e.slice(1);return"".concat(o).concat(s)}return"dashify"===t?r(e):"prependIndefiniteArticle"===t?"".concat(n(e)," ").concat(e):e}),e)},s=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},a=function(e,r){for(var n=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,a=[],i=n.exec(e);null!==i;){var c={modifiers:[],name:i[1]};if(void 0!==i[3])for(var u=/\\.[^(]+\\(\\)/g,l=u.exec(i[2]);null!==l;)c.modifiers.push(l[0].slice(1,-2)),l=u.exec(i[2]);a.push(c),i=n.exec(e)}var d=a.reduce((function(e,n){return e.map((function(e){return"string"==typeof e?e.split(s(n)).reduce((function(e,s,a){return 0===a?[s]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),s]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},s])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return d.reduce((function(r,n){return[].concat(t(r),"string"==typeof n?[n]:[n(e)])}),[]).join("")}},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,s=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=s.cause,i=s.missingParameters,c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=i}(t,r(106),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,s=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<s?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*s);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,c=r(i),u=a(c,i),l=t(u);e.addUniqueNumber=l,e.generateUniqueNumber=u}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),s=["honest","hour","hono"];for(t in s)if(0==o.indexOf(s[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},768:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},907:(e,t,r)=>{var n=r(768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},642:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},344:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},106:(e,t,r)=>{var n=r(907),o=r(642),s=r(906),a=r(344);e.exports=function(e){return n(e)||o(e)||s(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},906:(e,t,r)=>{var n=r(768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,s=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),a=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),c=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var u=r(107);const l=new Map,d=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=(0,u.generateUniqueNumber)(l);return l.set(s,(()=>{o(),n.close(),l.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=l.get(t);if(void 0===r)throw c({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=function(e,t){const r=d(f,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:c}}=r;const u=t[o];try{if(void 0===u)throw s({method:o});const t=void 0===c?u():u(c);if(void 0===t)throw a({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw i({method:o})}else{if(void 0===r.result)throw i({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener("message",n),()=>e.removeEventListener("message",n)},p=e=>{e.onmessage=null,e.close()},m=new WeakMap,h=new WeakMap,g=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t("connect",{port:e},[e]);return m.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=m.get(e);if(void 0===r)throw new Error("The given port is not connected.");await t("disconnect",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t("isSupported")}});var r;return e=>{const r=(e=>{if(h.has(e))return h.get(e);const t=new Map;return h.set(e,t),t})(e);e.addEventListener("message",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>"function"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=(0,u.generateUniqueNumber)(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t("characterize")},encode:e=>{let{call:t}=e;return(e,r)=>t("encode",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t("record",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),v=async(e,t)=>{const r=g(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error("There is already an encoder stored which handles exactly the same mime types.");return e.set(o,[n,r]),n},w=new Map,x=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error("There was no instance of an encoder stored with the given id.");return r})(w),y=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(w,x),M=new Map,b=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(p,y),E=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error("There is no encoder registered which could handle the given mimeType.")})(M),A=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called "'.concat(n,'".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,u=[a,i,!0,s];return t.set(n,u),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),u[2]=!1):a.record(n,s,r.map((e=>"number"==typeof e?new Float32Array(e):e)))},c})(p,w,E),I=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(x);f(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await b(t):await I(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=A(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await v(M,t)}}})})()})();`; // tslint:disable-line:max-line-length | ||
export const worker = `(()=>{var e={881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),s=["honest","hour","hono"];for(t in s)if(0==o.indexOf(s[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(881),t=r.n(e),n=r(507),o=r.n(n);const s=(e,r)=>void 0===r?e:r.reduce(((e,r)=>{if("capitalize"===r){const t=e.charAt(0).toUpperCase(),r=e.slice(1);return"".concat(t).concat(r)}return"dashify"===r?t()(e):"prependIndefiniteArticle"===r?"".concat(o()(e)," ").concat(e):e}),e),a=(e,t)=>{const r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[];let o=r.exec(e);for(;null!==o;){const t={modifiers:[],name:o[1]};if(void 0!==o[3]){const e=/\\.[^(]+\\(\\)/g;let r=e.exec(o[2]);for(;null!==r;)t.modifiers.push(r[0].slice(1,-2)),r=e.exec(o[2])}n.push(t),o=r.exec(e)}const a=n.reduce(((e,r)=>e.map((e=>"string"==typeof e?e.split((e=>{const t=e.name+e.modifiers.map((e=>"\\\\.".concat(e,"\\\\(\\\\)"))).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")})(r)).reduce(((e,n,o)=>0===o?[n]:r.name in t?[...e,s(t[r.name],r.modifiers),n]:[...e,e=>s(e[r.name],r.modifiers),n]),[]):[e])).reduce(((e,t)=>[...e,...t]),[])),[e]);return e=>a.reduce(((t,r)=>"string"==typeof r?[...t,r]:[...t,r(e)]),[]).join("")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;const s=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9)),{cause:a,missingParameters:i}=s?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}},c=-32603,d=-32602,l=i({message:'The requested method called "\${method}" is not supported.',status:-32601}),u=i({message:'The handler of the method called "\${method}" returned no required result.',status:c}),h=i({message:'The handler of the method called "\${method}" returned an unexpected result.',status:c}),m=i({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:d}),p=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,f=536870912,g=1073741824,w=new WeakMap;var v;const y=((e,t)=>r=>{const n=t.get(r);let o=void 0===n?r.size:n<g?n+1:0;if(!r.has(o))return e(r,o);if(r.size<f){for(;r.has(o);)o=Math.floor(Math.random()*g);return e(r,o)}if(r.size>p)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(o);)o=Math.floor(Math.random()*p);return e(r,o)})((v=w,(e,t)=>(v.set(e,t),t)),w),M=((e=>{})(y),new Map),E=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=y(M);return M.set(s,(()=>{o(),n.close(),M.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=M.get(t);if(void 0===r)throw m({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),x=function(e,t){const r=E(x,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:s}}=r;const a=t[o];try{if(void 0===a)throw l({method:o});const t=void 0===s?a():a(s);if(void 0===t)throw u({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw h({method:o})}else{if(void 0===r.result)throw h({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener("message",n),()=>e.removeEventListener("message",n)},b=e=>{e.onmessage=null,e.close()},A=new WeakMap,T=new WeakMap,I=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t("connect",{port:e},[e]);return A.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=A.get(e);if(void 0===r)throw new Error("The given port is not connected.");await t("disconnect",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t("isSupported")}});var r;return e=>{const r=(e=>{if(T.has(e))return T.get(e);const t=new Map;return T.set(e,t),t})(e);e.addEventListener("message",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>"function"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=y(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t("characterize")},encode:e=>{let{call:t}=e;return(e,r)=>t("encode",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t("record",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),O=async(e,t)=>{const r=I(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error("There is already an encoder stored which handles exactly the same mime types.");return e.set(o,[n,r]),n},L=new Map,P=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error("There was no instance of an encoder stored with the given id.");return r})(L),S=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(L,P),N=new Map,C=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(b,S),R=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error("There is no encoder registered which could handle the given mimeType.")})(N),$=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called "'.concat(n,'".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,d=[a,i,!0,s];return t.set(n,d),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),d[2]=!1):a.record(n,s,r.map((e=>"number"==typeof e?new Float32Array(e):e)))},c})(b,L,R),j=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(P);x(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await C(t):await j(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=$(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await O(N,t)}}})})()})();`; // tslint:disable-line:max-line-length | ||
//# sourceMappingURL=worker.js.map |
@@ -8,3 +8,3 @@ (function (global, factory) { | ||
// This is the minified and stringified code of the media-encoder-host-worker package. | ||
var worker = "(()=>{var e={881:e=>{\"use strict\";e.exports=function(e,t){if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(function(e){return/[\xC0-\u017E]/.test(e)?e:\"-\"})).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(function(e){return t&&t.condense?\"-\":e})).toLowerCase()}},774:function(e,t,r){!function(e,t,r,n,o,a){\"use strict\";var i=function(e){return\"function\"==typeof e.start},u=new WeakMap;function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){return s(s({},e),{},{connect:function(e){var t=e.call;return o(a.mark((function e(){var r,n,o,i;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new MessageChannel,n=r.port1,o=r.port2,e.next=3,t(\"connect\",{port:n},[n]);case 3:return i=e.sent,u.set(o,i),e.abrupt(\"return\",o);case 6:case\"end\":return e.stop()}}),e)})))},disconnect:function(e){var t=e.call;return function(){var e=o(a.mark((function e(r){var n;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(n=u.get(r))){e.next=3;break}throw new Error(\"The given port is not connected.\");case 3:return e.next=5,t(\"disconnect\",{portId:n});case 5:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},isSupported:function(e){var t=e.call;return function(){return t(\"isSupported\")}}})};function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=new WeakMap,h=function(e){if(d.has(e))return d.get(e);var t=new Map;return d.set(e,t),t},v=function(e){var o=f(e);return function(e){var a=h(e);e.addEventListener(\"message\",(function(e){var t=e.data,r=t.id;if(null!==r&&a.has(r)){var n=a.get(r),o=n.reject,i=n.resolve;a.delete(r),void 0===t.error?i(t.result):o(new Error(t.error.message))}})),i(e)&&e.start();for(var u=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise((function(i,u){var c=n.generateUniqueNumber(a);a.set(c,{reject:u,resolve:i}),null===r?e.postMessage({id:c,method:t},o):e.postMessage({id:c,method:t,params:r},o)}))},c=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)},s={},f=0,l=Object.entries(o);f<l.length;f++){var d=r(l[f],2),v=d[0],m=d[1];s=p(p({},s),{},t({},v,m({call:u,notify:c})))}return p({},s)}};e.createBroker=v}(t,r(416),r(424),r(650),r(156),r(687))},404:function(e,t,r){!function(e,t,r,n){\"use strict\";var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var o=e.charAt(0).toUpperCase(),a=e.slice(1);return\"\".concat(o).concat(a)}return\"dashify\"===t?r(e):\"prependIndefiniteArticle\"===t?\"\".concat(n(e),\" \").concat(e):e}),e)},a=function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")},i=function(e,r){for(var n=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],u=n.exec(e);null!==u;){var c={modifiers:[],name:u[1]};if(void 0!==u[3])for(var s=/\\.[^(]+\\(\\)/g,f=s.exec(u[2]);null!==f;)c.modifiers.push(f[0].slice(1,-2)),f=s.exec(u[2]);i.push(c),u=n.exec(e)}var l=i.reduce((function(e,n){return e.map((function(e){return\"string\"==typeof e?e.split(a(n)).reduce((function(e,a,i){return 0===i?[a]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),a]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},a])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return l.reduce((function(r,n){return[].concat(t(r),\"string\"==typeof n?[n]:[n(e)])}),[]).join(\"\")}},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:i(e.code,t),n=void 0===e.message?void 0:i(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,a=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},i=a.cause,u=a.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==i&&(c.cause=i),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=u}(t,r(861),r(881),r(932))},831:function(e,t,r){!function(e,t,r,n){\"use strict\";var o=n.createBroker({characterize:function(e){var t=e.call;return function(){return t(\"characterize\")}},encode:function(e){var t=e.call;return function(e,r){return t(\"encode\",{recordingId:e,timeslice:r})}},record:function(e){var n=e.call;return function(){var e=t(r.mark((function e(t,o,a){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(\"record\",{recordingId:t,sampleRate:o,typedArrays:a},a.map((function(e){return e.buffer})));case 2:case\"end\":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()}}),a=function(e){var t=new Worker(e);return o(t)};e.load=a,e.wrap=o}(t,r(156),r(687),r(774))},650:function(e,t){!function(e){\"use strict\";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,a=2*o,i=function(e,t){return function(r){var i=t.get(r),u=void 0===i?r.size:i<a?i+1:0;if(!r.has(u))return e(r,u);if(r.size<o){for(;r.has(u);)u=Math.floor(Math.random()*a);return e(r,u)}if(r.size>n)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;r.has(u);)u=Math.floor(Math.random()*n);return e(r,u)}},u=new WeakMap,c=r(u),s=i(c,u),f=t(s);e.addUniqueNumber=f,e.generateUniqueNumber=s}(t)},932:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),a=[\"honest\",\"hour\",\"hono\"];for(t in a)if(0==o.indexOf(a[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var i=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<i.length;t++)if(o.match(i[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},108:function(e,t,r){!function(e,t,r,n,o){\"use strict\";var a=function(e,t){return function(r){var o=t(r),a=n(o,4),i=a[0],u=a[1],c=a[2],s=a[3];return c?new Promise((function(t){u.onmessage=function(n){var o=n.data;0===o.length?(e(u),t(i.encode(r,null))):i.record(r,s,o)}})):i.encode(r,null)}},i=function(e){return function(t){var r=e.get(t);if(void 0===r)throw new Error(\"There was no instance of an encoder stored with the given id.\");return r}},u=function(e,t,r){return function(n,o,a){if(t.has(n))throw new Error('There is already an encoder registered with an id called \"'.concat(n,'\".'));var i=r(o),u=new MessageChannel,c=u.port1,s=u.port2,f=[i,c,!0,a];return t.set(n,f),c.onmessage=function(t){var r=t.data;0===r.length?(e(c),f[2]=!1):i.record(n,a,r.map((function(e){return\"number\"==typeof e?new Float32Array(e):e})))},s}},c=function(e){return function(t){for(var r=0,o=Array.from(e.values());r<o.length;r++){var a=n(o[r],2),i=a[0],u=a[1];if(i.test(t))return u}throw new Error(\"There is no encoder registered which could handle the given mimeType.\")}},s=function(e,t){return function(r){var n=t(r);return e.delete(r),n}},f=function(e){return function(t,r){var o=e(t);return n(o,1)[0].encode(t,r)}},l=function(e){e.onmessage=null,e.close()},p=function(){var r=e(t.mark((function e(r,n){var a,i,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.wrap(n),e.next=3,a.characterize();case 3:if(i=e.sent,u=i.toString(),!r.has(u)){e.next=7;break}throw new Error(\"There is already an encoder stored which handles exactly the same mime types.\");case 7:return r.set(u,[i,a]),e.abrupt(\"return\",i);case 9:case\"end\":return e.stop()}}),e)})));return function(e,t){return r.apply(this,arguments)}}(),d=new Map,h=i(d),v=s(d,h),m=new Map,y=a(l,v),g=c(m),x=u(l,d,g),b=f(h);r.createWorker(self,{encode:function(){var r=e(t.mark((function e(r){var n,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.encoderId,null!==(o=r.timeslice)){e.next=7;break}return e.next=4,y(n);case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,b(n,o);case 9:e.t0=e.sent;case 10:return a=e.t0,e.abrupt(\"return\",{result:a,transferables:a});case 12:case\"end\":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),instantiate:function(e){var t=e.encoderId,r=e.mimeType,n=e.sampleRate,o=x(t,r,n);return{result:o,transferables:[o]}},register:function(){var r=e(t.mark((function e(r){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.port,e.next=3,p(m,n);case 3:return e.t0=e.sent,e.abrupt(\"return\",{result:e.t0});case 5:case\"end\":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(156),r(687),r(868),r(424),r(831))},868:function(e,t,r){!function(e,t,r,n,o,a){\"use strict\";var i={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},u=n.compile({message:'The requested method called \"${method}\" is not supported.',status:i.METHOD_NOT_FOUND}),c=n.compile({message:'The handler of the method called \"${method}\" returned no required result.',status:i.INTERNAL_ERROR}),s=n.compile({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:i.INTERNAL_ERROR}),f=n.compile({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:i.INVALID_PARAMS}),l=function(e,n){return function(){var o=t(r.mark((function t(o){var a,i,f,l,p,d,h,v,m,y,g,x,b;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=o.data,i=a.id,f=a.method,l=a.params,p=n[f],t.prev=2,void 0!==p){t.next=5;break}throw u({method:f});case 5:if(void 0!==(d=void 0===l?p():p(l))){t.next=8;break}throw c({method:f});case 8:if(!(d instanceof Promise)){t.next=14;break}return t.next=11,d;case 11:t.t0=t.sent,t.next=15;break;case 14:t.t0=d;case 15:if(h=t.t0,null!==i){t.next=21;break}if(void 0===h.result){t.next=19;break}throw s({method:f});case 19:t.next=25;break;case 21:if(void 0!==h.result){t.next=23;break}throw s({method:f});case 23:v=h.result,m=h.transferables,y=void 0===m?[]:m,e.postMessage({id:i,result:v},y);case 25:t.next=31;break;case 27:t.prev=27,t.t1=t.catch(2),g=t.t1.message,x=t.t1.status,b=void 0===x?-32603:x,e.postMessage({error:{code:b,message:g},id:i});case 31:case\"end\":return t.stop()}}),t,null,[[2,27]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=new Map,m=function(e,n,o){return h(h({},n),{},{connect:function(t){var r=t.port;r.start();var o=e(r,n),i=a.generateUniqueNumber(v);return v.set(i,(function(){o(),r.close(),v.delete(i)})),{result:i}},disconnect:function(e){var t=e.portId,r=v.get(t);if(void 0===r)throw f({portId:t.toString()});return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:if(!e.sent){e.next=14;break}if(!((t=o())instanceof Promise)){e.next=11;break}return e.next=8,t;case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=t;case 12:return n=e.t0,e.abrupt(\"return\",{result:n});case 14:return e.abrupt(\"return\",{result:!1});case 15:case\"end\":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},y=function e(t,r){var n=m(e,r,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),o=l(t,n);return t.addEventListener(\"message\",o),function(){return t.removeEventListener(\"message\",o)}};e.createWorker=y,e.isSupported=p}(t,r(156),r(687),r(404),r(416),r(650))},897:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},372:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},405:(e,t,r)=>{var n=r(897);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{function t(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function u(e){t(i,o,a,u,c,\"next\",e)}function c(e){t(i,o,a,u,c,\"throw\",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},416:(e,t,r)=>{var n=r(62);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},498:e=>{e.exports=function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},872:e=>{e.exports=function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},218:e=>{e.exports=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.\")},e.exports.__esModule=!0,e.exports.default=e.exports},281:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")},e.exports.__esModule=!0,e.exports.default=e.exports},61:(e,t,r)=>{var n=r(698).default;function o(){\"use strict\";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u=\"function\"==typeof Symbol?Symbol:{},c=u.iterator||\"@@iterator\",s=u.asyncIterator||\"@@asyncIterator\",f=u.toStringTag||\"@@toStringTag\";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},\"\")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),u=new k(n||[]);return i(a,\"_invoke\",{value:j(e,r,u)}),a}function d(e,t,r){try{return{type:\"normal\",arg:e.call(t,r)}}catch(e){return{type:\"throw\",arg:e}}}t.wrap=p;var h={};function v(){}function m(){}function y(){}var g={};l(g,c,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(L([])));b&&b!==r&&a.call(b,c)&&(g=b);var w=y.prototype=v.prototype=Object.create(g);function O(e){[\"next\",\"throw\",\"return\"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(o,i,u,c){var s=d(e[o],e,i);if(\"throw\"!==s.type){var f=s.arg,l=f.value;return l&&\"object\"==n(l)&&a.call(l,\"__await\")?t.resolve(l.__await).then((function(e){r(\"next\",e,u,c)}),(function(e){r(\"throw\",e,u,c)})):t.resolve(l).then((function(e){f.value=e,u(f)}),(function(e){return r(\"throw\",e,u,c)}))}c(s.arg)}var o;i(this,\"_invoke\",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function j(e,t,r){var n=\"suspendedStart\";return function(o,a){if(\"executing\"===n)throw new Error(\"Generator is already running\");if(\"completed\"===n){if(\"throw\"===o)throw a;return S()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=E(i,r);if(u){if(u===h)continue;return u}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(\"suspendedStart\"===n)throw n=\"completed\",r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=\"executing\";var c=d(e,t,r);if(\"normal\"===c.type){if(n=r.done?\"completed\":\"suspendedYield\",c.arg===h)continue;return{value:c.arg,done:r.done}}\"throw\"===c.type&&(n=\"completed\",r.method=\"throw\",r.arg=c.arg)}}}function E(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,\"throw\"===r&&e.iterator.return&&(t.method=\"return\",t.arg=void 0,E(e,t),\"throw\"===t.method)||\"return\"!==r&&(t.method=\"throw\",t.arg=new TypeError(\"The iterator does not provide a '\"+r+\"' method\")),h;var o=d(n,e.iterator,t.arg);if(\"throw\"===o.type)return t.method=\"throw\",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,\"return\"!==t.method&&(t.method=\"next\",t.arg=void 0),t.delegate=null,h):a:(t.method=\"throw\",t.arg=new TypeError(\"iterator result is not an object\"),t.delegate=null,h)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(M,this),this.reset(!0)}function L(e){if(e){var t=e[c];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=y,i(w,\"constructor\",{value:y,configurable:!0}),i(y,\"constructor\",{value:m,configurable:!0}),m.displayName=l(y,f,\"GeneratorFunction\"),t.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===m||\"GeneratorFunction\"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,f,\"GeneratorFunction\")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},O(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new _(p(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(w),l(w,f,\"Generator\"),l(w,c,(function(){return this})),l(w,\"toString\",(function(){return\"[object Generator]\"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)\"t\"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type=\"throw\",i.arg=e,t.next=r,n&&(t.method=\"next\",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if(\"root\"===o.tryLoc)return r(\"end\");if(o.tryLoc<=this.prev){var u=a.call(o,\"catchLoc\"),c=a.call(o,\"finallyLoc\");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error(\"try statement without catch or finally\");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var o=n;break}}o&&(\"break\"===e||\"continue\"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method=\"next\",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;P(r)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},\"next\"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},424:(e,t,r)=>{var n=r(372),o=r(872),a=r(116),i=r(218);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},861:(e,t,r)=>{var n=r(405),o=r(498),a=r(116),i=r(281);e.exports=function(e){return n(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},36:(e,t,r)=>{var n=r(698).default;e.exports=function(e,t){if(\"object\"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||\"default\");if(\"object\"!==n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},62:(e,t,r)=>{var n=r(698).default,o=r(36);e.exports=function(e){var t=o(e,\"string\");return\"symbol\"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t=\"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},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},116:(e,t,r)=>{var n=r(897);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=n:Function(\"r\",\"regeneratorRuntime = r\")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(108)})()})();"; // tslint:disable-line:max-line-length | ||
var worker = "(()=>{var e={881:e=>{\"use strict\";e.exports=function(e,t){if(\"string\"!=typeof e)throw new TypeError(\"expected a string\");return e.trim().replace(/([a-z])([A-Z])/g,\"$1-$2\").replace(/\\W/g,(function(e){return/[\xC0-\u017E]/.test(e)?e:\"-\"})).replace(/^-+|-+$/g,\"\").replace(/-{2,}/g,(function(e){return t&&t.condense?\"-\":e})).toLowerCase()}},774:function(e,t,r){!function(e,t,r,n,o,a){\"use strict\";var i=function(e){return\"function\"==typeof e.start},u=new WeakMap;function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){return s(s({},e),{},{connect:function(e){var t=e.call;return o(a.mark((function e(){var r,n,o,i;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new MessageChannel,n=r.port1,o=r.port2,e.next=3,t(\"connect\",{port:n},[n]);case 3:return i=e.sent,u.set(o,i),e.abrupt(\"return\",o);case 6:case\"end\":return e.stop()}}),e)})))},disconnect:function(e){var t=e.call;return function(){var e=o(a.mark((function e(r){var n;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==(n=u.get(r))){e.next=3;break}throw new Error(\"The given port is not connected.\");case 3:return e.next=5,t(\"disconnect\",{portId:n});case 5:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},isSupported:function(e){var t=e.call;return function(){return t(\"isSupported\")}}})};function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?l(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=new WeakMap,h=function(e){if(p.has(e))return p.get(e);var t=new Map;return p.set(e,t),t},v=function(e){var o=f(e);return function(e){var a=h(e);e.addEventListener(\"message\",(function(e){var t=e.data,r=t.id;if(null!==r&&a.has(r)){var n=a.get(r),o=n.reject,i=n.resolve;a.delete(r),void 0===t.error?i(t.result):o(new Error(t.error.message))}})),i(e)&&e.start();for(var u=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise((function(i,u){var c=n.generateUniqueNumber(a);a.set(c,{reject:u,resolve:i}),null===r?e.postMessage({id:c,method:t},o):e.postMessage({id:c,method:t,params:r},o)}))},c=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)},s={},f=0,l=Object.entries(o);f<l.length;f++){var p=r(l[f],2),v=p[0],y=p[1];s=d(d({},s),{},t({},v,y({call:u,notify:c})))}return d({},s)}};e.createBroker=v}(t,r(416),r(424),r(172),r(156),r(687))},906:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},739:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},220:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},571:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(906);Object.keys(n).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(739);Object.keys(o).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=r(220);Object.keys(a).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=r(96);Object.keys(i).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=r(169);Object.keys(u).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}))},96:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},169:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},927:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n={compile:!0};t.compile=void 0;var o=c(r(881)),a=c(r(932)),i=r(571);Object.keys(i).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=r(385);function c(e){return e&&e.__esModule?e:{default:e}}Object.keys(u).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));const s=(e,t)=>void 0===t?e:t.reduce(((e,t)=>{if(\"capitalize\"===t){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}return\"dashify\"===t?(0,o.default)(e):\"prependIndefiniteArticle\"===t?`${(0,a.default)(e)} ${e}`:e}),e),f=(e,t)=>{const r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[];let o=r.exec(e);for(;null!==o;){const t={modifiers:[],name:o[1]};if(void 0!==o[3]){const e=/\\.[^(]+\\(\\)/g;let r=e.exec(o[2]);for(;null!==r;)t.modifiers.push(r[0].slice(1,-2)),r=e.exec(o[2])}n.push(t),o=r.exec(e)}const a=n.reduce(((e,r)=>e.map((e=>\"string\"==typeof e?e.split((e=>{const t=e.name+e.modifiers.map((e=>`\\\\.${e}\\\\(\\\\)`)).join(\"\");return new RegExp(`\\\\$\\\\{${t}}`,\"g\")})(r)).reduce(((e,n,o)=>0===o?[n]:r.name in t?[...e,s(t[r.name],r.modifiers),n]:[...e,e=>s(e[r.name],r.modifiers),n]),[]):[e])).reduce(((e,t)=>[...e,...t]),[])),[e]);return e=>a.reduce(((t,r)=>\"string\"==typeof r?[...t,r]:[...t,r(e)]),[]).join(\"\")};t.compile=(e,t={})=>{const r=void 0===e.code?void 0:f(e.code,t),n=void 0===e.message?void 0:f(e.message,t);return function(t={},o){const a=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9)),{cause:i,missingParameters:u}=a?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},c=void 0===n?new Error:new Error(n(u));return null!==i&&(c.cause=i),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}}},385:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(205);Object.keys(n).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},205:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},831:function(e,t,r){!function(e,t,r,n){\"use strict\";var o=n.createBroker({characterize:function(e){var t=e.call;return function(){return t(\"characterize\")}},encode:function(e){var t=e.call;return function(e,r){return t(\"encode\",{recordingId:e,timeslice:r})}},record:function(e){var n=e.call;return function(){var e=t(r.mark((function e(t,o,a){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(\"record\",{recordingId:t,sampleRate:o,typedArrays:a},a.map((function(e){return e.buffer})));case 2:case\"end\":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()}}),a=function(e){var t=new Worker(e);return o(t)};e.load=a,e.wrap=o}(t,r(156),r(687),r(774))},846:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.createAddUniqueNumber=void 0;t.createAddUniqueNumber=e=>t=>{const r=e(t);return t.add(r),r}},922:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.createCache=void 0;t.createCache=e=>(t,r)=>(e.set(t,r),r)},98:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.createGenerateUniqueNumber=void 0;const r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,o=1073741824;t.createGenerateUniqueNumber=(e,t)=>a=>{const i=t.get(a);let u=void 0===i?a.size:i<o?i+1:0;if(!a.has(u))return e(a,u);if(a.size<n){for(;a.has(u);)u=Math.floor(Math.random()*o);return e(a,u)}if(a.size>r)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;a.has(u);)u=Math.floor(Math.random()*r);return e(a,u)}},172:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n={addUniqueNumber:!0,generateUniqueNumber:!0};t.generateUniqueNumber=t.addUniqueNumber=void 0;var o=r(846),a=r(922),i=r(98),u=r(110);Object.keys(u).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));const c=new WeakMap,s=(0,a.createCache)(c),f=(0,i.createGenerateUniqueNumber)(s,c);t.generateUniqueNumber=f;const l=(0,o.createAddUniqueNumber)(f);t.addUniqueNumber=l},287:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},504:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},59:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},362:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},218:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},813:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0})},110:(e,t,r)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(287);Object.keys(n).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(504);Object.keys(o).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=r(59);Object.keys(a).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var i=r(362);Object.keys(i).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=r(218);Object.keys(u).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(813);Object.keys(c).forEach((function(e){\"default\"!==e&&\"__esModule\"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}))},932:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),a=[\"honest\",\"hour\",\"hono\"];for(t in a)if(0==o.indexOf(a[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var i=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<i.length;t++)if(o.match(i[t]))return\"a\";return r.match(/^U[NK][AIEO]/)?\"a\":r==r.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},108:function(e,t,r){!function(e,t,r,n,o){\"use strict\";var a=function(e,t){return function(r){var o=t(r),a=n(o,4),i=a[0],u=a[1],c=a[2],s=a[3];return c?new Promise((function(t){u.onmessage=function(n){var o=n.data;0===o.length?(e(u),t(i.encode(r,null))):i.record(r,s,o)}})):i.encode(r,null)}},i=function(e){return function(t){var r=e.get(t);if(void 0===r)throw new Error(\"There was no instance of an encoder stored with the given id.\");return r}},u=function(e,t,r){return function(n,o,a){if(t.has(n))throw new Error('There is already an encoder registered with an id called \"'.concat(n,'\".'));var i=r(o),u=new MessageChannel,c=u.port1,s=u.port2,f=[i,c,!0,a];return t.set(n,f),c.onmessage=function(t){var r=t.data;0===r.length?(e(c),f[2]=!1):i.record(n,a,r.map((function(e){return\"number\"==typeof e?new Float32Array(e):e})))},s}},c=function(e){return function(t){for(var r=0,o=Array.from(e.values());r<o.length;r++){var a=n(o[r],2),i=a[0],u=a[1];if(i.test(t))return u}throw new Error(\"There is no encoder registered which could handle the given mimeType.\")}},s=function(e,t){return function(r){var n=t(r);return e.delete(r),n}},f=function(e){return function(t,r){var o=e(t);return n(o,1)[0].encode(t,r)}},l=function(e){e.onmessage=null,e.close()},d=function(){var r=e(t.mark((function e(r,n){var a,i,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.wrap(n),e.next=3,a.characterize();case 3:if(i=e.sent,u=i.toString(),!r.has(u)){e.next=7;break}throw new Error(\"There is already an encoder stored which handles exactly the same mime types.\");case 7:return r.set(u,[i,a]),e.abrupt(\"return\",i);case 9:case\"end\":return e.stop()}}),e)})));return function(e,t){return r.apply(this,arguments)}}(),p=new Map,h=i(p),v=s(p,h),y=new Map,m=a(l,v),b=c(y),g=u(l,p,b),O=f(h);r.createWorker(self,{encode:function(){var r=e(t.mark((function e(r){var n,o,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.encoderId,null!==(o=r.timeslice)){e.next=7;break}return e.next=4,m(n);case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,O(n,o);case 9:e.t0=e.sent;case 10:return a=e.t0,e.abrupt(\"return\",{result:a,transferables:a});case 12:case\"end\":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),instantiate:function(e){var t=e.encoderId,r=e.mimeType,n=e.sampleRate,o=g(t,r,n);return{result:o,transferables:[o]}},register:function(){var r=e(t.mark((function e(r){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.port,e.next=3,d(y,n);case 3:return e.t0=e.sent,e.abrupt(\"return\",{result:e.t0});case 5:case\"end\":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(156),r(687),r(868),r(424),r(831))},868:function(e,t,r){!function(e,t,r,n,o,a){\"use strict\";var i={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},u=n.compile({message:'The requested method called \"${method}\" is not supported.',status:i.METHOD_NOT_FOUND}),c=n.compile({message:'The handler of the method called \"${method}\" returned no required result.',status:i.INTERNAL_ERROR}),s=n.compile({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:i.INTERNAL_ERROR}),f=n.compile({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:i.INVALID_PARAMS}),l=function(e,n){return function(){var o=t(r.mark((function t(o){var a,i,f,l,d,p,h,v,y,m,b,g,O;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=o.data,i=a.id,f=a.method,l=a.params,d=n[f],t.prev=2,void 0!==d){t.next=5;break}throw u({method:f});case 5:if(void 0!==(p=void 0===l?d():d(l))){t.next=8;break}throw c({method:f});case 8:if(!(p instanceof Promise)){t.next=14;break}return t.next=11,p;case 11:t.t0=t.sent,t.next=15;break;case 14:t.t0=p;case 15:if(h=t.t0,null!==i){t.next=21;break}if(void 0===h.result){t.next=19;break}throw s({method:f});case 19:t.next=25;break;case 21:if(void 0!==h.result){t.next=23;break}throw s({method:f});case 23:v=h.result,y=h.transferables,m=void 0===y?[]:y,e.postMessage({id:i,result:v},m);case 25:t.next=31;break;case 27:t.prev=27,t.t1=t.catch(2),b=t.t1.message,g=t.t1.status,O=void 0===g?-32603:g,e.postMessage({error:{code:O,message:b},id:i});case 31:case\"end\":return t.stop()}}),t,null,[[2,27]])})));return function(e){return o.apply(this,arguments)}}()},d=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=new Map,y=function(e,n,o){return h(h({},n),{},{connect:function(t){var r=t.port;r.start();var o=e(r,n),i=a.generateUniqueNumber(v);return v.set(i,(function(){o(),r.close(),v.delete(i)})),{result:i}},disconnect:function(e){var t=e.portId,r=v.get(t);if(void 0===r)throw f({portId:t.toString()});return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d();case 2:if(!e.sent){e.next=14;break}if(!((t=o())instanceof Promise)){e.next=11;break}return e.next=8,t;case 8:e.t0=e.sent,e.next=12;break;case 11:e.t0=t;case 12:return n=e.t0,e.abrupt(\"return\",{result:n});case 14:return e.abrupt(\"return\",{result:!1});case 15:case\"end\":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},m=function e(t,r){var n=y(e,r,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),o=l(t,n);return t.addEventListener(\"message\",o),function(){return t.removeEventListener(\"message\",o)}};e.createWorker=m,e.isSupported=d}(t,r(156),r(687),r(927),r(416),r(172))},897:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},372:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{function t(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,a){var i=e.apply(r,n);function u(e){t(i,o,a,u,c,\"next\",e)}function c(e){t(i,o,a,u,c,\"throw\",e)}u(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},416:(e,t,r)=>{var n=r(62);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},872:e=>{e.exports=function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports},360:e=>{e.exports=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.\")},e.exports.__esModule=!0,e.exports.default=e.exports},61:(e,t,r)=>{var n=r(698).default;function o(){\"use strict\";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},u=\"function\"==typeof Symbol?Symbol:{},c=u.iterator||\"@@iterator\",s=u.asyncIterator||\"@@asyncIterator\",f=u.toStringTag||\"@@toStringTag\";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},\"\")}catch(e){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),u=new k(n||[]);return i(a,\"_invoke\",{value:j(e,r,u)}),a}function p(e,t,r){try{return{type:\"normal\",arg:e.call(t,r)}}catch(e){return{type:\"throw\",arg:e}}}t.wrap=d;var h={};function v(){}function y(){}function m(){}var b={};l(b,c,(function(){return this}));var g=Object.getPrototypeOf,O=g&&g(g(N([])));O&&O!==r&&a.call(O,c)&&(b=O);var w=m.prototype=v.prototype=Object.create(b);function x(e){[\"next\",\"throw\",\"return\"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(o,i,u,c){var s=p(e[o],e,i);if(\"throw\"!==s.type){var f=s.arg,l=f.value;return l&&\"object\"==n(l)&&a.call(l,\"__await\")?t.resolve(l.__await).then((function(e){r(\"next\",e,u,c)}),(function(e){r(\"throw\",e,u,c)})):t.resolve(l).then((function(e){f.value=e,u(f)}),(function(e){return r(\"throw\",e,u,c)}))}c(s.arg)}var o;i(this,\"_invoke\",{value:function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}})}function j(e,t,r){var n=\"suspendedStart\";return function(o,a){if(\"executing\"===n)throw new Error(\"Generator is already running\");if(\"completed\"===n){if(\"throw\"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=P(i,r);if(u){if(u===h)continue;return u}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(\"suspendedStart\"===n)throw n=\"completed\",r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=\"executing\";var c=p(e,t,r);if(\"normal\"===c.type){if(n=r.done?\"completed\":\"suspendedYield\",c.arg===h)continue;return{value:c.arg,done:r.done}}\"throw\"===c.type&&(n=\"completed\",r.method=\"throw\",r.arg=c.arg)}}}function P(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,\"throw\"===r&&e.iterator.return&&(t.method=\"return\",t.arg=void 0,P(e,t),\"throw\"===t.method)||\"return\"!==r&&(t.method=\"throw\",t.arg=new TypeError(\"The iterator does not provide a '\"+r+\"' method\")),h;var o=p(n,e.iterator,t.arg);if(\"throw\"===o.type)return t.method=\"throw\",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,\"return\"!==t.method&&(t.method=\"next\",t.arg=void 0),t.delegate=null,h):a:(t.method=\"throw\",t.arg=new TypeError(\"iterator result is not an object\"),t.delegate=null,h)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(M,this),this.reset(!0)}function N(e){if(e){var t=e[c];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:L}}function L(){return{value:void 0,done:!0}}return y.prototype=m,i(w,\"constructor\",{value:m,configurable:!0}),i(m,\"constructor\",{value:y,configurable:!0}),y.displayName=l(m,f,\"GeneratorFunction\"),t.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===y||\"GeneratorFunction\"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,l(e,f,\"GeneratorFunction\")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(_.prototype),l(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new _(d(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(w),l(w,f,\"Generator\"),l(w,c,(function(){return this})),l(w,\"toString\",(function(){return\"[object Generator]\"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)\"t\"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type=\"throw\",i.arg=e,t.next=r,n&&(t.method=\"next\",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if(\"root\"===o.tryLoc)return r(\"end\");if(o.tryLoc<=this.prev){var u=a.call(o,\"catchLoc\"),c=a.call(o,\"finallyLoc\");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error(\"try statement without catch or finally\");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var o=n;break}}o&&(\"break\"===e||\"continue\"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method=\"next\",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;E(r)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},\"next\"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},424:(e,t,r)=>{var n=r(372),o=r(872),a=r(116),i=r(360);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},36:(e,t,r)=>{var n=r(698).default;e.exports=function(e,t){if(\"object\"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||\"default\");if(\"object\"!==n(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},62:(e,t,r)=>{var n=r(698).default,o=r(36);e.exports=function(e){var t=o(e,\"string\");return\"symbol\"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t=\"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},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},116:(e,t,r)=>{var n=r(897);e.exports=function(e,t){if(e){if(\"string\"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){\"object\"==typeof globalThis?globalThis.regeneratorRuntime=n:Function(\"r\",\"regeneratorRuntime = r\")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{\"use strict\";r(108)})()})();"; // tslint:disable-line:max-line-length | ||
@@ -11,0 +11,0 @@ var blob = new Blob([worker], { |
@@ -13,22 +13,22 @@ { | ||
"@babel/runtime": "^7.22.6", | ||
"media-encoder-host-broker": "^7.0.88", | ||
"media-encoder-host-worker": "^9.1.10", | ||
"tslib": "^2.6.0" | ||
"media-encoder-host-broker": "^7.0.89", | ||
"media-encoder-host-worker": "^9.1.11", | ||
"tslib": "^2.6.1" | ||
}, | ||
"description": "This is a module to load and manage media encoders.", | ||
"devDependencies": { | ||
"@babel/core": "^7.22.7", | ||
"@babel/core": "^7.22.9", | ||
"@babel/plugin-external-helpers": "^7.22.5", | ||
"@babel/plugin-transform-runtime": "^7.22.7", | ||
"@babel/preset-env": "^7.22.7", | ||
"@commitlint/cli": "^17.6.6", | ||
"@commitlint/config-angular": "^17.6.6", | ||
"@babel/plugin-transform-runtime": "^7.22.9", | ||
"@babel/preset-env": "^7.22.9", | ||
"@commitlint/cli": "^17.6.7", | ||
"@commitlint/config-angular": "^17.6.7", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"babel-loader": "^9.1.2", | ||
"babel-loader": "^9.1.3", | ||
"chai": "^4.3.7", | ||
"commitizen": "^4.3.0", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint": "^8.44.0", | ||
"eslint-config-holy-grail": "^57.2.13", | ||
"eslint": "^8.45.0", | ||
"eslint-config-holy-grail": "^57.2.18", | ||
"grunt": "^1.6.1", | ||
@@ -52,3 +52,3 @@ "grunt-cli": "^1.4.3", | ||
"rimraf": "^5.0.1", | ||
"rollup": "^3.26.2", | ||
"rollup": "^3.26.3", | ||
"sinon": "^15.2.0", | ||
@@ -58,7 +58,7 @@ "sinon-chai": "^3.7.0", | ||
"ts-loader": "^9.4.4", | ||
"tsconfig-holy-grail": "^14.0.7", | ||
"tsconfig-holy-grail": "^14.0.8", | ||
"tslint": "^6.1.3", | ||
"tslint-config-holy-grail": "^55.0.3", | ||
"tslint-config-holy-grail": "^55.0.4", | ||
"typescript": "^5.1.6", | ||
"webpack": "^5.88.1", | ||
"webpack": "^5.88.2", | ||
"webpack-cli": "^5.1.4" | ||
@@ -81,8 +81,13 @@ }, | ||
"scripts": { | ||
"build": "rimraf build/* && webpack --config config/webpack/worker-es2019.js && tsc --project src/tsconfig.json && rollup --config config/rollup/bundle.mjs", | ||
"lint": "npm run lint:config && npm run lint:src && npm run lint:test", | ||
"lint:config": "eslint --config config/eslint/config.json --ext .js --report-unused-disable-directives config/", | ||
"lint:src": "tslint --config config/tslint/src.json --project src/tsconfig.json src/*.ts src/**/*.ts", | ||
"lint:test": "eslint --config config/eslint/test.json --ext .js --report-unused-disable-directives test/", | ||
"prepare": "husky install", | ||
"prepublishOnly": "grunt build", | ||
"prepublishOnly": "npm run build", | ||
"test": "grunt lint && grunt test" | ||
}, | ||
"types": "build/es2019/module.d.ts", | ||
"version": "8.0.98" | ||
"version": "8.0.99" | ||
} |
// This is the minified and stringified code of the media-encoder-host-worker package. | ||
export const worker = `(()=>{var e={775:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),s=e.slice(1);return"".concat(o).concat(s)}return"dashify"===t?r(e):"prependIndefiniteArticle"===t?"".concat(n(e)," ").concat(e):e}),e)},s=function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")},a=function(e,r){for(var n=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,a=[],i=n.exec(e);null!==i;){var c={modifiers:[],name:i[1]};if(void 0!==i[3])for(var u=/\\.[^(]+\\(\\)/g,l=u.exec(i[2]);null!==l;)c.modifiers.push(l[0].slice(1,-2)),l=u.exec(i[2]);a.push(c),i=n.exec(e)}var d=a.reduce((function(e,n){return e.map((function(e){return"string"==typeof e?e.split(s(n)).reduce((function(e,s,a){return 0===a?[s]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),s]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},s])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return d.reduce((function(r,n){return[].concat(t(r),"string"==typeof n?[n]:[n(e)])}),[]).join("")}},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,s=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=s.cause,i=s.missingParameters,c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}return o};e.compile=i}(t,r(106),r(881),r(507))},881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},107:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,s=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<s?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*s);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,c=r(i),u=a(c,i),l=t(u);e.addUniqueNumber=l,e.generateUniqueNumber=u}(t)},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),s=["honest","hour","hono"];for(t in s)if(0==o.indexOf(s[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t},768:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},907:(e,t,r)=>{var n=r(768);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},642:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},344:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},106:(e,t,r)=>{var n=r(907),o=r(642),s=r(906),a=r(344);e.exports=function(e){return n(e)||o(e)||s(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},906:(e,t,r)=>{var n=r(768);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";var e=r(775);const t=-32603,n=-32602,o=-32601,s=(0,e.compile)({message:'The requested method called "\${method}" is not supported.',status:o}),a=(0,e.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:t}),i=(0,e.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:t}),c=(0,e.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:n});var u=r(107);const l=new Map,d=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=(0,u.generateUniqueNumber)(l);return l.set(s,(()=>{o(),n.close(),l.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=l.get(t);if(void 0===r)throw c({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),f=function(e,t){const r=d(f,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:c}}=r;const u=t[o];try{if(void 0===u)throw s({method:o});const t=void 0===c?u():u(c);if(void 0===t)throw a({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw i({method:o})}else{if(void 0===r.result)throw i({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener("message",n),()=>e.removeEventListener("message",n)},p=e=>{e.onmessage=null,e.close()},m=new WeakMap,h=new WeakMap,g=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t("connect",{port:e},[e]);return m.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=m.get(e);if(void 0===r)throw new Error("The given port is not connected.");await t("disconnect",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t("isSupported")}});var r;return e=>{const r=(e=>{if(h.has(e))return h.get(e);const t=new Map;return h.set(e,t),t})(e);e.addEventListener("message",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>"function"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=(0,u.generateUniqueNumber)(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t("characterize")},encode:e=>{let{call:t}=e;return(e,r)=>t("encode",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t("record",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),v=async(e,t)=>{const r=g(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error("There is already an encoder stored which handles exactly the same mime types.");return e.set(o,[n,r]),n},w=new Map,x=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error("There was no instance of an encoder stored with the given id.");return r})(w),y=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(w,x),M=new Map,b=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(p,y),E=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error("There is no encoder registered which could handle the given mimeType.")})(M),A=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called "'.concat(n,'".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,u=[a,i,!0,s];return t.set(n,u),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),u[2]=!1):a.record(n,s,r.map((e=>"number"==typeof e?new Float32Array(e):e)))},c})(p,w,E),I=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(x);f(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await b(t):await I(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=A(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await v(M,t)}}})})()})();`; // tslint:disable-line:max-line-length | ||
export const worker = `(()=>{var e={881:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError("expected a string");return e.trim().replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\\W/g,(e=>/[À-ž]/.test(e)?e:"-")).replace(/^-+|-+$/g,"").replace(/-{2,}/g,(e=>t&&t.condense?"-":e)).toLowerCase()}},507:e=>{var t=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),s=["honest","hour","hono"];for(t in s)if(0==o.indexOf(s[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(r.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var a=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<a.length;t++)if(o.match(a[t]))return"a";return r.match(/^U[NK][AIEO]/)?"a":r==r.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0||o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=t:window.indefiniteArticle=t}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(881),t=r.n(e),n=r(507),o=r.n(n);const s=(e,r)=>void 0===r?e:r.reduce(((e,r)=>{if("capitalize"===r){const t=e.charAt(0).toUpperCase(),r=e.slice(1);return"".concat(t).concat(r)}return"dashify"===r?t()(e):"prependIndefiniteArticle"===r?"".concat(o()(e)," ").concat(e):e}),e),a=(e,t)=>{const r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,n=[];let o=r.exec(e);for(;null!==o;){const t={modifiers:[],name:o[1]};if(void 0!==o[3]){const e=/\\.[^(]+\\(\\)/g;let r=e.exec(o[2]);for(;null!==r;)t.modifiers.push(r[0].slice(1,-2)),r=e.exec(o[2])}n.push(t),o=r.exec(e)}const a=n.reduce(((e,r)=>e.map((e=>"string"==typeof e?e.split((e=>{const t=e.name+e.modifiers.map((e=>"\\\\.".concat(e,"\\\\(\\\\)"))).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")})(r)).reduce(((e,n,o)=>0===o?[n]:r.name in t?[...e,s(t[r.name],r.modifiers),n]:[...e,e=>s(e[r.name],r.modifiers),n]),[]):[e])).reduce(((e,t)=>[...e,...t]),[])),[e]);return e=>a.reduce(((t,r)=>"string"==typeof r?[...t,r]:[...t,r(e)]),[]).join("")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=void 0===e.code?void 0:a(e.code,t),n=void 0===e.message?void 0:a(e.message,t);return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;const s=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9)),{cause:a,missingParameters:i}=s?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},c=void 0===n?new Error:new Error(n(i));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(i)),void 0!==e.status&&(c.status=e.status),c}},c=-32603,d=-32602,l=i({message:'The requested method called "\${method}" is not supported.',status:-32601}),u=i({message:'The handler of the method called "\${method}" returned no required result.',status:c}),h=i({message:'The handler of the method called "\${method}" returned an unexpected result.',status:c}),m=i({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:d}),p=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,f=536870912,g=1073741824,w=new WeakMap;var v;const y=((e,t)=>r=>{const n=t.get(r);let o=void 0===n?r.size:n<g?n+1:0;if(!r.has(o))return e(r,o);if(r.size<f){for(;r.has(o);)o=Math.floor(Math.random()*g);return e(r,o)}if(r.size>p)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(o);)o=Math.floor(Math.random()*p);return e(r,o)})((v=w,(e,t)=>(v.set(e,t),t)),w),M=((e=>{})(y),new Map),E=(e,t,r)=>({...t,connect:r=>{let{port:n}=r;n.start();const o=e(n,t),s=y(M);return M.set(s,(()=>{o(),n.close(),M.delete(s)})),{result:s}},disconnect:e=>{let{portId:t}=e;const r=M.get(t);if(void 0===r)throw m({portId:t.toString()});return r(),{result:null}},isSupported:async()=>{if(await new Promise((e=>{const t=new ArrayBuffer(0),{port1:r,port2:n}=new MessageChannel;r.onmessage=t=>{let{data:r}=t;return e(null!==r)},n.postMessage(t,[t])}))){const e=r();return{result:e instanceof Promise?await e:e}}return{result:!1}}}),x=function(e,t){const r=E(x,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0),n=((e,t)=>async r=>{let{data:{id:n,method:o,params:s}}=r;const a=t[o];try{if(void 0===a)throw l({method:o});const t=void 0===s?a():a(s);if(void 0===t)throw u({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw h({method:o})}else{if(void 0===r.result)throw h({method:o});const{result:t,transferables:s=[]}=r;e.postMessage({id:n,result:t},s)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}})(e,r);return e.addEventListener("message",n),()=>e.removeEventListener("message",n)},b=e=>{e.onmessage=null,e.close()},A=new WeakMap,T=new WeakMap,I=(e=>{const t=(r=e,{...r,connect:e=>{let{call:t}=e;return async()=>{const{port1:e,port2:r}=new MessageChannel,n=await t("connect",{port:e},[e]);return A.set(r,n),r}},disconnect:e=>{let{call:t}=e;return async e=>{const r=A.get(e);if(void 0===r)throw new Error("The given port is not connected.");await t("disconnect",{portId:r})}},isSupported:e=>{let{call:t}=e;return()=>t("isSupported")}});var r;return e=>{const r=(e=>{if(T.has(e))return T.get(e);const t=new Map;return T.set(e,t),t})(e);e.addEventListener("message",(e=>{let{data:t}=e;const{id:n}=t;if(null!==n&&r.has(n)){const{reject:e,resolve:o}=r.get(n);r.delete(n),void 0===t.error?o(t.result):e(new Error(t.error.message))}})),(e=>"function"==typeof e.start)(e)&&e.start();const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return new Promise(((s,a)=>{const i=y(r);r.set(i,{reject:a,resolve:s}),null===n?e.postMessage({id:i,method:t},o):e.postMessage({id:i,method:t,params:n},o)}))},o=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e.postMessage({id:null,method:t,params:r},n)};let s={};for(const[e,r]of Object.entries(t))s={...s,[e]:r({call:n,notify:o})};return{...s}}})({characterize:e=>{let{call:t}=e;return()=>t("characterize")},encode:e=>{let{call:t}=e;return(e,r)=>t("encode",{recordingId:e,timeslice:r})},record:e=>{let{call:t}=e;return async(e,r,n)=>{await t("record",{recordingId:e,sampleRate:r,typedArrays:n},n.map((e=>{let{buffer:t}=e;return t})))}}}),O=async(e,t)=>{const r=I(t),n=await r.characterize(),o=n.toString();if(e.has(o))throw new Error("There is already an encoder stored which handles exactly the same mime types.");return e.set(o,[n,r]),n},L=new Map,P=(e=>t=>{const r=e.get(t);if(void 0===r)throw new Error("There was no instance of an encoder stored with the given id.");return r})(L),S=((e,t)=>r=>{const n=t(r);return e.delete(r),n})(L,P),N=new Map,C=((e,t)=>r=>{const[n,o,s,a]=t(r);return s?new Promise((t=>{o.onmessage=s=>{let{data:i}=s;0===i.length?(e(o),t(n.encode(r,null))):n.record(r,a,i)}})):n.encode(r,null)})(b,S),R=(e=>t=>{for(const[r,n]of Array.from(e.values()))if(r.test(t))return n;throw new Error("There is no encoder registered which could handle the given mimeType.")})(N),$=((e,t,r)=>(n,o,s)=>{if(t.has(n))throw new Error('There is already an encoder registered with an id called "'.concat(n,'".'));const a=r(o),{port1:i,port2:c}=new MessageChannel,d=[a,i,!0,s];return t.set(n,d),i.onmessage=t=>{let{data:r}=t;0===r.length?(e(i),d[2]=!1):a.record(n,s,r.map((e=>"number"==typeof e?new Float32Array(e):e)))},c})(b,L,R),j=(e=>(t,r)=>{const[n]=e(t);return n.encode(t,r)})(P);x(self,{encode:async e=>{let{encoderId:t,timeslice:r}=e;const n=null===r?await C(t):await j(t,r);return{result:n,transferables:n}},instantiate:e=>{let{encoderId:t,mimeType:r,sampleRate:n}=e;const o=$(t,r,n);return{result:o,transferables:[o]}},register:async e=>{let{port:t}=e;return{result:await O(N,t)}}})})()})();`; // tslint:disable-line:max-line-length |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
63355
272
1
Updatedtslib@^2.6.1