/*! For license information please see index.js.LICENSE.txt */
(()=>{var e={2864:(e,t,r)=>{"use strict";var n=r(28487),o=r(25592),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},25592:(e,t,r)=>{"use strict";var n=r(22698),o=r(28487),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(a,i),p=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),s=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=c(n,a,arguments);if(p&&l){var r=p(t,"length");r.configurable&&l(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var u=function(){return c(n,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u},6922:(e,t)=>{"use strict";t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(";"),c=o.decode||r,p=0;p<a.length;p++){var l=a[p],s=l.indexOf("=");if(!(s<0)){var u=l.substring(0,s).trim();if(null==n[u]){var f=l.substring(s+1,l.length).trim();'"'===f[0]&&(f=f.slice(1,-1)),n[u]=i(f,c)}}}return n},t.serialize=function(e,t,r){var i=r||{},a=i.encode||n;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!o.test(e))throw new TypeError("argument name is invalid");var c=a(t);if(c&&!o.test(c))throw new TypeError("argument val is invalid");var p=e+"="+c;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");p+="; Max-Age="+Math.floor(l)}if(i.domain){if(!o.test(i.domain))throw new TypeError("option domain is invalid");p+="; Domain="+i.domain}if(i.path){if(!o.test(i.path))throw new TypeError("option path is invalid");p+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");p+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(p+="; HttpOnly"),i.secure&&(p+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"strict":p+="; SameSite=Strict";break;case"none":p+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return p};var r=decodeURIComponent,n=encodeURIComponent,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function i(e,t){try{return t(e)}catch(t){return e}}},59748:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(t+i);for(var a,c=r.call(arguments,1),p=function(){if(this instanceof a){var t=i.apply(this,c.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,c.concat(r.call(arguments)))},l=Math.max(0,i.length-c.length),s=[],u=0;u<l;u++)s.push("$"+u);if(a=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(p),i.prototype){var f=function(){};f.prototype=i.prototype,a.prototype=new f,f.prototype=null}return a}},22698:(e,t,r)=>{"use strict";var n=r(59748);e.exports=Function.prototype.bind||n},28487:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,c=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var l=function(){throw new a},s=p?function(){try{return l}catch(e){try{return p(arguments,"callee").get}catch(e){return l}}}():l,u=r(72770)(),f=Object.getPrototypeOf||function(e){return e.__proto__},y={},m="undefined"==typeof Uint8Array?n:f(Uint8Array),d={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":u?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?f(""[Symbol.iterator]()):n,"%Symbol%":u?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":s,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var r;if("%AsyncFunction%"===t)r=c("async function () {}");else if("%GeneratorFunction%"===t)r=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=c("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=f(o.prototype))}return d[t]=r,r},h={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(22698),b=r(22786),w=v.call(Function.call,Array.prototype.concat),S=v.call(Function.apply,Array.prototype.splice),x=v.call(Function.call,String.prototype.replace),E=v.call(Function.call,String.prototype.slice),A=v.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,P=function(e){var t=E(e,0,1),r=E(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,O,(function(e,t,r,o){n[n.length]=r?x(o,j,"$1"):t||e})),n},N=function(e,t){var r,n=e;if(b(h,n)&&(n="%"+(r=h[n])[0]+"%"),b(d,n)){var i=d[n];if(i===y&&(i=g(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=P(e),n=r.length>0?r[0]:"",i=N("%"+n+"%",t),c=i.name,l=i.value,s=!1,u=i.alias;u&&(n=u[0],S(r,w([0,1],u)));for(var f=1,y=!0;f<r.length;f+=1){var m=r[f],g=E(m,0,1),h=E(m,-1);if(('"'===g||"'"===g||"`"===g||'"'===h||"'"===h||"`"===h)&&g!==h)throw new o("property names with quotes must have matching quotes");if("constructor"!==m&&y||(s=!0),b(d,c="%"+(n+="."+m)+"%"))l=d[c];else if(null!=l){if(!(m in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&f+1>=r.length){var v=p(l,m);l=(y=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[m]}else y=b(l,m),l=l[m];y&&!s&&(d[c]=l)}}return l}},72770:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(69578);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},69578:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},22786:(e,t,r)=>{"use strict";var n=r(22698);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},52458:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,c,p=o(e),l=1;l<arguments.length;l++){for(var s in a=Object(arguments[l]))r.call(a,s)&&(p[s]=a[s]);if(t){c=t(a);for(var u=0;u<c.length;u++)n.call(a,c[u])&&(p[c[u]]=a[c[u]])}}return p}},31741:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,p=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=c&&p&&"function"==typeof p.get?p.get:null,s=c&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,d=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,x=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function T(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-j(-e):j(e);if(n!==e){var o=String(n),i=v.call(t,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var D=r(50189),M=D.custom,U=$(M)?M:null;function W(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function C(e){return b.call(String(e),/"/g,"&quot;")}function B(e){return!("[object Array]"!==z(e)||k&&"object"==typeof e&&k in e)}function L(e){return!("[object RegExp]"!==z(e)||k&&"object"==typeof e&&k in e)}function $(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var c=r||{};if(q(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!q(c,"customInspect")||c.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return V(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return d?T(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return d?T(t,x):x}var j=void 0===c.depth?5:c.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var N,M=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=A.call(Array(e.indent+1)," ")}return{base:r,prev:A.call(Array(t+1),r)}}(c,n);if(void 0===o)o=[];else if(H(o,t)>=0)return"[Circular]";function G(t,r,i){if(r&&(o=O.call(o)).push(r),i){var a={depth:c.depth};return q(c,"quoteStyle")&&(a.quoteStyle=c.quoteStyle),e(t,a,n+1,o)}return e(t,c,n+1,o)}if("function"==typeof t&&!L(t)){var J=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=X(t,G);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(ee.length>0?" { "+A.call(ee,", ")+" }":"")}if($(t)){var te=I?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(t);return"object"!=typeof t||I?te:Q(te)}if((N=t)&&"object"==typeof N&&("undefined"!=typeof HTMLElement&&N instanceof HTMLElement||"string"==typeof N.nodeName&&"function"==typeof N.getAttribute)){for(var re="<"+S.call(String(t.nodeName)),ne=t.attributes||[],oe=0;oe<ne.length;oe++)re+=" "+ne[oe].name+"="+W(C(ne[oe].value),"double",c);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+S.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ie=X(t,G);return M&&!function(e){for(var t=0;t<e.length;t++)if(H(e[t],"\n")>=0)return!1;return!0}(ie)?"["+K(ie,M)+"]":"[ "+A.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==z(e)||k&&"object"==typeof e&&k in e)}(t)){var ae=X(t,G);return"cause"in Error.prototype||!("cause"in t)||F.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(ae,", ")+" }":"{ ["+String(t)+"] "+A.call(E.call("[cause]: "+G(t.cause),ae),", ")+" }"}if("object"==typeof t&&p){if(U&&"function"==typeof t[U]&&D)return D(t,{depth:j-n});if("symbol"!==p&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return a.call(t,(function(e,r){ce.push(G(r,t,!0)+" => "+G(e,t))})),Z("Map",i.call(t),ce,M)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var pe=[];return s.call(t,(function(e){pe.push(G(e,t))})),Z("Set",l.call(t),pe,M)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!y||!e||"object"!=typeof e)return!1;try{return y.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==z(e)||k&&"object"==typeof e&&k in e)}(t))return Q(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}(t))return Q(G(P.call(t)));if(function(e){return!("[object Boolean]"!==z(e)||k&&"object"==typeof e&&k in e)}(t))return Q(m.call(t));if(function(e){return!("[object String]"!==z(e)||k&&"object"==typeof e&&k in e)}(t))return Q(G(String(t)));if(!function(e){return!("[object Date]"!==z(e)||k&&"object"==typeof e&&k in e)}(t)&&!L(t)){var le=X(t,G),se=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",fe=!se&&k&&Object(t)===t&&k in t?v.call(z(t),8,-1):ue?"Object":"",ye=(se||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||ue?"["+A.call(E.call([],fe||[],ue||[]),": ")+"] ":"");return 0===le.length?ye+"{}":M?ye+"{"+K(le,M)+"}":ye+"{ "+A.call(le,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return G.call(e,t)}function z(e){return d.call(e)}function H(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function V(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return V(v.call(e,0,t.maxStringLength),t)+n}return W(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?K(r,n):A.call(r,", "))+"}"}function K(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+A.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=B(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=q(e,o)?t(e[o],e):""}var i,a="function"==typeof N?N(e):[];if(I){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var p in e)q(e,p)&&(r&&String(Number(p))===p&&p<e.length||I&&i["$"+p]instanceof Symbol||(x.call(/[^\w$]/,p)?n.push(t(p,e)+": "+t(e[p],e)):n.push(p+": "+t(e[p],e))));if("function"==typeof N)for(var l=0;l<a.length;l++)F.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}},38243:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},79119:(e,t,r)=>{"use strict";var n=r(67576),o=r(93649),i=r(38243);e.exports={formats:i,parse:o,stringify:n}},93649:(e,t,r)=>{"use strict";var n=r(7173),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},p=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(i),l=c?i.slice(0,c.index):i,s=[];if(l){if(!r.plainObjects&&o.call(Object.prototype,l)&&!r.allowPrototypes)return;s.push(l)}for(var u=0;r.depth>0&&null!==(c=a.exec(i))&&u<r.depth;){if(u+=1,!r.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+i.slice(c.index)+"]"),function(e,t,r,n){for(var o=n?t:p(t,r),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,s=parseInt(l,10);r.parseArrays||""!==l?!isNaN(s)&&c!==l&&String(s)===l&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(s,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var r,l={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,f=s.split(t.delimiter,u),y=-1,m=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?m="utf-8":"utf8=%26%2310003%3B"===f[r]&&(m="iso-8859-1"),y=r,r=f.length);for(r=0;r<f.length;++r)if(r!==y){var d,g,h=f[r],v=h.indexOf("]="),b=-1===v?h.indexOf("="):v+1;-1===b?(d=t.decoder(h,a.decoder,m,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(h.slice(0,b),a.decoder,m,"key"),g=n.maybeMap(p(h.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===m&&(g=c(g)),h.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(l,d)?l[d]=n.combine(l[d],g):l[d]=g}return l}(e,r):e,u=r.plainObjects?Object.create(null):{},f=Object.keys(s),y=0;y<f.length;++y){var m=f[y],d=l(m,s[m],r,"string"==typeof e);u=n.merge(u,d,r)}return!0===r.allowSparse?u:n.compact(u)}},67576:(e,t,r)=>{"use strict";var n=r(44852),o=r(7173),i=r(38243),a=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},p=Array.isArray,l=String.prototype.split,s=Array.prototype.push,u=function(e,t){s.apply(e,p(t)?t:[t])},f=Date.prototype.toISOString,y=i.default,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:y,formatter:i.formatters[y],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,a,c,s,f,y,g,h,v,b,w,S,x){for(var E,A=t,O=x,j=0,P=!1;void 0!==(O=O.get(d))&&!P;){var N=O.get(t);if(j+=1,void 0!==N){if(N===j)throw new RangeError("Cyclic object value");P=!0}void 0===O.get(d)&&(j=0)}if("function"==typeof f?A=f(r,A):A instanceof Date?A=h(A):"comma"===i&&p(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?h(e):e}))),null===A){if(a)return s&&!w?s(r,m.encoder,S,"key",v):r;A=""}if("string"==typeof(E=A)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||o.isBuffer(A)){if(s){var _=w?r:s(r,m.encoder,S,"key",v);if("comma"===i&&w){for(var I=l.call(String(A),","),k="",F=0;F<I.length;++F)k+=(0===F?"":",")+b(s(I[F],m.encoder,S,"value",v));return[b(_)+"="+k]}return[b(_)+"="+b(s(A,m.encoder,S,"value",v))]}return[b(r)+"="+b(String(A))]}var R,T=[];if(void 0===A)return T;if("comma"===i&&p(A))R=[{value:A.length>0?A.join(",")||null:void 0}];else if(p(f))R=f;else{var D=Object.keys(A);R=y?D.sort(y):D}for(var M=0;M<R.length;++M){var U=R[M],W="object"==typeof U&&void 0!==U.value?U.value:A[U];if(!c||null!==W){var C=p(A)?"function"==typeof i?i(r,U):r:r+(g?"."+U:"["+U+"]");x.set(t,j);var B=n();B.set(d,x),u(T,e(W,C,i,a,c,s,f,y,g,h,v,b,w,S,B))}}return T};e.exports=function(e,t){var r,o=e,l=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=m.filter;return("function"==typeof e.filter||p(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):p(l.filter)&&(r=l.filter);var s,f=[];if("object"!=typeof o||null===o)return"";s=t&&t.arrayFormat in c?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var y=c[s];r||(r=Object.keys(o)),l.sort&&r.sort(l.sort);for(var d=n(),h=0;h<r.length;++h){var v=r[h];l.skipNulls&&null===o[v]||u(f,g(o[v],v,y,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,d))}var b=f.join(l.delimiter),w=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),b.length>0?w+b:""}},7173:(e,t,r)=>{"use strict";var n=r(38243),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],c=Object.keys(a),p=0;p<c.length;++p){var l=c[p],s=a[l];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:a,prop:l}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var p="",l=0;l<c.length;++l){var s=c.charCodeAt(l);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||i===n.RFC1738&&(40===s||41===s)?p+=c.charAt(l):s<128?p+=a[s]:s<2048?p+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?p+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(l+=1,s=65536+((1023&s)<<10|1023&c.charCodeAt(l)),p+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return p},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=c(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},95472:(e,t,r)=>{"use strict";r(52458);var n=r(99196),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,i={},l=null,s=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(s=t.ref),t)c.call(t,n)&&!p.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:s,props:i,_owner:a.current}}},61250:(e,t,r)=>{"use strict";e.exports=r(95472)},44852:(e,t,r)=>{"use strict";var n=r(28487),o=r(2864),i=r(31741),a=n("%TypeError%"),c=n("%WeakMap%",!0),p=n("%Map%",!0),l=o("WeakMap.prototype.get",!0),s=o("WeakMap.prototype.set",!0),u=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),m=o("Map.prototype.has",!0),d=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(p){if(t)return f(t,n)}else if(r)return function(e,t){var r=d(e,t);return r&&r.value}(r,n)},has:function(n){if(c&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(p){if(t)return m(t,n)}else if(r)return function(e,t){return!!d(e,t)}(r,n);return!1},set:function(n,o){c&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new c),s(e,n,o)):p?(t||(t=new p),y(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=d(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},99196:e=>{"use strict";e.exports=window.React},50189:()=>{}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{Experiment:()=>B,ExperimentWithAuth:()=>H,ProvideExperimentData:()=>L,ProvideExperimentDataWithAuth:()=>V,dangerouslyGetExperimentAssignment:()=>W,dangerouslyGetExperimentAssignmentWithAuth:()=>q,initializeExPlat:()=>D,loadExperimentAssignment:()=>U,loadExperimentAssignmentWithAuth:()=>G,useExperiment:()=>C,useExperimentWithAuth:()=>z});let e=Date.now();function t(){const t=Date.now();return e=e<t?t:e+1,e}function o(e){return t()<1e3*e.ttl+e.retrievedTimestamp}const i=(e,r=60)=>({experimentName:e,variationName:null,retrievedTimestamp:t(),ttl:Math.max(60,r),isFallbackExperimentAssignment:!0}),a={_data:{},setItem:function(e,t){this._data[e]=t},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:void 0},removeItem:function(e){delete this._data[e]},clear:function(){this._data={}},get length(){return Object.keys(this._data).length},key:function(e){return Object.keys(this._data)[e]}},c="undefined"!=typeof window&&window.localStorage?window.localStorage:a;function p(e){return"object"==typeof e&&null!==e}function l(e){return"string"==typeof e&&""!==e}function s(e){if(!function(e){return p(e)&&l(e.experimentName)&&(l(e.variationName)||null===e.variationName)&&"number"==typeof e.retrievedTimestamp&&"number"==typeof e.ttl&&0!==e.ttl}(e))throw new Error("Invalid ExperimentAssignment");return e}const u="explat-experiment-",f=e=>`explat-experiment--${e}`;function y(e){s(e);const t=m(e.experimentName);if(t&&e.retrievedTimestamp<t.retrievedTimestamp)throw new Error("Trying to store an older experiment assignment than is present in the store, likely a race condition.");c.setItem(f(e.experimentName),JSON.stringify(e))}function m(e){const t=c.getItem(f(e));if(t)return s(JSON.parse(t))}function d(e){return e.startsWith(u)}function g(e){return e.slice(u.length+1)}const h="explat-last-anon-id",v="explat-last-anon-id-retrieval-time",b=async e=>{const r=await e();if(r)return c.setItem(h,r),c.setItem(v,String(t())),r;const n=c.getItem(h),o=c.getItem(v);return n&&o&&t()-parseInt(o,10)<864e5?n:null};Error;const w="undefined"==typeof window?function(e){return{loadExperimentAssignment:async t=>(e.logError({message:"Attempting to load ExperimentAssignment in SSR context",experimentName:t}),i(t)),dangerouslyGetExperimentAssignment:t=>(e.logError({message:"Attempting to dangerously get ExperimentAssignment in SSR context",experimentName:t}),i(t)),config:e}}:function(e){if("undefined"==typeof window)throw new Error("Running outside of a browser context.");const r=r=>function(n){let a=null;return()=>(a||(a=(async()=>{const n=await async function(e,r){const n=t(),{variations:a,ttl:c}=function(e){if(function(e){return p(e)&&p(e.variations)&&"number"==typeof e.ttl&&0<e.ttl}(e))return e;throw new Error("Invalid FetchExperimentAssignmentResponse")}(await e.fetchExperimentAssignment({anonId:await b(e.getAnonId),experimentName:r})),l=Math.max(60,c),u=Object.entries(a).map((([e,t])=>({experimentName:e,variationName:t,retrievedTimestamp:n,ttl:l}))).map(s);if(u.length>1)throw new Error("Received multiple experiment assignments while trying to fetch exactly one.");if(0===u.length)return i(r,l);const f=u[0];if(f.experimentName!==r)throw new Error("Newly fetched ExperimentAssignment's experiment name does not match request.");if(!o(f))throw new Error("Newly fetched experiment isn't alive.");return f}(e,r);return y(n),n})().finally((()=>{a=null}))),a)}(),n={},a=(...t)=>{try{e.logError(...t)}catch(e){}};try{(u=c.length,[...Array(u).keys()]).map((e=>c.key(e))).filter(d).map(g).filter((e=>{try{if(o(m(e)))return!1}catch(e){}return!0})).map(f).map((e=>c.removeItem(e)))}catch(e){a({message:e.message,source:"removeExpiredExperimentAssignments-error"})}var u;return{loadExperimentAssignment:async e=>{try{if(!l(e))throw new Error(`Invalid experimentName: "${e}"`);const i=m(e);if(i&&o(i))return i;void 0===n[e]&&(n[e]=r(e));let a=1e4;Math.random()>.5&&(a=5e3);const p=await(t=n[e](),c=a,Promise.race([t,new Promise(((e,t)=>setTimeout((()=>t(new Error(`Promise has timed-out after ${c}ms.`))),c)))]));if(!p)throw new Error("Could not fetch ExperimentAssignment");return p}catch(t){a({message:t.message,experimentName:e,source:"loadExperimentAssignment-initialError"})}var t,c;try{const t=m(e);if(t)return t;const r=i(e);return y(r),r}catch(t){return a({message:t.message,experimentName:e,source:"loadExperimentAssignment-fallbackError"}),i(e)}},dangerouslyGetExperimentAssignment:r=>{try{if(!l(r))throw new Error(`Invalid experimentName: ${r}`);const n=m(r);if(!n)throw new Error("Trying to dangerously get an ExperimentAssignment that hasn't loaded.");return e.isDevelopmentMode&&n&&t()-n.retrievedTimestamp<1e3&&a({message:"Warning: Trying to dangerously get an ExperimentAssignment too soon after loading it.",experimentName:r,source:"dangerouslyGetExperimentAssignment"}),n}catch(e){return a({message:e.message,experimentName:r,source:"dangerouslyGetExperimentAssignment-error"}),i(r)}},config:e}};var S=r(61250),x=r(99196);const E={isEligible:!0};function A(e){const t=(t,r={})=>{const n={...E,...r},[o]=(0,x.useState)(t),[i,a]=(0,x.useState)([!0,null]);return(0,x.useEffect)((()=>{let r=!0;return n.isEligible&&e.loadExperimentAssignment(t).then((e=>{r&&a([!1,e])})),()=>{r=!1}}),[t,n.isEligible]),t===o||o.startsWith("explat_test")||e.config.logError({message:"[ExPlat] useExperiment: experimentName should never change between renders!"}),n.isEligible?i:[!1,null]};return{useExperiment:t,Experiment:({defaultExperience:e,treatmentExperience:r,loadingExperience:n,name:o,options:i})=>{const[a,c]=t(o,i);return a?(0,S.jsx)(S.Fragment,{children:n},void 0):c?.variationName?(0,S.jsx)(S.Fragment,{children:r},void 0):(0,S.jsx)(S.Fragment,{children:e},void 0)},ProvideExperimentData:({children:e,name:r,options:n})=>{const[o,i]=t(r,n);return e(o,i)}}}const O=!1,j=e=>{var t;const r=e=>{};try{const{message:n,...o}=e,i={message:n,properties:{...o,context:"explat",explat_client:"woocommerce"}};{if(!(null===(t=window.wcTracks)||void 0===t?void 0:t.isEnabled))throw new Error("Tracking is disabled, can't send error to the server");const e=new window.FormData;e.append("error",JSON.stringify(i)),window.fetch("https://public-api.wordpress.com/rest/v1.1/js-error",{method:"POST",body:e}).catch(r)}}catch(e){}};var P=r(79119);const N=window.wp.hooks,_=window.wp.apiFetch;var I=r.n(_);const k=e=>{let{experimentName:t,anonId:r}=e;var n,o,i,a,c,p,l,s,u,f;const y=(0,N.applyFilters)("woocommerce_explat_request_args",{experiment_name:t,anon_id:null!=r?r:void 0,woo_country_code:(null===(i=null===(o=null===(n=window.wcSettings)||void 0===n?void 0:n.preloadSettings)||void 0===o?void 0:o.general)||void 0===i?void 0:i.woocommerce_default_country)||(null===(l=null===(p=null===(c=null===(a=window.wcSettings)||void 0===a?void 0:a.admin)||void 0===c?void 0:c.preloadSettings)||void 0===p?void 0:p.general)||void 0===l?void 0:l.woocommerce_default_country),woo_wcadmin_install_timestamp:null===(f=null===(u=null===(s=window.wcSettings)||void 0===s?void 0:s.admin)||void 0===u?void 0:u.preloadOptions)||void 0===f?void 0:f.woocommerce_admin_install_timestamp});if(!(e=>e.hasOwnProperty("experiment_name")&&e.hasOwnProperty("woo_country_code")&&e.hasOwnProperty("woo_wcadmin_install_timestamp"))(y))throw new Error(`Invalid query Params: ${JSON.stringify(y)}`);if(!/^[A-Za-z0-9_]+$/.test(y.experiment_name))throw new Error(`Invalid A/B test name: ${y.experiment_name}`);return y};var F=r(6922);let R=null;const T=async()=>{var e;return(null===(e=window.wcTracks)||void 0===e?void 0:e.isEnabled)?await R:null},D=()=>{var e;(null===(e=window.wcTracks)||void 0===e?void 0:e.isEnabled)&&(async()=>{let e=0;return R=new Promise((t=>{const r=()=>{const n=F.parse(document.cookie).tk_ai||null;"string"!=typeof n||""===n?99<=e?t(null):(e+=1,setTimeout(r,50)):t(n)};r()})),R})().catch((e=>j({message:e.message})))};D();const M=w({fetchExperimentAssignment:async e=>{let{experimentName:t,anonId:r}=e;var n;if(!(null===(n=window.wcTracks)||void 0===n?void 0:n.isEnabled))throw new Error("Tracking is disabled, can't fetch experimentAssignment");const o=k({experimentName:t,anonId:r});if(!o.anon_id)throw new Error("Can't fetch experiment assignment without an anonId or auth, please initialize anonId first or use fetchExperimentAssignmentWithAuth instead.");const i=await window.fetch(`https://public-api.wordpress.com/wpcom/v2/experiments/0.1.0/assignments/woocommerce?${(0,P.stringify)(o)}`);return await i.json()},getAnonId:T,logError:j,isDevelopmentMode:O}),{loadExperimentAssignment:U,dangerouslyGetExperimentAssignment:W}=M,{useExperiment:C,Experiment:B,ProvideExperimentData:L}=A(M),$=w({fetchExperimentAssignment:async e=>{let{experimentName:t,anonId:r}=e;var n;if(!(null===(n=window.wcTracks)||void 0===n?void 0:n.isEnabled))throw new Error("Tracking is disabled, can't fetch experimentAssignment");return await I()({path:`/wc-admin/experiments/assignment?${(0,P.stringify)(k({experimentName:t,anonId:r}))}`})},getAnonId:T,logError:j,isDevelopmentMode:O}),{loadExperimentAssignment:G,dangerouslyGetExperimentAssignment:q}=$,{useExperiment:z,Experiment:H,ProvideExperimentData:V}=A($)})(),(window.wc=window.wc||{}).explat=n})();