define(["./when-b60132fc"],(function(e){"use strict";returnfunction(r){varn;returnfunction(t){vars=t.data,a=[],i={id:s.id,result:void0,error:void0};returne.when(function(r,n,t){try{returnr(n,t)}catch(r){returne.when.reject(r)}}(r,s.parameters,a)).then((function(e){i.result=e})).otherwise((function(e){einstanceofError?i.error={name:e.name,message:e.message,stack:e.stack}:i.error=e})).always((function(){e.defined(n)||(n=e.defaultValue(self.webkitPostMessage,self.postMessage)),s.canTransferArrayBuffer||(a.length=0);try{n(i,a)}catch(r){i.result=void0,i.error="postMessage failed with error: "+function(r){varn,t=r.name,s=r.message;n=e.defined(t)&&e.defined(s)?t+": "+s:r.toString();vara=r.stack;returne.defined(a)&&(n+="\n"+a),n}(r)+"\n with responseMessage: "+JSON.stringify(i),n(i)}}))}}}));