define(["./defaultValue-f6d5e6da"],(function(e){"use strict";returnfunction(r){lett;returnfunction(n){consts=n.data,a=[],i={id:s.id,result:void0,error:void0};returnPromise.resolve(function(e,r,t){letn;try{returnn=e(r,t),n}catch(e){returnPromise.reject(e)}}(r,s.parameters,a)).then((function(e){i.result=e})).catch((function(e){einstanceofError?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e})).finally((function(){e.defined(t)||(t=e.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{t(i,a)}catch(r){i.result=void0,i.error=`postMessage failed with error: ${function(r){lett;constn=r.name,s=r.message;t=e.defined(n)&&e.defined(s)?`${n}: ${s}`:r.toString();consta=r.stack;returne.defined(a)&&(t+=`\n${a}`),t}(r)}\n with responseMessage: ${JSON.stringify(i)}`,t(i)}}))}}}));