!function(){var t,e,n,r,i={148:function(t,e,n){"use strict";n.d(e,{w:function(){return c}});var r=n(5478),i=n(824),o=n(6452),s=n(3831),a=n(3858);function u(t){console.error("Error sending segment performance metrics",t)}var c=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:a.a,this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,c=function(){s||(s=!0,o.flush().catch(u),s=!1,setTimeout(c,o.flushTimer))};c()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(t,e,n){var i=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});return{type:"Counter",metric:t,value:1,tags:(0,r.Cl)((0,r.Cl)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(o.r):"npm:next-".concat(o.r)})}}(t,e,(0,s.X)());this.queue.push(n),t.includes("error")&&this.flush().catch(u)}},t.prototype.flush=function(){return(0,r.sH)(this,void 0,Promise,(function(){var t=this;return(0,r.YH)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){u(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.sH)(this,void 0,Promise,(function(){var t,e,n;return(0,r.YH)(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,(0,i.h)(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}()},441:function(t,e,n){"use strict";function r(t){return"string"==typeof t}function i(t){return"number"==typeof t}function o(t){return"function"==typeof t}function s(t){return null!=t}function a(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}n.d(e,{Et:function(){return i},Kg:function(){return r},Qd:function(){return a},Tn:function(){return o},t2:function(){return s}})},518:function(t,e,n){"use strict";var r=n(7237);function i(t,e){return void 0===e&&(e=!0),t&&"object"==typeof t?function(t,e){return Object.keys(t).forEach((function(n){t[n]=i(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=i(n,e)})),t}(t,e):r.is(t,e)?r.parse(t):t}t.exports=i},824:function(t,e,n){"use strict";function r(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),s.push([e,n]),a[e]=a[e]?a[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}n.d(e,{h:function(){return o}});var i=n(5120),o=function(){for(var t=[],e=0;e-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},d.userAgent=l.proxy("context.userAgent"),d.timezone=l.proxy("context.timezone"),d.timestamp=l.field("timestamp"),d.channel=l.field("channel"),d.ip=l.proxy("context.ip"),d.userId=l.field("userId"),i.default(d)},2620:function(t,e,n){"use strict";n.d(e,{C:function(){return o},D:function(){return s}});var r=n(5478),i=n(9752);function o(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),o=e[t.event.type];return void 0===o?Promise.resolve(t):function(t){return(0,r.sH)(this,void 0,void 0,(function(){var e;return(0,r.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return o.apply(e,[t])})).then((function(t){var r=(new Date).getTime()-n;return t.stats.gauge("plugin_time",r,["plugin:".concat(e.name)]),t})).catch((function(n){if(n instanceof i.d&&"middleware_cancellation"===n.type)throw n;return n instanceof i.d?(t.log("warn",n.type,{plugin:e.name,error:n}),n):(t.log("error","plugin Error",{plugin:e.name,error:n}),t.stats.increment("plugin_error",1,["plugin:".concat(e.name)]),n)}))}function s(t,e){return o(t,e).then((function(e){if(e instanceof i.j)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}},2822:function(t,e,n){"use strict";function r(t,e){var n=e.methodName,r=e.integrationName,i=e.type,o=e.didError,s=void 0!==o&&o;t.stats.increment("analytics_js.integration.invoke".concat(s?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}n.d(e,{y:function(){return r}})},2911:function(t,e,n){"use strict";n.d(e,{I2:function(){return a},YM:function(){return u},qQ:function(){return s}});var r,i=n(6091),o=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,s=function(t){var e=(0,i.kJ)();e&&(e._cdn=t),r=t},a=function(){var t,e=null!=r?r:null===(t=(0,i.kJ)())||void 0===t?void 0:t._cdn;if(e)return e;var n,s=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var e,r=null!==(e=t.getAttribute("src"))&&void 0!==e?e:"",i=o.exec(r);i&&i[1]&&(n=i[1])})),n);return s||"https://cdn.dreamdata.cloud"},u=function(){var t=a();return"".concat(t,"/next-integrations")}},2939:function(t,e,n){"use strict";n.d(e,{g:function(){return o},M:function(){return s}});var r=n(5478),i=n(3255);var o="onRemoveFromFuture",s=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return(0,r.C6)(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;nt.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,s=t.attempt,a=t.maxTimeout,u=void 0===a?1/0:a;return Math.min(e*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(o)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(i.v)},3194:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0,e.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e}},3255:function(t,e,n){"use strict";n.d(e,{v:function(){return r}});var r=function(){function t(t){var e;this.callbacks={},this.warned=!1,this.maxListeners=null!==(e=null==t?void 0:t.maxListeners)&&void 0!==e?e:10}return t.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},t.prototype.on=function(t,e){return this.callbacks[t]?(this.callbacks[t].push(e),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,s,a,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(t){var e,r,o,s,a,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function u(t){var e;for(e=0;el?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,s=e;if(t[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,t),s=0;s<16;s+=1)t[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=u(o(t));return e?p(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=f(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=p(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=d(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=u(s(new Uint8Array(t)));return e?p(n):n},h}()},8456:function(t,e,n){"use strict";n.d(e,{o:function(){return s}});var r=n(5478),i=n(9752),o=n(8900),s=function(t){function e(e,n){return t.call(this,e,n,new o.U)||this}return(0,r.C6)(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(i.j)},8578:function(t){function e(t){return function(e,n,r,o){var s,a=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in e){var t=a(s);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[s];return null==i?void(u=!0):n.length?void(e=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==e?e:t(e,s,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}},8900:function(t,e,n){"use strict";n.d(e,{U:function(){return a}});var r,i=n(5478),o=n(4034),s=n(148),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.C6)(e,t),e.initRemoteMetrics=function(t){r=new s.w(t)},e.prototype.increment=function(e,n,i){t.prototype.increment.call(this,e,n,i),null==r||r.increment(e,null!=i?i:[])},e}(o.p)},8971:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(8578));function o(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+t)||i.default(n,t)||(e?i.default(n,"address."+e):null)||(e?i.default(n,e):null)||i.default(r,"address."+t)||i.default(r,t)||(e?i.default(r,"address."+e):null)||(e?i.default(r,e):null)}}e.default=function(t){t.zip=o("postalCode","zip"),t.country=o("country"),t.street=o("street"),t.state=o("state"),t.city=o("city"),t.region=o("region")}},9059:function(t,e,n){"use strict";function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}}n.d(e,{p:function(){return r}})},9659:function(t,e,n){"use strict";n.d(e,{v4:function(){return s}});for(var r,i=256,o=[];i--;)o[i]=(i+256).toString(16).substring(1);function s(){var t,e=0,n="";if(!r||i+16>256){for(r=Array(e=256);e--;)r[e]=256*Math.random()|0;e=i=0}for(;e<16;e++)t=r[i+e],n+=6==e?o[15&t|64]:8==e?o[63&t|128]:o[t],1&e&&e>1&&e<11&&(n+="-");return i++,n}},9732:function(t,e,n){"use strict";n.d(e,{x:function(){return f}});var r=n(5478),i=n(2939),o=n(8456),s=n(4082),a={getItem:function(){},setItem:function(){},removeItem:function(){}};try{a=(0,s.B)()&&window.localStorage?window.localStorage:a}catch(t){console.warn("Unable to access localStorage",t)}function u(t){var e=a.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new o.o(t.event,t.id)}))}function c(t){var e=a.getItem(t);return e?JSON.parse(e):{}}function l(t){a.removeItem(t)}function d(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=a.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(t){return(new Date).getTime()>t}(o);if(s)return a.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void a.removeItem(r);!s&&n<3?setTimeout((function(){d(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var f=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),s="persisted-queue:v1:".concat(n,":seen"),f=[],p={};return d(n,(function(){try{f=u(o),p=c(s),l(o),l(s),i.queue=(0,r.fX)((0,r.fX)([],f,!0),i.queue,!0),i.seen=(0,r.Cl)((0,r.Cl)({},p),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.fX)((0,r.fX)([],i.queue,!0),i.future,!0);try{d(n,(function(){!function(t,e){var n=u(t),i=(0,r.fX)((0,r.fX)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.Cl)((0,r.Cl)({},t),((n={})[e.id]=e,n))}),{});a.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);a.setItem(t,JSON.stringify((0,r.Cl)((0,r.Cl)({},n),e)))}(s,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.C6)(e,t),e}(i.M)},9752:function(t,e,n){"use strict";n.d(e,{d:function(){return u},j:function(){return c}});var r=n(9659),i=n(3435),o=n(5478),s=function(){function t(){this._logs=[]}return t.prototype.log=function(t,e,n){var r=new Date;this._logs.push({level:t,message:e,time:r,extras:n})},Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,s=(0,o.Cl)((0,o.Cl)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete s.time;var a=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[a]&&(a="".concat(a,"-").concat(Math.random())),(0,o.Cl)((0,o.Cl)({},t),((n={})[a]=s,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),a=n(4034),u=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},c=function(){function t(t,e,n,i){void 0===e&&(e=(0,r.v4)()),void 0===n&&(n=new a.r),void 0===i&&(i=new s),this.attempts=0,this.event=t,this._id=e,this.logger=i,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new u({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,i.J)(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return i[t].call(n.exports,n,n.exports,s),n.exports}s.m=i,s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var o={};t=t||[null,e({}),e([]),e(e)];for(var a=2&r&&n;"object"==typeof a&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((function(t){o[t]=function(){return n[t]}}));return o.default=function(){return n},s.d(i,o),i},s.d=function(t,e){for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=function(t){return Promise.all(Object.keys(s.f).reduce((function(e,n){return s.f[n](t,e),e}),[]))},s.u=function(t){return({10:"tsub-middleware",50:"ajs-destination",104:"schemaFilter",248:"auto-track",521:"remoteMiddleware",538:"queryString",694:"legacyVideos"}[t]||t)+".bundle."+{10:"eb4abd22e6d3b2e79266",50:"33ba8704fe1d0c9adc6d",104:"864330a6e06a34142068",219:"771d4feae1bc3b724227",248:"f39686d941d520faaf1b",407:"c978ba19e1992889f410",521:"eb562497e8c6f3715ffd",538:"5d263634bf948ec3e6b7",694:"344237361537189ae814"}[t]+".js"},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},r="@segment/analytics-next:",s.l=function(t,e,i,o){if(n[t])n[t].push(e);else{var a,u;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l-1?t:t+e}(r,o)):-1===(n=(e=s).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:a,search:o,title:u,url:l||s}},I=function(){var t=document.querySelector("link[rel='canonical']");return S(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},P=function(e,n){void 0===n&&(n=C(I()));var r,i,o,s=e.context;"page"===e.type&&(r=e.properties&&(i=e.properties,o=Object.keys(n),Object.assign.apply(Object,(0,t.fX)([{}],o.map((function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e})),!1))),e.properties=(0,t.Cl)((0,t.Cl)((0,t.Cl)({},n),e.properties),e.name?{name:e.name}:{})),s.page=(0,t.Cl)((0,t.Cl)((0,t.Cl)({},n),r),s.page)},H=function(){function e(t){this.user=t}return e.prototype.track=function(e,n,r,i,o){return this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),{event:e,type:"track",properties:n,options:(0,t.Cl)({},r),integrations:(0,t.Cl)({},i)}),o)},e.prototype.page=function(e,n,r,i,o,s){var a,u={type:"page",properties:(0,t.Cl)({},r),options:(0,t.Cl)({},i),integrations:(0,t.Cl)({},o)};return null!==e&&(u.category=e,u.properties=null!==(a=u.properties)&&void 0!==a?a:{},u.properties.category=e),null!==n&&(u.name=n),this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),u),s)},e.prototype.screen=function(e,n,r,i,o,s){var a={type:"screen",properties:(0,t.Cl)({},r),options:(0,t.Cl)({},i),integrations:(0,t.Cl)({},o)};return null!==e&&(a.category=e),null!==n&&(a.name=n),this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),a),s)},e.prototype.identify=function(e,n,r,i,o){return this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),{type:"identify",userId:e,traits:n,options:(0,t.Cl)({},r),integrations:(0,t.Cl)({},i)}),o)},e.prototype.group=function(e,n,r,i,o){return this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),{type:"group",traits:n,options:(0,t.Cl)({},r),integrations:(0,t.Cl)({},i),groupId:e}),o)},e.prototype.alias=function(e,n,r,i,o){var s={userId:e,type:"alias",options:(0,t.Cl)({},r),integrations:(0,t.Cl)({},i)};return null!==n&&(s.previousId=n),void 0===e?this.normalize((0,t.Cl)((0,t.Cl)({},s),this.baseEvent())):this.normalize((0,t.Cl)((0,t.Cl)({},this.baseEvent()),s),o)},e.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},e.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(t){"context"!==t&&(i.includes(t)?(0,b.J)(u,t,o[t]):(0,b.J)(a,t,o[t]))})),[a,u]},e.prototype.normalize=function(e,n){var r,i,o;(null===(r=e.options)||void 0===r?void 0:r.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var s=Object.keys(null!==(i=e.integrations)&&void 0!==i?i:{}).reduce((function(n,r){var i,o;return(0,t.Cl)((0,t.Cl)({},n),((i={})[r]=Boolean(null===(o=e.integrations)||void 0===o?void 0:o[r]),i))}),{}),a=(0,t.Cl)((0,t.Cl)({},s),null===(o=e.options)||void 0===o?void 0:o.integrations),u=this.context(e),c=u[0],l=u[1],d=(e.options,(0,t.Tt)(e,["options"])),f=(0,t.Cl)((0,t.Cl)((0,t.Cl)((0,t.Cl)({timestamp:new Date},d),{context:c,integrations:a}),l),{messageId:"ajs-next-"+_().hash(JSON.stringify(e)+(0,g.v4)())});return P(f,n),f},e}(),A=s(9732);var j=s(2939),M=s(9752),O=s(2620),E=function(e){function n(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e,o=t();return"object"==typeof(e=o)&&null!==e&&"then"in e&&"function"==typeof e.then&&(1==++i&&(n=new Promise((function(t){return r=t}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(j.g,(function(){o.scheduleFlush(0)})),o}return(0,t.C6)(n,e),n.prototype.register=function(e,n,r){return(0,t.sH)(this,void 0,void 0,(function(){var i=this;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return[4,Promise.resolve(n.load(e,r)).then((function(){i.plugins.push(n)})).catch((function(t){if("destination"===n.type)return i.failedInitializations.push(n.name),console.warn(n.name,t),void e.log("warn","Failed to load destination",{plugin:n.name,error:t});throw t}))];case 1:return t.sent(),[2]}}))}))},n.prototype.deregister=function(e,n,r){return(0,t.sH)(this,void 0,void 0,(function(){var i;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(e,r))]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==n.name})),[3,4];case 3:return i=t.sent(),e.log("warn","Failed to unload destination",{plugin:n.name,error:i}),[3,4];case 4:return[2]}}))}))},n.prototype.dispatch=function(e){return(0,t.sH)(this,void 0,void 0,(function(){var n;return(0,t.YH)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),n=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,n]}))}))},n.prototype.subscribeToDelivery=function(e){return(0,t.sH)(this,void 0,void 0,(function(){var n=this;return(0,t.YH)(this,(function(t){return[2,new Promise((function(t){var r=function(i,o){i.isSame(e)&&(n.off("flush",r),t(i))};n.on("flush",r)}))]}))}))},n.prototype.dispatchSingle=function(e){return(0,t.sH)(this,void 0,void 0,(function(){var n=this;return(0,t.YH)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(t){return n.enqueuRetry(t,e)?n.subscribeToDelivery(e):(e.setFailedDelivery({reason:t}),e)}))]}))}))},n.prototype.isEmpty=function(){return 0===this.queue.length},n.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},n.prototype.deliver=function(e){return(0,t.sH)(this,void 0,void 0,(function(){var n,r,i,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return[4,this.criticalTasks.done()];case 1:t.sent(),n=Date.now(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=t.sent(),r=Date.now()-n,this.emit("delivery_success",e),e.stats.gauge("delivered",r),e.log("debug","Delivered",e.event),[2,e];case 4:throw i=t.sent(),o=i,e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),i;case 5:return[2]}}))}))},n.prototype.enqueuRetry=function(t,e){return!(t instanceof M.d&&!t.retry)&&this.queue.pushWithBackoff(e)},n.prototype.flush=function(){return(0,t.sH)(this,void 0,void 0,(function(){var e,n;return(0,t.YH)(this,(function(t){switch(t.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=t.sent(),this.emit("flush",e,!0),[3,4];case 3:return n=t.sent(),this.enqueuRetry(n,e)||(e.setFailedDelivery({reason:n}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},n.prototype.isReady=function(){return!0},n.prototype.availableExtensions=function(e){var n,r,i=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),o=(n="type",r={},i.forEach((function(e){var i,o=void 0;if("string"==typeof n){var s=e[n];o="string"!=typeof s?JSON.stringify(s):s}else n instanceof Function&&(o=n(e));void 0!==o&&(r[o]=(0,t.fX)((0,t.fX)([],null!==(i=r[o])&&void 0!==i?i:[],!0),[e],!1))})),r),s=o.before,a=void 0===s?[]:s,u=o.enrichment,c=void 0===u?[]:u,l=o.destination,d=void 0===l?[]:l,f=o.after;return{before:a,enrichment:c,destinations:d,after:void 0===f?[]:f}},n.prototype.flushOne=function(e){var n,r;return(0,t.sH)(this,void 0,void 0,(function(){var i,o,s,a,u,c,l,d,f,p,h,v,y,m;return(0,t.YH)(this,(function(t){switch(t.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),i=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),o=i.before,s=i.enrichment,a=0,u=o,t.label=1;case 1:return a0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r4){var s=r.slice(4);"campaign"===s&&(s="name"),t[s]=(0,wt.p)(o)}return t}),{})}(u));var d=function(){var t=m.get("_ga");if(t&&t.startsWith("amp"))return t}();d&&(s.amp={id:d}),function(e,n,r){var i,o=new Y(r?[]:[new z(kt())]),s=o.get("s:context.referrer"),a=null!==(i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},Yt=function(e,n){return(0,t.sH)(void 0,void 0,Promise,(function(){return(0,t.YH)(this,(function(r){switch(r.label){case 0:return e?[4,(i=n,(0,t.sH)(void 0,void 0,Promise,(function(){var e,n,r,o,s,a,u,c;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return e=crypto.subtle,n=i.split(""),r=new Uint8Array(i.length).map((function(t,e){return n[e].charCodeAt(0)})),o=atob("U0hBLTE"),u=(a=Array).from,c=Uint8Array.bind,[4,e.digest(o,r)];case 1:return s=u.apply(a,[new(c.apply(Uint8Array,[void 0,t.sent()]))]).map((function(t){return("00"+t.toString(16)).slice(-2)})).join(""),lt.debug("Input hashed into ".concat(s)),[2,s]}}))})))]:[3,2];case 1:return[2,r.sent()];case 2:return[2,null]}var i}))}))},Lt="dd_has_identified",qt=function(e,n){return(0,t.sH)(void 0,void 0,void 0,(function(){var r,i,o,s;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return r=e.user().anonymousId(),localStorage.getItem(Lt)===r?[2]:e.user().id()?[2]:(i=null===(s=e.user().traits())||void 0===s?void 0:s.email,i&&Nt(i)?[4,Yt(n,i)]:[2]);case 1:return o=t.sent(),lt.debug("Identifying user from stored email due to missing id",{email:i,userId:o}),e.ready((function(){return e.identify(o,{email:i}).catch((function(t){lt.error("Failed to identify user from existing data"),lt.debugError(t)}))})),r&&localStorage.setItem(Lt,r),[2]}}))}))},Kt=function(t){var e=(Array.isArray(t)?t:Array.from(t)).find((function(t){return Nt(t.value)}));return null==e?void 0:e.value};function zt(t){return t.isTrusted}var Rt="0.0.1",Ut=function(e,n,r){return(0,t.sH)(void 0,void 0,void 0,(function(){var i,o,s,a;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return i=r.html,(o=Kt(n.elements))?[4,Yt(r.shouldHash||!1,o)]:(lt.debugError("HTMLPlugin: Unable to find any email in the form."),[2]);case 1:return s=t.sent(),[4,e.identify(s,{email:o})];case 2:return t.sent(),lt.debug("HTMLPlugin: Identifying user",{id:s,email:o,form:n}),a=function(t,e){var n="form-submit";if(e.useCustomAttributeNameAsEventName){return t.getAttribute(e.useCustomAttributeNameAsEventName)||(lt.error("'useCustomAttributeNameAsEventName' is set to '".concat(e.useCustomAttributeNameAsEventName,"' but the form is missing the attribute. Defaulting back to name '").concat(n,"'")),n)}if(e.eventName)return e.eventName;if(e.useFormIdAsEventName){return t.getAttribute("id")||(lt.error("'useFormIdAsEventName' is set to true but the form is missing an 'id' attribute. Defaulting back to name '".concat(n,"'")),n)}if(e.useFormNameAsEventName){return t.getAttribute("name")||(lt.error("'useFormNameAsEventName' is set to true but the form is missing a 'name' attribute. Defaulting back to name '".concat(n,"'")),n)}return n}(n,i),[4,e.track(a,{version:Rt})];case 3:return t.sent(),lt.debug("HTMLPlugin: Tracked form submission",{eventName:a,form:n}),[2]}}))}))},Bt=function(e,n,r){return(0,t.sH)(void 0,void 0,void 0,(function(){var i,o,s,a;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return lt.debug("IframePlugin: Received message from IframeChildPlugin"),i=n.fields,o=n.formName,(s=Kt(i))?[4,Yt(r,s)]:(lt.debug("IframePlugin: No email found in received fields"),[2]);case 1:return a=t.sent(),[4,e.identify(a,{email:s})];case 2:return t.sent(),lt.debug("IframePlugin: Form with the name '".concat(o,"' was submitted")),lt.debug("IframePlugin: Identified user with email '".concat(s,"'")),[4,e.track(o,{version:Rt})];case 3:return t.sent(),[2]}}))}))},Jt=function(e,n){window.addEventListener("hs-form-event:on-submission:success",(function(r){return(0,t.sH)(void 0,void 0,void 0,(function(){var i,o,s,a,u,c,l,d;return(0,t.YH)(this,(function(t){switch(t.label){case 0:if(t.trys.push([0,5,,6]),!window.HubSpotFormsV4)throw new Error("Received a Hubspot V4 event but `HubSpotFormsV4` is not available");return i=window.HubSpotFormsV4.getFormFromEvent(r),(o=i.getFormId())?[4,i.getFormFieldValues()]:(lt.error("HubspotPlugin V4: Form ID not found"),[2]);case 1:return s=t.sent(),(a=s.find((function(t){return Nt(t.value)})))?[4,Yt(n.shouldHash||!1,a.value)]:(lt.error("HubspotPlugin V4: Email not found"),[2]);case 2:return u=t.sent(),[4,e.identify(u,{email:a.value})];case 3:return t.sent(),c=(null===(d=null==n?void 0:n.hubspot)||void 0===d?void 0:d.eventName)||"form-hubspot-submit",lt.debug("HubspotPlugin V4: Identified user with email '".concat(a.value,"'")),[4,e.track(c,{hubspotFormId:o,version:Rt})];case 4:return t.sent(),lt.debug("HubspotPlugin V4: Tracking submit with hubspotFormId '".concat(o,"'")),[3,6];case 5:return l=t.sent(),lt.error("HubspotPlugin V4: Error tracking form submission"),console.error(l),[3,6];case 6:return[2]}}))}))})),window.addEventListener("message",(function(r){var i=r.data,o=i.type,s=i.eventName;zt(r)&&"hsFormCallback"===o&&"onFormSubmit"===s?function(e,n,r){var i=n.data,o=i.id,s=i.data,a=r.hubspot,u=document.getElementById(o);u&&u.hasAttribute("dd-html")||s.forEach((function(n){var i=n.name,s=n.value;return(0,t.sH)(void 0,void 0,Promise,(function(){var n,u;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return"email"!==i?[2]:[4,Yt(r.shouldHash||!1,s)];case 1:return n=t.sent(),[4,e.identify(n,{email:s})];case 2:return t.sent(),lt.debug("HubspotPlugin: Identified user with email '".concat(s,"'")),u=a.eventName||"form-hubspot-submit",[4,e.track(u,{hubspotFormId:o,version:Rt})];case 3:return t.sent(),lt.debug("HubspotPlugin: Tracking submit with hubspotFormId '".concat(o,"'")),[2]}}))}))}))}(e,r,n):lt.debug("HubspotPlugin: Received event that did not match Hubspot conditions",{event:r})}))},Vt=function(e,n,r){return(0,t.sH)(void 0,void 0,Promise,(function(){return(0,t.YH)(this,(function(t){return[2,new Promise((function(t,i){if(e())return t();var o=1,s=setInterval((function(){return e()?(clearInterval(s),t()):o>=r?(clearInterval(s),i(new Error("Condition still not true after multiple retries"))):void(o+=1)}),n)}))]}))}))},Xt={shouldHash:!1,identifyFromEmail:!0};function Wt(e,n){return(0,t.sH)(this,void 0,void 0,(function(){var r;return(0,t.YH)(this,(function(i){switch(i.label){case 0:return(r=(0,t.Cl)((0,t.Cl)({},Xt),n)).identifyFromEmail?[4,qt(e,r.shouldHash||!1)]:[3,2];case 1:i.sent(),i.label=2;case 2:if(r.drift||r.dynamics365Marketing||r.html||r.iframe||r.hubspot||r.sleeknote||lt.error("'form-tracking' is enabled but no forms to identify have been specified. This means there is likely an error in your script setup."),!r.drift)return[3,6];i.label=3;case 3:return i.trys.push([3,5,,6]),[4,Vt((function(){return Boolean(window.drift)}),200,3)];case 4:return i.sent(),function(e,n){if(window.drift){var r="object"==typeof n.drift?n.drift:{};window.drift.on("emailCapture",(function(n){return(0,t.sH)(void 0,void 0,void 0,(function(){var i;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return n.data&&n.data.email?(lt.debug("Received Drift email capture event"),[4,e.identify(null,{email:n.data.email})]):[3,3];case 1:return t.sent(),i=r.eventName||"Drift chat",[4,e.track(i,{source:"drift"})];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))}))}}(e,r),lt.debug("Drift form-tracking enabled"),[3,6];case 5:return i.sent(),lt.error("Failed to enable Drift. This indicates that Drift is either missing or have not been initialized in time."),[3,6];case 6:if(!r.dynamics365Marketing)return[3,10];i.label=7;case 7:return i.trys.push([7,9,,10]),[4,Vt((function(){return Boolean(window.MsCrmMkt)}),200,3)];case 8:return i.sent(),function(e,n){if(window.MsCrmMkt){var r="object"==typeof n.dynamics365Marketing&&n.dynamics365Marketing.formIdToNameMappings||{};window.MsCrmMkt.MsCrmFormLoader.on("afterFormSubmit",(function(i){return(0,t.sH)(void 0,void 0,void 0,(function(){var o,s,a,u,c;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return(o=i.formPlaceholder.querySelector("form input[type=email]"))?(s=o.value,a=i.getFormPageId(),u=r[a]||"form-submitted",[4,Yt(n.shouldHash||!1,s)]):(lt.debugError("Dynamics365MarketingPlugin: Unable to find form placeholder"),[2]);case 1:return c=t.sent(),[4,e.identify(c,{email:s})];case 2:return t.sent(),lt.debug("Dynamics365MarketingPlugin: Identifying user"),[4,e.track(u,{version:Rt})];case 3:return t.sent(),lt.debug("Dynamics365MarketingPlugin: Tracked form submission"),[2]}}))}))}))}else lt.error("You have enabled Dynamics 365 Marketing but window.MsCrmMkt is not defined. This likely indicates that Dynamics 365 Marketing have not been installed properly on your site.")}(e,r),lt.debug("Dynamics 365 Marketing form-tracking enabled"),[3,10];case 9:return i.sent(),lt.error("Failed to enable Dynamics 365 Marketing. This indicates that Dynamics 365 Marketing is either missing or have not been initialized in time."),[3,10];case 10:if(r.html&&(!function(e,n){var r=document.querySelectorAll("form");0===r.length&<.debug("HTMLPlugin: No forms found to attach to"),r.forEach((function(r){n.hubspot&&r.classList.contains("hs-form")?lt.debug("HTMLPlugin: Skipping form '".concat(r.id,"' as it is handled by Hubspot plugin")):(lt.debug("HTMLPlugin: Attaching to form with id '".concat(r.id,"'"),{form:r}),r.setAttribute("dd-html","true"),r.addEventListener("submit",(function(){return(0,t.sH)(void 0,void 0,void 0,(function(){return(0,t.YH)(this,(function(t){switch(t.label){case 0:return[4,Ut(e,r,n)];case 1:return t.sent(),[2]}}))}))})))}))}(e,r),lt.debug("HTML form-tracking enabled")),r.iframe&&(!function(e,n){window.addEventListener("message",(function(r){return(0,t.sH)(void 0,void 0,void 0,(function(){var i,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return i=r.data,zt(r)&&i&&"dreamdata-message"===i.type?(o=n.shouldHash,[4,Bt(e,i,o||!1)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))}(e,r),lt.debug("Iframe form-tracking enabled")),r.hubspot&&(Jt(e,r),lt.debug("Hubspot form-tracking enabled")),r.sleeknote&&(!function(e,n){var r="object"==typeof n.sleeknote?n.sleeknote:{};document.addEventListener("sleekNote",(function(n){return(0,t.sH)(void 0,void 0,void 0,(function(){var i,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return"submit"!=(i=n).data.type?[3,3]:(lt.debug("Received Sleeknote submit event"),[4,e.identify(null,{email:i.data.email})]);case 1:return t.sent(),o=r.eventName||"Sleeknote popup",[4,e.track(o,{source:"sleeknote"})];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))}),!1)}(e,r),lt.debug("Sleeknote form-tracking enabled")),!r.qualified)return[3,14];i.label=11;case 11:return i.trys.push([11,13,,14]),[4,Vt((function(){return Boolean(window.qualified)}),200,3)];case 12:return i.sent(),function(e){window.qualified&&"function"==typeof window.qualified&&window.qualified("handleEvents",(function(n,r){var i;return(0,t.sH)(this,void 0,void 0,(function(){var o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return(o=null===(i=null==r?void 0:r.field_values)||void 0===i?void 0:i.email)?[4,e.identify(null,{email:o})]:[2];case 1:return t.sent(),[4,e.track(n)];case 2:return t.sent(),[2]}}))}))}))}(e),lt.debug("Qualified chat conversation tracking enabled"),[3,14];case 13:return i.sent(),lt.error("Failed to enable Qualified. This indicates that Qualified is either missing or have not been initialized in time."),[3,14];case 14:return[2]}}))}))}var Qt=s(6238),Gt=s(1418),$t=s(2822),Zt=function(){function e(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return e.prototype.addMiddleware=function(){for(var t,e=[],n=0;n=64&&i++,r[i]?r[i].push(t):r[i]=[t]})),r).map(f);Promise.all(e).catch(console.error)}var n,r,i},a=!1,window.addEventListener("pagehide",(function(){a||s(a=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0}else a=!1;s(a)})),{dispatch:function(e,n){return(0,t.sH)(this,void 0,Promise,(function(){var e;return(0,t.YH)(this,(function(t){return u.push(n),e=u.length>=l||function(t){return ie(t)>=450}(u),[2,e||c?p():void(o||(o=setTimeout((function(){o=void 0,p().catch(console.error)}),d)))]}))}))}}}var se=s(7106);function ae(e,n){return(0,t.sH)(this,void 0,Promise,(function(){var r,i=this;return(0,t.YH)(this,(function(o){switch(o.label){case 0:return r=[],(0,l.a)()?[2,n]:[4,(0,se._)((function(){return n.length>0&&!(0,l.a)()}),(function(){return(0,t.sH)(i,void 0,void 0,(function(){var i,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return(i=n.pop())?[4,(0,O.C)(i,e)]:[2];case 1:return o=t.sent(),o instanceof d.o||r.push(i),[2]}}))}))}))];case 1:return o.sent(),r.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}function ue(e,n,r,i){var o=this;e||setTimeout((function(){return(0,t.sH)(o,void 0,void 0,(function(){var e,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return e=!0,[4,ae(r,n)];case 1:return o=t.sent(),e=!1,n.todo>0&&i(e,o,r,i),[2]}}))}))}),5e3*Math.random())}var ce=s(3858);function le(e,n,r){var i,o,s;window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(d)),d.clear()}));var a,u=null!==(i=null==n?void 0:n.apiKey)&&void 0!==i?i:"",c=e.options.disableClientPersistence?new j.M(e.queue.queue.maxAttempts,[]):new A.x(e.queue.queue.maxAttempts,"".concat(u,":dest-Segment.io")),d=new Set,f=!1,p=null!==(o=null==n?void 0:n.apiHost)&&void 0!==o?o:ce.a,h=null!==(s=null==n?void 0:n.protocol)&&void 0!==s?s:"https",v="".concat(h,"://").concat(p),y=null==n?void 0:n.deliveryStrategy,m="batching"===(null==y?void 0:y.strategy)?oe(p,y.config):(a=null==y?void 0:y.config,{dispatch:function(t,e){return(0,re.h)(t,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}});function g(i){return(0,t.sH)(this,void 0,Promise,(function(){var o,s,a;return(0,t.YH)(this,(function(u){switch(u.label){case 0:return(0,l.a)()?(c.push(i),ue(f,c,b,ue),[2,i]):(d.add(i),o=i.event.type.charAt(0),s=(0,ne.W)(i.event).json(),"track"===i.event.type&&delete s.traits,"alias"===i.event.type&&(s=function(t,e){var n,r,i,o,s=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(e,s)),a=function(){var t=null==n?void 0:n.apiKey;if(void 0===t)return[];if(Array.isArray(t))return t;if("function"==typeof t){var e=t();return Array.isArray(e)?e:[e]}return[t]}().filter((function(t){return"string"==typeof t})),[4,Promise.all(a.map((function(a){return m.dispatch("".concat(v,"/").concat(o),function(e,n,r,i){var o,s,a=e.user();delete n.options,n.writeKey||(n.writeKey=null==r?void 0:r.apiKey),n.userId=n.userId||a.id(),n.anonymousId=n.anonymousId||a.anonymousId(),e.options.anonymous&&(delete n.userId,delete n.anonymousId),n.sentAt=new Date;var u=e.queue.failedInitializations||[];u.length>0&&(n._metadata={failedInitializations:u});var c=[],l=[];for(var d in i){var f=i[d];"Segment.io"===d&&c.push(d),"bundled"===f.bundlingStatus&&c.push(d),"unbundled"===f.bundlingStatus&&l.push(d)}for(var p=0,h=(null==r?void 0:r.unbundledIntegrations)||[];p0}(n)?[4,Promise.all([s.e(219),s.e(10)]).then(s.bind(s,31)).then((function(t){return t.tsubMiddleware(n.middlewareSettings.routingRules)}))]:[3,2];case 1:return y=H.sent(),[3,3];case 2:y=void 0,H.label=3;case 3:return v=y,A=n,"test"!==r().NODE_ENV&&Object.keys(A.integrations).length>1||c.length>0?[4,s.e(50).then(s.bind(s,3771)).then((function(t){return t.ajsDestinations(e,n,i.integrations,o,v,c)}))]:[3,5];case 4:return g=H.sent(),[3,6];case 5:g=[],H.label=6;case 6:return m=g,n.legacyVideoPluginsEnabled?[4,s.e(694).then(s.bind(s,8162)).then((function(t){return t.loadLegacyVideoPlugins(i)}))]:[3,8];case 7:H.sent(),H.label=8;case 8:return(null===(l=o.plan)||void 0===l?void 0:l.track)?[4,s.e(104).then(s.bind(s,3542)).then((function(t){var e;return t.schemaFilter(null===(e=o.plan)||void 0===e?void 0:e.track,n)}))]:[3,10];case 9:return w=H.sent(),[3,11];case 10:w=void 0,H.label=11;case 11:return b=w,_=(0,bt.J)(n,a),[4,ee(n,i.integrations,_,a.obfuscate,v,h).catch((function(){return[]}))];case 12:return k=H.sent(),S=(0,t.fX)((0,t.fX)((0,t.fX)([ke,xt],p,!0),m,!0),k,!0),b&&S.push(b),a.anonymous&&S.push({name:"Anonymous Context",type:"enrichment",version:"0.0.1",isLoaded:function(){return!0},load:function(){return lt.debug("Enabling Anonymous Context plugin"),Promise.resolve()},track:Tt,identify:Tt,page:Tt,group:Tt,alias:Tt,screen:Tt}),a.anonymizeIPs&&S.push({name:"Anonymize IPs",type:"enrichment",version:"0.0.1",isLoaded:function(){return!0},load:function(){return lt.debug("Enabling AnonymizeIPs plugin"),Promise.resolve()},track:Dt,identify:Dt,page:Dt,group:Dt,alias:Dt,screen:Dt}),a.formTracking&&S.push(function(e){return{name:"FormTracking",type:"utility",version:Rt,isLoaded:function(){return!0},load:function(n,r){return(0,t.sH)(void 0,void 0,void 0,(function(){return(0,t.YH)(this,(function(t){switch(t.label){case 0:return[4,Wt(r,e)];case 1:return t.sent(),[2,n]}}))}))}}}(a.formTracking)),!1===(null===(d=o.integrations)||void 0===d?void 0:d.All)&&!o.integrations["Segment.io"]||o.integrations&&!1===o.integrations["Segment.io"]?[3,14]:(C=(x=S).push,[4,le(i,_["Segment.io"],n.integrations)]);case 13:C.apply(x,[H.sent()]),H.label=14;case 14:return[4,i.register.apply(i,S)];case 15:return I=H.sent(),a.intentSources?[4,i.register(Ft(a))]:[3,17];case 16:H.sent(),H.label=17;case 17:return Object.entries(null!==(f=n.enabledMiddleware)&&void 0!==f?f:{}).some((function(t){return t[1]}))?[4,s.e(521).then(s.bind(s,9231)).then((function(e){var r=e.remoteMiddlewares;return(0,t.sH)(P,void 0,void 0,(function(){var e,o;return(0,t.YH)(this,(function(t){switch(t.label){case 0:return[4,r(I,n,a.obfuscate)];case 1:return e=t.sent(),o=e.map((function(t){return i.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,19];case 18:H.sent(),H.label=19;case 19:return[2,I]}var A}))}))}function Pe(n,r,i){var o,s,a,u,c,l,f;return void 0===r&&(r={}),(0,t.sH)(this,void 0,Promise,(function(){var p,h,v,y,m,g,b,w,_,k,S;return(0,t.YH)(this,(function(x){switch(x.label){case 0:return!0===r.disable?[2,[new gt,d.o.system()]]:(r.anonymous&&(r.formTracking&&(lt.error("Cannot enable form tracking when using cookieless"),r.formTracking=void 0),r.intentSources&&(lt.error("Cannot enable intent sources when using cookieless"),r.intentSources=void 0)),r.globalAnalyticsKey&&(0,$.rY)(r.globalAnalyticsKey),n.cdnURL&&(0,e.qQ)(n.cdnURL),r.initialPageview&&i.push(new ot("page",[])),null===(o=n.cdnSettings)||void 0===o?[3,1]:(h=o,[3,3]));case 1:return[4,(C=n.writeKey,n.cdnURL,I=r.apiHost,Promise.resolve({integrations:{"Segment.io":{apiKey:C,apiHost:I?"".concat(I,"/api/v1"):void 0}}}))];case 2:h=x.sent(),x.label=3;case 3:return p=h,r.updateCDNSettings&&(p=r.updateCDNSettings(p)),"function"!=typeof r.disable?[3,5]:[4,r.disable(p)];case 4:if(x.sent())return[2,[new gt,d.o.system()]];x.label=5;case 5:return v=null===(a=null===(s=p.integrations["Segment.io"])||void 0===s?void 0:s.retryQueue)||void 0===a||a,y=(0,t.Cl)({retryQueue:v,cookie:(0,t.Cl)({secure:!0},r.cookie)},r),r.existingCookies||(y.group=(0,t.Cl)((0,t.Cl)({},y.group),{ddCookies:!0}),y.user=(0,t.Cl)((0,t.Cl)({},y.user),{ddCookies:!0})),function(t){var e;null===(e=Se.attach)||void 0===e||e.call(Se,t)}(m=new mt(n,y)),g=null!==(u=n.plugins)&&void 0!==u?u:[],b=null!==(c=n.classicIntegrations)&&void 0!==c?c:[],xe.U.initRemoteMetrics(p.metrics),function(t,e){nt(t,e),et(t,e)}(m,i),[4,Ie(n.writeKey,p,m,y,r,g,b)];case 6:return w=x.sent(),_=null!==(l=window.location.search)&&void 0!==l?l:"",k=null!==(f=window.location.hash)&&void 0!==f?f:"",(S=_.length?_:k.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")||S.includes("dd_")?[4,m.queryString(S).catch(console.error)]:[3,8];case 7:x.sent(),x.label=8;case 8:return m.initialized=!0,m.emit("initialize",n,r),[4,Ce(m,i)];case 9:return x.sent(),[2,[m,w]]}var C,I}))}))}var He=function(e){function n(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(t){return s.then((function(e){return Pe(e[0],e[1],t)}))}))||this,i._resolveLoadStart=function(t,e){return a([t,e])},i}return(0,t.C6)(n,e),n.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},n.load=function(t,e){return void 0===e&&(e={}),(new n).load(t,e)},n.standalone=function(t,e){return n.load({writeKey:t},e).then((function(t){return t[0]}))},n}(ut);try{window.analyticsWriteKey="__WRITE_KEY__"}catch(t){}function Ae(){if(void 0!==window.analyticsWriteKey)return window.analyticsWriteKey!==["__","WRITE","_","KEY","__"].join("")?window.analyticsWriteKey:void 0}function je(){var t;if(Ae())return Ae();var e=(0,$.kJ)();if(null==e?void 0:e._writeKey)return e._writeKey;for(var n=/http.*\/analytics\.js\/v1\/([^/]*)(\/platform)?\/analytics.*/,r=void 0,i=0,o=Array.prototype.slice.call(document.querySelectorAll("script"));i=parseInt(Re)){var Be=document.createElement("script");Be.setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.7.0/polyfill.min.js"),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){return document.body.appendChild(Be)})):document.body.appendChild(Be),Be.onload=function(){Ne(Me)}}else Ne(Me)}(),window.AnalyticsNext={}}();