!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,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=14)}([function(e,t,n){"use strict";n.r(t),function(e){var r=n(6),o=setTimeout;function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function u(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void c(t.promise,e)}s(t.promise,r)}else(1===e._state?s:c)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void f(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,l(e)}catch(t){c(e,t)}}function c(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t0&&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.send=r},t.ErrorReporter=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i(this,e),this.win=t,this.useConsole=n,this.errorReportingEnabled=this.getErrorReportingEnabled(),this.rollbarClientLoadedInternally=!1,this.errorLoadingRollbar=!1,this.rollbarInstance=null,this.reportCallQueue=[]}return r(e,[{key:"report",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.useConsole||!r?console.error(t):this.reportToRollbar(e,t,n)}},{key:"flushErrors",value:function(){var e=this;this.rollbarInstance=new this.win.rollbar(a),this.rollbarClientLoadedInternally=!0,this.reportCallQueue.forEach(function(t){e.rollbarInstance.error(t.msg,t.error,t.extraData)}),this.reportCallQueue=[]}},{key:"reportToRollbar",value:function(e,t,n){var r=this;if(!this.errorLoadingRollbar&&this.errorReportingEnabled){var i=Boolean(this.win.rollbar),a={msg:e,error:t,extraData:n};if(this.rollbarClientLoadedInternally)this.rollbarInstance.error(e,t,n);else if(i)try{this.reportCallQueue.push(a),this.flushErrors()}catch(e){this.errorLoadingRollbar=!0}else this.reportCallQueue.length>0?this.reportCallQueue.push(a):(this.reportCallQueue.push(a),(0,o.loadScript)("https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.4.1/rollbar.noconflict.umd.min.js",function(e){e?r.errorLoadingRollbar=!0:r.flushErrors()}))}}},{key:"getErrorReportingEnabled",value:function(){return!this.win.zESettings||void 0===this.win.zESettings.errorReporting||Boolean(this.win.zESettings.errorReporting)}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new r.default(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="json",r.onload=function(){if(r.status===o){var e=r.response,i="string"==typeof e?JSON.parse(e):e;t(i)}else n(Error(r.statusText))},r.onerror=function(){n(Error("Network error"))},r.send()})};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));var o=200},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.COMPOSE_MOCK_RESPONSE={products:[{name:"web_widget",id:"z3nadelciotto.zendesk.com",features:[],url:""}]},t.PRODUCT_MOCK_RESPONSES={web_widget:{assets:{scripts:[{src:"http://localhost:1337/dist/runtime.js"},{src:"http://localhost:1337/dist/common_vendor.js"},{src:"http://localhost:1337/dist/translations.js"},{src:"http://localhost:1337/dist/web_widget.js"}]}}}},function(e,t,n){"use strict";e.exports={parseUrlParams:function(e){var t=function(e){var t=document.createElement("a");return t.href=e,t.search.split("?")[1]||""}(e);return""===t?{}:t.split("&").reduce(function(e,t){var n=t.split("=");return e[n[0]]=decodeURIComponent(n[1]),e},{})},loadScript:function(e,t){var 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||Function("return this")()||(0,eval)("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){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Snippet=void 0;var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];return new i.default(function(r,i){var a=t.snippet.getParentWindow();n?(a.zEACLoaded=!0,r(u.COMPOSE_MOCK_RESPONSE.products)):(0,o.default)("https://ekr.zdassets.com/compose/"+e).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){return e.getProductAssets(n).then(function(n){return e.load(n,t.snippet.getZEQueue())}).catch(function(e){return i.default.reject(e)})})}},{key:"getProductLoaders",value:function(e){var t=this.snippet.getParentWindow();return e.map(function(e){return new s.ProductLoader(e,t)})}},{key:"error",value:function(e){return new a.AssetComposerError("compose request failed",{key:e},!1)}}]),e}()},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(12),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(5))},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=n(10),i=n(7);var a=new(n(1).ErrorReporter)(window,!1);try{!function(){if(!window.zEACLoaded){var e=new i.Snippet(window),t=new o.Composer(e);e.parentDocumentReady().then(function(){return e.getKey()}).then(function(e){return t.getProducts(e,!1)}).then(function(e){return r.default.all(t.loadProducts(t.getProductLoaders(e),!1))}).catch(function(e){return a.report(e.message,e.error,e.props,e.send)})}}()}catch(e){a.report(e.message,e)}}]);