@ledgerhq/connect-kit 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +3 -0
- package/dist/umd/index.js +3 -3
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
@@ -169,8 +169,8 @@ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=
|
|
169
169
|
`,pt=et.a`
|
170
170
|
color: #BBB0FF;
|
171
171
|
cursor: pointer;
|
172
|
-
`;var gt=function(e,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gt(e,t)};function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vt.apply(this,arguments)};function mt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function _t(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function bt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var wt=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}(),Et=function(e,t){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Et(e,t)};function St(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ot=function(){return Ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ot.apply(this,arguments)};function xt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function It(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function Rt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function kt(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}"function"==typeof SuppressedError&&SuppressedError;var Ct=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return St(t,e),t}(Error);function Pt(e){return"string"==typeof e}function At(e){return"number"==typeof e}function Nt(e){return"function"==typeof e}function Tt(e){return null!=e}function Mt(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Lt="is not a string",jt="is not an object",Ut="is nil";function Dt(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function zt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Dt(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var Ft,Bt="onRemoveFromFuture",Ht=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return St(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,s=e.attempt,a=e.maxTimeout,u=void 0===a?1/0:a;return Math.min(t*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(Bt)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(wt),qt=256,Vt=[];qt--;)Vt[qt]=(qt+256).toString(16).substring(1);function $t(){var e,t=0,n="";if(!Ft||qt+16>256){for(Ft=Array(t=256);t--;)Ft[t]=256*Math.random()|0;t=qt=0}for(;t<16;t++)e=Ft[qt+t],n+=6==t?Vt[15&e|64]:8==t?Vt[63&e|128]:Vt[e],1&t&&t>1&&t<11&&(n+="-");return qt++,n}var Wt=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,o=Ot(Ot({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var s=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),Ot(Ot({},e),((n={})[s]=o,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),Kt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return Ot(Ot({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Kt),Yt=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},Qt=function(){function e(e,t,n,r){void 0===t&&(t=$t()),void 0===n&&(n=new Gt),void 0===r&&(r=new Wt),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new Yt({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return kt(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Jt(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof Yt&&"middleware_cancellation"===n.type)throw n;return n instanceof Yt?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function Xt(e,t){return Jt(e,t).then((function(t){if(t instanceof Qt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Zt=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(Bt,(function(){o.scheduleFlush(0)})),o}return St(t,e),t.prototype.register=function(e,t,n){return xt(this,void 0,void 0,(function(){var r=this;return It(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return xt(this,void 0,void 0,(function(){var r;return It(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return xt(this,void 0,void 0,(function(){var t,n,r,i;return It(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof Yt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return xt(this,void 0,void 0,(function(){var e,t;return It(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=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)})),i=(t="type",n={},r.forEach((function(e){var r,i=void 0;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Rt(Rt([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n),o=i.before,s=void 0===o?[]:o,a=i.enrichment,u=void 0===a?[]:a,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:s,enrichment:u,destinations:l,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return xt(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return It(this,(function(v){switch(v.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,s=0,a=i,v.label=1;case 1:return s<a.length?(u=a[s],[4,Xt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,u),v.label=3;case 3:return s++,[3,1];case 4:c=0,l=o,v.label=5;case 5:return c<l.length?(f=l[c],[4,Jt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,f),v.label=7;case 7:return c++,[3,5];case 8:return d=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=d.destinations,g=d.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return Jt(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return v.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=g.map((function(t){return Jt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(wt);function en(e,t,n,r){return xt(this,void 0,void 0,(function(){var i,o;return It(this,(function(s){switch(s.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=s.sent(),s.label=4;case 4:return(null==r?void 0:r.callback)?[4,zt(o,r.callback,(a=i,u=r.timeout,c=Date.now()-a,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var a,u,c}))}))}function tn(e,t,n,r){var i,o=[e,t,n,r],s=Mt(e)?e.event:e;if(!s||!Pt(s))throw new Error("Event missing");var a=Mt(e)?null!==(i=e.properties)&&void 0!==i?i:{}:Mt(t)?t:{},u={};return Nt(n)||(u=null!=n?n:{}),Mt(e)&&!Nt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Nt)]}function nn(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Pt);void 0!==l[0]&&void 0!==l[1]&&(a=l[0],u=l[1]),1===l.length&&(a=null,u=l[0]);var f=c.find(Nt),h=c.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),d=null!==(o=h[0])&&void 0!==o?o:{},p=null!==(s=h[1])&&void 0!==s?s:{};return[a,u,d,p,f]}var rn=function(e){return function(){for(var t,n,r,i,o,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u;u=null!==(r=null!==(t=s.find(Pt))&&void 0!==t?t:null===(n=s.find(At))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var c=s.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},h=s.find(Nt);return[u,l,f,h]}};function on(e,t,n,r){At(e)&&(e=e.toString()),At(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Pt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(Mt)[0];return[a,c,void 0===l?{}:l,i.find(Nt)]}function sn(){return"undefined"!=typeof window}function an(){return!sn()}function un(){return!sn()||window.navigator.onLine}function cn(){return!un()}function ln(e,t){return t=t||{},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(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}var fn=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},hn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=fn();return(n&&n.fetch||ln).apply(void 0,e)},dn="1.53.2";/*! js-cookie v3.0.1 | MIT */
|
173
|
-
function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=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(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=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(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return ul}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){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=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||(t=!0,e())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0,e()}else t=!1}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(){if(s=!0,o.length){var e=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(e).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return pd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return wd})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return Ed})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return Sd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Od})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){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(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
|
172
|
+
`;var gt=function(e,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gt(e,t)};function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vt.apply(this,arguments)};function mt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function _t(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function bt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var wt=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}(),Et=function(e,t){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Et(e,t)};function St(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ot=function(){return Ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ot.apply(this,arguments)};function xt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function It(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function Rt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function kt(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}"function"==typeof SuppressedError&&SuppressedError;var Ct=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return St(t,e),t}(Error);function Pt(e){return"string"==typeof e}function At(e){return"number"==typeof e}function Nt(e){return"function"==typeof e}function Tt(e){return null!=e}function Mt(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Lt="is not a string",jt="is not an object",Ut="is nil";function Dt(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function zt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Dt(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var Ft,Bt="onRemoveFromFuture",Ht=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return St(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,s=e.attempt,a=e.maxTimeout,u=void 0===a?1/0:a;return Math.min(t*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(Bt)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(wt),qt=256,Vt=[];qt--;)Vt[qt]=(qt+256).toString(16).substring(1);function $t(){var e,t=0,n="";if(!Ft||qt+16>256){for(Ft=Array(t=256);t--;)Ft[t]=256*Math.random()|0;t=qt=0}for(;t<16;t++)e=Ft[qt+t],n+=6==t?Vt[15&e|64]:8==t?Vt[63&e|128]:Vt[e],1&t&&t>1&&t<11&&(n+="-");return qt++,n}var Wt=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,o=Ot(Ot({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var s=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),Ot(Ot({},e),((n={})[s]=o,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),Kt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return Ot(Ot({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Kt),Yt=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},Qt=function(){function e(e,t,n,r){void 0===t&&(t=$t()),void 0===n&&(n=new Gt),void 0===r&&(r=new Wt),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new Yt({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return kt(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Jt(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof Yt&&"middleware_cancellation"===n.type)throw n;return n instanceof Yt?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function Xt(e,t){return Jt(e,t).then((function(t){if(t instanceof Qt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Zt=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(Bt,(function(){o.scheduleFlush(0)})),o}return St(t,e),t.prototype.register=function(e,t,n){return xt(this,void 0,void 0,(function(){var r=this;return It(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return xt(this,void 0,void 0,(function(){var r;return It(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return xt(this,void 0,void 0,(function(){var t,n,r,i;return It(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof Yt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return xt(this,void 0,void 0,(function(){var e,t;return It(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=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)})),i=(t="type",n={},r.forEach((function(e){var r,i=void 0;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Rt(Rt([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n),o=i.before,s=void 0===o?[]:o,a=i.enrichment,u=void 0===a?[]:a,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:s,enrichment:u,destinations:l,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return xt(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return It(this,(function(v){switch(v.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,s=0,a=i,v.label=1;case 1:return s<a.length?(u=a[s],[4,Xt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,u),v.label=3;case 3:return s++,[3,1];case 4:c=0,l=o,v.label=5;case 5:return c<l.length?(f=l[c],[4,Jt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,f),v.label=7;case 7:return c++,[3,5];case 8:return d=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=d.destinations,g=d.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return Jt(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return v.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=g.map((function(t){return Jt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(wt);function en(e,t,n,r){return xt(this,void 0,void 0,(function(){var i,o;return It(this,(function(s){switch(s.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=s.sent(),s.label=4;case 4:return(null==r?void 0:r.callback)?[4,zt(o,r.callback,(a=i,u=r.timeout,c=Date.now()-a,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var a,u,c}))}))}function tn(e,t,n,r){var i,o=[e,t,n,r],s=Mt(e)?e.event:e;if(!s||!Pt(s))throw new Error("Event missing");var a=Mt(e)?null!==(i=e.properties)&&void 0!==i?i:{}:Mt(t)?t:{},u={};return Nt(n)||(u=null!=n?n:{}),Mt(e)&&!Nt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Nt)]}function nn(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Pt);void 0!==l[0]&&void 0!==l[1]&&(a=l[0],u=l[1]),1===l.length&&(a=null,u=l[0]);var f=c.find(Nt),h=c.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),d=null!==(o=h[0])&&void 0!==o?o:{},p=null!==(s=h[1])&&void 0!==s?s:{};return[a,u,d,p,f]}var rn=function(e){return function(){for(var t,n,r,i,o,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u;u=null!==(r=null!==(t=s.find(Pt))&&void 0!==t?t:null===(n=s.find(At))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var c=s.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},h=s.find(Nt);return[u,l,f,h]}};function on(e,t,n,r){At(e)&&(e=e.toString()),At(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Pt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(Mt)[0];return[a,c,void 0===l?{}:l,i.find(Nt)]}function sn(){return"undefined"!=typeof window}function an(){return!sn()}function un(){return!sn()||window.navigator.onLine}function cn(){return!un()}function ln(e,t){return t=t||{},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(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}var fn=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},hn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=fn();return(n&&n.fetch||ln).apply(void 0,e)},dn="1.53.3";/*! js-cookie v3.0.1 | MIT */
|
173
|
+
function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=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(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=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(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,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(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return ul}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){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=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return pd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return wd})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return Ed})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return Sd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Od})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){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(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
|
174
174
|
/**
|
175
175
|
* @license React
|
176
176
|
* react-dom.production.min.js
|
@@ -326,7 +326,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
326
326
|
* Released under MIT license <https://lodash.com/license>
|
327
327
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
328
328
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
329
|
-
*/mg=bg,_g=bg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,x=30,I="...",R=800,k=16,C=1,P=2,A=3,N=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,j=4294967295,U=j-1,D=j>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],F="[object Arguments]",B="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",$="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),xe=RegExp(Se.source),Ie=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ne.source),Me=/^\s+/,Le=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/[()=,{}\[\]\/\s]/,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ut="["+Ze+"]",ct="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ct+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ut+"|"+dt+")?",Ot="["+rt+"]?",xt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rt=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",kt="(?:"+[lt,gt,yt].join("|")+")"+Rt,Ct="(?:"+[pt+ut+"?",ut,gt,yt,st].join("|")+")",Pt=RegExp(ot,"g"),At=RegExp(ut,"g"),Nt=RegExp(dt+"(?="+dt+")|"+Ct+Rt,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,It,xt,ct,kt].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[F]=Dt[B]=Dt[ue]=Dt[q]=Dt[ce]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[F]=zt[B]=zt[ue]=zt[ce]=zt[q]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Ft={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'"},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,$t=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=_g&&!_g.nodeType&&_g,Qt=Yt&&mg&&!mg.nodeType&&mg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function un(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function cn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&xn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Cn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xn(e,t,n){return t==t?tr(e,t,n):On(e,Rn,n)}function In(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rn(e){return e!=e}function kn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Cn(t){return function(n){return null==n?e:n[t]}}function Pn(t){return function(n){return null==t?e:t[n]}}function An(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function jn(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function Un(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Fn(e,t){for(var n=-1,r=e.length;++n<r&&xn(t,e[n],0)>-1;);return n}function Bn(e,t){for(var n=e.length;n--&&xn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Ft),Vn=Pn(Bt);function $n(e){return"\\"+qt[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===c)&&(e[n]=c,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?ur(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=Pn(Ht);function ar(e){for(var t=Nt.lastIndex=0;Nt.test(e);)++t;return t}function ur(e){return e.match(Nt)||[]}function cr(e){return e.match(Tt)||[]}var lr=function t(Le){var ze=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,jt))).Array,Xe=Le.Date,Ze=Le.Error,et=Le.Function,tt=Le.Math,nt=Le.Object,rt=Le.RegExp,it=Le.String,ot=Le.TypeError,st=ze.prototype,at=et.prototype,ut=nt.prototype,ct=Le["__core-js_shared__"],lt=at.toString,ft=ut.hasOwnProperty,ht=0,dt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=ut.toString,gt=lt.call(nt),yt=Gt._,vt=rt("^"+lt.call(ft).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Jt?Le.Buffer:e,_t=Le.Symbol,bt=Le.Uint8Array,wt=mt?mt.allocUnsafe:e,Et=Jn(nt.getPrototypeOf,nt),St=nt.create,Ot=ut.propertyIsEnumerable,xt=st.splice,It=_t?_t.isConcatSpreadable:e,Rt=_t?_t.iterator:e,kt=_t?_t.toStringTag:e,Ct=function(){try{var e=Ks(nt,"defineProperty");return e({},"",{}),e}catch{}}(),Nt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Tt=Xe&&Xe.now!==Gt.Date.now&&Xe.now,Mt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Lt=tt.ceil,Ft=tt.floor,Bt=nt.getOwnPropertySymbols,Ht=mt?mt.isBuffer:e,qt=Le.isFinite,Wt=st.join,Kt=Jn(nt.keys,nt),Yt=tt.max,Qt=tt.min,Xt=Xe.now,Zt=Le.parseInt,bn=tt.random,wn=st.reverse,Pn=Ks(Le,"DataView"),tr=Ks(Le,"Map"),ar=Ks(Le,"Promise"),ur=Ks(Le,"Set"),lr=Ks(Le,"WeakMap"),hr=Ks(nt,"create"),dr=lr&&new lr,pr={},gr=Na(Pn),yr=Na(tr),vr=Na(ar),mr=Na(ur),_r=Na(lr),br=_t?_t.prototype:e,wr=br?br.valueOf:e,Er=br?br.toString:e;function Sr(e){if(xl(e)&&!ul(e)&&!(e instanceof Rr)){if(e instanceof Ir)return e;if(ft.call(e,"__wrapped__"))return Ma(e)}return new Ir(e)}var Or=function(){function t(){}return function(n){if(!Ol(n))return{};if(St)return St(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Rr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(){var e=new Rr(this.__wrapped__);return e.__actions__=is(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=is(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=is(this.__views__),e}function Cr(){if(this.__filtered__){var e=new Rr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Pr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Xs(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Qt(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return zo(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==P)y=b;else if(!b){if(_==C)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nr(){this.__data__=hr?hr(null):{},this.size=0}function Tr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mr(t){var n=this.__data__;if(hr){var r=n[t];return r===a?e:r}return ft.call(n,t)?n[t]:e}function Lr(t){var n=this.__data__;return hr?n[t]!==e:ft.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hr&&n===e?a:n,this}function Ur(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(){this.__data__=[],this.size=0}function zr(e){var t=this.__data__,n=li(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=li(n,t);return r<0?e:n[r][1]}function Br(e){return li(this.__data__,e)>-1}function Hr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vr(){this.size=0,this.__data__={hash:new Ar,map:new(tr||Ur),string:new Ar}}function $r(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}function Wr(e){return $s(this,e).get(e)}function Kr(e){return $s(this,e).has(e)}function Gr(e,t){var n=$s(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}function Qr(e){return this.__data__.set(e,a),this}function Jr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Ur(e);this.size=t.size}function Zr(){this.__data__=new Ur,this.size=0}function ei(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Ur){var i=n.__data__;if(!tr||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(i)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=ul(e),r=!n&&al(e),i=!n&&!r&&dl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,it):[],u=a.length;for(var c in e)(t||ft.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,u)))&&a.push(c);return a}function oi(t){var n=t.length;return n?t[mo(0,n-1)]:e}function si(e,t){return Ca(is(e),yi(t,0,e.length))}function ai(e){return Ca(is(e))}function ui(t,n,r){(r!==e&&!il(t[n],r)||r===e&&!(n in t))&&pi(t,n,r)}function ci(t,n,r){var i=t[n];(!ft.call(t,n)||!il(i,r)||r===e&&!(n in t))&&pi(t,n,r)}function li(e,t){for(var n=e.length;n--;)if(il(e[n][0],t))return n;return-1}function fi(e,t,n,r){return Ei(e,(function(e,i,o){t(r,e,n(e),o)})),r}function hi(e,t){return e&&os(t,Sf(t),e)}function di(e,t){return e&&os(t,Of(t),e)}function pi(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(t,n){for(var r=-1,i=n.length,o=ze(i),s=null==t;++r<i;)o[r]=s?e:vf(t,n[r]);return o}function yi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function vi(t,n,r,i,o,s){var a,u=n&l,c=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Ol(t))return t;var p=ul(t);if(p){if(a=ta(t),!u)return is(t,a)}else{var g=Js(t),y=g==K||g==G;if(dl(t))return Go(t,u);if(g==X||g==F||y&&!o){if(a=c||y?{}:na(t),!u)return c?as(t,di(a,t)):ss(t,hi(a,t))}else{if(!zt[g])return o?t:{};a=ra(t,g,u)}}s||(s=new Xr);var v=s.get(t);if(v)return v;s.set(t,a),Ul(t)?t.forEach((function(e){a.add(vi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,vi(e,n,r,i,t,s))}));var m=p?e:(d?c?Fs:zs:c?Of:Sf)(t);return cn(m||t,(function(e,i){m&&(e=t[i=e]),ci(a,i,vi(e,n,r,i,t,s))})),a}function mi(e){var t=Sf(e);return function(n){return _i(n,e,t)}}function _i(t,n,r){var i=r.length;if(null==t)return!i;for(t=nt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function bi(t,n,r){if("function"!=typeof t)throw new ot(o);return xa((function(){t.apply(e,r)}),n)}function wi(e,t,n,i){var o=-1,s=dn,a=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=gn(t,Un(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Yr(t));e:for(;++o<u;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(f)}else s(t,h,i)||c.push(f)}return c}Sr.templateSettings={escape:Ie,evaluate:Re,interpolate:ke,variable:"",imports:{_:Sr}},Sr.prototype=xr.prototype,Sr.prototype.constructor=Sr,Ir.prototype=Or(xr.prototype),Ir.prototype.constructor=Ir,Rr.prototype=Or(xr.prototype),Rr.prototype.constructor=Rr,Ar.prototype.clear=Nr,Ar.prototype.delete=Tr,Ar.prototype.get=Mr,Ar.prototype.has=Lr,Ar.prototype.set=jr,Ur.prototype.clear=Dr,Ur.prototype.delete=zr,Ur.prototype.get=Fr,Ur.prototype.has=Br,Ur.prototype.set=Hr,qr.prototype.clear=Vr,qr.prototype.delete=$r,qr.prototype.get=Wr,qr.prototype.has=Kr,qr.prototype.set=Gr,Yr.prototype.add=Yr.prototype.push=Qr,Yr.prototype.has=Jr,Xr.prototype.clear=Zr,Xr.prototype.delete=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var Ei=ls(Ai),Si=ls(Ni,!0);function Oi(e,t){var n=!0;return Ei(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(u===e?a==a&&!zl(a):r(a,u)))var u=a,c=s}return c}function Ii(t,n,r,i){var o=t.length;for((r=Gl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Gl(i))<0&&(i+=o),i=r>i?0:Yl(i);r<i;)t[r++]=n;return t}function Ri(e,t){var n=[];return Ei(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ki(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?ki(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var Ci=fs(),Pi=fs(!0);function Ai(e,t){return e&&Ci(e,t,Sf)}function Ni(e,t){return e&&Pi(e,t,Sf)}function Ti(e,t){return hn(t,(function(t){return wl(e[t])}))}function Mi(t,n){for(var r=0,i=(n=Vo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Li(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:kt&&kt in nt(t)?Gs(t):_a(t)}function Ui(e,t){return e>t}function Di(e,t){return null!=e&&ft.call(e,t)}function zi(e,t){return null!=e&&t in nt(e)}function Fi(e,t,n){return e>=Qt(t,n)&&e<Yt(t,n)}function Bi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,u=ze(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,Un(n))),c=Qt(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Yr(a&&f):e}f=t[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Hi(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function qi(t,n,r){var i=null==(t=wa(t,n=Vo(n,t)))?t:t[Aa(ou(n))];return null==i?e:an(i,t,r)}function Vi(e){return xl(e)&&ji(e)==F}function $i(e){return xl(e)&&ji(e)==ue}function Wi(e){return xl(e)&&ji(e)==V}function Ki(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Gi(e,t,n,r,Ki,i))}function Gi(e,t,n,r,i,o){var s=ul(e),a=ul(t),u=s?B:Js(e),c=a?B:Js(t),l=(u=u==F?X:u)==X,f=(c=c==F?X:c)==X,h=u==c;if(h&&dl(e)){if(!dl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Xr),s||Fl(e)?Ls(e,t,n,r,i,o):js(e,t,u,n,r,i,o);if(!(n&d)){var p=l&&ft.call(e,"__wrapped__"),g=f&&ft.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Xr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Xr),Us(e,t,n,r,i,o))}function Yi(e){return xl(e)&&Js(e)==Y}function Qi(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=nt(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],l=t[c],f=u[1];if(a&&u[2]){if(l===e&&!(c in t))return!1}else{var h=new Xr;if(i)var g=i(l,f,c,t,n,h);if(!(g===e?Ki(f,l,d|p,i,h):g))return!1}}return!0}function Ji(e){return!(!Ol(e)||fa(e))&&(wl(e)?vt:We).test(Na(e))}function Xi(e){return xl(e)&&ji(e)==te}function Zi(e){return xl(e)&&Js(e)==ne}function eo(e){return xl(e)&&Sl(e.length)&&!!Dt[ji(e)]}function to(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?ao(e[0],e[1]):so(e):Vh(e)}function no(e){if(!da(e))return Kt(e);var t=[];for(var n in nt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!Ol(e))return ma(e);var t=da(e),n=[];for(var r in e)"constructor"==r&&(t||!ft.call(e,r))||n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var n=-1,r=ll(e)?ze(e.length):[];return Ei(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function so(e){var t=Ws(e);return 1==t.length&&t[0][2]?ga(t[0][0],t[0][1]):function(n){return n===e||Qi(n,e,t)}}function ao(t,n){return ua(t)&&pa(n)?ga(Aa(t),n):function(r){var i=vf(r,t);return i===e&&i===n?_f(r,t):Ki(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&Ci(n,(function(s,a){if(o||(o=new Xr),Ol(s))co(t,n,a,r,uo,i,o);else{var u=i?i(Sa(t,a),s,a+"",t,n,o):e;u===e&&(u=s),ui(t,a,u)}}),Of)}function co(t,n,r,i,o,s,a){var u=Sa(t,r),c=Sa(n,r),l=a.get(c);if(l)ui(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=ul(c),p=!d&&dl(c),g=!d&&!p&&Fl(c);f=c,d||p||g?ul(u)?f=u:fl(u)?f=is(u):p?(h=!1,f=Go(c,!0)):g?(h=!1,f=Zo(c,!0)):f=[]:Ml(c)||al(c)?(f=u,al(u)?f=Jl(u):(!Ol(u)||wl(u))&&(f=na(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),ui(t,r,f)}}function lo(t,n){var r=t.length;if(r)return sa(n+=n<0?r:0,r)?t[n]:e}function fo(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Mi(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,Un(Vs()));var i=oo(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return Nn(i,(function(e,t){return ts(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return _f(e,n)}))}function po(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Mi(e,s);n(a,s)&&Oo(o,Vo(s,e),a)}return o}function go(e){return function(t){return Mi(t,e)}}function yo(e,t,n,r){var i=r?In:xn,o=-1,s=t.length,a=e;for(e===t&&(t=is(t)),n&&(a=gn(e,Un(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function vo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;sa(i)?xt.call(e,i,1):jo(e,i)}}return e}function mo(e,t){return e+Ft(bn()*(t-e+1))}function _o(e,t,n,r){for(var i=-1,o=Yt(Lt((t-e)/(n||1)),0),s=ze(o);o--;)s[r?o:++i]=e,e+=n;return s}function bo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function wo(e,t){return Ia(ba(e,t,Ah),e+"")}function Eo(e){return oi(Hf(e))}function So(e,t){var n=Hf(e);return Ca(n,yi(t,0,n.length))}function Oo(t,n,r,i){if(!Ol(t))return t;for(var o=-1,s=(n=Vo(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Aa(n[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var f=u[c];(l=i?i(f,c,u):e)===e&&(l=Ol(f)?f:sa(n[o+1])?[]:{})}ci(u,c,l),u=u[c]}return t}var xo=dr?function(e,t){return dr.set(e,t),e}:Ah,Io=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Rh(t),writable:!0})}:Ah;function Ro(e){return Ca(Hf(e))}function ko(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ze(i);++r<i;)o[r]=e[r+t];return o}function Co(e,t){var n;return Ei(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Po(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!zl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,c=zl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=zl(h);if(a)var v=i||g;else v=l?g&&(i||d):u?g&&d&&(i||!p):c?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Qt(s,U)}function No(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!il(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function To(e){return"number"==typeof e?e:zl(e)?L:+e}function Mo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Mo)+"";if(zl(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Lo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:Cs(e);if(l)return Zn(l);a=!1,o=zn,c=new Yr}else c=t?[]:u;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function jo(e,t){return null==(e=wa(e,t=Vo(t,e)))||delete e[Aa(ou(t))]}function Uo(e,t,n,r){return Oo(e,t,n(Mi(e,t)),r)}function Do(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ko(e,r?0:o,r?o+1:i):ko(e,r?o+1:0,r?i:o)}function zo(e,t){var n=e;return n instanceof Rr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Lo(e[0]):[];for(var i=-1,o=ze(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=wi(o[i]||s,e[a],t,n));return Lo(ki(o,1),t,n)}function Bo(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var u=i<s?n[i]:e;r(a,t[i],u)}return a}function Ho(e){return fl(e)?e:[]}function qo(e){return"function"==typeof e?e:Ah}function Vo(e,t){return ul(e)?e:ua(e,t)?[e]:Pa(Zl(e))}var $o=wo;function Wo(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ko(t,n,r)}var Ko=Nt||function(e){return Gt.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Yo(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Qo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jo(e){var t=new e.constructor(e.source,qe.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return wr?nt(wr.call(e)):{}}function Zo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function es(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=zl(t),a=n!==e,u=null===n,c=n==n,l=zl(n);if(!u&&!l&&!s&&t>n||s&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function ts(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=es(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ns(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Yt(o-s,0),l=ze(u+c),f=!r;++a<u;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function rs(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Yt(o-a,0),f=ze(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function is(e,t){var n=-1,r=e.length;for(t||(t=ze(r));++n<r;)t[n]=e[n];return t}function os(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],c=i?i(r[u],t[u],u,r,t):e;c===e&&(c=t[u]),o?pi(r,u,c):ci(r,u,c)}return r}function ss(e,t){return os(e,Ys(e),t)}function as(e,t){return os(e,Qs(e),t)}function us(e,t){return function(n,r){var i=ul(n)?un:fi,o=t?t():{};return i(n,e,Vs(r,2),o)}}function cs(t){return wo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&aa(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=nt(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function ls(e,t){return function(n,r){if(null==n)return n;if(!ll(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=nt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fs(e){return function(t,n,r){for(var i=-1,o=nt(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function hs(e,t,n){var r=t&g,i=gs(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ds(t){return function(n){var r=Kn(n=Zl(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Wo(r,1).join(""):n.slice(1);return i[t]()+o}}function ps(e){return function(t){return vn(Eh(Yf(t).replace(Pt,"")),e,"")}}function gs(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Or(e.prototype),r=e.apply(n,t);return Ol(r)?r:n}}function ys(t,n,r){var i=gs(t);function o(){for(var s=arguments.length,a=ze(s),u=s,c=qs(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:Xn(a,c);return(s-=l.length)<r?Rs(t,n,_s,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function vs(t){return function(n,r,i){var o=nt(n);if(!ll(n)){var s=Vs(r,3);n=Sf(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function ms(t){return Ds((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new ot(o);if(s&&!u&&"wrapper"==Hs(a))var u=new Ir([],!0)}for(i=u?i:r;++i<r;){var c=Hs(a=n[i]),l="wrapper"==c?Bs(a):e;u=l&&la(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?u[Hs(l[0])].apply(u,l[3]):1==a.length&&la(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&ul(t))return u.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function _s(t,n,r,i,o,s,a,u,c,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:gs(t);function w(){for(var e=arguments.length,g=ze(e),y=e;y--;)g[y]=arguments[y];if(p)var m=qs(w),_=Hn(g,m);if(i&&(g=ns(g,i,o,p)),s&&(g=rs(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Rs(t,n,_s,w.placeholder,r,g,E,u,c,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,u?g=Ea(g,u):v&&e>1&&g.reverse(),f&&c<e&&(g.length=c),this&&this!==Gt&&this instanceof w&&(O=b||gs(O)),O.apply(S,g)}return w}function bs(e,t){return function(n,r){return Hi(n,e,t(r),{})}}function ws(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Mo(r),i=Mo(i)):(r=To(r),i=To(i)),o=t(r,i)}return o}}function Es(e){return Ds((function(t){return t=gn(t,Un(Vs())),wo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Ss(t,n){var r=(n=n===e?" ":Mo(n)).length;if(r<2)return r?bo(n,t):n;var i=bo(n,Lt(t/rr(n)));return Kn(n)?Wo(ir(i),0,t).join(""):i.slice(0,t)}function Os(e,t,n,r){var i=t&g,o=gs(e);function s(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=ze(c+a),f=this&&this!==Gt&&this instanceof s?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&aa(n,r,i)&&(r=i=e),n=Kl(n),r===e?(r=n,n=0):r=Kl(r),_o(n,r,i=i===e?n<r?1:-1:Kl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ql(t),n=Ql(n)),e(t,n)}}function Rs(t,n,r,i,o,s,a,u,c,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,u,c,l],d=r.apply(e,h);return la(t)&&Oa(d,h),d.placeholder=i,Ra(d,t,n)}function ks(e){var t=tt[e];return function(e,n){if(e=Ql(e),(n=null==n?0:Qt(Gl(n),292))&&qt(e)){var r=(Zl(e)+"e").split("e");return+((r=(Zl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Cs=ur&&1/Zn(new ur([,-0]))[1]==N?function(e){return new ur(e)}:zh;function Ps(e){return function(t){var n=Js(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,u,c){var l=n&y;if(!l&&"function"!=typeof t)throw new ot(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),u=u===e?u:Yt(Gl(u),0),c=c===e?c:Gl(c),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Bs(t),v=[t,n,r,i,s,h,d,a,u,c];if(p&&va(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(c=v[9]=v[9]===e?l?0:t.length:Yt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?ys(t,n,c):n!=b&&n!=(g|b)||s.length?_s.apply(e,v):Os(t,n,r,i);else var E=hs(t,n,r);return Ra((p?xo:Oa)(E,v),t,n)}function Ns(t,n,r,i){return t===e||il(t,ut[r])&&!ft.call(i,r)?n:t}function Ts(t,n,r,i,o,s){return Ol(t)&&Ol(n)&&(s.set(n,t),uo(t,n,e,Ts,s),s.delete(n)),t}function Ms(t){return Ml(t)?e:t}function Ls(t,n,r,i,o,s){var a=r&d,u=t.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Yr:e;for(s.set(t,n),s.set(n,t);++h<u;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case q:case V:case Q:return il(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var u=r&d;if(a||(a=Zn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=p,s.set(e,t);var l=Ls(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(wr)return wr.call(e)==wr.call(t)}return!1}function Us(t,n,r,i,o,s){var a=r&d,u=zs(t),c=u.length;if(c!=zs(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:ft.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<c;){var v=t[f=u[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function Ds(t){return Ia(ba(t,e,Ga),t+"")}function zs(e){return Li(e,Sf,Ys)}function Fs(e){return Li(e,Of,Qs)}var Bs=dr?function(e){return dr.get(e)}:zh;function Hs(e){for(var t=e.name+"",n=pr[t],r=ft.call(pr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function qs(e){return(ft.call(Sr,"placeholder")?Sr:e).placeholder}function Vs(){var e=Sr.iteratee||Nh;return e=e===Nh?to:e,arguments.length?e(arguments[0],arguments[1]):e}function $s(e,t){var n=e.__data__;return ca(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ws(e){for(var t=Sf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function Ks(t,n){var r=Wn(t,n);return Ji(r)?r:e}function Gs(t){var n=ft.call(t,kt),r=t[kt];try{t[kt]=e;var i=!0}catch{}var o=pt.call(t);return i&&(n?t[kt]=r:delete t[kt]),o}var Ys=Bt?function(e){return null==e?[]:(e=nt(e),hn(Bt(e),(function(t){return Ot.call(e,t)})))}:Gh,Qs=Bt?function(e){for(var t=[];e;)yn(t,Ys(e)),e=Et(e);return t}:Gh,Js=ji;function Xs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Qt(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(Ue);return t?t[1].split(De):[]}function ea(e,t,n){for(var r=-1,i=(t=Vo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sl(i)&&sa(s,i)&&(ul(e)||al(e))}function ta(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function na(e){return"function"!=typeof e.constructor||da(e)?{}:Or(Et(e))}function ra(e,t,n){var r=e.constructor;switch(t){case ue:return Yo(e);case q:case V:return new r(+e);case ce:return Qo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return Zo(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Jo(e);case ne:return new r;case ie:return Xo(e)}}function ia(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}function oa(e){return ul(e)||al(e)||!!(It&&e&&e[It])}function sa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function aa(e,t,n){if(!Ol(n))return!1;var r=typeof t;return!!("number"==r?ll(n)&&sa(t,n.length):"string"==r&&t in n)&&il(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!zl(e))||Pe.test(e)||!Ce.test(e)||null!=t&&e in nt(t)}function ca(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function la(e){var t=Hs(e),n=Sr[t];if("function"!=typeof n||!(t in Rr.prototype))return!1;if(e===n)return!0;var r=Bs(n);return!!r&&e===r[0]}function fa(e){return!!dt&&dt in e}(Pn&&Js(new Pn(new ArrayBuffer(1)))!=ce||tr&&Js(new tr)!=Y||ar&&Js(ar.resolve())!=Z||ur&&Js(new ur)!=ne||lr&&Js(new lr)!=se)&&(Js=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Na(r):"";if(i)switch(i){case gr:return ce;case yr:return Y;case vr:return Z;case mr:return ne;case _r:return se}return n});var ha=ct?wl:Yh;function da(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function pa(e){return e==e&&!Ol(e)}function ga(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in nt(r))}}function ya(e){var t=Fc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function va(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var u=e[3];e[3]=u?ns(u,a,t[4]):a,e[4]=u?Xn(e[3],c):t[4]}return(a=t[5])&&(u=e[5],e[5]=u?rs(u,a,t[6]):a,e[6]=u?Xn(e[5],c):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Qt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ma(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function _a(e){return pt.call(e)}function ba(t,n,r){return n=Yt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Yt(e.length-n,0),s=ze(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ze(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function wa(e,t){return t.length<2?e:Mi(e,ko(t,0,-1))}function Ea(t,n){for(var r=t.length,i=Qt(n.length,r),o=is(t);i--;){var s=n[i];t[i]=sa(s,r)?o[s]:e}return t}function Sa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oa=ka(xo),xa=Mt||function(e,t){return Gt.setTimeout(e,t)},Ia=ka(Io);function Ra(e,t,n){var r=t+"";return Ia(e,ia(r,Ta(Zs(r),n)))}function ka(t){var n=0,r=0;return function(){var i=Xt(),o=k-(i-r);if(r=i,o>0){if(++n>=R)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ca(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=mo(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Pa=ya((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ae,(function(e,n,r,i){t.push(r?i.replace(Be,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||zl(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Na(e){if(null!=e){try{return lt.call(e)}catch{}try{return e+""}catch{}}return""}function Ta(e,t){return cn(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function Ma(e){if(e instanceof Rr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=is(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function La(t,n,r){n=(r?aa(t,n,r):n===e)?1:Yt(Gl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ze(Lt(i/n));o<i;)a[s++]=ko(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Ua(){var e=arguments.length;if(!e)return[];for(var t=ze(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?is(n):[n],ki(t,1))}var Da=wo((function(e,t){return fl(e)?wi(e,ki(t,1,fl,!0)):[]})),za=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),Vs(r,2)):[]})),Fa=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),e,r):[]}));function Ba(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=r||n===e?1:Gl(n))<0?0:n,i):[]}function Ha(t,n,r){var i=null==t?0:t.length;return i?ko(t,0,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n):[]}function qa(e,t){return e&&e.length?Do(e,Vs(t,3),!0,!0):[]}function Va(e,t){return e&&e.length?Do(e,Vs(t,3),!0):[]}function $a(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&aa(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Wa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),On(e,Vs(t,3),i)}function Ka(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Gl(r),o=r<0?Yt(i+o,0):Qt(o,i-1)),On(t,Vs(n,3),o,!0)}function Ga(e){return null!=e&&e.length?ki(e,1):[]}function Ya(e){return null!=e&&e.length?ki(e,N):[]}function Qa(t,n){return null!=t&&t.length?ki(t,n=n===e?1:Gl(n)):[]}function Ja(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Xa(t){return t&&t.length?t[0]:e}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),xn(e,t,i)}function eu(e){return null!=e&&e.length?ko(e,0,-1):[]}var tu=wo((function(e){var t=gn(e,Ho);return t.length&&t[0]===e[0]?Bi(t):[]})),nu=wo((function(t){var n=ou(t),r=gn(t,Ho);return n===ou(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Bi(r,Vs(n,2)):[]})),ru=wo((function(t){var n=ou(t),r=gn(t,Ho);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Bi(r,e,n):[]}));function iu(e,t){return null==e?"":Wt.call(e,t)}function ou(t){var n=null==t?0:t.length;return n?t[n-1]:e}function su(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Gl(r))<0?Yt(i+o,0):Qt(o,i-1)),n==n?nr(t,n,o):On(t,Rn,o,!0)}function au(t,n){return t&&t.length?lo(t,Gl(n)):e}var uu=wo(cu);function cu(e,t){return e&&e.length&&t&&t.length?yo(e,t):e}function lu(e,t,n){return e&&e.length&&t&&t.length?yo(e,t,Vs(n,2)):e}function fu(t,n,r){return t&&t.length&&n&&n.length?yo(t,n,e,r):t}var hu=Ds((function(e,t){var n=null==e?0:e.length,r=gi(e,t);return vo(e,gn(t,(function(e){return sa(e,n)?+e:e})).sort(es)),r}));function du(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return vo(e,i),n}function pu(e){return null==e?e:wn.call(e)}function gu(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&aa(t,n,r)?(n=0,r=i):(n=null==n?0:Gl(n),r=r===e?i:Gl(r)),ko(t,n,r)):[]}function yu(e,t){return Po(e,t)}function vu(e,t,n){return Ao(e,t,Vs(n,2))}function mu(e,t){var n=null==e?0:e.length;if(n){var r=Po(e,t);if(r<n&&il(e[r],t))return r}return-1}function _u(e,t){return Po(e,t,!0)}function bu(e,t,n){return Ao(e,t,Vs(n,2),!0)}function wu(e,t){if(null!=e&&e.length){var n=Po(e,t,!0)-1;if(il(e[n],t))return n}return-1}function Eu(e){return e&&e.length?No(e):[]}function Su(e,t){return e&&e.length?No(e,Vs(t,2)):[]}function Ou(e){var t=null==e?0:e.length;return t?ko(e,1,t):[]}function xu(t,n,r){return t&&t.length?ko(t,0,(n=r||n===e?1:Gl(n))<0?0:n):[]}function Iu(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n,i):[]}function Ru(e,t){return e&&e.length?Do(e,Vs(t,3),!1,!0):[]}function ku(e,t){return e&&e.length?Do(e,Vs(t,3)):[]}var Cu=wo((function(e){return Lo(ki(e,1,fl,!0))})),Pu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Lo(ki(t,1,fl,!0),Vs(n,2))})),Au=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Lo(ki(t,1,fl,!0),e,n)}));function Nu(e){return e&&e.length?Lo(e):[]}function Tu(e,t){return e&&e.length?Lo(e,Vs(t,2)):[]}function Mu(t,n){return n="function"==typeof n?n:e,t&&t.length?Lo(t,e,n):[]}function Lu(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(fl(e))return t=Yt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Cn(t))}))}function ju(t,n){if(!t||!t.length)return[];var r=Lu(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Uu=wo((function(e,t){return fl(e)?wi(e,t):[]})),Du=wo((function(e){return Fo(hn(e,fl))})),zu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Fo(hn(t,fl),Vs(n,2))})),Fu=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Fo(hn(t,fl),e,n)})),Bu=wo(Lu);function Hu(e,t){return Bo(e||[],t||[],ci)}function qu(e,t){return Bo(e||[],t||[],Oo)}var Vu=wo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ju(t,r)}));function $u(e){var t=Sr(e);return t.__chain__=!0,t}function Wu(e,t){return t(e),e}function Ku(e,t){return t(e)}var Gu=Ds((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return gi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Rr&&sa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ku,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Yu(){return $u(this)}function Qu(){return new Ir(this.value(),this.__chain__)}function Ju(){this.__values__===e&&(this.__values__=Wl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Xu(){return this}function Zu(t){for(var n,r=this;r instanceof xr;){var i=Ma(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function ec(){var t=this.__wrapped__;if(t instanceof Rr){var n=t;return this.__actions__.length&&(n=new Rr(this)),(n=n.reverse()).__actions__.push({func:Ku,args:[pu],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(pu)}function tc(){return zo(this.__wrapped__,this.__actions__)}var nc=us((function(e,t,n){ft.call(e,n)?++e[n]:pi(e,n,1)}));function rc(t,n,r){var i=ul(t)?fn:Oi;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}function ic(e,t){return(ul(e)?hn:Ri)(e,Vs(t,3))}var oc=vs(Wa),sc=vs(Ka);function ac(e,t){return ki(yc(e,t),1)}function uc(e,t){return ki(yc(e,t),N)}function cc(t,n,r){return r=r===e?1:Gl(r),ki(yc(t,n),r)}function lc(e,t){return(ul(e)?cn:Ei)(e,Vs(t,3))}function fc(e,t){return(ul(e)?ln:Si)(e,Vs(t,3))}var hc=us((function(e,t,n){ft.call(e,n)?e[n].push(t):pi(e,n,[t])}));function dc(e,t,n,r){e=ll(e)?e:Hf(e),n=n&&!r?Gl(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),Dl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xn(e,t,n)>-1}var pc=wo((function(e,t,n){var r=-1,i="function"==typeof t,o=ll(e)?ze(e.length):[];return Ei(e,(function(e){o[++r]=i?an(t,e,n):qi(e,t,n)})),o})),gc=us((function(e,t,n){pi(e,n,t)}));function yc(e,t){return(ul(e)?gn:oo)(e,Vs(t,3))}function vc(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),fo(t,n,r))}var mc=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function _c(e,t,n){var r=ul(e)?vn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Ei)}function bc(e,t,n){var r=ul(e)?mn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Si)}function wc(e,t){return(ul(e)?hn:Ri)(e,Bc(Vs(t,3)))}function Ec(e){return(ul(e)?oi:Eo)(e)}function Sc(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),(ul(t)?si:So)(t,n)}function Oc(e){return(ul(e)?ai:Ro)(e)}function xc(e){if(null==e)return 0;if(ll(e))return Dl(e)?rr(e):e.length;var t=Js(e);return t==Y||t==ne?e.size:no(e).length}function Ic(t,n,r){var i=ul(t)?_n:Co;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}var Rc=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&aa(e,t[0],t[1])?t=[]:n>2&&aa(t[0],t[1],t[2])&&(t=[t[0]]),fo(e,ki(t,1),[])})),kc=Tt||function(){return Gt.Date.now()};function Cc(e,t){if("function"!=typeof t)throw new ot(o);return e=Gl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Pc(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Ac(t,n){var r;if("function"!=typeof n)throw new ot(o);return t=Gl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Nc=wo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,qs(Nc));r|=b}return As(e,r,t,n,i)})),Tc=wo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,qs(Tc));r|=b}return As(t,r,e,n,i)}));function Mc(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Mc.placeholder,i}function Lc(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Lc.placeholder,i}function jc(t,n,r){var i,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ot(o);function g(n){var r=i,o=s;return i=s=e,f=n,u=t.apply(o,r)}function y(e){return f=e,c=xa(_,n),h?g(e):u}function v(e){var t=n-(e-l);return d?Qt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=kc();if(m(e))return b(e);c=xa(_,v(e))}function b(t){return c=e,p&&i?g(t):(i=s=e,u)}function w(){c!==e&&Ko(c),f=0,i=l=s=c=e}function E(){return c===e?u:b(kc())}function S(){var t=kc(),r=m(t);if(i=arguments,s=this,l=t,r){if(c===e)return y(l);if(d)return Ko(c),c=xa(_,n),g(l)}return c===e&&(c=xa(_,n)),u}return n=Ql(n)||0,Ol(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Yt(Ql(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Uc=wo((function(e,t){return bi(e,1,t)})),Dc=wo((function(e,t,n){return bi(e,Ql(t)||0,n)}));function zc(e){return As(e,O)}function Fc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fc.Cache||qr),n}function Bc(e){if("function"!=typeof e)throw new ot(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Hc(e){return Ac(2,e)}Fc.Cache=qr;var qc=$o((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],Un(Vs())):gn(ki(t,1),Un(Vs()))).length;return wo((function(r){for(var i=-1,o=Qt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),Vc=wo((function(t,n){var r=Xn(n,qs(Vc));return As(t,b,e,n,r)})),$c=wo((function(t,n){var r=Xn(n,qs($c));return As(t,w,e,n,r)})),Wc=Ds((function(t,n){return As(t,S,e,e,e,n)}));function Kc(t,n){if("function"!=typeof t)throw new ot(o);return wo(t,n=n===e?n:Gl(n))}function Gc(e,t){if("function"!=typeof e)throw new ot(o);return t=null==t?0:Yt(Gl(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Yc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(o);return Ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jc(e,t,{leading:r,maxWait:t,trailing:i})}function Qc(e){return Pc(e,1)}function Jc(e,t){return Vc(qo(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function Zc(e){return vi(e,h)}function el(t,n){return vi(t,h,n="function"==typeof n?n:e)}function tl(e){return vi(e,l|h)}function nl(t,n){return vi(t,l|h,n="function"==typeof n?n:e)}function rl(e,t){return null==t||_i(e,t,Sf(t))}function il(e,t){return e===t||e!=e&&t!=t}var ol=Is(Ui),sl=Is((function(e,t){return e>=t})),al=Vi(function(){return arguments}())?Vi:function(e){return xl(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")},ul=ze.isArray,cl=en?Un(en):$i;function ll(e){return null!=e&&Sl(e.length)&&!wl(e)}function fl(e){return xl(e)&&ll(e)}function hl(e){return!0===e||!1===e||xl(e)&&ji(e)==q}var dl=Ht||Yh,pl=tn?Un(tn):Wi;function gl(e){return xl(e)&&1===e.nodeType&&!Ml(e)}function yl(e){if(null==e)return!0;if(ll(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||dl(e)||Fl(e)||al(e)))return!e.length;var t=Js(e);if(t==Y||t==ne)return!e.size;if(da(e))return!no(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function vl(e,t){return Ki(e,t)}function ml(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Ki(t,n,e,r):!!i}function _l(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Ml(e)}function bl(e){return"number"==typeof e&&qt(e)}function wl(e){if(!Ol(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function El(e){return"number"==typeof e&&e==Gl(e)}function Sl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?Un(nn):Yi;function Rl(e,t){return e===t||Qi(e,t,Ws(t))}function kl(t,n,r){return r="function"==typeof r?r:e,Qi(t,n,Ws(n),r)}function Cl(e){return Tl(e)&&e!=+e}function Pl(e){if(ha(e))throw new Ze(i);return Ji(e)}function Al(e){return null===e}function Nl(e){return null==e}function Tl(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ml(e){if(!xl(e)||ji(e)!=X)return!1;var t=Et(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&<.call(n)==gt}var Ll=rn?Un(rn):Xi;function jl(e){return El(e)&&e>=-T&&e<=T}var Ul=on?Un(on):Zi;function Dl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function zl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?Un(sn):eo;function Bl(t){return t===e}function Hl(e){return xl(e)&&Js(e)==se}function ql(e){return xl(e)&&ji(e)==ae}var Vl=Is(io),$l=Is((function(e,t){return e<=t}));function Wl(e){if(!e)return[];if(ll(e))return Dl(e)?ir(e):is(e);if(Rt&&e[Rt])return Yn(e[Rt]());var t=Js(e);return(t==Y?Qn:t==ne?Zn:Hf)(e)}function Kl(e){return e?(e=Ql(e))===N||e===-N?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Gl(e){var t=Kl(e),n=t%1;return t==t?n?t-n:t:0}function Yl(e){return e?yi(Gl(e),0,j):0}function Ql(e){if("number"==typeof e)return e;if(zl(e))return L;if(Ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jn(e);var n=$e.test(e);return n||Ke.test(e)?$t(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Jl(e){return os(e,Of(e))}function Xl(e){return e?yi(Gl(e),-T,T):0===e?e:0}function Zl(e){return null==e?"":Mo(e)}var ef=cs((function(e,t){if(da(t)||ll(t))os(t,Sf(t),e);else for(var n in t)ft.call(t,n)&&ci(e,n,t[n])})),tf=cs((function(e,t){os(t,Of(t),e)})),nf=cs((function(e,t,n,r){os(t,Of(t),e,r)})),rf=cs((function(e,t,n,r){os(t,Sf(t),e,r)})),of=Ds(gi);function sf(e,t){var n=Or(e);return null==t?n:hi(n,t)}var af=wo((function(t,n){t=nt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&aa(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Of(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||il(f,ut[l])&&!ft.call(t,l))&&(t[l]=s[l])}return t})),uf=wo((function(t){return t.push(e,Ts),an(kf,e,t)}));function cf(e,t){return Sn(e,Vs(t,3),Ai)}function lf(e,t){return Sn(e,Vs(t,3),Ni)}function ff(e,t){return null==e?e:Ci(e,Vs(t,3),Of)}function hf(e,t){return null==e?e:Pi(e,Vs(t,3),Of)}function df(e,t){return e&&Ai(e,Vs(t,3))}function pf(e,t){return e&&Ni(e,Vs(t,3))}function gf(e){return null==e?[]:Ti(e,Sf(e))}function yf(e){return null==e?[]:Ti(e,Of(e))}function vf(t,n,r){var i=null==t?e:Mi(t,n);return i===e?r:i}function mf(e,t){return null!=e&&ea(e,t,Di)}function _f(e,t){return null!=e&&ea(e,t,zi)}var bf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),Rh(Ah)),wf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]}),Vs),Ef=wo(qi);function Sf(e){return ll(e)?ii(e):no(e)}function Of(e){return ll(e)?ii(e,!0):ro(e)}function xf(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var Rf=cs((function(e,t,n){uo(e,t,n)})),kf=cs((function(e,t,n,r){uo(e,t,n,r)})),Cf=Ds((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=Vo(t,e),r||(r=t.length>1),t})),os(e,Fs(e),n),r&&(n=vi(n,l|f|h,Ms));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Pf(e,t){return Nf(e,Bc(Vs(t)))}var Af=Ds((function(e,t){return null==e?{}:ho(e,t)}));function Nf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=Vs(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Tf(t,n,r){var i=-1,o=(n=Vo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=wl(s)?s.call(t):s}return t}function Mf(e,t,n){return null==e?e:Oo(e,t,n)}function Lf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Oo(t,n,r,i)}var jf=Ps(Sf),Uf=Ps(Of);function Df(e,t,n){var r=ul(e),i=r||dl(e)||Fl(e);if(t=Vs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ol(e)&&wl(o)?Or(Et(e)):{}}return(i?cn:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function zf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Uo(e,t,qo(n))}function Bf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Uo(t,n,qo(r),i)}function Hf(e){return null==e?[]:Dn(e,Sf(e))}function qf(e){return null==e?[]:Dn(e,Of(e))}function Vf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Ql(r))==r?r:0),n!==e&&(n=(n=Ql(n))==n?n:0),yi(Ql(t),n,r)}function $f(t,n,r){return n=Kl(n),r===e?(r=n,n=0):r=Kl(r),Fi(t=Ql(t),n,r)}function Wf(t,n,r){if(r&&"boolean"!=typeof r&&aa(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Kl(t),n===e?(n=t,t=0):n=Kl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=bn();return Qt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return mo(t,n)}var Kf=ps((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return wh(Zl(e).toLowerCase())}function Yf(e){return(e=Zl(e))&&e.replace(Ye,qn).replace(At,"")}function Qf(t,n,r){t=Zl(t),n=Mo(n);var i=t.length,o=r=r===e?i:yi(Gl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Jf(e){return(e=Zl(e))&&xe.test(e)?e.replace(Se,Vn):e}function Xf(e){return(e=Zl(e))&&Te.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ps((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),eh=ps((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),th=ds("toLowerCase");function nh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ss(Ft(i),n)+e+Ss(Lt(i),n)}function rh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?e+Ss(t-r,n):e}function ih(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?Ss(t-r,n)+e:e}function oh(e,t,n){return n||null==t?t=0:t&&(t=+t),Zt(Zl(e).replace(Me,""),t||0)}function sh(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),bo(Zl(t),n)}function ah(){var e=arguments,t=Zl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=ps((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ch(t,n,r){return r&&"number"!=typeof r&&aa(t,n,r)&&(n=r=e),(r=r===e?j:r>>>0)?(t=Zl(t))&&("string"==typeof n||null!=n&&!Ll(n))&&!(n=Mo(n))&&Kn(t)?Wo(ir(t),0,r):t.split(n,r):[]}var lh=ps((function(e,t,n){return e+(n?" ":"")+wh(t)}));function fh(e,t,n){return e=Zl(e),n=null==n?0:yi(Gl(n),0,e.length),t=Mo(t),e.slice(n,n+t.length)==t}function hh(t,n,r){var i=Sr.templateSettings;r&&aa(t,n,r)&&(n=e),t=Zl(t),n=nf({},n,i,Ns);var o,a,u=nf({},n.imports,i.imports,Ns),c=Sf(u),l=Dn(u,c),f=0,h=n.interpolate||Qe,d="__p += '",p=rt((n.escape||Qe).source+"|"+h.source+"|"+(h===ke?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ft.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(f,u).replace(Je,$n),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),d+="';\n";var y=ft.call(n,"variable")&&n.variable;if(y){if(Fe.test(y))throw new Ze(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Sh((function(){return et(c,g+"return "+d).apply(e,l)}));if(v.source=d,_l(v))throw v;return v}function dh(e){return Zl(e).toLowerCase()}function ph(e){return Zl(e).toUpperCase()}function gh(t,n,r){if((t=Zl(t))&&(r||n===e))return jn(t);if(!t||!(n=Mo(n)))return t;var i=ir(t),o=ir(n);return Wo(i,Fn(i,o),Bn(i,o)+1).join("")}function yh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,0,Bn(i,ir(n))+1).join("")}function vh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,Fn(i,ir(n))).join("")}function mh(t,n){var r=x,i=I;if(Ol(n)){var o="separator"in n?n.separator:o;r="length"in n?Gl(n.length):r,i="omission"in n?Mo(n.omission):i}var s=(t=Zl(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var u=r-rr(i);if(u<1)return i;var c=a?Wo(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),Ll(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=rt(o.source,Zl(qe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===e?u:h)}}else if(t.indexOf(Mo(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function _h(e){return(e=Zl(e))&&Oe.test(e)?e.replace(Ee,sr):e}var bh=ps((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),wh=ds("toUpperCase");function Eh(t,n,r){return t=Zl(t),(n=r?e:n)===e?Gn(t)?cr(t):En(t):t.match(n)||[]}var Sh=wo((function(t,n){try{return an(t,e,n)}catch(e){return _l(e)?e:new Ze(e)}})),Oh=Ds((function(e,t){return cn(t,(function(t){t=Aa(t),pi(e,t,Nc(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=Vs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new ot(o);return[n(e[0]),e[1]]})):[],wo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return mi(vi(e,l))}function Rh(e){return function(){return e}}function kh(e,t){return null==e||e!=e?t:e}var Ch=ms(),Ph=ms(!0);function Ah(e){return e}function Nh(e){return to("function"==typeof e?e:vi(e,l))}function Th(e){return so(vi(e,l))}function Mh(e,t){return ao(e,vi(t,l))}var Lh=wo((function(e,t){return function(n){return qi(n,e,t)}})),jh=wo((function(e,t){return function(n){return qi(e,n,t)}}));function Uh(e,t,n){var r=Sf(t),i=Ti(t,r);null==n&&(!Ol(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ti(t,Sf(t)));var o=!(Ol(n)&&"chain"in n&&!n.chain),s=wl(e);return cn(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=is(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function Dh(){return Gt._===this&&(Gt._=yt),this}function zh(){}function Fh(e){return e=Gl(e),wo((function(t){return lo(t,e)}))}var Bh=Es(gn),Hh=Es(fn),qh=Es(_n);function Vh(e){return ua(e)?Cn(Aa(e)):go(e)}function $h(t){return function(n){return null==t?e:Mi(t,n)}}var Wh=xs(),Kh=xs(!0);function Gh(){return[]}function Yh(){return!1}function Qh(){return{}}function Jh(){return""}function Xh(){return!0}function Zh(e,t){if((e=Gl(e))<1||e>T)return[];var n=j,r=Qt(e,j);t=Vs(t),e-=j;for(var i=Mn(r,t);++n<e;)t(n);return i}function ed(e){return ul(e)?gn(e,Aa):zl(e)?[e]:is(Pa(Zl(e)))}function td(e){var t=++ht;return Zl(e)+t}var nd=ws((function(e,t){return e+t}),0),rd=ks("ceil"),id=ws((function(e,t){return e/t}),1),od=ks("floor");function sd(t){return t&&t.length?xi(t,Ah,Ui):e}function ad(t,n){return t&&t.length?xi(t,Vs(n,2),Ui):e}function ud(e){return kn(e,Ah)}function cd(e,t){return kn(e,Vs(t,2))}function ld(t){return t&&t.length?xi(t,Ah,io):e}function fd(t,n){return t&&t.length?xi(t,Vs(n,2),io):e}var hd=ws((function(e,t){return e*t}),1),dd=ks("round"),pd=ws((function(e,t){return e-t}),0);function gd(e){return e&&e.length?Tn(e,Ah):0}function yd(e,t){return e&&e.length?Tn(e,Vs(t,2)):0}return Sr.after=Cc,Sr.ary=Pc,Sr.assign=ef,Sr.assignIn=tf,Sr.assignInWith=nf,Sr.assignWith=rf,Sr.at=of,Sr.before=Ac,Sr.bind=Nc,Sr.bindAll=Oh,Sr.bindKey=Tc,Sr.castArray=Xc,Sr.chain=$u,Sr.chunk=La,Sr.compact=ja,Sr.concat=Ua,Sr.cond=xh,Sr.conforms=Ih,Sr.constant=Rh,Sr.countBy=nc,Sr.create=sf,Sr.curry=Mc,Sr.curryRight=Lc,Sr.debounce=jc,Sr.defaults=af,Sr.defaultsDeep=uf,Sr.defer=Uc,Sr.delay=Dc,Sr.difference=Da,Sr.differenceBy=za,Sr.differenceWith=Fa,Sr.drop=Ba,Sr.dropRight=Ha,Sr.dropRightWhile=qa,Sr.dropWhile=Va,Sr.fill=$a,Sr.filter=ic,Sr.flatMap=ac,Sr.flatMapDeep=uc,Sr.flatMapDepth=cc,Sr.flatten=Ga,Sr.flattenDeep=Ya,Sr.flattenDepth=Qa,Sr.flip=zc,Sr.flow=Ch,Sr.flowRight=Ph,Sr.fromPairs=Ja,Sr.functions=gf,Sr.functionsIn=yf,Sr.groupBy=hc,Sr.initial=eu,Sr.intersection=tu,Sr.intersectionBy=nu,Sr.intersectionWith=ru,Sr.invert=bf,Sr.invertBy=wf,Sr.invokeMap=pc,Sr.iteratee=Nh,Sr.keyBy=gc,Sr.keys=Sf,Sr.keysIn=Of,Sr.map=yc,Sr.mapKeys=xf,Sr.mapValues=If,Sr.matches=Th,Sr.matchesProperty=Mh,Sr.memoize=Fc,Sr.merge=Rf,Sr.mergeWith=kf,Sr.method=Lh,Sr.methodOf=jh,Sr.mixin=Uh,Sr.negate=Bc,Sr.nthArg=Fh,Sr.omit=Cf,Sr.omitBy=Pf,Sr.once=Hc,Sr.orderBy=vc,Sr.over=Bh,Sr.overArgs=qc,Sr.overEvery=Hh,Sr.overSome=qh,Sr.partial=Vc,Sr.partialRight=$c,Sr.partition=mc,Sr.pick=Af,Sr.pickBy=Nf,Sr.property=Vh,Sr.propertyOf=$h,Sr.pull=uu,Sr.pullAll=cu,Sr.pullAllBy=lu,Sr.pullAllWith=fu,Sr.pullAt=hu,Sr.range=Wh,Sr.rangeRight=Kh,Sr.rearg=Wc,Sr.reject=wc,Sr.remove=du,Sr.rest=Kc,Sr.reverse=pu,Sr.sampleSize=Sc,Sr.set=Mf,Sr.setWith=Lf,Sr.shuffle=Oc,Sr.slice=gu,Sr.sortBy=Rc,Sr.sortedUniq=Eu,Sr.sortedUniqBy=Su,Sr.split=ch,Sr.spread=Gc,Sr.tail=Ou,Sr.take=xu,Sr.takeRight=Iu,Sr.takeRightWhile=Ru,Sr.takeWhile=ku,Sr.tap=Wu,Sr.throttle=Yc,Sr.thru=Ku,Sr.toArray=Wl,Sr.toPairs=jf,Sr.toPairsIn=Uf,Sr.toPath=ed,Sr.toPlainObject=Jl,Sr.transform=Df,Sr.unary=Qc,Sr.union=Cu,Sr.unionBy=Pu,Sr.unionWith=Au,Sr.uniq=Nu,Sr.uniqBy=Tu,Sr.uniqWith=Mu,Sr.unset=zf,Sr.unzip=Lu,Sr.unzipWith=ju,Sr.update=Ff,Sr.updateWith=Bf,Sr.values=Hf,Sr.valuesIn=qf,Sr.without=Uu,Sr.words=Eh,Sr.wrap=Jc,Sr.xor=Du,Sr.xorBy=zu,Sr.xorWith=Fu,Sr.zip=Bu,Sr.zipObject=Hu,Sr.zipObjectDeep=qu,Sr.zipWith=Vu,Sr.entries=jf,Sr.entriesIn=Uf,Sr.extend=tf,Sr.extendWith=nf,Uh(Sr,Sr),Sr.add=nd,Sr.attempt=Sh,Sr.camelCase=Kf,Sr.capitalize=Gf,Sr.ceil=rd,Sr.clamp=Vf,Sr.clone=Zc,Sr.cloneDeep=tl,Sr.cloneDeepWith=nl,Sr.cloneWith=el,Sr.conformsTo=rl,Sr.deburr=Yf,Sr.defaultTo=kh,Sr.divide=id,Sr.endsWith=Qf,Sr.eq=il,Sr.escape=Jf,Sr.escapeRegExp=Xf,Sr.every=rc,Sr.find=oc,Sr.findIndex=Wa,Sr.findKey=cf,Sr.findLast=sc,Sr.findLastIndex=Ka,Sr.findLastKey=lf,Sr.floor=od,Sr.forEach=lc,Sr.forEachRight=fc,Sr.forIn=ff,Sr.forInRight=hf,Sr.forOwn=df,Sr.forOwnRight=pf,Sr.get=vf,Sr.gt=ol,Sr.gte=sl,Sr.has=mf,Sr.hasIn=_f,Sr.head=Xa,Sr.identity=Ah,Sr.includes=dc,Sr.indexOf=Za,Sr.inRange=$f,Sr.invoke=Ef,Sr.isArguments=al,Sr.isArray=ul,Sr.isArrayBuffer=cl,Sr.isArrayLike=ll,Sr.isArrayLikeObject=fl,Sr.isBoolean=hl,Sr.isBuffer=dl,Sr.isDate=pl,Sr.isElement=gl,Sr.isEmpty=yl,Sr.isEqual=vl,Sr.isEqualWith=ml,Sr.isError=_l,Sr.isFinite=bl,Sr.isFunction=wl,Sr.isInteger=El,Sr.isLength=Sl,Sr.isMap=Il,Sr.isMatch=Rl,Sr.isMatchWith=kl,Sr.isNaN=Cl,Sr.isNative=Pl,Sr.isNil=Nl,Sr.isNull=Al,Sr.isNumber=Tl,Sr.isObject=Ol,Sr.isObjectLike=xl,Sr.isPlainObject=Ml,Sr.isRegExp=Ll,Sr.isSafeInteger=jl,Sr.isSet=Ul,Sr.isString=Dl,Sr.isSymbol=zl,Sr.isTypedArray=Fl,Sr.isUndefined=Bl,Sr.isWeakMap=Hl,Sr.isWeakSet=ql,Sr.join=iu,Sr.kebabCase=Zf,Sr.last=ou,Sr.lastIndexOf=su,Sr.lowerCase=eh,Sr.lowerFirst=th,Sr.lt=Vl,Sr.lte=$l,Sr.max=sd,Sr.maxBy=ad,Sr.mean=ud,Sr.meanBy=cd,Sr.min=ld,Sr.minBy=fd,Sr.stubArray=Gh,Sr.stubFalse=Yh,Sr.stubObject=Qh,Sr.stubString=Jh,Sr.stubTrue=Xh,Sr.multiply=hd,Sr.nth=au,Sr.noConflict=Dh,Sr.noop=zh,Sr.now=kc,Sr.pad=nh,Sr.padEnd=rh,Sr.padStart=ih,Sr.parseInt=oh,Sr.random=Wf,Sr.reduce=_c,Sr.reduceRight=bc,Sr.repeat=sh,Sr.replace=ah,Sr.result=Tf,Sr.round=dd,Sr.runInContext=t,Sr.sample=Ec,Sr.size=xc,Sr.snakeCase=uh,Sr.some=Ic,Sr.sortedIndex=yu,Sr.sortedIndexBy=vu,Sr.sortedIndexOf=mu,Sr.sortedLastIndex=_u,Sr.sortedLastIndexBy=bu,Sr.sortedLastIndexOf=wu,Sr.startCase=lh,Sr.startsWith=fh,Sr.subtract=pd,Sr.sum=gd,Sr.sumBy=yd,Sr.template=hh,Sr.times=Zh,Sr.toFinite=Kl,Sr.toInteger=Gl,Sr.toLength=Yl,Sr.toLower=dh,Sr.toNumber=Ql,Sr.toSafeInteger=Xl,Sr.toString=Zl,Sr.toUpper=ph,Sr.trim=gh,Sr.trimEnd=yh,Sr.trimStart=vh,Sr.truncate=mh,Sr.unescape=_h,Sr.uniqueId=td,Sr.upperCase=bh,Sr.upperFirst=wh,Sr.each=lc,Sr.eachRight=fc,Sr.first=Xa,Uh(Sr,function(){var e={};return Ai(Sr,(function(t,n){ft.call(Sr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Sr.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sr[e].placeholder=Sr})),cn(["drop","take"],(function(t,n){Rr.prototype[t]=function(r){r=r===e?1:Yt(Gl(r),0);var i=this.__filtered__&&!n?new Rr(this):this.clone();return i.__filtered__?i.__takeCount__=Qt(r,i.__takeCount__):i.__views__.push({size:Qt(r,j),type:t+(i.__dir__<0?"Right":"")}),i},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),cn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||n==A;Rr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),cn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rr.prototype[e]=function(){return this[n](1).value()[0]}})),cn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rr.prototype[e]=function(){return this.__filtered__?new Rr(this):this[n](1)}})),Rr.prototype.compact=function(){return this.filter(Ah)},Rr.prototype.find=function(e){return this.filter(e).head()},Rr.prototype.findLast=function(e){return this.reverse().find(e)},Rr.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Rr(this):this.map((function(n){return qi(n,e,t)}))})),Rr.prototype.reject=function(e){return this.filter(Bc(Vs(e)))},Rr.prototype.slice=function(t,n){t=Gl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Gl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rr.prototype.toArray=function(){return this.take(j)},Ai(Rr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Sr[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Sr.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Rr,c=a[0],l=u||ul(n),f=function(e){var t=o.apply(Sr,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){n=g?n:new Rr(this);var y=t.apply(n,a);return y.__actions__.push({func:Ku,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Rr.prototype,(function(e,t){var n=Sr[t];if(n){var r=n.name+"";ft.call(pr,r)||(pr[r]=[]),pr[r].push({name:t,func:n})}})),pr[_s(e,y).name]=[{name:"wrapper",func:e}],Rr.prototype.clone=kr,Rr.prototype.reverse=Cr,Rr.prototype.value=Pr,Sr.prototype.at=Gu,Sr.prototype.chain=Yu,Sr.prototype.commit=Qu,Sr.prototype.next=Ju,Sr.prototype.plant=Zu,Sr.prototype.reverse=ec,Sr.prototype.toJSON=Sr.prototype.valueOf=Sr.prototype.value=tc,Sr.prototype.first=Sr.prototype.head,Rt&&(Sr.prototype[Rt]=Xu),Sr},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var wg=Object.defineProperty,Eg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Ig=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Rg(e,n,t[n]);if(Og)for(var n of Og(t))Ig.call(t,n)&&Rg(e,n,t[n]);return e},Cg=(e,t)=>Eg(e,Sg(t));function Pg(e,t,n){let r;const i=Ag(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${yg}?chainId=eip155:${i}&projectId=${n}`),r}function Ag(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Ng(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Tg(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Mg(e={},t={}){const n=Lg(e),r=Lg(t);return bg.exports.merge(n,r)}function Lg(e){var t,n,r,i;const o={};if(!dc(e))return o;for(const[s,a]of Object.entries(e)){const e=sc(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=ac(s);o[f]=Cg(kg(kg({},o[f]),a),{chains:zu(e,null==(t=o[f])?void 0:t.chains),methods:zu(u,null==(n=o[f])?void 0:n.methods),events:zu(c,null==(r=o[f])?void 0:r.events),rpcMap:kg(kg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function jg(e){return e.includes(":")?e.split(":")[2]:e}function Ug(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=sc(n)?[n]:r.chains?r.chains:Ng(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}const Dg={},zg=e=>Dg[e],Fg=(e,t)=>{Dg[e]=t};var Bg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=c,r.Request=_,r.Response=E),e.Headers=c,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(Bg,Bg.exports);var Hg=n(Bg.exports);const qg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Vg=10;class $g{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Hg(this.url,Object.assign(Object.assign({},qg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Hg(e,Object.assign(Object.assign({},qg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Vg&&this.events.setMaxListeners(Vg)}}class Wg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Kg{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Ag(e);if(!this.httpProviders[n]){const e=t||Pg(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ag(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Gg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Yg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Qg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Jg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Xg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}var Zg=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t)=>{for(var n in t||(t={}))ry.call(t,n)&&oy(e,n,t[n]);if(ny)for(var n of ny(t))iy.call(t,n)&&oy(e,n,t[n]);return e},ay=(e,t)=>ey(e,ty(t));class uy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||dg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new uy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:sy({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:fc("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=Ug(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Vp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(hc(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await hg.init({logger:this.providerOpts.logger||dg,relayUrl:this.providerOpts.relayUrl||pg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>ac(e))))];Fg("client",this.client),Fg("events",this.events),Fg("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Tg(e,this.session),n=Ng(t),r=Mg(this.namespaces,this.optionalNamespaces),i=ay(sy({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kg({namespace:i});break;case"solana":this.rpcProviders[e]=new Gg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Wg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&hc(e)&&this.events.emit("accountsChanged",e.map(jg))}else"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ay(sy({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ay(sy({},fc("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>ac(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=ac(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${gg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${gg}/${e}`)}}const cy=uy;e.UniversalProvider=cy,e.default=uy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Cc.exports);const Pc=["eth_sendTransaction","personal_sign"],Ac=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Nc=["chainChanged","accountsChanged"],Tc=["message","disconnect","connect"];function Mc(e){return Number(e[0].split(":")[1])}function Lc(e){return`0x${e.toString(16)}`}class jc{constructor(){this.events=new Ys.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new jc;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Ic(t))throw new Error("Invalid chains");const u=t,c=r||Pc,l=o||Nc,f={chains:u,methods:c,events:l,rpcMap:{[Mc(u)]:a[Mc(u)]}},h=null==o?void 0:o.filter((e=>!Nc.includes(e))),d=null==r?void 0:r.filter((e=>!Pc.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?u.concat(n||[]):n)],methods:[...new Set(c.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Lc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Lc(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=xc[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Lc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Pc,events:(null==e?void 0:e.events)||Nc,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Mc(this.rpc.chains),this.signer=yield Cc.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Ic(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Ic(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Uc=r("WalletConnectEvm"),Dc=i("WalletConnectEvm");function zc(){return c(this,void 0,void 0,(function*(){Uc("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){Uc("initWalletConnectProvider");const e=Yc();Uc("walletConnectProviderOptions is",e);const t=Ac;e.optionalMethods&&Array.isArray(e.optionalMethods)&&t.push(...e.optionalMethods.filter((e=>t.indexOf(e)<0)));const n=Tc;e.optionalEvents&&Array.isArray(e.optionalEvents)&&t.push(...e.optionalEvents.filter((e=>n.indexOf(e)<0)));const r={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:t,events:e.events,optionalEvents:n,rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};Uc("ethereum init options are",r),Uc("creating a new provider instance");try{return jc.init(r)}catch(e){throw Dc("Error while initializing ethereum provider"),e}}))}();return function(e){if(Uc("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Uc("connectHandler",e),Jo(!1)}function r(n){Uc("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("session_delete",r),Uc("provider is",e)}(e),e.request=function(e){Uc("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Yc();return Uc("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Uc("calling patched",r,i),Uc("handling display_uri once"),e.once("display_uri",Fc),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){var u,c;try{(null===(u=null==e?void 0:e.session)||void 0===u?void 0:u.connected)?(Uc("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{Dc("user rejected"),s(new a)}},qs("UseLedgerLiveModal",{isDesktop:"desktop"===Bs().type,uri:c.uri,onClose:c.onClose}),Uc("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return Dc("error",e),s(e)}}))))):(Uc("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Dc("error",t),t}}))}function Fc(e){Uc("displayUriHandler",e),Ts(e)}const Bc=r("getProvider"),Hc=[1];var qc,Vc;let $c;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(qc||(qc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Vc||(Vc={}));const Wc=e=>(Bc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),Kc=r("supportOptions");let Gc;const Yc=()=>(Kc("getSupportOptions"),Gc),Qc=r("ExtensionEvm"),Jc="ethereum",Xc="isLedgerConnect";var Zc;function el(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function tl(e){return!!Zc[e]}function nl(e){return e.every(tl)}function rl(){if(Qc("getEthereumProvider"),"undefined"==typeof window)throw new u;let e=window[Jc];if(Qc("provider is",e),void 0===e||void 0===e[Xc])throw new o;const t=Yc(),n=Wc(t.chainId||0);return Wc(e.chainId)!=n&&(Qc("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Zc||(Zc={}));const il=r("support");let ol;var sl=Object.freeze({__proto__:null,link:function(e,t,n,r){var i=this;return e?((e instanceof Element?[e]:"toArray"in e?e.toArray():e).forEach((function(e){e.addEventListener("click",(function(o){var s,a,u=t instanceof Function?t(e):t,c=n instanceof Function?n(e):n,l=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(s=e.getElementsByTagName("a")[0])||void 0===s?void 0:s.getAttribute("href")),f=Dt(i.track(u,c,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(e,t){return!("_blank"!==e.target||!t)})(e,l)||function(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this},form:function(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach((function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var s;o.preventDefault?o.preventDefault():o.returnValue=!1;var a=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;Dt(i.track(a,u,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500).catch(console.error).then((function(){e.submit()})).catch(console.error)},s=window.jQuery||window.Zepto;s?s(e).submit(o):e.addEventListener("submit",o,!1)})),this):this}});function al(e,t){return Object.keys(t).reduce((function(n,r){r.startsWith(e)&&(n[r.substr(e.length)]=t[r]);return n}),{})}for(var ul=Object.freeze({__proto__:null,queryString:function(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=yn(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=Mt(e.options.useQueryString)?e.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,h=void 0===f?/.+/:f;if(a){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&e.setAnonymousId(d)}if(o){var p=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(h.test(p)){var g=al("ajs_trait_",r);i.push(e.identify(p,g))}}if(s){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,v=al("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),cl={},ll={},fl=[],hl=0;hl<64;)fl[hl]=0|4294967296*Math.sin(++hl%Math.PI);var dl=Object.freeze({__proto__:null,default:function(e){var t,n,r,i=[t=1732584193,n=4023233417,~t,~n],o=[],s=unescape(encodeURI(e))+"",a=s.length;for(e=--a/4+2|15,o[--e]=8*a;~a;)o[a>>2]|=s.charCodeAt(a)<<8*a--;for(hl=s=0;hl<e;hl+=16){for(a=i;s<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=s>>4]+fl[s]+~~o[hl|15&[s,5*s+1,3*s+5,7*s][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+s++%4])|r>>>-a),t,n])t=0|a[1],n=a[2];for(s=4;s;)i[--s]+=a[s]}for(e="";s<32;)e+=(i[s>>3]>>4*(1^s++)&15).toString(16);return e}}),pl=h(dl),gl={exports:{}};!function(e,t){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}(gl);
|
329
|
+
*/mg=bg,_g=bg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,x=30,I="...",R=800,k=16,C=1,P=2,A=3,N=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,j=4294967295,U=j-1,D=j>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],F="[object Arguments]",B="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",$="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),xe=RegExp(Se.source),Ie=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ne.source),Me=/^\s+/,Le=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/[()=,{}\[\]\/\s]/,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ut="["+Ze+"]",ct="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ct+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ut+"|"+dt+")?",Ot="["+rt+"]?",xt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rt=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",kt="(?:"+[lt,gt,yt].join("|")+")"+Rt,Ct="(?:"+[pt+ut+"?",ut,gt,yt,st].join("|")+")",Pt=RegExp(ot,"g"),At=RegExp(ut,"g"),Nt=RegExp(dt+"(?="+dt+")|"+Ct+Rt,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,It,xt,ct,kt].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[F]=Dt[B]=Dt[ue]=Dt[q]=Dt[ce]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[F]=zt[B]=zt[ue]=zt[ce]=zt[q]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Ft={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'"},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,$t=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=_g&&!_g.nodeType&&_g,Qt=Yt&&mg&&!mg.nodeType&&mg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function un(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function cn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&xn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Cn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xn(e,t,n){return t==t?tr(e,t,n):On(e,Rn,n)}function In(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rn(e){return e!=e}function kn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Cn(t){return function(n){return null==n?e:n[t]}}function Pn(t){return function(n){return null==t?e:t[n]}}function An(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function jn(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function Un(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Fn(e,t){for(var n=-1,r=e.length;++n<r&&xn(t,e[n],0)>-1;);return n}function Bn(e,t){for(var n=e.length;n--&&xn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Ft),Vn=Pn(Bt);function $n(e){return"\\"+qt[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===c)&&(e[n]=c,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?ur(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=Pn(Ht);function ar(e){for(var t=Nt.lastIndex=0;Nt.test(e);)++t;return t}function ur(e){return e.match(Nt)||[]}function cr(e){return e.match(Tt)||[]}var lr=function t(Le){var ze=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,jt))).Array,Xe=Le.Date,Ze=Le.Error,et=Le.Function,tt=Le.Math,nt=Le.Object,rt=Le.RegExp,it=Le.String,ot=Le.TypeError,st=ze.prototype,at=et.prototype,ut=nt.prototype,ct=Le["__core-js_shared__"],lt=at.toString,ft=ut.hasOwnProperty,ht=0,dt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=ut.toString,gt=lt.call(nt),yt=Gt._,vt=rt("^"+lt.call(ft).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Jt?Le.Buffer:e,_t=Le.Symbol,bt=Le.Uint8Array,wt=mt?mt.allocUnsafe:e,Et=Jn(nt.getPrototypeOf,nt),St=nt.create,Ot=ut.propertyIsEnumerable,xt=st.splice,It=_t?_t.isConcatSpreadable:e,Rt=_t?_t.iterator:e,kt=_t?_t.toStringTag:e,Ct=function(){try{var e=Ks(nt,"defineProperty");return e({},"",{}),e}catch{}}(),Nt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Tt=Xe&&Xe.now!==Gt.Date.now&&Xe.now,Mt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Lt=tt.ceil,Ft=tt.floor,Bt=nt.getOwnPropertySymbols,Ht=mt?mt.isBuffer:e,qt=Le.isFinite,Wt=st.join,Kt=Jn(nt.keys,nt),Yt=tt.max,Qt=tt.min,Xt=Xe.now,Zt=Le.parseInt,bn=tt.random,wn=st.reverse,Pn=Ks(Le,"DataView"),tr=Ks(Le,"Map"),ar=Ks(Le,"Promise"),ur=Ks(Le,"Set"),lr=Ks(Le,"WeakMap"),hr=Ks(nt,"create"),dr=lr&&new lr,pr={},gr=Na(Pn),yr=Na(tr),vr=Na(ar),mr=Na(ur),_r=Na(lr),br=_t?_t.prototype:e,wr=br?br.valueOf:e,Er=br?br.toString:e;function Sr(e){if(xl(e)&&!ul(e)&&!(e instanceof Rr)){if(e instanceof Ir)return e;if(ft.call(e,"__wrapped__"))return Ma(e)}return new Ir(e)}var Or=function(){function t(){}return function(n){if(!Ol(n))return{};if(St)return St(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Rr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(){var e=new Rr(this.__wrapped__);return e.__actions__=is(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=is(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=is(this.__views__),e}function Cr(){if(this.__filtered__){var e=new Rr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Pr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Xs(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Qt(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return zo(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==P)y=b;else if(!b){if(_==C)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nr(){this.__data__=hr?hr(null):{},this.size=0}function Tr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mr(t){var n=this.__data__;if(hr){var r=n[t];return r===a?e:r}return ft.call(n,t)?n[t]:e}function Lr(t){var n=this.__data__;return hr?n[t]!==e:ft.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hr&&n===e?a:n,this}function Ur(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(){this.__data__=[],this.size=0}function zr(e){var t=this.__data__,n=li(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=li(n,t);return r<0?e:n[r][1]}function Br(e){return li(this.__data__,e)>-1}function Hr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vr(){this.size=0,this.__data__={hash:new Ar,map:new(tr||Ur),string:new Ar}}function $r(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}function Wr(e){return $s(this,e).get(e)}function Kr(e){return $s(this,e).has(e)}function Gr(e,t){var n=$s(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}function Qr(e){return this.__data__.set(e,a),this}function Jr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Ur(e);this.size=t.size}function Zr(){this.__data__=new Ur,this.size=0}function ei(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Ur){var i=n.__data__;if(!tr||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(i)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=ul(e),r=!n&&al(e),i=!n&&!r&&dl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,it):[],u=a.length;for(var c in e)(t||ft.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,u)))&&a.push(c);return a}function oi(t){var n=t.length;return n?t[mo(0,n-1)]:e}function si(e,t){return Ca(is(e),yi(t,0,e.length))}function ai(e){return Ca(is(e))}function ui(t,n,r){(r!==e&&!il(t[n],r)||r===e&&!(n in t))&&pi(t,n,r)}function ci(t,n,r){var i=t[n];(!ft.call(t,n)||!il(i,r)||r===e&&!(n in t))&&pi(t,n,r)}function li(e,t){for(var n=e.length;n--;)if(il(e[n][0],t))return n;return-1}function fi(e,t,n,r){return Ei(e,(function(e,i,o){t(r,e,n(e),o)})),r}function hi(e,t){return e&&os(t,Sf(t),e)}function di(e,t){return e&&os(t,Of(t),e)}function pi(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(t,n){for(var r=-1,i=n.length,o=ze(i),s=null==t;++r<i;)o[r]=s?e:vf(t,n[r]);return o}function yi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function vi(t,n,r,i,o,s){var a,u=n&l,c=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Ol(t))return t;var p=ul(t);if(p){if(a=ta(t),!u)return is(t,a)}else{var g=Js(t),y=g==K||g==G;if(dl(t))return Go(t,u);if(g==X||g==F||y&&!o){if(a=c||y?{}:na(t),!u)return c?as(t,di(a,t)):ss(t,hi(a,t))}else{if(!zt[g])return o?t:{};a=ra(t,g,u)}}s||(s=new Xr);var v=s.get(t);if(v)return v;s.set(t,a),Ul(t)?t.forEach((function(e){a.add(vi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,vi(e,n,r,i,t,s))}));var m=p?e:(d?c?Fs:zs:c?Of:Sf)(t);return cn(m||t,(function(e,i){m&&(e=t[i=e]),ci(a,i,vi(e,n,r,i,t,s))})),a}function mi(e){var t=Sf(e);return function(n){return _i(n,e,t)}}function _i(t,n,r){var i=r.length;if(null==t)return!i;for(t=nt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function bi(t,n,r){if("function"!=typeof t)throw new ot(o);return xa((function(){t.apply(e,r)}),n)}function wi(e,t,n,i){var o=-1,s=dn,a=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=gn(t,Un(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Yr(t));e:for(;++o<u;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(f)}else s(t,h,i)||c.push(f)}return c}Sr.templateSettings={escape:Ie,evaluate:Re,interpolate:ke,variable:"",imports:{_:Sr}},Sr.prototype=xr.prototype,Sr.prototype.constructor=Sr,Ir.prototype=Or(xr.prototype),Ir.prototype.constructor=Ir,Rr.prototype=Or(xr.prototype),Rr.prototype.constructor=Rr,Ar.prototype.clear=Nr,Ar.prototype.delete=Tr,Ar.prototype.get=Mr,Ar.prototype.has=Lr,Ar.prototype.set=jr,Ur.prototype.clear=Dr,Ur.prototype.delete=zr,Ur.prototype.get=Fr,Ur.prototype.has=Br,Ur.prototype.set=Hr,qr.prototype.clear=Vr,qr.prototype.delete=$r,qr.prototype.get=Wr,qr.prototype.has=Kr,qr.prototype.set=Gr,Yr.prototype.add=Yr.prototype.push=Qr,Yr.prototype.has=Jr,Xr.prototype.clear=Zr,Xr.prototype.delete=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var Ei=ls(Ai),Si=ls(Ni,!0);function Oi(e,t){var n=!0;return Ei(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(u===e?a==a&&!zl(a):r(a,u)))var u=a,c=s}return c}function Ii(t,n,r,i){var o=t.length;for((r=Gl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Gl(i))<0&&(i+=o),i=r>i?0:Yl(i);r<i;)t[r++]=n;return t}function Ri(e,t){var n=[];return Ei(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ki(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?ki(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var Ci=fs(),Pi=fs(!0);function Ai(e,t){return e&&Ci(e,t,Sf)}function Ni(e,t){return e&&Pi(e,t,Sf)}function Ti(e,t){return hn(t,(function(t){return wl(e[t])}))}function Mi(t,n){for(var r=0,i=(n=Vo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Li(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:kt&&kt in nt(t)?Gs(t):_a(t)}function Ui(e,t){return e>t}function Di(e,t){return null!=e&&ft.call(e,t)}function zi(e,t){return null!=e&&t in nt(e)}function Fi(e,t,n){return e>=Qt(t,n)&&e<Yt(t,n)}function Bi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,u=ze(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,Un(n))),c=Qt(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Yr(a&&f):e}f=t[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Hi(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function qi(t,n,r){var i=null==(t=wa(t,n=Vo(n,t)))?t:t[Aa(ou(n))];return null==i?e:an(i,t,r)}function Vi(e){return xl(e)&&ji(e)==F}function $i(e){return xl(e)&&ji(e)==ue}function Wi(e){return xl(e)&&ji(e)==V}function Ki(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Gi(e,t,n,r,Ki,i))}function Gi(e,t,n,r,i,o){var s=ul(e),a=ul(t),u=s?B:Js(e),c=a?B:Js(t),l=(u=u==F?X:u)==X,f=(c=c==F?X:c)==X,h=u==c;if(h&&dl(e)){if(!dl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Xr),s||Fl(e)?Ls(e,t,n,r,i,o):js(e,t,u,n,r,i,o);if(!(n&d)){var p=l&&ft.call(e,"__wrapped__"),g=f&&ft.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Xr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Xr),Us(e,t,n,r,i,o))}function Yi(e){return xl(e)&&Js(e)==Y}function Qi(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=nt(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],l=t[c],f=u[1];if(a&&u[2]){if(l===e&&!(c in t))return!1}else{var h=new Xr;if(i)var g=i(l,f,c,t,n,h);if(!(g===e?Ki(f,l,d|p,i,h):g))return!1}}return!0}function Ji(e){return!(!Ol(e)||fa(e))&&(wl(e)?vt:We).test(Na(e))}function Xi(e){return xl(e)&&ji(e)==te}function Zi(e){return xl(e)&&Js(e)==ne}function eo(e){return xl(e)&&Sl(e.length)&&!!Dt[ji(e)]}function to(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?ao(e[0],e[1]):so(e):Vh(e)}function no(e){if(!da(e))return Kt(e);var t=[];for(var n in nt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!Ol(e))return ma(e);var t=da(e),n=[];for(var r in e)"constructor"==r&&(t||!ft.call(e,r))||n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var n=-1,r=ll(e)?ze(e.length):[];return Ei(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function so(e){var t=Ws(e);return 1==t.length&&t[0][2]?ga(t[0][0],t[0][1]):function(n){return n===e||Qi(n,e,t)}}function ao(t,n){return ua(t)&&pa(n)?ga(Aa(t),n):function(r){var i=vf(r,t);return i===e&&i===n?_f(r,t):Ki(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&Ci(n,(function(s,a){if(o||(o=new Xr),Ol(s))co(t,n,a,r,uo,i,o);else{var u=i?i(Sa(t,a),s,a+"",t,n,o):e;u===e&&(u=s),ui(t,a,u)}}),Of)}function co(t,n,r,i,o,s,a){var u=Sa(t,r),c=Sa(n,r),l=a.get(c);if(l)ui(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=ul(c),p=!d&&dl(c),g=!d&&!p&&Fl(c);f=c,d||p||g?ul(u)?f=u:fl(u)?f=is(u):p?(h=!1,f=Go(c,!0)):g?(h=!1,f=Zo(c,!0)):f=[]:Ml(c)||al(c)?(f=u,al(u)?f=Jl(u):(!Ol(u)||wl(u))&&(f=na(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),ui(t,r,f)}}function lo(t,n){var r=t.length;if(r)return sa(n+=n<0?r:0,r)?t[n]:e}function fo(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Mi(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,Un(Vs()));var i=oo(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return Nn(i,(function(e,t){return ts(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return _f(e,n)}))}function po(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Mi(e,s);n(a,s)&&Oo(o,Vo(s,e),a)}return o}function go(e){return function(t){return Mi(t,e)}}function yo(e,t,n,r){var i=r?In:xn,o=-1,s=t.length,a=e;for(e===t&&(t=is(t)),n&&(a=gn(e,Un(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function vo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;sa(i)?xt.call(e,i,1):jo(e,i)}}return e}function mo(e,t){return e+Ft(bn()*(t-e+1))}function _o(e,t,n,r){for(var i=-1,o=Yt(Lt((t-e)/(n||1)),0),s=ze(o);o--;)s[r?o:++i]=e,e+=n;return s}function bo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function wo(e,t){return Ia(ba(e,t,Ah),e+"")}function Eo(e){return oi(Hf(e))}function So(e,t){var n=Hf(e);return Ca(n,yi(t,0,n.length))}function Oo(t,n,r,i){if(!Ol(t))return t;for(var o=-1,s=(n=Vo(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Aa(n[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var f=u[c];(l=i?i(f,c,u):e)===e&&(l=Ol(f)?f:sa(n[o+1])?[]:{})}ci(u,c,l),u=u[c]}return t}var xo=dr?function(e,t){return dr.set(e,t),e}:Ah,Io=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Rh(t),writable:!0})}:Ah;function Ro(e){return Ca(Hf(e))}function ko(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ze(i);++r<i;)o[r]=e[r+t];return o}function Co(e,t){var n;return Ei(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Po(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!zl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,c=zl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=zl(h);if(a)var v=i||g;else v=l?g&&(i||d):u?g&&d&&(i||!p):c?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Qt(s,U)}function No(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!il(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function To(e){return"number"==typeof e?e:zl(e)?L:+e}function Mo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Mo)+"";if(zl(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Lo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:Cs(e);if(l)return Zn(l);a=!1,o=zn,c=new Yr}else c=t?[]:u;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function jo(e,t){return null==(e=wa(e,t=Vo(t,e)))||delete e[Aa(ou(t))]}function Uo(e,t,n,r){return Oo(e,t,n(Mi(e,t)),r)}function Do(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ko(e,r?0:o,r?o+1:i):ko(e,r?o+1:0,r?i:o)}function zo(e,t){var n=e;return n instanceof Rr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Lo(e[0]):[];for(var i=-1,o=ze(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=wi(o[i]||s,e[a],t,n));return Lo(ki(o,1),t,n)}function Bo(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var u=i<s?n[i]:e;r(a,t[i],u)}return a}function Ho(e){return fl(e)?e:[]}function qo(e){return"function"==typeof e?e:Ah}function Vo(e,t){return ul(e)?e:ua(e,t)?[e]:Pa(Zl(e))}var $o=wo;function Wo(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ko(t,n,r)}var Ko=Nt||function(e){return Gt.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Yo(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Qo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jo(e){var t=new e.constructor(e.source,qe.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return wr?nt(wr.call(e)):{}}function Zo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function es(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=zl(t),a=n!==e,u=null===n,c=n==n,l=zl(n);if(!u&&!l&&!s&&t>n||s&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function ts(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=es(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ns(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Yt(o-s,0),l=ze(u+c),f=!r;++a<u;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function rs(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Yt(o-a,0),f=ze(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function is(e,t){var n=-1,r=e.length;for(t||(t=ze(r));++n<r;)t[n]=e[n];return t}function os(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],c=i?i(r[u],t[u],u,r,t):e;c===e&&(c=t[u]),o?pi(r,u,c):ci(r,u,c)}return r}function ss(e,t){return os(e,Ys(e),t)}function as(e,t){return os(e,Qs(e),t)}function us(e,t){return function(n,r){var i=ul(n)?un:fi,o=t?t():{};return i(n,e,Vs(r,2),o)}}function cs(t){return wo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&aa(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=nt(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function ls(e,t){return function(n,r){if(null==n)return n;if(!ll(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=nt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fs(e){return function(t,n,r){for(var i=-1,o=nt(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function hs(e,t,n){var r=t&g,i=gs(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ds(t){return function(n){var r=Kn(n=Zl(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Wo(r,1).join(""):n.slice(1);return i[t]()+o}}function ps(e){return function(t){return vn(Eh(Yf(t).replace(Pt,"")),e,"")}}function gs(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Or(e.prototype),r=e.apply(n,t);return Ol(r)?r:n}}function ys(t,n,r){var i=gs(t);function o(){for(var s=arguments.length,a=ze(s),u=s,c=qs(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:Xn(a,c);return(s-=l.length)<r?Rs(t,n,_s,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function vs(t){return function(n,r,i){var o=nt(n);if(!ll(n)){var s=Vs(r,3);n=Sf(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function ms(t){return Ds((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new ot(o);if(s&&!u&&"wrapper"==Hs(a))var u=new Ir([],!0)}for(i=u?i:r;++i<r;){var c=Hs(a=n[i]),l="wrapper"==c?Bs(a):e;u=l&&la(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?u[Hs(l[0])].apply(u,l[3]):1==a.length&&la(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&ul(t))return u.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function _s(t,n,r,i,o,s,a,u,c,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:gs(t);function w(){for(var e=arguments.length,g=ze(e),y=e;y--;)g[y]=arguments[y];if(p)var m=qs(w),_=Hn(g,m);if(i&&(g=ns(g,i,o,p)),s&&(g=rs(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Rs(t,n,_s,w.placeholder,r,g,E,u,c,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,u?g=Ea(g,u):v&&e>1&&g.reverse(),f&&c<e&&(g.length=c),this&&this!==Gt&&this instanceof w&&(O=b||gs(O)),O.apply(S,g)}return w}function bs(e,t){return function(n,r){return Hi(n,e,t(r),{})}}function ws(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Mo(r),i=Mo(i)):(r=To(r),i=To(i)),o=t(r,i)}return o}}function Es(e){return Ds((function(t){return t=gn(t,Un(Vs())),wo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Ss(t,n){var r=(n=n===e?" ":Mo(n)).length;if(r<2)return r?bo(n,t):n;var i=bo(n,Lt(t/rr(n)));return Kn(n)?Wo(ir(i),0,t).join(""):i.slice(0,t)}function Os(e,t,n,r){var i=t&g,o=gs(e);function s(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=ze(c+a),f=this&&this!==Gt&&this instanceof s?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&aa(n,r,i)&&(r=i=e),n=Kl(n),r===e?(r=n,n=0):r=Kl(r),_o(n,r,i=i===e?n<r?1:-1:Kl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ql(t),n=Ql(n)),e(t,n)}}function Rs(t,n,r,i,o,s,a,u,c,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,u,c,l],d=r.apply(e,h);return la(t)&&Oa(d,h),d.placeholder=i,Ra(d,t,n)}function ks(e){var t=tt[e];return function(e,n){if(e=Ql(e),(n=null==n?0:Qt(Gl(n),292))&&qt(e)){var r=(Zl(e)+"e").split("e");return+((r=(Zl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Cs=ur&&1/Zn(new ur([,-0]))[1]==N?function(e){return new ur(e)}:zh;function Ps(e){return function(t){var n=Js(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,u,c){var l=n&y;if(!l&&"function"!=typeof t)throw new ot(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),u=u===e?u:Yt(Gl(u),0),c=c===e?c:Gl(c),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Bs(t),v=[t,n,r,i,s,h,d,a,u,c];if(p&&va(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(c=v[9]=v[9]===e?l?0:t.length:Yt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?ys(t,n,c):n!=b&&n!=(g|b)||s.length?_s.apply(e,v):Os(t,n,r,i);else var E=hs(t,n,r);return Ra((p?xo:Oa)(E,v),t,n)}function Ns(t,n,r,i){return t===e||il(t,ut[r])&&!ft.call(i,r)?n:t}function Ts(t,n,r,i,o,s){return Ol(t)&&Ol(n)&&(s.set(n,t),uo(t,n,e,Ts,s),s.delete(n)),t}function Ms(t){return Ml(t)?e:t}function Ls(t,n,r,i,o,s){var a=r&d,u=t.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Yr:e;for(s.set(t,n),s.set(n,t);++h<u;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case q:case V:case Q:return il(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var u=r&d;if(a||(a=Zn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=p,s.set(e,t);var l=Ls(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(wr)return wr.call(e)==wr.call(t)}return!1}function Us(t,n,r,i,o,s){var a=r&d,u=zs(t),c=u.length;if(c!=zs(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:ft.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<c;){var v=t[f=u[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function Ds(t){return Ia(ba(t,e,Ga),t+"")}function zs(e){return Li(e,Sf,Ys)}function Fs(e){return Li(e,Of,Qs)}var Bs=dr?function(e){return dr.get(e)}:zh;function Hs(e){for(var t=e.name+"",n=pr[t],r=ft.call(pr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function qs(e){return(ft.call(Sr,"placeholder")?Sr:e).placeholder}function Vs(){var e=Sr.iteratee||Nh;return e=e===Nh?to:e,arguments.length?e(arguments[0],arguments[1]):e}function $s(e,t){var n=e.__data__;return ca(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ws(e){for(var t=Sf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function Ks(t,n){var r=Wn(t,n);return Ji(r)?r:e}function Gs(t){var n=ft.call(t,kt),r=t[kt];try{t[kt]=e;var i=!0}catch{}var o=pt.call(t);return i&&(n?t[kt]=r:delete t[kt]),o}var Ys=Bt?function(e){return null==e?[]:(e=nt(e),hn(Bt(e),(function(t){return Ot.call(e,t)})))}:Gh,Qs=Bt?function(e){for(var t=[];e;)yn(t,Ys(e)),e=Et(e);return t}:Gh,Js=ji;function Xs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Qt(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(Ue);return t?t[1].split(De):[]}function ea(e,t,n){for(var r=-1,i=(t=Vo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sl(i)&&sa(s,i)&&(ul(e)||al(e))}function ta(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function na(e){return"function"!=typeof e.constructor||da(e)?{}:Or(Et(e))}function ra(e,t,n){var r=e.constructor;switch(t){case ue:return Yo(e);case q:case V:return new r(+e);case ce:return Qo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return Zo(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Jo(e);case ne:return new r;case ie:return Xo(e)}}function ia(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}function oa(e){return ul(e)||al(e)||!!(It&&e&&e[It])}function sa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function aa(e,t,n){if(!Ol(n))return!1;var r=typeof t;return!!("number"==r?ll(n)&&sa(t,n.length):"string"==r&&t in n)&&il(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!zl(e))||Pe.test(e)||!Ce.test(e)||null!=t&&e in nt(t)}function ca(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function la(e){var t=Hs(e),n=Sr[t];if("function"!=typeof n||!(t in Rr.prototype))return!1;if(e===n)return!0;var r=Bs(n);return!!r&&e===r[0]}function fa(e){return!!dt&&dt in e}(Pn&&Js(new Pn(new ArrayBuffer(1)))!=ce||tr&&Js(new tr)!=Y||ar&&Js(ar.resolve())!=Z||ur&&Js(new ur)!=ne||lr&&Js(new lr)!=se)&&(Js=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Na(r):"";if(i)switch(i){case gr:return ce;case yr:return Y;case vr:return Z;case mr:return ne;case _r:return se}return n});var ha=ct?wl:Yh;function da(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function pa(e){return e==e&&!Ol(e)}function ga(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in nt(r))}}function ya(e){var t=Fc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function va(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var u=e[3];e[3]=u?ns(u,a,t[4]):a,e[4]=u?Xn(e[3],c):t[4]}return(a=t[5])&&(u=e[5],e[5]=u?rs(u,a,t[6]):a,e[6]=u?Xn(e[5],c):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Qt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ma(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function _a(e){return pt.call(e)}function ba(t,n,r){return n=Yt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Yt(e.length-n,0),s=ze(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ze(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function wa(e,t){return t.length<2?e:Mi(e,ko(t,0,-1))}function Ea(t,n){for(var r=t.length,i=Qt(n.length,r),o=is(t);i--;){var s=n[i];t[i]=sa(s,r)?o[s]:e}return t}function Sa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oa=ka(xo),xa=Mt||function(e,t){return Gt.setTimeout(e,t)},Ia=ka(Io);function Ra(e,t,n){var r=t+"";return Ia(e,ia(r,Ta(Zs(r),n)))}function ka(t){var n=0,r=0;return function(){var i=Xt(),o=k-(i-r);if(r=i,o>0){if(++n>=R)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ca(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=mo(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Pa=ya((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ae,(function(e,n,r,i){t.push(r?i.replace(Be,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||zl(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Na(e){if(null!=e){try{return lt.call(e)}catch{}try{return e+""}catch{}}return""}function Ta(e,t){return cn(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function Ma(e){if(e instanceof Rr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=is(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function La(t,n,r){n=(r?aa(t,n,r):n===e)?1:Yt(Gl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ze(Lt(i/n));o<i;)a[s++]=ko(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Ua(){var e=arguments.length;if(!e)return[];for(var t=ze(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?is(n):[n],ki(t,1))}var Da=wo((function(e,t){return fl(e)?wi(e,ki(t,1,fl,!0)):[]})),za=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),Vs(r,2)):[]})),Fa=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),e,r):[]}));function Ba(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=r||n===e?1:Gl(n))<0?0:n,i):[]}function Ha(t,n,r){var i=null==t?0:t.length;return i?ko(t,0,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n):[]}function qa(e,t){return e&&e.length?Do(e,Vs(t,3),!0,!0):[]}function Va(e,t){return e&&e.length?Do(e,Vs(t,3),!0):[]}function $a(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&aa(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Wa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),On(e,Vs(t,3),i)}function Ka(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Gl(r),o=r<0?Yt(i+o,0):Qt(o,i-1)),On(t,Vs(n,3),o,!0)}function Ga(e){return null!=e&&e.length?ki(e,1):[]}function Ya(e){return null!=e&&e.length?ki(e,N):[]}function Qa(t,n){return null!=t&&t.length?ki(t,n=n===e?1:Gl(n)):[]}function Ja(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Xa(t){return t&&t.length?t[0]:e}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),xn(e,t,i)}function eu(e){return null!=e&&e.length?ko(e,0,-1):[]}var tu=wo((function(e){var t=gn(e,Ho);return t.length&&t[0]===e[0]?Bi(t):[]})),nu=wo((function(t){var n=ou(t),r=gn(t,Ho);return n===ou(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Bi(r,Vs(n,2)):[]})),ru=wo((function(t){var n=ou(t),r=gn(t,Ho);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Bi(r,e,n):[]}));function iu(e,t){return null==e?"":Wt.call(e,t)}function ou(t){var n=null==t?0:t.length;return n?t[n-1]:e}function su(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Gl(r))<0?Yt(i+o,0):Qt(o,i-1)),n==n?nr(t,n,o):On(t,Rn,o,!0)}function au(t,n){return t&&t.length?lo(t,Gl(n)):e}var uu=wo(cu);function cu(e,t){return e&&e.length&&t&&t.length?yo(e,t):e}function lu(e,t,n){return e&&e.length&&t&&t.length?yo(e,t,Vs(n,2)):e}function fu(t,n,r){return t&&t.length&&n&&n.length?yo(t,n,e,r):t}var hu=Ds((function(e,t){var n=null==e?0:e.length,r=gi(e,t);return vo(e,gn(t,(function(e){return sa(e,n)?+e:e})).sort(es)),r}));function du(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return vo(e,i),n}function pu(e){return null==e?e:wn.call(e)}function gu(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&aa(t,n,r)?(n=0,r=i):(n=null==n?0:Gl(n),r=r===e?i:Gl(r)),ko(t,n,r)):[]}function yu(e,t){return Po(e,t)}function vu(e,t,n){return Ao(e,t,Vs(n,2))}function mu(e,t){var n=null==e?0:e.length;if(n){var r=Po(e,t);if(r<n&&il(e[r],t))return r}return-1}function _u(e,t){return Po(e,t,!0)}function bu(e,t,n){return Ao(e,t,Vs(n,2),!0)}function wu(e,t){if(null!=e&&e.length){var n=Po(e,t,!0)-1;if(il(e[n],t))return n}return-1}function Eu(e){return e&&e.length?No(e):[]}function Su(e,t){return e&&e.length?No(e,Vs(t,2)):[]}function Ou(e){var t=null==e?0:e.length;return t?ko(e,1,t):[]}function xu(t,n,r){return t&&t.length?ko(t,0,(n=r||n===e?1:Gl(n))<0?0:n):[]}function Iu(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n,i):[]}function Ru(e,t){return e&&e.length?Do(e,Vs(t,3),!1,!0):[]}function ku(e,t){return e&&e.length?Do(e,Vs(t,3)):[]}var Cu=wo((function(e){return Lo(ki(e,1,fl,!0))})),Pu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Lo(ki(t,1,fl,!0),Vs(n,2))})),Au=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Lo(ki(t,1,fl,!0),e,n)}));function Nu(e){return e&&e.length?Lo(e):[]}function Tu(e,t){return e&&e.length?Lo(e,Vs(t,2)):[]}function Mu(t,n){return n="function"==typeof n?n:e,t&&t.length?Lo(t,e,n):[]}function Lu(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(fl(e))return t=Yt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Cn(t))}))}function ju(t,n){if(!t||!t.length)return[];var r=Lu(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Uu=wo((function(e,t){return fl(e)?wi(e,t):[]})),Du=wo((function(e){return Fo(hn(e,fl))})),zu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Fo(hn(t,fl),Vs(n,2))})),Fu=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Fo(hn(t,fl),e,n)})),Bu=wo(Lu);function Hu(e,t){return Bo(e||[],t||[],ci)}function qu(e,t){return Bo(e||[],t||[],Oo)}var Vu=wo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ju(t,r)}));function $u(e){var t=Sr(e);return t.__chain__=!0,t}function Wu(e,t){return t(e),e}function Ku(e,t){return t(e)}var Gu=Ds((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return gi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Rr&&sa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ku,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Yu(){return $u(this)}function Qu(){return new Ir(this.value(),this.__chain__)}function Ju(){this.__values__===e&&(this.__values__=Wl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Xu(){return this}function Zu(t){for(var n,r=this;r instanceof xr;){var i=Ma(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function ec(){var t=this.__wrapped__;if(t instanceof Rr){var n=t;return this.__actions__.length&&(n=new Rr(this)),(n=n.reverse()).__actions__.push({func:Ku,args:[pu],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(pu)}function tc(){return zo(this.__wrapped__,this.__actions__)}var nc=us((function(e,t,n){ft.call(e,n)?++e[n]:pi(e,n,1)}));function rc(t,n,r){var i=ul(t)?fn:Oi;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}function ic(e,t){return(ul(e)?hn:Ri)(e,Vs(t,3))}var oc=vs(Wa),sc=vs(Ka);function ac(e,t){return ki(yc(e,t),1)}function uc(e,t){return ki(yc(e,t),N)}function cc(t,n,r){return r=r===e?1:Gl(r),ki(yc(t,n),r)}function lc(e,t){return(ul(e)?cn:Ei)(e,Vs(t,3))}function fc(e,t){return(ul(e)?ln:Si)(e,Vs(t,3))}var hc=us((function(e,t,n){ft.call(e,n)?e[n].push(t):pi(e,n,[t])}));function dc(e,t,n,r){e=ll(e)?e:Hf(e),n=n&&!r?Gl(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),Dl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xn(e,t,n)>-1}var pc=wo((function(e,t,n){var r=-1,i="function"==typeof t,o=ll(e)?ze(e.length):[];return Ei(e,(function(e){o[++r]=i?an(t,e,n):qi(e,t,n)})),o})),gc=us((function(e,t,n){pi(e,n,t)}));function yc(e,t){return(ul(e)?gn:oo)(e,Vs(t,3))}function vc(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),fo(t,n,r))}var mc=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function _c(e,t,n){var r=ul(e)?vn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Ei)}function bc(e,t,n){var r=ul(e)?mn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Si)}function wc(e,t){return(ul(e)?hn:Ri)(e,Bc(Vs(t,3)))}function Ec(e){return(ul(e)?oi:Eo)(e)}function Sc(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),(ul(t)?si:So)(t,n)}function Oc(e){return(ul(e)?ai:Ro)(e)}function xc(e){if(null==e)return 0;if(ll(e))return Dl(e)?rr(e):e.length;var t=Js(e);return t==Y||t==ne?e.size:no(e).length}function Ic(t,n,r){var i=ul(t)?_n:Co;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}var Rc=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&aa(e,t[0],t[1])?t=[]:n>2&&aa(t[0],t[1],t[2])&&(t=[t[0]]),fo(e,ki(t,1),[])})),kc=Tt||function(){return Gt.Date.now()};function Cc(e,t){if("function"!=typeof t)throw new ot(o);return e=Gl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Pc(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Ac(t,n){var r;if("function"!=typeof n)throw new ot(o);return t=Gl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Nc=wo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,qs(Nc));r|=b}return As(e,r,t,n,i)})),Tc=wo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,qs(Tc));r|=b}return As(t,r,e,n,i)}));function Mc(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Mc.placeholder,i}function Lc(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Lc.placeholder,i}function jc(t,n,r){var i,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ot(o);function g(n){var r=i,o=s;return i=s=e,f=n,u=t.apply(o,r)}function y(e){return f=e,c=xa(_,n),h?g(e):u}function v(e){var t=n-(e-l);return d?Qt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=kc();if(m(e))return b(e);c=xa(_,v(e))}function b(t){return c=e,p&&i?g(t):(i=s=e,u)}function w(){c!==e&&Ko(c),f=0,i=l=s=c=e}function E(){return c===e?u:b(kc())}function S(){var t=kc(),r=m(t);if(i=arguments,s=this,l=t,r){if(c===e)return y(l);if(d)return Ko(c),c=xa(_,n),g(l)}return c===e&&(c=xa(_,n)),u}return n=Ql(n)||0,Ol(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Yt(Ql(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Uc=wo((function(e,t){return bi(e,1,t)})),Dc=wo((function(e,t,n){return bi(e,Ql(t)||0,n)}));function zc(e){return As(e,O)}function Fc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fc.Cache||qr),n}function Bc(e){if("function"!=typeof e)throw new ot(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Hc(e){return Ac(2,e)}Fc.Cache=qr;var qc=$o((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],Un(Vs())):gn(ki(t,1),Un(Vs()))).length;return wo((function(r){for(var i=-1,o=Qt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),Vc=wo((function(t,n){var r=Xn(n,qs(Vc));return As(t,b,e,n,r)})),$c=wo((function(t,n){var r=Xn(n,qs($c));return As(t,w,e,n,r)})),Wc=Ds((function(t,n){return As(t,S,e,e,e,n)}));function Kc(t,n){if("function"!=typeof t)throw new ot(o);return wo(t,n=n===e?n:Gl(n))}function Gc(e,t){if("function"!=typeof e)throw new ot(o);return t=null==t?0:Yt(Gl(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Yc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(o);return Ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jc(e,t,{leading:r,maxWait:t,trailing:i})}function Qc(e){return Pc(e,1)}function Jc(e,t){return Vc(qo(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function Zc(e){return vi(e,h)}function el(t,n){return vi(t,h,n="function"==typeof n?n:e)}function tl(e){return vi(e,l|h)}function nl(t,n){return vi(t,l|h,n="function"==typeof n?n:e)}function rl(e,t){return null==t||_i(e,t,Sf(t))}function il(e,t){return e===t||e!=e&&t!=t}var ol=Is(Ui),sl=Is((function(e,t){return e>=t})),al=Vi(function(){return arguments}())?Vi:function(e){return xl(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")},ul=ze.isArray,cl=en?Un(en):$i;function ll(e){return null!=e&&Sl(e.length)&&!wl(e)}function fl(e){return xl(e)&&ll(e)}function hl(e){return!0===e||!1===e||xl(e)&&ji(e)==q}var dl=Ht||Yh,pl=tn?Un(tn):Wi;function gl(e){return xl(e)&&1===e.nodeType&&!Ml(e)}function yl(e){if(null==e)return!0;if(ll(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||dl(e)||Fl(e)||al(e)))return!e.length;var t=Js(e);if(t==Y||t==ne)return!e.size;if(da(e))return!no(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function vl(e,t){return Ki(e,t)}function ml(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Ki(t,n,e,r):!!i}function _l(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Ml(e)}function bl(e){return"number"==typeof e&&qt(e)}function wl(e){if(!Ol(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function El(e){return"number"==typeof e&&e==Gl(e)}function Sl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?Un(nn):Yi;function Rl(e,t){return e===t||Qi(e,t,Ws(t))}function kl(t,n,r){return r="function"==typeof r?r:e,Qi(t,n,Ws(n),r)}function Cl(e){return Tl(e)&&e!=+e}function Pl(e){if(ha(e))throw new Ze(i);return Ji(e)}function Al(e){return null===e}function Nl(e){return null==e}function Tl(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ml(e){if(!xl(e)||ji(e)!=X)return!1;var t=Et(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&<.call(n)==gt}var Ll=rn?Un(rn):Xi;function jl(e){return El(e)&&e>=-T&&e<=T}var Ul=on?Un(on):Zi;function Dl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function zl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?Un(sn):eo;function Bl(t){return t===e}function Hl(e){return xl(e)&&Js(e)==se}function ql(e){return xl(e)&&ji(e)==ae}var Vl=Is(io),$l=Is((function(e,t){return e<=t}));function Wl(e){if(!e)return[];if(ll(e))return Dl(e)?ir(e):is(e);if(Rt&&e[Rt])return Yn(e[Rt]());var t=Js(e);return(t==Y?Qn:t==ne?Zn:Hf)(e)}function Kl(e){return e?(e=Ql(e))===N||e===-N?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Gl(e){var t=Kl(e),n=t%1;return t==t?n?t-n:t:0}function Yl(e){return e?yi(Gl(e),0,j):0}function Ql(e){if("number"==typeof e)return e;if(zl(e))return L;if(Ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jn(e);var n=$e.test(e);return n||Ke.test(e)?$t(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Jl(e){return os(e,Of(e))}function Xl(e){return e?yi(Gl(e),-T,T):0===e?e:0}function Zl(e){return null==e?"":Mo(e)}var ef=cs((function(e,t){if(da(t)||ll(t))os(t,Sf(t),e);else for(var n in t)ft.call(t,n)&&ci(e,n,t[n])})),tf=cs((function(e,t){os(t,Of(t),e)})),nf=cs((function(e,t,n,r){os(t,Of(t),e,r)})),rf=cs((function(e,t,n,r){os(t,Sf(t),e,r)})),of=Ds(gi);function sf(e,t){var n=Or(e);return null==t?n:hi(n,t)}var af=wo((function(t,n){t=nt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&aa(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Of(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||il(f,ut[l])&&!ft.call(t,l))&&(t[l]=s[l])}return t})),uf=wo((function(t){return t.push(e,Ts),an(kf,e,t)}));function cf(e,t){return Sn(e,Vs(t,3),Ai)}function lf(e,t){return Sn(e,Vs(t,3),Ni)}function ff(e,t){return null==e?e:Ci(e,Vs(t,3),Of)}function hf(e,t){return null==e?e:Pi(e,Vs(t,3),Of)}function df(e,t){return e&&Ai(e,Vs(t,3))}function pf(e,t){return e&&Ni(e,Vs(t,3))}function gf(e){return null==e?[]:Ti(e,Sf(e))}function yf(e){return null==e?[]:Ti(e,Of(e))}function vf(t,n,r){var i=null==t?e:Mi(t,n);return i===e?r:i}function mf(e,t){return null!=e&&ea(e,t,Di)}function _f(e,t){return null!=e&&ea(e,t,zi)}var bf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),Rh(Ah)),wf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]}),Vs),Ef=wo(qi);function Sf(e){return ll(e)?ii(e):no(e)}function Of(e){return ll(e)?ii(e,!0):ro(e)}function xf(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var Rf=cs((function(e,t,n){uo(e,t,n)})),kf=cs((function(e,t,n,r){uo(e,t,n,r)})),Cf=Ds((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=Vo(t,e),r||(r=t.length>1),t})),os(e,Fs(e),n),r&&(n=vi(n,l|f|h,Ms));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Pf(e,t){return Nf(e,Bc(Vs(t)))}var Af=Ds((function(e,t){return null==e?{}:ho(e,t)}));function Nf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=Vs(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Tf(t,n,r){var i=-1,o=(n=Vo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=wl(s)?s.call(t):s}return t}function Mf(e,t,n){return null==e?e:Oo(e,t,n)}function Lf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Oo(t,n,r,i)}var jf=Ps(Sf),Uf=Ps(Of);function Df(e,t,n){var r=ul(e),i=r||dl(e)||Fl(e);if(t=Vs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ol(e)&&wl(o)?Or(Et(e)):{}}return(i?cn:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function zf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Uo(e,t,qo(n))}function Bf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Uo(t,n,qo(r),i)}function Hf(e){return null==e?[]:Dn(e,Sf(e))}function qf(e){return null==e?[]:Dn(e,Of(e))}function Vf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Ql(r))==r?r:0),n!==e&&(n=(n=Ql(n))==n?n:0),yi(Ql(t),n,r)}function $f(t,n,r){return n=Kl(n),r===e?(r=n,n=0):r=Kl(r),Fi(t=Ql(t),n,r)}function Wf(t,n,r){if(r&&"boolean"!=typeof r&&aa(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Kl(t),n===e?(n=t,t=0):n=Kl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=bn();return Qt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return mo(t,n)}var Kf=ps((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return wh(Zl(e).toLowerCase())}function Yf(e){return(e=Zl(e))&&e.replace(Ye,qn).replace(At,"")}function Qf(t,n,r){t=Zl(t),n=Mo(n);var i=t.length,o=r=r===e?i:yi(Gl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Jf(e){return(e=Zl(e))&&xe.test(e)?e.replace(Se,Vn):e}function Xf(e){return(e=Zl(e))&&Te.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ps((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),eh=ps((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),th=ds("toLowerCase");function nh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ss(Ft(i),n)+e+Ss(Lt(i),n)}function rh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?e+Ss(t-r,n):e}function ih(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?Ss(t-r,n)+e:e}function oh(e,t,n){return n||null==t?t=0:t&&(t=+t),Zt(Zl(e).replace(Me,""),t||0)}function sh(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),bo(Zl(t),n)}function ah(){var e=arguments,t=Zl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=ps((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ch(t,n,r){return r&&"number"!=typeof r&&aa(t,n,r)&&(n=r=e),(r=r===e?j:r>>>0)?(t=Zl(t))&&("string"==typeof n||null!=n&&!Ll(n))&&!(n=Mo(n))&&Kn(t)?Wo(ir(t),0,r):t.split(n,r):[]}var lh=ps((function(e,t,n){return e+(n?" ":"")+wh(t)}));function fh(e,t,n){return e=Zl(e),n=null==n?0:yi(Gl(n),0,e.length),t=Mo(t),e.slice(n,n+t.length)==t}function hh(t,n,r){var i=Sr.templateSettings;r&&aa(t,n,r)&&(n=e),t=Zl(t),n=nf({},n,i,Ns);var o,a,u=nf({},n.imports,i.imports,Ns),c=Sf(u),l=Dn(u,c),f=0,h=n.interpolate||Qe,d="__p += '",p=rt((n.escape||Qe).source+"|"+h.source+"|"+(h===ke?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ft.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(f,u).replace(Je,$n),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),d+="';\n";var y=ft.call(n,"variable")&&n.variable;if(y){if(Fe.test(y))throw new Ze(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Sh((function(){return et(c,g+"return "+d).apply(e,l)}));if(v.source=d,_l(v))throw v;return v}function dh(e){return Zl(e).toLowerCase()}function ph(e){return Zl(e).toUpperCase()}function gh(t,n,r){if((t=Zl(t))&&(r||n===e))return jn(t);if(!t||!(n=Mo(n)))return t;var i=ir(t),o=ir(n);return Wo(i,Fn(i,o),Bn(i,o)+1).join("")}function yh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,0,Bn(i,ir(n))+1).join("")}function vh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,Fn(i,ir(n))).join("")}function mh(t,n){var r=x,i=I;if(Ol(n)){var o="separator"in n?n.separator:o;r="length"in n?Gl(n.length):r,i="omission"in n?Mo(n.omission):i}var s=(t=Zl(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var u=r-rr(i);if(u<1)return i;var c=a?Wo(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),Ll(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=rt(o.source,Zl(qe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===e?u:h)}}else if(t.indexOf(Mo(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function _h(e){return(e=Zl(e))&&Oe.test(e)?e.replace(Ee,sr):e}var bh=ps((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),wh=ds("toUpperCase");function Eh(t,n,r){return t=Zl(t),(n=r?e:n)===e?Gn(t)?cr(t):En(t):t.match(n)||[]}var Sh=wo((function(t,n){try{return an(t,e,n)}catch(e){return _l(e)?e:new Ze(e)}})),Oh=Ds((function(e,t){return cn(t,(function(t){t=Aa(t),pi(e,t,Nc(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=Vs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new ot(o);return[n(e[0]),e[1]]})):[],wo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return mi(vi(e,l))}function Rh(e){return function(){return e}}function kh(e,t){return null==e||e!=e?t:e}var Ch=ms(),Ph=ms(!0);function Ah(e){return e}function Nh(e){return to("function"==typeof e?e:vi(e,l))}function Th(e){return so(vi(e,l))}function Mh(e,t){return ao(e,vi(t,l))}var Lh=wo((function(e,t){return function(n){return qi(n,e,t)}})),jh=wo((function(e,t){return function(n){return qi(e,n,t)}}));function Uh(e,t,n){var r=Sf(t),i=Ti(t,r);null==n&&(!Ol(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ti(t,Sf(t)));var o=!(Ol(n)&&"chain"in n&&!n.chain),s=wl(e);return cn(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=is(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function Dh(){return Gt._===this&&(Gt._=yt),this}function zh(){}function Fh(e){return e=Gl(e),wo((function(t){return lo(t,e)}))}var Bh=Es(gn),Hh=Es(fn),qh=Es(_n);function Vh(e){return ua(e)?Cn(Aa(e)):go(e)}function $h(t){return function(n){return null==t?e:Mi(t,n)}}var Wh=xs(),Kh=xs(!0);function Gh(){return[]}function Yh(){return!1}function Qh(){return{}}function Jh(){return""}function Xh(){return!0}function Zh(e,t){if((e=Gl(e))<1||e>T)return[];var n=j,r=Qt(e,j);t=Vs(t),e-=j;for(var i=Mn(r,t);++n<e;)t(n);return i}function ed(e){return ul(e)?gn(e,Aa):zl(e)?[e]:is(Pa(Zl(e)))}function td(e){var t=++ht;return Zl(e)+t}var nd=ws((function(e,t){return e+t}),0),rd=ks("ceil"),id=ws((function(e,t){return e/t}),1),od=ks("floor");function sd(t){return t&&t.length?xi(t,Ah,Ui):e}function ad(t,n){return t&&t.length?xi(t,Vs(n,2),Ui):e}function ud(e){return kn(e,Ah)}function cd(e,t){return kn(e,Vs(t,2))}function ld(t){return t&&t.length?xi(t,Ah,io):e}function fd(t,n){return t&&t.length?xi(t,Vs(n,2),io):e}var hd=ws((function(e,t){return e*t}),1),dd=ks("round"),pd=ws((function(e,t){return e-t}),0);function gd(e){return e&&e.length?Tn(e,Ah):0}function yd(e,t){return e&&e.length?Tn(e,Vs(t,2)):0}return Sr.after=Cc,Sr.ary=Pc,Sr.assign=ef,Sr.assignIn=tf,Sr.assignInWith=nf,Sr.assignWith=rf,Sr.at=of,Sr.before=Ac,Sr.bind=Nc,Sr.bindAll=Oh,Sr.bindKey=Tc,Sr.castArray=Xc,Sr.chain=$u,Sr.chunk=La,Sr.compact=ja,Sr.concat=Ua,Sr.cond=xh,Sr.conforms=Ih,Sr.constant=Rh,Sr.countBy=nc,Sr.create=sf,Sr.curry=Mc,Sr.curryRight=Lc,Sr.debounce=jc,Sr.defaults=af,Sr.defaultsDeep=uf,Sr.defer=Uc,Sr.delay=Dc,Sr.difference=Da,Sr.differenceBy=za,Sr.differenceWith=Fa,Sr.drop=Ba,Sr.dropRight=Ha,Sr.dropRightWhile=qa,Sr.dropWhile=Va,Sr.fill=$a,Sr.filter=ic,Sr.flatMap=ac,Sr.flatMapDeep=uc,Sr.flatMapDepth=cc,Sr.flatten=Ga,Sr.flattenDeep=Ya,Sr.flattenDepth=Qa,Sr.flip=zc,Sr.flow=Ch,Sr.flowRight=Ph,Sr.fromPairs=Ja,Sr.functions=gf,Sr.functionsIn=yf,Sr.groupBy=hc,Sr.initial=eu,Sr.intersection=tu,Sr.intersectionBy=nu,Sr.intersectionWith=ru,Sr.invert=bf,Sr.invertBy=wf,Sr.invokeMap=pc,Sr.iteratee=Nh,Sr.keyBy=gc,Sr.keys=Sf,Sr.keysIn=Of,Sr.map=yc,Sr.mapKeys=xf,Sr.mapValues=If,Sr.matches=Th,Sr.matchesProperty=Mh,Sr.memoize=Fc,Sr.merge=Rf,Sr.mergeWith=kf,Sr.method=Lh,Sr.methodOf=jh,Sr.mixin=Uh,Sr.negate=Bc,Sr.nthArg=Fh,Sr.omit=Cf,Sr.omitBy=Pf,Sr.once=Hc,Sr.orderBy=vc,Sr.over=Bh,Sr.overArgs=qc,Sr.overEvery=Hh,Sr.overSome=qh,Sr.partial=Vc,Sr.partialRight=$c,Sr.partition=mc,Sr.pick=Af,Sr.pickBy=Nf,Sr.property=Vh,Sr.propertyOf=$h,Sr.pull=uu,Sr.pullAll=cu,Sr.pullAllBy=lu,Sr.pullAllWith=fu,Sr.pullAt=hu,Sr.range=Wh,Sr.rangeRight=Kh,Sr.rearg=Wc,Sr.reject=wc,Sr.remove=du,Sr.rest=Kc,Sr.reverse=pu,Sr.sampleSize=Sc,Sr.set=Mf,Sr.setWith=Lf,Sr.shuffle=Oc,Sr.slice=gu,Sr.sortBy=Rc,Sr.sortedUniq=Eu,Sr.sortedUniqBy=Su,Sr.split=ch,Sr.spread=Gc,Sr.tail=Ou,Sr.take=xu,Sr.takeRight=Iu,Sr.takeRightWhile=Ru,Sr.takeWhile=ku,Sr.tap=Wu,Sr.throttle=Yc,Sr.thru=Ku,Sr.toArray=Wl,Sr.toPairs=jf,Sr.toPairsIn=Uf,Sr.toPath=ed,Sr.toPlainObject=Jl,Sr.transform=Df,Sr.unary=Qc,Sr.union=Cu,Sr.unionBy=Pu,Sr.unionWith=Au,Sr.uniq=Nu,Sr.uniqBy=Tu,Sr.uniqWith=Mu,Sr.unset=zf,Sr.unzip=Lu,Sr.unzipWith=ju,Sr.update=Ff,Sr.updateWith=Bf,Sr.values=Hf,Sr.valuesIn=qf,Sr.without=Uu,Sr.words=Eh,Sr.wrap=Jc,Sr.xor=Du,Sr.xorBy=zu,Sr.xorWith=Fu,Sr.zip=Bu,Sr.zipObject=Hu,Sr.zipObjectDeep=qu,Sr.zipWith=Vu,Sr.entries=jf,Sr.entriesIn=Uf,Sr.extend=tf,Sr.extendWith=nf,Uh(Sr,Sr),Sr.add=nd,Sr.attempt=Sh,Sr.camelCase=Kf,Sr.capitalize=Gf,Sr.ceil=rd,Sr.clamp=Vf,Sr.clone=Zc,Sr.cloneDeep=tl,Sr.cloneDeepWith=nl,Sr.cloneWith=el,Sr.conformsTo=rl,Sr.deburr=Yf,Sr.defaultTo=kh,Sr.divide=id,Sr.endsWith=Qf,Sr.eq=il,Sr.escape=Jf,Sr.escapeRegExp=Xf,Sr.every=rc,Sr.find=oc,Sr.findIndex=Wa,Sr.findKey=cf,Sr.findLast=sc,Sr.findLastIndex=Ka,Sr.findLastKey=lf,Sr.floor=od,Sr.forEach=lc,Sr.forEachRight=fc,Sr.forIn=ff,Sr.forInRight=hf,Sr.forOwn=df,Sr.forOwnRight=pf,Sr.get=vf,Sr.gt=ol,Sr.gte=sl,Sr.has=mf,Sr.hasIn=_f,Sr.head=Xa,Sr.identity=Ah,Sr.includes=dc,Sr.indexOf=Za,Sr.inRange=$f,Sr.invoke=Ef,Sr.isArguments=al,Sr.isArray=ul,Sr.isArrayBuffer=cl,Sr.isArrayLike=ll,Sr.isArrayLikeObject=fl,Sr.isBoolean=hl,Sr.isBuffer=dl,Sr.isDate=pl,Sr.isElement=gl,Sr.isEmpty=yl,Sr.isEqual=vl,Sr.isEqualWith=ml,Sr.isError=_l,Sr.isFinite=bl,Sr.isFunction=wl,Sr.isInteger=El,Sr.isLength=Sl,Sr.isMap=Il,Sr.isMatch=Rl,Sr.isMatchWith=kl,Sr.isNaN=Cl,Sr.isNative=Pl,Sr.isNil=Nl,Sr.isNull=Al,Sr.isNumber=Tl,Sr.isObject=Ol,Sr.isObjectLike=xl,Sr.isPlainObject=Ml,Sr.isRegExp=Ll,Sr.isSafeInteger=jl,Sr.isSet=Ul,Sr.isString=Dl,Sr.isSymbol=zl,Sr.isTypedArray=Fl,Sr.isUndefined=Bl,Sr.isWeakMap=Hl,Sr.isWeakSet=ql,Sr.join=iu,Sr.kebabCase=Zf,Sr.last=ou,Sr.lastIndexOf=su,Sr.lowerCase=eh,Sr.lowerFirst=th,Sr.lt=Vl,Sr.lte=$l,Sr.max=sd,Sr.maxBy=ad,Sr.mean=ud,Sr.meanBy=cd,Sr.min=ld,Sr.minBy=fd,Sr.stubArray=Gh,Sr.stubFalse=Yh,Sr.stubObject=Qh,Sr.stubString=Jh,Sr.stubTrue=Xh,Sr.multiply=hd,Sr.nth=au,Sr.noConflict=Dh,Sr.noop=zh,Sr.now=kc,Sr.pad=nh,Sr.padEnd=rh,Sr.padStart=ih,Sr.parseInt=oh,Sr.random=Wf,Sr.reduce=_c,Sr.reduceRight=bc,Sr.repeat=sh,Sr.replace=ah,Sr.result=Tf,Sr.round=dd,Sr.runInContext=t,Sr.sample=Ec,Sr.size=xc,Sr.snakeCase=uh,Sr.some=Ic,Sr.sortedIndex=yu,Sr.sortedIndexBy=vu,Sr.sortedIndexOf=mu,Sr.sortedLastIndex=_u,Sr.sortedLastIndexBy=bu,Sr.sortedLastIndexOf=wu,Sr.startCase=lh,Sr.startsWith=fh,Sr.subtract=pd,Sr.sum=gd,Sr.sumBy=yd,Sr.template=hh,Sr.times=Zh,Sr.toFinite=Kl,Sr.toInteger=Gl,Sr.toLength=Yl,Sr.toLower=dh,Sr.toNumber=Ql,Sr.toSafeInteger=Xl,Sr.toString=Zl,Sr.toUpper=ph,Sr.trim=gh,Sr.trimEnd=yh,Sr.trimStart=vh,Sr.truncate=mh,Sr.unescape=_h,Sr.uniqueId=td,Sr.upperCase=bh,Sr.upperFirst=wh,Sr.each=lc,Sr.eachRight=fc,Sr.first=Xa,Uh(Sr,function(){var e={};return Ai(Sr,(function(t,n){ft.call(Sr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Sr.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sr[e].placeholder=Sr})),cn(["drop","take"],(function(t,n){Rr.prototype[t]=function(r){r=r===e?1:Yt(Gl(r),0);var i=this.__filtered__&&!n?new Rr(this):this.clone();return i.__filtered__?i.__takeCount__=Qt(r,i.__takeCount__):i.__views__.push({size:Qt(r,j),type:t+(i.__dir__<0?"Right":"")}),i},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),cn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||n==A;Rr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),cn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rr.prototype[e]=function(){return this[n](1).value()[0]}})),cn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rr.prototype[e]=function(){return this.__filtered__?new Rr(this):this[n](1)}})),Rr.prototype.compact=function(){return this.filter(Ah)},Rr.prototype.find=function(e){return this.filter(e).head()},Rr.prototype.findLast=function(e){return this.reverse().find(e)},Rr.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Rr(this):this.map((function(n){return qi(n,e,t)}))})),Rr.prototype.reject=function(e){return this.filter(Bc(Vs(e)))},Rr.prototype.slice=function(t,n){t=Gl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Gl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rr.prototype.toArray=function(){return this.take(j)},Ai(Rr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Sr[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Sr.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Rr,c=a[0],l=u||ul(n),f=function(e){var t=o.apply(Sr,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){n=g?n:new Rr(this);var y=t.apply(n,a);return y.__actions__.push({func:Ku,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Rr.prototype,(function(e,t){var n=Sr[t];if(n){var r=n.name+"";ft.call(pr,r)||(pr[r]=[]),pr[r].push({name:t,func:n})}})),pr[_s(e,y).name]=[{name:"wrapper",func:e}],Rr.prototype.clone=kr,Rr.prototype.reverse=Cr,Rr.prototype.value=Pr,Sr.prototype.at=Gu,Sr.prototype.chain=Yu,Sr.prototype.commit=Qu,Sr.prototype.next=Ju,Sr.prototype.plant=Zu,Sr.prototype.reverse=ec,Sr.prototype.toJSON=Sr.prototype.valueOf=Sr.prototype.value=tc,Sr.prototype.first=Sr.prototype.head,Rt&&(Sr.prototype[Rt]=Xu),Sr},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var wg=Object.defineProperty,Eg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Ig=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Rg(e,n,t[n]);if(Og)for(var n of Og(t))Ig.call(t,n)&&Rg(e,n,t[n]);return e},Cg=(e,t)=>Eg(e,Sg(t));function Pg(e,t,n){let r;const i=Ag(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${yg}?chainId=eip155:${i}&projectId=${n}`),r}function Ag(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Ng(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Tg(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Mg(e={},t={}){const n=Lg(e),r=Lg(t);return bg.exports.merge(n,r)}function Lg(e){var t,n,r,i;const o={};if(!dc(e))return o;for(const[s,a]of Object.entries(e)){const e=sc(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=ac(s);o[f]=Cg(kg(kg({},o[f]),a),{chains:zu(e,null==(t=o[f])?void 0:t.chains),methods:zu(u,null==(n=o[f])?void 0:n.methods),events:zu(c,null==(r=o[f])?void 0:r.events),rpcMap:kg(kg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function jg(e){return e.includes(":")?e.split(":")[2]:e}function Ug(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=sc(n)?[n]:r.chains?r.chains:Ng(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}const Dg={},zg=e=>Dg[e],Fg=(e,t)=>{Dg[e]=t};var Bg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=c,r.Request=_,r.Response=E),e.Headers=c,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(Bg,Bg.exports);var Hg=n(Bg.exports);const qg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Vg=10;class $g{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Hg(this.url,Object.assign(Object.assign({},qg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Hg(e,Object.assign(Object.assign({},qg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Vg&&this.events.setMaxListeners(Vg)}}class Wg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Kg{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Ag(e);if(!this.httpProviders[n]){const e=t||Pg(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ag(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Gg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Yg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Qg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Jg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Xg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}var Zg=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t)=>{for(var n in t||(t={}))ry.call(t,n)&&oy(e,n,t[n]);if(ny)for(var n of ny(t))iy.call(t,n)&&oy(e,n,t[n]);return e},ay=(e,t)=>ey(e,ty(t));class uy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||dg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new uy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:sy({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:fc("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=Ug(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Vp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(hc(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await hg.init({logger:this.providerOpts.logger||dg,relayUrl:this.providerOpts.relayUrl||pg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>ac(e))))];Fg("client",this.client),Fg("events",this.events),Fg("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Tg(e,this.session),n=Ng(t),r=Mg(this.namespaces,this.optionalNamespaces),i=ay(sy({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kg({namespace:i});break;case"solana":this.rpcProviders[e]=new Gg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Wg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&hc(e)&&this.events.emit("accountsChanged",e.map(jg))}else"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ay(sy({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ay(sy({},fc("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>ac(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=ac(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${gg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${gg}/${e}`)}}const cy=uy;e.UniversalProvider=cy,e.default=uy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Cc.exports);const Pc=["eth_sendTransaction","personal_sign"],Ac=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Nc=["chainChanged","accountsChanged"],Tc=["message","disconnect","connect"];function Mc(e){return Number(e[0].split(":")[1])}function Lc(e){return`0x${e.toString(16)}`}class jc{constructor(){this.events=new Ys.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new jc;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Ic(t))throw new Error("Invalid chains");const u=t,c=r||Pc,l=o||Nc,f={chains:u,methods:c,events:l,rpcMap:{[Mc(u)]:a[Mc(u)]}},h=null==o?void 0:o.filter((e=>!Nc.includes(e))),d=null==r?void 0:r.filter((e=>!Pc.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?u.concat(n||[]):n)],methods:[...new Set(c.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Lc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Lc(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=xc[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Lc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Pc,events:(null==e?void 0:e.events)||Nc,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Mc(this.rpc.chains),this.signer=yield Cc.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Ic(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Ic(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Uc=r("WalletConnectEvm"),Dc=i("WalletConnectEvm");function zc(){return c(this,void 0,void 0,(function*(){Uc("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){Uc("initWalletConnectProvider");const e=Yc();Uc("walletConnectProviderOptions is",e);const t=Ac;e.optionalMethods&&Array.isArray(e.optionalMethods)&&t.push(...e.optionalMethods.filter((e=>t.indexOf(e)<0)));const n=Tc;e.optionalEvents&&Array.isArray(e.optionalEvents)&&n.push(...e.optionalEvents.filter((e=>n.indexOf(e)<0)));const r={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:t,events:e.events,optionalEvents:n,rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};Uc("ethereum init options are",r),Uc("creating a new provider instance");try{return jc.init(r)}catch(e){throw Dc("Error while initializing ethereum provider"),e}}))}();return function(e){if(Uc("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Uc("connectHandler",e),Jo(!1)}function r(n){Uc("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("session_delete",r),Uc("provider is",e)}(e),e.request=function(e){Uc("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Yc();return Uc("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Uc("calling patched",r,i),Uc("handling display_uri once"),e.once("display_uri",Fc),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){var u,c;try{(null===(u=null==e?void 0:e.session)||void 0===u?void 0:u.connected)?(Uc("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{Dc("user rejected"),s(new a)}},qs("UseLedgerLiveModal",{isDesktop:"desktop"===Bs().type,uri:c.uri,onClose:c.onClose}),Uc("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return Dc("error",e),s(e)}}))))):(Uc("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Dc("error",t),t}}))}function Fc(e){Uc("displayUriHandler",e),Ts(e)}const Bc=r("getProvider"),Hc=[1];var qc,Vc;let $c;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(qc||(qc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Vc||(Vc={}));const Wc=e=>(Bc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),Kc=r("supportOptions");let Gc;const Yc=()=>(Kc("getSupportOptions"),Gc),Qc=r("ExtensionEvm"),Jc="ethereum",Xc="isLedgerConnect";var Zc;function el(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function tl(e){return!!Zc[e]}function nl(e){return e.every(tl)}function rl(){if(Qc("getEthereumProvider"),"undefined"==typeof window)throw new u;let e=window[Jc];if(Qc("provider is",e),void 0===e||void 0===e[Xc])throw new o;const t=Yc(),n=Wc(t.chainId||0);return Wc(e.chainId)!=n&&(Qc("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Zc||(Zc={}));const il=r("support");let ol;var sl=Object.freeze({__proto__:null,link:function(e,t,n,r){var i=this;return e?((e instanceof Element?[e]:"toArray"in e?e.toArray():e).forEach((function(e){e.addEventListener("click",(function(o){var s,a,u=t instanceof Function?t(e):t,c=n instanceof Function?n(e):n,l=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(s=e.getElementsByTagName("a")[0])||void 0===s?void 0:s.getAttribute("href")),f=Dt(i.track(u,c,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(e,t){return!("_blank"!==e.target||!t)})(e,l)||function(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this},form:function(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach((function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var s;o.preventDefault?o.preventDefault():o.returnValue=!1;var a=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;Dt(i.track(a,u,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500).catch(console.error).then((function(){e.submit()})).catch(console.error)},s=window.jQuery||window.Zepto;s?s(e).submit(o):e.addEventListener("submit",o,!1)})),this):this}});function al(e,t){return Object.keys(t).reduce((function(n,r){r.startsWith(e)&&(n[r.substr(e.length)]=t[r]);return n}),{})}for(var ul=Object.freeze({__proto__:null,queryString:function(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=yn(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=Mt(e.options.useQueryString)?e.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,h=void 0===f?/.+/:f;if(a){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&e.setAnonymousId(d)}if(o){var p=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(h.test(p)){var g=al("ajs_trait_",r);i.push(e.identify(p,g))}}if(s){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,v=al("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),cl={},ll={},fl=[],hl=0;hl<64;)fl[hl]=0|4294967296*Math.sin(++hl%Math.PI);var dl=Object.freeze({__proto__:null,default:function(e){var t,n,r,i=[t=1732584193,n=4023233417,~t,~n],o=[],s=unescape(encodeURI(e))+"",a=s.length;for(e=--a/4+2|15,o[--e]=8*a;~a;)o[a>>2]|=s.charCodeAt(a)<<8*a--;for(hl=s=0;hl<e;hl+=16){for(a=i;s<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=s>>4]+fl[s]+~~o[hl|15&[s,5*s+1,3*s+5,7*s][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+s++%4])|r>>>-a),t,n])t=0|a[1],n=a[2];for(s=4;s;)i[--s]+=a[s]}for(e="";s<32;)e+=(i[s>>3]>>4*(1^s++)&15).toString(16);return e}}),pl=h(dl),gl={exports:{}};!function(e,t){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}(gl);
|
330
330
|
/**
|
331
331
|
* @license Apache-2.0
|
332
332
|
*
|