text: /**
   * @license b-here v1.0.0
   * (c) 2020 Luca Zampetti <lzampetti@gmail.com>
   * License: MIT
   */
  !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e={};function t(e,t,o){if(!self.createImageBitmap||!self.OffscreenCanvas)return n(e,t);self.createImageBitmap(t).then((function(t){var o=t.width,a=t.height;o>a?o>320&&(a*=320/o,o=320):a>240&&(o*=240/a,a=240);var f=new OffscreenCanvas(o,a),i=f.getContext("2d");f.width=o,f.height=a,i.drawImage(t,0,0,o,a),f.convertToBlob({type:"image/jpeg",quality:.9}).then((function(t){n(e,t)}))}))}function n(e,t){self.postMessage({src:e,blob:t})}self.addEventListener("message",(function(o){var a=o.data.id,f=o.data.src,i=o.data.size;if(!a||f){var r;if("function"==typeof fetch){if(self.AbortController){var s=new AbortController;r={signal:s.signal},e[a]=s}var c=fetch(f,r).then((function(e){return e.blob()}),(function(e){console.log(e)})).then((function(n){delete e[a],"object"==typeof i?t(f,n):c(f,n)}),(function(e){console.log(e)}))}else{var l=new XMLHttpRequest;l.open("GET",f),l.responseType="blob",l.onload=function(){l.status<300&&("object"==typeof i?t(f,blob):n(f,blob))},l.onerror=function(){},l.send()}}else{var u=e[a];u&&u.abort()}}))}));
  //# sourceMappingURL=image.service.worker.min.js.map