!function(){var t={},e={},n={},r={},i={},o={},a={},s={},u={},c={},l={},f={},d={},h={},p={},m={},v={},g={},b={},y={},w={},_={},E={},S={},T={},k={},x={},C={},A={},F={},I={},M=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]0){var e=u;u=[];for(var r=0,i=e;rDate.now()&&f)return window._storagePopulated=!0,void(void 0!==i&&null!==i&&i(f))}null!==window._storagePopulated&&void 0!==window._storagePopulated||(window._storagePopulated=!1);var d,h,p;if(XMLHttpRequest&&r&&"withCredentials"in(d=new XMLHttpRequest)){d.onreadystatechange=function(){4===d.readyState&&200===d.status&&(null!==window.localStorage&&void 0!==window.localStorage&&(window.localStorage.setItem("_6senseCompanyDetails",d.response),a&&window.localStorage.setItem("_6signalTTL",(Date.now()+s).toString())),window._storagePopulated=!0,void 0!==i&&null!==i&&i(d.response))},p=3===o?"".concat(t.v,"/v3/company/details"):"".concat(t.v,"/v1/company/details"),d.open("GET",p,!0),d.setRequestHeader("Authorization","Token ".concat(r));var m="LegacyWebTag";u?m="WebTag ".concat(u):c&&(m="WebTag1.0 ".concat(c)),d.setRequestHeader("X-6s-CustomID",m),d.withCredentials=!0,h=e.default.s.l(),h&&d.setRequestHeader("EpsilonCookie",h),d.send()}}function o(t,e){var n=window.localStorage.getItem("_6signalTTL");if(!isNaN(parseInt(n))){var r=parseInt(n)-e;window.localStorage.setItem("_6signalTTL",(r+t).toString())}}return t.__esModule=!0,t.w=t.x=t.y=t.v=void 0,t.v="https://epsilon.6sense.com",t.y=r,t.x=i,t.w=o,t}(i,r,n),o=function(t){function e(t,e){r[t]=e}function n(t,e){if(void 0===r[e.type])throw new Error("Can't handle ".concat(e.type," event"));r[e.type](t,e)}t.__esModule=!0,t.z=t.B=void 0;var r={};return t.B=e,t.z=n,t}(o),a=function(t,e){function n(t){return null!==t&&void 0!==t}function r(){for(var t=0,e=o;t=this.H){var r=this.F*this.G;n(this.K[this.F])&&(n(this.K[this.F].nextCycleLength)&&(this.H=this.K[this.F].nextCycleLength),n(this.K[this.F].nextDelay)&&(r=this.K[this.F].nextDelay)),this.F=r,this.I=0}this.M=setTimeout(this.N.bind(this),this.F),this.J[0]=this.M},t.prototype.stop=function(){clearTimeout(this.M),this.J[0]=null,o.splice(o.indexOf(this.J),1)},t.prototype.getCurrentDuration=function(){return this.F},t}();t.D=i;var o=[];return t.C=r,t}(a,e),s=function(t){function e(){return"https:"===document.location.protocol}function n(){return e()?"https":"http"}return t.__esModule=!0,t.O=void 0,t.default=e,t.O=n,t}(s),u=function(t){function e(t,e,n){void 0===n&&(n=document);for(var r=n.getElementsByTagName("meta"),i=0;i0&&(e=n[0].innerHTML),e}function r(t,r){void 0===r&&(r=document);var i={description:e("name","description",r),keywords:e("name","keywords",r),title:n(r)};if(null!==t&&void 0!==t)for(var o=0,a=t;o0&&(r=[]),i=setTimeout(n,3e3)}t.__esModule=!0,t.R=void 0,t.default=e;var r=[],i=setTimeout(n,3e3);return t.R={S:function(){return r},T:n,U:function(){clearTimeout(i)}},t}(l),f=function(t,e){t.__esModule=!0;var n=function(){function t(){this._queue=[]}return t.prototype.push=function(t){this._queue.push(t)},t.prototype.clear=function(t){this._queue.length;var e=this._queue;this._queue=[];for(var n=0,r=e;n>>32-e},t.Sha1.toHexStr=function(t){for(var e,n="",r=7;r>=0;r--)e=t>>>4*r&15,n+=e.toString(16);return n},t}(m),v=function(t){function e(t){var e,n="";for(e=0;e<=3;e++)n+=f.charAt(t>>8*e+4&15)+f.charAt(t>>8*e&15);return n}function n(t){var e,n=1+(t.length+8>>6),r=new Array(16*n);for(e=0;e<16*n;e++)r[e]=0;for(e=0;e>2]|=t.charCodeAt(e)<>2]|=128<>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e){return t<>>32-e}function o(t,e,n,o,a,s){return r(i(r(r(e,t),r(o,s)),a),n)}function a(t,e,n,r,i,a,s){return o(e&n|~e&r,t,e,i,a,s)}function s(t,e,n,r,i,a,s){return o(e&r|n&~r,t,e,i,a,s)}function u(t,e,n,r,i,a,s){return o(e^n^r,t,e,i,a,s)}function c(t,e,n,r,i,a,s){return o(n^(e|~r),t,e,i,a,s)}function l(t){var i,o=n(t),l=1732584193,f=-271733879,d=-1732584194,h=271733878;for(i=0;i0&&(r=r.concat(l))}}var f=r.map(function(t){return"".concat(t[0],"=").concat(encodeURIComponent(t[1]))}).join("&");return f}function l(t){return g.test(t)}function f(t,e){if(h(t))return!0;for(var n=0,r=e.fields;n100?[]:"button"===e.type||"submit"===e.type?[]:l(e.value)?[["".concat(t,"_Hash"),n.default.hash(e.value)],["".concat(t,"_emaildomain"),e.value.split("@")[1]],["".concat(t,"_MD5"),(0,r.default)(e.value)]]:f(t,i)?[[t,e.value]]:[]}function h(t){return!!/company|country|title|state|city|prov|job|role/.test(t.toLowerCase())}function p(t,e){var n=[];for(var r in t){var i=m(r,t[r],e);i.length>0&&(n=n.concat(i))}var o=n.map(function(t){return"".concat(t[0],"=").concat(encodeURIComponent(t[1]))}).join("&");return o}function m(t,e,i){return null===e?[]:l(e)?[["".concat(t,"_Hash"),n.default.hash(e)],["".concat(t,"_emaildomain"),e.split("@")[1]],["".concat(t,"_MD5"),(0,r.default)(e)]]:[[t,e]]}t.__esModule=!0,t.$=t._=t.aa=t.ba=t.ca=t.da=t.ea=t.fa=t.processSubmitEvent=t.ga=t.Z=void 0,t.Z=Symbol("6sense form event handled"),t.ga=o,t.processSubmitEvent=a;var v=1e3;t.fa=s,t.ea=u,t.da=c;var g=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;return t.ca=l,t.ba=f,t.aa=d,t._=h,t.$=p,t}(g,e,m,v,o),b=function(t){function e(t,e){return U(this,void 0,void 0,function(){return D(this,function(n){return window.fetch?[2,fetch(t,e)]:[2]})})}return t.__esModule=!0,t.default=e,t}(b),y=function(t){t.__esModule=!0;var e=function(){function t(t,e){this.ha=t,this.ia=e}return t}();return t.default=e,t}(y),w=function(t,e,n){t.__esModule=!0;var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ja={},e.ka={},e}return L(e,t),e.prototype.addPayload=function(t){if(!("id"in t.target))throw new Error("Can't target by element in Hubspot form");if(this.ja[t.target.id]=t,this.ka[t.target.id]){"Hubspot Form ".concat(t.target.id," was stashed, applying");var e=this.ka[t.target.id];this.la(e.formElem,e.formId,t)}},e.prototype.addForm=function(t){return U(this,void 0,void 0,function(){var e;return D(this,function(n){switch(n.label){case 0:return[4,this.ma(t)];case 1:return e=n.sent(),"Found Hubspot Form ".concat(e),this.ja[e]?this.la(t,e,this.ja[e]):(this.ka[e]={formElem:t,formId:e},"Stashing Hubspot Form ".concat(e," for future smart fill")),[2]}})})},e.prototype.la=function(t,e,n){var r=this;if(n.email){var i=Array.from(t.elements).filter(function(t){return t.name===n.email.name});if(1!==i.length)throw new Error("The selector for the primary email field returned multiple elements, can't continue with SFF");var o=i[0];o.addEventListener("blur",function(){o.value,r.ha(o.value,n.uuid,t).then(function(r){var i=n.fields.reduce(function(t,e){return r[e.mappedField]&&(t[e.name]=r[e.mappedField]),t},{});"Smart Form Filling Hubspot Form ".concat(e," with values: ");for(var o=0,a=Array.from(t.elements);o0?i.connectEnd-i.secureConnectionStart:0,a.responseTime=i.responseEnd-i.responseStart,a.fetchUntilResponseEnd=i.fetchStart>0?i.responseEnd-i.fetchStart:0,a.requestStartUntilResponseEnd=i.requestStart>0?i.responseEnd-i.requestStart:0,a.startUntilResponseEnd=i.startTime>0?i.responseEnd-i.startTime:0,n({fName:o.resourceName,timing:a,reportingUrl:o.reportingUrl,reportingCallback:o.reportingCallback})}}}function i(){return"undefined"!=typeof performance&&void 0!==performance.now?performance:Date}function o(t){var e=i();return function(){for(var r=[],i=0;i1){var o=void 0;o=2===r.length?"string"==typeof r[1]?r[1]:JSON.stringify(r[1]):JSON.stringify(M([],r.slice(1),!0)),l.push({name:r[0],value:o,dateTime:(new Date).toUTCString(),timeSincePageLoad:"0"})}c.push(r)}catch(t){i.error("Error loading pending command: "+t.message)}}}()}catch(t){i.error("Error loading pending commands: "+t.message)}return(0,r.Db)(u),(0,o.ga)(u,u.getWhitelist()),(0,a.Gb)(u),window._6si=c,"interactive"!==document.readyState&&"complete"!==document.readyState?document.addEventListener("readystatechange",function(t){"complete"==document.readyState&&u.init(l)}):u.init(l),t}(I,k,C,A,e,g,F)}();