async-array-buffer
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
export declare const worker = "!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=9)}([function(e,t,r){!function(e,t,r,n){\"use strict\";t=t&&t.hasOwnProperty(\"default\")?t.default:t,r=r&&r.hasOwnProperty(\"default\")?r.default:r,n=n&&n.hasOwnProperty(\"default\")?n.default:n;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return\"\".concat(o).concat(i)}return\"dashify\"===t?r(e):\"prependIndefiniteArticle\"===t?\"\".concat(n(e),\" \").concat(e):e}),e)},i=function(e,r){for(var n=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],a=n.exec(e);null!==a;){var u={modifiers:[],name:a[1]};if(void 0!==a[3])for(var c=/\\.[^(]+\\(\\)/g,s=c.exec(a[2]);null!==s;)u.modifiers.push(s[0].slice(1,-2)),s=c.exec(a[2]);i.push(u),a=n.exec(e)}var f=i.reduce((function(e,n){return e.map((function(e){return\"string\"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")}(n)).reduce((function(e,i,a){return 0===a?[i]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),i]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},i])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return f.reduce((function(r,n){return[].concat(t(r),\"string\"==typeof n?[n]:[n(e)])}),[]).join(\"\")}};e.compile=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=i.cause,u=i.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}return o},Object.defineProperty(e,\"__esModule\",{value:!0})}(t,r(3),r(7),r(8))},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){!function(e){\"use strict\";var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=new WeakMap,o=(t=n,function(e,r){return t.set(e,r),r}),i=function(e,t){return function(n){var o=t.get(n),i=void 0===o?n.size:o>2147483646?0:o+1;if(!n.has(i))return e(n,i);if(n.size<1073741824){for(;n.has(i);)i=Math.floor(2147483648*Math.random());return e(n,i)}if(n.size>r)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;n.has(i);)i=Math.floor(Math.random()*r);return e(n,i)}}(o,n),a=function(e){return function(t){var r=e(t);return t.add(r),r}}(i);e.addUniqueNumber=a,e.generateUniqueNumber=i,Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},function(e,t,r){var n=r(4),o=r(5),i=r(6);e.exports=function(e){return n(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||\"[object Arguments]\"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}},function(e,t,r){\"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()}},function(e,t,r){var n=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return\"an\";var o=(r=n[0]).toLowerCase(),i=[\"honest\",\"hour\",\"hono\"];for(t in i)if(0==o.indexOf(i[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?\"an\":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=n:window.indefiniteArticle=n},function(e,t,r){\"use strict\";r.r(t);var n=r(0);const o=-32603,i=-32602,a=-32601,u=Object(n.compile)({message:'The requested method called \"${method}\" is not supported.',status:a}),c=Object(n.compile)({message:'The handler of the method called \"${method}\" returned no required result.',status:o}),s=Object(n.compile)({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:o}),f=Object(n.compile)({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:i}),l=(e,t)=>async r=>{let{data:{id:n,method:o,params:i}}=r;const a=t[o];try{if(void 0===a)throw u({method:o});const t=void 0===i?a():a(i);if(void 0===t)throw c({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw s({method:o})}else{if(void 0===r.result)throw s({method:o});const{result:t,transferables:i=[]}=r;e.postMessage({id:n,result:t},i)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}};var d=r(1),p=r.n(d),m=r(2);function h(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}const v=new Map,g=(e,t,r)=>(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){p()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e})({},t,{connect:r=>{let{port:n}=r;n.start();const o=e(n,t),i=Object(m.generateUniqueNumber)(v);return v.set(i,()=>{o(),n.close(),v.delete(i)}),{result:i}},disconnect:e=>{let{portId:t}=e;const r=v.get(t);if(void 0===r)throw f({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}}});!function e(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const o=g(e,r,n),i=l(t,o);return t.addEventListener(\"message\",i),()=>t.removeEventListener(\"message\",i)}(self,{allocate:e=>{let{length:t}=e;const r=(e=>new ArrayBuffer(e))(t);return{result:r,transferables:[r]}},deallocate:()=>({result:void 0})})}]);"; | ||
export declare const worker = "!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=40)}([function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return c})),n.d(t,\"b\",(function(){return a})),n.d(t,\"c\",(function(){return s})),n.d(t,\"d\",(function(){return f}));var r=n(1);const o=-32603,i=-32602,u=-32601,c=Object(r.compile)({message:'The requested method called \"${method}\" is not supported.',status:u}),a=Object(r.compile)({message:'The handler of the method called \"${method}\" returned no required result.',status:o}),s=Object(r.compile)({message:'The handler of the method called \"${method}\" returned an unexpected result.',status:o}),f=Object(r.compile)({message:'The specified parameter called \"portId\" with the given value \"${portId}\" does not identify a port connected to this worker.',status:i})},function(e,t,n){!function(e,t,n,r){\"use strict\";t=t&&t.hasOwnProperty(\"default\")?t.default:t,n=n&&n.hasOwnProperty(\"default\")?n.default:n,r=r&&r.hasOwnProperty(\"default\")?r.default:r;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if(\"capitalize\"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return\"\".concat(o).concat(i)}return\"dashify\"===t?n(e):\"prependIndefiniteArticle\"===t?\"\".concat(r(e),\" \").concat(e):e}),e)},i=function(e,n){for(var r=/\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],u=r.exec(e);null!==u;){var c={modifiers:[],name:u[1]};if(void 0!==u[3])for(var a=/\\.[^(]+\\(\\)/g,s=a.exec(u[2]);null!==s;)c.modifiers.push(s[0].slice(1,-2)),s=a.exec(u[2]);i.push(c),u=r.exec(e)}var f=i.reduce((function(e,r){return e.map((function(e){return\"string\"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return\"\\\\.\".concat(e,\"\\\\(\\\\)\")})).join(\"\");return new RegExp(\"\\\\$\\\\{\".concat(t,\"}\"),\"g\")}(r)).reduce((function(e,i,u){return 0===u?[i]:r.name in n?[].concat(t(e),[o(n[r.name],r.modifiers),i]):[].concat(t(e),[function(e){return o(e[r.name],r.modifiers)},i])}),[]):[e]})).reduce((function(e,n){return[].concat(t(e),t(n))}),[])}),[e]);return function(e){return f.reduce((function(n,r){return[].concat(t(n),\"string\"==typeof r?[r]:[r(e)])}),[]).join(\"\")}};e.compile=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0===e.code?void 0:i(e.code,t),r=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&\"Exception\"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},u=i.cause,c=i.missingParameters,a=void 0===r?new Error:new Error(r(c));return null!==u&&(a.cause=u),void 0!==n&&(a.code=n(c)),void 0!==e.status&&(a.status=e.status),a}return o},Object.defineProperty(e,\"__esModule\",{value:!0})}(t,n(41),n(45),n(46))},function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return r}));const r=()=>new Promise(e=>{const t=new ArrayBuffer(0),{port1:n,port2:r}=new MessageChannel;n.onmessage=t=>{let{data:n}=t;return e(null!==n)},r.postMessage(t,[t])})},function(e,t,n){\"use strict\";n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){\"use strict\";n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){\"use strict\";n.r(t);var r=n(31);for(var o in r)\"default\"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){\"use strict\";n.r(t);var r=n(33);for(var o in r)\"default\"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){\"use strict\";n.d(t,\"createWorker\",(function(){return i}));var r=n(35),o=n(36);n(2),n(3),n(18);const i=function e(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const u=Object(o.a)(e,n,i),c=Object(r.a)(t,u);return t.addEventListener(\"message\",c),()=>t.removeEventListener(\"message\",c)}},function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return o}));var r=n(0);const o=(e,t)=>async n=>{let{data:{id:o,method:i,params:u}}=n;const c=t[i];try{if(void 0===c)throw Object(r.a)({method:i});const t=void 0===u?c():c(u);if(void 0===t)throw Object(r.b)({method:i});const n=t instanceof Promise?await t:t;if(null===o){if(void 0!==n.result)throw Object(r.c)({method:i})}else{if(void 0===n.result)throw Object(r.c)({method:i});const{result:t,transferables:u=[]}=n;e.postMessage({id:o,result:t},u)}}catch(t){const{message:n,status:r=-32603}=t;e.postMessage({error:{code:r,message:n},id:o})}}},function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return f}));var r=n(37),o=n.n(r),i=n(38),u=n(0),c=n(2);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const s=new Map,f=(e,t,n)=>(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e})({},t,{connect:n=>{let{port:r}=n;r.start();const o=e(r,t),u=Object(i.generateUniqueNumber)(s);return s.set(u,()=>{o(),r.close(),s.delete(u)}),{result:u}},disconnect:e=>{let{portId:t}=e;const n=s.get(t);if(void 0===n)throw Object(u.d)({portId:t.toString()});return n(),{result:null}},isSupported:async()=>{if(await Object(c.a)()){const e=n();return{result:e instanceof Promise?await e:e}}return{result:!1}}})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){!function(e){\"use strict\";var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=new WeakMap,o=(t=r,function(e,n){return t.set(e,n),n}),i=function(e,t){return function(r){var o=t.get(r),i=void 0===o?r.size:o>2147483646?0:o+1;if(!r.has(i))return e(r,i);if(r.size<1073741824){for(;r.has(i);)i=Math.floor(2147483648*Math.random());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)}}(o,r),u=function(e){return function(t){var n=e(t);return t.add(n),n}}(i);e.addUniqueNumber=u,e.generateUniqueNumber=i,Object.defineProperty(e,\"__esModule\",{value:!0})}(t)},function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return r}));const r=e=>new ArrayBuffer(e)},function(e,t,n){\"use strict\";n.r(t);var r=n(34),o=n(39),i=n(30);for(var u in i)\"default\"!==u&&function(e){n.d(t,e,(function(){return i[e]}))}(u);var c=n(32);for(var u in c)\"default\"!==u&&function(e){n.d(t,e,(function(){return c[e]}))}(u);Object(r.createWorker)(self,{allocate:e=>{let{length:t}=e;const n=Object(o.a)(t);return{result:n,transferables:[n]}},deallocate:()=>({result:void 0})})},function(e,t,n){var r=n(42),o=n(43),i=n(44);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||\"[object Arguments]\"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}},function(e,t,n){\"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()}},function(e,t,n){var r=function(e){var t,n,r=/\\w+/.exec(e);if(!r)return\"an\";var o=(n=r[0]).toLowerCase(),i=[\"honest\",\"hour\",\"hono\"];for(t in i)if(0==o.indexOf(i[t]))return\"an\";if(1==o.length)return\"aedhilmnorsx\".indexOf(o)>=0?\"an\":\"a\";if(n.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return\"an\";var u=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<u.length;t++)if(o.match(u[t]))return\"a\";return n.match(/^U[NK][AIEO]/)?\"a\":n==n.toUpperCase()?\"aedhilmnorsx\".indexOf(o[0])>=0?\"an\":\"a\":\"aeiou\".indexOf(o[0])>=0?\"an\":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?\"an\":\"a\"};void 0!==e.exports?e.exports=r:window.indefiniteArticle=r}]);"; | ||
//# sourceMappingURL=/build/es2018/worker/worker.d.ts.map |
// tslint:disable-next-line:max-line-length | ||
export const worker = `!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){!function(e,t,r,n){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return"".concat(o).concat(i)}return"dashify"===t?r(e):"prependIndefiniteArticle"===t?"".concat(n(e)," ").concat(e):e}),e)},i=function(e,r){for(var n=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],a=n.exec(e);null!==a;){var u={modifiers:[],name:a[1]};if(void 0!==a[3])for(var c=/\\.[^(]+\\(\\)/g,s=c.exec(a[2]);null!==s;)u.modifiers.push(s[0].slice(1,-2)),s=c.exec(a[2]);i.push(u),a=n.exec(e)}var f=i.reduce((function(e,n){return e.map((function(e){return"string"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")}(n)).reduce((function(e,i,a){return 0===a?[i]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),i]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},i])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return f.reduce((function(r,n){return[].concat(t(r),"string"==typeof n?[n]:[n(e)])}),[]).join("")}};e.compile=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=i.cause,u=i.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}return o},Object.defineProperty(e,"__esModule",{value:!0})}(t,r(3),r(7),r(8))},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){!function(e){"use strict";var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=new WeakMap,o=(t=n,function(e,r){return t.set(e,r),r}),i=function(e,t){return function(n){var o=t.get(n),i=void 0===o?n.size:o>2147483646?0:o+1;if(!n.has(i))return e(n,i);if(n.size<1073741824){for(;n.has(i);)i=Math.floor(2147483648*Math.random());return e(n,i)}if(n.size>r)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(i);)i=Math.floor(Math.random()*r);return e(n,i)}}(o,n),a=function(e){return function(t){var r=e(t);return t.add(r),r}}(i);e.addUniqueNumber=a,e.generateUniqueNumber=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){var n=r(4),o=r(5),i=r(6);e.exports=function(e){return n(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,r){"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()}},function(e,t,r){var n=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),i=["honest","hour","hono"];for(t in i)if(0==o.indexOf(i[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?"an":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=n:window.indefiniteArticle=n},function(e,t,r){"use strict";r.r(t);var n=r(0);const o=-32603,i=-32602,a=-32601,u=Object(n.compile)({message:'The requested method called "\${method}" is not supported.',status:a}),c=Object(n.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:o}),s=Object(n.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:o}),f=Object(n.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:i}),l=(e,t)=>async r=>{let{data:{id:n,method:o,params:i}}=r;const a=t[o];try{if(void 0===a)throw u({method:o});const t=void 0===i?a():a(i);if(void 0===t)throw c({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw s({method:o})}else{if(void 0===r.result)throw s({method:o});const{result:t,transferables:i=[]}=r;e.postMessage({id:n,result:t},i)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}};var d=r(1),p=r.n(d),m=r(2);function h(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}const v=new Map,g=(e,t,r)=>(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){p()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e})({},t,{connect:r=>{let{port:n}=r;n.start();const o=e(n,t),i=Object(m.generateUniqueNumber)(v);return v.set(i,()=>{o(),n.close(),v.delete(i)}),{result:i}},disconnect:e=>{let{portId:t}=e;const r=v.get(t);if(void 0===r)throw f({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}}});!function e(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const o=g(e,r,n),i=l(t,o);return t.addEventListener("message",i),()=>t.removeEventListener("message",i)}(self,{allocate:e=>{let{length:t}=e;const r=(e=>new ArrayBuffer(e))(t);return{result:r,transferables:[r]}},deallocate:()=>({result:void 0})})}]);`; | ||
export const worker = `!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=40)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return f}));var r=n(1);const o=-32603,i=-32602,u=-32601,c=Object(r.compile)({message:'The requested method called "\${method}" is not supported.',status:u}),a=Object(r.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:o}),s=Object(r.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:o}),f=Object(r.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:i})},function(e,t,n){!function(e,t,n,r){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return"".concat(o).concat(i)}return"dashify"===t?n(e):"prependIndefiniteArticle"===t?"".concat(r(e)," ").concat(e):e}),e)},i=function(e,n){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],u=r.exec(e);null!==u;){var c={modifiers:[],name:u[1]};if(void 0!==u[3])for(var a=/\\.[^(]+\\(\\)/g,s=a.exec(u[2]);null!==s;)c.modifiers.push(s[0].slice(1,-2)),s=a.exec(u[2]);i.push(c),u=r.exec(e)}var f=i.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")}(r)).reduce((function(e,i,u){return 0===u?[i]:r.name in n?[].concat(t(e),[o(n[r.name],r.modifiers),i]):[].concat(t(e),[function(e){return o(e[r.name],r.modifiers)},i])}),[]):[e]})).reduce((function(e,n){return[].concat(t(e),t(n))}),[])}),[e]);return function(e){return f.reduce((function(n,r){return[].concat(t(n),"string"==typeof r?[r]:[r(e)])}),[]).join("")}};e.compile=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0===e.code?void 0:i(e.code,t),r=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},u=i.cause,c=i.missingParameters,a=void 0===r?new Error:new Error(r(c));return null!==u&&(a.cause=u),void 0!==n&&(a.code=n(c)),void 0!==e.status&&(a.status=e.status),a}return o},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(41),n(45),n(46))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=()=>new Promise(e=>{const t=new ArrayBuffer(0),{port1:n,port2:r}=new MessageChannel;n.onmessage=t=>{let{data:n}=t;return e(null!==n)},r.postMessage(t,[t])})},function(e,t,n){"use strict";n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(31);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(33);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){"use strict";n.d(t,"createWorker",(function(){return i}));var r=n(35),o=n(36);n(2),n(3),n(18);const i=function e(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const u=Object(o.a)(e,n,i),c=Object(r.a)(t,u);return t.addEventListener("message",c),()=>t.removeEventListener("message",c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=(e,t)=>async n=>{let{data:{id:o,method:i,params:u}}=n;const c=t[i];try{if(void 0===c)throw Object(r.a)({method:i});const t=void 0===u?c():c(u);if(void 0===t)throw Object(r.b)({method:i});const n=t instanceof Promise?await t:t;if(null===o){if(void 0!==n.result)throw Object(r.c)({method:i})}else{if(void 0===n.result)throw Object(r.c)({method:i});const{result:t,transferables:u=[]}=n;e.postMessage({id:o,result:t},u)}}catch(t){const{message:n,status:r=-32603}=t;e.postMessage({error:{code:r,message:n},id:o})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(37),o=n.n(r),i=n(38),u=n(0),c=n(2);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const s=new Map,f=(e,t,n)=>(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e})({},t,{connect:n=>{let{port:r}=n;r.start();const o=e(r,t),u=Object(i.generateUniqueNumber)(s);return s.set(u,()=>{o(),r.close(),s.delete(u)}),{result:u}},disconnect:e=>{let{portId:t}=e;const n=s.get(t);if(void 0===n)throw Object(u.d)({portId:t.toString()});return n(),{result:null}},isSupported:async()=>{if(await Object(c.a)()){const e=n();return{result:e instanceof Promise?await e:e}}return{result:!1}}})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){!function(e){"use strict";var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=new WeakMap,o=(t=r,function(e,n){return t.set(e,n),n}),i=function(e,t){return function(r){var o=t.get(r),i=void 0===o?r.size:o>2147483646?0:o+1;if(!r.has(i))return e(r,i);if(r.size<1073741824){for(;r.has(i);)i=Math.floor(2147483648*Math.random());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)}}(o,r),u=function(e){return function(t){var n=e(t);return t.add(n),n}}(i);e.addUniqueNumber=u,e.generateUniqueNumber=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>new ArrayBuffer(e)},function(e,t,n){"use strict";n.r(t);var r=n(34),o=n(39),i=n(30);for(var u in i)"default"!==u&&function(e){n.d(t,e,(function(){return i[e]}))}(u);var c=n(32);for(var u in c)"default"!==u&&function(e){n.d(t,e,(function(){return c[e]}))}(u);Object(r.createWorker)(self,{allocate:e=>{let{length:t}=e;const n=Object(o.a)(t);return{result:n,transferables:[n]}},deallocate:()=>({result:void 0})})},function(e,t,n){var r=n(42),o=n(43),i=n(44);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"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()}},function(e,t,n){var r=function(e){var t,n,r=/\\w+/.exec(e);if(!r)return"an";var o=(n=r[0]).toLowerCase(),i=["honest","hour","hono"];for(t in i)if(0==o.indexOf(i[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(n.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var u=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<u.length;t++)if(o.match(u[t]))return"a";return n.match(/^U[NK][AIEO]/)?"a":n==n.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0?"an":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=r:window.indefiniteArticle=r}]);`; | ||
//# sourceMappingURL=/build/es2018/worker/worker.js.map |
@@ -13,4 +13,4 @@ { | ||
"@babel/runtime": "^7.7.6", | ||
"async-array-buffer-broker": "^3.0.36", | ||
"async-array-buffer-worker": "^5.0.35", | ||
"async-array-buffer-broker": "^3.0.37", | ||
"async-array-buffer-worker": "^5.0.36", | ||
"tslib": "^1.10.0" | ||
@@ -56,9 +56,9 @@ }, | ||
"sinon-chai": "^3.3.0", | ||
"terser-webpack-plugin": "^2.3.0", | ||
"terser-webpack-plugin": "^2.3.1", | ||
"ts-loader": "^6.2.1", | ||
"tsconfig-holy-grail": "^10.0.34", | ||
"tsconfig-holy-grail": "^10.0.35", | ||
"tslint": "^5.20.1", | ||
"tslint-config-holy-grail": "^47.0.3", | ||
"typescript": "^3.7.3", | ||
"webpack": "^4.41.2" | ||
"webpack": "^4.41.3" | ||
}, | ||
@@ -90,3 +90,3 @@ "files": [ | ||
"types": "build/es2018/module.d.ts", | ||
"version": "3.0.42" | ||
"version": "3.0.43" | ||
} |
// tslint:disable-next-line:max-line-length | ||
export const worker = `!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t,r){!function(e,t,r,n){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return"".concat(o).concat(i)}return"dashify"===t?r(e):"prependIndefiniteArticle"===t?"".concat(n(e)," ").concat(e):e}),e)},i=function(e,r){for(var n=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],a=n.exec(e);null!==a;){var u={modifiers:[],name:a[1]};if(void 0!==a[3])for(var c=/\\.[^(]+\\(\\)/g,s=c.exec(a[2]);null!==s;)u.modifiers.push(s[0].slice(1,-2)),s=c.exec(a[2]);i.push(u),a=n.exec(e)}var f=i.reduce((function(e,n){return e.map((function(e){return"string"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")}(n)).reduce((function(e,i,a){return 0===a?[i]:n.name in r?[].concat(t(e),[o(r[n.name],n.modifiers),i]):[].concat(t(e),[function(e){return o(e[n.name],n.modifiers)},i])}),[]):[e]})).reduce((function(e,r){return[].concat(t(e),t(r))}),[])}),[e]);return function(e){return f.reduce((function(r,n){return[].concat(t(r),"string"==typeof n?[n]:[n(e)])}),[]).join("")}};e.compile=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},a=i.cause,u=i.missingParameters,c=void 0===n?new Error:new Error(n(u));return null!==a&&(c.cause=a),void 0!==r&&(c.code=r(u)),void 0!==e.status&&(c.status=e.status),c}return o},Object.defineProperty(e,"__esModule",{value:!0})}(t,r(3),r(7),r(8))},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){!function(e){"use strict";var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=new WeakMap,o=(t=n,function(e,r){return t.set(e,r),r}),i=function(e,t){return function(n){var o=t.get(n),i=void 0===o?n.size:o>2147483646?0:o+1;if(!n.has(i))return e(n,i);if(n.size<1073741824){for(;n.has(i);)i=Math.floor(2147483648*Math.random());return e(n,i)}if(n.size>r)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;n.has(i);)i=Math.floor(Math.random()*r);return e(n,i)}}(o,n),a=function(e){return function(t){var r=e(t);return t.add(r),r}}(i);e.addUniqueNumber=a,e.generateUniqueNumber=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){var n=r(4),o=r(5),i=r(6);e.exports=function(e){return n(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,r){"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()}},function(e,t,r){var n=function(e){var t,r,n=/\\w+/.exec(e);if(!n)return"an";var o=(r=n[0]).toLowerCase(),i=["honest","hour","hono"];for(t in i)if(0==o.indexOf(i[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?"an":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=n:window.indefiniteArticle=n},function(e,t,r){"use strict";r.r(t);var n=r(0);const o=-32603,i=-32602,a=-32601,u=Object(n.compile)({message:'The requested method called "\${method}" is not supported.',status:a}),c=Object(n.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:o}),s=Object(n.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:o}),f=Object(n.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:i}),l=(e,t)=>async r=>{let{data:{id:n,method:o,params:i}}=r;const a=t[o];try{if(void 0===a)throw u({method:o});const t=void 0===i?a():a(i);if(void 0===t)throw c({method:o});const r=t instanceof Promise?await t:t;if(null===n){if(void 0!==r.result)throw s({method:o})}else{if(void 0===r.result)throw s({method:o});const{result:t,transferables:i=[]}=r;e.postMessage({id:n,result:t},i)}}catch(t){const{message:r,status:o=-32603}=t;e.postMessage({error:{code:o,message:r},id:n})}};var d=r(1),p=r.n(d),m=r(2);function h(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}const v=new Map,g=(e,t,r)=>(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){p()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e})({},t,{connect:r=>{let{port:n}=r;n.start();const o=e(n,t),i=Object(m.generateUniqueNumber)(v);return v.set(i,()=>{o(),n.close(),v.delete(i)}),{result:i}},disconnect:e=>{let{portId:t}=e;const r=v.get(t);if(void 0===r)throw f({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}}});!function e(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const o=g(e,r,n),i=l(t,o);return t.addEventListener("message",i),()=>t.removeEventListener("message",i)}(self,{allocate:e=>{let{length:t}=e;const r=(e=>new ArrayBuffer(e))(t);return{result:r,transferables:[r]}},deallocate:()=>({result:void 0})})}]);`; | ||
export const worker = `!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=40)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return f}));var r=n(1);const o=-32603,i=-32602,u=-32601,c=Object(r.compile)({message:'The requested method called "\${method}" is not supported.',status:u}),a=Object(r.compile)({message:'The handler of the method called "\${method}" returned no required result.',status:o}),s=Object(r.compile)({message:'The handler of the method called "\${method}" returned an unexpected result.',status:o}),f=Object(r.compile)({message:'The specified parameter called "portId" with the given value "\${portId}" does not identify a port connected to this worker.',status:i})},function(e,t,n){!function(e,t,n,r){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var o=function(e,t){return void 0===t?e:t.reduce((function(e,t){if("capitalize"===t){var o=e.charAt(0).toUpperCase(),i=e.slice(1);return"".concat(o).concat(i)}return"dashify"===t?n(e):"prependIndefiniteArticle"===t?"".concat(r(e)," ").concat(e):e}),e)},i=function(e,n){for(var r=/\\\${([^.}]+)((\\.[^(]+\\(\\))*)}/g,i=[],u=r.exec(e);null!==u;){var c={modifiers:[],name:u[1]};if(void 0!==u[3])for(var a=/\\.[^(]+\\(\\)/g,s=a.exec(u[2]);null!==s;)c.modifiers.push(s[0].slice(1,-2)),s=a.exec(u[2]);i.push(c),u=r.exec(e)}var f=i.reduce((function(e,r){return e.map((function(e){return"string"==typeof e?e.split(function(e){var t=e.name+e.modifiers.map((function(e){return"\\\\.".concat(e,"\\\\(\\\\)")})).join("");return new RegExp("\\\\$\\\\{".concat(t,"}"),"g")}(r)).reduce((function(e,i,u){return 0===u?[i]:r.name in n?[].concat(t(e),[o(n[r.name],r.modifiers),i]):[].concat(t(e),[function(e){return o(e[r.name],r.modifiers)},i])}),[]):[e]})).reduce((function(e,n){return[].concat(t(e),t(n))}),[])}),[e]);return function(e){return f.reduce((function(n,r){return[].concat(t(n),"string"==typeof r?[r]:[r(e)])}),[]).join("")}};e.compile=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0===e.code?void 0:i(e.code,t),r=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,i=void 0===o&&(t instanceof Error||void 0!==t.code&&"Exception"===t.code.slice(-9))?{cause:t,missingParameters:{}}:{cause:o,missingParameters:t},u=i.cause,c=i.missingParameters,a=void 0===r?new Error:new Error(r(c));return null!==u&&(a.cause=u),void 0!==n&&(a.code=n(c)),void 0!==e.status&&(a.status=e.status),a}return o},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(41),n(45),n(46))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=()=>new Promise(e=>{const t=new ArrayBuffer(0),{port1:n,port2:r}=new MessageChannel;n.onmessage=t=>{let{data:n}=t;return e(null!==n)},r.postMessage(t,[t])})},function(e,t,n){"use strict";n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29)},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(31);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(33);for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o)},function(e,t){},function(e,t,n){"use strict";n.d(t,"createWorker",(function(){return i}));var r=n(35),o=n(36);n(2),n(3),n(18);const i=function e(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const u=Object(o.a)(e,n,i),c=Object(r.a)(t,u);return t.addEventListener("message",c),()=>t.removeEventListener("message",c)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=(e,t)=>async n=>{let{data:{id:o,method:i,params:u}}=n;const c=t[i];try{if(void 0===c)throw Object(r.a)({method:i});const t=void 0===u?c():c(u);if(void 0===t)throw Object(r.b)({method:i});const n=t instanceof Promise?await t:t;if(null===o){if(void 0!==n.result)throw Object(r.c)({method:i})}else{if(void 0===n.result)throw Object(r.c)({method:i});const{result:t,transferables:u=[]}=n;e.postMessage({id:o,result:t},u)}}catch(t){const{message:n,status:r=-32603}=t;e.postMessage({error:{code:r,message:n},id:o})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(37),o=n.n(r),i=n(38),u=n(0),c=n(2);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const s=new Map,f=(e,t,n)=>(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e})({},t,{connect:n=>{let{port:r}=n;r.start();const o=e(r,t),u=Object(i.generateUniqueNumber)(s);return s.set(u,()=>{o(),r.close(),s.delete(u)}),{result:u}},disconnect:e=>{let{portId:t}=e;const n=s.get(t);if(void 0===n)throw Object(u.d)({portId:t.toString()});return n(),{result:null}},isSupported:async()=>{if(await Object(c.a)()){const e=n();return{result:e instanceof Promise?await e:e}}return{result:!1}}})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){!function(e){"use strict";var t,n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,r=new WeakMap,o=(t=r,function(e,n){return t.set(e,n),n}),i=function(e,t){return function(r){var o=t.get(r),i=void 0===o?r.size:o>2147483646?0:o+1;if(!r.has(i))return e(r,i);if(r.size<1073741824){for(;r.has(i);)i=Math.floor(2147483648*Math.random());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)}}(o,r),u=function(e){return function(t){var n=e(t);return t.add(n),n}}(i);e.addUniqueNumber=u,e.generateUniqueNumber=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>new ArrayBuffer(e)},function(e,t,n){"use strict";n.r(t);var r=n(34),o=n(39),i=n(30);for(var u in i)"default"!==u&&function(e){n.d(t,e,(function(){return i[e]}))}(u);var c=n(32);for(var u in c)"default"!==u&&function(e){n.d(t,e,(function(){return c[e]}))}(u);Object(r.createWorker)(self,{allocate:e=>{let{length:t}=e;const n=Object(o.a)(t);return{result:n,transferables:[n]}},deallocate:()=>({result:void 0})})},function(e,t,n){var r=n(42),o=n(43),i=n(44);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"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()}},function(e,t,n){var r=function(e){var t,n,r=/\\w+/.exec(e);if(!r)return"an";var o=(n=r[0]).toLowerCase(),i=["honest","hour","hono"];for(t in i)if(0==o.indexOf(i[t]))return"an";if(1==o.length)return"aedhilmnorsx".indexOf(o)>=0?"an":"a";if(n.match(/(?!FJO|[HLMNS]Y.|RY[EO]|SQU|(F[LR]?|[HL]|MN?|N|RH?|S[CHKLMNPTVW]?|X(YL)?)[AEIOU])[FHLMNRSX][A-Z]/))return"an";var u=[/^e[uw]/,/^onc?e\\b/,/^uni([^nmd]|mo)/,/^u[bcfhjkqrst][aeiou]/];for(t=0;t<u.length;t++)if(o.match(u[t]))return"a";return n.match(/^U[NK][AIEO]/)?"a":n==n.toUpperCase()?"aedhilmnorsx".indexOf(o[0])>=0?"an":"a":"aeiou".indexOf(o[0])>=0?"an":o.match(/^y(b[lor]|cl[ea]|fere|gg|p[ios]|rou|tt)/)?"an":"a"};void 0!==e.exports?e.exports=r:window.indefiniteArticle=r}]);`; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
53423
11.41%231
10%1
Infinity%