!function(){var t,e,n,r,i={8878: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(325));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")}},4780: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}),e.Alias=void 0;var i=r(n(1285)),o=n(9512);function u(t,e){o.Facade.call(this,t,e)}e.Alias=u,i.default(u,o.Facade),u.prototype.action=function(){return"alias"},u.prototype.type=u.prototype.action,u.prototype.previousId=function(){return this.field("previousId")||this.field("from")},u.prototype.from=u.prototype.previousId,u.prototype.userId=function(){return this.field("userId")||this.field("to")},u.prototype.to=u.prototype.userId},4814: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}},5257: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}),e.Delete=void 0;var i=r(n(1285)),o=n(9512);function u(t,e){o.Facade.call(this,t,e)}e.Delete=u,i.default(u,o.Facade),u.prototype.type=function(){return"delete"}},9512: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}),e.Facade=void 0;var i=r(n(8878)),o=n(4814),u=r(n(2272)),s=r(n(5870)),a=r(n(325)),c=r(n(6279));function l(t,e){e=e||{},this.raw=o.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=o.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?s.default(t.timestamp):new Date,e.traverse&&c.default(t),this.opts=e,this.obj=t}e.Facade=l;var f=l.prototype;function p(t){return o.clone(t)}f.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?p(n):n):n},f.field=function(t){var e=this.obj[t];return this.opts.clone?p(e):e},l.proxy=function(t){return function(){return this.proxy(t)}},l.field=function(t){return function(){return this.field(t)}},l.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?o.clone(n):n]),n||[]}},l.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},f.json=function(){var t=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},f.rawEvent=function(){return this.raw},f.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||a.default(r,t);return"object"!=typeof i&&(i=a.default(this.options(),t)),"object"==typeof i?i:{}}},f.context=f.options,f.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&u.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},f.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},f.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},f.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},f.sessionId=f.anonymousId,f.groupId=l.proxy("options.groupId"),f.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},f.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},f.device=function(){var t=this.proxy("context.device");"object"==typeof t&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},f.userAgent=l.proxy("context.userAgent"),f.timezone=l.proxy("context.timezone"),f.timestamp=l.field("timestamp"),f.channel=l.field("channel"),f.ip=l.proxy("context.ip"),f.userId=l.field("userId"),i.default(f)},615: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}),e.Group=void 0;var i=r(n(1285)),o=r(n(4554)),u=r(n(5870)),s=n(9512);function a(t,e){s.Facade.call(this,t,e)}e.Group=a,i.default(a,s.Facade);var c=a.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=s.Facade.field("groupId"),c.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return u.default(t)},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return o.default(e)?e:void 0},c.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},c.name=s.Facade.proxy("traits.name"),c.industry=s.Facade.proxy("traits.industry"),c.employees=s.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},4705: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}),e.Identify=void 0;var i=n(9512),o=r(n(325)),u=r(n(1285)),s=r(n(4554)),a=r(n(5870)),c=function(t){return t.trim()};function l(t,e){i.Facade.call(this,t,e)}e.Identify=l,u.default(l,i.Facade);var f=l.prototype;f.action=function(){return"identify"},f.type=f.action,f.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},f.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},f.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},f.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},f.companyName=function(){return this.proxy("traits.company.name")},f.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return c(t);var e=this.firstName(),n=this.lastName();return e&&n?c(e+" "+n):void 0},f.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");return"string"==typeof e?c(e).split(" ")[0]:void 0},f.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=c(e).indexOf(" ");if(-1!==n)return c(e.substr(n+1))}},f.uid=function(){return this.userId()||this.username()||this.email()},f.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},f.age=function(){var t=this.birthday(),e=o.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},f.avatar=function(){var t=this.traits();return o.default(t,"avatar")||o.default(t,"photoUrl")||o.default(t,"avatarUrl")},f.position=function(){var t=this.traits();return o.default(t,"position")||o.default(t,"jobTitle")},f.username=i.Facade.proxy("traits.username"),f.website=i.Facade.one("traits.website"),f.websites=i.Facade.multi("traits.website"),f.phone=i.Facade.one("traits.phone"),f.phones=i.Facade.multi("traits.phone"),f.address=i.Facade.proxy("traits.address"),f.gender=i.Facade.proxy("traits.gender"),f.birthday=i.Facade.proxy("traits.birthday")},4122:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>>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,u,s,a,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 u=(u=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(u[2],16),a=parseInt(u[1],16)||0,o[14]=s,o[15]=a,n(l,o),l}function u(t){var e,r,o,u,s,a,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 u=(u=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(u[2],16),a=parseInt(u[1],16)||0,o[14]=s,o[15]=a,n(l,o),l}function s(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 a(t){var e;for(e=0;el?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),u=new Uint8Array(o),s=new Uint8Array(this,c,i),u.set(s),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=a(this._hash),t&&(n=d(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,u=e;if(t[u>>2]|=128<<(u%4<<3),u>55)for(n(this._hash,t),u=0;u<16;u+=1)t[u]=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=a(o(t));return e?d(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=p(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=a(this._hash),t&&(n=d(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=f(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=a(u(new Uint8Array(t)));return e?d(n):n},h}()},94:function(t,e,n){"use strict";n.d(e,{G:function(){return i},s:function(){return o}});var r=n(204);function i(){return!(0,r.j)()||window.navigator.onLine}function o(){return!i()}},4328:function(t,e,n){"use strict";n.d(e,{U:function(){return r}});var r="api.segment.io/v1"},8404:function(t,e,n){"use strict";n.d(e,{_:function(){return u}});var r=n(5163),i=n(1494),o=n(6218),u=function(t){function e(e,n){return t.call(this,e,n,new o.j)||this}return(0,r.ZT)(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(i._)},204:function(t,e,n){"use strict";function r(){return"undefined"!=typeof window}function i(){return!r()}n.d(e,{j:function(){return r},s:function(){return i}})},6863:function(t,e,n){"use strict";function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}}n.d(e,{a:function(){return r}})},6218:function(t,e,n){"use strict";n.d(e,{j:function(){return s}});var r,i=n(5163),o=n(417),u=n(449),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e.initRemoteMetrics=function(t){r=new u.B(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.s)},449:function(t,e,n){"use strict";n.d(e,{B:function(){return c}});var r=n(5163),i=n(4759),o=n(4278),u=n(719),s=n(4328);function a(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:s.U,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 u=!1,c=function(){u||(u=!0,o.flush().catch(a),u=!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.pi)((0,r.pi)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(o.i):"npm:next-".concat(o.i)})}}(t,e,(0,u.Bz)());this.queue.push(n),t.includes("error")&&this.flush().catch(a)}},t.prototype.flush=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t=this;return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){a(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t,e,n;return(0,r.Jh)(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}()},8166:function(t,e,n){"use strict";n.d(e,{Nt:function(){return d},ZA:function(){return m},n5:function(){return v},sV:function(){return h}});var r=n(5163),i=n(7831),o=n(1805),u=n(1268),s=n(8232),a={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},c=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},Object.defineProperty(t.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),t}(),l=function(t){function e(n){void 0===n&&(n=e.defaults);var i=t.call(this)||this;return i.options=(0,r.pi)((0,r.pi)({},e.defaults),n),i}return(0,r.ZT)(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(o.Z.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),o.Z.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:(0,u.P)(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=o.Z.get(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(t){return null}},e.prototype.set=function(t,e){"string"==typeof e?o.Z.set(t,e,this.opts()):null===e?o.Z.remove(t,this.opts()):o.Z.set(t,JSON.stringify(e),this.opts())},e.prototype.remove=function(t){return o.Z.remove(t,this.opts())},Object.defineProperty(e.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),e}(c),f=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}},e.prototype.get=function(t){try{var e=localStorage.getItem(t);if(null===e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(e){return f(t,"unavailable"),null}},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){f(t,"full")}},e.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){f(t,"unavailable")}},Object.defineProperty(e.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),e}(c),d=function(){function t(t,e){this.storageOptions=e,this.enabledStores=t}return t.prototype.getStores=function(t){var e=this,n=[];return this.enabledStores.filter((function(e){return!t||(null==t?void 0:t.includes(e))})).forEach((function(t){var r=e.storageOptions[t];void 0!==r&&n.push(r)})),n},t.prototype.getAndSync=function(t,e){var n=this.get(t,e),r="number"==typeof n?n.toString():n;return this.set(t,r,e),r},t.prototype.get=function(t,e){for(var n=null,r=0,i=this.getStores(e);r0)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),i=0;it}(o);if(u)return s.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void s.removeItem(r);!u&&n<3?setTimeout((function(){f(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var p=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),u="persisted-queue:v1:".concat(n,":seen"),p=[],d={};return f(n,(function(){try{p=a(o),d=c(u),l(o),l(u),i.queue=(0,r.ev)((0,r.ev)([],p,!0),i.queue,!0),i.seen=(0,r.pi)((0,r.pi)({},d),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.ev)((0,r.ev)([],i.queue,!0),i.future,!0);try{f(n,(function(){!function(t,e){var n=a(t),i=(0,r.ev)((0,r.ev)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.pi)((0,r.pi)({},t),((n={})[e.id]=e,n))}),{});s.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);s.setItem(t,JSON.stringify((0,r.pi)((0,r.pi)({},n),e)))}(u,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.ZT)(e,t),e}(i.Z)},9950:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(4122);function i(t,e){var n=new r.Facade(t,e);return"track"===t.type&&(n=new r.Track(t,e)),"identify"===t.type&&(n=new r.Identify(t,e)),"page"===t.type&&(n=new r.Page(t,e)),"alias"===t.type&&(n=new r.Alias(t,e)),"group"===t.type&&(n=new r.Group(t,e)),"screen"===t.type&&(n=new r.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}},6338:function(t,e,n){"use strict";n.r(e),n.d(e,{applyDestinationMiddleware:function(){return u},sourceMiddlewarePlugin:function(){return s}});var r=n(5163),i=n(1494),o=n(9950);function u(t,e,n){return(0,r.mG)(this,void 0,Promise,(function(){function i(e,n){return(0,r.mG)(this,void 0,Promise,(function(){var i,u,s;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return i=!1,u=null,[4,n({payload:(0,o.D)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(u=null),t&&(u=t.obj)}})];case 1:return a.sent(),i||null===u||(u.integrations=(0,r.pi)((0,r.pi)({},e.integrations),((s={})[t]=!1,s))),[2,u]}}))}))}var u,s,a,c,l;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:u=(0,o.D)(e,{clone:!0,traverse:!1}).rawEvent(),s=0,a=n,t.label=1;case 1:return s4){var s=r.substr(4);"campaign"===s&&(s="name"),t[s]=(0,u.a)(o)}return t}),{})}(m)),d(m,y,null!==(f=t.options.disableClientPersistence)&&void 0!==f&&f),e.userId=e.userId||v.id(),e.anonymousId=e.anonymousId||v.anonymousId(),e.sentAt=new Date;var w=t.queue.failedInitializations||[];w.length>0&&(e._metadata={failedInitializations:w});var _=[],x=[];for(var S in r){var P=r[S];"Segment.io"===S&&_.push(S),"bundled"===P.bundlingStatus&&_.push(S),"unbundled"===P.bundlingStatus&&x.push(S)}for(var j=0,I=(null==n?void 0:n.unbundledIntegrations)||[];j0&&i[i.length-1])||6!==s[0]&&2!==s[0])){u=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]1){var t=this._logs.reduce((function(t,e){var n,r,i,u=(0,o.pi)((0,o.pi)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete u.time;var s=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[s]&&(s="".concat(s,"-").concat(Math.random())),(0,o.pi)((0,o.pi)({},t),((n={})[s]=u,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}(),s=n(417),a=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 s.i),void 0===i&&(i=new u),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 a({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.N)(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}()},7127:function(t,e,n){"use strict";n.d(e,{Q:function(){return r}});var r=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;ot.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,u=t.attempt,s=t.maxTimeout,a=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,u),a)}({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.Q)},6096:function(t,e,n){"use strict";n.d(e,{a:function(){return o},z:function(){return u}});var r=n(5163),i=n(1494);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.mG)(this,void 0,void 0,(function(){var e;return(0,r.Jh)(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.Y&&"middleware_cancellation"===n.type)throw n;return n instanceof i.Y?(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 u(t,e){return o(t,e).then((function(e){if(e instanceof i._)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}},417:function(t,e,n){"use strict";n.d(e,{i:function(){return o},s:function(){return i}});var r=n(5163),i=function(){function t(){this.metrics=[]}return t.prototype.increment=function(t,e,n){void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return(0,r.pi)((0,r.pi)({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(e,t),e.prototype.gauge=function(){for(var t=[],e=0;e256){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}},380:function(t,e,n){"use strict";function r(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,u=e.length,s=t;o1&&this.emit("delivery_retry",e),i=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),o=i.before,u=i.enrichment,s=0,a=o,t.label=1;case 1:return s=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(c).map(d);Promise.all(t).catch(console.error)}},a=!1,window.addEventListener("pagehide",(function(){a||(a=!0,s())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,s()}else a=!1})),{dispatch:function(e,n){return(0,t.mG)(this,void 0,Promise,(function(){var e;return(0,t.Jh)(this,(function(t){return c.push(n),e=c.length>=f||function(t){return H(t)>=450}(c),[2,e||l?h():void(u||(u=setTimeout((function(){u=void 0,h().catch(console.error)}),p)))]}))}))}}}var Y=u(8044);function Q(e,n){return(0,t.mG)(this,void 0,Promise,(function(){var r,i=this;return(0,t.Jh)(this,(function(o){switch(o.label){case 0:return r=[],(0,p.s)()?[2,n]:[4,(0,Y.x)((function(){return n.length>0&&!(0,p.s)()}),(function(){return(0,t.mG)(i,void 0,void 0,(function(){var i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return(i=n.pop())?[4,(0,j.a)(i,e)]:[2];case 1:return o=t.sent(),o instanceof d._||r.push(i),[2]}}))}))}))];case 1:return o.sent(),r.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}function $(e,n,r,i){var o=this;e||setTimeout((function(){return(0,t.mG)(o,void 0,void 0,(function(){var e,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return e=!0,[4,Q(r,n)];case 1:return o=t.sent(),e=!1,n.todo>0&&i(e,o,r,i),[2]}}))}))}),5e3*Math.random())}var X=u(4328);function tt(e){return(0,t.mG)(this,void 0,Promise,(function(){var n;return(0,t.Jh)(this,(function(t){return(n=navigator.userAgentData)?e?[2,n.getHighEntropyValues(e).catch((function(){return n.toJSON()}))]:[2,n.toJSON()]:[2,void 0]}))}))}function et(e,r,o){var u,s,a;return(0,t.mG)(this,void 0,Promise,(function(){function c(i){return(0,t.mG)(this,void 0,Promise,(function(){var u,s;return(0,t.Jh)(this,(function(t){return(0,p.s)()?(f.push(i),$(h,f,_,$),[2,i]):(d.add(i),u=i.event.type.charAt(0),w&&i.event.context&&(i.event.context.userAgentData=w),s=(0,V.D)(i.event).json(),"track"===i.event.type&&delete s.traits,"alias"===i.event.type&&(s=function(t,e){var n,r,i,o,u=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:u.id())&&void 0!==i?i:u.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(e,s)),[2,b.dispatch("".concat(m,"/").concat(u),(0,n.Fv)(e,s,r,o)).then((function(){return i})).catch((function(){return f.pushWithBackoff(i),$(h,f,_,$),i})).finally((function(){d.delete(i)}))])}))}))}var l,f,d,h,v,y,m,g,b,w,_;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:window.addEventListener("pagehide",(function(){f.push.apply(f,Array.from(d)),d.clear()})),l=null!==(u=null==r?void 0:r.apiKey)&&void 0!==u?u:"",f=e.options.disableClientPersistence?new S.Z(e.queue.queue.maxAttempts,[]):new x.$(e.queue.queue.maxAttempts,"".concat(l,":dest-Segment.io")),d=new Set,h=!1,v=null!==(s=null==r?void 0:r.apiHost)&&void 0!==s?s:X.U,y=null!==(a=null==r?void 0:r.protocol)&&void 0!==a?a:"https",m="".concat(y,"://").concat(v),g=null==r?void 0:r.deliveryStrategy,b="batching"===(null==g?void 0:g.strategy)?W(v,g.config):(n=null==g?void 0:g.config,{dispatch:function(t,e){return(0,i.h)(t,{keepalive:null==n?void 0:n.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}}),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,tt(e.options.highEntropyValuesClientHints)];case 2:return w=t.sent(),[3,4];case 3:return t.sent(),w=void 0,[3,4];case 4:return _={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:c,identify:c,page:c,alias:c,group:c},f.todo&&$(h,f,_,$),[2,_]}var n}))}))}var nt=function(e){function n(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,t.ZT)(n,e),n}(Error),rt="is not a string",it="is not an object",ot="is nil";function ut(t){var e=".userId/anonymousId/previousId/groupId",n=function(t){var e,n,r;return null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId}(t);if(!(0,o.Gg)(n))throw new nt(e,ot);if(!(0,o.HD)(n))throw new nt(e,rt)}function st(t){if(!(0,o.Gg)(t))throw new nt("Event",ot);if("object"!=typeof t)throw new nt("Event",it)}function at(t){if(!(0,o.HD)(t.type))throw new nt(".type",rt)}function ct(t){if(!(0,o.HD)(t.event))throw new nt(".event",rt)}function lt(t){var e,n=t.event;st(n),at(n),"track"===n.type&&ct(n);var r=null!==(e=n.properties)&&void 0!==e?e:n.traits;if("alias"!==n.type&&!(0,o.PO)(r))throw new nt(".properties","is not an object");return ut(n),t}var ft={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:lt,identify:lt,page:lt,alias:lt,group:lt,screen:lt},pt=function(t,e,n){n.getCalls(t).forEach((function(t){mt(e,t).catch(console.error)}))},dt=function(e,n){return(0,t.mG)(void 0,void 0,void 0,(function(){var r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:r=0,i=n.getCalls("addSourceMiddleware"),t.label=1;case 1:return r0}(n)?[4,Promise.all([u.e(870),u.e(604)]).then(u.bind(u,669)).then((function(t){return t.tsubMiddleware(n.middlewareSettings.routingRules)}))]:[3,2];case 1:return h=I.sent(),[3,3];case 2:h=void 0,I.label=3;case 3:return d=h,O=n,"test"!==r().NODE_ENV&&Object.keys(O.integrations).length>1||c.length>0?[4,u.e(464).then(u.bind(u,3162)).then((function(t){return t.ajsDestinations(e,n,i.integrations,o,d,c)}))]:[3,5];case 4:return y=I.sent(),[3,6];case 5:y=[],I.label=6;case 6:return v=y,n.legacyVideoPluginsEnabled?[4,u.e(150).then(u.bind(u,9141)).then((function(t){return t.loadLegacyVideoPlugins(i)}))]:[3,8];case 7:I.sent(),I.label=8;case 8:return(null===(l=o.plan)||void 0===l?void 0:l.track)?[4,u.e(493).then(u.bind(u,5081)).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 g=I.sent(),[3,11];case 10:g=void 0,I.label=11;case 11:return m=g,b=(0,G.o)(n,s),[4,Z(n,i.integrations,b,s.obfuscate,d).catch((function(){return[]}))];case 12:return w=I.sent(),_=(0,t.ev)((0,t.ev)((0,t.ev)([ft,U],a,!0),v,!0),w,!0),m&&_.push(m),!1===(null===(f=o.integrations)||void 0===f?void 0:f.All)&&!o.integrations["Segment.io"]||o.integrations&&!1===o.integrations["Segment.io"]?[3,14]:(S=(x=_).push,[4,et(i,b["Segment.io"],n.integrations)]);case 13:S.apply(x,[I.sent()]),I.label=14;case 14:return[4,i.register.apply(i,_)];case 15:return P=I.sent(),Object.entries(null!==(p=n.enabledMiddleware)&&void 0!==p?p:{}).some((function(t){return t[1]}))?[4,u.e(214).then(u.bind(u,9568)).then((function(e){var r=e.remoteMiddlewares;return(0,t.mG)(j,void 0,void 0,(function(){var e,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,r(P,n,s.obfuscate)];case 1:return e=t.sent(),o=e.map((function(t){return i.addSourceMiddleware(t)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:I.sent(),I.label=17;case 17:return[2,P]}var O}))}))}function Ot(n,r,o){var u,s,a,c,l,f,p;return void 0===r&&(r={}),(0,t.mG)(this,void 0,Promise,(function(){var d,h,v,y,m,g,b,w,_,x,S;return(0,t.Jh)(this,(function(P){switch(P.label){case 0:return n.cdnURL&&(0,e.UH)(n.cdnURL),null===(u=n.cdnSettings)||void 0===u?[3,1]:(h=u,[3,3]);case 1:return[4,(j=n.writeKey,I=n.cdnURL,O=null!=I?I:(0,e.Vl)(),(0,i.h)("".concat(O,"/v1/projects/").concat(j,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:h=P.sent(),P.label=3;case 3:return d=h,r.updateCDNSettings&&(d=r.updateCDNSettings(d)),v=null===(a=null===(s=d.integrations["Segment.io"])||void 0===s?void 0:s.retryQueue)||void 0===a||a,y=(0,t.pi)({retryQueue:v},r),function(t){var e;null===(e=St.attach)||void 0===e||e.call(St,t)}(m=new C(n,y)),g=null!==(c=n.plugins)&&void 0!==c?c:[],b=null!==(l=n.classicIntegrations)&&void 0!==l?l:[],Pt.j.initRemoteMetrics(d.metrics),function(t,e){e.push.apply(e,xt()),vt(t,e),ht(t,e)}(m,o),[4,It(n.writeKey,d,m,y,r,g,b)];case 4:return w=P.sent(),_=null!==(f=window.location.search)&&void 0!==f?f:"",x=null!==(p=window.location.hash)&&void 0!==p?p:"",(S=_.length?_:x.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,m.queryString(S).catch(console.error)]:[3,6];case 5:P.sent(),P.label=6;case 6:return m.initialized=!0,m.emit("initialize",n,r),r.initialPageview&&m.page().catch(console.error),[4,jt(m,o)];case 7:return P.sent(),[2,[m,w]]}var j,I,O}))}))}var kt=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}),u=o.promise,s=o.resolve;return i=e.call(this,(function(t){return u.then((function(e){return Ot(e[0],e[1],t)}))}))||this,i._resolveLoadStart=function(t,e){return s([t,e])},i}return(0,t.ZT)(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}(gt),At=u(584);function Mt(){var e,n;return(0,t.mG)(this,void 0,Promise,(function(){var r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return r=function(){var t;if((0,At.M)())return(0,At.M)();if(window.analytics._writeKey)return window.analytics._writeKey;for(var e=/http.*\/analytics\.js\/v1\/([^/]*)(\/platform)?\/analytics.*/,n=void 0,r=0,i=Array.prototype.slice.call(document.querySelectorAll("script"));r=parseInt(o)}()){var Ct=document.createElement("script");Ct.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(Ct)})):document.body.appendChild(Ct),Ct.onload=function(){Jt(Mt)}}else Jt(Mt)}(),window.AnalyticsNext=s}(); //# sourceMappingURL=standalone.js.map