@saasquatch/squatch-js 2.5.1-11 → 2.5.1-12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/squatch.esm.js +1 -1
- package/dist/squatch.js +1 -1
- package/dist/squatch.min.js +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/squatch.esm.js
CHANGED
|
@@ -2355,7 +2355,7 @@ if (typeof document !== "undefined" && !window.SaaSquatchDoNotAutoDrop) {
|
|
|
2355
2355
|
pushCookie();
|
|
2356
2356
|
}
|
|
2357
2357
|
|
|
2358
|
-
if (typeof document !== "undefined") asyncLoad();
|
|
2358
|
+
if (typeof document !== "undefined" && window._squatch) asyncLoad();
|
|
2359
2359
|
|
|
2360
2360
|
export { CtaWidget, EmbedWidget, PopupWidget, WidgetApi, Widgets, _auto, api, autofill, events, help, init, pushCookie, ready, submitEmail, widget, widgets };
|
|
2361
2361
|
//# sourceMappingURL=squatch.esm.js.map
|
package/dist/squatch.js
CHANGED
|
@@ -2382,7 +2382,7 @@ if (typeof document !== "undefined" && !window.SaaSquatchDoNotAutoDrop) {
|
|
|
2382
2382
|
pushCookie();
|
|
2383
2383
|
}
|
|
2384
2384
|
|
|
2385
|
-
if (typeof document !== "undefined") asyncLoad();
|
|
2385
|
+
if (typeof document !== "undefined" && window._squatch) asyncLoad();
|
|
2386
2386
|
|
|
2387
2387
|
exports.CtaWidget = CtaWidget;
|
|
2388
2388
|
exports.EmbedWidget = EmbedWidget;
|
package/dist/squatch.min.js
CHANGED
|
@@ -10,4 +10,4 @@ function r(t,e){var n,r=[],o=t,i=o.documentElement.doScroll,a=(i?/^loaded|^c/:/^
|
|
|
10
10
|
*
|
|
11
11
|
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
|
|
12
12
|
* Released under the MIT license
|
|
13
|
-
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+s}}function a(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(s[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return a(t,!1)},o.getJSON=function(t){return a(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(60);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(72),o=n(40),i=n(24),a=n(62),s=n(23),c=n(80),u=Object.getOwnPropertyDescriptor;e.f=n(22)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(30),o=n(31);function i(e){return"function"==typeof r&&"symbol"==typeof o?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(12),p=n.n(l),h=n(5),d=n.n(h),v=n(6),y=n.n(v),m=n(27),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(2),j=n.n(E),T=n(3),S=n.n(T),k=n(57),A=n(28);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var L=S()("squatch-js:EMBEDwidget"),F=function(t){b()(r,t);var e,n=R(r);function r(t,e){var o,i;if(d()(this,r),o=n.call(this,t),"string"==typeof e?(i=document.querySelector(e),L("loading widget with selector",i)):e instanceof HTMLElement?L("loading widget with container",i=e):e?(i=null,L("container must be an HTMLElement or string",e)):(i=document.querySelector("#squatchembed")||document.querySelector(".squatchembed"),L("loading widget with default selector",i)),!(i instanceof HTMLElement))throw new Error("element with selector '".concat(e,"' not found.'"));return o.element=i,o}return y()(r,[{key:"load",value:(e=p()(j.a.mark((function t(){var e,n,r=this;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.context.container?(this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",this.element.firstChild?this.element.replaceChild(this.frame,this.element.firstChild):this.element.appendChild(this.frame)):this.element.firstChild&&"#text"!==this.element.firstChild.nodeName||this.element.appendChild(this.frame),e=this.frame.contentWindow){t.next=4;break}throw new Error("Frame needs a content window");case 4:(n=e.document).open(),n.write(this.content),n.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),n.close(),Object(A.a)(n,p()(j.a.mark((function t(){var o,i,a;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.squatch||e.widgetIdent,!(i=n.getElementById("cta"))){t.next=6;break}if(i.parentNode){t.next=5;break}throw new Error("ctaElement needs a parentNode");case 5:i.parentNode.removeChild(i);case 6:return r.frame.height=n.body.scrollHeight,a=new e.ResizeObserver((function(t){var e,n=P(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect.height;r.frame.height=o}}catch(t){n.e(t)}finally{n.f()}})),t.t0=a,t.next=11,r._findInnerContainer();case 11:t.t1=t.sent,t.t0.observe.call(t.t0,t.t1),r.context.container||(r._loadEvent(o),L("loaded"));case 14:case"end":return t.stop()}}),t)}))));case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"open",value:function(){var t,e,n,r,o,i;if(!this.frame)return L("no target element to open");this.element.style.visibility="unset",this.element.style.height="auto",this.element.style["overflow-y"]="auto",null===(t=this.frame)||void 0===t||null===(e=t.contentDocument)||void 0===e||e.dispatchEvent(new CustomEvent("sq:refresh"));var a=(null===(n=this.frame)||void 0===n||null===(r=n.contentWindow)||void 0===r?void 0:r.squatch)||(null===(o=this.frame)||void 0===o||null===(i=o.contentWindow)||void 0===i?void 0:i.widgetIdent);this._loadEvent(a),L("loaded")}},{key:"close",value:function(){if(!this.frame)return L("no target element to close");this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",L("Embed widget closed")}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"embed",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return g()(O()(r.prototype),"_error",this).call(this,t,e,n)}}]),r}(k.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(21),o=n.n(r),i=n(12),a=n.n(i),s=n(5),c=n.n(s),u=n(6),f=n.n(u),l=n(2),p=n.n(l),h=n(18),d=n.n(h),v=n(25),y=n.n(v),m=n(11),g=n.n(m),w=n(13),b=n.n(w),x=n(14),_=n.n(x),C=n(16),O=n.n(C),E=n(38),j=n.n(E),T=n(19),S=n(1);function k(t,e){var n=g()(t);if(b.a){var r=b()(t);e&&(r=r.filter((function(e){return _()(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):O.a?Object.defineProperties(t,O()(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,_()(n,e))}))}return t}var P=function(){function t(e){c()(this,t);var n=e,r=Object(S.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn}var e;return f()(t,[{key:"upsertUser",value:function(t){var e=t,n=Object(S.g)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,a=n.jwt,s=n.user,c=encodeURIComponent(this.tenantAlias),u=encodeURIComponent(s.accountId),f=encodeURIComponent(s.id),l=function(t){var e=t.widgetType,n=t.engagementMedium,r=e?"?widgetType=".concat(encodeURIComponent(e)):"",o="".concat(e?"&":"?","engagementMedium=").concat(encodeURIComponent(n));return r+o}({widgetType:r,engagementMedium:i}),p="/api/v1/".concat(c,"/widget/account/").concat(u,"/user/").concat(f,"/upsert").concat(l),h=this.domain+p,v=j.a.get("_saasquatch");return v&&(s.cookies=v),Object(T.c)(h,d()(s),a)}},{key:"render",value:function(t){var e,n=t,r=Object(S.f)(n),o=r.widgetType,i=r.engagementMedium,s=void 0===i?"POPUP":i,c=r.jwt,u=r.user,f=encodeURIComponent(this.tenantAlias),l=u?encodeURIComponent(u.accountId):null,h=u?encodeURIComponent(u.id):null,d=null!==(e=r.locale)&&void 0!==e?e:Object(S.e)(navigator.language.replace(/\-/g,"_")),v="/api/v1/".concat(f,"/graphql"),m=this.domain+v;return new y.a(function(){var t=a()(p.a.mark((function t(e,n){var r,i,a;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(T.d)(m,"\n query renderWidget ($user: UserIdInput, $engagementMedium: UserEngagementMedium, $widgetType: WidgetType, $locale: RSLocale) {\n renderWidget(user: $user, engagementMedium: $engagementMedium, widgetType: $widgetType, locale: $locale) {\n template\n user {\n id\n accountId\n }\n jsOptions\n widgetConfig {\n values\n }\n }\n }\n",{user:h&&l?{id:h,accountId:l}:null,engagementMedium:s,widgetType:o,locale:d},c);case 3:a=t.sent,e(null==a||null===(r=a.body)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.renderWidget),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),n(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"invite",value:function(t){var e=t.emailList,n=void 0===e?[]:e,r=t.userId,o=t.accountId,i=t.tenantAlias,a=encodeURIComponent(i),s="/api/v1/".concat(a,"/mail/referralinvite"),c=this.domain+s,u={sendingAccountId:o,sendingUserId:r,recipients:n};return Object(T.b)(c,d()(u))}},{key:"squatchReferralCookie",value:(e=a()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=encodeURIComponent(this.tenantAlias),n=j.a.get("_saasquatch")||"",r=n?"?cookies=".concat(encodeURIComponent(n)):"",o="".concat(this.domain,"/a/").concat(e,"/widgets/squatchcookiejson").concat(r),t.next=6,Object(T.a)(o);case 6:return i=t.sent,t.abrupt("return",y.a.resolve(A(A({},i),{},{encodedCookie:n})));case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}()},function(t,e,n){var r;t.exports=((r=function(){this.listeners={}}).prototype={addEventListener:function(t,e,n){for(var r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);r=r.length>3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r}):this.listeners[t]=[{scope:n,callback:e,args:r}]},removeEventListener:function(t,e,n){if(void 0!==this.listeners[t]){for(var r=this.listeners[t].length,o=[],i=0;i<r;i++){var a=this.listeners[t][i];a.scope==n&&a.callback==e||o.push(a)}this.listeners[t]=o}},hasEventListener:function(t,e,n){if(void 0!==this.listeners[t]){var r=this.listeners[t].length;if(void 0===e&&void 0===n)return r>0;for(var o=0;o<r;o++){var i=this.listeners[t][o];if((!n||i.scope==n)&&i.callback==e)return!0}}return!1},dispatch:function(t,e){for(var n={type:t,target:e},r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);if(r=r.length>2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[t]){var a=this.listeners[t].slice(),s=a.length;for(i=0;i<s;i++){var c=a[i];if(c&&c.callback){var u=r.concat(c.args);c.callback.apply(c.scope,u)}}}},getEvents:function(){var t="";for(var e in this.listeners)for(var n=this.listeners[e].length,r=0;r<n;r++){var o=this.listeners[e][r];t+=o.scope&&o.scope.className?o.scope.className:"anonymous",t+=" listen for '"+e+"'\n"}return t}},new r)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=n(149),a=n(150),s=n(151),c=n(99),u=n(152),f=n(154);function l(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var p=e=t.exports;e.Request=w,p.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&v(e,n,t[n]);return e.join("&")}function v(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){v(t,e,n)}));else if(c(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&v(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function y(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(e=o[i]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function m(t){return/[/+]json($|[^-\w])/.test(t)}function g(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)-1!==(e=(n=i[s]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),o=h(n.slice(e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function w(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new g(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function b(t,e,n){var r=p("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}p.serializeObject=d,p.parseString=y,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":d,"application/json":a},p.parse={"application/x-www-form-urlencoded":y,"application/json":JSON.parse},u(g.prototype),g.prototype._parseBody=function(t){var e=p.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&m(this.type)&&(e=p.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},g.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},p.Response=g,i(w.prototype),s(w.prototype),w.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},w.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},w.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===r(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,o)},w.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},w.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},w.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},w.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},w.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},w.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},w.prototype.ca=w.prototype.agent,w.prototype.buffer=w.prototype.ca,w.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},w.prototype.pipe=w.prototype.write,w.prototype._isHost=function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},w.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||l,this._finalizeQueryString(),this._end()},w.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},w.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=p.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&m(o)&&(i=p.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){f.prototype[t.toLowerCase()]=function(e,n){var r=new p.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),f.prototype.del=f.prototype.delete,p.get=function(t,e,n){var r=p("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.head=function(t,e,n){var r=p("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.options=function(t,e,n){var r=p("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.del=b,p.delete=b,p.patch=function(t,e,n){var r=p("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.post=function(t,e,n){var r=p("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.put=function(t,e,n){var r=p("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){var r=n(15),o=n(114),i=n(66),a=n(64)("IE_PROTO"),s=function(){},c=function(){var t,e=n(61)("iframe"),r=i.length;for(e.style.display="none",n(83).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(82),o=n(66);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(20).f,o=n(23),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(9),o=n(0),i=n(34);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(5),p=n.n(l),h=n(6),d=n.n(h),v=n(75),y=n.n(v),m=n(27),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(3),j=n(26),T=n(28);function S(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var P=E("squatch-js:CTAwidget"),I=function(t){b()(n,t);var e=A(n);function n(t,r){var o;p()(this,n),P("CTA constructor");var i=document.createElement("div");return i.id="cta",document.body.appendChild(i),o=e.call(this,t,"#cta"),r.side||r.position||(r.position="bottom",r.side="right"),"middle"===r.position?(o.position="top: 45%;",o.side="center"===r.side?"right: 45%;":"".concat(r.side,": -10px;")):(o.position="".concat(r.position,": -10px;"),o.side="center"===r.side?"right: 45%;":"".concat(r.side,": 20px;")),o.positionClass=r.position,o.ctaFrame=document.createElement("iframe"),o.ctaFrame.squatchJsApi=y()(o),o.ctaFrame.scrolling="no",o.ctaFrame.setAttribute("style","border:0; background-color:transparent; position:fixed; display:none;".concat(o.side).concat(o.position)),document.body.appendChild(o.ctaFrame),P("ctaframe appended to body"),o}return d()(n,[{key:"load",value:function(){var t=this;if(g()(O()(n.prototype),"load",this).call(this),!this.frame.contentWindow)throw new Error("frame requires a contentWindow");var e=this.frame.contentWindow.document,r=this.ctaFrame,o=this.positionClass;Object(T.a)(e,(function(){var n=e.getElementById("cta");if(n){if(!n.parentNode)throw new Error("ctaElement requires a parentNode");n.parentNode.removeChild(n);var i=r.contentWindow;if(!i)throw new Error("ctaFrame requires a contentWindow");var a=i.document;a.open(),a.write(n.innerHTML),a.write('<script src="'.concat(t.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),a.close(),Object(T.a)(a,(function(){var t=a.getElementsByClassName("cta-container")[0];t.style.position="fixed",r.height=t.offsetHeight,r.width=t.scrollWidth,r.style.display="block",t.classList.contains(o)||(t.className+=" ".concat(o)),new i.ResizeObserver((function(t){var e,n=S(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect,i=o.height,a=o.width;r.height=i,r.width=a}}catch(t){n.e(t)}finally{n.f()}})).observe(t),P("CTA template loaded into iframe")}))}else P(new Error("CTA element not found in theme"))}))}},{key:"open",value:function(){g()(O()(n.prototype),"open",this).call(this)}},{key:"close",value:function(){g()(O()(n.prototype),"close",this).call(this)}}]),n}(j.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return A})),n.d(e,"a",(function(){return I}));var r=n(11),o=n.n(r),i=n(13),a=n.n(i),s=n(14),c=n.n(s),u=n(16),f=n.n(u),l=n(21),p=n.n(l),h=n(45),d=n.n(h),v=n(103),y=n.n(v),m=n(18),g=n.n(m),w=n(3),b=n.n(w),x=n(38),_=n.n(x),C={};try{!function(t,e){if("+"!==new t("q=%2B").get("q")||"+"!==new t({q:"+"}).get("q")||"+"!==new t([["q","+"]]).get("q")||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;C.URLSearchParams=t}(URLSearchParams)}catch(t){!function(t,e,n){var r=t.create,o=t.defineProperty,i=/[!'\(\)~]|%20|%00/g,a=/%(?![0-9a-fA-F]{2})/g,s=/\+/g,c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},u={append:function(t,e){h(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,n){this._ungap[t]=[e(n)]},forEach:function(t,n){var r=this;for(var o in r._ungap)r._ungap[o].forEach(i,o);function i(i){t.call(n,i,e(o),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=v(e),r=0,o=this._ungap[e];r<o.length;r++)t.push(n+"="+v(o[r]));return t.join("&")}};for(var f in u)o(l.prototype,f,{configurable:!0,writable:!0,value:u[f]});function l(t){var e=r(null);switch(o(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var i=t.split("&"),a=0,s=i.length;a<s;a++){var c=(u=i[a]).indexOf("=");-1<c?h(e,d(u.slice(0,c)),d(u.slice(c+1))):u.length&&h(e,d(u),"")}break;case n(t):for(a=0,s=t.length;a<s;a++){var u;h(e,(u=t[a])[0],u[1])}break;case"forEach"in t:t.forEach(p,e);break;default:for(var f in t)h(e,f,t[f])}}function p(t,e){h(this,e,t)}function h(t,e,r){var o=n(r)?r.join(","):r;e in t?t[e].push(o):t[e]=[o]}function d(t){return decodeURIComponent(t.replace(a,"%25").replace(s," "))}function v(t){return encodeURIComponent(t).replace(i,y)}function y(t){return c[t]}C.URLSearchParams=l}(Object,String,Array.isArray)}!function(t){var e=!1;try{e=!!Symbol.iterator}catch(t){}function n(t,n){var r=[];return t.forEach(n,r),e?r[Symbol.iterator]():{next:function(){var t=r.shift();return{done:void 0===t,value:t}}}}"forEach"in t||(t.forEach=function(t,e){var n=this,r=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach((function(o){o.length&&!(o in r)&&(r[o]=n.getAll(o)).forEach((function(r){t.call(e,r,o,n)}))}))}),"keys"in t||(t.keys=function(){return n(this,(function(t,e){this.push(e)}))}),"values"in t||(t.values=function(){return n(this,(function(t,e){this.push(t)}))}),"entries"in t||(t.entries=function(){return n(this,(function(t,e){this.push([e,t])}))}),e&&!(Symbol.iterator in t)&&(t[Symbol.iterator]=t.entries),"sort"in t||(t.sort=function(){for(var t,e,n,r=this.entries(),o=r.next(),i=o.done,a=[],s=Object.create(null);!i;)e=(n=o.value)[0],a.push(e),e in s||(s[e]=[]),s[e].push(n[1]),i=(o=r.next()).done;for(a.sort(),t=0;t<a.length;t++)this.delete(a[t]);for(t=0;t<a.length;t++)e=a[t],this.append(e,s[e].shift())}),function(e){var n=e.defineProperty,r=e.getOwnPropertyDescriptor,o=function(e){var n=e.append;e.append=t.append,URLSearchParams.call(e,e._usp.search.slice(1)),e.append=n},i=function(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)},a=function(a){var s,c,u=a.prototype,f=r(u,"searchParams"),l=r(u,"href"),p=r(u,"search");!f&&p&&p.set&&(c=function(e){function r(n,r){t.append.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function o(n){t.delete.call(this,n),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function i(n,r){t.set.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}return function(t,e){return t.append=r,t.delete=o,t.set=i,n(t,"_usp",{configurable:!0,writable:!0,value:e})}}(p),s=function(t,e){return n(t,"_searchParams",{configurable:!0,writable:!0,value:c(e,t)}),e},e.defineProperties(u,{href:{get:function(){return l.get.call(this)},set:function(t){var e=this._searchParams;l.set.call(this,t),e&&o(e)}},search:{get:function(){return p.get.call(this)},set:function(t){var e=this._searchParams;p.set.call(this,t),e&&o(e)}},searchParams:{get:function(){return i(this,a),this._searchParams||s(this,new URLSearchParams(this.search.slice(1)))},set:function(t){i(this,a),s(this,t)}}}))};try{a(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&a(URL)}catch(t){}}(Object)}(C.URLSearchParams.prototype);var O=C.URLSearchParams;function E(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}var T=b()("squatch-js"),S=function(t){return"object"===d()(t)&&!Array.isArray(t)},k=function t(e,n){var r=y()(n).map((function(r){return p()({},r,function(t){return S(n[t])&&e.hasOwnProperty(t)&&S(e[t])}(r)?t(e[r],n[r]):n[r])})).reduce((function(t,e){return j(j({},t),e)}),{});return j(j({},e),r)};function A(t){return atob(t.replace(/_/g,"/").replace(/-/g,"+"))}function P(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function I(){var t=window.location.search,e=new O(t).get("_saasquatch")||"";if(e){var n="",r="",o="";try{n=JSON.parse(A(e))}catch(t){return void T("Unable to decode params",t)}try{r=JSON.parse(A(_.a.get("_saasquatch"))),T("existing cookie",r)}catch(t){T("Unable to retrieve cookie",t)}try{var i=function(){var t,e,n="weird_get_top_level_domain=cookie",r=document.location.hostname.split(".");for(t=r.length-1;t>=0;t--)if(e=r.slice(t).join("."),document.cookie=n+";domain=."+e+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+e+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",e}();if(T("domain retrieved:",i),r){var a=k(r,n);o=P(g()(a)),T("cookie to store:",a)}else o=P(g()(n)),T("cookie to store:",n);_.a.set("_saasquatch",o,{expires:365,secure:!1,sameSite:"Lax",domain:i,path:"/"})}catch(t){T("Unable to set cookie",t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(12),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(25),f=n.n(u),l=n(2),p=n.n(l),h=n(3),d=n.n(h),v=n(18),y=n.n(v),m=n(19),g=n(1),w=function(){function t(e){a()(this,t);var n=e;Object(g.b)(n,"domain")&&"string"==typeof n.domain?this.domain=n.domain:this.domain="https://app.referralsaasquatch.com"}return c()(t,[{key:"pushAnalyticsLoadEvent",value:function(t){if(t.externalUserId&&t.externalAccountId){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=t.programId?"&programId=".concat(encodeURIComponent(t.programId)):"",a="/a/".concat(e,"/widgets/analytics/loaded?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o).concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}}},{key:"pushAnalyticsShareClickedEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=encodeURIComponent(t.shareMedium),a="/a/".concat(e,"/widgets/analytics/shared?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o,"&shareMedium=").concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}}]),t}(),b=d()("squatch-js:widget"),x=function(){function t(e){a()(this,t),b("widget initializing ..."),this.content="error"===e.content?this._error(e.rsCode):e.content,this.type=e.type,this.widgetApi=e.api,this.npmCdn=e.npmCdn,this.analyticsApi=new w({domain:e.domain}),this.frame=document.createElement("iframe"),this.frame.squatchJsApi=this,this.frame.width="100%",this.frame.scrolling="no",this.frame.setAttribute("style","border: 0; background-color: none; width: 1px; min-width: 100%;"),this.context=e.context}var e;return c()(t,[{key:"_loadEvent",value:function(t){var e;if(t){if(!Object(g.c)(t))throw new Error("Widget Load event identity property is not an object");var n;if(Object(g.b)(t,"programId")){if(!Object(g.b)(t,["tenantAlias","accountId","userId","engagementMedium"]))throw new Error("Widget Load event missing required properties");n={tenantAlias:t.tenantAlias,externalAccountId:t.accountId,externalUserId:t.userId,engagementMedium:t.engagementMedium,programId:t.programId}}else{var r=t,o=r.analytics,i=r.mode;n={tenantAlias:o.attributes.tenant,externalAccountId:o.attributes.accountId,externalUserId:o.attributes.userId,engagementMedium:i.widgetMode}}null===(e=this.analyticsApi.pushAnalyticsLoadEvent(n))||void 0===e||e.then((function(t){b("".concat(n.engagementMedium," loaded event recorded."))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}}},{key:"_shareEvent",value:function(t,e){t&&this.analyticsApi.pushAnalyticsShareClickedEvent({tenantAlias:t.analytics.attributes.tenant,externalAccountId:t.analytics.attributes.accountId,externalUserId:t.analytics.attributes.userId,engagementMedium:t.mode.widgetMode,shareMedium:e}).then((function(n){b("".concat(t.mode.widgetMode," share ").concat(e," event recorded. ").concat(n))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}},{key:"_inviteContacts",value:function(t,e){t&&this.widgetApi.invite({tenantAlias:t.analytics.attributes.tenant,accountId:t.analytics.attributes.accountId,userId:t.analytics.attributes.userId,emailList:e}).then((function(t){b("Sent email invites to share ".concat(e,". ").concat(t))})).catch((function(t){b(new Error("invite() ".concat(t)))}))}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r='<!DOCTYPE html>\n \x3c!--[if IE 7]><html class="ie7 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if IE 8]><html class="ie8 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if gt IE 8]>\x3c!--\x3e<html lang="en">\x3c!--<![endif]--\x3e\n <head>\n <link rel="stylesheet" media="all" href="https://fast.ssqt.io/assets/css/widget/errorpage.css">\n <style>\n '.concat(n,'\n </style>\n </head>\n <body>\n\n <div class="squatch-container ').concat(e,'" style="width:100%">\n <div class="errorheader">\n <button type="button" class="close" onclick="window.frameElement.squatchJsApi.close();">×</button>\n <p class="errortitle">Error</p>\n </div>\n <div class="errorbody">\n <div class="sadface"><img src="https://fast.ssqt.io/assets/images/face.png"></div>\n <h4>Our referral program is temporarily unavailable.</h4><br>\n <p>Please reload the page or check back later.</p>\n <p>If the persists please contact our support team.</p>\n <br>\n <br>\n <div class="right-align errtxt">\n Error Code: ').concat(t,"\n </div>\n </div>\n </div>\n </body>\n </html>");return r}},{key:"_findInnerContainer",value:(e=o()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=n.getElementsByTagName("sqh-global-container"),e=n.getElementsByClassName("squatch-container");return t.length>0?t[0]:e.length>0?e[0]:null},e=this.frame.contentWindow){t.next=4;break}throw new Error("Squatch.js frame inner frame is empty");case 4:n=e.document,o=null,i=0;case 7:if(!(i<5)){t.next=16;break}if(!(o=r())){t.next=11;break}return t.abrupt("break",16);case 11:return t.next=13,_(100);case 13:i++,t.next=7;break;case 16:if(o){t.next=18;break}return t.abrupt("return",n.body);case 18:return t.abrupt("return",o);case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"reload",value:function(t,e){var n=this,r=t.email,o=t.firstName,i=t.lastName,a=this.frame.contentWindow,s=this.context.engagementMedium||"POPUP";if(!a)throw new Error("Frame needs a content window");var c,u=a.document;if("upsert"===this.context.type){var f={email:r||null,firstName:o||null,lastName:i||null,id:this.context.user.id,accountId:this.context.user.accountId};c=this.widgetApi.upsertUser({user:f,engagementMedium:s,widgetType:this.type,jwt:e})}else{if("passwordless"!==this.context.type)throw new Error("can't reload an error widget");c=this.widgetApi.render({user:void 0,engagementMedium:s,widgetType:this.type,jwt:void 0})}c.then((function(t){var e=t.template;if(e){n.content=e;var o=u.createElement("button"),i=u.getElementsByClassName("squatch-register")[0];if(i){o.className="btn btn-primary",o.id="show-stats-btn",o.textContent="REFERRER_WIDGET"===n.type?"Show Stats":"Show Reward";var a="POPUP"===s?"margin-top: 10px; max-width: 130px; width: 100%;":"margin-top: 10px;";o.setAttribute("style",a),o.onclick=function(){n.load(),"POPUP"===s&&n.open()},i.style.paddingTop="30px",i.innerHTML="<p><strong>".concat(r,"</strong><br>Has been successfully registered</p>"),i.appendChild(o)}}})).catch((function(t){var e=t.message;b("".concat(e))}))}}]),t}();function _(t){return new f.a((function(e,n){setTimeout((function(){e()}),t)}))}},function(t,e,n){"use strict";var r=n(112)(!0);n(79)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(17),o=n(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(17);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(59),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(65)("keys"),o=n(52);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(23),o=n(43),i=n(64)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(33);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(4),o=n(0),i=n(39),a=n(69),s=n(20).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(82),o=n(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(12),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(2),f=n.n(u),l=n(3),p=n.n(l),h=n(48),d=n(47),v=n(46),y=n(26),m=n(55),g=n(1),w=p()("squatch-js:widgets"),b=function(){function t(e){a()(this,t);var n=e,r=Object(g.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn,this.eventBus=h,this.api=new d.a(r),h.addEventListener("submit_email",t._cb)}var e,n;return c()(t,[{key:"upsertUser",value:(n=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.g)(n),t.prev=2,t.next=5,this.api.upsertUser(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"upsert",user:r.user||null,engagementMedium:e.engagementMedium,container:e.container,trigger:e.trigger}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 14:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return n.apply(this,arguments)})},{key:"render",value:(e=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.f)(n),t.prev=2,t.next=5,this.api.render(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"passwordless",engagementMedium:r.engagementMedium}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,r.engagementMedium),t.t0;case 13:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return e.apply(this,arguments)})},{key:"autofill",value:function(t){var e=t;if("function"!=typeof e){if("string"!=typeof e)throw new Error("Autofill accepts a string or function");var n,r=document.querySelectorAll(e);if(!(r.length>0))throw w("Element id/class or function missing"),new Error("Element id/class or function missing");n=r[0],this.api.squatchReferralCookie().then((function(t){var e=t.code;n.value=e})).catch((function(t){throw t}))}else this.api.squatchReferralCookie().then((function(){return e.apply(void 0,arguments)})).catch((function(t){throw w("Autofill error",t),t}))}},{key:"submitEmail",value:function(e){h.removeEventListener("submit_email",t._cb),h.addEventListener("submit_email",e)}},{key:"_renderWidget",value:function(e,n,r){if(w("Rendering Widget..."),!e)throw new Error("Unable to get a response");var o,i=!!n.displayOnLoad,a=!1,s=e.jsOptions||"",c={content:e.template,type:n.widgetType||s.widget.defaultWidgetType,api:this.api,domain:this.domain,npmCdn:this.npmCdn,context:r};if(s.widgetUrlMappings&&s.widgetUrlMappings.forEach((function(n){t._matchesUrl(n.url)&&("CONVERSION_WIDGET"!==n.widgetType||e.user.referredBy&&e.user.referredBy.code?(i=n.displayOnLoad,a=n.showAsCTA,w("Display ".concat(n.widgetType," on ").concat(n.url))):w("Don't display ".concat(n.widgetType," when no referral on widget rule match ").concat(n.url)))})),s.conversionUrls&&s.conversionUrls.forEach((function(n){e.user.referredBy&&t._matchesUrl(n)&&w("This is a conversion URL",n)})),s.fuelTankAutofillUrls&&(w("We found a fuel tank autofill!"),s.fuelTankAutofillUrls.forEach((function(n){var r=n.url,o=n.formSelector;if(t._matchesUrl(r)&&(w("Fuel Tank URL matches"),e.user.referredBy&&e.user.referredBy.code)){var i=document.querySelector(o);i?i.value=e.user.referredBy.referredReward.fuelTankCode||"":w(new Error("Element with id/class ".concat(o," was not found.")))}}))),a||"EMBED"!==n.engagementMedium)if(a||"POPUP"!==n.engagementMedium)if(a){w("display CTA");var u=s.cta.content.buttonSide,f=s.cta.content.buttonPosition;(o=new m.a(c,{side:u,position:f})).load(),i&&o.open()}else w("display popup on load"),(o=new y.a(c)).load(),i&&o.open();else(o=new y.a(c,c.context.trigger)).load(),i&&o.open();else(o=new v.a(c,c.context.container)).load();return o}},{key:"_renderErrorWidget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POPUP",n=t.apiErrorCode,r=t.rsCode,o=t.message;w(new Error("".concat(n," (").concat(r,") ").concat(o)));var i={content:"error",rsCode:r,api:this.api,domain:this.domain,npmCdn:this.npmCdn,type:"ERROR_WIDGET",context:{type:"error"}};"EMBED"===e?new v.a(i).load():"POPUP"===e&&new y.a(i).load()}}],[{key:"_matchesUrl",value:function(t){return!!window.location.href.match(new RegExp(t))}},{key:"_cb",value:function(t,e,n){var r;r="string"==typeof n||n instanceof String?{email:n}:n,e.reload(r)}}]),t}()},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,n){"use strict";function r(){console.log("Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes.")}n.d(e,"a",(function(){return r}))},function(t,e){},function(t,e,n){"use strict";var r=n(39),o=n(9),i=n(81),a=n(29),s=n(41),c=n(113),u=n(53),f=n(67),l=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var g,w,b,x=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",C="values"==v,O=!1,E=t.prototype,j=E[l]||E["@@iterator"]||v&&E[v],T=j||x(v),S=v?C?x("entries"):T:void 0,k="Array"==e&&E.entries||j;if(k&&(b=f(k.call(new t)))!==Object.prototype&&b.next&&(u(b,_,!0),r||"function"==typeof b[l]||a(b,l,h)),C&&j&&"values"!==j.name&&(O=!0,T=function(){return j.call(this)}),r&&!m||!p&&!O&&E[l]||a(E,l,T),s[e]=T,s[_]=h,v)if(g={values:C?T:x("values"),keys:y?T:x("keys"),entries:S},m)for(w in g)w in E||i(E,w,g[w]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){t.exports=!n(22)&&!n(34)((function(){return 7!=Object.defineProperty(n(61)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){t.exports=n(29)},function(t,e,n){var r=n(23),o=n(24),i=n(116)(!1),a=n(64)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){n(118);for(var r=n(4),o=n(29),i=n(41),a=n(10)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],f=r[u],l=f&&f.prototype;l&&!l[a]&&o(l,a,u),i[u]=i.Array}},function(t,e,n){var r=n(42),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(15);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(41),o=n(10)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(85),o=n(10)("iterator"),i=n(41);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(15),o=n(33),i=n(10)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(32),s=n(91),c=n(83),u=n(61),f=n(4),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n(42)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(15),o=n(17),i=n(68);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){t.exports=n(130)},function(t,e,n){"use strict";var r=n(4),o=n(23),i=n(22),a=n(9),s=n(81),c=n(134).KEY,u=n(34),f=n(65),l=n(53),p=n(52),h=n(10),d=n(69),v=n(70),y=n(135),m=n(136),g=n(15),w=n(17),b=n(43),x=n(24),_=n(62),C=n(40),O=n(50),E=n(97),j=n(44),T=n(71),S=n(20),k=n(51),A=j.f,P=S.f,I=E.f,R=r.Symbol,L=r.JSON,F=L&&L.stringify,M=h("_hidden"),q=h("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),D=f("symbols"),W=f("op-symbols"),H=Object.prototype,B="function"==typeof R&&!!T.f,z=r.QObject,J=!z||!z.prototype||!z.prototype.findChild,G=i&&u((function(){return 7!=O(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=A(H,e);r&&delete H[e],P(t,e,n),r&&t!==H&&P(H,e,r)}:P,$=function(t){var e=D[t]=O(R.prototype);return e._k=t,e},X=B&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},K=function(t,e,n){return t===H&&K(W,e,n),g(t),e=_(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=O(n,{enumerable:C(0,!1)})):(o(t,M)||P(t,M,C(1,{})),t[M][e]=!0),G(t,e,n)):P(t,e,n)},V=function(t,e){g(t);for(var n,r=y(e=x(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},Q=function(t){var e=U.call(this,t=_(t,!0));return!(this===H&&o(D,t)&&!o(W,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,M)&&this[M][t])||e)},Y=function(t,e){if(t=x(t),e=_(e,!0),t!==H||!o(D,e)||o(W,e)){var n=A(t,e);return!n||!o(D,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(x(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==M||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===H,r=I(n?W:x(t)),i=[],a=0;r.length>a;)!o(D,e=r[a++])||n&&!o(H,e)||i.push(D[e]);return i};B||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(W,n),o(this,M)&&o(this[M],t)&&(this[M][t]=!1),G(this,t,C(1,n))};return i&&J&&G(H,t,{configurable:!0,set:e}),$(t)}).prototype,"toString",(function(){return this._k})),j.f=Y,S.f=K,n(73).f=E.f=Z,n(72).f=Q,T.f=tt,i&&!n(39)&&s(H,"propertyIsEnumerable",Q,!0),d.f=function(t){return $(h(t))}),a(a.G+a.W+a.F*!B,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=k(h.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!B,"Object",{create:function(t,e){return void 0===e?O(t):V(O(t),e)},defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=u((function(){T.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return T.f(b(t))}}),L&&a(a.S+a.F*(!B||u((function(){var t=R();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(w(e)||void 0!==t)&&!X(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,F.apply(L,r)}}),R.prototype[q]||n(29)(R.prototype,q,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(24),o=n(73).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(20),o=n(40);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===r(t)}},function(t,e,n){t.exports=n(164)},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(13),o=n.n(r),i=n(14),a=n.n(i),s=n(16),c=n.n(s),u=n(21),f=n.n(u),l=n(102),p=n.n(l),h=n(11),d=n.n(h),v=n(3),y=n.n(v),m=n(56);function g(t,e){var n=d()(t);if(o.a){var r=o()(t);e&&(r=r.filter((function(e){return a()(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){f()(t,e,n[e])})):c.a?Object.defineProperties(t,c()(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,a()(n,e))}))}return t}var b=y()("squatch-js");function x(t){var e=window.location.search,n=new URLSearchParams(e).get("_saasquatchExtra")||"";if(n){var r;try{r=JSON.parse(Object(m.b)(n))}catch(t){return void b("Unable to decode _saasquatchExtra config")}var o=function(t){var e,n=d()(t||{})[0],r=d()((null==t?void 0:t[n])||{})[0],o=null==t||null===(e=t[n])||void 0===e?void 0:e[r];return{domain:n?"https://".concat(n):void 0,tenantAlias:r,widgetConfig:o}}(r),i=o.domain,a=o.tenantAlias,s=o.widgetConfig;if(i&&a&&s)return{widgetConfig:w({widgetType:s.autoPopupWidgetType,displayOnLoad:!0},p()(s,["autoPopupWidgetType"])),squatchConfig:w(w({},t?{configIn:t}:{}),{},{domain:i,tenantAlias:a})};b("_saasquatchExtra did not have an expected structure")}else b("No _saasquatchExtra param")}},function(t,e,n){var r=n(13),o=n(174);t.exports=function(t,e){if(null==t)return{};var n,i,a=o(t,e);if(r){var s=r(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(175)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(5),o=n.n(r),i=n(6),a=n.n(i),s=n(18),c=n.n(s),u=n(19),f=n(1),l=function(){function t(e){o()(this,t);var n=e,r=Object(f.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain}return a()(t,[{key:"track",value:function(t,e){var n=e,r=function(t){if(!Object(f.a)(t,"accountId","events","userId"))throw new Error("Fields required");if(!Array.isArray(t.events))throw new Error("'events' should be an array");return t}(t),o=function(t){if(!Object(f.c)(t))throw new Error("'options' should be an object");return t}(n).jwt,i=encodeURIComponent(this.tenantAlias),a=encodeURIComponent(r.userId),s=encodeURIComponent(r.accountId),l="/api/v1/".concat(i,"/open/account/").concat(s,"/user/").concat(a,"/events"),p=this.domain+l;return Object(u.b)(p,c()(r),o)}}]),t}()},function(t,e,n){"use strict";function r(){var t=window.squatch||null,e=window._squatch||null;if(console.log({loaded:t,cached:e,auto:window.squatch._auto}),t&&e){(e.ready||[]).forEach((function(t){return setTimeout((function(){return t()}),0)})),window._squatch=void 0;try{delete window._squatch}catch(t){throw t}setTimeout((function(){return window.squatch._auto()}),0)}}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(107)},function(t,e,n){"use strict";n.r(e),n.d(e,"api",(function(){return _})),n.d(e,"widgets",(function(){return C})),n.d(e,"events",(function(){return O})),n.d(e,"widget",(function(){return E})),n.d(e,"_auto",(function(){return j})),n.d(e,"init",(function(){return T})),n.d(e,"ready",(function(){return S})),n.d(e,"autofill",(function(){return k})),n.d(e,"submitEmail",(function(){return A})),n.d(e,"pushCookie",(function(){return P}));var r=n(3),o=n.n(r),i=n(74);n.d(e,"Widgets",(function(){return i.a}));var a=n(46);n.d(e,"EmbedWidget",(function(){return a.a}));var s=n(26);n.d(e,"PopupWidget",(function(){return s.a}));var c=n(55);n.d(e,"CtaWidget",(function(){return c.a}));var u=n(47);n.d(e,"WidgetApi",(function(){return u.a}));var f=n(104),l=n(105),p=n(1),h=n(56),d=n(101),v=n(76);for(var y in v)["default","Widgets","EmbedWidget","PopupWidget","CtaWidget","WidgetApi","api","widgets","events","widget","_auto","init","ready","autofill","submitEmail","pushCookie"].indexOf(y)<0&&function(t){n.d(e,t,(function(){return v[t]}))}(y);var m=n(77);n.d(e,"help",(function(){return m.a}));var g=o()("squatch-js"),w=null,b=null,x=null;function _(){return w}function C(){return b}function O(){return x}function E(t){var e;return null===(e=C())||void 0===e?void 0:e.render(t)}function j(t){var e=Object(d.a)(t);if(e){var n,r=e.squatchConfig,o=e.widgetConfig;return T(r),null===(n=C())||void 0===n?void 0:n.render(o)}}function T(t){var e=t,n=Object(p.d)(e);(n.tenantAlias.match("^test")||n.debug)&&o.a.enable("squatch-js*"),g("initializing ..."),w=new u.a(n),b=new i.a(n),x=new f.a(n),g("Widget API instance",w),g("Widgets instance",b),g("Events API instance",x)}function S(t){t()}function k(t){C().autofill(t)}function A(t){C().submitEmail(t)}function P(){Object(h.a)()}"undefined"==typeof document||window.SaaSquatchDoNotAutoDrop||P(),"undefined"!=typeof document&&Object(l.a)()},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){var n;function a(){if(a.enabled){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=a,s=Number(new Date),c=s-(n||s);i.diff=c,i.prev=n,i.curr=s,n=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var u=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var a=e[u];t=o.call(i,a),e.splice(u,1),u--}return t})),r.formatArgs.call(i,e);var f=i.log||r.log;f.apply(i,e)}}return a.namespace=t,a.enabled=r.enabled(t),a.useColors=r.useColors(),a.color=e(t),a.destroy=o,a.extend=i,"function"==typeof r.init&&r.init(a),r.instances.push(a),a}function o(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){return r(this.namespace+(void 0===e?":":e)+t)}return r.debug=r,r.default=r,r.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},r.disable=function(){r.enable("")},r.enable=function(t){var e;r.save(t),r.names=[],r.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;e<o;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var i=r.instances[e];i.enabled=r.enabled(i.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(110),Object.keys(t).forEach((function(e){r[e]=t[e]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function a(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var s=typeof t;if("string"===s&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===s&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return a(t,e,i,"day");if(e>=o)return a(t,e,o,"hour");if(e>=r)return a(t,e,r,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){n(78),n(58),n(84),n(121),n(128),n(129),t.exports=n(0).Promise},function(t,e,n){var r=n(59),o=n(60);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(50),o=n(40),i=n(53),a={};n(29)(a,n(10)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(20),o=n(15),i=n(51);t.exports=n(22)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(42);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(24),o=n(63),i=n(117);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(59),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r=n(119),o=n(120),i=n(41),a=n(24);t.exports=n(79)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,o,i,a,s=n(39),c=n(4),u=n(32),f=n(85),l=n(9),p=n(17),h=n(33),d=n(122),v=n(123),y=n(89),m=n(90).set,g=n(124)(),w=n(68),b=n(92),x=n(125),_=n(93),C=c.TypeError,O=c.process,E=O&&O.versions,j=E&&E.v8||"",T=c.Promise,S="process"==f(O),k=function(){},A=o=w.f,P=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n(10)("species")]=function(t){t(k,k)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e&&0!==j.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&M(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(C("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)}))}},L=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=b((function(){S?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=S||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){m.call(c,(function(){var e;S?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},q=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(U,r,1),u(q,r,1))}catch(t){q.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){q.call({_w:n,_d:!1},t)}}};P||(T=function(t){d(this,T,"Promise","_h"),h(t),r.call(this);try{t(u(U,this,1),u(q,this,1))}catch(t){q.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(126)(T.prototype,{then:function(t,e){var n=A(y(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(U,t,1),this.reject=u(q,t,1)},w.f=A=function(t){return t===T||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!P,{Promise:T}),n(53)(T,"Promise"),n(127)("Promise"),a=n(0).Promise,l(l.S+l.F*!P,"Promise",{reject:function(t){var e=A(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!P),"Promise",{resolve:function(t){return _(s&&this===a?T:this,t)}}),l(l.S+l.F*!(P&&n(94)((function(t){T.all(t).catch(k)}))),"Promise",{all:function(t){var e=this,n=A(e),r=n.resolve,o=n.reject,i=b((function(){var n=[],i=0,a=1;v(t,!1,(function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,o=b((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(32),o=n(86),i=n(87),a=n(15),s=n(63),c=n(88),u={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,v,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),w=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>w;w++)if((y=e?g(a(d=t[w])[0],d[1]):g(t[w]))===u||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===u||y===f)return y}).BREAK=u,e.RETURN=f},function(t,e,n){var r=n(4),o=n(90).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(42)(a);t.exports=function(){var t,e,n,u=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var r=n(4).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(29);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){"use strict";var r=n(4),o=n(0),i=n(20),a=n(22),s=n(10)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(4),a=n(89),s=n(93);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(9),o=n(68),i=n(92);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(131);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(22),"Object",{defineProperty:n(20).f})},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=c(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===u)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(C([])));v&&v!==e&&n.call(v,o)&&(h=v);var y=p.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=p,p.constructor=l,p[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(96),n(78),n(137),n(138),t.exports=n(0).Symbol},function(t,e,n){var r=n(52)("meta"),o=n(17),i=n(23),a=n(20).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(34)((function(){return c(Object.preventExtensions({}))})),f=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return u&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(51),o=n(71),i=n(72);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(42);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){n(70)("asyncIterator")},function(t,e,n){n(70)("observable")},function(t,e,n){n(58),n(84),t.exports=n(69).f("iterator")},function(t,e,n){n(141),t.exports=n(0).Object.keys},function(t,e,n){var r=n(43),o=n(51);n(54)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){n(96),t.exports=n(0).Object.getOwnPropertySymbols},function(t,e,n){n(144);var r=n(0).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(24),o=n(44).f;n(54)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){n(146),t.exports=n(0).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(9),o=n(147),i=n(24),a=n(44),s=n(98);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=c(r,e=u[l++]))&&s(f,e,n);return f}})},function(t,e,n){var r=n(73),o=n(71),i=n(15),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=a,o.stableStringify=a;var n=[],r=[];function o(t,e,o){var i;for(!function t(e,o,i,a){var s;if("object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e){var c=Object.getOwnPropertyDescriptor(a,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,o,{value:"[Circular]"}),n.push([a,o,e,c])):r.push([e,o]):(a[o]="[Circular]",n.push([a,o,e])))}if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,i,e);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var f=u[s];t(e[f],f,i,e)}}i.pop()}}(t,"",[],void 0),i=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,s(e),o);0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function a(t,e,o){var a,c=function t(e,o,a,s){var c;if("object"==typeof e&&null!==e){for(c=0;c<a.length;c++)if(a[c]===e){var u=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),n.push([s,o,e,u])):r.push([e,o]):(s[o]="[Circular]",n.push([s,o,e])))}if("function"==typeof e.toJSON)return;if(a.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,a,e);else{var f={},l=Object.keys(e).sort(i);for(c=0;c<l.length;c++){var p=l[c];t(e[p],p,a,e),f[p]=e[p]}if(void 0===s)return f;n.push([s,o,e]),s[o]=f}a.pop()}}(t,"",[],void 0)||t;for(a=0===r.length?JSON.stringify(c,e,o):JSON.stringify(c,s(e),o);0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return a}function s(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var o=0;o<r.length;o++){var i=r[o];if(i[1]===e&&i[0]===n){n="[Circular]",r.splice(o,1);break}}return t.call(this,e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(99);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&a.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,n){"use strict";var r=n(153);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){o.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),o.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,r(e.args))}))},t.exports=o},function(t,e,n){n(156),t.exports=n(0).Reflect.construct},function(t,e,n){var r=n(9),o=n(50),i=n(33),a=n(15),s=n(17),c=n(34),u=n(157),f=(n(4).Reflect||{}).construct,l=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!c((function(){f((function(){}))}));r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=o(s(c)?c:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){"use strict";var r=n(33),o=n(17),i=n(91),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){n(58),n(159),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(32),o=n(9),i=n(43),a=n(86),s=n(87),c=n(63),u=n(98),f=n(88);o(o.S+o.F*!n(94)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,g=f(p);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),null==g||h==Array&&s(g))for(n=new h(e=c(p.length));e>m;m++)u(n,m,y?v(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)u(n,m,y?a(l,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){t.exports=n(161)},function(t,e,n){n(162),t.exports=n(0).Reflect.get},function(t,e,n){var r=n(44),o=n(67),i=n(23),a=n(9),s=n(17),c=n(15);a(a.S,"Reflect",{get:function t(e,n){var a,u,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=o(e))?t(u,n,f):void 0}})},function(t,e,n){var r=n(7);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(165),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(166).set})},function(t,e,n){var r=n(17),o=n(15),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(32)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){t.exports=n(168)},function(t,e,n){n(169),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(43),o=n(67);n(54)("getPrototypeOf",(function(){return function(t){return o(r(t))}}))},function(t,e,n){t.exports=n(171)},function(t,e,n){n(172);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(50)})},function(t,e,n){var r=n(100);function o(e,n){return t.exports=o=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,o(e,n)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(11);t.exports=function(t,e){if(null==t)return{};var n,o,i={},a=r(t);for(o=0;o<a.length;o++)n=a[o],e.indexOf(n)>=0||(i[n]=t[n]);return i},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(176);var r=n(0).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,e,n){n(54)("getOwnPropertyNames",(function(){return n(97).f}))}])}));
|
|
13
|
+
*/!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(e,n,e,t):r)||(t.exports=o),!0,t.exports=i(),!!0){var a=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=e+"="+n+s}}function a(t,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(s[0]);if(c=(r.read||r)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(o[u]=c,t===u)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return a(t,!1)},o.getJSON=function(t){return a(t,!0)},o.remove=function(e,n){i(e,"",t(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(t,e){t.exports=!0},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(60);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(72),o=n(40),i=n(24),a=n(62),s=n(23),c=n(80),u=Object.getOwnPropertyDescriptor;e.f=n(22)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(30),o=n(31);function i(e){return"function"==typeof r&&"symbol"==typeof o?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return F}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(12),p=n.n(l),h=n(5),d=n.n(h),v=n(6),y=n.n(v),m=n(27),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(2),j=n.n(E),T=n(3),S=n.n(T),k=n(57),A=n(28);function P(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var L=S()("squatch-js:EMBEDwidget"),F=function(t){b()(r,t);var e,n=R(r);function r(t,e){var o,i;if(d()(this,r),o=n.call(this,t),"string"==typeof e?(i=document.querySelector(e),L("loading widget with selector",i)):e instanceof HTMLElement?L("loading widget with container",i=e):e?(i=null,L("container must be an HTMLElement or string",e)):(i=document.querySelector("#squatchembed")||document.querySelector(".squatchembed"),L("loading widget with default selector",i)),!(i instanceof HTMLElement))throw new Error("element with selector '".concat(e,"' not found.'"));return o.element=i,o}return y()(r,[{key:"load",value:(e=p()(j.a.mark((function t(){var e,n,r=this;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.context.container?(this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",this.element.firstChild?this.element.replaceChild(this.frame,this.element.firstChild):this.element.appendChild(this.frame)):this.element.firstChild&&"#text"!==this.element.firstChild.nodeName||this.element.appendChild(this.frame),e=this.frame.contentWindow){t.next=4;break}throw new Error("Frame needs a content window");case 4:(n=e.document).open(),n.write(this.content),n.write('<script src="'.concat(this.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),n.close(),Object(A.a)(n,p()(j.a.mark((function t(){var o,i,a;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.squatch||e.widgetIdent,!(i=n.getElementById("cta"))){t.next=6;break}if(i.parentNode){t.next=5;break}throw new Error("ctaElement needs a parentNode");case 5:i.parentNode.removeChild(i);case 6:return r.frame.height=n.body.scrollHeight,a=new e.ResizeObserver((function(t){var e,n=P(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect.height;r.frame.height=o}}catch(t){n.e(t)}finally{n.f()}})),t.t0=a,t.next=11,r._findInnerContainer();case 11:t.t1=t.sent,t.t0.observe.call(t.t0,t.t1),r.context.container||(r._loadEvent(o),L("loaded"));case 14:case"end":return t.stop()}}),t)}))));case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"open",value:function(){var t,e,n,r,o,i;if(!this.frame)return L("no target element to open");this.element.style.visibility="unset",this.element.style.height="auto",this.element.style["overflow-y"]="auto",null===(t=this.frame)||void 0===t||null===(e=t.contentDocument)||void 0===e||e.dispatchEvent(new CustomEvent("sq:refresh"));var a=(null===(n=this.frame)||void 0===n||null===(r=n.contentWindow)||void 0===r?void 0:r.squatch)||(null===(o=this.frame)||void 0===o||null===(i=o.contentWindow)||void 0===i?void 0:i.widgetIdent);this._loadEvent(a),L("loaded")}},{key:"close",value:function(){if(!this.frame)return L("no target element to close");this.element.style.visibility="hidden",this.element.style.height="0",this.element.style["overflow-y"]="hidden",L("Embed widget closed")}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"embed",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return g()(O()(r.prototype),"_error",this).call(this,t,e,n)}}]),r}(k.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return P}));var r=n(21),o=n.n(r),i=n(12),a=n.n(i),s=n(5),c=n.n(s),u=n(6),f=n.n(u),l=n(2),p=n.n(l),h=n(18),d=n.n(h),v=n(25),y=n.n(v),m=n(11),g=n.n(m),w=n(13),b=n.n(w),x=n(14),_=n.n(x),C=n(16),O=n.n(C),E=n(38),j=n.n(E),T=n(19),S=n(1);function k(t,e){var n=g()(t);if(b.a){var r=b()(t);e&&(r=r.filter((function(e){return _()(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):O.a?Object.defineProperties(t,O()(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,_()(n,e))}))}return t}var P=function(){function t(e){c()(this,t);var n=e,r=Object(S.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn}var e;return f()(t,[{key:"upsertUser",value:function(t){var e=t,n=Object(S.g)(e),r=n.widgetType,o=n.engagementMedium,i=void 0===o?"POPUP":o,a=n.jwt,s=n.user,c=encodeURIComponent(this.tenantAlias),u=encodeURIComponent(s.accountId),f=encodeURIComponent(s.id),l=function(t){var e=t.widgetType,n=t.engagementMedium,r=e?"?widgetType=".concat(encodeURIComponent(e)):"",o="".concat(e?"&":"?","engagementMedium=").concat(encodeURIComponent(n));return r+o}({widgetType:r,engagementMedium:i}),p="/api/v1/".concat(c,"/widget/account/").concat(u,"/user/").concat(f,"/upsert").concat(l),h=this.domain+p,v=j.a.get("_saasquatch");return v&&(s.cookies=v),Object(T.c)(h,d()(s),a)}},{key:"render",value:function(t){var e,n=t,r=Object(S.f)(n),o=r.widgetType,i=r.engagementMedium,s=void 0===i?"POPUP":i,c=r.jwt,u=r.user,f=encodeURIComponent(this.tenantAlias),l=u?encodeURIComponent(u.accountId):null,h=u?encodeURIComponent(u.id):null,d=null!==(e=r.locale)&&void 0!==e?e:Object(S.e)(navigator.language.replace(/\-/g,"_")),v="/api/v1/".concat(f,"/graphql"),m=this.domain+v;return new y.a(function(){var t=a()(p.a.mark((function t(e,n){var r,i,a;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(T.d)(m,"\n query renderWidget ($user: UserIdInput, $engagementMedium: UserEngagementMedium, $widgetType: WidgetType, $locale: RSLocale) {\n renderWidget(user: $user, engagementMedium: $engagementMedium, widgetType: $widgetType, locale: $locale) {\n template\n user {\n id\n accountId\n }\n jsOptions\n widgetConfig {\n values\n }\n }\n }\n",{user:h&&l?{id:h,accountId:l}:null,engagementMedium:s,widgetType:o,locale:d},c);case 3:a=t.sent,e(null==a||null===(r=a.body)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.renderWidget),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),n(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"invite",value:function(t){var e=t.emailList,n=void 0===e?[]:e,r=t.userId,o=t.accountId,i=t.tenantAlias,a=encodeURIComponent(i),s="/api/v1/".concat(a,"/mail/referralinvite"),c=this.domain+s,u={sendingAccountId:o,sendingUserId:r,recipients:n};return Object(T.b)(c,d()(u))}},{key:"squatchReferralCookie",value:(e=a()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=encodeURIComponent(this.tenantAlias),n=j.a.get("_saasquatch")||"",r=n?"?cookies=".concat(encodeURIComponent(n)):"",o="".concat(this.domain,"/a/").concat(e,"/widgets/squatchcookiejson").concat(r),t.next=6,Object(T.a)(o);case 6:return i=t.sent,t.abrupt("return",y.a.resolve(A(A({},i),{},{encodedCookie:n})));case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}()},function(t,e,n){var r;t.exports=((r=function(){this.listeners={}}).prototype={addEventListener:function(t,e,n){for(var r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);r=r.length>3?r.splice(3,r.length-1):[],void 0!==this.listeners[t]?this.listeners[t].push({scope:n,callback:e,args:r}):this.listeners[t]=[{scope:n,callback:e,args:r}]},removeEventListener:function(t,e,n){if(void 0!==this.listeners[t]){for(var r=this.listeners[t].length,o=[],i=0;i<r;i++){var a=this.listeners[t][i];a.scope==n&&a.callback==e||o.push(a)}this.listeners[t]=o}},hasEventListener:function(t,e,n){if(void 0!==this.listeners[t]){var r=this.listeners[t].length;if(void 0===e&&void 0===n)return r>0;for(var o=0;o<r;o++){var i=this.listeners[t][o];if((!n||i.scope==n)&&i.callback==e)return!0}}return!1},dispatch:function(t,e){for(var n={type:t,target:e},r=[],o=arguments.length,i=0;i<o;i++)r.push(arguments[i]);if(r=r.length>2?r.splice(2,r.length-1):[],r=[n].concat(r),void 0!==this.listeners[t]){var a=this.listeners[t].slice(),s=a.length;for(i=0;i<s;i++){var c=a[i];if(c&&c.callback){var u=r.concat(c.args);c.callback.apply(c.scope,u)}}}},getEvents:function(){var t="";for(var e in this.listeners)for(var n=this.listeners[e].length,r=0;r<n;r++){var o=this.listeners[e][r];t+=o.scope&&o.scope.className?o.scope.className:"anonymous",t+=" listen for '"+e+"'\n"}return t}},new r)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=n(149),a=n(150),s=n(151),c=n(99),u=n(152),f=n(154);function l(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var p=e=t.exports;e.Request=w,p.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function d(t){if(!c(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&v(e,n,t[n]);return e.join("&")}function v(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){v(t,e,n)}));else if(c(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&v(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function y(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(n=(e=o[i]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function m(t){return/[/+]json($|[^-\w])/.test(t)}function g(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)-1!==(e=(n=i[s]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),o=h(n.slice(e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function w(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new g(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function b(t,e,n){var r=p("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}p.serializeObject=d,p.parseString=y,p.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":d,"application/json":a},p.parse={"application/x-www-form-urlencoded":y,"application/json":JSON.parse},u(g.prototype),g.prototype._parseBody=function(t){var e=p.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&m(this.type)&&(e=p.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},g.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},p.Response=g,i(w.prototype),s(w.prototype),w.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},w.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},w.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===r(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,o)},w.prototype.query=function(t){return"string"!=typeof t&&(t=d(t)),t&&this._query.push(t),this},w.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},w.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},w.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},w.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},w.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},w.prototype.ca=w.prototype.agent,w.prototype.buffer=w.prototype.ca,w.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},w.prototype.pipe=w.prototype.write,w.prototype._isHost=function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},w.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||l,this._finalizeQueryString(),this._end()},w.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},w.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=p.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||p.serialize[o?o.split(";")[0]:""];!i&&m(o)&&(i=p.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},p.agent=function(){return new f},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){f.prototype[t.toLowerCase()]=function(e,n){var r=new p.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),f.prototype.del=f.prototype.delete,p.get=function(t,e,n){var r=p("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.head=function(t,e,n){var r=p("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.options=function(t,e,n){var r=p("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.del=b,p.delete=b,p.patch=function(t,e,n){var r=p("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.post=function(t,e,n){var r=p("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.put=function(t,e,n){var r=p("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){var r=n(15),o=n(114),i=n(66),a=n(64)("IE_PROTO"),s=function(){},c=function(){var t,e=n(61)("iframe"),r=i.length;for(e.style.display="none",n(83).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(82),o=n(66);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(20).f,o=n(23),i=n(10)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(9),o=n(0),i=n(34);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var r=n(8),o=n.n(r),i=n(35),a=n.n(i),s=n(30),c=n.n(s),u=n(31),f=n.n(u),l=n(5),p=n.n(l),h=n(6),d=n.n(h),v=n(75),y=n.n(v),m=n(27),g=n.n(m),w=n(36),b=n.n(w),x=n(37),_=n.n(x),C=n(7),O=n.n(C),E=n(3),j=n(26),T=n(28);function S(t,e){var n=void 0!==c.a&&t[f.a]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return a()(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t){var e=function(){if("undefined"==typeof Reflect||!o.a)return!1;if(o.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(o()(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=O()(t);if(e){var i=O()(this).constructor;n=o()(r,arguments,i)}else n=r.apply(this,arguments);return _()(this,n)}}var P=E("squatch-js:CTAwidget"),I=function(t){b()(n,t);var e=A(n);function n(t,r){var o;p()(this,n),P("CTA constructor");var i=document.createElement("div");return i.id="cta",document.body.appendChild(i),o=e.call(this,t,"#cta"),r.side||r.position||(r.position="bottom",r.side="right"),"middle"===r.position?(o.position="top: 45%;",o.side="center"===r.side?"right: 45%;":"".concat(r.side,": -10px;")):(o.position="".concat(r.position,": -10px;"),o.side="center"===r.side?"right: 45%;":"".concat(r.side,": 20px;")),o.positionClass=r.position,o.ctaFrame=document.createElement("iframe"),o.ctaFrame.squatchJsApi=y()(o),o.ctaFrame.scrolling="no",o.ctaFrame.setAttribute("style","border:0; background-color:transparent; position:fixed; display:none;".concat(o.side).concat(o.position)),document.body.appendChild(o.ctaFrame),P("ctaframe appended to body"),o}return d()(n,[{key:"load",value:function(){var t=this;if(g()(O()(n.prototype),"load",this).call(this),!this.frame.contentWindow)throw new Error("frame requires a contentWindow");var e=this.frame.contentWindow.document,r=this.ctaFrame,o=this.positionClass;Object(T.a)(e,(function(){var n=e.getElementById("cta");if(n){if(!n.parentNode)throw new Error("ctaElement requires a parentNode");n.parentNode.removeChild(n);var i=r.contentWindow;if(!i)throw new Error("ctaFrame requires a contentWindow");var a=i.document;a.open(),a.write(n.innerHTML),a.write('<script src="'.concat(t.npmCdn,'/resize-observer-polyfill@1.5.x"><\/script>')),a.close(),Object(T.a)(a,(function(){var t=a.getElementsByClassName("cta-container")[0];t.style.position="fixed",r.height=t.offsetHeight,r.width=t.scrollWidth,r.style.display="block",t.classList.contains(o)||(t.className+=" ".concat(o)),new i.ResizeObserver((function(t){var e,n=S(t);try{for(n.s();!(e=n.n()).done;){var o=e.value.contentRect,i=o.height,a=o.width;r.height=i,r.width=a}}catch(t){n.e(t)}finally{n.f()}})).observe(t),P("CTA template loaded into iframe")}))}else P(new Error("CTA element not found in theme"))}))}},{key:"open",value:function(){g()(O()(n.prototype),"open",this).call(this)}},{key:"close",value:function(){g()(O()(n.prototype),"close",this).call(this)}}]),n}(j.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return A})),n.d(e,"a",(function(){return I}));var r=n(11),o=n.n(r),i=n(13),a=n.n(i),s=n(14),c=n.n(s),u=n(16),f=n.n(u),l=n(21),p=n.n(l),h=n(45),d=n.n(h),v=n(103),y=n.n(v),m=n(18),g=n.n(m),w=n(3),b=n.n(w),x=n(38),_=n.n(x),C={};try{!function(t,e){if("+"!==new t("q=%2B").get("q")||"+"!==new t({q:"+"}).get("q")||"+"!==new t([["q","+"]]).get("q")||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;C.URLSearchParams=t}(URLSearchParams)}catch(t){!function(t,e,n){var r=t.create,o=t.defineProperty,i=/[!'\(\)~]|%20|%00/g,a=/%(?![0-9a-fA-F]{2})/g,s=/\+/g,c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},u={append:function(t,e){h(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,n){this._ungap[t]=[e(n)]},forEach:function(t,n){var r=this;for(var o in r._ungap)r._ungap[o].forEach(i,o);function i(i){t.call(n,i,e(o),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=v(e),r=0,o=this._ungap[e];r<o.length;r++)t.push(n+"="+v(o[r]));return t.join("&")}};for(var f in u)o(l.prototype,f,{configurable:!0,writable:!0,value:u[f]});function l(t){var e=r(null);switch(o(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var i=t.split("&"),a=0,s=i.length;a<s;a++){var c=(u=i[a]).indexOf("=");-1<c?h(e,d(u.slice(0,c)),d(u.slice(c+1))):u.length&&h(e,d(u),"")}break;case n(t):for(a=0,s=t.length;a<s;a++){var u;h(e,(u=t[a])[0],u[1])}break;case"forEach"in t:t.forEach(p,e);break;default:for(var f in t)h(e,f,t[f])}}function p(t,e){h(this,e,t)}function h(t,e,r){var o=n(r)?r.join(","):r;e in t?t[e].push(o):t[e]=[o]}function d(t){return decodeURIComponent(t.replace(a,"%25").replace(s," "))}function v(t){return encodeURIComponent(t).replace(i,y)}function y(t){return c[t]}C.URLSearchParams=l}(Object,String,Array.isArray)}!function(t){var e=!1;try{e=!!Symbol.iterator}catch(t){}function n(t,n){var r=[];return t.forEach(n,r),e?r[Symbol.iterator]():{next:function(){var t=r.shift();return{done:void 0===t,value:t}}}}"forEach"in t||(t.forEach=function(t,e){var n=this,r=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach((function(o){o.length&&!(o in r)&&(r[o]=n.getAll(o)).forEach((function(r){t.call(e,r,o,n)}))}))}),"keys"in t||(t.keys=function(){return n(this,(function(t,e){this.push(e)}))}),"values"in t||(t.values=function(){return n(this,(function(t,e){this.push(t)}))}),"entries"in t||(t.entries=function(){return n(this,(function(t,e){this.push([e,t])}))}),e&&!(Symbol.iterator in t)&&(t[Symbol.iterator]=t.entries),"sort"in t||(t.sort=function(){for(var t,e,n,r=this.entries(),o=r.next(),i=o.done,a=[],s=Object.create(null);!i;)e=(n=o.value)[0],a.push(e),e in s||(s[e]=[]),s[e].push(n[1]),i=(o=r.next()).done;for(a.sort(),t=0;t<a.length;t++)this.delete(a[t]);for(t=0;t<a.length;t++)e=a[t],this.append(e,s[e].shift())}),function(e){var n=e.defineProperty,r=e.getOwnPropertyDescriptor,o=function(e){var n=e.append;e.append=t.append,URLSearchParams.call(e,e._usp.search.slice(1)),e.append=n},i=function(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)},a=function(a){var s,c,u=a.prototype,f=r(u,"searchParams"),l=r(u,"href"),p=r(u,"search");!f&&p&&p.set&&(c=function(e){function r(n,r){t.append.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function o(n){t.delete.call(this,n),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}function i(n,r){t.set.call(this,n,r),n=this.toString(),e.set.call(this._usp,n?"?"+n:"")}return function(t,e){return t.append=r,t.delete=o,t.set=i,n(t,"_usp",{configurable:!0,writable:!0,value:e})}}(p),s=function(t,e){return n(t,"_searchParams",{configurable:!0,writable:!0,value:c(e,t)}),e},e.defineProperties(u,{href:{get:function(){return l.get.call(this)},set:function(t){var e=this._searchParams;l.set.call(this,t),e&&o(e)}},search:{get:function(){return p.get.call(this)},set:function(t){var e=this._searchParams;p.set.call(this,t),e&&o(e)}},searchParams:{get:function(){return i(this,a),this._searchParams||s(this,new URLSearchParams(this.search.slice(1)))},set:function(t){i(this,a),s(this,t)}}}))};try{a(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&a(URL)}catch(t){}}(Object)}(C.URLSearchParams.prototype);var O=C.URLSearchParams;function E(t,e){var n=o()(t);if(a.a){var r=a()(t);e&&(r=r.filter((function(e){return c()(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){p()(t,e,n[e])})):f.a?Object.defineProperties(t,f()(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,c()(n,e))}))}return t}var T=b()("squatch-js"),S=function(t){return"object"===d()(t)&&!Array.isArray(t)},k=function t(e,n){var r=y()(n).map((function(r){return p()({},r,function(t){return S(n[t])&&e.hasOwnProperty(t)&&S(e[t])}(r)?t(e[r],n[r]):n[r])})).reduce((function(t,e){return j(j({},t),e)}),{});return j(j({},e),r)};function A(t){return atob(t.replace(/_/g,"/").replace(/-/g,"+"))}function P(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function I(){var t=window.location.search,e=new O(t).get("_saasquatch")||"";if(e){var n="",r="",o="";try{n=JSON.parse(A(e))}catch(t){return void T("Unable to decode params",t)}try{r=JSON.parse(A(_.a.get("_saasquatch"))),T("existing cookie",r)}catch(t){T("Unable to retrieve cookie",t)}try{var i=function(){var t,e,n="weird_get_top_level_domain=cookie",r=document.location.hostname.split(".");for(t=r.length-1;t>=0;t--)if(e=r.slice(t).join("."),document.cookie=n+";domain=."+e+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+e+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",e}();if(T("domain retrieved:",i),r){var a=k(r,n);o=P(g()(a)),T("cookie to store:",a)}else o=P(g()(n)),T("cookie to store:",n);_.a.set("_saasquatch",o,{expires:365,secure:!1,sameSite:"Lax",domain:i,path:"/"})}catch(t){T("Unable to set cookie",t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(12),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(25),f=n.n(u),l=n(2),p=n.n(l),h=n(3),d=n.n(h),v=n(18),y=n.n(v),m=n(19),g=n(1),w=function(){function t(e){a()(this,t);var n=e;Object(g.b)(n,"domain")&&"string"==typeof n.domain?this.domain=n.domain:this.domain="https://app.referralsaasquatch.com"}return c()(t,[{key:"pushAnalyticsLoadEvent",value:function(t){if(t.externalUserId&&t.externalAccountId){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=t.programId?"&programId=".concat(encodeURIComponent(t.programId)):"",a="/a/".concat(e,"/widgets/analytics/loaded?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o).concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}}},{key:"pushAnalyticsShareClickedEvent",value:function(t){var e=encodeURIComponent(t.tenantAlias),n=encodeURIComponent(t.externalAccountId),r=encodeURIComponent(t.externalUserId),o=encodeURIComponent(t.engagementMedium),i=encodeURIComponent(t.shareMedium),a="/a/".concat(e,"/widgets/analytics/shared?externalAccountId=").concat(n,"&externalUserId=").concat(r,"&engagementMedium=").concat(o,"&shareMedium=").concat(i),s=this.domain+a;return Object(m.b)(s,y()({}))}}]),t}(),b=d()("squatch-js:widget"),x=function(){function t(e){a()(this,t),b("widget initializing ..."),this.content="error"===e.content?this._error(e.rsCode):e.content,this.type=e.type,this.widgetApi=e.api,this.npmCdn=e.npmCdn,this.analyticsApi=new w({domain:e.domain}),this.frame=document.createElement("iframe"),this.frame.squatchJsApi=this,this.frame.width="100%",this.frame.scrolling="no",this.frame.setAttribute("style","border: 0; background-color: none; width: 1px; min-width: 100%;"),this.context=e.context}var e;return c()(t,[{key:"_loadEvent",value:function(t){var e;if(t){if(!Object(g.c)(t))throw new Error("Widget Load event identity property is not an object");var n;if(Object(g.b)(t,"programId")){if(!Object(g.b)(t,["tenantAlias","accountId","userId","engagementMedium"]))throw new Error("Widget Load event missing required properties");n={tenantAlias:t.tenantAlias,externalAccountId:t.accountId,externalUserId:t.userId,engagementMedium:t.engagementMedium,programId:t.programId}}else{var r=t,o=r.analytics,i=r.mode;n={tenantAlias:o.attributes.tenant,externalAccountId:o.attributes.accountId,externalUserId:o.attributes.userId,engagementMedium:i.widgetMode}}null===(e=this.analyticsApi.pushAnalyticsLoadEvent(n))||void 0===e||e.then((function(t){b("".concat(n.engagementMedium," loaded event recorded."))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}}},{key:"_shareEvent",value:function(t,e){t&&this.analyticsApi.pushAnalyticsShareClickedEvent({tenantAlias:t.analytics.attributes.tenant,externalAccountId:t.analytics.attributes.accountId,externalUserId:t.analytics.attributes.userId,engagementMedium:t.mode.widgetMode,shareMedium:e}).then((function(n){b("".concat(t.mode.widgetMode," share ").concat(e," event recorded. ").concat(n))})).catch((function(t){b(new Error("pushAnalyticsLoadEvent() ".concat(t)))}))}},{key:"_inviteContacts",value:function(t,e){t&&this.widgetApi.invite({tenantAlias:t.analytics.attributes.tenant,accountId:t.analytics.attributes.accountId,userId:t.analytics.attributes.userId,emailList:e}).then((function(t){b("Sent email invites to share ".concat(e,". ").concat(t))})).catch((function(t){b(new Error("invite() ".concat(t)))}))}},{key:"_error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"modal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r='<!DOCTYPE html>\n \x3c!--[if IE 7]><html class="ie7 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if IE 8]><html class="ie8 oldie" lang="en"><![endif]--\x3e\n \x3c!--[if gt IE 8]>\x3c!--\x3e<html lang="en">\x3c!--<![endif]--\x3e\n <head>\n <link rel="stylesheet" media="all" href="https://fast.ssqt.io/assets/css/widget/errorpage.css">\n <style>\n '.concat(n,'\n </style>\n </head>\n <body>\n\n <div class="squatch-container ').concat(e,'" style="width:100%">\n <div class="errorheader">\n <button type="button" class="close" onclick="window.frameElement.squatchJsApi.close();">×</button>\n <p class="errortitle">Error</p>\n </div>\n <div class="errorbody">\n <div class="sadface"><img src="https://fast.ssqt.io/assets/images/face.png"></div>\n <h4>Our referral program is temporarily unavailable.</h4><br>\n <p>Please reload the page or check back later.</p>\n <p>If the persists please contact our support team.</p>\n <br>\n <br>\n <div class="right-align errtxt">\n Error Code: ').concat(t,"\n </div>\n </div>\n </div>\n </body>\n </html>");return r}},{key:"_findInnerContainer",value:(e=o()(p.a.mark((function t(){var e,n,r,o,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){var t=n.getElementsByTagName("sqh-global-container"),e=n.getElementsByClassName("squatch-container");return t.length>0?t[0]:e.length>0?e[0]:null},e=this.frame.contentWindow){t.next=4;break}throw new Error("Squatch.js frame inner frame is empty");case 4:n=e.document,o=null,i=0;case 7:if(!(i<5)){t.next=16;break}if(!(o=r())){t.next=11;break}return t.abrupt("break",16);case 11:return t.next=13,_(100);case 13:i++,t.next=7;break;case 16:if(o){t.next=18;break}return t.abrupt("return",n.body);case 18:return t.abrupt("return",o);case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"reload",value:function(t,e){var n=this,r=t.email,o=t.firstName,i=t.lastName,a=this.frame.contentWindow,s=this.context.engagementMedium||"POPUP";if(!a)throw new Error("Frame needs a content window");var c,u=a.document;if("upsert"===this.context.type){var f={email:r||null,firstName:o||null,lastName:i||null,id:this.context.user.id,accountId:this.context.user.accountId};c=this.widgetApi.upsertUser({user:f,engagementMedium:s,widgetType:this.type,jwt:e})}else{if("passwordless"!==this.context.type)throw new Error("can't reload an error widget");c=this.widgetApi.render({user:void 0,engagementMedium:s,widgetType:this.type,jwt:void 0})}c.then((function(t){var e=t.template;if(e){n.content=e;var o=u.createElement("button"),i=u.getElementsByClassName("squatch-register")[0];if(i){o.className="btn btn-primary",o.id="show-stats-btn",o.textContent="REFERRER_WIDGET"===n.type?"Show Stats":"Show Reward";var a="POPUP"===s?"margin-top: 10px; max-width: 130px; width: 100%;":"margin-top: 10px;";o.setAttribute("style",a),o.onclick=function(){n.load(),"POPUP"===s&&n.open()},i.style.paddingTop="30px",i.innerHTML="<p><strong>".concat(r,"</strong><br>Has been successfully registered</p>"),i.appendChild(o)}}})).catch((function(t){var e=t.message;b("".concat(e))}))}}]),t}();function _(t){return new f.a((function(e,n){setTimeout((function(){e()}),t)}))}},function(t,e,n){"use strict";var r=n(112)(!0);n(79)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(17),o=n(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(17);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(59),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(65)("keys"),o=n(52);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(23),o=n(43),i=n(64)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";var r=n(33);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(4),o=n(0),i=n(39),a=n(69),s=n(20).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(82),o=n(66).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r=n(12),o=n.n(r),i=n(5),a=n.n(i),s=n(6),c=n.n(s),u=n(2),f=n.n(u),l=n(3),p=n.n(l),h=n(48),d=n(47),v=n(46),y=n(26),m=n(55),g=n(1),w=p()("squatch-js:widgets"),b=function(){function t(e){a()(this,t);var n=e,r=Object(g.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain,this.npmCdn=r.npmCdn,this.eventBus=h,this.api=new d.a(r),h.addEventListener("submit_email",t._cb)}var e,n;return c()(t,[{key:"upsertUser",value:(n=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.g)(n),t.prev=2,t.next=5,this.api.upsertUser(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"upsert",user:r.user||null,engagementMedium:e.engagementMedium,container:e.container,trigger:e.trigger}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),w(t.t0),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,e.engagementMedium),t.t0;case 14:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return n.apply(this,arguments)})},{key:"render",value:(e=o()(f.a.mark((function t(e){var n,r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e,r=Object(g.f)(n),t.prev=2,t.next=5,this.api.render(r);case 5:return o=t.sent,t.abrupt("return",{widget:this._renderWidget(o,r,{type:"passwordless",engagementMedium:r.engagementMedium}),user:o.user});case 9:throw t.prev=9,t.t0=t.catch(2),t.t0.apiErrorCode&&this._renderErrorWidget(t.t0,r.engagementMedium),t.t0;case 13:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return e.apply(this,arguments)})},{key:"autofill",value:function(t){var e=t;if("function"!=typeof e){if("string"!=typeof e)throw new Error("Autofill accepts a string or function");var n,r=document.querySelectorAll(e);if(!(r.length>0))throw w("Element id/class or function missing"),new Error("Element id/class or function missing");n=r[0],this.api.squatchReferralCookie().then((function(t){var e=t.code;n.value=e})).catch((function(t){throw t}))}else this.api.squatchReferralCookie().then((function(){return e.apply(void 0,arguments)})).catch((function(t){throw w("Autofill error",t),t}))}},{key:"submitEmail",value:function(e){h.removeEventListener("submit_email",t._cb),h.addEventListener("submit_email",e)}},{key:"_renderWidget",value:function(e,n,r){if(w("Rendering Widget..."),!e)throw new Error("Unable to get a response");var o,i=!!n.displayOnLoad,a=!1,s=e.jsOptions||"",c={content:e.template,type:n.widgetType||s.widget.defaultWidgetType,api:this.api,domain:this.domain,npmCdn:this.npmCdn,context:r};if(s.widgetUrlMappings&&s.widgetUrlMappings.forEach((function(n){t._matchesUrl(n.url)&&("CONVERSION_WIDGET"!==n.widgetType||e.user.referredBy&&e.user.referredBy.code?(i=n.displayOnLoad,a=n.showAsCTA,w("Display ".concat(n.widgetType," on ").concat(n.url))):w("Don't display ".concat(n.widgetType," when no referral on widget rule match ").concat(n.url)))})),s.conversionUrls&&s.conversionUrls.forEach((function(n){e.user.referredBy&&t._matchesUrl(n)&&w("This is a conversion URL",n)})),s.fuelTankAutofillUrls&&(w("We found a fuel tank autofill!"),s.fuelTankAutofillUrls.forEach((function(n){var r=n.url,o=n.formSelector;if(t._matchesUrl(r)&&(w("Fuel Tank URL matches"),e.user.referredBy&&e.user.referredBy.code)){var i=document.querySelector(o);i?i.value=e.user.referredBy.referredReward.fuelTankCode||"":w(new Error("Element with id/class ".concat(o," was not found.")))}}))),a||"EMBED"!==n.engagementMedium)if(a||"POPUP"!==n.engagementMedium)if(a){w("display CTA");var u=s.cta.content.buttonSide,f=s.cta.content.buttonPosition;(o=new m.a(c,{side:u,position:f})).load(),i&&o.open()}else w("display popup on load"),(o=new y.a(c)).load(),i&&o.open();else(o=new y.a(c,c.context.trigger)).load(),i&&o.open();else(o=new v.a(c,c.context.container)).load();return o}},{key:"_renderErrorWidget",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"POPUP",n=t.apiErrorCode,r=t.rsCode,o=t.message;w(new Error("".concat(n," (").concat(r,") ").concat(o)));var i={content:"error",rsCode:r,api:this.api,domain:this.domain,npmCdn:this.npmCdn,type:"ERROR_WIDGET",context:{type:"error"}};"EMBED"===e?new v.a(i).load():"POPUP"===e&&new y.a(i).load()}}],[{key:"_matchesUrl",value:function(t){return!!window.location.href.match(new RegExp(t))}},{key:"_cb",value:function(t,e,n){var r;r="string"==typeof n||n instanceof String?{email:n}:n,e.reload(r)}}]),t}()},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){},function(t,e,n){"use strict";function r(){console.log("Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes.")}n.d(e,"a",(function(){return r}))},function(t,e){},function(t,e,n){"use strict";var r=n(39),o=n(9),i=n(81),a=n(29),s=n(41),c=n(113),u=n(53),f=n(67),l=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){c(n,e,d);var g,w,b,x=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",C="values"==v,O=!1,E=t.prototype,j=E[l]||E["@@iterator"]||v&&E[v],T=j||x(v),S=v?C?x("entries"):T:void 0,k="Array"==e&&E.entries||j;if(k&&(b=f(k.call(new t)))!==Object.prototype&&b.next&&(u(b,_,!0),r||"function"==typeof b[l]||a(b,l,h)),C&&j&&"values"!==j.name&&(O=!0,T=function(){return j.call(this)}),r&&!m||!p&&!O&&E[l]||a(E,l,T),s[e]=T,s[_]=h,v)if(g={values:C?T:x("values"),keys:y?T:x("keys"),entries:S},m)for(w in g)w in E||i(E,w,g[w]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){t.exports=!n(22)&&!n(34)((function(){return 7!=Object.defineProperty(n(61)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){t.exports=n(29)},function(t,e,n){var r=n(23),o=n(24),i=n(116)(!1),a=n(64)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){n(118);for(var r=n(4),o=n(29),i=n(41),a=n(10)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],f=r[u],l=f&&f.prototype;l&&!l[a]&&o(l,a,u),i[u]=i.Array}},function(t,e,n){var r=n(42),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(15);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(41),o=n(10)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(85),o=n(10)("iterator"),i=n(41);t.exports=n(0).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(15),o=n(33),i=n(10)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r,o,i,a=n(32),s=n(91),c=n(83),u=n(61),f=n(4),l=f.process,p=f.setImmediate,h=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete m[t]},"process"==n(42)(l)?r=function(t){l.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(15),o=n(17),i=n(68);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){t.exports=n(130)},function(t,e,n){"use strict";var r=n(4),o=n(23),i=n(22),a=n(9),s=n(81),c=n(134).KEY,u=n(34),f=n(65),l=n(53),p=n(52),h=n(10),d=n(69),v=n(70),y=n(135),m=n(136),g=n(15),w=n(17),b=n(43),x=n(24),_=n(62),C=n(40),O=n(50),E=n(97),j=n(44),T=n(71),S=n(20),k=n(51),A=j.f,P=S.f,I=E.f,R=r.Symbol,L=r.JSON,F=L&&L.stringify,q=h("_hidden"),M=h("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),D=f("symbols"),W=f("op-symbols"),H=Object.prototype,B="function"==typeof R&&!!T.f,z=r.QObject,J=!z||!z.prototype||!z.prototype.findChild,G=i&&u((function(){return 7!=O(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=A(H,e);r&&delete H[e],P(t,e,n),r&&t!==H&&P(H,e,r)}:P,$=function(t){var e=D[t]=O(R.prototype);return e._k=t,e},X=B&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},K=function(t,e,n){return t===H&&K(W,e,n),g(t),e=_(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,q)&&t[q][e]&&(t[q][e]=!1),n=O(n,{enumerable:C(0,!1)})):(o(t,q)||P(t,q,C(1,{})),t[q][e]=!0),G(t,e,n)):P(t,e,n)},V=function(t,e){g(t);for(var n,r=y(e=x(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},Q=function(t){var e=U.call(this,t=_(t,!0));return!(this===H&&o(D,t)&&!o(W,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,q)&&this[q][t])||e)},Y=function(t,e){if(t=x(t),e=_(e,!0),t!==H||!o(D,e)||o(W,e)){var n=A(t,e);return!n||!o(D,e)||o(t,q)&&t[q][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=I(x(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==q||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===H,r=I(n?W:x(t)),i=[],a=0;r.length>a;)!o(D,e=r[a++])||n&&!o(H,e)||i.push(D[e]);return i};B||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(W,n),o(this,q)&&o(this[q],t)&&(this[q][t]=!1),G(this,t,C(1,n))};return i&&J&&G(H,t,{configurable:!0,set:e}),$(t)}).prototype,"toString",(function(){return this._k})),j.f=Y,S.f=K,n(73).f=E.f=Z,n(72).f=Q,T.f=tt,i&&!n(39)&&s(H,"propertyIsEnumerable",Q,!0),d.f=function(t){return $(h(t))}),a(a.G+a.W+a.F*!B,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=k(h.store),ot=0;rt.length>ot;)v(rt[ot++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=R(t)},keyFor:function(t){if(!X(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!B,"Object",{create:function(t,e){return void 0===e?O(t):V(O(t),e)},defineProperty:K,defineProperties:V,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=u((function(){T.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return T.f(b(t))}}),L&&a(a.S+a.F*(!B||u((function(){var t=R();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(w(e)||void 0!==t)&&!X(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!X(e))return e}),r[1]=e,F.apply(L,r)}}),R.prototype[M]||n(29)(R.prototype,M,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(24),o=n(73).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(20),o=n(40);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===r(t)}},function(t,e,n){t.exports=n(164)},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var r=n(13),o=n.n(r),i=n(14),a=n.n(i),s=n(16),c=n.n(s),u=n(21),f=n.n(u),l=n(102),p=n.n(l),h=n(11),d=n.n(h),v=n(3),y=n.n(v),m=n(56);function g(t,e){var n=d()(t);if(o.a){var r=o()(t);e&&(r=r.filter((function(e){return a()(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach((function(e){f()(t,e,n[e])})):c.a?Object.defineProperties(t,c()(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,a()(n,e))}))}return t}var b=y()("squatch-js");function x(t){var e=window.location.search,n=new URLSearchParams(e).get("_saasquatchExtra")||"";if(n){var r;try{r=JSON.parse(Object(m.b)(n))}catch(t){return void b("Unable to decode _saasquatchExtra config")}var o=function(t){var e,n=d()(t||{})[0],r=d()((null==t?void 0:t[n])||{})[0],o=null==t||null===(e=t[n])||void 0===e?void 0:e[r];return{domain:n?"https://".concat(n):void 0,tenantAlias:r,widgetConfig:o}}(r),i=o.domain,a=o.tenantAlias,s=o.widgetConfig;if(i&&a&&s)return{widgetConfig:w({widgetType:s.autoPopupWidgetType,displayOnLoad:!0},p()(s,["autoPopupWidgetType"])),squatchConfig:w(w({},t?{configIn:t}:{}),{},{domain:i,tenantAlias:a})};b("_saasquatchExtra did not have an expected structure")}else b("No _saasquatchExtra param")}},function(t,e,n){var r=n(13),o=n(174);t.exports=function(t,e){if(null==t)return{};var n,i,a=o(t,e);if(r){var s=r(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(175)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(5),o=n.n(r),i=n(6),a=n.n(i),s=n(18),c=n.n(s),u=n(19),f=n(1),l=function(){function t(e){o()(this,t);var n=e,r=Object(f.d)(n);this.tenantAlias=r.tenantAlias,this.domain=r.domain}return a()(t,[{key:"track",value:function(t,e){var n=e,r=function(t){if(!Object(f.a)(t,"accountId","events","userId"))throw new Error("Fields required");if(!Array.isArray(t.events))throw new Error("'events' should be an array");return t}(t),o=function(t){if(!Object(f.c)(t))throw new Error("'options' should be an object");return t}(n).jwt,i=encodeURIComponent(this.tenantAlias),a=encodeURIComponent(r.userId),s=encodeURIComponent(r.accountId),l="/api/v1/".concat(i,"/open/account/").concat(s,"/user/").concat(a,"/events"),p=this.domain+l;return Object(u.b)(p,c()(r),o)}}]),t}()},function(t,e,n){"use strict";function r(){var t=window.squatch||null,e=window._squatch||null;if(console.log({loaded:t,cached:e,auto:window.squatch._auto}),t&&e){(e.ready||[]).forEach((function(t){return setTimeout((function(){return t()}),0)})),window._squatch=void 0;try{delete window._squatch}catch(t){throw t}setTimeout((function(){return window.squatch._auto()}),0)}}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(107)},function(t,e,n){"use strict";n.r(e),n.d(e,"api",(function(){return _})),n.d(e,"widgets",(function(){return C})),n.d(e,"events",(function(){return O})),n.d(e,"widget",(function(){return E})),n.d(e,"_auto",(function(){return j})),n.d(e,"init",(function(){return T})),n.d(e,"ready",(function(){return S})),n.d(e,"autofill",(function(){return k})),n.d(e,"submitEmail",(function(){return A})),n.d(e,"pushCookie",(function(){return P}));var r=n(3),o=n.n(r),i=n(74);n.d(e,"Widgets",(function(){return i.a}));var a=n(46);n.d(e,"EmbedWidget",(function(){return a.a}));var s=n(26);n.d(e,"PopupWidget",(function(){return s.a}));var c=n(55);n.d(e,"CtaWidget",(function(){return c.a}));var u=n(47);n.d(e,"WidgetApi",(function(){return u.a}));var f=n(104),l=n(105),p=n(1),h=n(56),d=n(101),v=n(76);for(var y in v)["default","Widgets","EmbedWidget","PopupWidget","CtaWidget","WidgetApi","api","widgets","events","widget","_auto","init","ready","autofill","submitEmail","pushCookie"].indexOf(y)<0&&function(t){n.d(e,t,(function(){return v[t]}))}(y);var m=n(77);n.d(e,"help",(function(){return m.a}));var g=o()("squatch-js"),w=null,b=null,x=null;function _(){return w}function C(){return b}function O(){return x}function E(t){var e;return null===(e=C())||void 0===e?void 0:e.render(t)}function j(t){var e=Object(d.a)(t);if(e){var n,r=e.squatchConfig,o=e.widgetConfig;return T(r),null===(n=C())||void 0===n?void 0:n.render(o)}}function T(t){var e=t,n=Object(p.d)(e);(n.tenantAlias.match("^test")||n.debug)&&o.a.enable("squatch-js*"),g("initializing ..."),w=new u.a(n),b=new i.a(n),x=new f.a(n),g("Widget API instance",w),g("Widgets instance",b),g("Events API instance",x)}function S(t){t()}function k(t){C().autofill(t)}function A(t){C().submitEmail(t)}function P(){Object(h.a)()}"undefined"==typeof document||window.SaaSquatchDoNotAutoDrop||P(),"undefined"!=typeof document&&window._squatch&&Object(l.a)()},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&h())}function h(){if(!f){var t=s(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++l<e;)c&&c[l].run();l=-1,e=u.length}c=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||f||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=function(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){var n;function a(){if(a.enabled){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var i=a,s=Number(new Date),c=s-(n||s);i.diff=c,i.prev=n,i.curr=s,n=s,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var u=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,n){if("%%"===t)return t;u++;var o=r.formatters[n];if("function"==typeof o){var a=e[u];t=o.call(i,a),e.splice(u,1),u--}return t})),r.formatArgs.call(i,e);var f=i.log||r.log;f.apply(i,e)}}return a.namespace=t,a.enabled=r.enabled(t),a.useColors=r.useColors(),a.color=e(t),a.destroy=o,a.extend=i,"function"==typeof r.init&&r.init(a),r.instances.push(a),a}function o(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){return r(this.namespace+(void 0===e?":":e)+t)}return r.debug=r,r.default=r,r.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},r.disable=function(){r.enable("")},r.enable=function(t){var e;r.save(t),r.names=[],r.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;e<o;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var i=r.instances[e];i.enabled=r.enabled(i.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(110),Object.keys(t).forEach((function(e){r[e]=t[e]})),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=60*r,i=24*o;function a(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var s=typeof t;if("string"===s&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===s&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return a(t,e,i,"day");if(e>=o)return a(t,e,o,"hour");if(e>=r)return a(t,e,r,"minute");if(e>=n)return a(t,e,n,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=r)return Math.round(t/r)+"m";if(e>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){n(78),n(58),n(84),n(121),n(128),n(129),t.exports=n(0).Promise},function(t,e,n){var r=n(59),o=n(60);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(50),o=n(40),i=n(53),a={};n(29)(a,n(10)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(20),o=n(15),i=n(51);t.exports=n(22)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(42);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(24),o=n(63),i=n(117);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(59),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r=n(119),o=n(120),i=n(41),a=n(24);t.exports=n(79)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r,o,i,a,s=n(39),c=n(4),u=n(32),f=n(85),l=n(9),p=n(17),h=n(33),d=n(122),v=n(123),y=n(89),m=n(90).set,g=n(124)(),w=n(68),b=n(92),x=n(125),_=n(93),C=c.TypeError,O=c.process,E=O&&O.versions,j=E&&E.v8||"",T=c.Promise,S="process"==f(O),k=function(){},A=o=w.f,P=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n(10)("species")]=function(t){t(k,k)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e&&0!==j.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&q(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(C("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&L(t)}))}},L=function(t){m.call(c,(function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=b((function(){S?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=S||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},q=function(t){m.call(c,(function(){var e;S?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},M=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw C("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(U,r,1),u(M,r,1))}catch(t){M.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){M.call({_w:n,_d:!1},t)}}};P||(T=function(t){d(this,T,"Promise","_h"),h(t),r.call(this);try{t(u(U,this,1),u(M,this,1))}catch(t){M.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(126)(T.prototype,{then:function(t,e){var n=A(y(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(U,t,1),this.reject=u(M,t,1)},w.f=A=function(t){return t===T||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!P,{Promise:T}),n(53)(T,"Promise"),n(127)("Promise"),a=n(0).Promise,l(l.S+l.F*!P,"Promise",{reject:function(t){var e=A(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!P),"Promise",{resolve:function(t){return _(s&&this===a?T:this,t)}}),l(l.S+l.F*!(P&&n(94)((function(t){T.all(t).catch(k)}))),"Promise",{all:function(t){var e=this,n=A(e),r=n.resolve,o=n.reject,i=b((function(){var n=[],i=0,a=1;v(t,!1,(function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,o=b((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(32),o=n(86),i=n(87),a=n(15),s=n(63),c=n(88),u={},f={};(e=t.exports=function(t,e,n,l,p){var h,d,v,y,m=p?function(){return t}:c(t),g=r(n,l,e?2:1),w=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>w;w++)if((y=e?g(a(d=t[w])[0],d[1]):g(t[w]))===u||y===f)return y}else for(v=m.call(t);!(d=v.next()).done;)if((y=o(v,g,d.value,e))===u||y===f)return y}).BREAK=u,e.RETURN=f},function(t,e,n){var r=n(4),o=n(90).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(42)(a);t.exports=function(){var t,e,n,u=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){var r=n(4).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){var r=n(29);t.exports=function(t,e,n){for(var o in e)n&&t[o]?t[o]=e[o]:r(t,o,e[o]);return t}},function(t,e,n){"use strict";var r=n(4),o=n(0),i=n(20),a=n(22),s=n(10)("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:r[t];a&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(9),o=n(0),i=n(4),a=n(89),s=n(93);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(9),o=n(68),i=n(92);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){n(131);var r=n(0).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(22),"Object",{defineProperty:n(20).f})},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=c(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===u)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,a),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var d=Object.getPrototypeOf,v=d&&d(d(C([])));v&&v!==e&&n.call(v,o)&&(h=v);var y=p.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return l.prototype=y.constructor=p,p.constructor=l,p[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(96),n(78),n(137),n(138),t.exports=n(0).Symbol},function(t,e,n){var r=n(52)("meta"),o=n(17),i=n(23),a=n(20).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(34)((function(){return c(Object.preventExtensions({}))})),f=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return u&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(51),o=n(71),i=n(72);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(42);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){n(70)("asyncIterator")},function(t,e,n){n(70)("observable")},function(t,e,n){n(58),n(84),t.exports=n(69).f("iterator")},function(t,e,n){n(141),t.exports=n(0).Object.keys},function(t,e,n){var r=n(43),o=n(51);n(54)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){n(96),t.exports=n(0).Object.getOwnPropertySymbols},function(t,e,n){n(144);var r=n(0).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(24),o=n(44).f;n(54)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){n(146),t.exports=n(0).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(9),o=n(147),i=n(24),a=n(44),s=n(98);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=c(r,e=u[l++]))&&s(f,e,n);return f}})},function(t,e,n){var r=n(73),o=n(71),i=n(15),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(0),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,n){function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){t.exports=o,o.default=o,o.stable=a,o.stableStringify=a;var n=[],r=[];function o(t,e,o){var i;for(!function t(e,o,i,a){var s;if("object"==typeof e&&null!==e){for(s=0;s<i.length;s++)if(i[s]===e){var c=Object.getOwnPropertyDescriptor(a,o);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,o,{value:"[Circular]"}),n.push([a,o,e,c])):r.push([e,o]):(a[o]="[Circular]",n.push([a,o,e])))}if(i.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,i,e);else{var u=Object.keys(e);for(s=0;s<u.length;s++){var f=u[s];t(e[f],f,i,e)}}i.pop()}}(t,"",[],void 0),i=0===r.length?JSON.stringify(t,e,o):JSON.stringify(t,s(e),o);0!==n.length;){var a=n.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return i}function i(t,e){return t<e?-1:t>e?1:0}function a(t,e,o){var a,c=function t(e,o,a,s){var c;if("object"==typeof e&&null!==e){for(c=0;c<a.length;c++)if(a[c]===e){var u=Object.getOwnPropertyDescriptor(s,o);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,o,{value:"[Circular]"}),n.push([s,o,e,u])):r.push([e,o]):(s[o]="[Circular]",n.push([s,o,e])))}if("function"==typeof e.toJSON)return;if(a.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,a,e);else{var f={},l=Object.keys(e).sort(i);for(c=0;c<l.length;c++){var p=l[c];t(e[p],p,a,e),f[p]=e[p]}if(void 0===s)return f;n.push([s,o,e]),s[o]=f}a.pop()}}(t,"",[],void 0)||t;for(a=0===r.length?JSON.stringify(c,e,o):JSON.stringify(c,s(e),o);0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return a}function s(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var o=0;o<r.length;o++){var i=r[o];if(i[1]===e&&i[0]===n){n="[Circular]",r.splice(o,1);break}}return t.call(this,e,n)}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=n(99);function i(t){if(t)return function(t){for(var e in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,e)&&(t[e]=i.prototype[e]);return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&a.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=o(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},function(t,e,n){"use strict";var r=n(153);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){o.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),o.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,r(e.args))}))},t.exports=o},function(t,e,n){n(156),t.exports=n(0).Reflect.construct},function(t,e,n){var r=n(9),o=n(50),i=n(33),a=n(15),s=n(17),c=n(34),u=n(157),f=(n(4).Reflect||{}).construct,l=c((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),p=!c((function(){f((function(){}))}));r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=o(s(c)?c:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){"use strict";var r=n(33),o=n(17),i=n(91),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e,n){n(58),n(159),t.exports=n(0).Array.from},function(t,e,n){"use strict";var r=n(32),o=n(9),i=n(43),a=n(86),s=n(87),c=n(63),u=n(98),f=n(88);o(o.S+o.F*!n(94)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,y=void 0!==v,m=0,g=f(p);if(y&&(v=r(v,d>2?arguments[2]:void 0,2)),null==g||h==Array&&s(g))for(n=new h(e=c(p.length));e>m;m++)u(n,m,y?v(p[m],m):p[m]);else for(l=g.call(p),n=new h;!(o=l.next()).done;m++)u(n,m,y?a(l,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){t.exports=n(161)},function(t,e,n){n(162),t.exports=n(0).Reflect.get},function(t,e,n){var r=n(44),o=n(67),i=n(23),a=n(9),s=n(17),c=n(15);a(a.S,"Reflect",{get:function t(e,n){var a,u,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(u=o(e))?t(u,n,f):void 0}})},function(t,e,n){var r=n(7);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(165),t.exports=n(0).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(166).set})},function(t,e,n){var r=n(17),o=n(15),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(32)(Function.call,n(44).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){t.exports=n(168)},function(t,e,n){n(169),t.exports=n(0).Object.getPrototypeOf},function(t,e,n){var r=n(43),o=n(67);n(54)("getPrototypeOf",(function(){return function(t){return o(r(t))}}))},function(t,e,n){t.exports=n(171)},function(t,e,n){n(172);var r=n(0).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(50)})},function(t,e,n){var r=n(100);function o(e,n){return t.exports=o=r||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,o(e,n)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(11);t.exports=function(t,e){if(null==t)return{};var n,o,i={},a=r(t);for(o=0;o<a.length;o++)n=a[o],e.indexOf(n)>=0||(i[n]=t[n]);return i},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){n(176);var r=n(0).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},function(t,e,n){n(54)("getOwnPropertyNames",(function(){return n(97).f}))}])}));
|