!function(e){function t(t){for(var n,o,i=t[0],a=t[1],u=0,s=[];u1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("script");n.type="text/javascript",n.onerror=function(){t(new Error("Script failed to load"))},n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,t())}:n.onload=function(){t()},n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(5),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,u,c=1,s={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(o=l.documentElement,r=function(e){var t=l.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i(this,e),this.message=t,this.props=n,this.error=Error(this.message),this.isUserError=r,this.rollbarFingerprint=this.message},u={},c={},s={};function f(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];return e?s[this.product.name].assets:this.product.assets}},{key:"load",value:function(e,t){var n=this;return this.productIframe.ready().then((function(r){n.productIframe.injectMetadata(r,t),n.productIframe.injectAssets(r,e)})).catch((function(){return r.a.reject(n.loadProductError())}))}},{key:"loadProductError",value:function(){var e=this.product,t=e.name,n=e.id,r=e.features;return new a("failed to load product",{product:t,id:n,features:r})}}])&&p(t.prototype,n),o&&p(t,o),e}(),h=n(1);function y(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];return new r.a((function(r,i){var a=t.snippet.getParentWindow();n?(a.zEACLoaded=!0,a.$zopim?r(c.products):r(u.products)):o(new b(a,e).resolveComposeUrl()).then((function(e){var t=e.products;a.zEACLoaded=!0,r(t)})).catch((function(){return i(t.error(e))}))}))}},{key:"loadProducts",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map((function(e){var o=e.getProductAssets(n);return e.load(o,t.snippet.getZEQueue()).catch((function(e){return r.a.reject(e)}))}))}},{key:"getProductLoaders",value:function(e){var t=this.snippet.getParentWindow();return e.map((function(e){return"zopim_chat"===e.name?new m(e.id,t):new d(e,t)}))}},{key:"error",value:function(e){return new a("compose request failed",{key:e})}}])&&g(t.prototype,n),i&&g(t,i),e}();function _(e,t){for(var n=0;n