@embedreach/components 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/B4MFY5CR.js +12168 -0
- package/dist/chunks/HO4MOOFI.js +38 -0
- package/dist/chunks/HUY7CZI3.js +47 -0
- package/dist/chunks/index.js +36882 -0
- package/dist/index.d.ts +183 -4
- package/dist/index.es.js +5 -9935
- package/dist/index.umd.js +1228 -127
- package/dist/styles.css +1 -0
- package/package.json +20 -12
- package/dist/style.css +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,132 +1,1233 @@
|
|
|
1
|
-
(function(re,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react/jsx-runtime"),require("@tanstack/react-query"),require("react"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@tanstack/react-query","react","react-router-dom"],A):(re=typeof globalThis<"u"?globalThis:re||self,A(re.ReachProvider={},re.jsxRuntime,re.ReactQuery,re.React,re.ReactRouterDOM))})(this,function(re,A,Se,P,Fl){"use strict";var Qg=Object.defineProperty;var ey=(re,A,Se)=>A in re?Qg(re,A,{enumerable:!0,configurable:!0,writable:!0,value:Se}):re[A]=Se;var Rl=(re,A,Se)=>ey(re,typeof A!="symbol"?A+"":A,Se);function jl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Pn=jl(P);function Le(e){function t(n,r){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=n,this.code=r}return t.prototype=new Error,t.prototype.name=e,t.prototype.constructor=t,t}const Nl=Le("LaunchDarklyUnexpectedResponseError"),Ul=Le("LaunchDarklyInvalidEnvironmentIdError"),Bl=Le("LaunchDarklyInvalidUserError"),_l=Le("LaunchDarklyInvalidEventKeyError"),$l=Le("LaunchDarklyInvalidArgumentError"),zl=Le("LaunchDarklyFlagFetchError");for(var X={LDUnexpectedResponseError:Nl,LDInvalidEnvironmentIdError:Ul,LDInvalidUserError:Bl,LDInvalidEventKeyError:_l,LDInvalidArgumentError:$l,LDInvalidDataError:Le("LaunchDarklyInvalidDataError"),LDFlagFetchError:zl,LDTimeoutError:Le("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||e===400||e===408||e===429}},Kl=function(e){var t=So(e),n=t[0],r=t[1];return 3*(n+r)/4-r},Hl=function(e){var t,n,r=So(e),o=r[0],i=r[1],s=new Wl(function(c,u,d){return 3*(u+d)/4-d}(0,o,i)),a=0,l=i>0?o-4:o;for(n=0;n<l;n+=4)t=ve[e.charCodeAt(n)]<<18|ve[e.charCodeAt(n+1)]<<12|ve[e.charCodeAt(n+2)]<<6|ve[e.charCodeAt(n+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;return i===2&&(t=ve[e.charCodeAt(n)]<<2|ve[e.charCodeAt(n+1)]>>4,s[a++]=255&t),i===1&&(t=ve[e.charCodeAt(n)]<<10|ve[e.charCodeAt(n+1)]<<4|ve[e.charCodeAt(n+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t),s},Gl=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,s=0,a=n-r;s<a;s+=i)o.push(ql(e,s,s+i>a?a:s+i));return r===1?(t=e[n-1],o.push(Ee[t>>2]+Ee[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],o.push(Ee[t>>10]+Ee[t>>4&63]+Ee[t<<2&63]+"=")),o.join("")},Ee=[],ve=[],Wl=typeof Uint8Array<"u"?Uint8Array:Array,To="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ye=0;Ye<64;++Ye)Ee[Ye]=To[Ye],ve[To.charCodeAt(Ye)]=Ye;function So(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return n===-1&&(n=t),[n,n===t?0:4-n%4]}function ql(e,t,n){for(var r,o,i=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(Ee[(o=r)>>18&63]+Ee[o>>12&63]+Ee[o>>6&63]+Ee[63&o]);return i.join("")}ve[45]=62,ve[95]=63;var Yl={byteLength:Kl,toByteArray:Hl,fromByteArray:Gl},Eo=Array.isArray,Po=Object.keys,Xl=Object.prototype.hasOwnProperty,Zl=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){var r,o,i,s=Eo(t),a=Eo(n);if(s&&a){if((o=t.length)!=n.length)return!1;for(r=o;r--!=0;)if(!e(t[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=n instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==n.getTime();var u=t instanceof RegExp,d=n instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==n.toString();var f=Po(t);if((o=f.length)!==Po(n).length)return!1;for(r=o;r--!=0;)if(!Xl.call(n,f[r]))return!1;for(r=o;r--!=0;)if(!e(t[i=f[r]],n[i]))return!1;return!0}return t!=t&&n!=n};const Jl=["key","ip","country","email","firstName","lastName","avatar","name"];function Co(e){const t=unescape(encodeURIComponent(e));return Yl.fromByteArray(function(n){const r=[];for(let o=0;o<n.length;o++)r.push(n.charCodeAt(o));return r}(t))}function Cn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var An,F={appendUrlPath:function(e,t){return(e.endsWith("/")?e.substring(0,e.length-1):e)+(t.startsWith("/")?"":"/")+t},base64URLEncode:function(e){return Co(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},btoa:Co,clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return Zl(e,t)},extend:function(...e){return e.reduce((t,n)=>({...t,...n}),{})},getLDUserAgentString:function(e){const t=e.version||"?";return e.userAgent+"/"+t},objectHasOwnProperty:Cn,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){if(!e)return e;let t;return e.kind!==null&&e.kind!==void 0||Jl.forEach(n=>{const r=e[n];r!==void 0&&typeof r!="string"&&(t=t||{...e},t[n]=String(r))}),t||e},transformValuesToVersionedValues:function(e){const t={};for(const n in e)Cn(e,n)&&(t[n]={value:e[n],version:0});return t},transformVersionedValuesToValues:function(e){const t={};for(const n in e)Cn(e,n)&&(t[n]=e[n].value);return t},wrapPromiseCallback:function(e,t){const n=e.then(r=>(t&&setTimeout(()=>{t(null,r)},0),r),r=>{if(!t)return Promise.reject(r);setTimeout(()=>{t(r,null)},0)});return t?void 0:n}},Ql=new Uint8Array(16);function Ao(){if(!An&&!(An=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return An(Ql)}var ec=/^(?:[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;function Nt(e){return typeof e=="string"&&ec.test(e)}for(var ko,kn,oe=[],Dn=0;Dn<256;++Dn)oe.push((Dn+256).toString(16).substr(1));function Ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase();if(!Nt(n))throw TypeError("Stringified UUID is invalid");return n}var Mn=0,Vn=0;function Do(e){if(!Nt(e))throw TypeError("Invalid UUID");var t,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 Mo(e,t,n){function r(o,i,s,a){if(typeof o=="string"&&(o=function(u){u=unescape(encodeURIComponent(u));for(var d=[],f=0;f<u.length;++f)d.push(u.charCodeAt(f));return d}(o)),typeof i=="string"&&(i=Do(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var l=new Uint8Array(16+o.length);if(l.set(i),l.set(o,i.length),(l=n(l))[6]=15&l[6]|t,l[8]=63&l[8]|128,s){a=a||0;for(var c=0;c<16;++c)s[a+c]=l[c];return s}return Ut(l)}try{r.name=e}catch{}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Vo(e){return 14+(e+64>>>9<<4)+1}function Oe(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Bt(e,t,n,r,o,i){return Oe((s=Oe(Oe(t,e),Oe(r,i)))<<(a=o)|s>>>32-a,n);var s,a}function ie(e,t,n,r,o,i,s){return Bt(t&n|~t&r,e,t,o,i,s)}function ae(e,t,n,r,o,i,s){return Bt(t&r|n&~r,e,t,o,i,s)}function le(e,t,n,r,o,i,s){return Bt(t^n^r,e,t,o,i,s)}function ce(e,t,n,r,o,i,s){return Bt(n^(t|~r),e,t,o,i,s)}var tc=Mo("v3",48,function(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(r){for(var o=[],i=32*r.length,s="0123456789abcdef",a=0;a<i;a+=8){var l=r[a>>5]>>>a%32&255,c=parseInt(s.charAt(l>>>4&15)+s.charAt(15&l),16);o.push(c)}return o}(function(r,o){r[o>>5]|=128<<o%32,r[Vo(o)-1]=o;for(var i=1732584193,s=-271733879,a=-1732584194,l=271733878,c=0;c<r.length;c+=16){var u=i,d=s,f=a,h=l;i=ie(i,s,a,l,r[c],7,-680876936),l=ie(l,i,s,a,r[c+1],12,-389564586),a=ie(a,l,i,s,r[c+2],17,606105819),s=ie(s,a,l,i,r[c+3],22,-1044525330),i=ie(i,s,a,l,r[c+4],7,-176418897),l=ie(l,i,s,a,r[c+5],12,1200080426),a=ie(a,l,i,s,r[c+6],17,-1473231341),s=ie(s,a,l,i,r[c+7],22,-45705983),i=ie(i,s,a,l,r[c+8],7,1770035416),l=ie(l,i,s,a,r[c+9],12,-1958414417),a=ie(a,l,i,s,r[c+10],17,-42063),s=ie(s,a,l,i,r[c+11],22,-1990404162),i=ie(i,s,a,l,r[c+12],7,1804603682),l=ie(l,i,s,a,r[c+13],12,-40341101),a=ie(a,l,i,s,r[c+14],17,-1502002290),i=ae(i,s=ie(s,a,l,i,r[c+15],22,1236535329),a,l,r[c+1],5,-165796510),l=ae(l,i,s,a,r[c+6],9,-1069501632),a=ae(a,l,i,s,r[c+11],14,643717713),s=ae(s,a,l,i,r[c],20,-373897302),i=ae(i,s,a,l,r[c+5],5,-701558691),l=ae(l,i,s,a,r[c+10],9,38016083),a=ae(a,l,i,s,r[c+15],14,-660478335),s=ae(s,a,l,i,r[c+4],20,-405537848),i=ae(i,s,a,l,r[c+9],5,568446438),l=ae(l,i,s,a,r[c+14],9,-1019803690),a=ae(a,l,i,s,r[c+3],14,-187363961),s=ae(s,a,l,i,r[c+8],20,1163531501),i=ae(i,s,a,l,r[c+13],5,-1444681467),l=ae(l,i,s,a,r[c+2],9,-51403784),a=ae(a,l,i,s,r[c+7],14,1735328473),i=le(i,s=ae(s,a,l,i,r[c+12],20,-1926607734),a,l,r[c+5],4,-378558),l=le(l,i,s,a,r[c+8],11,-2022574463),a=le(a,l,i,s,r[c+11],16,1839030562),s=le(s,a,l,i,r[c+14],23,-35309556),i=le(i,s,a,l,r[c+1],4,-1530992060),l=le(l,i,s,a,r[c+4],11,1272893353),a=le(a,l,i,s,r[c+7],16,-155497632),s=le(s,a,l,i,r[c+10],23,-1094730640),i=le(i,s,a,l,r[c+13],4,681279174),l=le(l,i,s,a,r[c],11,-358537222),a=le(a,l,i,s,r[c+3],16,-722521979),s=le(s,a,l,i,r[c+6],23,76029189),i=le(i,s,a,l,r[c+9],4,-640364487),l=le(l,i,s,a,r[c+12],11,-421815835),a=le(a,l,i,s,r[c+15],16,530742520),i=ce(i,s=le(s,a,l,i,r[c+2],23,-995338651),a,l,r[c],6,-198630844),l=ce(l,i,s,a,r[c+7],10,1126891415),a=ce(a,l,i,s,r[c+14],15,-1416354905),s=ce(s,a,l,i,r[c+5],21,-57434055),i=ce(i,s,a,l,r[c+12],6,1700485571),l=ce(l,i,s,a,r[c+3],10,-1894986606),a=ce(a,l,i,s,r[c+10],15,-1051523),s=ce(s,a,l,i,r[c+1],21,-2054922799),i=ce(i,s,a,l,r[c+8],6,1873313359),l=ce(l,i,s,a,r[c+15],10,-30611744),a=ce(a,l,i,s,r[c+6],15,-1560198380),s=ce(s,a,l,i,r[c+13],21,1309151649),i=ce(i,s,a,l,r[c+4],6,-145523070),l=ce(l,i,s,a,r[c+11],10,-1120210379),a=ce(a,l,i,s,r[c+2],15,718787259),s=ce(s,a,l,i,r[c+9],21,-343485551),i=Oe(i,u),s=Oe(s,d),a=Oe(a,f),l=Oe(l,h)}return[i,s,a,l]}(function(r){if(r.length===0)return[];for(var o=8*r.length,i=new Uint32Array(Vo(o)),s=0;s<o;s+=8)i[s>>5]|=(255&r[s/8])<<s%32;return i}(e),8*e.length))}),nc=tc;function rc(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 Ln(e,t){return e<<t|e>>>32-t}var oc=Mo("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),l=0;l<s;++l){for(var c=new Uint32Array(16),u=0;u<16;++u)c[u]=e[64*l+4*u]<<24|e[64*l+4*u+1]<<16|e[64*l+4*u+2]<<8|e[64*l+4*u+3];a[l]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var f=new Uint32Array(80),h=0;h<16;++h)f[h]=a[d][h];for(var p=16;p<80;++p)f[p]=Ln(f[p-3]^f[p-8]^f[p-14]^f[p-16],1);for(var y=n[0],v=n[1],m=n[2],b=n[3],x=n[4],S=0;S<80;++S){var g=Math.floor(S/20),k=Ln(y,5)+rc(g,v,m,b)+x+t[g]+f[S]>>>0;x=b,b=m,m=Ln(v,30)>>>0,v=y,y=k}n[0]=n[0]+y>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+x>>>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]]}),sc=oc,On=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||ko,s=e.clockseq!==void 0?e.clockseq:kn;if(i==null||s==null){var a=e.random||(e.rng||Ao)();i==null&&(i=ko=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=kn=16383&(a[6]<<8|a[7]))}var l=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:Vn+1,u=l-Mn+(c-Vn)/1e4;if(u<0&&e.clockseq===void 0&&(s=s+1&16383),(u<0||l>Mn)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Mn=l,Vn=c,kn=s;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var f=l/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var h=0;h<6;++h)o[r+h]=i[h];return t||Ut(o)},v3:nc,v4:function(e,t,n){var 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(var o=0;o<16;++o)t[n+o]=r[o];return t}return Ut(r)},v5:sc,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!Nt(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:Nt,stringify:Ut,parse:Do});const ft=["debug","info","warn","error","none"];var In={commonBasicLogger:function(e,t){if(e&&e.destination&&typeof e.destination!="function")throw new Error("destination for basicLogger was set to a non-function");function n(c){return function(u){console&&console[c]&&console[c].call(console,u)}}const r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n("log"),n("info"),n("warn"),n("error")],o=!(!e||!e.destination),i=e&&e.prefix!==void 0&&e.prefix!==null?e.prefix:"[LaunchDarkly] ";let s=1;if(e&&e.level)for(let c=0;c<ft.length;c++)ft[c]===e.level&&(s=c);function a(c,u,d){if(d.length<1)return;let f;const h=o?u+": "+i:i;if(d.length!==1&&t){const p=[...d];p[0]=h+p[0],f=t(...p)}else f=h+d[0];try{r[c](f)}catch(p){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+u+" method threw an exception: "+p)}}const l={};for(let c=0;c<ft.length;c++){const u=ft[c];if(u!=="none")if(c<s)l[u]=()=>{};else{const d=c;l[u]=function(){a(d,u,arguments)}}}return l},validateLogger:function(e){ft.forEach(t=>{if(t!=="none"&&(!e[t]||typeof e[t]!="function"))throw new Error("Provided logger instance must support logger."+t+"(...) method")})}};function _t(e){return e&&e.message?e.message:typeof e=="string"||e instanceof String?e:JSON.stringify(e)}const Xe=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var I={bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},bootstrapOldFormat:function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+Xe},clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},debugEnqueueingEvent:function(e){return'enqueueing "'+e+'" event'},debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"},debugPostingEvents:function(e){return"sending "+e+" events"},debugStreamDelete:function(e){return'received streaming deletion for flag "'+e+'"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag "'+e+'"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},debugStreamPing:function(){return"received ping message from stream"},debugPolling:function(e){return"polling for feature flags at "+e},debugStreamPut:function(){return"received streaming update for all flags"},deprecated:function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},environmentNotFound:function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+Xe},environmentNotSpecified:function(){return"No environment/client-side ID was specified."+Xe},errorFetchingFlags:function(e){return"Error fetching flag settings: "+_t(e)},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutContext:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},httpErrorMessage:function(e,t,n){return"Received error "+e+(e===401?" (invalid SDK key)":"")+" for "+t+" - "+(X.isHttpErrorRecoverable(e)?n:"giving up permanently")},httpUnavailable:function(){return"Cannot make HTTP requests in this environment."+Xe},identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},inspectorMethodError:(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got "'+e+'"'},invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},invalidInspector:(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,invalidKey:function(){return"Event key must be a string"},invalidMetricValue:e=>`The track function was called with a non-numeric "metricValue" (${e}), only numeric metric values are supported.`,invalidContext:function(){return"Invalid context specified."+Xe},invalidTagValue:e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return"local storage is unavailable: "+_t(e)},networkError:e=>"network error"+(e?" ("+e+")":""),optionBelowMinimum:(e,t,n)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+n,streamClosing:function(){return"Closing stream connection"},streamConnecting:function(e){return"Opening stream connection to "+e},streamError:function(e,t){return"Error on stream connection: "+_t(e)+", will continue retrying after "+t+" milliseconds."},tagValueTooLong:e=>`Value of "${e}" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event "'+e+'" does not exist'},unknownOption:e=>'Ignoring unknown config option "'+e+'"',contextNotSpecified:function(){return"No context specified."+Xe},unrecoverableStreamError:e=>`Error on stream connection ${_t(e)}, giving up permanently`,wrongOptionType:(e,t,n)=>'Config option "'+e+'" should be of type '+t+", got "+n+", using default value",wrongOptionTypeBoolean:(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean"};const{validateLogger:ic}=In,Lo={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,n){const r={};return t.id&&(r.id=Oo(`${e}.id`,t.id,n)),t.version&&(r.version=Oo(`${e}.version`,t.version,n)),r}},inspectors:{default:[]}},ac=/^(\w|\.|-)+$/;function Rn(e){return e&&e.replace(/\/+$/,"")}function Oo(e,t,n){if(typeof t=="string"&&t.match(ac)){if(!(t.length>64))return t;n.warn(I.tagValueTooLong(e))}else n.warn(I.invalidTagValue(e))}var Fn={baseOptionDefs:Lo,validate:function(e,t,n,r){const o=F.extend({logger:{default:r}},Lo,n),i={};function s(l){F.onNextTick(()=>{t&&t.maybeReportError(new X.LDInvalidArgumentError(l))})}let a=F.extend({},e||{});return function(l){const c=l;Object.keys(i).forEach(u=>{if(c[u]!==void 0){const d=i[u];r&&r.warn(I.deprecated(u,d)),d&&(c[d]===void 0&&(c[d]=c[u]),delete c[u])}})}(a),a=function(l){const c=F.extend({},l);return Object.keys(o).forEach(u=>{c[u]!==void 0&&c[u]!==null||(c[u]=o[u]&&o[u].default)}),c}(a),a=function(l){const c=F.extend({},l),u=d=>{if(d===null)return"any";if(d===void 0)return;if(Array.isArray(d))return"array";const f=typeof d;return f==="boolean"||f==="string"||f==="number"||f==="function"?f:"object"};return Object.keys(l).forEach(d=>{const f=l[d];if(f!=null){const h=o[d];if(h===void 0)s(I.unknownOption(d));else{const p=h.type||u(h.default),y=h.validator;if(y){const v=y(d,l[d],r);v!==void 0?c[d]=v:delete c[d]}else if(p!=="any"){const v=p.split("|"),m=u(f);v.indexOf(m)<0?p==="boolean"?(c[d]=!!f,s(I.wrongOptionTypeBoolean(d,m))):(s(I.wrongOptionType(d,p,m)),c[d]=h.default):m==="number"&&h.minimum!==void 0&&f<h.minimum&&(s(I.optionBelowMinimum(d,f,h.minimum)),c[d]=h.minimum)}}}}),c.baseUrl=Rn(c.baseUrl),c.streamUrl=Rn(c.streamUrl),c.eventsUrl=Rn(c.eventsUrl),c}(a),ic(a.logger),a},getTags:function(e){const t={};return e&&(e.application&&e.application.id!==void 0&&e.application.id!==null&&(t["application-id"]=[e.application.id]),e.application&&e.application.version!==void 0&&e.application.id!==null&&(t["application-version"]=[e.application.version])),t}};const{getLDUserAgentString:lc}=F;var jn={getLDHeaders:function(e,t){if(t&&!t.sendLDHeaders)return{};const n={};n[e.userAgentHeaderName||"User-Agent"]=lc(e),t&&t.wrapperName&&(n["X-LaunchDarkly-Wrapper"]=t.wrapperVersion?t.wrapperName+"/"+t.wrapperVersion:t.wrapperName);const r=Fn.getTags(t),o=Object.keys(r);return o.length&&(n["x-launchdarkly-tags"]=o.sort().map(i=>Array.isArray(r[i])?r[i].sort().map(s=>`${i}/${s}`):[`${i}/${r[i]}`]).reduce((i,s)=>i.concat(s),[]).join(" ")),n},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};const{v1:cc}=On,{getLDHeaders:uc,transformHeaders:dc}=jn;var Io=function(e,t,n){const r=F.extend({"Content-Type":"application/json"},uc(e,n)),o={};return o.sendEvents=(i,s,a)=>{if(!e.httpRequest)return Promise.resolve();const l=JSON.stringify(i),c=a?null:cc();return function u(d){const f=a?r:F.extend({},r,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":c});return e.httpRequest("POST",s,dc(f,n),l).promise.then(h=>{if(h)return h.status>=400&&X.isHttpErrorRecoverable(h.status)&&d?u(!1):function(p){const y={status:p.status},v=p.header("date");if(v){const m=Date.parse(v);m&&(y.serverTime=m)}return y}(h)}).catch(()=>d?u(!1):Promise.reject())}(!0).catch(()=>{})},o};const{commonBasicLogger:fc}=In;function Ro(e){return typeof e=="string"&&e!=="kind"&&e.match(/^(\w|\.|-)+$/)}function Fo(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}var $t={checkContext:function(e,t){if(e){if(t&&(e.kind===void 0||e.kind===null))return e.key!==void 0&&e.key!==null;const n=e.key,r=e.kind===void 0?"user":e.kind,o=Ro(r),i=r==="multi"||n!=null&&n!=="";if(r==="multi"){const s=Object.keys(e).filter(a=>a!=="kind");return i&&s.every(a=>Ro(a))&&s.every(a=>{const l=e[a].key;return l!=null&&l!==""})}return i&&o}return!1},getContextKeys:function(e,t=fc()){if(!e)return;const n={},{kind:r,key:o}=e;switch(r){case void 0:n.user=`${o}`;break;case"multi":Object.entries(e).filter(([i])=>i!=="kind").forEach(([i,s])=>{s&&s.key&&(n[i]=s.key)});break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(e){return e?e.kind===null||e.kind===void 0?["user"]:e.kind!=="multi"?[e.kind]:Object.keys(e).filter(t=>t!=="kind"):[]},getCanonicalKey:function(e){if(e){if((e.kind===void 0||e.kind===null||e.kind==="user")&&e.key)return e.key;if(e.kind!=="multi"&&e.key)return`${e.kind}:${Fo(e.key)}`;if(e.kind==="multi")return Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Fo(e[t].key)}`).join(":")}}};const{getContextKinds:hc}=$t;var pc=function(){const e={};let t=0,n=0,r={},o={};return e.summarizeEvent=i=>{if(i.kind==="feature"){const s=i.key+":"+(i.variation!==null&&i.variation!==void 0?i.variation:"")+":"+(i.version!==null&&i.version!==void 0?i.version:""),a=r[s];let l=o[i.key];l||(l=new Set,o[i.key]=l),function(c){return c.context?hc(c.context):c.contextKeys?Object.keys(c.contextKeys):[]}(i).forEach(c=>l.add(c)),a?a.count=a.count+1:r[s]={count:1,key:i.key,version:i.version,variation:i.variation,value:i.value,default:i.default},(t===0||i.creationDate<t)&&(t=i.creationDate),i.creationDate>n&&(n=i.creationDate)}},e.getSummary=()=>{const i={};let s=!0;for(const a of Object.values(r)){let l=i[a.key];l||(l={default:a.default,counters:[],contextKinds:[...o[a.key]]},i[a.key]=l);const c={value:a.value,count:a.count};a.variation!==void 0&&a.variation!==null&&(c.variation=a.variation),a.version!==void 0&&a.version!==null?c.version=a.version:c.unknown=!0,l.counters.push(c),s=!1}return s?null:{startDate:t,endDate:n,features:i}},e.clearSummary=()=>{t=0,n=0,r={},o={}},e};function jo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function No(e){return(e.startsWith("/")?e.substring(1):e).split("/").map(t=>t.indexOf("~")>=0?t.replace(/~1/g,"/").replace(/~0/g,"~"):t)}function Uo(e){return!e.startsWith("/")}function Bo(e,t){const n=Uo(e),r=Uo(t);if(n&&r)return e===t;if(n){const o=No(t);return o.length===1&&e===o[0]}if(r){const o=No(e);return o.length===1&&t===o[0]}return e===t}function _o(e){return`/${jo(e)}`}var Nn={cloneExcluding:function(e,t){const n=[],r={},o=[];for(n.push(...Object.keys(e).map(i=>({key:i,ptr:_o(i),source:e,parent:r,visited:[e]})));n.length;){const i=n.pop();if(t.some(s=>Bo(s,i.ptr)))o.push(i.ptr);else{const s=i.source[i.key];if(s===null)i.parent[i.key]=s;else if(Array.isArray(s))i.parent[i.key]=[...s];else if(typeof s=="object"){if(i.visited.includes(s))continue;i.parent[i.key]={},n.push(...Object.keys(s).map(a=>{return{key:a,ptr:(l=i.ptr,c=jo(a),`${l}/${c}`),source:s,parent:i.parent[i.key],visited:[...i.visited,s]};var l,c}))}else i.parent[i.key]=s}}return{cloned:r,excluded:o.sort()}},compare:Bo,literalToReference:_o},mc=function(e){const t={},n=e.allAttributesPrivate,r=e.privateAttributes||[],o=["key","kind","_meta","anonymous"],i=["name","ip","firstName","lastName","email","avatar","country"],s=(a,l)=>{if(typeof a!="object"||a===null||Array.isArray(a))return;const{cloned:c,excluded:u}=Nn.cloneExcluding(a,((d,f)=>(n||f&&d.anonymous?Object.keys(d):[...r,...d._meta&&d._meta.privateAttributes||[]]).filter(h=>!o.some(p=>Nn.compare(h,p))))(a,l));return c.key=String(c.key),u.length&&(c._meta||(c._meta={}),c._meta.redactedAttributes=u),c._meta&&(delete c._meta.privateAttributes,Object.keys(c._meta).length===0&&delete c._meta),c.anonymous!==void 0&&(c.anonymous=!!c.anonymous),c};return t.filter=(a,l=!1)=>a.kind===void 0||a.kind===null?s((c=>{const u={...c.custom||{},kind:"user",key:c.key};c.anonymous!==void 0&&(u.anonymous=!!c.anonymous);for(const d of i)delete u[d],c[d]!==void 0&&c[d]!==null&&(u[d]=String(c[d]));return c.privateAttributeNames!==void 0&&c.privateAttributeNames!==null&&(u._meta=u._meta||{},u._meta.privateAttributes=c.privateAttributeNames.map(d=>d.startsWith("/")?Nn.literalToReference(d):d)),u})(a),l):a.kind==="multi"?((c,u)=>{const d={kind:c.kind},f=Object.keys(c);for(const h of f)if(h!=="kind"){const p=s(c[h],u);p&&(d[h]=p)}return d})(a,l):s(a,l),t};const{getContextKeys:gc}=$t;var yc=function(e,t,n,r=null,o=null,i=null){const s={},a=i||Io(e,n,t),l=F.appendUrlPath(t.eventsUrl,"/events/bulk/"+n),c=pc(),u=mc(t),d=t.samplingInterval,f=t.eventCapacity,h=t.flushInterval,p=t.logger;let y,v=[],m=0,b=!1,x=!1;function S(){return d===0||Math.floor(Math.random()*d)===0}function g(D){const M=F.extend({},D);return D.kind==="identify"?M.context=u.filter(D.context):D.kind==="feature"?M.context=u.filter(D.context,!0):(M.contextKeys=gc(D.context,p),delete M.context),D.kind==="feature"&&(delete M.trackEvents,delete M.debugEventsUntilDate),M}function k(D){v.length<f?(v.push(D),x=!1):(x||(x=!0,p.warn(I.eventCapacityExceeded())),r&&r.incrementDroppedEvents())}return s.enqueue=function(D){if(b)return;let M=!1,C=!1;var L;if(c.summarizeEvent(D),D.kind==="feature"?S()&&(M=!!D.trackEvents,C=!!(L=D).debugEventsUntilDate&&L.debugEventsUntilDate>m&&L.debugEventsUntilDate>new Date().getTime()):M=S(),M&&k(g(D)),C){const N=F.extend({},D,{kind:"debug"});N.context=u.filter(N.context),delete N.trackEvents,delete N.debugEventsUntilDate,k(N)}},s.flush=function(){if(b)return Promise.resolve();const D=v,M=c.getSummary();return c.clearSummary(),M&&(M.kind="summary",D.push(M)),r&&r.setEventsInLastBatch(D.length),D.length===0?Promise.resolve():(v=[],p.debug(I.debugPostingEvents(D.length)),a.sendEvents(D,l).then(C=>{C&&(C.serverTime&&(m=C.serverTime),X.isHttpErrorRecoverable(C.status)||(b=!0),C.status>=400&&F.onNextTick(()=>{o.maybeReportError(new X.LDUnexpectedResponseError(I.httpErrorMessage(C.status,"event posting","some events were dropped")))}))}))},s.start=function(){const D=()=>{s.flush(),y=setTimeout(D,h)};y=setTimeout(D,h)},s.stop=function(){clearTimeout(y)},s},vc=function(e){const t={},n={};return t.on=function(r,o,i){n[r]=n[r]||[],n[r]=n[r].concat({handler:o,context:i})},t.off=function(r,o,i){if(n[r])for(let s=0;s<n[r].length;s++)n[r][s].handler===o&&n[r][s].context===i&&(n[r]=n[r].slice(0,s).concat(n[r].slice(s+1)))},t.emit=function(r){if(!n[r])return;const o=n[r].slice(0);for(let i=0;i<o.length;i++)o[i].handler.apply(o[i].context,Array.prototype.slice.call(arguments,1))},t.getEvents=function(){return Object.keys(n)},t.getEventListenerCount=function(r){return n[r]?n[r].length:0},t.maybeReportError=function(r){r&&(n.error?this.emit("error",r):(e||console).error(r.message))},t};const zt="ready",Un="initialized",Bn="failed";var bc=function(e){let t=!1,n=!1,r=null,o=null;const i=new Promise(s=>{const a=()=>{e.off(zt,a),s()};e.on(zt,a)}).catch(()=>{});return{getInitializationPromise:()=>o||(t?Promise.resolve():n?Promise.reject(r):(o=new Promise((s,a)=>{const l=()=>{e.off(Un,l),s()},c=u=>{e.off(Bn,c),a(u)};e.on(Un,l),e.on(Bn,c)}),o)),getReadyPromise:()=>i,signalSuccess:()=>{t||n||(t=!0,e.emit(Un),e.emit(zt))},signalFailure:s=>{t||n||(n=!0,r=s,e.emit(Bn,s),e.emit(zt)),e.maybeReportError(s)}}},xc=function(e,t,n,r){const o={};function i(){let s="";const a=r.getContext();return a&&(s=n||F.btoa(JSON.stringify(a))),"ld:"+t+":"+s}return o.loadFlags=()=>e.get(i()).then(s=>{if(s==null)return null;try{let a=JSON.parse(s);if(a){const l=a.$schema;l===void 0||l<1?a=F.transformValuesToVersionedValues(a):delete a.$schema}return a}catch{return o.clearFlags().then(()=>null)}}),o.saveFlags=s=>{const a=F.extend({},s,{$schema:1});return e.set(i(),JSON.stringify(a))},o.clearFlags=()=>e.clear(i()),o},wc=function(e,t){const n={};let r=!1;const o=i=>{r||(r=!0,t.warn(I.localStorageUnavailable(i)))};return n.isEnabled=()=>!!e,n.get=i=>new Promise(s=>{e?e.get(i).then(s).catch(a=>{o(a),s(void 0)}):s(void 0)}),n.set=(i,s)=>new Promise(a=>{e?e.set(i,s).then(()=>a(!0)).catch(l=>{o(l),a(!1)}):a(!1)}),n.clear=i=>new Promise(s=>{e?e.clear(i).then(()=>s(!0)).catch(a=>{o(a),s(!1)}):s(!1)}),n};const{appendUrlPath:$o,base64URLEncode:Tc,objectHasOwnProperty:Sc}=F,{getLDHeaders:Ec,transformHeaders:Pc}=jn,{isHttpErrorRecoverable:Cc}=X;var Ac=function(e,t,n,r){const o=t.streamUrl,i=t.logger,s={},a=$o(o,"/eval/"+n),l=t.useReport,c=t.evaluationReasons,u=t.streamReconnectDelay,d=Ec(e,t);let f,h=!1,p=null,y=null,v=null,m=null,b=null,x=0;function S(){const L=(N=function(){const R=u*Math.pow(2,x);return R>3e4?3e4:R}(),N-Math.trunc(.5*Math.random()*N));var N;return x+=1,L}function g(L){if(L.status&&typeof L.status=="number"&&!Cc(L.status))return M(),i.error(I.unrecoverableStreamError(L)),void(y&&(clearTimeout(y),y=null));const N=S();h||(i.warn(I.streamError(L,N)),h=!0),C(!1),M(),k(N)}function k(L){y||(L?y=setTimeout(D,L):D())}function D(){let L;y=null;let N="";const R={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){m!=null&&(N="h="+m),l?e.eventSourceAllowsReport?(L=a,R.method="REPORT",R.headers["Content-Type"]="application/json",R.body=JSON.stringify(v)):(L=$o(o,"/ping/"+n),N=""):L=a+"/"+Tc(JSON.stringify(v)),R.headers=Pc(R.headers,t),c&&(N=N+(N?"&":"")+"withReasons=true"),L=L+(N?"?":"")+N,M(),i.info(I.streamConnecting(L)),f=new Date().getTime(),p=e.eventSourceFactory(L,R);for(const te in b)Sc(b,te)&&p.addEventListener(te,b[te]);p.onerror=g,p.onopen=()=>{x=0}}}function M(){p&&(i.info(I.streamClosing()),p.close(),p=null)}function C(L){f&&r&&r.recordStreamInit(f,!L,new Date().getTime()-f),f=null}return s.connect=function(L,N,R){v=L,m=N,b={};for(const te in R||{})b[te]=function(Z){h=!1,C(!0),R[te]&&R[te](Z)};k()},s.disconnect=function(){clearTimeout(y),y=null,M()},s.isConnected=function(){return!!(p&&e.eventSourceIsActive&&e.eventSourceIsActive(p))},s},kc=function(e){let t,n,r,o;const i={addPromise:(s,a)=>{t=s,n&&n(),n=a,s.then(l=>{t===s&&(r(l),e&&e())},l=>{t===s&&(o(l),e&&e())})}};return i.resultPromise=new Promise((s,a)=>{r=s,o=a}),i};const{transformHeaders:Dc,getLDHeaders:Mc}=jn,zo="application/json";var Vc=function(e,t,n){const r=t.baseUrl,o=t.useReport,i=t.evaluationReasons,s=t.logger,a={},l={};function c(u,d){if(!e.httpRequest)return new Promise((m,b)=>{b(new X.LDFlagFetchError(I.httpUnavailable()))});const f=d?"REPORT":"GET",h=Mc(e,t);d&&(h["Content-Type"]=zo);let p=l[u];p||(p=kc(()=>{delete l[u]}),l[u]=p);const y=e.httpRequest(f,u,Dc(h,t),d),v=y.promise.then(m=>{if(m.status===200){if(m.header("content-type")&&m.header("content-type").substring(0,16)===zo)return JSON.parse(m.body);{const b=I.invalidContentType(m.header("content-type")||"");return Promise.reject(new X.LDFlagFetchError(b))}}return Promise.reject(function(b){return b.status===404?new X.LDInvalidEnvironmentIdError(I.environmentNotFound()):new X.LDFlagFetchError(I.errorFetchingFlags(b.statusText||String(b.status)))}(m))},m=>Promise.reject(new X.LDFlagFetchError(I.networkError(m))));return p.addPromise(v,()=>{y.cancel&&y.cancel()}),p.resultPromise}return a.fetchJSON=function(u){return c(F.appendUrlPath(r,u),null)},a.fetchFlagSettings=function(u,d){let f,h,p,y="";return o?(h=[r,"/sdk/evalx/",n,"/context"].join(""),p=JSON.stringify(u)):(f=F.base64URLEncode(JSON.stringify(u)),h=[r,"/sdk/evalx/",n,"/contexts/",f].join("")),d&&(y="h="+d),i&&(y=y+(y?"&":"")+"withReasons=true"),h=h+(y?"?":"")+y,s.debug(I.debugPolling(h)),c(h,p)},a},Lc=function(e,t){const n={};let r;return n.setContext=function(o){r=F.sanitizeContext(o),r&&t&&t(F.clone(r))},n.getContext=function(){return r?F.clone(r):null},n};const{v1:Oc}=On,{getContextKinds:Ic}=$t;var Rc=function(e){function t(r){return r==null||r==="user"?"ld:$anonUserId":`ld:$contextKey:${r}`}function n(r,o){return o.key!==null&&o.key!==void 0?(o.key=o.key.toString(),Promise.resolve(o)):o.anonymous?function(i){return e.get(t(i))}(r).then(i=>{if(i)return o.key=i,o;{const s=Oc();return o.key=s,function(a,l){return e.set(t(l),a)}(s,r).then(()=>o)}}):Promise.reject(new X.LDInvalidUserError(I.invalidContext()))}this.processContext=r=>{if(!r)return Promise.reject(new X.LDInvalidUserError(I.contextNotSpecified()));const o=F.clone(r);if(r.kind==="multi"){const i=Ic(o);return Promise.all(i.map(s=>n(s,o[s]))).then(()=>o)}return n(r.kind,o)}};const{v1:Fc}=On,{baseOptionDefs:_n}=Fn,{appendUrlPath:jc}=F;var $n={DiagnosticId:function(e){const t={diagnosticId:Fc()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},DiagnosticsAccumulator:function(e){let t,n,r,o;function i(s){t=s,n=0,r=0,o=[]}return i(e),{getProps:()=>({dataSinceDate:t,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:s=>{t=s.dataSinceDate,n=s.droppedEvents||0,r=s.eventsInLastBatch||0,o=s.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:s=>{r=s},recordStreamInit:(s,a,l)=>{const c={timestamp:s,failed:a,durationMillis:l};o.push(c)},reset:i}},DiagnosticsManager:function(e,t,n,r,o,i,s){const a=!!e.diagnosticUseCombinedEvent,l="ld:"+o+":$diagnostics",c=jc(i.eventsUrl,"/events/diagnostic/"+o),u=i.diagnosticRecordingInterval,d=n;let f,h,p=!!i.streaming;const y={};function v(){return{sdk:x(),configuration:S(),platform:e.diagnosticPlatformData}}function m(g){i.logger&&i.logger.debug(I.debugPostingDiagnosticEvent(g)),r.sendEvents(g,c,!0).then(()=>{}).catch(()=>{})}function b(){m(function(){const g=new Date().getTime();let k={kind:a?"diagnostic-combined":"diagnostic",id:s,creationDate:g,...d.getProps()};return a&&(k={...k,...v()}),d.reset(g),k}()),h=setTimeout(b,u),f=new Date().getTime(),a&&function(){if(t.isEnabled()){const g={...d.getProps()};t.set(l,JSON.stringify(g))}}()}function x(){const g={...e.diagnosticSdkData};return i.wrapperName&&(g.wrapperName=i.wrapperName),i.wrapperVersion&&(g.wrapperVersion=i.wrapperVersion),g}function S(){return{customBaseURI:i.baseUrl!==_n.baseUrl.default,customStreamURI:i.streamUrl!==_n.streamUrl.default,customEventsURI:i.eventsUrl!==_n.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation}}return y.start=()=>{a?function(g){if(!t.isEnabled())return g(!1);t.get(l).then(k=>{if(k)try{const D=JSON.parse(k);d.setProps(D),f=D.dataSinceDate}catch{}g(!0)}).catch(()=>{g(!1)})}(g=>{if(g){const k=(f||0)+u,D=new Date().getTime();D>=k?b():h=setTimeout(b,k-D)}else Math.floor(4*Math.random())===0?b():h=setTimeout(b,u)}):(m({kind:"diagnostic-init",id:s,creationDate:d.getProps().dataSinceDate,...v()}),h=setTimeout(b,u))},y.stop=()=>{h&&clearTimeout(h)},y.setStreaming=g=>{p=g},y}},Nc=function(e,t){let n=!1;const r={type:e.type,name:e.name,synchronous:e.synchronous,method:(...o)=>{try{e.method(...o)}catch{n||(n=!0,t.warn(I.inspectorMethodError(r.type,r.name)))}}};return r};const{onNextTick:Kt}=F,he={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(he);var Uc={InspectorTypes:he,InspectorManager:function(e,t){const n={},r={[he.flagUsed]:[],[he.flagDetailsChanged]:[],[he.flagDetailChanged]:[],[he.clientIdentityChanged]:[]},o={[he.flagUsed]:[],[he.flagDetailsChanged]:[],[he.flagDetailChanged]:[],[he.clientIdentityChanged]:[]},i=e&&e.map(s=>Nc(s,t));return i&&i.forEach(s=>{Object.prototype.hasOwnProperty.call(r,s.type)&&!s.synchronous?r[s.type].push(s):Object.prototype.hasOwnProperty.call(o,s.type)&&s.synchronous?o[s.type].push(s):t.warn(I.invalidInspector(s.type,s.name))}),n.hasListeners=s=>r[s]&&r[s].length||o[s]&&o[s].length,n.onFlagUsed=(s,a,l)=>{const c=he.flagUsed;o[c].length&&o[c].forEach(u=>u.method(s,a,l)),r[c].length&&Kt(()=>{r[c].forEach(u=>u.method(s,a,l))})},n.onFlags=s=>{const a=he.flagDetailsChanged;o[a].length&&o[a].forEach(l=>l.method(s)),r[a].length&&Kt(()=>{r[a].forEach(l=>l.method(s))})},n.onFlagChanged=(s,a)=>{const l=he.flagDetailChanged;o[l].length&&o[l].forEach(c=>c.method(s,a)),r[l].length&&Kt(()=>{r[l].forEach(c=>c.method(s,a))})},n.onIdentityChanged=s=>{const a=he.clientIdentityChanged;o[a].length&&o[a].forEach(l=>l.method(s)),r[a].length&&Kt(()=>{r[a].forEach(l=>l.method(s))})},n}};const{LDTimeoutError:Bc}=X;var _c=function(e,t){return new Promise((n,r)=>{setTimeout(()=>{r(new Bc(`${t} timed out after ${e} seconds.`))},1e3*e)})};const{commonBasicLogger:Ko}=In,{checkContext:$c,getContextKeys:zc}=$t,{InspectorTypes:Ht,InspectorManager:Kc}=Uc,Gt="change",Ho="internal-change";var Go={initialize:function(e,t,n,r,o){const i=function(){return n&&n.logger?n.logger:o&&o.logger&&o.logger.default||Ko("warn")}(),s=vc(i),a=bc(s),l=Fn.validate(n,s,o,i),c=Kc(l.inspectors,i),u=l.sendEvents;let d=e,f=l.hash;const h=wc(r.localStorage,i),p=Io(r,d,l),y=l.sendEvents&&!l.diagnosticOptOut,v=y?$n.DiagnosticId(d):null,m=y?$n.DiagnosticsAccumulator(new Date().getTime()):null,b=y?$n.DiagnosticsManager(r,h,m,p,d,l,v):null,x=Ac(r,l,d,m),S=l.eventProcessor||yc(r,l,d,m,s,p),g=Vc(r,l,d);let k,D,M,C={},L=l.streaming,N=!1,R=!1,te=!0;const Z=l.stateProvider,W=Lc(null,function(w){(function(E){Z||E&&Q({kind:"identify",context:E,creationDate:new Date().getTime()})})(w),c.hasListeners(Ht.clientIdentityChanged)&&c.onIdentityChanged(W.getContext())}),ke=new Rc(h),K=h.isEnabled()?xc(h,d,f,W):null;function Q(w){d&&(Z&&Z.enqueueEvent&&Z.enqueueEvent(w)||(w.context?(te=!1,!u||R||r.isDoNotTrack()||(i.debug(I.debugEnqueueingEvent(w.kind)),S.enqueue(w))):te&&(i.warn(I.eventWithoutContext()),te=!1)))}function me(w,E){c.hasListeners(Ht.flagDetailChanged)&&c.onFlagChanged(w.key,_e(E))}function we(){c.hasListeners(Ht.flagDetailsChanged)&&c.onFlags(Object.entries(C).map(([w,E])=>({key:w,detail:_e(E)})).reduce((w,E)=>(w[E.key]=E.detail,w),{}))}function ge(w,E,T,B){const U=W.getContext(),ne=new Date,z={kind:"feature",key:w,context:U,value:E?E.value:null,variation:E?E.variationIndex:null,default:T,creationDate:ne.getTime()},ee=C[w];ee&&(z.version=ee.flagVersion?ee.flagVersion:ee.version,z.trackEvents=ee.trackEvents,z.debugEventsUntilDate=ee.debugEventsUntilDate),(B||ee&&ee.trackReason)&&E&&(z.reason=E.reason),Q(z)}function Tn(w){return $c(w,!1)?Promise.resolve(w):Promise.reject(new X.LDInvalidUserError(I.invalidContext()))}function dt(w,E,T,B,U,ne){var Il;let z,ee;return C&&F.objectHasOwnProperty(C,w)&&C[w]&&!C[w].deleted?(ee=C[w],z=_e(ee),ee.value!==null&&ee.value!==void 0||(z.value=E)):z={value:E,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},T&&(U||((Il=ee==null?void 0:ee.prerequisites)==null||Il.forEach(wo=>{dt(wo,void 0,T,!1,!1,!1)})),ge(w,z,E,B)),!U&&ne&&function(wo,Jg){c.hasListeners(Ht.flagUsed)&&c.onFlagUsed(wo,Jg,W.getContext())}(w,z),z}function _e(w){return{value:w.value,variationIndex:w.variation===void 0?null:w.variation,reason:w.reason||null}}function Sn(){if(D=!0,!W.getContext())return;const w=E=>{try{return JSON.parse(E)}catch{return void s.maybeReportError(new X.LDInvalidDataError(I.invalidData()))}};x.connect(W.getContext(),f,{ping:function(){i.debug(I.debugStreamPing());const E=W.getContext();g.fetchFlagSettings(E,f).then(T=>{F.deepEquals(E,W.getContext())&&$e(T||{})}).catch(T=>{s.maybeReportError(new X.LDFlagFetchError(I.errorFetchingFlags(T)))})},put:function(E){const T=w(E.data);T&&(i.debug(I.debugStreamPut()),$e(T))},patch:function(E){const T=w(E.data);if(!T)return;const B=C[T.key];if(!B||!B.version||!T.version||B.version<T.version){i.debug(I.debugStreamPatch(T.key));const U={},ne=F.extend({},T);delete ne.key,C[T.key]=ne;const z=_e(ne);U[T.key]=B?{previous:B.value,current:z}:{current:z},me(T,ne),It(U)}else i.debug(I.debugStreamPatchIgnored(T.key))},delete:function(E){const T=w(E.data);if(T)if(!C[T.key]||C[T.key].version<T.version){i.debug(I.debugStreamDelete(T.key));const B={};C[T.key]&&!C[T.key].deleted&&(B[T.key]={previous:C[T.key].value}),C[T.key]={version:T.version,deleted:!0},me(T,C[T.key]),It(B)}else i.debug(I.debugStreamDeleteIgnored(T.key))}})}function Ot(){D&&(x.disconnect(),D=!1)}function $e(w){const E={};if(!w)return Promise.resolve();for(const T in C)F.objectHasOwnProperty(C,T)&&C[T]&&(w[T]&&!F.deepEquals(w[T].value,C[T].value)?E[T]={previous:C[T].value,current:_e(w[T])}:w[T]&&!w[T].deleted||(E[T]={previous:C[T].value}));for(const T in w)F.objectHasOwnProperty(w,T)&&w[T]&&(!C[T]||C[T].deleted)&&(E[T]={current:_e(w[T])});return C={...w},we(),It(E).catch(()=>{})}function It(w){const E=Object.keys(w);if(E.length>0){const T={};E.forEach(B=>{const U=w[B].current,ne=U?U.value:void 0,z=w[B].previous;s.emit(Gt+":"+B,ne,z),T[B]=U?{current:ne,previous:z}:{previous:z}}),s.emit(Gt,T),s.emit(Ho,C),l.sendEventsOnlyForVariation||Z||E.forEach(B=>{ge(B,w[B].current)})}return k&&K?K.saveFlags(C):Promise.resolve()}function Rt(){const w=L||M&&L===void 0;w&&!D?Sn():!w&&D&&Ot(),b&&b.setStreaming(w)}function Ft(w){return w===Gt||w.substr(0,7)===Gt+":"}if(typeof l.bootstrap=="string"&&l.bootstrap.toUpperCase()==="LOCALSTORAGE"&&(K?k=!0:i.warn(I.localStorageUnavailable())),typeof l.bootstrap=="object"&&(C=function(w){const E=Object.keys(w),T="$flagsState",B="$valid",U=w[T];!U&&E.length&&i.warn(I.bootstrapOldFormat()),w[B]===!1&&i.warn(I.bootstrapInvalid());const ne={};return E.forEach(z=>{if(z!==T&&z!==B){let ee={value:w[z]};U&&U[z]?ee=F.extend(ee,U[z]):ee.version=0,ne[z]=ee}}),ne}(l.bootstrap)),Z){const w=Z.getInitialState();w?En(w):Z.on("init",En),Z.on("update",function(E){E.context&&W.setContext(E.context),E.flags&&$e(E.flags)})}else(function(){return e?ke.processContext(t).then(Tn).then(w=>(W.setContext(w),typeof l.bootstrap=="object"?V():k?K.loadFlags().then(E=>E==null?(C={},g.fetchFlagSettings(W.getContext(),f).then(T=>$e(T||{})).then(V).catch(T=>{qe(new X.LDFlagFetchError(I.errorFetchingFlags(T)))})):(C=E,F.onNextTick(V),g.fetchFlagSettings(W.getContext(),f).then(T=>$e(T)).catch(T=>s.maybeReportError(T)))):g.fetchFlagSettings(W.getContext(),f).then(E=>{C=E||{},we(),V()}).catch(E=>{C={},qe(E)}))):Promise.reject(new X.LDInvalidEnvironmentIdError(I.environmentNotSpecified()))})().catch(qe);function En(w){d=w.environment,W.setContext(w.context),C={...w.flags},F.onNextTick(V)}function V(){i.info(I.clientInitialized()),N=!0,Rt(),a.signalSuccess()}function qe(w){a.signalFailure(w)}return{client:{waitForInitialization:function(w=void 0){if(w!=null){if(typeof w=="number")return function(E){E>5&&i.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less.");const T=a.getInitializationPromise(),B=_c(E,"waitForInitialization");return Promise.race([B,T]).catch(U=>{throw U instanceof X.LDTimeoutError&&i.error(`waitForInitialization error: ${U}`),U})}(w);i.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return i.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),a.getInitializationPromise()},waitUntilReady:()=>a.getReadyPromise(),identify:function(w,E,T){if(R)return F.wrapPromiseCallback(Promise.resolve({}),T);if(Z)return i.warn(I.identifyDisabled()),F.wrapPromiseCallback(Promise.resolve(F.transformVersionedValuesToValues(C)),T);const B=k&&K?K.clearFlags():Promise.resolve();return F.wrapPromiseCallback(B.then(()=>ke.processContext(w)).then(Tn).then(U=>g.fetchFlagSettings(U,E).then(ne=>{const z=F.transformVersionedValuesToValues(ne);return W.setContext(U),f=E,ne?$e(ne).then(()=>z):z})).then(U=>(D&&Sn(),U)).catch(U=>(s.maybeReportError(U),Promise.reject(U))),T)},getContext:function(){return W.getContext()},variation:function(w,E){return dt(w,E,!0,!1,!1,!0).value},variationDetail:function(w,E){return dt(w,E,!0,!0,!1,!0)},track:function(w,E,T){if(typeof w!="string")return void s.maybeReportError(new X.LDInvalidEventKeyError(I.unknownCustomEventKey(w)));T!==void 0&&typeof T!="number"&&i.warn(I.invalidMetricValue(typeof T)),r.customEventFilter&&!r.customEventFilter(w)&&i.warn(I.unknownCustomEventKey(w));const B=W.getContext(),U={kind:"custom",key:w,context:B,url:r.getCurrentUrl(),creationDate:new Date().getTime()};B&&B.anonymous&&(U.contextKind=B.anonymous?"anonymousUser":"user"),E!=null&&(U.data=E),T!=null&&(U.metricValue=T),Q(U)},on:function(w,E,T){Ft(w)?(M=!0,N&&Rt(),s.on(w,E,T)):s.on(...arguments)},off:function(w){if(s.off(...arguments),Ft(w)){let E=!1;s.getEvents().forEach(T=>{Ft(T)&&s.getEventListenerCount(T)>0&&(E=!0)}),E||(M=!1,D&&L===void 0&&Ot())}},setStreaming:function(w){const E=w===null?void 0:w;E!==L&&(L=E,Rt())},flush:function(w){return F.wrapPromiseCallback(u?S.flush():Promise.resolve(),w)},allFlags:function(){const w={};if(!C)return w;for(const E in C)F.objectHasOwnProperty(C,E)&&!C[E].deleted&&(w[E]=dt(E,null,!l.sendEventsOnlyForVariation,!1,!0,!1).value);return w},close:function(w){if(R)return F.wrapPromiseCallback(Promise.resolve(),w);const E=()=>{R=!0,C={}},T=Promise.resolve().then(()=>{if(Ot(),b&&b.stop(),u)return S.stop(),S.flush()}).then(E).catch(E);return F.wrapPromiseCallback(T,w)}},options:l,emitter:s,ident:W,logger:i,requestor:g,start:function(){u&&(b&&b.start(),S.start())},enqueueEvent:Q,getFlagsInternal:function(){return C},getEnvironmentId:()=>d,internalChangeEventName:Ho}},commonBasicLogger:Ko,errors:X,messages:I,utils:F,getContextKeys:zc},Hc=Go.initialize,Gc=Go.errors;function Wc(e,t,n){return(t=function(r){var o=function(i,s){if(typeof i!="object"||!i)return i;var a=i[Symbol.toPrimitive];if(a!==void 0){var l=a.call(i,s||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}(r,"string");return typeof o=="symbol"?o:o+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wo(Object(n),!0).forEach(function(r){Wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Yo={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function qc(e,t,n,r,o){if(o&&!function(){var c=window.navigator&&window.navigator.userAgent;if(c){var u=c.match(/Chrom(e|ium)\/([0-9]+)\./);if(u)return parseInt(u[2],10)<73}return!0}())return Yo;var i=new window.XMLHttpRequest;for(var s in i.open(e,t,!o),n||{})Object.prototype.hasOwnProperty.call(n,s)&&i.setRequestHeader(s,n[s]);if(o){try{i.send(r)}catch{}return Yo}var a,l=new Promise(function(c,u){i.addEventListener("load",function(){a||c({status:i.status,header:function(d){return i.getResponseHeader(d)},body:i.responseText})}),i.addEventListener("error",function(){a||u(new Error)}),i.send(r)});return{promise:l,cancel:function(){a=!0,i.abort()}}}var zn=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function Yc(e,t,n,r){var o,i,s=((e.kind==="substring"||e.kind==="regex")&&r.includes("/")?t:t.replace(r,"")).replace(n,"");switch(e.kind){case"exact":i=t,o=new RegExp("^"+zn(e.url)+"/?$");break;case"canonical":i=s,o=new RegExp("^"+zn(e.url)+"/?$");break;case"substring":i=s,o=new RegExp(".*"+zn(e.substring)+".*$");break;case"regex":i=s,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function Xo(e,t){for(var n={},r=null,o=[],i=0;i<e.length;i++)for(var s=e[i],a=s.urls||[],l=0;l<a.length;l++)if(Yc(a[l],window.location.href,window.location.search,window.location.hash)){s.kind==="pageview"?t("pageview",s):(o.push(s),t("click_pageview",s));break}return o.length>0&&(r=function(c){for(var u=function(f,h){for(var p=[],y=0;y<h.length;y++)for(var v=f.target,m=h[y],b=m.selector,x=document.querySelectorAll(b);v&&x.length>0;){for(var S=0;S<x.length;S++)v===x[S]&&p.push(m);v=v.parentNode}return p}(c,o),d=0;d<u.length;d++)t("click",u[d])},document.addEventListener("click",r)),n.dispose=function(){document.removeEventListener("click",r)},n}function Xc(e,t){var n,r;function o(){r&&r.dispose(),n&&n.length&&(r=Xo(n,i))}function i(s,a){var l=e.ident.getContext(),c={kind:s,key:a.key,data:null,url:window.location.href,creationDate:new Date().getTime(),context:l};return s==="click"&&(c.selector=a.selector),e.enqueueEvent(c)}return e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then(function(s){s&&s.length>0&&(r=Xo(n=s,i),function(a,l){var c,u=window.location.href;function d(){(c=window.location.href)!==u&&(u=c,l())}(function f(h,p){h(),setTimeout(function(){f(h,p)},p)})(d,a),window.history&&window.history.pushState?window.addEventListener("popstate",d):window.addEventListener("hashchange",d)}(300,o)),t()}).catch(function(s){e.emitter.maybeReportError(new Gc.LDUnexpectedResponseError((s&&s.message,s.message))),t()}),{}}var Wt="goalsReady",Zc={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function Jc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=function(u){var d,f={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var h=u&&u.disableSyncEventPost;f.httpRequest=function(m,b,x,S){var g=f.synchronousFlush&!h;return f.synchronousFlush=!1,qc(m,b,x,S,g)}}f.httpAllowsPost=function(){return d===void 0&&(d=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),d},f.httpFallbackPing=function(m){new window.Image().src=m};var p,y=u&&u.eventUrlTransformer;f.getCurrentUrl=function(){return y?y(window.location.href):window.location.href},f.isDoNotTrack=function(){var m;return(m=window.navigator&&window.navigator.doNotTrack!==void 0?window.navigator.doNotTrack:window.navigator&&window.navigator.msDoNotTrack!==void 0?window.navigator.msDoNotTrack:window.doNotTrack)===1||m===!0||m==="1"||m==="yes"};try{window.localStorage&&(f.localStorage={get:function(m){return new Promise(function(b){b(window.localStorage.getItem(m))})},set:function(m,b){return new Promise(function(x){window.localStorage.setItem(m,b),x()})},clear:function(m){return new Promise(function(b){window.localStorage.removeItem(m),b()})}})}catch{f.localStorage=null}if(u&&u.useReport&&typeof window.EventSourcePolyfill=="function"&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(f.eventSourceAllowsReport=!0,p=window.EventSourcePolyfill):(f.eventSourceAllowsReport=!1,p=window.EventSource),window.EventSource){var v=3e5;f.eventSourceFactory=function(m,b){var x=qo(qo({},{heartbeatTimeout:v,silentTimeout:v,skipDefaultHeaders:!0}),b);return new p(m,x)},f.eventSourceIsActive=function(m){return m.readyState===window.EventSource.OPEN||m.readyState===window.EventSource.CONNECTING}}return f.userAgent="JSClient",f.version="3.5.0",f.diagnosticSdkData={name:"js-client-sdk",version:"3.5.0"},f.diagnosticPlatformData={name:"JS"},f.diagnosticUseCombinedEvent=!0,f}(n),o=Hc(e,t,n,r,Zc),i=o.client,s=o.options,a=o.emitter,l=new Promise(function(u){var d=a.on(Wt,function(){a.off(Wt,d),u()})});i.waitUntilGoalsReady=function(){return l},s.fetchGoals?Xc(o,function(){return a.emit(Wt)}):a.emit(Wt),document.readyState!=="complete"?window.addEventListener("load",o.start):o.start();var c=function(){r.synchronousFlush=!0,i.flush().catch(function(){}),r.synchronousFlush=!1};return document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&c()}),window.addEventListener("pagehide",c),i}var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eu=1/0,tu="[object Symbol]",nu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ru=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt="\\ud800-\\udfff",Zo="\\u0300-\\u036f\\ufe20-\\ufe23",Jo="\\u20d0-\\u20f0",Qo="\\u2700-\\u27bf",es="a-z\\xdf-\\xf6\\xf8-\\xff",ou="\\xac\\xb1\\xd7\\xf7",su="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",iu="\\u2000-\\u206f",au=" \\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",ts="A-Z\\xc0-\\xd6\\xd8-\\xde",ns="\\ufe0e\\ufe0f",rs=ou+su+iu+au,Kn="['’]",lu="["+Yt+"]",os="["+rs+"]",Xt="["+Zo+Jo+"]",ss="\\d+",cu="["+Qo+"]",is="["+es+"]",as="[^"+Yt+rs+ss+Qo+es+ts+"]",Hn="\\ud83c[\\udffb-\\udfff]",uu="(?:"+Xt+"|"+Hn+")",ls="[^"+Yt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",Wn="[\\ud800-\\udbff][\\udc00-\\udfff]",Ze="["+ts+"]",cs="\\u200d",us="(?:"+is+"|"+as+")",du="(?:"+Ze+"|"+as+")",ds="(?:"+Kn+"(?:d|ll|m|re|s|t|ve))?",fs="(?:"+Kn+"(?:D|LL|M|RE|S|T|VE))?",hs=uu+"?",ps="["+ns+"]?",fu="(?:"+cs+"(?:"+[ls,Gn,Wn].join("|")+")"+ps+hs+")*",ms=ps+hs+fu,hu="(?:"+[cu,Gn,Wn].join("|")+")"+ms,pu="(?:"+[ls+Xt+"?",Xt,Gn,Wn,lu].join("|")+")",mu=RegExp(Kn,"g"),gu=RegExp(Xt,"g"),yu=RegExp(Hn+"(?="+Hn+")|"+pu+ms,"g"),vu=RegExp([Ze+"?"+is+"+"+ds+"(?="+[os,Ze,"$"].join("|")+")",du+"+"+fs+"(?="+[os,Ze+us,"$"].join("|")+")",Ze+"?"+us+"+"+ds,Ze+"+"+fs,ss,hu].join("|"),"g"),bu=RegExp("["+cs+Yt+Zo+Jo+ns+"]"),xu=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wu={À:"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",ſ:"ss"},Tu=typeof qt=="object"&&qt&&qt.Object===Object&&qt,Su=typeof self=="object"&&self&&self.Object===Object&&self,Eu=Tu||Su||Function("return this")();function Pu(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function Cu(e){return e.split("")}function Au(e){return e.match(nu)||[]}function ku(e){return function(t){return e==null?void 0:e[t]}}var Du=ku(wu);function gs(e){return bu.test(e)}function Mu(e){return xu.test(e)}function Vu(e){return gs(e)?Lu(e):Cu(e)}function Lu(e){return e.match(yu)||[]}function Ou(e){return e.match(vu)||[]}var Iu=Object.prototype,Ru=Iu.toString,ys=Eu.Symbol,vs=ys?ys.prototype:void 0,bs=vs?vs.toString:void 0;function Fu(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function ju(e){if(typeof e=="string")return e;if($u(e))return bs?bs.call(e):"";var t=e+"";return t=="0"&&1/e==-eu?"-0":t}function Nu(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Fu(e,t,n)}function Uu(e){return function(t){t=Zt(t);var n=gs(t)?Vu(t):void 0,r=n?n[0]:t.charAt(0),o=n?Nu(n,1).join(""):t.slice(1);return r[e]()+o}}function Bu(e){return function(t){return Pu(Wu(Hu(t).replace(mu,"")),e,"")}}function _u(e){return!!e&&typeof e=="object"}function $u(e){return typeof e=="symbol"||_u(e)&&Ru.call(e)==tu}function Zt(e){return e==null?"":ju(e)}var zu=Bu(function(e,t,n){return t=t.toLowerCase(),e+(n?Ku(t):t)});function Ku(e){return Gu(Zt(e).toLowerCase())}function Hu(e){return e=Zt(e),e&&e.replace(ru,Du).replace(gu,"")}var Gu=Uu("toUpperCase");function Wu(e,t,n){return e=Zt(e),t=t,t===void 0?Mu(e)?Ou(e):Au(e):e.match(t)||[]}var qu=zu;const xs=Qc(qu);var qn={exports:{}},_={};/** @license React v16.13.1
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* react-is.development.js
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/var Ts;function Xu(){return Ts||(Ts=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(V){return typeof V=="string"||typeof V=="function"||V===r||V===c||V===i||V===o||V===d||V===f||typeof V=="object"&&V!==null&&(V.$$typeof===p||V.$$typeof===h||V.$$typeof===s||V.$$typeof===a||V.$$typeof===u||V.$$typeof===v||V.$$typeof===m||V.$$typeof===b||V.$$typeof===y)}function S(V){if(typeof V=="object"&&V!==null){var qe=V.$$typeof;switch(qe){case t:var jt=V.type;switch(jt){case l:case c:case r:case i:case o:case d:return jt;default:var w=jt&&jt.$$typeof;switch(w){case a:case u:case p:case h:case s:return w;default:return qe}}case n:return qe}}}var g=l,k=c,D=a,M=s,C=t,L=u,N=r,R=p,te=h,Z=n,W=i,ke=o,K=d,Q=!1;function me(V){return Q||(Q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),we(V)||S(V)===l}function we(V){return S(V)===c}function ge(V){return S(V)===a}function Tn(V){return S(V)===s}function dt(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function _e(V){return S(V)===u}function Sn(V){return S(V)===r}function Ot(V){return S(V)===p}function $e(V){return S(V)===h}function It(V){return S(V)===n}function Rt(V){return S(V)===i}function Ft(V){return S(V)===o}function En(V){return S(V)===d}$.AsyncMode=g,$.ConcurrentMode=k,$.ContextConsumer=D,$.ContextProvider=M,$.Element=C,$.ForwardRef=L,$.Fragment=N,$.Lazy=R,$.Memo=te,$.Portal=Z,$.Profiler=W,$.StrictMode=ke,$.Suspense=K,$.isAsyncMode=me,$.isConcurrentMode=we,$.isContextConsumer=ge,$.isContextProvider=Tn,$.isElement=dt,$.isForwardRef=_e,$.isFragment=Sn,$.isLazy=Ot,$.isMemo=$e,$.isPortal=It,$.isProfiler=Rt,$.isStrictMode=Ft,$.isSuspense=En,$.isValidElementType=x,$.typeOf=S}()),$}process.env.NODE_ENV==="production"?qn.exports=Yu():qn.exports=Xu();var Zu=qn.exports,Ss=Zu,Ju={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Es={};Es[Ss.ForwardRef]=Ju,Es[Ss.Memo]=Qu;const ed=()=>P.createContext({flags:{},flagKeyMap:{},ldClient:void 0}),Ps={useCamelCaseFlagKeys:!0,sendEventsOnFlagRead:!0,reactContext:ed()},Jt=e=>{var t;return(t=e.context)!=null?t:e.user},Yn=e=>{const t={};for(const n in e)n.indexOf("$")!==0&&(t[xs(n)]=e[n]);return t},td=(e,t)=>{const n={};for(const r in e)t&&t[r]===void 0||(n[r]=e[r].current);return n},Xn=(e,t)=>{const n=e.allFlags();return t?Object.keys(t).reduce((r,o)=>(r[o]=Object.prototype.hasOwnProperty.call(n,o)?n[o]:t[o],r),{}):n};function Zn(e,t,n=Ps,r){const o=function(l,c){return c===void 0?l:Object.keys(c).reduce((u,d)=>(Jn(l,d)&&(u[d]=l[d]),u),{})}(t,r),{useCamelCaseFlagKeys:i=!0}=n,[s,a={}]=i?function(l){const c={},u={};for(const d in l){if(d.indexOf("$")===0)continue;const f=xs(d);c[f]=l[d],u[f]=d}return[c,u]}(o):[o];return{flags:n.sendEventsOnFlagRead?nd(e,s,a,i):s,flagKeyMap:a}}function Jn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nd(e,t,n,r){return new Proxy(t,{get(o,i,s){const a=Reflect.get(o,i,s),l=r&&Jn(n,i)||Jn(o,i);if(typeof i=="symbol"||!l)return a;if(a===void 0)return;const c=r?n[i]:i;return e.variation(c,a)}})}Yn.camelCaseKeys=Yn;const rd={wrapperName:"react-client-sdk",wrapperVersion:"3.6.1",sendEventsOnlyForVariation:!0};var od=Object.defineProperty,sd=Object.defineProperties,id=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,ad=Object.prototype.hasOwnProperty,ld=Object.prototype.propertyIsEnumerable,As=(e,t,n)=>t in e?od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ye=(e,t)=>{for(var n in t||(t={}))ad.call(t,n)&&As(e,n,t[n]);if(Cs)for(var n of Cs(t))ld.call(t,n)&&As(e,n,t[n]);return e},ht=(e,t)=>sd(e,id(t)),Qn=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(c){o(c)}},s=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});class cd extends P.Component{constructor(t){super(t),this.getReactOptions=()=>ye(ye({},Ps),this.props.reactOptions),this.subscribeToChanges=r=>{const{flags:o}=this.props;r.on("change",i=>{const s=this.getReactOptions(),a=td(i,o),l=ye(ye({},this.state.unproxiedFlags),a);Object.keys(a).length>0&&this.setState(c=>ye(ht(ye({},c),{unproxiedFlags:l}),Zn(r,l,s,o)))})},this.onFailed=(r,o)=>{this.setState(i=>ht(ye({},i),{error:o}))},this.onReady=(r,o,i)=>{const s=Xn(r,i);this.setState(a=>ye(ht(ye({},a),{unproxiedFlags:s}),Zn(r,s,o,i)))},this.prepareLDClient=()=>Qn(this,null,function*(){var r;const{clientSideID:o,flags:i,options:s}=this.props;let a=yield this.props.ldClient;const l=this.getReactOptions();let c,u=this.state.unproxiedFlags;if(a)u=Xn(a,i);else{const d=(r=Jt(this.props))!=null?r:{anonymous:!0,kind:"user"};a=Jc(o,d,ye(ye({},rd),s));try{yield a.waitForInitialization(this.props.timeout),u=Xn(a,i)}catch(f){c=f,c!=null&&c.name.toLowerCase().includes("timeout")&&(a.on("failed",this.onFailed),a.on("ready",()=>{this.onReady(a,l,i)}))}}this.setState(d=>ht(ye(ht(ye({},d),{unproxiedFlags:u}),Zn(a,u,l,i)),{ldClient:a,error:c})),this.subscribeToChanges(a)});const{options:n}=t;if(this.state={flags:{},unproxiedFlags:{},flagKeyMap:{}},n){const{bootstrap:r}=n;if(r&&r!=="localStorage"){const{useCamelCaseFlagKeys:o}=this.getReactOptions();this.state={flags:o?Yn(r):r,unproxiedFlags:r,flagKeyMap:{}}}}}componentDidMount(){return Qn(this,null,function*(){const{deferInitialization:t}=this.props;t&&!Jt(this.props)||(yield this.prepareLDClient())})}componentDidUpdate(t){return Qn(this,null,function*(){const{deferInitialization:n}=this.props,r=!Jt(t)&&Jt(this.props);n&&r&&(yield this.prepareLDClient())})}render(){const{flags:t,flagKeyMap:n,ldClient:r,error:o}=this.state,{reactContext:i}=this.getReactOptions();return P.createElement(i.Provider,{value:{flags:t,flagKeyMap:n,ldClient:r,error:o}},this.props.children)}}const ks="api:unauthorized",Ds="api:authorized";class ud{constructor(){Rl(this,"handlers",new Map)}subscribe(t,n){const r=this.handlers.get(t)||new Set;return r.add(n),this.handlers.set(t,r),()=>{const o=this.handlers.get(t);o&&(o.delete(n),o.size===0&&this.handlers.delete(t))}}emit(t,n){const r=this.handlers.get(t);r&&r.forEach(o=>o(n))}clearAll(){this.handlers.clear()}}const er=new ud,dd={staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!0},fd="http://localhost:3001/api";let tr,nr=!1,Qt=null,rr=!1;const hd=e=>{tr=e},Ms=async(e,t={})=>{const n=await fetch(`${fd}${e}`,{...t,credentials:"include",headers:{"Content-Type":"application/json",...tr&&{Authorization:`Bearer ${tr}`},...t.headers}});if(n.status===401)throw nr||(nr=!0,er.emit(ks,void 0),Qt&&window.clearTimeout(Qt),Qt=window.setTimeout(()=>{nr=!1,rr=!1,Qt=null},5e3)),new Error("Unauthorized");if(!n.ok)throw new Error(`API Error: ${n.statusText}`);return rr||(er.emit(Ds,void 0),rr=!0),n.json()},pd=()=>new Se.QueryClient({defaultOptions:{queries:{retry:(e,t)=>t instanceof Error&&t.message==="Unauthorized"?!1:e<3,...dd}}}),Vs=(e,t,n,r)=>{const o=P.createContext({state:n});return{Context:o,Provider:({children:s})=>{const[a,l]=P.useReducer(e,n),c=P.useMemo(()=>Object.keys(t).reduce((d,f)=>({...d,[f]:t[f](l)}),{}),[l]);P.useEffect(()=>{const d=[];return r!=null&&r.length&&r.forEach(({eventName:f,handler:h})=>{const p=h(l),y=er.subscribe(f,p);d.push(y)}),()=>d.forEach(f=>f())},[l]);const u=P.useMemo(()=>({state:a,...c}),[a,c]);return A.jsx(o.Provider,{value:u,children:s})}}},md=(e,t)=>{switch(t.type){case"SET_AUTHENTICATED":return{...e,isAuthenticated:t.payload,error:null,reauthing:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_ERROR":return{...e,error:t.payload,isAuthenticated:!1,reauthing:!1};case"SET_REAUTHING":return e.reauthing&&t.payload?e:{...e,reauthing:t.payload};default:return e}},gd=e=>async t=>{if(!t){console.error("No reauth callback provided for onReauthRequested"),e({type:"SET_ERROR",payload:"No reauth callback provided"});return}e({type:"SET_REAUTHING",payload:!0});try{t()}catch(n){console.error("Error during reauth:",n),e({type:"SET_ERROR",payload:n instanceof Error?n.message:"Reauthorization failed"})}},yd=[{eventName:ks,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!1}),e({type:"SET_REAUTHING",payload:!0})}},{eventName:Ds,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!0})}}],{Context:ny,Provider:vd}=Vs(md,{handleReauth:gd},{isAuthenticated:!1,loading:!1,error:null,reauthing:!1},yd),bd={primary:"hsl(222.2 47.4% 11.2%)",background:"hsl(0 0% 100%)",foreground:"hsl(222.2 47.4% 11.2%)","primary-foreground":"hsl(210 40% 98%)",secondary:"hsl(210 40% 96.1%)","secondary-foreground":"hsl(222.2 47.4% 11.2%)",muted:"hsl(210 40% 96.1%)","muted-foreground":"hsl(215.4 16.3% 46.9%)",accent:"hsl(210 40% 96.1%)","accent-foreground":"hsl(222.2 47.4% 11.2%)",border:"hsl(214.3 31.8% 91.4%)",input:"hsl(214.3 31.8% 91.4%)",ring:"hsl(222.2 84% 4.9%)",destructive:"hsl(0 84.2% 60.2%)","destructive-foreground":"hsl(210 40% 98%)",card:"hsl(0 0% 100%)","card-foreground":"hsl(222.2 47.4% 11.2%)",popover:"hsl(0 0% 100%)","popover-foreground":"hsl(222.2 47.4% 11.2%)"},xd=e=>{const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=window.getComputedStyle(t).color;return document.body.removeChild(t),n},wd=e=>{const t=document.createElement("div"),n=t.style.color;return t.style.color=e,t.style.color!==n},Td=e=>{const t=document.getElementById("reach-theme-styles");t&&t.remove();const n=document.createElement("style");n.id="reach-theme-styles";const r=`
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
width: 100%;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
.line:nth-child(1) {
|
|
41
|
-
animation-delay: calc(var(--uib-speed) * -0.375);
|
|
42
|
-
}
|
|
43
|
-
.line:nth-child(2) {
|
|
44
|
-
animation-delay: calc(var(--uib-speed) * -0.375);
|
|
45
|
-
opacity: 0.8;
|
|
46
|
-
}
|
|
47
|
-
.line:nth-child(3) {
|
|
48
|
-
animation-delay: calc(var(--uib-speed) * -0.3);
|
|
49
|
-
opacity: 0.6;
|
|
50
|
-
}
|
|
51
|
-
.line:nth-child(4) {
|
|
52
|
-
animation-delay: calc(var(--uib-speed) * -0.225);
|
|
53
|
-
opacity: 0.4;
|
|
54
|
-
}
|
|
55
|
-
.line:nth-child(5) {
|
|
56
|
-
animation-delay: calc(var(--uib-speed) * -0.15);
|
|
57
|
-
opacity: 0.2;
|
|
58
|
-
}
|
|
59
|
-
.line:nth-child(6) {
|
|
60
|
-
animation-delay: calc(var(--uib-speed) * -0.075);
|
|
61
|
-
opacity: 0.1;
|
|
62
|
-
}
|
|
63
|
-
@keyframes rotate {
|
|
64
|
-
0% {
|
|
65
|
-
transform: rotate(0deg);
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReachComponents={},e.jsxRuntime,e.React,e.ReactDOM)}(this,(function(e,t,n,r){"use strict";function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const i=o(n),s=o(r);var a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},l="undefined"==typeof window||"Deno"in globalThis;function c(){}function u(e){return"number"==typeof e&&e>=0&&e!==1/0}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function h(e,t){return"function"==typeof e?e(t):e}function f(e,t){return"function"==typeof e?e(t):e}function p(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==g(s,t.options))return!1}else if(!v(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function m(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(i))return!1}else if(!v(t.options.mutationKey,i))return!1}return(!r||t.state.status===r)&&!(o&&!o(t))}function g(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,((e,t)=>S(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function v(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!v(e[n],t[n]))))}function b(e,t){if(e===t)return e;const n=w(e)&&w(t);if(n||S(e)&&S(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const o=n?c:i[c];(!n&&r.includes(o)||n)&&void 0===e[o]&&void 0===t[o]?(a[o]=void 0,l++):(a[o]=b(e[o],t[o]),a[o]===e[o]&&void 0!==e[o]&&l++)}return o===s&&l===o?e:a}return t}function x(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function S(e){if(!k(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!k(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return b(e,t)}catch(r){}return b(e,t)}return t}function E(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function P(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var D=Symbol();function j(e,t){return process,!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==D?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}var T=new class extends a{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!l&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},M=new class extends a{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!l&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#r}};function O(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch((()=>{})),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function A(e){return Math.min(1e3*2**e,3e4)}function N(e){return"online"!==(e??"online")||M.isOnline()}var _=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function R(e){return e instanceof _}function L(e){let t,n=!1,r=0,o=!1;const i=O(),s=()=>T.isFocused()&&("always"===e.networkMode||M.isOnline())&&e.canRun(),a=()=>N(e.networkMode)&&e.canRun(),c=n=>{o||(o=!0,e.onSuccess?.(n),t?.(),i.resolve(n))},u=n=>{o||(o=!0,e.onError?.(n),t?.(),i.reject(n))},d=()=>new Promise((n=>{t=e=>{(o||s())&&n(e)},e.onPause?.()})).then((()=>{t=void 0,o||e.onContinue?.()})),h=()=>{if(o)return;let t;const i=0===r?e.initialPromise:void 0;try{t=i??e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(c).catch((t=>{if(o)return;const i=e.retry??(l?0:3),a=e.retryDelay??A,c="function"==typeof a?a(r,t):a,f=!0===i||"number"==typeof i&&r<i||"function"==typeof i&&i(r,t);var p;!n&&f?(r++,e.onFail?.(r,t),(p=c,new Promise((e=>{setTimeout(e,p)}))).then((()=>s()?void 0:d())).then((()=>{n?u(t):h()}))):u(t)}))};return{promise:i,cancel:t=>{o||(u(new _(t)),e.abort?.())},continue:()=>(t?.(),i),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():d().then(h),i)}}var $=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=e=>setTimeout(e,0);const i=r=>{t?e.push(r):o((()=>{n(r)}))};return{batch:i=>{let s;t++;try{s=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return s},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),F=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u(this.gcTime)&&(this.#o=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(l?1/0:3e5))}clearGcTimeout(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}},I=class extends F{#i;#s;#a;#l;#c;#u;constructor(e){super(),this.#u=!1,this.#c=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(e){this.options={...this.#c,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){const n=C(this.state.data,e,this.options);return this.#d({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#d({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#l?.promise;return this.#l?.cancel(e),t?t.then(c).catch(c):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some((e=>!1!==f(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===D||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!d(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){const e=this.observers.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#l&&(this.#u?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&Array.isArray(this.options.queryKey);const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#u=!0,n.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=j(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return r(n),this.#u=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};r(o),this.options.behavior?.onFetch(o,this),this.#s=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#d({type:"fetch",meta:o.fetchOptions?.meta});const i=e=>{R(e)&&e.silent||this.#d({type:"error",error:e}),R(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#l=L({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e)return process,void i(new Error(`${this.queryHash} data is undefined`));try{this.setData(e)}catch(t){return void i(t)}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:i,onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#l.start()}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...q(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return R(n)&&n.revert&&this.#s?{...this.#s,fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),$.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#a.notify({query:this,type:"updated",action:e})}))}};function q(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}var z=class extends a{constructor(e={}){super(),this.config=e,this.#h=new Map}#h;build(e,t,n){const r=t.queryKey,o=t.queryHash??g(r,t);let i=this.get(o);return i||(i=new I({cache:this,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#h.has(e.queryHash)||(this.#h.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#h.get(e.queryHash);t&&(e.destroy(),t===e&&this.#h.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){$.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#h.get(e)}getAll(){return[...this.#h.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>p(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>p(e,t))):t}notify(e){$.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){$.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){$.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},V=class extends F{#f;#p;#l;constructor(e){super(),this.mutationId=e.mutationId,this.#p=e.mutationCache,this.#f=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#f.includes(e)||(this.#f.push(e),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#f=this.#f.filter((t=>t!==e)),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(e){this.#l=L({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});const t="pending"===this.state.status,n=!this.#l.canStart();try{if(!t){this.#d({type:"pending",variables:e,isPaused:n}),await(this.#p.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:n})}const r=await this.#l.start();return await(this.#p.config.onSuccess?.(r,e,this.state.context,this)),await(this.options.onSuccess?.(r,e,this.state.context)),await(this.#p.config.onSettled?.(r,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(r,null,e,this.state.context)),this.#d({type:"success",data:r}),r}catch(r){try{throw await(this.#p.config.onError?.(r,e,this.state.context,this)),await(this.options.onError?.(r,e,this.state.context)),await(this.#p.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,r,e,this.state.context)),r}finally{this.#d({type:"error",error:r})}}finally{this.#p.runNext(this)}}#d(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),$.batch((()=>{this.#f.forEach((t=>{t.onMutationUpdate(e)})),this.#p.notify({mutation:this,type:"updated",action:e})}))}};var B=class extends a{constructor(e={}){super(),this.config=e,this.#m=new Map,this.#g=Date.now()}#m;#g;build(e,t,n){const r=new V({mutationCache:this,mutationId:++this.#g,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=U(e),n=this.#m.get(t)??[];n.push(e),this.#m.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=U(e);if(this.#m.has(t)){const n=this.#m.get(t)?.filter((t=>t!==e));n&&(0===n.length?this.#m.delete(t):this.#m.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#m.get(U(e))?.find((e=>"pending"===e.state.status));return!t||t===e}runNext(e){const t=this.#m.get(U(e))?.find((t=>t!==e&&t.state.isPaused));return t?.continue()??Promise.resolve()}clear(){$.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#m.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>m(t,e)))}findAll(e={}){return this.getAll().filter((t=>m(e,t)))}notify(e){$.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return $.batch((()=>Promise.all(e.map((e=>e.continue().catch(c))))))}};function U(e){return e.options.scope?.id??String(e.mutationId)}function K(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let n=!1;const c=j(t.options,t.fetchOptions),u=async(e,r,o)=>{if(n)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const i={queryKey:t.queryKey,pageParam:r,direction:o?"backward":"forward",meta:t.options.meta};Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",(()=>{n=!0})),t.signal)});const s=await c(i),{maxPages:a}=t.options,l=o?P:E;return{pages:l(e.pages,s,a),pageParams:l(e.pageParams,r,a)}};if(o&&i.length){const e="backward"===o,t={pages:i,pageParams:s},n=(e?W:H)(r,t);a=await u(t,n,e)}else{const t=e??i.length;do{const e=0===l?s[0]??r.initialPageParam:H(r,a);if(l>0&&null==e)break;a=await u(a,e),l++}while(l<t)}return a};t.fetchFn=t.options.persister?()=>t.options.persister?.(c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):c}}}function H(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function W(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var G=class{#y;#p;#c;#v;#b;#x;#w;#S;constructor(e={}){this.#y=e.queryCache||new z,this.#p=e.mutationCache||new B,this.#c=e.defaultOptions||{},this.#v=new Map,this.#b=new Map,this.#x=0}mount(){this.#x++,1===this.#x&&(this.#w=T.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#y.onFocus())})),this.#S=M.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#y.onOnline())})))}unmount(){this.#x--,0===this.#x&&(this.#w?.(),this.#w=void 0,this.#S?.(),this.#S=void 0)}isFetching(e){return this.#y.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#p.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#y.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#y.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(h(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#y.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#y.get(r.queryHash),i=o?.state.data,s=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==s)return this.#y.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return $.batch((()=>this.#y.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#y.get(t.queryHash)?.state}removeQueries(e){const t=this.#y;$.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=this.#y,r={type:"active",...e};return $.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e,t={}){const n={revert:!0,...t},r=$.batch((()=>this.#y.findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(c).catch(c)}invalidateQueries(e,t={}){return $.batch((()=>{if(this.#y.findAll(e).forEach((e=>{e.invalidate()})),"none"===e?.refetchType)return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=$.batch((()=>this.#y.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(c)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(r).then(c)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#y.build(this,t);return n.isStaleByTime(h(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(c).catch(c)}fetchInfiniteQuery(e){return e.behavior=K(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(c).catch(c)}ensureInfiniteQueryData(e){return e.behavior=K(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return M.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#y}getMutationCache(){return this.#p}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#v.set(y(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#v.values()],n={};return t.forEach((t=>{v(e,t.queryKey)&&Object.assign(n,t.defaultOptions)})),n}setMutationDefaults(e,t){this.#b.set(y(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#b.values()];let n={};return t.forEach((t=>{v(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=g(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===D&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#y.clear(),this.#p.clear()}},Y=class extends a{constructor(e,t){super(),this.options=t,this.#k=e,this.#C=null,this.#E=O(),this.options.experimental_prefetchInRender||this.#E.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#k;#P=void 0;#D=void 0;#j=void 0;#T;#M;#E;#C;#O;#A;#N;#_;#R;#L;#$=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#P.addObserver(this),Q(this.#P,this.options)?this.#F():this.updateResult(),this.#I())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return X(this.#P,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return X(this.#P,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#q(),this.#z(),this.#P.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#P;if(this.options=this.#k.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof f(this.options.enabled,this.#P))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#V(),this.#P.setOptions(this.options),n._defaulted&&!x(this.options,n)&&this.#k.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#P,observer:this});const o=this.hasListeners();o&&J(this.#P,r,this.options,n)&&this.#F(),this.updateResult(t),!o||this.#P===r&&f(this.options.enabled,this.#P)===f(n.enabled,this.#P)&&h(this.options.staleTime,this.#P)===h(n.staleTime,this.#P)||this.#B();const i=this.#U();!o||this.#P===r&&f(this.options.enabled,this.#P)===f(n.enabled,this.#P)&&i===this.#L||this.#K(i)}getOptimisticResult(e){const t=this.#k.getQueryCache().build(this.#k,e),n=this.createResult(t,e);return function(e,t){if(!x(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#j=n,this.#M=this.options,this.#T=this.#P.state),n}getCurrentResult(){return this.#j}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})})),n}trackProp(e){this.#$.add(e)}getCurrentQuery(){return this.#P}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#k.defaultQueryOptions(e),n=this.#k.getQueryCache().build(this.#k,t);return n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return this.#F({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#j)))}#F(e){this.#V();let t=this.#P.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#B(){this.#q();const e=h(this.options.staleTime,this.#P);if(l||this.#j.isStale||!u(e))return;const t=d(this.#j.dataUpdatedAt,e);this.#_=setTimeout((()=>{this.#j.isStale||this.updateResult()}),t+1)}#U(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#P):this.options.refetchInterval)??!1}#K(e){this.#z(),this.#L=e,!l&&!1!==f(this.options.enabled,this.#P)&&u(this.#L)&&0!==this.#L&&(this.#R=setInterval((()=>{(this.options.refetchIntervalInBackground||T.isFocused())&&this.#F()}),this.#L))}#I(){this.#B(),this.#K(this.#U())}#q(){this.#_&&(clearTimeout(this.#_),this.#_=void 0)}#z(){this.#R&&(clearInterval(this.#R),this.#R=void 0)}createResult(e,t){const n=this.#P,r=this.options,o=this.#j,i=this.#T,s=this.#M,a=e!==n?e.state:this.#D,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&Q(e,t),s=o&&J(e,n,t,r);(i||s)&&(u={...u,...q(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:f,status:p}=u;if(t.select&&void 0!==u.data)if(o&&u.data===i?.data&&t.select===this.#O)c=this.#A;else try{this.#O=t.select,c=t.select(u.data),c=C(o?.data,c,t),this.#A=c,this.#C=null}catch(w){this.#C=w}else c=u.data;if(void 0!==t.placeholderData&&void 0===c&&"pending"===p){let e;if(o?.isPlaceholderData&&t.placeholderData===s?.placeholderData)e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#N?.state.data,this.#N):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#C=null}catch(w){this.#C=w}void 0!==e&&(p="success",c=C(o?.data,e,t),d=!0)}this.#C&&(h=this.#C,c=this.#A,f=Date.now(),p="error");const m="fetching"===u.fetchStatus,g="pending"===p,y="error"===p,v=g&&m,b=void 0!==c,x={status:p,fetchStatus:u.fetchStatus,isPending:g,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:c,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:f,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>a.dataUpdateCount||u.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:y&&!b,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:y&&b,isStale:Z(e,t),refetch:this.refetch,promise:this.#E};if(this.options.experimental_prefetchInRender){const t=e=>{"error"===x.status?e.reject(x.error):void 0!==x.data&&e.resolve(x.data)},r=()=>{const e=this.#E=x.promise=O();t(e)},o=this.#E;switch(o.status){case"pending":e.queryHash===n.queryHash&&t(o);break;case"fulfilled":"error"!==x.status&&x.data===o.value||r();break;case"rejected":"error"===x.status&&x.error===o.reason||r()}}return x}updateResult(e){const t=this.#j,n=this.createResult(this.#P,this.options);if(this.#T=this.#P.state,this.#M=this.options,void 0!==this.#T.data&&(this.#N=this.#P),x(n,t))return;this.#j=n;const r={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#$.size)return!0;const r=new Set(n??this.#$);return this.options.throwOnError&&r.add("error"),Object.keys(this.#j).some((e=>this.#j[e]!==t[e]&&r.has(e)))})()&&(r.listeners=!0),this.#H({...r,...e})}#V(){const e=this.#k.getQueryCache().build(this.#k,this.options);if(e===this.#P)return;const t=this.#P;this.#P=e,this.#D=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#I()}#H(e){$.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#j)})),this.#k.getQueryCache().notify({query:this.#P,type:"observerResultsUpdated"})}))}};function Q(e,t){return function(e,t){return!1!==f(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&X(e,t,t.refetchOnMount)}function X(e,t,n){if(!1!==f(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Z(e,t)}return!1}function J(e,t,n,r){return(e!==t||!1===f(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Z(e,n)}function Z(e,t){return!1!==f(t.enabled,e)&&e.isStaleByTime(h(t.staleTime,e))}var ee=class extends a{#k;#j=void 0;#W;#G;constructor(e,t){super(),this.#k=e,this.setOptions(t),this.bindMethods(),this.#Y()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#k.defaultMutationOptions(e),x(this.options,t)||this.#k.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#W,observer:this}),t?.mutationKey&&this.options.mutationKey&&y(t.mutationKey)!==y(this.options.mutationKey)?this.reset():"pending"===this.#W?.state.status&&this.#W.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#W?.removeObserver(this)}onMutationUpdate(e){this.#Y(),this.#H(e)}getCurrentResult(){return this.#j}reset(){this.#W?.removeObserver(this),this.#W=void 0,this.#Y(),this.#H()}mutate(e,t){return this.#G=t,this.#W?.removeObserver(this),this.#W=this.#k.getMutationCache().build(this.#k,this.options),this.#W.addObserver(this),this.#W.execute(e)}#Y(){const e=this.#W?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#j={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#H(e){$.batch((()=>{if(this.#G&&this.hasListeners()){const t=this.#j.variables,n=this.#j.context;"success"===e?.type?(this.#G.onSuccess?.(e.data,t,n),this.#G.onSettled?.(e.data,null,t,n)):"error"===e?.type&&(this.#G.onError?.(e.error,t,n),this.#G.onSettled?.(void 0,e.error,t,n))}this.listeners.forEach((e=>{e(this.#j)}))}))}},te=i.createContext(void 0),ne=e=>{const t=i.useContext(te);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},re=({client:e,children:n})=>(i.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),t.jsx(te.Provider,{value:e,children:n})),oe=i.createContext(!1);var ie=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function se(e,t){return"function"==typeof e?e(...t):!!e}function ae(){}var le=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function ce(e,t,n){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=ne(n),o=i.useContext(oe),s=i.useContext(ie),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=o?"isRestoring":"optimistic",(e=>{e.suspense&&(void 0===e.staleTime&&(e.staleTime=1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))})(a),((e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))})(a,s),(e=>{i.useEffect((()=>{e.clearReset()}),[e])})(s);const c=!r.getQueryCache().get(a.queryHash),[u]=i.useState((()=>new t(r,a))),d=u.getOptimisticResult(a);if(i.useSyncExternalStore(i.useCallback((e=>{const t=o?ae:u.subscribe($.batchCalls(e));return u.updateResult(),t}),[u,o]),(()=>u.getCurrentResult()),(()=>u.getCurrentResult())),i.useEffect((()=>{u.setOptions(a,{listeners:!1})}),[a,u]),((e,t)=>e?.suspense&&t.isPending)(a,d))throw le(a,u,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&se(n,[e.error,r]))({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw d.error;if(r.getDefaultOptions().queries?._experimental_afterQuery?.(a,d),a.experimental_prefetchInRender&&!l&&((e,t)=>e.isLoading&&e.isFetching&&!t)(d,o)){const e=c?le(a,u,s):r.getQueryCache().get(a.queryHash)?.promise;e?.catch(ae).finally((()=>{u.updateResult()}))}return a.notifyOnChangeProps?d:u.trackResult(d)}function ue(e,t){return ce(e,Y,t)}function de(e,t){const n=ne(t),[r]=i.useState((()=>new ee(n,e)));i.useEffect((()=>{r.setOptions(e)}),[r,e]);const o=i.useSyncExternalStore(i.useCallback((e=>r.subscribe($.batchCalls(e))),[r]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),s=i.useCallback(((e,t)=>{r.mutate(e,t).catch(ae)}),[r]);if(o.error&&se(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var he={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return fe(this.context.count)},getNextContextId(){return fe(this.context.count++)}};function fe(e){const t=String(e),n=t.length-1;return he.context.id+(n?String.fromCharCode(96+n):"")+t}function pe(e){he.context=e}var me=Symbol("solid-proxy"),ge="function"==typeof Proxy,ye=(Symbol("solid-track"),{equals:(e,t)=>e===t}),ve=Ze,be=1,xe=2,we={owned:null,cleanups:null,context:null,owner:null},Se={},ke=null,Ce=null,Ee=null,Pe=null,De=null,je=0;function Te(e,t){const n=Ee,r=ke,o=0===e.length,i=void 0===t?r:t,s=o?we:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e((()=>Le((()=>rt(s)))));ke=s,Ee=null;try{return Je(a,!0)}finally{Ee=n,ke=r}}function Me(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},ye,t):ye).equals||void 0};return[We.bind(n),e=>("function"==typeof e&&(e=e(n.value)),Ge(n,e))]}function Oe(e,t,n){Ye(Qe(e,t,!0,be))}function Ae(e,t,n){Ye(Qe(e,t,!1,be))}function Ne(e,t,n){ve=et;const r=Qe(e,t,!1,be);n&&n.render||(r.user=!0),De?De.push(r):Ye(r)}function _e(e,t,n){n=n?Object.assign({},ye,n):ye;const r=Qe(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ye(r),We.bind(r)}function Re(e,t,n){let r,o,i;1===arguments.length?(r=!0,o=e,i={}):(r=e,o=t,i={});let s=null,a=Se,l=null,c=!1,u="initialValue"in i,d="function"==typeof r&&_e(r);const h=new Set,[f,p]=(i.storage||Me)(i.initialValue),[m,g]=Me(void 0),[y,v]=Me(void 0,{equals:!1}),[b,x]=Me(u?"ready":"unresolved");function w(e,t,n,r){return s===e&&(s=null,void 0!==r&&(u=!0),e!==a&&t!==a||!i.onHydrated||queueMicrotask((()=>i.onHydrated(r,{value:t}))),a=Se,function(e,t){Je((()=>{void 0===t&&p((()=>e)),x(void 0!==t?"errored":u?"ready":"unresolved"),g(t);for(const e of h.keys())e.decrement();h.clear()}),!1)}(t,n)),t}function S(){const e=f(),t=m();if(void 0!==t&&!s)throw t;return e}function k(e=!0){if(!1!==e&&c)return;c=!1;const t=d?d():r;if(null==t||!1===t)return void w(s,Le(f));const n=a!==Se?a:Le((()=>o(t,{value:f(),refetching:e})));return(i=n)&&"object"==typeof i&&"then"in i?(s=n,"value"in n?("success"===n.status?w(s,n.value,void 0,t):w(s,void 0,ot(n.value),t),n):(c=!0,queueMicrotask((()=>c=!1)),Je((()=>{x(u?"refreshing":"pending"),v()}),!1),n.then((e=>w(n,e,void 0,t)),(e=>w(n,void 0,ot(e),t))))):(w(s,n,void 0,t),n);var i}return he.context&&(l=he.getNextContextId(),"initial"===i.ssrLoadFrom?a=i.initialValue:he.load&&he.has(l)&&(a=he.load(l))),Object.defineProperties(S,{state:{get:()=>b()},error:{get:()=>m()},loading:{get(){const e=b();return"pending"===e||"refreshing"===e}},latest:{get(){if(!u)return S();const e=m();if(e&&!s)throw e;return f()}}}),d?Oe((()=>k(!1))):k(!1),[S,{refetch:k,mutate:p}]}function Le(e){if(null===Ee)return e();const t=Ee;Ee=null;try{return e()}finally{Ee=t}}function $e(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return n=>{let s;if(r){s=Array(e.length);for(let t=0;t<e.length;t++)s[t]=e[t]()}else s=e();if(i)return i=!1,n;const a=Le((()=>t(s,o,n)));return o=s,a}}function Fe(e){Ne((()=>Le(e)))}function Ie(e){return null===ke||(null===ke.cleanups?ke.cleanups=[e]:ke.cleanups.push(e)),e}function qe(){return ke}function ze(e){const t=Ee,n=ke;return Promise.resolve().then((()=>{Ee=t,ke=n,Je(e,!1),Ee=ke=null}))}var[Ve,Be]=Me(!1);function Ue(e,t){const n=Symbol("context");return{id:n,Provider:at(n),defaultValue:e}}function Ke(e){let t;return ke&&ke.context&&void 0!==(t=ke.context[e.id])?t:e.defaultValue}function He(e){const t=_e(e),n=_e((()=>st(t())));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function We(){if(this.sources&&this.state)if(this.state===be)Ye(this);else{const e=Pe;Pe=null,Je((()=>tt(this)),!1),Pe=e}if(Ee){const e=this.observers?this.observers.length:0;Ee.sources?(Ee.sources.push(this),Ee.sourceSlots.push(e)):(Ee.sources=[this],Ee.sourceSlots=[e]),this.observers?(this.observers.push(Ee),this.observerSlots.push(Ee.sources.length-1)):(this.observers=[Ee],this.observerSlots=[Ee.sources.length-1])}return this.value}function Ge(e,t,n){return e.comparator&&e.comparator(e.value,t)||(e.value=t,e.observers&&e.observers.length&&Je((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=Ce&&Ce.running;r&&Ce.disposed.has(n),(r?n.tState:n.state)||(n.pure?Pe.push(n):De.push(n),n.observers&&nt(n)),r||(n.state=be)}if(Pe.length>1e6)throw Pe=[],new Error}),!1)),t}function Ye(e){if(!e.fn)return;rt(e);!function(e,t,n){let r;const o=ke,i=Ee;Ee=ke=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=be,e.owned&&e.owned.forEach(rt),e.owned=null),e.updatedAt=n+1,it(s)}finally{Ee=i,ke=o}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?Ge(e,r):e.value=r,e.updatedAt=n)}(e,e.value,je)}function Qe(e,t,n,r=be,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ke,context:ke?ke.context:null,pure:n};return null===ke||ke!==we&&(ke.owned?ke.owned.push(i):ke.owned=[i]),i}function Xe(e){if(0===e.state)return;if(e.state===xe)return tt(e);if(e.suspense&&Le(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<je);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if((e=t[n]).state===be)Ye(e);else if(e.state===xe){const n=Pe;Pe=null,Je((()=>tt(e,t[0])),!1),Pe=n}}function Je(e,t){if(Pe)return e();let n=!1;t||(Pe=[]),De?n=!0:De=[],je++;try{const t=e();return function(e){Pe&&(Ze(Pe),Pe=null);if(e)return;const t=De;De=null,t.length&&Je((()=>ve(t)),!1)}(n),t}catch(r){n||(De=null),Pe=null,it(r)}}function Ze(e){for(let t=0;t<e.length;t++)Xe(e[t])}function et(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Xe(r)}if(he.context){if(he.count)return he.effects||(he.effects=[]),void he.effects.push(...e.slice(0,n));pe()}for(!he.effects||!he.done&&he.count||(e=[...he.effects,...e],n+=he.effects.length,delete he.effects),t=0;t<n;t++)Xe(e[t])}function tt(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const e=r.state;e===be?r!==t&&(!r.updatedAt||r.updatedAt<je)&&Xe(r):e===xe&&tt(r,t)}}}function nt(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=xe,n.pure?Pe.push(n):De.push(n),n.observers&&nt(n))}}function rt(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)rt(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)rt(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function ot(e){return e instanceof Error?e:new Error("string"==typeof e?e:"Unknown error",{cause:e})}function it(e,t=ke){throw ot(e)}function st(e){if("function"==typeof e&&!e.length)return st(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=st(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function at(e,t){return function(t){let n;return Ae((()=>n=Le((()=>(ke.context={...ke.context,[e]:t.value},He((()=>t.children)))))),void 0),n}}var lt=Symbol("fallback");function ct(e){for(let t=0;t<e.length;t++)e[t]()}function ut(e,t){return Le((()=>e(t||{})))}function dt(){return!0}var ht={get:(e,t,n)=>t===me?n:e.get(t),has:(e,t)=>t===me||e.has(t),set:dt,deleteProperty:dt,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:dt,deleteProperty:dt}),ownKeys:e=>e.keys()};function ft(e){return(e="function"==typeof e?e():e)?e:{}}function pt(){for(let e=0,t=this.length;e<t;++e){const t=this[e]();if(void 0!==t)return t}}function mt(...e){let t=!1;for(let s=0;s<e.length;s++){const n=e[s];t=t||!!n&&me in n,e[s]="function"==typeof n?(t=!0,_e(n)):n}if(ge&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=ft(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ft(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ft(e[n])));return[...new Set(t)]}},ht);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const t=e[s];if(!t)continue;const o=Object.getOwnPropertyNames(t);for(let e=o.length-1;e>=0;e--){const i=o[e];if("__proto__"===i||"constructor"===i)continue;const s=Object.getOwnPropertyDescriptor(t,i);if(r[i]){const e=n[i];e&&(s.get?e.push(s.get.bind(t)):void 0!==s.value&&e.push((()=>s.value)))}else r[i]=s.get?{enumerable:!0,configurable:!0,get:pt.bind(n[i]=[s.get.bind(t)])}:void 0!==s.value?s:void 0}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const e=i[s],t=r[e];t&&t.get?Object.defineProperty(o,e,t):o[e]=t?t.value:void 0}return o}function gt(e,...t){if(ge&&me in e){const n=new Set(t.length>1?t.flat():t[0]),r=t.map((t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter((t=>t in e))},ht)));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter((e=>!n.has(e)))},ht)),r}const n={},r=t.map((()=>({})));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,l=0;for(const e of t)e.includes(o)&&(a=!0,s?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;a||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}function yt(e){let t,n;const r=r=>{const o=he.context;if(o){const[r,i]=Me();he.count||(he.count=0),he.count++,(n||(n=e())).then((e=>{!he.done&&pe(o),he.count--,i((()=>e.default)),pe()})),t=r}else if(!t){const[r]=Re((()=>(n||(n=e())).then((e=>e.default))));t=r}let i;return _e((()=>(i=t())?Le((()=>{if(!o||he.done)return i(r);const e=he.context;pe(o);const t=i(r);return pe(e),t})):""))};return r.preload=()=>n||((n=e()).then((e=>t=()=>e.default)),n),r}var vt=0;function bt(){return he.context?he.getNextContextId():"cl-"+vt++}var xt=e=>`Stale read from <${e}>.`;function wt(e){return _e(function(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return Ie((()=>ct(i))),()=>{let l,c,u=e()||[],d=u.length;return Le((()=>{let e,t,f,p,m,g,y,v,b;if(0===d)0!==s&&(ct(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[lt],o[0]=Te((e=>(i[0]=e,n.fallback()))),s=1);else if(0===s){for(o=new Array(d),c=0;c<d;c++)r[c]=u[c],o[c]=Te(h);s=d}else{for(f=new Array(d),p=new Array(d),a&&(m=new Array(d)),g=0,y=Math.min(s,d);g<y&&r[g]===u[g];g++);for(y=s-1,v=d-1;y>=g&&v>=g&&r[y]===u[v];y--,v--)f[v]=o[y],p[v]=i[y],a&&(m[v]=a[y]);for(e=new Map,t=new Array(v+1),c=v;c>=g;c--)b=u[c],l=e.get(b),t[c]=void 0===l?-1:l,e.set(b,c);for(l=g;l<=y;l++)b=r[l],c=e.get(b),void 0!==c&&-1!==c?(f[c]=o[l],p[c]=i[l],a&&(m[c]=a[l]),c=t[c],e.set(b,c)):i[l]();for(c=g;c<d;c++)c in f?(o[c]=f[c],i[c]=p[c],a&&(a[c]=m[c],a[c](c))):o[c]=Te(h);o=o.slice(0,s=d),r=u.slice(0)}return o}));function h(e){if(i[c]=e,a){const[e,n]=Me(c);return a[c]=n,t(u[c],e)}return t(u[c])}}}((()=>e.each),e.children,"fallback"in e&&{fallback:()=>e.fallback}||void 0))}function St(e){return _e(function(e,t,n={}){let r,o=[],i=[],s=[],a=[],l=0;return Ie((()=>ct(s))),()=>{const c=e()||[],u=c.length;return Le((()=>{if(0===u)return 0!==l&&(ct(s),s=[],o=[],i=[],l=0,a=[]),n.fallback&&(o=[lt],i[0]=Te((e=>(s[0]=e,n.fallback()))),l=1),i;for(o[0]===lt&&(s[0](),s=[],o=[],i=[],l=0),r=0;r<u;r++)r<o.length&&o[r]!==c[r]?a[r]((()=>c[r])):r>=o.length&&(i[r]=Te(d));for(;r<o.length;r++)s[r]();return l=a.length=s.length=u,o=c.slice(0),i=i.slice(0,l)}));function d(e){s[r]=e;const[n,o]=Me(c[r]);return a[r]=o,t(n,r)}}}((()=>e.each),e.children,"fallback"in e&&{fallback:()=>e.fallback}||void 0))}function kt(e){const t=e.keyed,n=_e((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return _e((()=>{const r=n();if(r){const o=e.children;return"function"==typeof o&&o.length>0?Le((()=>o(t?r:()=>{if(!Le(n))throw xt("Show");return e.when}))):o}return e.fallback}),void 0,void 0)}function Ct(e){let t=!1;const n=He((()=>e.children)),r=_e((()=>{let e=n();Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++){const r=e[n].when;if(r)return t=!!e[n].keyed,[n,r,e[n]]}return[-1]}),void 0,{equals:(e,n)=>(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return _e((()=>{const[n,o,i]=r();if(n<0)return e.fallback;const s=i.children;return"function"==typeof s&&s.length>0?Le((()=>s(t?o:()=>{if(Le(r)[0]!==n)throw xt("Match");return i.when}))):s}),void 0,void 0)}function Et(e){return e}var Pt=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),Dt=new Set(["innerHTML","textContent","innerText","children"]),jt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Tt=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});var Mt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ot=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),At={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var Nt="_$DX_DELEGATE";function _t(e,t,n,r={}){let o;return Te((r=>{o=r,t===document?e():Vt(t,e(),t.firstChild?null:void 0,n)}),r.owner),()=>{o(),t.textContent=""}}function Rt(e,t,n){let r;const o=()=>(r||(r=(()=>{const t=document.createElement("template");return t.innerHTML=e,t.content.firstChild})())).cloneNode(!0);return o.cloneNode=o,o}function Lt(e,t=window.document){const n=t[Nt]||(t[Nt]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Wt))}}function $t(e,t,n){Ut(e)||(null==n?e.removeAttribute(t):e.setAttribute(t,n))}function Ft(e,t){Ut(e)||(null==t?e.removeAttribute("class"):e.className=t)}function It(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,"function"!=typeof n&&n)}function qt(e,t={},n,r){const o={};return r||Ae((()=>o.children=Gt(e,t.children,o.children))),Ae((()=>"function"==typeof t.ref&&zt(t.ref,e))),Ae((()=>function(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if("children"===s)continue;o[s]=Ht(e,s,null,o[s],n,i,t)}for(const s in t){if("children"===s)continue;o[s]=Ht(e,s,t[s],o[s],n,i,t)}}(e,t,n,0,o,!0))),o}function zt(e,t,n){return Le((()=>e(t,n)))}function Vt(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return Gt(e,t,r,n);Ae((r=>Gt(e,t(),r,n)),r)}function Bt(e){let t,n;return Ut()&&(t=he.registry.get(n=he.getNextContextId()))?(he.completed&&he.completed.add(t),he.registry.delete(n),t):e()}function Ut(e){return!!he.context&&!he.done&&(!e||e.isConnected)}function Kt(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Ht(e,t,n,r,o,i,s){let a,l,c,u,d;if("style"===t)return function(e,t,n){if(!t)return n?$t(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const r=o[i];r&&"undefined"!==r&&!t[r]&&(Kt(e,r,!1),delete n[r])}for(i=0,s=r.length;i<s;i++){const o=r[i],s=!!t[o];o&&"undefined"!==o&&n[o]!==s&&s&&(Kt(e,o,!0),n[o]=s)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r,"function"!=typeof r&&r),n&&e.addEventListener(o,n,"function"!=typeof n&&n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=Mt.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(It(e,o,n,i),i&&Lt([o]))}else if("attr:"===t.slice(0,5))$t(e,t.slice(5),n);else if("bool:"===t.slice(0,5))!function(e,t,n){Ut(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}(e,t.slice(5),n);else if((d="prop:"===t.slice(0,5))||(c=Dt.has(t))||!o&&((u=function(e,t){const n=Tt[e];return"object"==typeof n?n[t]?n.$:void 0:n}(t,e.tagName))||(l=Pt.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),l=!0;else if(Ut(e))return n;"class"===t||"className"===t?Ft(e,n):!a||l||c?e[u||t]=n:e[(h=t,h.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=n}else{const r=o&&t.indexOf(":")>-1&&At[t.split(":")[0]];r?function(e,t,n,r){Ut(e)||(null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}(e,r,t,n):$t(e,jt[t]||t,n)}var h;return n}function Wt(e){if(he.registry&&he.events&&he.events.find((([t,n])=>n===e)))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),s=()=>{const r=t[n];if(r&&!t.disabled){const o=t[`${n}Data`];if(void 0!==o?r.call(t,o,e):r.call(t,e),e.cancelBubble)return}return t.host&&"string"!=typeof t.host&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>t||document}),he.registry&&!he.done&&(he.done=_$HY.done=!0),e.composedPath){const n=e.composedPath();i(n[0]);for(let e=0;e<n.length-2&&(t=n[e],s());e++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Gt(e,t,n,r,o){const i=Ut(e);if(i){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){const r=n[e];8===r.nodeType&&"!$"===r.data.slice(0,2)?r.remove():t.push(r)}n=t}for(;"function"==typeof n;)n=n();if(t===n)return n;const s=typeof t,a=void 0!==r;if(e=a&&n[0]&&n[0].parentNode||e,"string"===s||"number"===s){if(i)return n;if("number"===s&&(t=t.toString())===n)return n;if(a){let o=n[0];o&&3===o.nodeType?o.data!==t&&(o.data=t):o=document.createTextNode(t),n=Xt(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===s){if(i)return n;n=Xt(e,n,r)}else{if("function"===s)return Ae((()=>{let o=t();for(;"function"==typeof o;)o=o();n=Gt(e,o,n,r)})),()=>n;if(Array.isArray(t)){const s=[],l=n&&Array.isArray(n);if(Yt(s,t,n,o))return Ae((()=>n=Gt(e,s,n,r,!0))),()=>n;if(i){if(!s.length)return n;if(void 0===r)return n=[...e.childNodes];let t=s[0];if(t.parentNode!==e)return n;const o=[t];for(;(t=t.nextSibling)!==r;)o.push(t);return n=o}if(0===s.length){if(n=Xt(e,n,r),a)return n}else l?0===n.length?Qt(e,s,r):function(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;)if(t[s]!==n[a]){for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const t=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],t)}else if(i===a)for(;s<o;)c&&c.has(t[s])||t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=a;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[s]);if(null!=r)if(a<r&&r<i){let l,u=s,d=1;for(;++u<o&&u<i&&null!=(l=c.get(t[u]))&&l===r+d;)d++;if(d>r-a){const o=t[s];for(;a<r;)e.insertBefore(n[a++],o)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}else s++,a++}(e,n,s):(n&&Xt(e),Qt(e,s));n=s}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Xt(e,n,r,t);Xt(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function Yt(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let s,a=t[i],l=n&&n[e.length];if(null==a||!0===a||!1===a);else if("object"==(s=typeof a)&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Yt(e,a,l)||o;else if("function"===s)if(r){for(;"function"==typeof a;)a=a();o=Yt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const t=String(a);e.push(l&&3===l.nodeType&&l.data===t?l:document.createTextNode(t))}}return o}function Qt(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Xt(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(o!==s){const t=s.parentNode===e;r||i?t&&s.remove():t?e.replaceChild(o,s):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}function Jt(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function Zt(e){const{useShadow:t}=e,n=document.createTextNode(""),r=qe();let o,i=!!he.context;return Ne((()=>{i&&(qe().user=i=!1),o||(o=function(e,t){const n=ke,r=Ee;ke=e,Ee=null;try{return Je(t,!0)}catch(o){it(o)}finally{ke=n,Ee=r}}(r,(()=>_e((()=>e.children)))));const s=e.mount||document.body;if(s instanceof HTMLHeadElement){const[e,t]=Me(!1),n=()=>t(!0);Te((t=>Vt(s,(()=>e()?t():o()),null))),Ie(n)}else{const r=Jt(e.isSVG?"g":"div",e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:"open"}):r;Object.defineProperty(r,"_$host",{get:()=>n.parentNode,configurable:!0}),Vt(i,o),s.appendChild(r),e.ref&&e.ref(r),Ie((()=>s.removeChild(r)))}}),void 0,{render:!i}),n}function en(e){const[t,n]=gt(e,["component"]),r=_e((()=>t.component));return _e((()=>{const e=r();switch(typeof e){case"function":return Le((()=>e(n)));case"string":const t=Ot.has(e),r=he.context?Bt():Jt(e,t);return qt(r,n,t),r}}))}var tn=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},nn=class{constructor(e){this.generateIdentifier=e,this.kv=new tn}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},rn=class extends nn{constructor(){super((e=>e.name)),this.classToAllowedProps=new Map}register(e,t){"object"==typeof t?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function on(e,t){const n=function(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const e=r[o];if(t(e))return e}}function sn(e,t){Object.entries(e).forEach((([e,n])=>t(n,e)))}function an(e,t){return-1!==e.indexOf(t)}function ln(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var cn=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return on(this.transfomers,(t=>t.isApplicable(e)))}findByName(e){return this.transfomers[e]}},un=e=>void 0===e,dn=e=>"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype)),hn=e=>dn(e)&&0===Object.keys(e).length,fn=e=>Array.isArray(e),pn=e=>e instanceof Map,mn=e=>e instanceof Set,gn=e=>"Symbol"===(e=>Object.prototype.toString.call(e).slice(8,-1))(e),yn=e=>"number"==typeof e&&isNaN(e),vn=e=>(e=>"boolean"==typeof e)(e)||(e=>null===e)(e)||un(e)||(e=>"number"==typeof e&&!isNaN(e))(e)||(e=>"string"==typeof e)(e)||gn(e),bn=e=>e.replace(/\./g,"\\."),xn=e=>e.map(String).map(bn).join("."),wn=e=>{const t=[];let n="";for(let r=0;r<e.length;r++){let o=e.charAt(r);if("\\"===o&&"."===e.charAt(r+1)){n+=".",r++;continue}"."===o?(t.push(n),n=""):n+=o}return t.push(n),t};function Sn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var kn=[Sn(un,"undefined",(()=>null),(()=>{})),Sn((e=>"bigint"==typeof e),"bigint",(e=>e.toString()),(e=>"undefined"!=typeof BigInt?BigInt(e):e)),Sn((e=>e instanceof Date&&!isNaN(e.valueOf())),"Date",(e=>e.toISOString()),(e=>new Date(e))),Sn((e=>e instanceof Error),"Error",((e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach((t=>{n[t]=e[t]})),n}),((e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach((t=>{n[t]=e[t]})),n})),Sn((e=>e instanceof RegExp),"regexp",(e=>""+e),(e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)})),Sn(mn,"set",(e=>[...e.values()]),(e=>new Set(e))),Sn(pn,"map",(e=>[...e.entries()]),(e=>new Map(e))),Sn((e=>{return yn(e)||((t=e)===1/0||t===-1/0);var t}),"number",(e=>yn(e)?"NaN":e>0?"Infinity":"-Infinity"),Number),Sn((e=>0===e&&1/e==-1/0),"number",(()=>"-0"),Number),Sn((e=>e instanceof URL),"URL",(e=>e.toString()),(e=>new URL(e)))];function Cn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var En=Cn(((e,t)=>{if(gn(e)){return!!t.symbolRegistry.getIdentifier(e)}return!1}),((e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)]),(e=>e.description),((e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r})),Pn=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(((e,t)=>(e[t.name]=t,e)),{}),Dn=Cn((e=>ArrayBuffer.isView(e)&&!(e instanceof DataView)),(e=>["typed-array",e.constructor.name]),(e=>[...e]),((e,t)=>{const n=Pn[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)}));function jn(e,t){if(e?.constructor){return!!t.classRegistry.getIdentifier(e.constructor)}return!1}var Tn=Cn(jn,((e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)]),((e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach((t=>{r[t]=e[t]})),r}),((e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)})),Mn=Cn(((e,t)=>!!t.customTransformerRegistry.findApplicable(e)),((e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name]),((e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e)),((e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)})),On=[Tn,En,Mn,Dn],An=(e,t)=>{const n=ln(On,(n=>n.isApplicable(e,t)));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=ln(kn,(n=>n.isApplicable(e,t)));return r?{value:r.transform(e,t),type:r.annotation}:void 0},Nn={};kn.forEach((e=>{Nn[e.annotation]=e}));var _n=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Rn(e){if(an(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(an(e,"prototype"))throw new Error("prototype is not allowed as a property");if(an(e,"constructor"))throw new Error("constructor is not allowed as a property")}var Ln=(e,t,n)=>{if(Rn(t),0===t.length)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const e=t[i];if(fn(r)){r=r[+e]}else if(dn(r))r=r[e];else if(mn(r)){r=_n(r,+e)}else if(pn(r)){if(i===t.length-2)break;const n=0==+t[++i]?"key":"value",o=_n(r,+e);switch(n){case"key":r=o;break;case"value":r=r.get(o)}}}const o=t[t.length-1];if(fn(r)?r[+o]=n(r[+o]):dn(r)&&(r[o]=n(r[o])),mn(r)){const e=_n(r,+o),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(pn(r)){const e=_n(r,+t[t.length-2]);switch(0==+o?"key":"value"){case"key":{const t=n(e);r.set(t,r.get(e)),t!==e&&r.delete(e);break}case"value":r.set(e,n(r.get(e)))}}return e};function $n(e,t,n=[]){if(!e)return;if(!fn(e))return void sn(e,((e,r)=>$n(e,t,[...n,...wn(r)])));const[r,o]=e;o&&sn(o,((e,r)=>{$n(e,t,[...n,...wn(r)])})),t(r,n)}function Fn(e,t,n){return $n(t,((t,r)=>{e=Ln(e,r,(e=>((e,t,n)=>{if(!fn(t)){const r=Nn[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}switch(t[0]){case"symbol":return En.untransform(e,t,n);case"class":return Tn.untransform(e,t,n);case"custom":return Mn.untransform(e,t,n);case"typed-array":return Dn.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}})(e,t,n)))})),e}function In(e,t){function n(t,n){const r=((e,t)=>{Rn(t);for(let n=0;n<t.length;n++){const r=t[n];if(mn(e))e=_n(e,+r);else if(pn(e)){const o=0==+t[++n]?"key":"value",i=_n(e,+r);switch(o){case"key":e=i;break;case"value":e=e.get(i)}}else e=e[r]}return e})(e,wn(n));t.map(wn).forEach((t=>{e=Ln(e,t,(()=>r))}))}if(fn(t)){const[r,o]=t;r.forEach((t=>{e=Ln(e,wn(t),(()=>e))})),o&&sn(o,n)}else sn(t,n);return e}var qn=(e,t,n,r,o=[],i=[],s=new Map)=>{const a=vn(e);if(!a){!function(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}(e,o,t);const n=s.get(e);if(n)return r?{transformedValue:null}:n}if(!((e,t)=>dn(e)||fn(e)||pn(e)||mn(e)||jn(e,t))(e,n)){const t=An(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return a||s.set(e,r),r}if(an(i,e))return{transformedValue:null};const l=An(e,n),c=l?.value??e,u=fn(c)?[]:{},d={};sn(c,((a,l)=>{if("__proto__"===l||"constructor"===l||"prototype"===l)throw new Error(`Detected property ${l}. This is a prototype pollution risk, please remove it from your object.`);const c=qn(a,t,n,r,[...o,l],[...i,e],s);u[l]=c.transformedValue,fn(c.annotations)?d[l]=c.annotations:dn(c.annotations)&&sn(c.annotations,((e,t)=>{d[bn(l)+"."+t]=e}))}));const h=hn(d)?{transformedValue:u,annotations:l?[l.type]:void 0}:{transformedValue:u,annotations:l?[l.type,d]:d};return a||s.set(e,h),h};function zn(e){return Object.prototype.toString.call(e).slice(8,-1)}function Vn(e){return"Array"===zn(e)}function Bn(e,t={}){if(Vn(e))return e.map((e=>Bn(e,t)));if(!function(e){if("Object"!==zn(e))return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(e))return e;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce(((n,r)=>{if(Vn(t.props)&&!t.props.includes(r))return n;return function(e,t,n,r,o){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";"enumerable"===i&&(e[t]=n),o&&"nonenumerable"===i&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,r,Bn(e[r],t),e,t.nonenumerable),n}),{})}var Un=class{constructor({dedupe:e=!1}={}){this.classRegistry=new rn,this.symbolRegistry=new nn((e=>e.description??"")),this.customTransformerRegistry=new cn,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=qn(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const o=function(e,t){const n={};let r;return e.forEach((e=>{if(e.length<=1)return;t||(e=e.map((e=>e.map(String))).sort(((e,t)=>e.length-t.length)));const[o,...i]=e;0===o.length?r=i.map(xn):n[xn(o)]=i.map(xn)})),r?hn(n)?[r]:[r,n]:hn(n)?void 0:n}(t,this.dedupe);return o&&(r.meta={...r.meta,referentialEqualities:o}),r}deserialize(e){const{json:t,meta:n}=e;let r=Bn(t);return n?.values&&(r=Fn(r,n.values,this)),n?.referentialEqualities&&(r=In(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Un.defaultInstance=new Un,Un.serialize=Un.defaultInstance.serialize.bind(Un.defaultInstance),Un.deserialize=Un.defaultInstance.deserialize.bind(Un.defaultInstance),Un.stringify=Un.defaultInstance.stringify.bind(Un.defaultInstance),Un.parse=Un.defaultInstance.parse.bind(Un.defaultInstance),Un.registerClass=Un.defaultInstance.registerClass.bind(Un.defaultInstance),Un.registerSymbol=Un.defaultInstance.registerSymbol.bind(Un.defaultInstance),Un.registerCustom=Un.defaultInstance.registerCustom.bind(Un.defaultInstance),Un.allowErrorProps=Un.defaultInstance.allowErrorProps.bind(Un.defaultInstance);var Kn=Un.serialize,Hn=Un.stringify;function Wn(e){return"fetching"===e.state.fetchStatus?"fetching":e.getObserversCount()?"paused"===e.state.fetchStatus?"paused":e.isStale()?"stale":"fresh":"inactive"}function Gn({status:e,isPaused:t}){return t?"purple":"error"===e?"red":"pending"===e?"yellow":"success"===e?"green":"gray"}var Yn=(e,t=!1)=>{const{json:n}=Kn(e);return JSON.stringify(n,null,t?2:void 0)},Qn=e=>"idle"!==e.state.fetchStatus?0:e.getObserversCount()?e.isStale()?2:1:3,Xn=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Jn={status:(e,t)=>Qn(e)===Qn(t)?Xn(e,t):Qn(e)>Qn(t)?1:-1,"query hash":(e,t)=>e.queryHash.localeCompare(t.queryHash),"last updated":Xn},Zn=e=>e.state.isPaused?0:"error"===e.state.status?2:"pending"===e.state.status?1:3,er=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,tr={status:(e,t)=>Zn(e)===Zn(t)?er(e,t):Zn(e)>Zn(t)?1:-1,"last updated":er},nr=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),rr=()=>{const[e,t]=Me("dark");return Fe((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");t(e.matches?"dark":"light");const n=e=>{t(e.matches?"dark":"light")};e.addEventListener("change",n),Ie((()=>e.removeEventListener("change",n)))})),e},or=(e,t,n)=>{if(0===t.length)return n;if(e instanceof Map){const r=new Map(e);if(1===t.length)return r.set(t[0],n),r;const[o,...i]=t;return r.set(o,or(r.get(o),i,n)),r}if(e instanceof Set){const r=or(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(1===t.length)return r[t[0]]=n,r;const[o,...i]=t;return r[o]=or(r[o],i,n),r}if(e instanceof Object){const r={...e};if(1===t.length)return r[t[0]]=n,r;const[o,...i]=t;return r[o]=or(r[o],i,n),r}return e},ir=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(1===t.length)return n.delete(t[0]),n;const[r,...o]=t;return n.set(r,ir(n.get(r),o)),n}if(e instanceof Set){const n=ir(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(1===t.length)return n.filter(((e,n)=>n.toString()!==t[0]));const[r,...o]=t;return n[r]=ir(n[r],o),n}if(e instanceof Object){const n={...e};if(1===t.length)return delete n[t[0]],n;const[r,...o]=t;return n[r]=ir(n[r],o),n}return e},sr=(e,t)=>{if(!e)return;if(document.querySelector("#_goober")||t?.querySelector("#_goober"))return;const n=document.createElement("style"),r=document.createTextNode("");n.appendChild(r),n.id="_goober",n.setAttribute("nonce",e),t?t.appendChild(n):document.head.appendChild(n)},ar=class{#k;#Q;#X;#J;#Z=!1;#ee;#te;#ne;#re;#oe;#ie;#se;#ae;constructor(e){const{client:t,queryFlavor:n,version:r,onlineManager:o,buttonPosition:i,position:s,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}=e;this.#k=Me(t),this.#X=n,this.#J=r,this.#Q=o,this.#ee=c,this.#te=u,this.#ne=Me(i),this.#re=Me(s),this.#oe=Me(a),this.#ie=Me(l)}setButtonPosition(e){this.#ne[1](e)}setPosition(e){this.#re[1](e)}setInitialIsOpen(e){this.#oe[1](e)}setErrorTypes(e){this.#ie[1](e)}setClient(e){this.#k[1](e)}mount(e){if(this.#Z)throw new Error("Devtools is already mounted");const t=_t((()=>{const e=this,[t]=this.#ne,[n]=this.#re,[r]=this.#oe,[o]=this.#ie,[i]=this.#k;let s;return this.#se?s=this.#se:(s=yt((()=>Promise.resolve().then((()=>Az)))),this.#se=s),sr(this.#ee,this.#te),ut(s,mt({get queryFlavor(){return e.#X},get version(){return e.#J},get onlineManager(){return e.#Q},get shadowDOMTarget(){return e.#te}},{get client(){return i()},get buttonPosition(){return t()},get position(){return n()},get initialIsOpen(){return r()},get errorTypes(){return o()}}))}),e);this.#Z=!0,this.#ae=t}unmount(){if(!this.#Z)throw new Error("Devtools is not mounted");this.#ae?.(),this.#Z=!1}};var lr="development"!==process.env.NODE_ENV?function(){return null}:function(e){const n=ne(e.client),r=i.useRef(null),{buttonPosition:o,position:s,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}=e,[d]=i.useState(new ar({client:n,queryFlavor:"React Query",version:"5",onlineManager:M,buttonPosition:o,position:s,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}));return i.useEffect((()=>{d.setClient(n)}),[n,d]),i.useEffect((()=>{o&&d.setButtonPosition(o)}),[o,d]),i.useEffect((()=>{s&&d.setPosition(s)}),[s,d]),i.useEffect((()=>{d.setInitialIsOpen(a||!1)}),[a,d]),i.useEffect((()=>{d.setErrorTypes(l||[])}),[l,d]),i.useEffect((()=>(r.current&&d.mount(r.current),()=>{d.unmount()})),[d]),t.jsx("div",{className:"tsqd-parent-container",ref:r})};function cr(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return(t.prototype=new Error).name=e,t.prototype.constructor=t,t}process;const ur=cr("LaunchDarklyUnexpectedResponseError"),dr=cr("LaunchDarklyInvalidEnvironmentIdError"),hr=cr("LaunchDarklyInvalidUserError"),fr=cr("LaunchDarklyInvalidEventKeyError"),pr=cr("LaunchDarklyInvalidArgumentError"),mr=cr("LaunchDarklyFlagFetchError");for(var gr={LDUnexpectedResponseError:ur,LDInvalidEnvironmentIdError:dr,LDInvalidUserError:hr,LDInvalidEventKeyError:fr,LDInvalidArgumentError:pr,LDInvalidDataError:cr("LaunchDarklyInvalidDataError"),LDFlagFetchError:mr,LDTimeoutError:cr("LaunchDarklyTimeoutError"),isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||400===e||408===e||429===e}},yr=[],vr=[],br=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),xr=0;xr<64;++xr)yr[xr]=br[xr],vr[br.charCodeAt(xr)]=xr;function wr(e,t,n){for(var r,o=[],i=t;i<n;i+=3)o.push(yr[(r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]))>>18&63]+yr[r>>12&63]+yr[r>>6&63]+yr[63&r]);return o.join("")}vr["-".charCodeAt(0)]=62,vr["_".charCodeAt(0)]=63;var Sr=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,s=0,a=n-r;s<a;s+=i)o.push(wr(e,s,s+i>a?a:s+i));return 1===r?o.push(yr[(t=e[n-1])>>2]+yr[t<<4&63]+"=="):2===r&&o.push(yr[(t=(e[n-2]<<8)+e[n-1])>>10]+yr[t>>4&63]+yr[t<<2&63]+"="),o.join("")},kr=Array.isArray,Cr=Object.keys,Er=Object.prototype.hasOwnProperty,Pr=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,o,i,s=kr(t),a=kr(n);if(s&&a){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,c=n instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==n.getTime();var u=t instanceof RegExp,d=n instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==n.toString();var h=Cr(t);if((o=h.length)!==Cr(n).length)return!1;for(r=o;0!=r--;)if(!Er.call(n,h[r]))return!1;for(r=o;0!=r--;)if(!e(t[i=h[r]],n[i]))return!1;return!0}return t!=t&&n!=n};const Dr=["key","ip","country","email","firstName","lastName","avatar","name"];function jr(e){const t=unescape(encodeURIComponent(e));return Sr(function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t}(t))}function Tr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Mr,Or={appendUrlPath:function(e,t){return(e.endsWith("/")?e.substring(0,e.length-1):e)+(t.startsWith("/")?"":"/")+t},base64URLEncode:function(e){return jr(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},btoa:jr,clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return Pr(e,t)},extend:function(...e){return e.reduce(((e,t)=>({...e,...t})),{})},getLDUserAgentString:function(e){return e.userAgent+"/"+(e.version||"?")},objectHasOwnProperty:Tr,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){if(!e)return e;let t;return null!=e.kind||Dr.forEach((n=>{const r=e[n];void 0!==r&&"string"!=typeof r&&(t=t||{...e},t[n]=String(r))})),t||e},transformValuesToVersionedValues:function(e){const t={};for(const n in e)Tr(e,n)&&(t[n]={value:e[n],version:0});return t},transformVersionedValuesToValues:function(e){const t={};for(const n in e)Tr(e,n)&&(t[n]=e[n].value);return t},wrapPromiseCallback:function(e,t){const n=e.then((e=>(t&&setTimeout((()=>{t(null,e)}),0),e)),(e=>{if(!t)return Promise.reject(e);setTimeout((()=>{t(e,null)}),0)}));return t?void 0:n}},Ar=new Uint8Array(16);function Nr(){if(!Mr&&!(Mr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mr(Ar)}var _r=/^(?:[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;function Rr(e){return"string"==typeof e&&_r.test(e)}for(var Lr,$r,Fr=[],Ir=0;Ir<256;++Ir)Fr.push((Ir+256).toString(16).substr(1));function qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Fr[e[t+0]]+Fr[e[t+1]]+Fr[e[t+2]]+Fr[e[t+3]]+"-"+Fr[e[t+4]]+Fr[e[t+5]]+"-"+Fr[e[t+6]]+Fr[e[t+7]]+"-"+Fr[e[t+8]]+Fr[e[t+9]]+"-"+Fr[e[t+10]]+Fr[e[t+11]]+Fr[e[t+12]]+Fr[e[t+13]]+Fr[e[t+14]]+Fr[e[t+15]]).toLowerCase();if(!Rr(n))throw TypeError("Stringified UUID is invalid");return n}var zr=0,Vr=0;function Br(e){if(!Rr(e))throw TypeError("Invalid UUID");var t,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 Ur(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Br(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,o){i=i||0;for(var a=0;a<16;++a)o[i+a]=s[a];return o}return qr(s)}try{r.name=e}catch(o){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Kr(e){return 14+(e+64>>>9<<4)+1}function Hr(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Wr(e,t,n,r,o,i){return Hr((s=Hr(Hr(t,e),Hr(r,i)))<<(a=o)|s>>>32-a,n);var s,a}function Gr(e,t,n,r,o,i,s){return Wr(t&n|~t&r,e,t,o,i,s)}function Yr(e,t,n,r,o,i,s){return Wr(t&r|n&~r,e,t,o,i,s)}function Qr(e,t,n,r,o,i,s){return Wr(t^n^r,e,t,o,i,s)}function Xr(e,t,n,r,o,i,s){return Wr(n^(t|~r),e,t,o,i,s)}var Jr=Ur("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",o=0;o<n;o+=8){var i=e[o>>5]>>>o%32&255,s=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Kr(t)-1]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=n,l=r,c=o,u=i;n=Gr(n,r,o,i,e[s],7,-680876936),i=Gr(i,n,r,o,e[s+1],12,-389564586),o=Gr(o,i,n,r,e[s+2],17,606105819),r=Gr(r,o,i,n,e[s+3],22,-1044525330),n=Gr(n,r,o,i,e[s+4],7,-176418897),i=Gr(i,n,r,o,e[s+5],12,1200080426),o=Gr(o,i,n,r,e[s+6],17,-1473231341),r=Gr(r,o,i,n,e[s+7],22,-45705983),n=Gr(n,r,o,i,e[s+8],7,1770035416),i=Gr(i,n,r,o,e[s+9],12,-1958414417),o=Gr(o,i,n,r,e[s+10],17,-42063),r=Gr(r,o,i,n,e[s+11],22,-1990404162),n=Gr(n,r,o,i,e[s+12],7,1804603682),i=Gr(i,n,r,o,e[s+13],12,-40341101),o=Gr(o,i,n,r,e[s+14],17,-1502002290),n=Yr(n,r=Gr(r,o,i,n,e[s+15],22,1236535329),o,i,e[s+1],5,-165796510),i=Yr(i,n,r,o,e[s+6],9,-1069501632),o=Yr(o,i,n,r,e[s+11],14,643717713),r=Yr(r,o,i,n,e[s],20,-373897302),n=Yr(n,r,o,i,e[s+5],5,-701558691),i=Yr(i,n,r,o,e[s+10],9,38016083),o=Yr(o,i,n,r,e[s+15],14,-660478335),r=Yr(r,o,i,n,e[s+4],20,-405537848),n=Yr(n,r,o,i,e[s+9],5,568446438),i=Yr(i,n,r,o,e[s+14],9,-1019803690),o=Yr(o,i,n,r,e[s+3],14,-187363961),r=Yr(r,o,i,n,e[s+8],20,1163531501),n=Yr(n,r,o,i,e[s+13],5,-1444681467),i=Yr(i,n,r,o,e[s+2],9,-51403784),o=Yr(o,i,n,r,e[s+7],14,1735328473),n=Qr(n,r=Yr(r,o,i,n,e[s+12],20,-1926607734),o,i,e[s+5],4,-378558),i=Qr(i,n,r,o,e[s+8],11,-2022574463),o=Qr(o,i,n,r,e[s+11],16,1839030562),r=Qr(r,o,i,n,e[s+14],23,-35309556),n=Qr(n,r,o,i,e[s+1],4,-1530992060),i=Qr(i,n,r,o,e[s+4],11,1272893353),o=Qr(o,i,n,r,e[s+7],16,-155497632),r=Qr(r,o,i,n,e[s+10],23,-1094730640),n=Qr(n,r,o,i,e[s+13],4,681279174),i=Qr(i,n,r,o,e[s],11,-358537222),o=Qr(o,i,n,r,e[s+3],16,-722521979),r=Qr(r,o,i,n,e[s+6],23,76029189),n=Qr(n,r,o,i,e[s+9],4,-640364487),i=Qr(i,n,r,o,e[s+12],11,-421815835),o=Qr(o,i,n,r,e[s+15],16,530742520),n=Xr(n,r=Qr(r,o,i,n,e[s+2],23,-995338651),o,i,e[s],6,-198630844),i=Xr(i,n,r,o,e[s+7],10,1126891415),o=Xr(o,i,n,r,e[s+14],15,-1416354905),r=Xr(r,o,i,n,e[s+5],21,-57434055),n=Xr(n,r,o,i,e[s+12],6,1700485571),i=Xr(i,n,r,o,e[s+3],10,-1894986606),o=Xr(o,i,n,r,e[s+10],15,-1051523),r=Xr(r,o,i,n,e[s+1],21,-2054922799),n=Xr(n,r,o,i,e[s+8],6,1873313359),i=Xr(i,n,r,o,e[s+15],10,-30611744),o=Xr(o,i,n,r,e[s+6],15,-1560198380),r=Xr(r,o,i,n,e[s+13],21,1309151649),n=Xr(n,r,o,i,e[s+4],6,-145523070),i=Xr(i,n,r,o,e[s+11],10,-1120210379),o=Xr(o,i,n,r,e[s+2],15,718787259),r=Xr(r,o,i,n,e[s+9],21,-343485551),n=Hr(n,a),r=Hr(r,l),o=Hr(o,c),i=Hr(i,u)}return[n,r,o,i]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Kr(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));function Zr(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 eo(e,t){return e<<t|e>>>32-t}var to=Ur("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o<r.length;++o)e.push(r.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=Math.ceil((e.length/4+2)/16),s=new Array(i),a=0;a<i;++a){for(var l=new Uint32Array(16),c=0;c<16;++c)l[c]=e[64*a+4*c]<<24|e[64*a+4*c+1]<<16|e[64*a+4*c+2]<<8|e[64*a+4*c+3];s[a]=l}s[i-1][14]=8*(e.length-1)/Math.pow(2,32),s[i-1][14]=Math.floor(s[i-1][14]),s[i-1][15]=8*(e.length-1)&4294967295;for(var u=0;u<i;++u){for(var d=new Uint32Array(80),h=0;h<16;++h)d[h]=s[u][h];for(var f=16;f<80;++f)d[f]=eo(d[f-3]^d[f-8]^d[f-14]^d[f-16],1);for(var p=n[0],m=n[1],g=n[2],y=n[3],v=n[4],b=0;b<80;++b){var x=Math.floor(b/20),w=eo(p,5)+Zr(x,m,g,y)+v+t[x]+d[b]>>>0;v=y,y=g,g=eo(m,30)>>>0,m=p,p=w}n[0]=n[0]+p>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+v>>>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]]})),no=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||Lr,s=void 0!==e.clockseq?e.clockseq:$r;if(null==i||null==s){var a=e.random||(e.rng||Nr)();null==i&&(i=Lr=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=$r=16383&(a[6]<<8|a[7]))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Vr+1,u=l-zr+(c-Vr)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||l>zr)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");zr=l,Vr=c,$r=s;var d=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var h=l/4294967296*1e4&268435455;o[r++]=h>>>8&255,o[r++]=255&h,o[r++]=h>>>24&15|16,o[r++]=h>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var f=0;f<6;++f)o[r+f]=i[f];return t||qr(o)},v3:Jr,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||Nr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return qr(r)},v5:to,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!Rr(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:Rr,stringify:qr,parse:Br});const ro=["debug","info","warn","error","none"];var oo={commonBasicLogger:function(e,t){if(e&&e.destination&&"function"!=typeof e.destination)throw new Error("destination for basicLogger was set to a non-function");function n(e){return function(e){console&&console}}const r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n(),n(),n(),n()],o=!(!e||!e.destination),i=e&&null!=e.prefix?e.prefix:"[LaunchDarkly] ";let s=1;if(e&&e.level)for(let c=0;c<ro.length;c++)ro[c]===e.level&&(s=c);function a(e,n,s){if(s.length<1)return;let a;const l=o?n+": "+i:i;if(1!==s.length&&t){const e=[...s];e[0]=l+e[0],a=t(...e)}else a=l+s[0];try{r[e](a)}catch(c){console&&console}}const l={};for(let c=0;c<ro.length;c++){const e=ro[c];if("none"!==e)if(c<s)l[e]=()=>{};else{const t=c;l[e]=function(){a(t,e,arguments)}}}return l},validateLogger:function(e){ro.forEach((t=>{if("none"!==t&&(!e[t]||"function"!=typeof e[t]))throw new Error("Provided logger instance must support logger."+t+"(...) method")}))}};function io(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}const so=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initialize-the-client for instructions on SDK initialization.";var ao=function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},lo=function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+so},co=function(){return"LaunchDarkly client initialized"},uo=function(e){return'enqueueing "'+e+'" event'},ho=function(e){return"sending diagnostic event ("+e.kind+")"},fo=function(e){return"sending "+e+" events"},po=function(e){return'received streaming deletion for flag "'+e+'"'},mo=function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},go=function(e){return'received streaming update for flag "'+e+'"'},yo=function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},vo=function(){return"received ping message from stream"},bo=function(e){return"polling for feature flags at "+e},xo=function(){return"received streaming update for all flags"},wo=function(e,t){return t?'"'+e+'" is deprecated, please use "'+t+'"':'"'+e+'" is deprecated'},So=function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+so},ko=function(){return"No environment/client-side ID was specified."+so},Co=function(e){return"Error fetching flag settings: "+io(e)},Eo=function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},Po=function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},Do=function(e,t,n){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+t+" - "+(gr.isHttpErrorRecoverable(e)?n:"giving up permanently")},jo=function(){return"Cannot make HTTP requests in this environment."+so},To=function(){return"identify() has no effect here; it must be called on the main client instance"},Mo=(e,t)=>`an inspector: "${t}" of type: "${e}" generated an exception`,Oo=function(e){return'Expected application/json content type but got "'+e+'"'},Ao=function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},No=(e,t)=>`an inspector: "${t}" of an invalid type (${e}) was configured`,_o=e=>`The track function was called with a non-numeric "metricValue" (${e}), only numeric metric values are supported.`,Ro=function(){return"Invalid context specified."+so},Lo=e=>`Config option "${e}" must only contain letters, numbers, ., _ or -.`,$o=function(e){return"local storage is unavailable: "+io(e)},Fo=e=>"network error"+(e?" ("+e+")":""),Io=(e,t,n)=>'Config option "'+e+'" was set to '+t+", changing to minimum value of "+n,qo=function(){return"Closing stream connection"},zo=function(e){return"Opening stream connection to "+e},Vo=function(e,t){return"Error on stream connection: "+io(e)+", will continue retrying after "+t+" milliseconds."},Bo=e=>`Value of "${e}" was longer than 64 characters and was discarded.`,Uo=function(e){return'Custom event "'+e+'" does not exist'},Ko=e=>'Ignoring unknown config option "'+e+'"',Ho=function(){return"No context specified."+so},Wo=e=>`Error on stream connection ${io(e)}, giving up permanently`,Go=(e,t,n)=>'Config option "'+e+'" should be of type '+t+", got "+n+", using default value",Yo=(e,t)=>'Config option "'+e+'" should be a boolean, got '+t+", converting to boolean";const{validateLogger:Qo}=oo,Xo={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},application:{validator:function(e,t,n){const r={};return t.id&&(r.id=ei(`${e}.id`,t.id,n)),t.version&&(r.version=ei(`${e}.version`,t.version,n)),r}},inspectors:{default:[]}},Jo=/^(\w|\.|-)+$/;function Zo(e){return e&&e.replace(/\/+$/,"")}function ei(e,t,n){if("string"==typeof t&&t.match(Jo)){if(!(t.length>64))return t;n.warn(Bo(e))}else n.warn(Lo(e))}var ti={baseOptionDefs:Xo,validate:function(e,t,n,r){const o=Or.extend({logger:{default:r}},Xo,n),i={};function s(e){Or.onNextTick((()=>{t&&t.maybeReportError(new gr.LDInvalidArgumentError(e))}))}let a=Or.extend({},e||{});return function(e){const t=e;Object.keys(i).forEach((e=>{if(void 0!==t[e]){const n=i[e];r&&r.warn(wo(e,n)),n&&(void 0===t[n]&&(t[n]=t[e]),delete t[e])}}))}(a),a=function(e){const t=Or.extend({},e);return Object.keys(o).forEach((e=>{null!=t[e]||(t[e]=o[e]&&o[e].default)})),t}(a),a=function(e){const t=Or.extend({},e),n=e=>{if(null===e)return"any";if(void 0===e)return;if(Array.isArray(e))return"array";const t=typeof e;return"boolean"===t||"string"===t||"number"===t||"function"===t?t:"object"};return Object.keys(e).forEach((i=>{const a=e[i];if(null!=a){const l=o[i];if(void 0===l)s(Ko(i));else{const o=l.type||n(l.default),c=l.validator;if(c){const n=c(i,e[i],r);void 0!==n?t[i]=n:delete t[i]}else if("any"!==o){const e=o.split("|"),r=n(a);e.indexOf(r)<0?"boolean"===o?(t[i]=!!a,s(Yo(i,r))):(s(Go(i,o,r)),t[i]=l.default):"number"===r&&void 0!==l.minimum&&a<l.minimum&&(s(Io(i,a,l.minimum)),t[i]=l.minimum)}}}})),t.baseUrl=Zo(t.baseUrl),t.streamUrl=Zo(t.streamUrl),t.eventsUrl=Zo(t.eventsUrl),t}(a),Qo(a.logger),a},getTags:function(e){const t={};return e&&(e.application&&null!=e.application.id&&(t["application-id"]=[e.application.id]),e.application&&void 0!==e.application.version&&null!==e.application.id&&(t["application-version"]=[e.application.version])),t}};const{getLDUserAgentString:ni}=Or;var ri={getLDHeaders:function(e,t){if(t&&!t.sendLDHeaders)return{};const n={};n[e.userAgentHeaderName||"User-Agent"]=ni(e),t&&t.wrapperName&&(n["X-LaunchDarkly-Wrapper"]=t.wrapperVersion?t.wrapperName+"/"+t.wrapperVersion:t.wrapperName);const r=ti.getTags(t),o=Object.keys(r);return o.length&&(n["x-launchdarkly-tags"]=o.sort().map((e=>Array.isArray(r[e])?r[e].sort().map((t=>`${e}/${t}`)):[`${e}/${r[e]}`])).reduce(((e,t)=>e.concat(t)),[]).join(" ")),n},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};const{v1:oi}=no,{getLDHeaders:ii,transformHeaders:si}=ri;var ai=function(e,t,n){const r=Or.extend({"Content-Type":"application/json"},ii(e,n)),o={sendEvents:(t,o,i)=>{if(!e.httpRequest)return Promise.resolve();const s=JSON.stringify(t),a=i?null:oi();return function t(l){const c=i?r:Or.extend({},r,{"X-LaunchDarkly-Event-Schema":"4","X-LaunchDarkly-Payload-ID":a});return e.httpRequest("POST",o,si(c,n),s).promise.then((e=>{if(e)return e.status>=400&&gr.isHttpErrorRecoverable(e.status)&&l?t(!1):function(e){const t={status:e.status},n=e.header("date");if(n){const e=Date.parse(n);e&&(t.serverTime=e)}return t}(e)})).catch((()=>l?t(!1):Promise.reject()))}(!0).catch((()=>{}))}};return o};const{commonBasicLogger:li}=oo;function ci(e){return"string"==typeof e&&"kind"!==e&&e.match(/^(\w|\.|-)+$/)}var ui={checkContext:function(e,t){if(e){if(t&&null==e.kind)return null!=e.key;const n=e.key,r=void 0===e.kind?"user":e.kind,o=ci(r),i="multi"===r||null!=n&&""!==n;if("multi"===r){const t=Object.keys(e).filter((e=>"kind"!==e));return i&&t.every((e=>ci(e)))&&t.every((t=>{const n=e[t].key;return null!=n&&""!==n}))}return i&&o}return!1},getContextKeys:function(e,t=li()){if(!e)return;const n={},{kind:r,key:o}=e;switch(r){case void 0:n.user=`${o}`;break;case"multi":Object.entries(e).filter((([e])=>"kind"!==e)).forEach((([e,t])=>{t&&t.key&&(n[e]=t.key)}));break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case"":t.warn(`'' is not a valid context kind: ${e}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(e){return e?null==e.kind?["user"]:"multi"!==e.kind?[e.kind]:Object.keys(e).filter((e=>"kind"!==e)):[]}};const{getContextKinds:di}=ui;function hi(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function fi(e){return(e.startsWith("/")?e.substring(1):e).split("/").map((e=>e.indexOf("~")>=0?e.replace(/~1/g,"/").replace(/~0/g,"~"):e))}function pi(e){return!e.startsWith("/")}function mi(e,t){const n=pi(e),r=pi(t);if(n&&r)return e===t;if(n){const n=fi(t);return 1===n.length&&e===n[0]}if(r){const n=fi(e);return 1===n.length&&t===n[0]}return e===t}function gi(e){return`/${hi(e)}`}var yi={cloneExcluding:function(e,t){const n=[],r={},o=[];for(n.push(...Object.keys(e).map((t=>({key:t,ptr:gi(t),source:e,parent:r,visited:[e]}))));n.length;){const e=n.pop();if(t.some((t=>mi(t,e.ptr))))o.push(e.ptr);else{const t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if("object"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},n.push(...Object.keys(t).map((n=>{return{key:n,ptr:(r=e.ptr,o=hi(n),`${r}/${o}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]};var r,o})))}else e.parent[e.key]=t}}return{cloned:r,excluded:o.sort()}},compare:mi,literalToReference:gi};const{getContextKeys:vi}=ui;var bi=function(e,t,n,r=null,o=null,i=null){const s={},a=i||ai(e,0,t),l=Or.appendUrlPath(t.eventsUrl,"/events/bulk/"+n),c=function(){const e={};let t=0,n=0,r={},o={};return e.summarizeEvent=e=>{if("feature"===e.kind){const s=e.key+":"+(null!=e.variation?e.variation:"")+":"+(null!=e.version?e.version:""),a=r[s];let l=o[e.key];l||(l=new Set,o[e.key]=l),(i=e,i.context?di(i.context):i.contextKeys?Object.keys(i.contextKeys):[]).forEach((e=>l.add(e))),a?a.count=a.count+1:r[s]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDate<t)&&(t=e.creationDate),e.creationDate>n&&(n=e.creationDate)}var i},e.getSummary=()=>{const e={};let i=!0;for(const t of Object.values(r)){let n=e[t.key];n||(n={default:t.default,counters:[],contextKinds:[...o[t.key]]},e[t.key]=n);const r={value:t.value,count:t.count};null!=t.variation&&(r.variation=t.variation),null!=t.version?r.version=t.version:r.unknown=!0,n.counters.push(r),i=!1}return i?null:{startDate:t,endDate:n,features:e}},e.clearSummary=()=>{t=0,n=0,r={},o={}},e}(),u=function(e){const t={},n=e.allAttributesPrivate,r=e.privateAttributes||[],o=["key","kind","_meta","anonymous"],i=["name","ip","firstName","lastName","email","avatar","country"],s=(e,t)=>{if("object"!=typeof e||null===e||Array.isArray(e))return;const{cloned:i,excluded:s}=yi.cloneExcluding(e,(a=e,(n||t&&a.anonymous?Object.keys(a):[...r,...a._meta&&a._meta.privateAttributes||[]]).filter((e=>!o.some((t=>yi.compare(e,t)))))));var a;return i.key=String(i.key),s.length&&(i._meta||(i._meta={}),i._meta.redactedAttributes=s),i._meta&&(delete i._meta.privateAttributes,0===Object.keys(i._meta).length&&delete i._meta),void 0!==i.anonymous&&(i.anonymous=!!i.anonymous),i};return t.filter=(e,t=!1)=>null==e.kind?s((e=>{const t={...e.custom||{},kind:"user",key:e.key};void 0!==e.anonymous&&(t.anonymous=!!e.anonymous);for(const n of i)delete t[n],null!=e[n]&&(t[n]=String(e[n]));return null!=e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map((e=>e.startsWith("/")?yi.literalToReference(e):e))),t})(e),t):"multi"===e.kind?((e,t)=>{const n={kind:e.kind},r=Object.keys(e);for(const o of r)if("kind"!==o){const r=s(e[o],t);r&&(n[o]=r)}return n})(e,t):s(e,t),t}(t),d=t.samplingInterval,h=t.eventCapacity,f=t.flushInterval,p=t.logger;let m,g=[],y=0,v=!1,b=!1;function x(){return 0===d||0===Math.floor(Math.random()*d)}function w(e){g.length<h?(g.push(e),b=!1):(b||(b=!0,p.warn(Eo())),r&&r.incrementDroppedEvents())}return s.enqueue=function(e){if(v)return;let t=!1,n=!1;var r;if(c.summarizeEvent(e),"feature"===e.kind?x()&&(t=!!e.trackEvents,n=!!(r=e).debugEventsUntilDate&&r.debugEventsUntilDate>y&&r.debugEventsUntilDate>(new Date).getTime()):t=x(),t&&w(function(e){const t=Or.extend({},e);return"identify"===e.kind?t.context=u.filter(e.context):"feature"===e.kind?t.context=u.filter(e.context,!0):(t.contextKeys=vi(e.context,p),delete t.context),"feature"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t}(e)),n){const t=Or.extend({},e,{kind:"debug"});t.context=u.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,w(t)}},s.flush=function(){if(v)return Promise.resolve();const e=g,t=c.getSummary();return c.clearSummary(),t&&(t.kind="summary",e.push(t)),r&&r.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(g=[],p.debug(fo(e.length)),a.sendEvents(e,l).then((e=>{e&&(e.serverTime&&(y=e.serverTime),gr.isHttpErrorRecoverable(e.status)||(v=!0),e.status>=400&&Or.onNextTick((()=>{o.maybeReportError(new gr.LDUnexpectedResponseError(Do(e.status,"event posting","some events were dropped")))})))})))},s.start=function(){const e=()=>{s.flush(),m=setTimeout(e,f)};m=setTimeout(e,f)},s.stop=function(){clearTimeout(m)},s};const xi="ready",wi="initialized",Si="failed";const{appendUrlPath:ki,base64URLEncode:Ci,objectHasOwnProperty:Ei}=Or,{getLDHeaders:Pi,transformHeaders:Di}=ri,{isHttpErrorRecoverable:ji}=gr;var Ti=function(e,t,n,r){const o=t.streamUrl,i=t.logger,s={},a=ki(o,"/eval/"+n),l=t.useReport,c=t.evaluationReasons,u=t.streamReconnectDelay,d=Pi(e,t);let h,f=!1,p=null,m=null,g=null,y=null,v=null,b=0;function x(e){if(e.status&&"number"==typeof e.status&&!ji(e.status))return k(),i.error(Wo(e)),void(m&&(clearTimeout(m),m=null));const t=function(){const e=(t=function(){const e=u*Math.pow(2,b);return e>3e4?3e4:e}())-Math.trunc(.5*Math.random()*t);var t;return b+=1,e}();f||(i.warn(Vo(e,t)),f=!0),C(!1),k(),w(t)}function w(e){m||(e?m=setTimeout(S,e):S())}function S(){let r;m=null;let s="";const u={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){null!=y&&(s="h="+y),l?e.eventSourceAllowsReport?(r=a,u.method="REPORT",u.headers["Content-Type"]="application/json",u.body=JSON.stringify(g)):(r=ki(o,"/ping/"+n),s=""):r=a+"/"+Ci(JSON.stringify(g)),u.headers=Di(u.headers,t),c&&(s=s+(s?"&":"")+"withReasons=true"),r=r+(s?"?":"")+s,k(),i.info(zo(r)),h=(new Date).getTime(),p=e.eventSourceFactory(r,u);for(const e in v)Ei(v,e)&&p.addEventListener(e,v[e]);p.onerror=x,p.onopen=()=>{b=0}}}function k(){p&&(i.info(qo()),p.close(),p=null)}function C(e){h&&r&&r.recordStreamInit(h,!e,(new Date).getTime()-h),h=null}return s.connect=function(e,t,n){g=e,y=t,v={};for(const r in n||{})v[r]=function(e){f=!1,C(!0),n[r]&&n[r](e)};w()},s.disconnect=function(){clearTimeout(m),m=null,k()},s.isConnected=function(){return!!(p&&e.eventSourceIsActive&&e.eventSourceIsActive(p))},s};const{transformHeaders:Mi,getLDHeaders:Oi}=ri,Ai="application/json";var Ni=function(e,t,n){const r=t.baseUrl,o=t.useReport,i=t.evaluationReasons,s=t.logger,a={},l={};function c(n,r){if(!e.httpRequest)return new Promise(((e,t)=>{t(new gr.LDFlagFetchError(jo()))}));const o=r?"REPORT":"GET",i=Oi(e,t);r&&(i["Content-Type"]=Ai);let s=l[n];s||(s=function(e){let t,n,r,o;const i={addPromise:(i,s)=>{t=i,n&&n(),n=s,i.then((n=>{t===i&&(r(n),e&&e())}),(n=>{t===i&&(o(n),e&&e())}))}};return i.resultPromise=new Promise(((e,t)=>{r=e,o=t})),i}((()=>{delete l[n]})),l[n]=s);const a=e.httpRequest(o,n,Mi(i,t),r),c=a.promise.then((e=>{if(200===e.status){if(e.header("content-type")&&e.header("content-type").substring(0,16)===Ai)return JSON.parse(e.body);{const t=Oo(e.header("content-type")||"");return Promise.reject(new gr.LDFlagFetchError(t))}}return Promise.reject(404===(t=e).status?new gr.LDInvalidEnvironmentIdError(So()):new gr.LDFlagFetchError(Co(t.statusText||String(t.status))));var t}),(e=>Promise.reject(new gr.LDFlagFetchError(Fo(e)))));return s.addPromise(c,(()=>{a.cancel&&a.cancel()})),s.resultPromise}return a.fetchJSON=function(e){return c(Or.appendUrlPath(r,e),null)},a.fetchFlagSettings=function(e,t){let a,l,u,d="";return o?(l=[r,"/sdk/evalx/",n,"/context"].join(""),u=JSON.stringify(e)):(a=Or.base64URLEncode(JSON.stringify(e)),l=[r,"/sdk/evalx/",n,"/contexts/",a].join("")),t&&(d="h="+t),i&&(d=d+(d?"&":"")+"withReasons=true"),l=l+(d?"?":"")+d,s.debug(bo(l)),c(l,u)},a};const{v1:_i}=no,{getContextKinds:Ri}=ui;var Li=function(e){function t(e){return null==e||"user"===e?"ld:$anonUserId":`ld:$contextKey:${e}`}function n(n,r){return null!=r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?(o=n,e.get(t(o))).then((o=>{if(o)return r.key=o,r;{const o=_i();return r.key=o,function(n,r){return e.set(t(r),n)}(o,n).then((()=>r))}})):Promise.reject(new gr.LDInvalidUserError(Ro()));var o}this.processContext=e=>{if(!e)return Promise.reject(new gr.LDInvalidUserError(Ho()));const t=Or.clone(e);if("multi"===e.kind){const e=Ri(t);return Promise.all(e.map((e=>n(e,t[e])))).then((()=>t))}return n(e.kind,t)}};const{v1:$i}=no,{baseOptionDefs:Fi}=ti,{appendUrlPath:Ii}=Or;var qi=function(e){const t={diagnosticId:$i()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},zi=function(e){let t,n,r,o;function i(e){t=e,n=0,r=0,o=[]}return i(e),{getProps:()=>({dataSinceDate:t,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:e=>{t=e.dataSinceDate,n=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:e=>{r=e},recordStreamInit:(e,t,n)=>{o.push({timestamp:e,failed:t,durationMillis:n})},reset:i}},Vi=function(e,t,n,r,o,i,s){const a=!!e.diagnosticUseCombinedEvent,l="ld:"+o+":$diagnostics",c=Ii(i.eventsUrl,"/events/diagnostic/"+o),u=i.diagnosticRecordingInterval,d=n;let h,f,p=!!i.streaming;const m={};function g(){return{sdk:b(),configuration:{customBaseURI:i.baseUrl!==Fi.baseUrl.default,customStreamURI:i.streamUrl!==Fi.streamUrl.default,customEventsURI:i.eventsUrl!==Fi.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!p,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation},platform:e.diagnosticPlatformData}}function y(e){i.logger&&i.logger.debug(ho(e)),r.sendEvents(e,c,!0).then((()=>{})).catch((()=>{}))}function v(){y(function(){const e=(new Date).getTime();let t={kind:a?"diagnostic-combined":"diagnostic",id:s,creationDate:e,...d.getProps()};return a&&(t={...t,...g()}),d.reset(e),t}()),f=setTimeout(v,u),h=(new Date).getTime(),a&&function(){if(t.isEnabled()){const e={...d.getProps()};t.set(l,JSON.stringify(e))}}()}function b(){const t={...e.diagnosticSdkData};return i.wrapperName&&(t.wrapperName=i.wrapperName),i.wrapperVersion&&(t.wrapperVersion=i.wrapperVersion),t}return m.start=()=>{a?function(e){if(!t.isEnabled())return e(!1);t.get(l).then((t=>{if(t)try{const e=JSON.parse(t);d.setProps(e),h=e.dataSinceDate}catch(n){}e(!0)})).catch((()=>{e(!1)}))}((e=>{if(e){const e=(h||0)+u,t=(new Date).getTime();t>=e?v():f=setTimeout(v,e-t)}else 0===Math.floor(4*Math.random())?v():f=setTimeout(v,u)})):(y({kind:"diagnostic-init",id:s,creationDate:d.getProps().dataSinceDate,...g()}),f=setTimeout(v,u))},m.stop=()=>{f&&clearTimeout(f)},m.setStreaming=e=>{p=e},m};const{onNextTick:Bi}=Or,Ui={flagUsed:"flag-used",flagDetailsChanged:"flag-details-changed",flagDetailChanged:"flag-detail-changed",clientIdentityChanged:"client-identity-changed"};Object.freeze(Ui);var Ki={InspectorTypes:Ui,InspectorManager:function(e,t){const n={},r={[Ui.flagUsed]:[],[Ui.flagDetailsChanged]:[],[Ui.flagDetailChanged]:[],[Ui.clientIdentityChanged]:[]},o={[Ui.flagUsed]:[],[Ui.flagDetailsChanged]:[],[Ui.flagDetailChanged]:[],[Ui.clientIdentityChanged]:[]},i=e&&e.map((e=>function(e,t){let n=!1;const r={type:e.type,name:e.name,synchronous:e.synchronous,method:(...o)=>{try{e.method(...o)}catch{n||(n=!0,t.warn(Mo(r.type,r.name)))}}};return r}(e,t)));return i&&i.forEach((e=>{Object.prototype.hasOwnProperty.call(r,e.type)&&!e.synchronous?r[e.type].push(e):Object.prototype.hasOwnProperty.call(o,e.type)&&e.synchronous?o[e.type].push(e):t.warn(No(e.type,e.name))})),n.hasListeners=e=>r[e]&&r[e].length||o[e]&&o[e].length,n.onFlagUsed=(e,t,n)=>{const i=Ui.flagUsed;o[i].length&&o[i].forEach((r=>r.method(e,t,n))),r[i].length&&Bi((()=>{r[i].forEach((r=>r.method(e,t,n)))}))},n.onFlags=e=>{const t=Ui.flagDetailsChanged;o[t].length&&o[t].forEach((t=>t.method(e))),r[t].length&&Bi((()=>{r[t].forEach((t=>t.method(e)))}))},n.onFlagChanged=(e,t)=>{const n=Ui.flagDetailChanged;o[n].length&&o[n].forEach((n=>n.method(e,t))),r[n].length&&Bi((()=>{r[n].forEach((n=>n.method(e,t)))}))},n.onIdentityChanged=e=>{const t=Ui.clientIdentityChanged;o[t].length&&o[t].forEach((t=>t.method(e))),r[t].length&&Bi((()=>{r[t].forEach((t=>t.method(e)))}))},n}};const{LDTimeoutError:Hi}=gr;const{commonBasicLogger:Wi}=oo,{checkContext:Gi}=ui,{InspectorTypes:Yi,InspectorManager:Qi}=Ki,Xi="change",Ji="internal-change";var Zi={initialize:function(e,t,n,r,o){const i=n&&n.logger?n.logger:o&&o.logger&&o.logger.default||Wi("warn"),s=function(e){const t={},n={};return t.on=function(e,t,r){n[e]=n[e]||[],n[e]=n[e].concat({handler:t,context:r})},t.off=function(e,t,r){if(n[e])for(let o=0;o<n[e].length;o++)n[e][o].handler===t&&n[e][o].context===r&&(n[e]=n[e].slice(0,o).concat(n[e].slice(o+1)))},t.emit=function(e){if(!n[e])return;const t=n[e].slice(0);for(let n=0;n<t.length;n++)t[n].handler.apply(t[n].context,Array.prototype.slice.call(arguments,1))},t.getEvents=function(){return Object.keys(n)},t.getEventListenerCount=function(e){return n[e]?n[e].length:0},t.maybeReportError=function(t){t&&(n.error?this.emit("error",t):(e||console).error(t.message))},t}(i),a=function(e){let t=!1,n=!1,r=null,o=null;const i=new Promise((t=>{const n=()=>{e.off(xi,n),t()};e.on(xi,n)})).catch((()=>{}));return{getInitializationPromise:()=>o||(t?Promise.resolve():n?Promise.reject(r):(o=new Promise(((t,n)=>{const r=()=>{e.off(wi,r),t()},o=t=>{e.off(Si,o),n(t)};e.on(wi,r),e.on(Si,o)})),o)),getReadyPromise:()=>i,signalSuccess:()=>{t||n||(t=!0,e.emit(wi),e.emit(xi))},signalFailure:o=>{t||n||(n=!0,r=o,e.emit(Si,o),e.emit(xi)),e.maybeReportError(o)}}}(s),l=ti.validate(n,s,o,i),c=Qi(l.inspectors,i),u=l.sendEvents;let d=e,h=l.hash;const f=function(e,t){const n={};let r=!1;const o=e=>{r||(r=!0,t.warn($o(e)))};return n.isEnabled=()=>!!e,n.get=t=>new Promise((n=>{e?e.get(t).then(n).catch((e=>{o(e),n(void 0)})):n(void 0)})),n.set=(t,n)=>new Promise((r=>{e?e.set(t,n).then((()=>r(!0))).catch((e=>{o(e),r(!1)})):r(!1)})),n.clear=t=>new Promise((n=>{e?e.clear(t).then((()=>n(!0))).catch((e=>{o(e),n(!1)})):n(!1)})),n}(r.localStorage,i),p=ai(r,0,l),m=l.sendEvents&&!l.diagnosticOptOut,g=m?qi(d):null,y=m?zi((new Date).getTime()):null,v=m?Vi(r,f,y,p,d,l,g):null,b=Ti(r,l,d,y),x=l.eventProcessor||bi(r,l,d,y,s,p),w=Ni(r,l,d);let S,k,C,E={},P=l.streaming,D=!1,j=!1,T=!0;const M=l.stateProvider,O=function(e,t){const n={};let r;return n.setContext=function(e){r=Or.sanitizeContext(e),r&&t&&t(Or.clone(r))},n.getContext=function(){return r?Or.clone(r):null},n}(0,(function(e){var t;t=e,M||t&&_({kind:"identify",context:t,creationDate:(new Date).getTime()}),c.hasListeners(Yi.clientIdentityChanged)&&c.onIdentityChanged(O.getContext())})),A=new Li(f),N=f.isEnabled()?function(e,t,n,r){const o={};function i(){let e="";const o=r.getContext();return o&&(e=n||Or.btoa(JSON.stringify(o))),"ld:"+t+":"+e}return o.loadFlags=()=>e.get(i()).then((e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){const e=t.$schema;void 0===e||e<1?t=Or.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(t){return o.clearFlags().then((()=>null))}})),o.saveFlags=t=>{const n=Or.extend({},t,{$schema:1});return e.set(i(),JSON.stringify(n))},o.clearFlags=()=>e.clear(i()),o}(f,d,h,O):null;function _(e){d&&(M&&M.enqueueEvent&&M.enqueueEvent(e)||(e.context?(T=!1,!u||j||r.isDoNotTrack()||(i.debug(uo(e.kind)),x.enqueue(e))):T&&(i.warn(Po()),T=!1)))}function R(e,t){c.hasListeners(Yi.flagDetailChanged)&&c.onFlagChanged(e.key,q(t))}function L(){c.hasListeners(Yi.flagDetailsChanged)&&c.onFlags(Object.entries(E).map((([e,t])=>({key:e,detail:q(t)}))).reduce(((e,t)=>(e[t.key]=t.detail,e)),{}))}function $(e,t,n,r){const o={kind:"feature",key:e,context:O.getContext(),value:t?t.value:null,variation:t?t.variationIndex:null,default:n,creationDate:(new Date).getTime()},i=E[e];i&&(o.version=i.flagVersion?i.flagVersion:i.version,o.trackEvents=i.trackEvents,o.debugEventsUntilDate=i.debugEventsUntilDate),(r||i&&i.trackReason)&&t&&(o.reason=t.reason),_(o)}function F(e){return Gi(e,!1)?Promise.resolve(e):Promise.reject(new gr.LDInvalidUserError(Ro()))}function I(e,t,n,r,o,i){let s,a;return E&&Or.objectHasOwnProperty(E,e)&&E[e]&&!E[e].deleted?(a=E[e],s=q(a),null!=a.value||(s.value=t)):s={value:t,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}},n&&(o||a?.prerequisites?.forEach((e=>{I(e,void 0,n,!1,!1,!1)})),$(e,s,t,r)),!o&&i&&(l=e,u=s,c.hasListeners(Yi.flagUsed)&&c.onFlagUsed(l,u,O.getContext())),s;var l,u}function q(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function z(){if(k=!0,!O.getContext())return;const e=e=>{try{return JSON.parse(e)}catch(t){return void s.maybeReportError(new gr.LDInvalidDataError(Ao()))}};b.connect(O.getContext(),h,{ping:function(){i.debug(vo());const e=O.getContext();w.fetchFlagSettings(e,h).then((t=>{Or.deepEquals(e,O.getContext())&&B(t||{})})).catch((e=>{s.maybeReportError(new gr.LDFlagFetchError(Co(e)))}))},put:function(t){const n=e(t.data);n&&(i.debug(xo()),B(n))},patch:function(t){const n=e(t.data);if(!n)return;const r=E[n.key];if(!r||!r.version||!n.version||r.version<n.version){i.debug(go(n.key));const e={},t=Or.extend({},n);delete t.key,E[n.key]=t;const o=q(t);e[n.key]=r?{previous:r.value,current:o}:{current:o},R(n,t),U(e)}else i.debug(yo(n.key))},delete:function(t){const n=e(t.data);if(n)if(!E[n.key]||E[n.key].version<n.version){i.debug(po(n.key));const e={};E[n.key]&&!E[n.key].deleted&&(e[n.key]={previous:E[n.key].value}),E[n.key]={version:n.version,deleted:!0},R(n,E[n.key]),U(e)}else i.debug(mo(n.key))}})}function V(){k&&(b.disconnect(),k=!1)}function B(e){const t={};if(!e)return Promise.resolve();for(const n in E)Or.objectHasOwnProperty(E,n)&&E[n]&&(e[n]&&!Or.deepEquals(e[n].value,E[n].value)?t[n]={previous:E[n].value,current:q(e[n])}:e[n]&&!e[n].deleted||(t[n]={previous:E[n].value}));for(const n in e)Or.objectHasOwnProperty(e,n)&&e[n]&&(!E[n]||E[n].deleted)&&(t[n]={current:q(e[n])});return E={...e},L(),U(t).catch((()=>{}))}function U(e){const t=Object.keys(e);if(t.length>0){const n={};t.forEach((t=>{const r=e[t].current,o=r?r.value:void 0,i=e[t].previous;s.emit(Xi+":"+t,o,i),n[t]=r?{current:o,previous:i}:{previous:i}})),s.emit(Xi,n),s.emit(Ji,E),l.sendEventsOnlyForVariation||M||t.forEach((t=>{$(t,e[t].current)}))}return S&&N?N.saveFlags(E):Promise.resolve()}function K(){const e=P||C&&void 0===P;e&&!k?z():!e&&k&&V(),v&&v.setStreaming(e)}function H(e){return e===Xi||e.substr(0,7)===Xi+":"}if("string"==typeof l.bootstrap&&"LOCALSTORAGE"===l.bootstrap.toUpperCase()&&(N?S=!0:i.warn($o())),"object"==typeof l.bootstrap&&(E=function(e){const t=Object.keys(e),n="$flagsState",r="$valid",o=e[n];!o&&t.length&&i.warn(lo()),!1===e[r]&&i.warn(ao());const s={};return t.forEach((t=>{if(t!==n&&t!==r){let n={value:e[t]};o&&o[t]?n=Or.extend(n,o[t]):n.version=0,s[t]=n}})),s}(l.bootstrap)),M){const e=M.getInitialState();e?W(e):M.on("init",W),M.on("update",(function(e){e.context&&O.setContext(e.context),e.flags&&B(e.flags)}))}else(e?A.processContext(t).then(F).then((e=>(O.setContext(e),"object"==typeof l.bootstrap?G():S?N.loadFlags().then((e=>null==e?(E={},w.fetchFlagSettings(O.getContext(),h).then((e=>B(e||{}))).then(G).catch((e=>{Y(new gr.LDFlagFetchError(Co(e)))}))):(E=e,Or.onNextTick(G),w.fetchFlagSettings(O.getContext(),h).then((e=>B(e))).catch((e=>s.maybeReportError(e)))))):w.fetchFlagSettings(O.getContext(),h).then((e=>{E=e||{},L(),G()})).catch((e=>{E={},Y(e)}))))):Promise.reject(new gr.LDInvalidEnvironmentIdError(ko()))).catch(Y);function W(e){d=e.environment,O.setContext(e.context),E={...e.flags},Or.onNextTick(G)}function G(){i.info(co()),D=!0,K(),a.signalSuccess()}function Y(e){a.signalFailure(e)}const Q={waitForInitialization:function(e=void 0){if(null!=e){if("number"==typeof e)return function(e){e>5&&i.warn("The waitForInitialization function was called with a timeout greater than 5 seconds. We recommend a timeout of 5 seconds or less.");const t=a.getInitializationPromise(),n=function(e,t){return new Promise(((n,r)=>{setTimeout((()=>{r(new Hi(`${t} timed out after ${e} seconds.`))}),1e3*e)}))}(e,"waitForInitialization");return Promise.race([n,t]).catch((e=>{throw e instanceof gr.LDTimeoutError&&i.error(`waitForInitialization error: ${e}`),e}))}(e);i.warn("The waitForInitialization method was provided with a non-numeric timeout.")}return i.warn("The waitForInitialization function was called without a timeout specified. In a future version a default timeout will be applied."),a.getInitializationPromise()},waitUntilReady:()=>a.getReadyPromise(),identify:function(e,t,n){if(j)return Or.wrapPromiseCallback(Promise.resolve({}),n);if(M)return i.warn(To()),Or.wrapPromiseCallback(Promise.resolve(Or.transformVersionedValuesToValues(E)),n);const r=S&&N?N.clearFlags():Promise.resolve();return Or.wrapPromiseCallback(r.then((()=>A.processContext(e))).then(F).then((e=>w.fetchFlagSettings(e,t).then((n=>{const r=Or.transformVersionedValuesToValues(n);return O.setContext(e),h=t,n?B(n).then((()=>r)):r})))).then((e=>(k&&z(),e))).catch((e=>(s.maybeReportError(e),Promise.reject(e)))),n)},getContext:function(){return O.getContext()},variation:function(e,t){return I(e,t,!0,!1,!1,!0).value},variationDetail:function(e,t){return I(e,t,!0,!0,!1,!0)},track:function(e,t,n){if("string"!=typeof e)return void s.maybeReportError(new gr.LDInvalidEventKeyError(Uo(e)));void 0!==n&&"number"!=typeof n&&i.warn(_o(typeof n)),r.customEventFilter&&!r.customEventFilter(e)&&i.warn(Uo(e));const o=O.getContext(),a={kind:"custom",key:e,context:o,url:r.getCurrentUrl(),creationDate:(new Date).getTime()};o&&o.anonymous&&(a.contextKind=o.anonymous?"anonymousUser":"user"),null!=t&&(a.data=t),null!=n&&(a.metricValue=n),_(a)},on:function(e,t,n){H(e)?(C=!0,D&&K(),s.on(e,t,n)):s.on(...arguments)},off:function(e){if(s.off(...arguments),H(e)){let e=!1;s.getEvents().forEach((t=>{H(t)&&s.getEventListenerCount(t)>0&&(e=!0)})),e||(C=!1,k&&void 0===P&&V())}},setStreaming:function(e){const t=null===e?void 0:e;t!==P&&(P=t,K())},flush:function(e){return Or.wrapPromiseCallback(u?x.flush():Promise.resolve(),e)},allFlags:function(){const e={};if(!E)return e;for(const t in E)Or.objectHasOwnProperty(E,t)&&!E[t].deleted&&(e[t]=I(t,null,!l.sendEventsOnlyForVariation,!1,!0,!1).value);return e},close:function(e){if(j)return Or.wrapPromiseCallback(Promise.resolve(),e);const t=()=>{j=!0,E={}},n=Promise.resolve().then((()=>{if(V(),v&&v.stop(),u)return x.stop(),x.flush()})).then(t).catch(t);return Or.wrapPromiseCallback(n,e)}};return{client:Q,options:l,emitter:s,ident:O,logger:i,requestor:w,start:function(){u&&(v&&v.start(),x.start())},enqueueEvent:_,getFlagsInternal:function(){return E},getEnvironmentId:()=>d,internalChangeEventName:Ji}},errors:gr},es=Zi.initialize,ts=Zi.errors;function ns(e,t,n){return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var r}function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function os(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach((function(t){ns(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var is={promise:Promise.resolve({status:200,header:function(){return null},body:null})};var ss=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")};function as(e,t,n,r){var o,i,s=("substring"!==e.kind&&"regex"!==e.kind||!r.includes("/")?t.replace(r,""):t).replace(n,"");switch(e.kind){case"exact":i=t,o=new RegExp("^"+ss(e.url)+"/?$");break;case"canonical":i=s,o=new RegExp("^"+ss(e.url)+"/?$");break;case"substring":i=s,o=new RegExp(".*"+ss(e.substring)+".*$");break;case"regex":i=s,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function ls(e,t){for(var n={},r=null,o=[],i=0;i<e.length;i++)for(var s=e[i],a=s.urls||[],l=0;l<a.length;l++)if(as(a[l],window.location.href,window.location.search,window.location.hash)){"pageview"===s.kind?t("pageview",s):(o.push(s),t("click_pageview",s));break}return o.length>0&&(r=function(e){for(var n=function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=e.target,i=t[r],s=document.querySelectorAll(i.selector);o&&s.length>0;){for(var a=0;a<s.length;a++)o===s[a]&&n.push(i);o=o.parentNode}return n}(e,o),r=0;r<n.length;r++)t("click",n[r])},document.addEventListener("click",r)),n.dispose=function(){document.removeEventListener("click",r)},n}var cs="goalsReady",us={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function ds(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(e){var t,n={userAgentHeaderName:"X-LaunchDarkly-User-Agent",synchronousFlush:!1};if(window.XMLHttpRequest){var r=e&&e.disableSyncEventPost;n.httpRequest=function(t,o,i,s){var a=n.synchronousFlush&!r;return n.synchronousFlush=!1,function(t,n,r,o,i){if(i&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var t=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(t)return parseInt(t[2],10)<73}return!0}())return is;var s,a=new window.XMLHttpRequest;for(var l in a.open(t,n,!i),r||{})Object.prototype.hasOwnProperty.call(r,l)&&a.setRequestHeader(l,r[l]);if(i){try{a.send(o)}catch(e){}return is}return{promise:new Promise((function(e,t){a.addEventListener("load",(function(){s||e({status:a.status,header:function(e){return a.getResponseHeader(e)},body:a.responseText})})),a.addEventListener("error",(function(){s||t(new Error)})),a.send(o)})),cancel:function(){s=!0,a.abort()}}}(t,o,i,s,a)}}n.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),t},n.httpFallbackPing=function(e){(new window.Image).src=e};var o,i=e&&e.eventUrlTransformer;n.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},n.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"yes"===e};try{window.localStorage&&(n.localStorage={get:function(e){return new Promise((function(t){t(window.localStorage.getItem(e))}))},set:function(e,t){return new Promise((function(n){window.localStorage.setItem(e,t),n()}))},clear:function(e){return new Promise((function(t){window.localStorage.removeItem(e),t()}))}})}catch(a){n.localStorage=null}if(e&&e.useReport&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(n.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(n.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var s=3e5;n.eventSourceFactory=function(e,t){var n=os(os({},{heartbeatTimeout:s,silentTimeout:s,skipDefaultHeaders:!0}),t);return new o(e,n)},n.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return n.userAgent="JSClient",n.version="3.5.0",n.diagnosticSdkData={name:"js-client-sdk",version:"3.5.0"},n.diagnosticPlatformData={name:"JS"},n.diagnosticUseCombinedEvent=!0,n}(n),o=es(e,t,n,r,us),i=o.client,s=o.options,a=o.emitter,l=new Promise((function(e){var t=a.on(cs,(function(){a.off(cs,t),e()}))}));i.waitUntilGoalsReady=function(){return l},s.fetchGoals?function(e,t){var n,r;function o(){r&&r.dispose(),n&&n.length&&(r=ls(n,i))}function i(t,n){var r=e.ident.getContext(),o={kind:t,key:n.key,data:null,url:window.location.href,creationDate:(new Date).getTime(),context:r};return"click"===t&&(o.selector=n.selector),e.enqueueEvent(o)}e.requestor.fetchJSON("/sdk/goals/"+e.getEnvironmentId()).then((function(e){e&&e.length>0&&(r=ls(n=e,i),function(e,t){var n,r=window.location.href;function o(){(n=window.location.href)!==r&&(r=n,t())}!function e(t,n){t(),setTimeout((function(){e(t,n)}),n)}(o,300),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o)}(0,o)),t()})).catch((function(n){e.emitter.maybeReportError(new ts.LDUnexpectedResponseError(n.message)),t()}))}(o,(function(){return a.emit(cs)})):a.emit(cs),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();var c=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1};return document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&c()})),window.addEventListener("pagehide",c),i}var hs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function fs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ps="[object Symbol]",ms=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ys="\\ud800-\\udfff",vs="\\u0300-\\u036f\\ufe20-\\ufe23",bs="\\u20d0-\\u20f0",xs="\\u2700-\\u27bf",ws="a-z\\xdf-\\xf6\\xf8-\\xff",Ss="A-Z\\xc0-\\xd6\\xd8-\\xde",ks="\\ufe0e\\ufe0f",Cs="\\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",Es="['’]",Ps="["+ys+"]",Ds="["+Cs+"]",js="["+vs+bs+"]",Ts="\\d+",Ms="["+xs+"]",Os="["+ws+"]",As="[^"+ys+Cs+Ts+xs+ws+Ss+"]",Ns="\\ud83c[\\udffb-\\udfff]",_s="[^"+ys+"]",Rs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ls="[\\ud800-\\udbff][\\udc00-\\udfff]",$s="["+Ss+"]",Fs="\\u200d",Is="(?:"+Os+"|"+As+")",qs="(?:"+$s+"|"+As+")",zs="(?:['’](?:d|ll|m|re|s|t|ve))?",Vs="(?:['’](?:D|LL|M|RE|S|T|VE))?",Bs="(?:"+js+"|"+Ns+")"+"?",Us="["+ks+"]?",Ks=Us+Bs+("(?:"+Fs+"(?:"+[_s,Rs,Ls].join("|")+")"+Us+Bs+")*"),Hs="(?:"+[Ms,Rs,Ls].join("|")+")"+Ks,Ws="(?:"+[_s+js+"?",js,Rs,Ls,Ps].join("|")+")",Gs=RegExp(Es,"g"),Ys=RegExp(js,"g"),Qs=RegExp(Ns+"(?="+Ns+")|"+Ws+Ks,"g"),Xs=RegExp([$s+"?"+Os+"+"+zs+"(?="+[Ds,$s,"$"].join("|")+")",qs+"+"+Vs+"(?="+[Ds,$s+Is,"$"].join("|")+")",$s+"?"+Is+"+"+zs,$s+"+"+Vs,Ts,Hs].join("|"),"g"),Js=RegExp("["+Fs+ys+vs+bs+ks+"]"),Zs=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ea="object"==typeof self&&self&&self.Object===Object&&self,ta="object"==typeof hs&&hs&&hs.Object===Object&&hs||ea||Function("return this")();var na,ra=(na={"À":"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","ſ":"ss"},function(e){return null==na?void 0:na[e]});function oa(e){return Js.test(e)}function ia(e){return oa(e)?function(e){return e.match(Qs)||[]}(e):function(e){return e.split("")}(e)}var sa=Object.prototype.toString,aa=ta.Symbol,la=aa?aa.prototype:void 0,ca=la?la.toString:void 0;function ua(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&sa.call(e)==ps}(e))return ca?ca.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function da(e,t,n){return function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n=void 0===n?e.length:n)}function ha(e){return null==e?"":ua(e)}var fa,pa=(fa=function(e,t,n){return t=t.toLowerCase(),e+(n?ga(ha(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ha(e),void 0===t?function(e){return Zs.test(e)}(e)?function(e){return e.match(Xs)||[]}(e):function(e){return e.match(ms)||[]}(e):e.match(t)||[]}(function(e){return(e=ha(e))&&e.replace(gs,ra).replace(Ys,"")}(e).replace(Gs,"")),fa,"")});var ma,ga=(ma="toUpperCase",function(e){var t=oa(e=ha(e))?ia(e):void 0,n=t?t[0]:e.charAt(0),r=t?da(t,1).join(""):e.slice(1);return n[ma]()+r});const ya=fs(pa);var va,ba={exports:{}},xa={};var wa,Sa={};
|
|
2
|
+
/** @license React v16.13.1
|
|
3
|
+
* react-is.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/ba.exports="production"===process.env.NODE_ENV?function(){if(va)return xa;va=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case a:case u:case p:case f:case s:return e;default:return h}}case n:return h}}}function x(e){return b(e)===c}return xa.AsyncMode=l,xa.ConcurrentMode=c,xa.ContextConsumer=a,xa.ContextProvider=s,xa.Element=t,xa.ForwardRef=u,xa.Fragment=r,xa.Lazy=p,xa.Memo=f,xa.Portal=n,xa.Profiler=i,xa.StrictMode=o,xa.Suspense=d,xa.isAsyncMode=function(e){return x(e)||b(e)===l},xa.isConcurrentMode=x,xa.isContextConsumer=function(e){return b(e)===a},xa.isContextProvider=function(e){return b(e)===s},xa.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},xa.isForwardRef=function(e){return b(e)===u},xa.isFragment=function(e){return b(e)===r},xa.isLazy=function(e){return b(e)===p},xa.isMemo=function(e){return b(e)===f},xa.isPortal=function(e){return b(e)===n},xa.isProfiler=function(e){return b(e)===i},xa.isStrictMode=function(e){return b(e)===o},xa.isSuspense=function(e){return b(e)===d},xa.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},xa.typeOf=b,xa}():(wa||(wa=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case a:case u:case p:case f:case s:return g;default:return h}}case n:return h}}}var x=c,w=a,S=s,k=t,C=u,E=r,P=p,D=f,j=n,T=i,M=o,O=d,A=!1;function N(e){return b(e)===c}Sa.AsyncMode=l,Sa.ConcurrentMode=x,Sa.ContextConsumer=w,Sa.ContextProvider=S,Sa.Element=k,Sa.ForwardRef=C,Sa.Fragment=E,Sa.Lazy=P,Sa.Memo=D,Sa.Portal=j,Sa.Profiler=T,Sa.StrictMode=M,Sa.Suspense=O,Sa.isAsyncMode=function(e){return A||(A=!0),N(e)||b(e)===l},Sa.isConcurrentMode=N,Sa.isContextConsumer=function(e){return b(e)===a},Sa.isContextProvider=function(e){return b(e)===s},Sa.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Sa.isForwardRef=function(e){return b(e)===u},Sa.isFragment=function(e){return b(e)===r},Sa.isLazy=function(e){return b(e)===p},Sa.isMemo=function(e){return b(e)===f},Sa.isPortal=function(e){return b(e)===n},Sa.isProfiler=function(e){return b(e)===i},Sa.isStrictMode=function(e){return b(e)===o},Sa.isSuspense=function(e){return b(e)===d},Sa.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},Sa.typeOf=b}()),Sa);var ka=ba.exports,Ca={};Ca[ka.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ca[ka.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};const Ea={useCamelCaseFlagKeys:!0,sendEventsOnFlagRead:!0,reactContext:n.createContext({flags:{},flagKeyMap:{},ldClient:void 0})},Pa=e=>{var t;return null!=(t=e.context)?t:e.user},Da=e=>{const t={};for(const n in e)0!==n.indexOf("$")&&(t[ya(n)]=e[n]);return t},ja=(e,t)=>{const n=e.allFlags();return t?Object.keys(t).reduce(((e,r)=>(e[r]=Object.prototype.hasOwnProperty.call(n,r)?n[r]:t[r],e)),{}):n};function Ta(e,t,n=Ea,r){const o=(l=t,void 0===(c=r)?l:Object.keys(c).reduce(((e,t)=>(Ma(l,t)&&(e[t]=l[t]),e)),{})),{useCamelCaseFlagKeys:i=!0}=n,[s,a={}]=i?function(e){const t={},n={};for(const r in e){if(0===r.indexOf("$"))continue;const o=ya(r);t[o]=e[r],n[o]=r}return[t,n]}(o):[o];var l,c;return{flags:n.sendEventsOnFlagRead?Oa(e,s,a,i):s,flagKeyMap:a}}function Ma(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Oa(e,t,n,r){return new Proxy(t,{get(t,o,i){const s=Reflect.get(t,o,i),a=r&&Ma(n,o)||Ma(t,o);if("symbol"==typeof o||!a)return s;if(void 0===s)return;return e.variation(r?n[o]:o,s)}})}Da.camelCaseKeys=Da;const Aa={wrapperName:"react-client-sdk",wrapperVersion:"3.6.1",sendEventsOnlyForVariation:!0};var Na=Object.defineProperty,_a=Object.defineProperties,Ra=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,$a=Object.prototype.hasOwnProperty,Fa=Object.prototype.propertyIsEnumerable,Ia=(e,t,n)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))$a.call(t,n)&&Ia(e,n,t[n]);if(La)for(var n of La(t))Fa.call(t,n)&&Ia(e,n,t[n]);return e},za=(e,t)=>_a(e,Ra(t)),Va=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{a(n.next(e))}catch(t){o(t)}},s=e=>{try{a(n.throw(e))}catch(t){o(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())}));class Ba extends n.Component{constructor(e){super(e),this.getReactOptions=()=>qa(qa({},Ea),this.props.reactOptions),this.subscribeToChanges=e=>{const{flags:t}=this.props;e.on("change",(n=>{const r=this.getReactOptions(),o=((e,t)=>{const n={};for(const r in e)t&&void 0===t[r]||(n[r]=e[r].current);return n})(n,t),i=qa(qa({},this.state.unproxiedFlags),o);Object.keys(o).length>0&&this.setState((n=>qa(za(qa({},n),{unproxiedFlags:i}),Ta(e,i,r,t))))}))},this.onFailed=(e,t)=>{this.setState((e=>za(qa({},e),{error:t})))},this.onReady=(e,t,n)=>{const r=ja(e,n);this.setState((o=>qa(za(qa({},o),{unproxiedFlags:r}),Ta(e,r,t,n))))},this.prepareLDClient=()=>Va(this,null,(function*(){var e;const{clientSideID:t,flags:n,options:r}=this.props;let o=yield this.props.ldClient;const i=this.getReactOptions();let s,a=this.state.unproxiedFlags;if(o)a=ja(o,n);else{const c=null!=(e=Pa(this.props))?e:{anonymous:!0,kind:"user"};o=ds(t,c,qa(qa({},Aa),r));try{yield o.waitForInitialization(this.props.timeout),a=ja(o,n)}catch(l){s=l,(null==s?void 0:s.name.toLowerCase().includes("timeout"))&&(o.on("failed",this.onFailed),o.on("ready",(()=>{this.onReady(o,i,n)})))}}this.setState((e=>za(qa(za(qa({},e),{unproxiedFlags:a}),Ta(o,a,i,n)),{ldClient:o,error:s}))),this.subscribeToChanges(o)}));const{options:t}=e;if(this.state={flags:{},unproxiedFlags:{},flagKeyMap:{}},t){const{bootstrap:e}=t;if(e&&"localStorage"!==e){const{useCamelCaseFlagKeys:t}=this.getReactOptions();this.state={flags:t?Da(e):e,unproxiedFlags:e,flagKeyMap:{}}}}}componentDidMount(){return Va(this,null,(function*(){const{deferInitialization:e}=this.props;e&&!Pa(this.props)||(yield this.prepareLDClient())}))}componentDidUpdate(e){return Va(this,null,(function*(){const{deferInitialization:t}=this.props,n=!Pa(e)&&Pa(this.props);t&&n&&(yield this.prepareLDClient())}))}render(){const{flags:e,flagKeyMap:t,ldClient:r,error:o}=this.state,{reactContext:i}=this.getReactOptions();return n.createElement(i.Provider,{value:{flags:e,flagKeyMap:t,ldClient:r,error:o}},this.props.children)}}const Ua=new class{handlers=new Map;subscribe(e,t){const n=this.handlers.get(e)||new Set;return n.add(t),this.handlers.set(e,n),()=>{const n=this.handlers.get(e);n&&(n.delete(t),0===n.size&&this.handlers.delete(e))}}emit(e,t){const n=this.handlers.get(e);n&&n.forEach((e=>e(t)))}clearAll(){this.handlers.clear()}},Ka="api:unauthorized",Ha="api:authorized",Wa={staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!0};let Ga,Ya=!1,Qa=null,Xa=!1;const Ja=async(e,t={})=>{const n=await fetch(`https://api.embedreach.com/api${e}`,{...t,credentials:"include",headers:{"Content-Type":"application/json",...Ga&&{Authorization:`Bearer ${Ga}`},...t.headers}});if(401===n.status)throw Ya||(Ya=!0,Ua.emit(Ka,void 0),Qa&&window.clearTimeout(Qa),Qa=window.setTimeout((()=>{Ya=!1,Xa=!1,Qa=null}),5e3)),new Error("Unauthorized");if(!n.ok)throw new Error(`API Error: ${n.statusText}`);return Xa||(Ua.emit(Ha,void 0),Xa=!0),n.json()},Za=(e,r,o,i)=>{const s=n.createContext({state:o});return{Context:s,Provider:({children:a})=>{const[l,c]=n.useReducer(e,o),u=n.useMemo((()=>Object.keys(r).reduce(((e,t)=>({...e,[t]:r[t](c)})),{})),[c]);n.useEffect((()=>{const e=[];return i?.length&&i.forEach((({eventName:t,handler:n})=>{const r=n(c),o=Ua.subscribe(t,r);e.push(o)})),()=>e.forEach((e=>e()))}),[c]);const d=n.useMemo((()=>({state:l,...u})),[l,u]);return t.jsx(s.Provider,{value:d,children:a})}}},el=[{eventName:Ka,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!1}),e({type:"SET_REAUTHING",payload:!0})}},{eventName:Ha,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!0})}}],{Provider:tl}=Za(((e,t)=>{switch(t.type){case"SET_AUTHENTICATED":return{...e,isAuthenticated:t.payload,error:null,reauthing:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_ERROR":return{...e,error:t.payload,isAuthenticated:!1,reauthing:!1};case"SET_REAUTHING":return e.reauthing&&t.payload?e:{...e,reauthing:t.payload};default:return e}}),{handleReauth:e=>async t=>{if(t){e({type:"SET_REAUTHING",payload:!0});try{t()}catch(n){e({type:"SET_ERROR",payload:n instanceof Error?n.message:"Reauthorization failed"})}}else e({type:"SET_ERROR",payload:"No reauth callback provided"})}},{isAuthenticated:!1,loading:!1,error:null,reauthing:!1},el),nl=e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return e.trim();try{const t=(e=>{const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=window.getComputedStyle(t).color;return document.body.removeChild(t),n})(e),[n,r,o]=(e=>{const t=e.match(/\d+/g);if(!t||t.length<3)throw new Error(`Invalid RGB color format: ${e}`);return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)]})(t);return((e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n);let i=0,s=0;const a=(r+o)/2;if(r!==o){const l=r-o;switch(s=a>.5?l/(2-r-o):l/(r+o),r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i*=60}return`${Math.round(i)} ${Math.round(100*s)}% ${Math.round(100*a)}%`})(n,r,o)}catch(t){return e}},rl={primary:"hsl(222.2 47.4% 11.2%)",background:"hsl(0 0% 100%)",foreground:"hsl(222.2 47.4% 11.2%)","primary-foreground":"hsl(210 40% 98%)",secondary:"hsl(210 40% 96.1%)","secondary-foreground":"hsl(222.2 47.4% 11.2%)",muted:"hsl(210 40% 96.1%)","muted-foreground":"hsl(215.4 16.3% 46.9%)",accent:"hsl(210 40% 96.1%)","accent-foreground":"hsl(222.2 47.4% 11.2%)",border:"hsl(214.3 31.8% 91.4%)",input:"hsl(214.3 31.8% 91.4%)",ring:"hsl(222.2 84% 4.9%)",destructive:"hsl(0 84.2% 60.2%)","destructive-foreground":"hsl(210 40% 98%)",card:"hsl(0 0% 100%)","card-foreground":"hsl(222.2 47.4% 11.2%)",popover:"hsl(0 0% 100%)","popover-foreground":"hsl(222.2 47.4% 11.2%)"},ol=e=>{const t=document.getElementById("reach-theme-styles");t&&t.remove();const n=document.createElement("style");n.id="reach-theme-styles";const r=`\n [data-reach-root] {\n ${Object.entries(rl).map((([t,n])=>{const r=e[t];let o=n;if(void 0!==r)if("radius"===t)o=r;else if((e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return!0;const t=document.createElement("div"),n=t.style.color;return t.style.color=e,t.style.color!==n})(r))try{o=nl(r)}catch(i){}return`--reach-${t}: ${o};`})).join("\n")}\n }\n `;n.textContent=r,document.head.appendChild(n)},{Provider:il}=Za(((e,t)=>{switch(t.type){case"set_theme":return t.payload&&!e.theme&&ol(t.payload.styles),{...e,loading:!1,error:null,theme:t.payload};case"set_loading":return{...e,loading:t.payload};case"set_error":return{...e,loading:!1,error:t.payload};default:return e}}),{setTheme:e=>t=>e({type:"set_theme",payload:t}),setLoading:e=>t=>e({type:"set_loading",payload:t}),setError:e=>t=>e({type:"set_error",payload:t})},{theme:null,loading:!0,error:null}),sl=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,al={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ll=e=>al[e];let cl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(sl,ll)};const ul={type:"3rdParty",init(e){((e={})=>{cl={...cl,...e}})(e.options.react)}},dl=n.createContext();function hl({i18n:e,defaultNS:t,children:r}){const o=n.useMemo((()=>({i18n:e,defaultNS:t})),[e,t]);return n.createElement(dl.Provider,{value:o},r)}const fl=e=>"string"==typeof e,pl=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},ml=e=>null==e?"":""+e,gl=/###/g,yl=e=>e&&e.indexOf("###")>-1?e.replace(gl,"."):e,vl=e=>!e||fl(e),bl=(e,t,n)=>{const r=fl(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(vl(e))return{};const t=yl(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return vl(e)?{}:{obj:e,k:yl(r[o])}},xl=(e,t,n)=>{const{obj:r,k:o}=bl(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=bl(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=bl(e,s,Object),a?.obj&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},wl=(e,t)=>{const{obj:n,k:r}=bl(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Sl=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?fl(e[r])||e[r]instanceof String||fl(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Sl(e[r],t[r],n):e[r]=t[r]);return e},kl=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Cl={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const El=e=>fl(e)?e.replace(/[&<>"'\/]/g,(e=>Cl[e])):e;const Pl=[" ",",","?","!",";"],Dl=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),jl=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let s=i;s<r.length;++s)if(s!==i&&(t+=n),t+=r[s],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=e}return o},Tl=e=>e?.replace("_","-"),Ml={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){}};class Ol{constructor(e){this.init(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ml,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(fl(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ol(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Ol(this.logger,e)}}var Al=new Ol;class Nl{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let o=0;o<r;o++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let i=0;i<o;i++)r.apply(r,[e,...n])}))}}}class _l extends Nl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):fl(n)&&o?s.push(...n.split(o)):s.push(n)));const a=wl(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&fl(n)?jl(this.data?.[e]?.[t],n,o):a}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),xl(this.data,s,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)(fl(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=wl(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Sl(a,n,o):a={...a,...n},xl(this.data,s,a),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var Rl={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{t=this.processors[e]?.process(t,n,r,o)??t})),t}};const Ll={};class $l extends Nl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Al.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){if(null==e)return!1;const t=this.resolve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});return void 0!==t?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Pl.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Dl.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:fl(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:fl(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],t),a=s[s.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${a}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u?.res;const h=u?.usedKey||i,f=u?.exactUsedKey||i,p=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!fl(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(g&&d&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||fl(m)&&Array.isArray(d))if(g&&fl(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,s=!1;const c=void 0!==t.count&&!fl(t.count),h=$l.hasDefaultValue(t),f=c?this.pluralResolver.getSuffix(l,t.count,t):"",p=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",m=c&&!t.ordinal&&0===t.count,g=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${f}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&h&&(r=!0,d=g),this.isValidLookup(d)||(s=!0,d=i);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,v=h&&g!==d&&this.options.updateMissing;if(s||r||v){if(this.logger.log(v?"updateKey":"missingKey",l,a,i,v?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=h&&r!==d?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,o,v,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,a,n,o,v,t),this.emit("missingKey",e,a,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||g)}))})):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),s&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${i}`),(s||r)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,r?d:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,d,{...t,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?f:h;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:s}),n[i]===e&&(n[i]=d[i])}d=n}}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s=fl(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=n.replace&&!fl(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),s){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return o?.[0]!==r[0]||n.context?i.translate(...r,t):(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null)}),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=fl(s)?[s]:s;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=Rl.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fl(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,s),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!fl(s.count),d=u&&!s.ordinal&&0===s.count,h=void 0!==s.context&&(fl(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,Ll[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(Ll[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,s);else{let e;u&&(e=this.pluralResolver.getSuffix(n,s.count,s));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(l+e),s.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),d&&i.push(l+t)),h){const n=`${l}${this.options.contextSeparator}${s.context}`;i.push(n),u&&(i.push(n+e),s.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let a;for(;a=i.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,s))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!fl(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Fl{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Al.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Tl(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Tl(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(fl(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch(t){}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),fl(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return fl(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):fl(e)&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}const Il={zero:0,one:1,two:2,few:3,many:4,other:5},ql={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class zl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Al.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Tl("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(s){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ql;if(!e.match(/-|_/))return ql;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){return this.getSuffixes(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>Il[e]-Il[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Vl=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=wl(e,n);return void 0!==r?r:wl(t,n)})(e,t,n);return!i&&o&&fl(n)&&(i=jl(e,n,r),void 0===i&&(i=jl(t,n,r))),i},Bl=e=>e.replace(/\$/g,"$$$$");class Ul{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Al.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:p,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:El,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?kl(o):i||"{{",this.suffix=s?kl(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?kl(d):h||kl("$t("),this.nestingSuffix=f?kl(f):p||kl(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Vl(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(Vl(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Bl(e)},{regex:this.regexp,safeValue:e=>Bl(this.escapeValue?this.escape(e):e)}].forEach((t=>{for(s=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=fl(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else fl(i)||this.useRawValueToEscape||(i=ml(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const s=i.match(/'/g),a=i.match(/"/g);((s?.length??0)%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(l){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,l),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];o={...i},o=o.replace&&!fl(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),a=e,l=!0}if(r=t(s.call(this,n[1].trim(),o),o),r&&n[0]===e&&!fl(r))return r;fl(r)||(r=ml(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=a.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Kl=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Tl(r),o),t[s]=a),a(n)}};class Hl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Al.create("formatter"),this.options=e,this.formats={number:Kl(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Kl(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Kl(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Kl(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Kl(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){this.formatSeparator=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Kl(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const s=r?.formatParams?.[r.interpolationkey]||{};t=this.formats[o](e,s.locale||s.lng||r.locale||r.lng||n,{...i,...r,...s})}catch(s){this.logger.warn(s)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class Wl extends Nl{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Al.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},s={},a={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,r=!1,void 0===i[s]&&(i[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===a[t]&&(a[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=bl(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then((e=>s(null,e))).catch(s):s(null,n)}catch(l){s(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();fl(e)&&(e=this.languageUtils.toResolveHierarchy(e)),fl(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,l):c(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>s(null,e))).catch(s):s(null,o)}catch(a){s(a)}else c(e,t,n,r,s,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Gl=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),fl(e[1])&&(t.defaultValue=e[1]),fl(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Yl=e=>(fl(e.ns)&&(e.ns=[e.ns]),fl(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),fl(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Ql=()=>{};class Xl extends Nl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Yl(e),this.services={},this.logger=Al,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(fl(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Gl();this.options={...r,...this.options,...Yl(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;Al.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Hl;const n=new Fl(this.options);this.store=new _l(this.options.resources,this.options);const i=this.services;i.logger=Al,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new zl(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Ul(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Wl(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new $l(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=Ql),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=pl(),s=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ql;const n=fl(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload?.forEach?.((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=pl();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Ql),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Rl.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=pl();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},s=t=>{e||t||!this.services.languageDetector||(t=[]);const n=fl(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return fl(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=pl();return this.options.ns?(fl(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=pl();fl(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new Fl(Gl());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Xl(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ql;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new Xl(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},Object.keys(e[t]).reduce(((n,r)=>(n[r]={...e[t][r]},n)),{}))),{});o.store=new _l(e,r),o.services.resourceStore=o.store}return o.translator=new $l(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Jl=Xl.createInstance();Jl.createInstance=Xl.createInstance;const{slice:Zl,forEach:ec}=[];const tc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,nc={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!tc.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!tc.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e){this.create(e,"",-1)}};var rc={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return nc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&nc.create(n,e,r,o,i)}},oc={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let o=0;o<r.length;o++){const e=r[o].indexOf("=");if(e>0){r[o].substring(0,e)===n&&(t=r[o].substring(e+1))}}}return t}};let ic=null;const sc=()=>{if(null!==ic)return ic;try{ic="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){ic=!1}return ic};var ac={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&sc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&sc()&&window.localStorage.setItem(n,e)}};let lc=null;const cc=()=>{if(null!==lc)return lc;try{lc="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){lc=!1}return lc};var uc={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&cc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&cc()&&window.sessionStorage.setItem(n,e)}},dc={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},hc={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},fc={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},pc={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let mc=!1;try{document,mc=!0}catch(Nz){}const gc=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];mc||gc.splice(1,1);class yc{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return ec.call(Zl.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}(e,this.options||{},{order:gc,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(rc),this.addDetector(oc),this.addDetector(ac),this.addDetector(uc),this.addDetector(dc),this.addDetector(hc),this.addDetector(fc),this.addDetector(pc)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}})),e=e.map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}yc.type="languageDetector";const vc={en:{common:{ad_spend:"Ad Spend",date:"Date",close:"Close",continue:"Continue",connected:"Connected",connecting:"Connecting...",reauth_required:"Re-authentication required",reauth_required_description:"Re-authentication required for one of your ad accounts",reauthenticate:"Reauthenticate",account_settings:"Account Settings",manage_account_settings:"Manage your account settings",copy:"Copy",copied:"Copied",error:"An error occurred",filter:"Filter",finishingUp:"Finishing up...",loading:"Loading...",need_help:"Need help? let us know",next:"Next",next_steps:"Next steps:",number:"{{number}}",previous:"Previous",revenue:"Revenue",revenue_from_ads:"Revenue From Ads",roas:"ROAS",return_on_ad_spend:"Return on Ad Spend",select_dates:"Select dates",total_ads_spend:"Total Ads Spend",authentication:{required:"Authentication required",failed:"Authentication failed",connect_account_title:"Connect Your {{provider}} Account",connect_account_description:"To create and manage ad campaigns, please connect your {{provider}} account",connect_account_button:"Continue with {{provider}}",connect_account_TOS:"By connecting, you agree to our Terms of Service and Privacy Policy"},theme:{loading:"Loading theme...",error:"Error loading theme: {{message}}"},dates:{last_week:"Last week",last_month:"Last month",last_quarter:"Last quarter",last_year:"Last year"},campaigns:{setup:{card_header:"Run paid digital ads to get new leads & customers",title:"Create your first AI-driven Ad campaign in 4 simple clicks",description:"Welcome to the future of advertising! Our AI-powered campaign builder helps you effortlessly design and manage ads that reach your target audience with precision. Get started now to unlock the potential of automated, data-driven advertising.",button:"Set up paid ads",next_steps_description:"Already running ads? Track Your Marketing Results with a few clicks.",link_to_analytics:"Connect your existing accounts to get instant insights into your marketing performance."},how_it_works:{dialog_title:"How It Works",title:"Setup your ad campaign",step1:{title:"Set up budget & review your ads",description:"Define how much you want to spend, review the ad designs, and configure who you want to reach."},step2:{title:"We’ll publish & optimize your ads on Google",description:"We’ll do the hard work of publishing & continuously optimizing your ads on Google making sure you’re getting the best possible return on investment."},step3:{title:"See Customers & Results",description:"When a customer buys from you, we’ll notify you and show you the total revenue driven to your business from each dollar invested in ads. "}},ads_builder:{dialog_trigger:"New campaign",title:"Ads Builder",description:"Create your new ad campaign",review_ad_themes:"Review Ad Themes",example_ad_preview:"Example Ad Preview",example_ad_preview_description:"Here's an example of how prospective customers might see your ads. We will automagically tweak the copy based on your products offered, and improve targeting based on what results in the most dollars to your business."}},analytics:{setup_analytics:"Setup analytics",setup_analytics_description:"Let's get you started with analytics. Connect your data sources to start tracking your customers.",connect_data:{title:"Connect Your Data",description:"We bring all of your ads data together to give you a clear view of which customers are coming in from where."},install_pixel:{copied_to_clipboard:"Copied to clipboard",copied_to_clipboard_description:"The tracking pixel code has been copied to your clipboard.",title:"Install our Tracking Pixel",description:"In order to get a complete picture of how users are interacting with your website, it’s important for the Reach analytics code to be on every page of your website and within as many third-party tools that you use as possible.",card_title:"Install the Snippet inside the <HEAD> of every page",card_description:"Copy this following text and insert it inside of the <HEAD> tags on all pages.",error_generating_pixel_code:"Error generating pixel code - please contact your administrator"},third_party_installation_guides:{title:"Installation Guides",description:"These guides will help you add the Reach analytics snippet to your website. The process works with any website builder or platform and most third-party tools.",installation_guide:"{{name}} Installation Guide",official_guide:"Official Guide",shopify:{step_1:"From your Shopify admin, go to Online Store > Themes",step_2:"Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code",step_3:'Open "theme.liquid"',step_4:"Find the </head> tag",step_5:"Paste the code snippet from the section above just before it"},google_tag_manager:{step_1:"Go to https://tagmanager.google.com",step_2:"Sign in to your Google Account",step_3:"Click the Accounts tab, then select Create Account",step_4:"Enter an account name and select your country location",step_5:"In Container Setup, enter a container name (e.g., your website URL)",step_6:'Select "Web" as the container type',step_7:"Click Create and agree to the Terms of Service",step_8:"Once created, you'll receive two code snippets to install:",step_9:"• Place the first snippet in the <head> of your page",step_10:"• Place the second snippet immediately after the opening <body> tag",step_11:"In the Tags tab, click the + button to create a new tag",step_12:'Select "Google Analytics: Universal Analytics" as the tag type',special_note:"Make sure you have the Google Tag Manager container code already installed on your site before adding this tag."},hubspot:{step_1:"Go to Settings → Content → Pages",step_2:'In the upper left, select a domain to edit its settings. Or select "Default settings for all domains"',step_3:'Paste the code from the section above to the "Site Header HTML" field',step_4:'Click "Save"'},wordpress:{step_1:"We recommend using the popular WPCode Plugin",step_2:'In the plugin, select "+ Add Snippet"',step_3:'When presented with a menu of options, navigate to "Add Your Custom Code (New Snippet)" and select "Use snippet"',step_4:"Paste the code snippet from the section above",step_5:'For Insert Method, choose "Auto Insert"',step_6:'For Location, select "Site Wide Header"',step_7:"Be sure to save your snippet"},squarespace:{step_1:"Go to Settings → Advanced → Code Injection",step_2:'Paste the code from the section above into the "Header" field',step_3:'Click "Save"'},wix:{step_1:"Go to Settings → Custom Code",step_2:'Click "+ Add Custom Code"',step_3:"Paste the code from the section above",step_4:'Click "Apply"',step_5:'Set "Add Code to Pages" to "All Pages"'},webflow:{step_1:"Open your project settings",step_2:'Navigate to "Custom Code"',step_3:'Paste the code from the section above into the "Head Code" section',step_4:'Click "Save Changes"'},third_party_systems:{step_1:"Check if your third-party tools (lead forms, scheduling tools, etc.) allow custom code injection",step_2:'Look for options labeled "Custom Code", "Embed Code", or "Advanced Settings"',step_3:"Paste the same tracking code into these sections where available",step_4:"Common locations include:",step_5:"• Head section of your website (for tracking scripts and styles)",step_6:"• Footer section of your website (for tracking scripts and styles)",special_note:"This helps ensure consistent tracking across all your customer touchpoints, even when using external tools."},custom:{step_1:"Locate your website's HTML template or main layout file",step_2:"Find the </head> tag in your HTML",step_3:"Paste the code snippet just before the </head> tag",step_4:"Save the file and deploy your changes"}},success:{title:"Success!",description:"You have successfully connected your data sources and installed our tracking pixel.",what_next:"What happens next?",step_1:"Your ad data will start syncing automatically",step_2:"The pixel will begin tracking conversions on your site",step_3:"You'll see your first analytics reports within 24 hours"}},dashboard:{banners:{metrics_crunching:{title:"Crunching your data",description:"You have successfully connected your ad accounts. We're now crunching your data. Check back soon for relevant metrics."},revoked_accounts:{title:"Your ad accounts have been revoked",description:"Please reconnect your ad accounts to continue using the dashboard."}},roas_chart:{title:"Ad Spend vs Revenue Over Time"},client_acquisition:{title:"Client Acquisition",description:"See how many new clients you acquired from each channel",client:"Client",source:"Source",total_spent:"Total Spent",total_revenue:"Total Revenue",status:"Status",no_data:"No data available",source_breakdown:"Source",payment_status:"Payment Status",paid:"Paid",unpaid:"Unpaid"},channel_performance:{title:"Channel Performance",description:"See how each channel performs",channel:"Channel",spend:"Spend",revenue:"Revenue",roas:"ROAS",new_customers:"New Customers"},tabs:{overview:"Overview",channel_performance:"Channel Performance"},metrics:{ads_spend:"Ads Spend",ads_spend_description:"The amount spent on ads in a given period. Sum of all sub-ads accounts (e.g. insta, google). Excluding agency fees",measured_revenue:"Measured Revenue",measured_revenue_description:"The amount of revenue measured from ads",measured_conversions:"Measured Conversions",measured_conversions_description:"The amount of conversions measured from ads",roas:"ROAS",roas_description:"This is the ratio of the revenue to the ads spend",impressions:"Impressions",impressions_description:"Number of times your ads were shown to potential customers",clicks:"Clicks/Actions",clicks_description:"Total interactions with your ads, including clicks and other actions",website_visitors:"Website Visitors",website_visitors_description:"Unique visitors to your website from advertising campaigns",new_leads:"New Leads",new_leads_description:"New potential customers who provided contact information",customer_ltv:"Customer LTV",customer_ltv_description:"Average lifetime value of customers acquired through ads"},title:"Marketing Revenue Dashboard",settings_sheet:{setup:"Setup",connected_accounts:"Connected Accounts",setup_analytics:"Setup analytics",setup_analytics_description:"Configure your analytics tracking",setup_campaigns:"Setup campaigns",setup_campaigns_description:"Set up your first campaign",legal:"Legal",terms_of_service:"Terms of Service",privacy_policy:"Privacy Policy"}},setup:{how_it_works:{title:"How It Works",dialog_title:"Setup Marketing Insights",connect_ads_title:"Connect your Ads Accounts",connect_ads_description:"Link your advertising accounts from platforms like Google and Meta to consolidate all your campaign data in one place. This enables comprehensive tracking and analysis of your marketing spend.",install_pixel_title:"Install Our Tracking Pixel",install_pixel_description:"Add our lightweight tracking code to your website to accurately measure customer interactions and conversions. This simple integration helps identify which ads are driving real results for your business.",see_customers_results_title:"See Customers & Results",see_customers_results_description:"Get clear insights into your marketing performance with detailed analytics on customer acquisition, conversion rates, and return on ad spend. Make data-driven decisions to optimize your campaigns and grow your business.",still_have_more_questions:"Still have more questions?",get_started:"Get Started"},initial_setup:{wizard_title:"Connect your ad accounts and see exactly how your campaigns drive revenue",title:"Unlock Clear Insights into Your Marketing Performance",description:"Stop guessing and start knowing. Our performance dashboard gives you a complete view of your marketing efforts, including ad spend, conversions, and return on ad spend (ROAS).",description_2:"With a simple setup process, you’ll have actionable insights at your fingertips to help you make smarter decisions and grow your business.",setup_performance_analytics:"Setup Performance Analytics",next_steps_description:"If you're not running ads yet, you can launch your first AI-powered ad campaign in minutes.",next_steps_link:"We will prompt you to connect your ad accounts and set up your first campaign."}},oauth:{selectAccount:{title:"Select {{platform}} Account",description:"Choose the {{platform}} account you want to connect.",loading:"Loading accounts...",loadingPlatform:"Loading {{platform}} accounts...",loadingDescription:"Please wait while we fetch your available accounts...",noAccounts:"No {{platform}} accounts were found for your account.",noAccountsDescription:"Please make sure you have access to a {{platform}} account and try again.",selectAccountPlaceholder:"Select an account",searchPlaceholder:"Search accounts...",fetchAccounts:"Fetching accounts...",noAccountSelected:"No account selected",enableTrackingParams:"Enable Tracking Parameters",enableTrackingParamsDescription:"Apply custom tracking parameters to your campaigns and ad groups. This ensures our pixel will track your ads.",google:{selectAccountDescription:"Select the Google Ads account you want to connect to view your data. These will be linked to our MCC for optimal tracking.",mccAccounts:"MCC Accounts",directAccounts:"Direct Accounts"},meta:{selectAccountDescription:"Choose the Meta Ads account you want to connect to view your data."}},success:{connection:{title:"Connected successfully",description:"Your {{provider}} account has been connected."},revoke:{title:"Account revoked",description:"Your {{provider}} account has been revoked."}},error:{title:"Connection failed",description:"Failed to connect account"},revoke:{title:"Revoke access",description:"Are you sure? Revoking access will remove the connection you have and you will be unable to view your ad metrics.",cancel:"Cancel",revoke:"Revoke",error:{title:"Error",description:"Failed to revoke access"}}},magic_link:{get_started:"Get Started",description:"Reach will be embedded within your platform dashboard but until then, you can get started with a magic link. Log in to your account and start creating AI-powered campaigns or measuring your ad spend and performance.",create_campaigns:"Create AI-generated ad campaigns in minutes",unlock_insights:"Unlock insights into your ad spend and performance",save_time:"Save time with automated campaign optimization",request_new_magic_link:"Request New Magic Link",go_to_dashboard:"Go to Dashboard",continuation_disclaimer:"By continuing, you agree to our <terms_of_service>Terms of Service</terms_of_service> and <privacy_policy>Privacy Policy</privacy_policy>."},empty_state:{analytics:{title:"You haven't connected any ad accounts yet",description:"You can connect your ad accounts in minutes and start driving more customers to your business.",button_text:"Setup analytics"}}}},es:{common:{ad_spend:"Gasto en anuncios",date:"Fecha",close:"Cerrar",continue:"Continuar",connected:"Conectado",connecting:"Conectando...",reauth_required:"Re-autenticación requerida",reauth_required_description:"Re-autenticación requerida para una de tus cuentas de anuncios",reauthenticate:"Reautenticar",account_settings:"Configuración de cuenta",manage_account_settings:"Configuración de tu cuenta",copy:"Copiar",copied:"Copiado",error:"Se produjo un error",filter:"Filtrar",finishingUp:"Finalizando...",loading:"Cargando...",need_help:"¿Necesitas ayuda? Háznoslo saber",next:"Siguiente",next_steps:"Siguientes pasos:",number:"{{number}}",previous:"Anterior",revenue:"Ingresos",revenue_from_ads:"Ingresos de anuncios",roas:"ROAS",return_on_ad_spend:"Retorno de inversión en anuncios",select_dates:"Selecciona fechas",total_ads_spend:"Gasto total en anuncios",authentication:{required:"Se requiere autenticación",failed:"Error de autenticación",connect_account_title:"Conecta tu cuenta de {{provider}}",connect_account_description:"Para crear y gestionar campañas de anuncios, por favor conecta tu cuenta de {{provider}}",connect_account_button:"Continuar con {{provider}}",connect_account_TOS:"Al conectarte, aceptas nuestros Términos de Servicio y Política de Privacidad"},theme:{loading:"Cargando tema...",error:"Error al cargar el tema: {{message}}"},dates:{last_week:"Semana pasada",last_month:"Mes pasado",last_quarter:"Trimestre pasado",last_year:"Año pasado"},campaigns:{setup:{card_header:"Lanza anuncios pagados para obtener nuevos leads y clientes",title:"Crea tu primera campaña de anuncios AI en 4 clicks",description:"Bienvenido al futuro del marketing! Nuestro creador de campañas AI te ayuda a diseñar y gestionar anuncios que alcanzan a tu audiencia con precisión. ¡Comienza ahora para desbloquear el potencial de anuncios automatizados y basados en datos.",button:"Configura tus anuncios pagados",next_steps_description:"¿Ya tienes anuncios? Rastrea tus resultados de marketing con solo unos clicks.",link_to_analytics:"Conecta tus cuentas existentes para obtener insights instantáneos sobre tu rendimiento de marketing."},how_it_works:{dialog_title:"Cómo funciona",title:"Configura tu campaña de anuncios",step1:{title:"Configura tu presupuesto y revisa tus anuncios",description:"Define cuánto quieres gastar, revisa los diseños de anuncios y configura quién quieres llegar."},step2:{title:"Publicaremos y optimizaremos tus anuncios en Google",description:"Haremos el trabajo duro de publicar y optimizar tus anuncios en Google para asegurarnos de que obtengas el mejor retorno de inversión posible."},step3:{title:"Ver clientes y resultados",description:"Cuando un cliente compra de ti, te notificaremos y te mostraremos el total de ingresos generados para tu negocio por cada dólar invertido en anuncios."}},ads_builder:{dialog_trigger:"Nueva campaña",title:"Ads Builder",description:"Crea tu nueva campaña de anuncios",review_ad_themes:"Revisa temas de anuncios",example_ad_preview:"Ejemplo de anuncio",example_ad_preview_description:"Aquí tienes un ejemplo de cómo los clientes potenciales podrían ver tus anuncios. Automáticamente ajustaremos el texto basándonos en tus productos ofrecidos y mejoraremos el targeting basándonos en lo que resulta en más dinero para tu negocio."}},analytics:{setup_analytics:"Configura analytics",setup_analytics_description:"Vamos a empezar con analytics. Conecta tus fuentes de datos para empezar a rastrear tus clientes.",connect_data:{title:"Conecta tus datos",description:"Juntamos todos tus datos de anuncios para darte una visión clara de qué clientes están llegando de dónde."},install_pixel:{copied_to_clipboard:"Copiado al portapapeles",copied_to_clipboard_description:"El código del pixel de seguimiento ha sido copiado a tu portapapeles.",title:"Instala nuestro pixel de seguimiento",description:"Para obtener una visión completa de cómo los usuarios interactúan con tu sitio web, es importante que el código de analytics de Reach esté en cada página de tu sitio web y dentro de tantos terceros como puedas usar.",card_title:"Instala el fragmento dentro del <HEAD> de cada página",card_description:"Copia este texto y insertalo dentro de las etiquetas <HEAD> en todas las páginas.",error_generating_pixel_code:"Error generando código del pixel - por favor contacta a tu administrador"},third_party_installation_guides:{title:"Guías de instalación",description:"Estas guías te ayudarán a agregar el fragmento de analytics de Reach a tu sitio web. El proceso funciona con cualquier constructor de sitios web o plataforma y la mayoría de las herramientas de terceros.",installation_guide:"Guía de instalación de {{name}}",official_guide:"Guía oficial",shopify:{step_1:"Desde tu Shopify admin, ve a Online Store > Themes",step_2:"Encuentra el tema que quieres editar, haz click en el botón … para abrir el menú de acciones y luego haz click en Editar código",step_3:'Abre "theme.liquid"',step_4:"Encuentra la etiqueta </head>",step_5:"Pega el fragmento de código de la sección anterior justo antes de ella"},google_tag_manager:{step_1:"Ve a https://tagmanager.google.com",step_2:"Inicia sesión en tu cuenta de Google",step_3:"Haz click en la pestaña de Cuentas y selecciona Crear cuenta",step_4:"Ingresa un nombre para tu cuenta y selecciona tu ubicación",step_5:"En Container Setup, ingresa un nombre para tu contenedor (e.g., tu URL de sitio web)",step_6:'Selecciona "Web" como tipo de contenedor',step_7:"Haz click en Crear y acepta los Términos de Servicio",step_8:"Una vez creado, recibirás dos fragmentos de código para instalar:",step_9:"• Coloca el primer fragmento en la etiqueta <head> de tu página",step_10:"• Coloca el segundo fragmento justo después de la etiqueta <body>",step_11:"En la pestaña de Etiquetas, haz click en el botón + para crear una nueva etiqueta",step_12:'Selecciona "Google Analytics: Universal Analytics" como tipo de etiqueta',special_note:"Asegúrate de tener el código del contenedor de Google Tag Manager instalado en tu sitio web antes de agregar esta etiqueta."},hubspot:{step_1:"Ve a Configuración → Contenido → Páginas",step_2:'En la esquina superior izquierda, selecciona un dominio para editar sus ajustes. O selecciona "Ajustes predeterminados para todos los dominios"',step_3:'Pega el código de la sección anterior en el campo "HTML del encabezado del sitio"',step_4:'Haz click en "Guardar"'},wordpress:{step_1:"Recomendamos usar el plugin WPCode",step_2:'En el plugin, selecciona "+ Añadir fragmento"',step_3:'Cuando se te presente un menú de opciones, navega a "Añadir tu código personalizado (nuevo fragmento)" y selecciona "Usar fragmento"',step_4:"Pega el fragmento de código de la sección anterior",step_5:'Para el método de inserción, elige "Auto insertar"',step_6:'Para la ubicación, selecciona "Encabezado del sitio"',step_7:"Asegúrate de guardar tu fragmento"},squarespace:{step_1:"Ve a Configuración → Avanzado → Inyección de código",step_2:'Pega el código de la sección anterior en el campo "Encabezado"',step_3:'Haz click en "Guardar"'},wix:{step_1:"Ve a Configuración → Código personalizado",step_2:'Haz click en "+ Añadir código personalizado"',step_3:"Pega el código de la sección anterior",step_4:'Haz click en "Aplicar"',step_5:'Establece "Añadir código a páginas" a "Todas las páginas"'},webflow:{step_1:"Abre tus ajustes de proyecto",step_2:'Navega a "Código personalizado"',step_3:'Pega el código de la sección anterior en la sección "Código de encabezado"',step_4:'Haz click en "Guardar cambios"'},third_party_systems:{step_1:"Revisa si tus herramientas de terceros (formularios de leads, herramientas de programación, etc.) permiten la inyección de código personalizado",step_2:'Busca opciones etiquetadas como "Código personalizado", "Código incrustado" o "Ajustes avanzados"',step_3:"Pega el mismo código de seguimiento en estas secciones donde esté disponible",step_4:"Los lugares comunes incluyen:",step_5:"• Sección de encabezado de tu sitio web (para scripts y estilos de seguimiento)",step_6:"• Sección de pie de página de tu sitio web (para scripts y estilos de seguimiento)",special_note:"Esto asegura un seguimiento consistente en todos tus puntos de contacto con clientes, incluso cuando usas herramientas externas."},custom:{step_1:"Localiza tu plantilla HTML o archivo de diseño principal",step_2:"Encuentra la etiqueta </head> en tu HTML",step_3:"Pega el fragmento de código justo antes de la etiqueta </head>",step_4:"Guarda el archivo y desplíalo"}},success:{title:"¡Éxito!",description:"Has conectado tus fuentes de datos y instalado nuestro pixel de seguimiento.",what_next:"¿Qué pasa a continuación?",step_1:"Tus datos de anuncios comenzarán a sincronizarse automáticamente",step_2:"El pixel comenzará a rastrear conversiones en tu sitio",step_3:"Verás tus primeros informes de analytics en 24 horas"}},dashboard:{banners:{metrics_crunching:{title:"Trabajando en tus datos",description:"Has conectado tus cuentas de anuncios. Estamos ahora trabajando en tus datos. Vuelve pronto para ver tus métricas relevantes."},revoked_accounts:{title:"Tus cuentas de anuncios han sido revocadas",description:"Por favor, reconecta tus cuentas de anuncios para continuar usando el panel."}},roas_chart:{title:"Gasto en anuncios vs ingresos en el tiempo"},client_acquisition:{title:"Adquisición de clientes",description:"Ver cómo has adquirido nuevos clientes de cada canal",client:"Cliente",source:"Fuente",total_spent:"Gasto total",total_revenue:"Ingresos totales",status:"Estado",no_data:"No hay datos disponibles",source_breakdown:"Fuente",payment_status:"Estado de pago",paid:"Pagado",unpaid:"No pagado"},channel_performance:{title:"Rendimiento de canales",description:"Ver cómo cada canal se desempeña",channel:"Canal",spend:"Gasto",revenue:"Ingresos",roas:"ROAS",new_customers:"Nuevos clientes"},tabs:{overview:"Resumen",channel_performance:"Rendimiento de canales"},metrics:{ads_spend:"Gasto en anuncios",ads_spend_description:"El gasto en anuncios en un período determinado. Suma de todos los sub-cuentas de anuncios (e.g. insta, google). Excluyendo comisiones de agencias",measured_revenue:"Ingresos Medidos",measured_revenue_description:"La cantidad de ingresos medidos de los anuncios",measured_conversions:"Conversiones Medidas",measured_conversions_description:"La cantidad de conversiones medidas de los anuncios",roas:"ROAS",roas_description:"Este es el ratio de los ingresos a los gastos en anuncios",impressions:"Impresiones",impressions_description:"Número de veces que tus anuncios fueron mostrados a potenciales clientes",clicks:"Clicks/Acciones",clicks_description:"Total de interacciones con tus anuncios, incluyendo clicks y otras acciones",website_visitors:"Visitantes web",website_visitors_description:"Visitantes únicos a tu sitio web desde campañas de anuncios",new_leads:"Nuevos leads",new_leads_description:"Nuevos potenciales clientes que proporcionaron información de contacto",customer_ltv:"LTV de cliente",customer_ltv_description:"Valor promedio de vida de clientes adquiridos a través de anuncios"},title:"Panel de ingresos de marketing",settings_sheet:{setup:"Configuración",connected_accounts:"Cuentas conectadas",setup_analytics:"Configurar analytics",setup_analytics_description:"Configura tu tracking de analytics",setup_campaigns:"Configurar campañas",setup_campaigns_description:"Configura tu primera campaña",legal:"Legal",terms_of_service:"Términos de servicio",privacy_policy:"Política de privacidad"}},setup:{how_it_works:{title:"Cómo funciona",dialog_title:"Configura Marketing Insights",connect_ads_title:"Conecta tus cuentas de anuncios",connect_ads_description:"Conecta tus cuentas de anuncios de plataformas como Google y Meta para consolidar todos tus datos de campañas en un solo lugar. Esto te permite rastrear y analizar tu gasto en marketing de manera completa.",install_pixel_title:"Instala nuestro pixel de seguimiento",install_pixel_description:"Añade nuestro código de seguimiento ligero a tu sitio web para medir las interacciones y conversiones de los clientes. Esta integración simple ayuda a identificar qué anuncios están generando resultados reales para tu negocio.",see_customers_results_title:"Ver clientes y resultados",see_customers_results_description:"Obtén una visión clara de tu rendimiento en marketing con análisis detallados sobre adquisición de clientes, tasas de conversión y retorno de inversión en anuncios. Haz decisiones basadas en datos para optimizar tus campañas y crecer tu negocio.",still_have_more_questions:"¿Tienes más preguntas?",get_started:"Comenzar"},initial_setup:{wizard_title:"Conecta tus cuentas de anuncios y ver cómo tus campañas generan ingresos",title:"Desbloquea insights claros en tu rendimiento de marketing",description:"Para empezar, conecta tus cuentas de anuncios de Google y Meta. Esto te permitirá rastrear y analizar tu gasto en marketing de manera completa.",description_2:"Con un proceso de configuración simple, tendrás insights accionables a tu disposición para ayudarte a tomar mejores decisiones y crecer tu negocio.",setup_performance_analytics:"Configura analytics de rendimiento",next_steps_description:"Si no tienes anuncios aún, puedes lanzar tu primera campaña de anuncios AI en minutos.",next_steps_link:"Te pediremos que conectes tus cuentas de anuncios y configures tu primera campaña."}},oauth:{selectAccount:{title:"Cuenta de {{platform}}",description:"Elige la cuenta de {{platform}} que quieres conectar.",loading:"Cargando cuentas...",loadingPlatform:"Cargando cuentas de {{platform}}...",loadingDescription:"Por favor, espera mientras obtenemos tus cuentas disponibles...",noAccounts:"No se encontraron cuentas de {{platform}} para tu cuenta.",noAccountsDescription:"Por favor, asegúrate de tener acceso a una cuenta de {{platform}} y vuelve a intentarlo.",selectAccountPlaceholder:"Selecciona una cuenta",searchPlaceholder:"Buscar cuentas...",fetchAccounts:"Buscando cuentas...",noAccountSelected:"No hay cuenta seleccionada",enableTrackingParams:"Habilitar parámetros de seguimiento",enableTrackingParamsDescription:"Aplica parámetros de seguimiento personalizados a tus campañas y grupos de anuncios. Esto asegura que nuestro pixel rastreará tus anuncios.",google:{selectAccountDescription:"Elige la cuenta de Google Ads que quieres conectar para ver tus datos. Estas serán vinculadas a nuestra MCC para un seguimiento óptimo.",mccAccounts:"Cuentas MCC",directAccounts:"Cuentas Directas"},meta:{selectAccountDescription:"Elige la cuenta de Meta Ads que quieres conectar para ver tus datos."}},success:{connection:{title:"Conectado correctamente",description:"Tu cuenta de {{provider}} ha sido conectada."},revoke:{title:"Cuenta revocada",description:"Tu cuenta de {{provider}} ha sido revocada."}},error:{title:"Error al conectar",description:"Error al conectar cuenta"},revoke:{title:"Revocar acceso",description:"¿Estás seguro? Revocar acceso eliminará la conexión que tienes y no podrás ver tus métricas de anuncios.",cancel:"Cancelar",revoke:"Revocar",error:{title:"Error",description:"Error al revocar acceso"}}},magic_link:{get_started:"Comenzar",description:"Reach estará incrustado en tu panel de control pero hasta entonces, puedes comenzar con un enlace mágico. Inicia sesión en tu cuenta y comienza a crear campañas AI o mide tu gasto en anuncios y rendimiento.",create_campaigns:"Crea campañas de anuncios AI en minutos",unlock_insights:"Desbloquea insights en tu gasto en anuncios y rendimiento",save_time:"Ahorra tiempo con optimización de campañas automatizadas",request_new_magic_link:"Solicitar nuevo enlace mágico",go_to_dashboard:"Ir al panel de control",continuation_disclaimer:"Al continuar, aceptas nuestros <terms_of_service>Términos de servicio</terms_of_service> y <privacy_policy>Política de privacidad</privacy_policy>."},empty_state:{analytics:{title:"No tienes ninguna cuenta de anuncios conectada",description:"Puedes conectar tus cuentas de anuncios en minutos y empezar a atraer más clientes a tu negocio.",button_text:"Configurar analytics"}}}}};Jl.use(yc).use(ul).init({resources:vc,fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},defaultNS:"common",ns:["common"],load:"languageOnly",detection:{order:["querystring","localStorage","navigator"],lookupQuerystring:"lang",lookupLocalStorage:"i18nextLng",caches:["localStorage"],convertDetectedLanguage:e=>e.split("-")[0]}});const bc=({children:e})=>t.jsx(hl,{i18n:Jl,children:e}),xc=n.createContext({});function wc(e){const t=n.useRef(null);return null===t.current&&(t.current=e()),t.current}const Sc=n.createContext(null),kc=n.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Cc extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=e instanceof HTMLElement&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ec({children:e,isPresent:r,anchorX:o}){const s=n.useId(),a=n.useRef(null),l=n.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=n.useContext(kc);return n.useInsertionEffect((()=>{const{width:e,height:t,top:n,left:i,right:u}=l.current;if(r||!a.current||!e||!t)return;const d="left"===o?`left: ${i}`:`right: ${u}`;a.current.dataset.motionPopId=s;const h=document.createElement("style");return c&&(h.nonce=c),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${d}px !important;\n top: ${n}px !important;\n }\n `),()=>{document.head.removeChild(h)}}),[r]),t.jsx(Cc,{isPresent:r,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Pc=({children:e,initial:r,isPresent:o,onExitComplete:s,custom:a,presenceAffectsLayout:l,mode:c,anchorX:u})=>{const d=wc(Dc),h=n.useId(),f=n.useCallback((e=>{d.set(e,!0);for(const t of d.values())if(!t)return;s&&s()}),[d,s]),p=n.useMemo((()=>({id:h,initial:r,isPresent:o,custom:a,onExitComplete:f,register:e=>(d.set(e,!1),()=>d.delete(e))})),l?[Math.random(),f]:[o,f]);return n.useMemo((()=>{d.forEach(((e,t)=>d.set(t,!1)))}),[o]),i.useEffect((()=>{!o&&!d.size&&s&&s()}),[o]),"popLayout"===c&&(e=t.jsx(Ec,{isPresent:o,anchorX:u,children:e})),t.jsx(Sc.Provider,{value:p,children:e})};function Dc(){return new Map}function jc(e=!0){const t=n.useContext(Sc);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=t,s=n.useId();n.useEffect((()=>{e&&i(s)}),[e]);const a=n.useCallback((()=>e&&o&&o(s)),[s,o,e]);return!r&&o?[!1,a]:[!0]}const Tc=e=>e.key||"";function Mc(e){const t=[];return n.Children.forEach(e,(e=>{n.isValidElement(e)&&t.push(e)})),t}const Oc="undefined"!=typeof window,Ac=Oc?n.useLayoutEffect:n.useEffect,Nc=({children:e,custom:r,initial:o=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:a="sync",propagate:l=!1,anchorX:c="left"})=>{const[u,d]=jc(l),h=n.useMemo((()=>Mc(e)),[e]),f=l&&!u?[]:h.map(Tc),p=n.useRef(!0),m=n.useRef(h),g=wc((()=>new Map)),[y,v]=n.useState(h),[b,x]=n.useState(h);Ac((()=>{p.current=!1,m.current=h;for(let e=0;e<b.length;e++){const t=Tc(b[e]);f.includes(t)?g.delete(t):!0!==g.get(t)&&g.set(t,!1)}}),[b,f.length,f.join("-")]);const w=[];if(h!==y){let e=[...h];for(let t=0;t<b.length;t++){const n=b[t],r=Tc(n);f.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===a&&w.length&&(e=w),x(Mc(e)),v(h),null}process;const{forceRender:S}=n.useContext(xc);return t.jsx(t.Fragment,{children:b.map((e=>{const n=Tc(e),y=!(l&&!u)&&(h===b||f.includes(n));return t.jsx(Pc,{isPresent:y,initial:!(p.current&&!o)&&void 0,custom:r,presenceAffectsLayout:s,mode:a,onExitComplete:y?void 0:()=>{if(!g.has(n))return;g.set(n,!0);let e=!0;g.forEach((t=>{t||(e=!1)})),e&&(null==S||S(),x(m.current),l&&(null==d||d()),i&&i())},anchorX:c,children:e},n)}))})},_c=e=>e;let Rc=_c,Lc=_c;function $c(e){let t;return()=>(void 0===t&&(t=e()),t)}"production"!==process.env.NODE_ENV&&(Rc=(e,t)=>{},Lc=(e,t)=>{if(!e)throw new Error(t)});const Fc=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Ic=e=>1e3*e,qc=e=>e/1e3,zc=!1,Vc=["read","resolveKeyframes","update","preRender","render","postRender"],Bc={value:null};function Uc(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Vc.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){s.has(t)&&(u.schedule(t),e()),l++,t(a)}const u={schedule:(e,t=!1,i=!1)=>{const a=i&&o?n:r;return t&&s.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),s.delete(e)},process:e=>{a=e,o?i=!0:(o=!0,[n,r]=[r,n],n.forEach(c),t&&Bc.value&&Bc.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e)),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,f=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:Vc.reduce(((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(f)),a.schedule(t,i,s)),t}),{}),cancel:e=>{for(let t=0;t<Vc.length;t++)s[Vc[t]].cancel(e)},state:o,steps:s}}const{schedule:Kc,cancel:Hc,state:Wc,steps:Gc}=Uc("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:_c,!0),Yc=n.createContext({strict:!1}),Qc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Xc={};for(const Lz in Qc)Xc[Lz]={isEnabled:e=>Qc[Lz].some((t=>!!e[t]))};const Jc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Jc.has(e)}let eu=e=>!Zc(e);try{(tu=require("@emotion/is-prop-valid").default)&&(eu=e=>e.startsWith("on")?!Zc(e):tu(e))}catch(_z){}var tu;const nu=new Set;function ru(e,t,n){e||nu.has(t)||nu.add(t)}function ou(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>("production"!==process.env.NODE_ENV&&ru(!1,"motion() is deprecated. Use motion.create() instead."),e(...t))),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const iu=n.createContext({});function su(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function au(e){return"string"==typeof e||Array.isArray(e)}const lu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cu=["initial",...lu];function uu(e){return su(e.animate)||cu.some((t=>au(e[t])))}function du(e){return Boolean(uu(e)||e.variants)}function hu(e){const{initial:t,animate:r}=function(e,t){if(uu(e)){const{initial:t,animate:n}=e;return{initial:!1===t||au(t)?t:void 0,animate:au(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,n.useContext(iu));return n.useMemo((()=>({initial:t,animate:r})),[fu(t),fu(r)])}function fu(e){return Array.isArray(e)?e.join(" "):e}const pu=Symbol.for("motionComponentSymbol");function mu(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function gu(e,t,r){return n.useCallback((n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):mu(r)&&(r.current=n))}),[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vu="data-"+yu("framerAppearId"),{schedule:bu}=Uc(queueMicrotask,!1),xu=n.createContext({});function wu(e,t,r,o,i){var s,a;const{visualElement:l}=n.useContext(iu),c=n.useContext(Yc),u=n.useContext(Sc),d=n.useContext(kc).reducedMotion,h=n.useRef(null);o=o||c.renderer,!h.current&&o&&(h.current=o(e,{visualState:t,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const f=h.current,p=n.useContext(xu);!f||f.projection||!i||"html"!==f.type&&"svg"!==f.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Su(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&mu(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,r,i,p);const m=n.useRef(!1);n.useInsertionEffect((()=>{f&&m.current&&f.update(r,u)}));const g=r[vu],y=n.useRef(Boolean(g)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return Ac((()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),bu.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())})),n.useEffect((()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),y.current=!1))})),f}function Su(e){if(e)return!1!==e.options.allowProjection?e.projection:Su(e.parent)}function ku({preloadedFeatures:e,createVisualElement:r,useRender:o,useVisualState:i,Component:s}){var a,l;function c(a,l){let c;const u={...n.useContext(kc),...a,layoutId:Cu(a)},{isStatic:d}=u,h=hu(a),f=i(a,d);if(!d&&Oc){!function(e,t){const r=n.useContext(Yc).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Rc(!1,t):Lc(!1,t)}}(u,e);const t=function(e){const{drag:t,layout:n}=Xc;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(u);c=t.MeasureLayout,h.visualElement=wu(s,f,u,r,t.ProjectionNode)}return t.jsxs(iu.Provider,{value:h,children:[c&&h.visualElement?t.jsx(c,{visualElement:h.visualElement,...u}):null,o(s,a,gu(f,h.visualElement,l),f,d,h.visualElement)]})}e&&function(e){for(const t in e)Xc[t]={...Xc[t],...e[t]}}(e),c.displayName=`motion.${"string"==typeof s?s:`create(${null!==(l=null!==(a=s.displayName)&&void 0!==a?a:s.name)&&void 0!==l?l:""})`}`;const u=n.forwardRef(c);return u[pu]=s,u}function Cu({layoutId:e}){const t=n.useContext(xc).id;return t&&void 0!==e?t+"-"+e:e}const Eu=e=>t=>"string"==typeof t&&t.startsWith(e),Pu=Eu("--"),Du=Eu("var(--"),ju=e=>!!Du(e)&&Tu.test(e.split("/*")[0].trim()),Tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Mu={};const Ou=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Au=new Set(Ou);function Nu(e,{layout:t,layoutId:n}){return Au.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Mu[e]||"opacity"===e)}const _u=e=>Boolean(e&&e.getVelocity),Ru=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Lu=(e,t,n)=>n>t?t:n<e?e:n,$u={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Fu={...$u,transform:e=>Lu(0,1,e)},Iu={...$u,default:1},qu=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),zu=qu("deg"),Vu=qu("%"),Bu=qu("px"),Uu=qu("vh"),Ku=qu("vw"),Hu={...Vu,parse:e=>Vu.parse(e)/100,transform:e=>Vu.transform(100*e)},Wu={borderWidth:Bu,borderTopWidth:Bu,borderRightWidth:Bu,borderBottomWidth:Bu,borderLeftWidth:Bu,borderRadius:Bu,radius:Bu,borderTopLeftRadius:Bu,borderTopRightRadius:Bu,borderBottomRightRadius:Bu,borderBottomLeftRadius:Bu,width:Bu,maxWidth:Bu,height:Bu,maxHeight:Bu,top:Bu,right:Bu,bottom:Bu,left:Bu,padding:Bu,paddingTop:Bu,paddingRight:Bu,paddingBottom:Bu,paddingLeft:Bu,margin:Bu,marginTop:Bu,marginRight:Bu,marginBottom:Bu,marginLeft:Bu,backgroundPositionX:Bu,backgroundPositionY:Bu},Gu={rotate:zu,rotateX:zu,rotateY:zu,rotateZ:zu,scale:Iu,scaleX:Iu,scaleY:Iu,scaleZ:Iu,skew:zu,skewX:zu,skewY:zu,distance:Bu,translateX:Bu,translateY:Bu,translateZ:Bu,x:Bu,y:Bu,z:Bu,perspective:Bu,transformPerspective:Bu,opacity:Fu,originX:Hu,originY:Hu,originZ:Bu},Yu={...$u,transform:Math.round},Qu={...Wu,...Gu,zIndex:Yu,size:Bu,fillOpacity:Fu,strokeOpacity:Fu,numOctaves:Yu},Xu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ju=Ou.length;function Zu(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(Au.has(l))s=!0;else if(Pu(l))o[l]=e;else{const t=Ru(e,Qu[l]);l.startsWith("origin")?(a=!0,i[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<Ju;i++){const s=Ou[i],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Ru(a,Qu[s]);l||(o=!1,r+=`${Xu[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const ed=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function td(e,t,n){for(const r in t)_u(t[r])||Nu(r,n)||(e[r]=t[r])}function nd(e,t){const r={};return td(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Zu(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),r}function rd(e,t){const n={},r=nd(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const od=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function id(e){return"string"==typeof e&&!e.includes("-")&&!!(od.indexOf(e)>-1||/[A-Z]/u.test(e))}const sd={offset:"stroke-dashoffset",array:"stroke-dasharray"},ad={offset:"strokeDashoffset",array:"strokeDasharray"};function ld(e,t,n){return"string"==typeof e?e:Bu.transform(t+n*e)}function cd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Zu(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:p}=e;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(void 0!==o||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){return`${ld(t,e.x,e.width)} ${ld(n,e.y,e.height)}`}(p,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?sd:ad;e[i.offset]=Bu.transform(-r);const s=Bu.transform(t),a=Bu.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const ud=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),dd=e=>"string"==typeof e&&"svg"===e.toLowerCase();function hd(e,t,r,o){const i=n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return cd(n,t,dd(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};td(t,e.style,e),i.style={...t,...i.style}}return i}function fd(e=!1){return(t,r,o,{latestValues:i},s)=>{const a=(id(t)?hd:rd)(r,i,s,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(eu(o)||!0===n&&Zc(o)||!t&&!Zc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof t,e),c=t!==n.Fragment?{...l,...a,ref:o}:{},{children:u}=r,d=n.useMemo((()=>_u(u)?u.get():u),[u]);return n.createElement(t,{...c,children:d})}}function pd(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function md(e,t,n,r){if("function"==typeof t){const[o,i]=pd(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=pd(r);t=t(void 0!==n?n:e.custom,o,i)}return t}const gd=e=>Array.isArray(e);function yd(e){const t=_u(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const vd=e=>(t,r)=>{const o=n.useContext(iu),i=n.useContext(Sc),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:bd(r,o,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:r,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,o,i);return r?s():wc(s)};function bd(e,t,n,r){const o={},i=r(e,{});for(const h in i)o[h]=yd(i[h]);let{initial:s,animate:a}=e;const l=uu(e),c=du(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!su(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=md(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}function xd(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(_u(o[s])||t.style&&_u(t.style[s])||Nu(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}const wd={useVisualState:vd({scrapeMotionValuesFromProps:xd,createRenderState:ed})};function Sd(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(Nz){t.dimensions={x:0,y:0,width:0,height:0}}}function kd(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Cd=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ed(e,t,n,r){kd(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Cd.has(o)?o:yu(o),t.attrs[o])}function Pd(e,t,n){const r=xd(e,t,n);for(const o in e)if(_u(e[o])||_u(t[o])){r[-1!==Ou.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}const Dd=["x","y","width","height","cx","cy","r"],jd={useVisualState:vd({scrapeMotionValuesFromProps:Pd,createRenderState:ud,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const a in o)if(Au.has(a)){i=!0;break}if(!i)return;let s=!t;if(t)for(let a=0;a<Dd.length;a++){const n=Dd[a];e[n]!==t[n]&&(s=!0)}s&&Kc.read((()=>{Sd(n,r),Kc.render((()=>{cd(r,o,dd(n.tagName),e.transformTemplate),Ed(n,r)}))}))}})};function Td(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return ku({...id(n)?jd:wd,preloadedFeatures:e,useRender:fd(r),createVisualElement:t,Component:n})}}function Md(e,t,n){const r=e.getProps();return md(r,t,void 0!==n?n:r.custom,e)}const Od=$c((()=>void 0!==window.ScrollTimeline));class Ad{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>Od()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Nd extends Ad{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function _d(e,t){return e?e[t]||e.default||e:void 0}const Rd=2e4;function Ld(e){let t=0;let n=e.next(t);for(;!n.done&&t<Rd;)t+=50,n=e.next(t);return t>=Rd?1/0:t}function $d(e){return"function"==typeof e}function Fd(e,t){e.timeline=t,e.onfinish=null}const Id=e=>Array.isArray(e)&&"number"==typeof e[0],qd={linearEasing:void 0};function zd(e,t){const n=$c(e);return()=>{var e;return null!==(e=qd[t])&&void 0!==e?e:n()}}const Vd=zd((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(Nz){return!1}return!0}),"linearEasing"),Bd=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(Fc(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ud(e){return Boolean("function"==typeof e&&Vd()||!e||"string"==typeof e&&(e in Hd||Vd())||Id(e)||Array.isArray(e)&&e.every(Ud))}const Kd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kd([0,.65,.55,1]),circOut:Kd([.55,0,1,.45]),backIn:Kd([.31,.01,.66,-.59]),backOut:Kd([.33,1.53,.69,.99])};function Wd(e,t){return e?"function"==typeof e&&Vd()?Bd(e,t):Id(e)?Kd(e):Array.isArray(e)?e.map((e=>Wd(e,t)||Hd.easeOut)):Hd[e]:void 0}const Gd={x:!1,y:!1};function Yd(){return Gd.x||Gd.y}function Qd(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Xd(e){return!("touch"===e.pointerType||Yd())}const Jd=(e,t)=>!!t&&(e===t||Jd(e,t.parentElement)),Zd=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,eh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const th=new WeakSet;function nh(e){return t=>{"Enter"===t.key&&e(t)}}function rh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function oh(e){return Zd(e)&&!Yd()}function ih(e,t,n={}){const[r,o,i]=Qd(e,n),s=e=>{const r=e.currentTarget;if(!oh(e)||th.has(r))return;th.add(r);const i=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),oh(e)&&th.has(r)&&(th.delete(r),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||Jd(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return r.forEach((e=>{(function(e){return eh.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0);(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,o),e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=nh((()=>{if(th.has(n))return;rh(n,"down");const e=nh((()=>{rh(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>rh(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}const sh=new Set(["width","height","top","left","right","bottom",...Ou]);let ah;function lh(){ah=void 0}const ch={now:()=>(void 0===ah&&ch.set(Wc.isProcessing||zc?Wc.timestamp:performance.now()),ah),set:e=>{ah=e,queueMicrotask(lh)}};function uh(e,t){-1===e.indexOf(t)&&e.push(t)}function dh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class hh{constructor(){this.subscriptions=[]}add(e){return uh(this.subscriptions,e),()=>dh(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fh(e,t){return t?e*(1e3/t):0}class ph{constructor(e,t={}){this.version="12.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=ch.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ch.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&ru(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new hh);const n=this.events[e].add(t);return"change"===e?()=>{n(),Kc.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ch.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return fh(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mh(e,t){return new ph(e,t)}function gh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,mh(n))}function yh(e,t){const n=e.getValue("willChange");if(r=n,Boolean(_u(r)&&r.add))return n.add(t);var r}function vh(e){return e.props[vu]}const bh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function xh(e,t,n,r){if(e===t&&n===r)return _c;const o=t=>function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=bh(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:bh(o(e),t,r)}const wh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Sh=e=>t=>1-e(1-t),kh=xh(.33,1.53,.69,.99),Ch=Sh(kh),Eh=wh(Ch),Ph=e=>(e*=2)<1?.5*Ch(e):.5*(2-Math.pow(2,-10*(e-1))),Dh=e=>1-Math.sin(Math.acos(e)),jh=Sh(Dh),Th=wh(Dh),Mh=e=>/^0[^.\s]+$/u.test(e);const Oh=e=>Math.round(1e5*e)/1e5,Ah=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Nh=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_h=(e,t)=>n=>Boolean("string"==typeof n&&Nh.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Rh=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,s,a]=r.match(Ah);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Lh={...$u,transform:e=>Math.round((e=>Lu(0,255,e))(e))},$h={test:_h("rgb","red"),parse:Rh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lh.transform(e)+", "+Lh.transform(t)+", "+Lh.transform(n)+", "+Oh(Fu.transform(r))+")"};const Fh={test:_h("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:$h.transform},Ih={test:_h("hsl","hue"),parse:Rh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Vu.transform(Oh(t))+", "+Vu.transform(Oh(n))+", "+Oh(Fu.transform(r))+")"},qh={test:e=>$h.test(e)||Fh.test(e)||Ih.test(e),parse:e=>$h.test(e)?$h.parse(e):Ih.test(e)?Ih.parse(e):Fh.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?$h.transform(e):Ih.transform(e)},zh=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Vh="number",Bh="color",Uh=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Uh,(e=>(qh.test(e)?(r.color.push(i),o.push(Bh),n.push(qh.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Vh),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:s,indexes:r,types:o}}function Hh(e){return Kh(e).values}function Wh(e){const{split:t,types:n}=Kh(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Vh?Oh(e[i]):t===Bh?qh.transform(e[i]):e[i]}return o}}const Gh=e=>"number"==typeof e?0:e;const Yh={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Ah))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(zh))||void 0===n?void 0:n.length)||0)>0},parse:Hh,createTransformer:Wh,getAnimatableNone:function(e){const t=Hh(e);return Wh(e)(t.map(Gh))}},Qh=new Set(["brightness","contrast","saturate","opacity"]);function Xh(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ah)||[];if(!r)return e;const o=n.replace(r,"");let i=Qh.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Jh=/\b([a-z-]*)\(.*?\)/gu,Zh={...Yh,getAnimatableNone:e=>{const t=e.match(Jh);return t?t.map(Xh).join(" "):e}},ef={...Qu,color:qh,backgroundColor:qh,outlineColor:qh,fill:qh,stroke:qh,borderColor:qh,borderTopColor:qh,borderRightColor:qh,borderBottomColor:qh,borderLeftColor:qh,filter:Zh,WebkitFilter:Zh},tf=e=>ef[e];function nf(e,t){let n=tf(e);return n!==Zh&&(n=Yh),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rf=new Set(["auto","none","0"]);const of=e=>e===$u||e===Bu,sf=(e,t)=>parseFloat(e.split(", ")[t]),af=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return sf(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?sf(t[1],e):0}},lf=new Set(["x","y","z"]),cf=Ou.filter((e=>!lf.has(e)));const uf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:af(4,13),y:af(5,14)};uf.translateX=uf.x,uf.translateY=uf.y;const df=new Set;let hf=!1,ff=!1;function pf(){if(ff){const e=Array.from(df).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return cf.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}ff=!1,hf=!1,df.forEach((e=>e.complete())),df.clear()}function mf(){df.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(ff=!0)}))}class gf{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(df.add(this),hf||(hf=!0,Kc.read(mf),Kc.resolveKeyframes(pf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),df.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,df.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bf(e,t,n=1){Lc(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=vf.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return yf(e)?parseFloat(e):e}return ju(o)?bf(o,t,n+1):o}const xf=e=>t=>t.test(e),wf=[$u,Bu,Vu,zu,Ku,Uu,{test:e=>"auto"===e,parse:e=>e}],Sf=e=>wf.find(xf(e));class kf extends gf{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),ju(n))){const r=bf(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!sh.has(n)||2!==e.length)return;const[r,o]=e,i=Sf(r),s=Sf(o);if(i!==s)if(of(i)&&of(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let o=0;o<e.length;o++)("number"==typeof(r=e[o])?0===r:null===r||"none"===r||"0"===r||Mh(r))&&n.push(o);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!rf.has(t)&&Kh(t).values.length&&(r=e[o]),o++}if(r&&n)for(const i of t)e[i]=nf(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=uf[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=uf[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Cf=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Yh.test(e)&&"0"!==e||e.startsWith("url(")));const Ef=e=>null!==e;function Pf(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Ef),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Df{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ch.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(mf(),pf()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=ch.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=Cf(o,t),a=Cf(i,t);return Rc(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||$d(n))&&r)}(e,n,r,o)){if(!i)return a&&a(Pf(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const jf=(e,t,n)=>e+(t-e)*n;function Tf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Mf(e,t){return n=>n>0?t:e}const Of=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Af=[Fh,$h,Ih];function Nf(e){const t=(n=e,Af.find((e=>e.test(n))));var n;if(Rc(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Ih&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Tf(a,r,e+1/3),i=Tf(a,r,e),s=Tf(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const _f=(e,t)=>{const n=Nf(e),r=Nf(t);if(!n||!r)return Mf(e,t);const o={...n};return e=>(o.red=Of(n.red,r.red,e),o.green=Of(n.green,r.green,e),o.blue=Of(n.blue,r.blue,e),o.alpha=jf(n.alpha,r.alpha,e),$h.transform(o))},Rf=(e,t)=>n=>t(e(n)),Lf=(...e)=>e.reduce(Rf),$f=new Set(["none","hidden"]);function Ff(e,t){return n=>jf(e,t,n)}function If(e){return"number"==typeof e?Ff:"string"==typeof e?ju(e)?Mf:qh.test(e)?_f:Vf:Array.isArray(e)?qf:"object"==typeof e?qh.test(e)?_f:zf:Mf}function qf(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>If(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function zf(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=If(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Vf=(e,t)=>{const n=Yh.createTransformer(t),r=Kh(e),o=Kh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?$f.has(e)&&!o.values.length||$f.has(t)&&!r.values.length?function(e,t){return $f.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Lf(qf(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=null!==(n=e.values[e.indexes[s][o[s]]])&&void 0!==n?n:0;r[i]=a,o[s]++}return r}(r,o),o.values),n):(Rc(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Mf(e,t))};function Bf(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return jf(e,t,n);return If(e)(e,t)}function Uf(e,t,n){const r=Math.max(t-5,0);return fh(n-e(r),t-r)}const Kf=100,Hf=10,Wf=1,Gf=0,Yf=800,Qf=.3,Xf=.3,Jf={granular:.01,default:2},Zf={granular:.005,default:.5},ep=.01,tp=10,np=.05,rp=1;function op({duration:e=Yf,bounce:t=Qf,velocity:n=Gf,mass:r=Wf}){let o,i;Rc(e<=Ic(tp),"Spring duration must be 10 seconds or less");let s=1-t;s=Lu(np,rp,s),e=Lu(ep,tp,qc(e)),s<1?(o=t=>{const r=t*s,o=r*e;return.001-(r-n)/sp(t,s)*Math.exp(-o)},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=sp(Math.pow(t,2),s);return(.001-o(t)>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let o=1;o<ip;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Ic(e),isNaN(a))return{stiffness:Kf,damping:Hf,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const ip=12;function sp(e,t){return e*Math.sqrt(1-t*t)}const ap=["duration","bounce"],lp=["stiffness","damping","mass"];function cp(e,t){return t.some((t=>void 0!==e[t]))}function up(e=Xf,t=Qf){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=function(e){let t={velocity:Gf,stiffness:Kf,damping:Hf,mass:Wf,isResolvedFromDuration:!1,...e};if(!cp(e,lp)&&cp(e,ap))if(e.visualDuration){const n=2*Math.PI/(1.2*e.visualDuration),r=n*n,o=2*Lu(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Wf,stiffness:r,damping:o}}else{const n=op(e);t={...t,...n,mass:Wf},t.isResolvedFromDuration=!0}return t}({...n,velocity:-qc(n.velocity||0)}),p=h||0,m=c/(2*Math.sqrt(l*u)),g=s-i,y=qc(Math.sqrt(l/u)),v=Math.abs(g)<5;let b;if(r||(r=v?Jf.granular:Jf.default),o||(o=v?Zf.granular:Zf.default),m<1){const e=sp(y,m);b=t=>{const n=Math.exp(-m*y*t);return s-n*((p+m*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>s-Math.exp(-y*e)*(g+(p+y*g)*e);else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return s-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:f&&d||null,next:e=>{const t=b(e);if(f)a.done=e>=d;else{let n=0;m<1&&(n=0===e?Ic(p):Uf(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(s-t)<=o;a.done=i&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(Ld(x),Rd),t=Bd((t=>x.next(e*t).value),e,30);return e+"ms "+t}};return x}function dp({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},f=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let p=n*t;const m=d+p,g=void 0===s?m:s(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const S=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=up({keyframes:[h.value,f(h.value)],velocity:Uf(v,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),S(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}const hp=xh(.42,0,1,1),fp=xh(0,0,.58,1),pp=xh(.42,0,.58,1),mp={linear:_c,easeIn:hp,easeInOut:pp,easeOut:fp,circIn:Dh,circInOut:Th,circOut:jh,backIn:Ch,backInOut:Eh,backOut:kh,anticipate:Ph},gp=e=>{if(Id(e)){Lc(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return xh(t,n,r,o)}return"string"==typeof e?(Lc(void 0!==mp[e],`Invalid easing type '${e}'`),mp[e]):e};function yp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Lc(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||Bf,i=e.length-1;for(let s=0;s<i;s++){let n=o(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||_c:t;n=Lf(e,n)}r.push(n)}return r}(t,r,o),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);return a[r](Fc(e[r],e[r+1],n))};return n?t=>c(Lu(e[0],e[i-1],t)):c}function vp(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++)e.push(jf(n,1,Fc(0,t,r)))}(t,e.length-1),t}function bp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gp):gp(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:vp(t),e),a=yp(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||pp)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const xp=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Kc.update(t,!0),stop:()=>Hc(t),now:()=>Wc.isProcessing?Wc.timestamp:ch.now()}},wp={decay:dp,inertia:dp,tween:bp,keyframes:bp,spring:up},Sp=e=>e/100;class kp extends Df{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new((null==r?void 0:r.KeyframeResolver)||gf)(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=$d(t)?t:wp[t]||bp;let a,l;s!==bp&&"number"!=typeof e[0]&&("production"!==process.env.NODE_ENV&&Lc(2===e.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),a=Lf(Sp,Bf(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=Ld(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:h,repeatType:f,repeatDelay:p,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),this.currentTime=t?e:null!==this.holdTime?this.holdTime:Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===f?(n=1-n,p&&(n-=p/u)):"mirror"===f&&(b=i)),v=Lu(0,1,n)*u}const x=y?{done:!1,value:a[0]}:b.next(v);s&&(x.value=s(x.value));let{done:w}=x;y||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&void 0!==r&&(x.value=Pf(a,this.options,r)),m&&m(x.value),S&&this.finish(),x}get duration(){const{resolved:e}=this;return e?qc(e.calculatedDuration):0}get time(){return qc(this.currentTime)}set time(e){this.currentTime=e=Ic(e),null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=qc(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=xp,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Cp=new Set(["opacity","clipPath","filter","transform"]);function Ep(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Wd(a,o);Array.isArray(u)&&(c.easing=u);return e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}const Pp=$c((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Dp={anticipate:Ph,backInOut:Eh,circInOut:Th};class jp extends Df{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new kf(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof o&&Vd()&&o in Dp&&(o=Dp[o]),$d((c=this.options).type)||"spring"===c.type||!Ud(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new kp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=Ep(s.owner.current,a,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Fd(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(Pf(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return qc(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return qc(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Ic(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return _c;const{animation:n}=t;Fd(n,e)}else this.pendingTimeline=e;return _c}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new kp({...c,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),d=Ic(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return Pp()&&n&&Cp.has(n)&&!a&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const Tp={type:"spring",stiffness:500,damping:25,restSpeed:10},Mp={type:"keyframes",duration:.8},Op={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ap=(e,{keyframes:t})=>t.length>2?Mp:Au.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Tp:Op;const Np=(e,t,n,r={},o,i)=>s=>{const a=_d(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ic(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Ap(e,u)}),u.duration&&(u.duration=Ic(u.duration)),u.repeatDelay&&(u.repeatDelay=Ic(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=Pf(u.keyframes,a);if(void 0!==e)return Kc.update((()=>{u.onUpdate(e),u.onComplete()})),new Nd([])}return!i&&jp.supports(u)?new jp(u):new kp(u)};function _p({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Rp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const t=e.getValue(d,null!==(i=e.latestValues[d])&&void 0!==i?i:null),r=l[d];if(void 0===r||u&&_p(u,d))continue;const o={delay:n,..._d(s||{},d)};let a=!1;if(window.MotionHandoffAnimation){const t=vh(e);if(t){const e=window.MotionHandoffAnimation(t,d,Kc);null!==e&&(o.startTime=e,a=!0)}}yh(e,d),t.start(Np(d,t,r,e.shouldReduceMotion&&sh.has(d)?{type:!1}:o,e,a));const h=t.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{Kc.update((()=>{a&&function(e,t){const n=Md(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i)gh(e,a,gd(s=i[a])?s[s.length-1]||0:s);var s}(e,a)}))})),c}function Lp(e,t,n={}){var r;const o=Md(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Rp(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort($p).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Lp(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function $p(e,t){return e.sortNodePosition(t)}function Fp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Ip=cu.length;function qp(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&qp(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Ip;n++){const r=cu[n],o=e.props[r];(au(o)||!1===o)&&(t[r]=o)}return t}const zp=[...lu].reverse(),Vp=lu.length;function Bp(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Lp(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Lp(e,t,n);else{const o="function"==typeof t?Md(e,t,n.custom):t;r=Promise.all(Rp(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Up(e){let t=Bp(e),n=Wp(),r=!0;const o=t=>(n,r)=>{var o;const i=Md(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,a=qp(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Vp;t++){const h=zp[t],f=n[h],p=void 0!==s[h]?s[h]:a[h],m=au(p),g=h===i?f.isActive:null;!1===g&&(d=t);let y=p===a[h]&&p!==s[h]&&m;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),f.protectedKeys={...u},!f.isActive&&null===g||!p&&!f.prevProp||su(p)||"boolean"==typeof p)continue;const v=Kp(f.prevProp,p);let b=v||h===i&&f.isActive&&!y&&m||t>d&&m,x=!1;const w=Array.isArray(p)?p:[p];let S=w.reduce(o(h),{});!1===g&&(S={});const{prevResolvedValues:k={}}=f,C={...k,...S},E=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=S[e],n=k[e];if(u.hasOwnProperty(e))continue;let r=!1;r=gd(t)&&gd(n)?!Fp(t,n):t!==n,r?null!=t?E(e):c.add(e):void 0!==t&&c.has(e)?E(e):f.protectedKeys[e]=!0}f.prevProp=p,f.prevResolvedValues=S,f.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||x)&&l.push(...w.map((e=>({animation:e,options:{type:h}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let h=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Wp(),r=!0}}}function Kp(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Fp(t,e)}function Hp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wp(){return{animate:Hp(!0),whileInView:Hp(),whileHover:Hp(),whileTap:Hp(),whileDrag:Hp(),whileFocus:Hp(),exit:Hp()}}class Gp{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Yp=0;const Qp={animation:{Feature:class extends Gp{constructor(e){super(e),e.animationState||(e.animationState=Up(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();su(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Gp{constructor(){super(...arguments),this.id=Yp++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Xp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Jp(e){return{point:{x:e.pageX,y:e.pageY}}}function Zp(e,t,n,r){return Xp(e,t,(e=>t=>Zd(t)&&e(t,Jp(t)))(n),r)}const em=(e,t)=>Math.abs(e-t);class tm{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=om(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=em(e.x,t.x),r=em(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Wc;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=nm(t,this.transformPagePoint),Kc.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=om("pointercancel"===e.type?this.lastMoveEventInfo:nm(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Zd(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=nm(Jp(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Wc;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,om(i,this.history)),this.removeListeners=Lf(Zp(this.contextWindow,"pointermove",this.handlePointerMove),Zp(this.contextWindow,"pointerup",this.handlePointerUp),Zp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Hc(this.updatePoint)}}function nm(e,t){return t?{point:t(e.point)}:e}function rm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function om({point:e},t){return{point:e,delta:rm(e,sm(t)),offset:rm(e,im(t)),velocity:am(t,.1)}}function im(e){return e[0]}function sm(e){return e[e.length-1]}function am(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=sm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ic(t)));)n--;if(!r)return{x:0,y:0};const i=qc(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function lm(e){return e.max-e.min}function cm(e,t,n,r=.5){e.origin=r,e.originPoint=jf(t.min,t.max,e.origin),e.scale=lm(n)/lm(t),e.translate=jf(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function um(e,t,n,r){cm(e.x,t.x,n.x,r?r.originX:void 0),cm(e.y,t.y,n.y,r?r.originY:void 0)}function dm(e,t,n){e.min=n.min+t.min,e.max=e.min+lm(t)}function hm(e,t,n){e.min=t.min-n.min,e.max=e.min+lm(t)}function fm(e,t,n){hm(e.x,t.x,n.x),hm(e.y,t.y,n.y)}function pm(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function mm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const gm=.35;function ym(e,t,n){return{min:vm(e,t),max:vm(e,n)}}function vm(e,t){return"number"==typeof e?e:e[t]||0}const bm=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xm(e){return[e("x"),e("y")]}function wm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Sm(e){return void 0===e||1===e}function km({scale:e,scaleX:t,scaleY:n}){return!Sm(e)||!Sm(t)||!Sm(n)}function Cm(e){return km(e)||Em(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Em(e){return Pm(e.x)||Pm(e.y)}function Pm(e){return e&&"0%"!==e}function Dm(e,t,n){return n+t*(e-n)}function jm(e,t,n,r,o){return void 0!==o&&(e=Dm(e,o,r)),Dm(e,n,r)+t}function Tm(e,t=0,n=1,r,o){e.min=jm(e.min,t,n,r,o),e.max=jm(e.max,t,n,r,o)}function Mm(e,{x:t,y:n}){Tm(e.x,t.translate,t.scale,t.originPoint),Tm(e.y,n.translate,n.scale,n.originPoint)}const Om=.999999999999,Am=1.0000000000001;function Nm(e,t){e.min=e.min+t,e.max=e.max+t}function _m(e,t,n,r,o=.5){Tm(e,t,n,jf(e.min,e.max,o),r)}function Rm(e,t){_m(e.x,t.x,t.scaleX,t.scale,t.originX),_m(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lm(e,t){return wm(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const $m=({current:e})=>e?e.ownerDocument.defaultView:null,Fm=new WeakMap;class Im{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new tm(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Jp(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?Gd[i]?null:(Gd[i]=!0,()=>{Gd[i]=!1}):Gd.x||Gd.y?null:(Gd.x=Gd.y=!0,()=>{Gd.x=Gd.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xm((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Vu.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=lm(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Kc.postRender((()=>o(e,t))),yh(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>xm((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:$m(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Kc.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!qm(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?jf(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?jf(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&mu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:pm(e.x,n,o),y:pm(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=gm){return!1===e?e=0:!0===e&&(e=gm),{x:ym(e,"left","right"),y:ym(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xm((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!mu(e))return!1;const n=e.current;Lc(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Lm(e,n),{scroll:o}=t;return o&&(Nm(r.x,o.offset.x),Nm(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:mm(e.x,t.x),y:mm(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=wm(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=xm((s=>{if(!qm(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,c)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return yh(this.visualElement,e),n.start(Np(e,n,0,t,this.visualElement,!1))}stopAnimation(){xm((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){xm((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){xm((t=>{const{drag:n}=this.getProps();if(!qm(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-jf(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!mu(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};xm((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=lm(e),o=lm(t);return o>r?n=Fc(t.min,t.max-r,e.min):r>o&&(n=Fc(e.min,e.max-o,t.min)),Lu(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),xm((t=>{if(!qm(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(jf(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Fm.set(this.visualElement,this);const e=Zp(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();mu(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Kc.read(t);const o=Xp(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(xm((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=gm,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function qm(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const zm=e=>(t,n)=>{e&&Kc.postRender((()=>e(t,n)))};const Vm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Um={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Bu.test(e))return e;e=parseFloat(e)}return`${Bm(e,t.target.x)}% ${Bm(e,t.target.y)}%`}},Km={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yh.parse(e);if(o.length>5)return r;const i=Yh.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=jf(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}};class Hm extends n.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;!function(e){for(const t in e)Mu[t]=e[t],Pu(t)&&(Mu[t].isCSSVariable=!0)}(Gm),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Vm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Kc.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),bu.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Wm(e){const[r,o]=jc(),i=n.useContext(xc);return t.jsx(Hm,{...e,layoutGroup:i,switchLayoutGroup:n.useContext(xu),isPresent:r,safeToRemove:o})}const Gm={borderRadius:{...Um,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Um,borderTopRightRadius:Um,borderBottomLeftRadius:Um,borderBottomRightRadius:Um,boxShadow:Km};const Ym=(e,t)=>e.depth-t.depth;class Qm{constructor(){this.children=[],this.isDirty=!1}add(e){uh(this.children,e),this.isDirty=!0}remove(e){dh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ym),this.isDirty=!1,this.children.forEach(e)}}const Xm=["TopLeft","TopRight","BottomLeft","BottomRight"],Jm=Xm.length,Zm=e=>"string"==typeof e?parseFloat(e):e,eg=e=>"number"==typeof e||Bu.test(e);function tg(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ng=og(0,.5,jh),rg=og(.5,.95,_c);function og(e,t,n){return r=>r<e?0:r>t?1:n(Fc(e,t,r))}function ig(e,t){e.min=t.min,e.max=t.max}function sg(e,t){ig(e.x,t.x),ig(e.y,t.y)}function ag(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function lg(e,t,n,r,o){return e=Dm(e-=t,1/n,r),void 0!==o&&(e=Dm(e,1/o,r)),e}function cg(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){Vu.test(t)&&(t=parseFloat(t),t=jf(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=jf(i.min,i.max,r);e===i&&(a-=t),e.min=lg(e.min,t,n,a,o),e.max=lg(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const ug=["x","scaleX","originX"],dg=["y","scaleY","originY"];function hg(e,t,n,r){cg(e.x,t,ug,n?n.x:void 0,r?r.x:void 0),cg(e.y,t,dg,n?n.y:void 0,r?r.y:void 0)}function fg(e){return 0===e.translate&&1===e.scale}function pg(e){return fg(e.x)&&fg(e.y)}function mg(e,t){return e.min===t.min&&e.max===t.max}function gg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yg(e,t){return gg(e.x,t.x)&&gg(e.y,t.y)}function vg(e){return lm(e.x)/lm(e.y)}function bg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class xg{constructor(){this.members=[]}add(e){uh(this.members,e),e.scheduleRender()}remove(e){if(dh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const wg=["","X","Y","Z"],Sg={visibility:"hidden"};let kg=0;function Cg(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Eg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vh(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Kc,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Eg(r)}function Pg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=kg++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Tg),this.nodes.forEach(Lg),this.nodes.forEach($g),this.nodes.forEach(Mg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Qm)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new hh),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=ch.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Hc(r),e(i-t))};return Kc.read(r,!0),()=>Hc(r)}(r,250),Vm.hasAnimatedSinceResize&&(Vm.hasAnimatedSinceResize=!1,this.nodes.forEach(Rg))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Bg,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!yg(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={..._d(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Rg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Hc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Fg),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Eg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ag);this.isUpdating||this.nodes.forEach(Ng),this.isUpdating=!1,this.nodes.forEach(_g),this.nodes.forEach(Dg),this.nodes.forEach(jg),this.clearAllSnapshots();const e=ch.now();Wc.delta=Lu(0,1e3/60,e-Wc.timestamp),Wc.timestamp=e,Wc.isProcessing=!0,Gc.update.process(Wc),Gc.preRender.process(Wc),Gc.render.process(Wc),Wc.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Og),this.sharedNodes.forEach(Ig)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kc.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kc.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||lm(this.snapshot.measuredBox.x)||lm(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!pg(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Cm(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Hg((r=n).x),Hg(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Gg))){const{scroll:e}=this.root;e&&(Nm(n.x,e.offset.x),Nm(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(sg(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:i}=t;t!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&sg(n,e),Nm(n.x,o.offset.x),Nm(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};sg(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Rm(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Cm(e.latestValues)&&Rm(n,e.latestValues)}return Cm(this.latestValues)&&Rm(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};sg(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Cm(e.latestValues))continue;km(e.latestValues)&&e.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};sg(r,e.measurePageBox()),hg(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Cm(this.latestValues)&&hg(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Wc.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Wc.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},fm(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),sg(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dm((s=this.target).x,(a=this.relativeTarget).x,(l=this.relativeParent.target).x),dm(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):sg(this.target,this.layout.layoutBox),Mm(this.target,this.targetDelta)):sg(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},fm(this.relativeTargetOrigin,this.target,e.target),sg(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!km(this.parent.latestValues)&&!Em(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Wc.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;sg(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Rm(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Mm(e,s)),r&&Cm(i.latestValues)&&Rm(e,i.latestValues))}t.x<Am&&t.x>Om&&(t.x=1),t.y<Am&&t.y>Om&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(ag(this.prevProjectionDelta.x,this.projectionDelta.x),ag(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),um(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&bg(this.projectionDelta.x,this.prevProjectionDelta.x)&&bg(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Vg));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,f,p,m,g;qg(i.x,e.x,n),qg(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fm(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zg((f=this.relativeTarget).x,(p=this.relativeTargetOrigin).x,(m=s).x,g=n),zg(f.y,p.y,m.y,g),d&&(mg((l=this.relativeTarget).x,(h=d).x)&&mg(l.y,h.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),sg(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=jf(0,void 0!==n.opacity?n.opacity:1,ng(r)),e.opacityExit=jf(void 0!==t.opacity?t.opacity:1,0,rg(r))):i&&(e.opacity=jf(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Jm;s++){const o=`border${Xm[s]}Radius`;let i=tg(t,o),a=tg(n,o);void 0===i&&void 0===a||(i||(i=0),a||(a=0),0===i||0===a||eg(i)===eg(a)?(e[o]=Math.max(jf(Zm(i),Zm(a),r),0),(Vu.test(a)||Vu.test(i))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=jf(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Hc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kc.update((()=>{Vm.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=_u(e)?e:mh(e);return r.start(Np("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Wg(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=lm(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=lm(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sg(t,n),Rm(t,o),um(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new xg);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Cg("z",e,r,this.animationValues);for(let o=0;o<wg.length;o++)Cg(`rotate${wg[o]}`,e,r,this.animationValues),Cg(`skew${wg[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Sg;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=yd(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=yd(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Cm(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,r.opacity=i.animationValues?i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Mu){if(void 0===s[c])continue;const{correct:e,applyTo:t,isCSSVariable:n}=Mu[c],o="none"===r.transform?s[c]:e(s[c],i);if(t){const e=t.length;for(let n=0;n<e;n++)r[t[n]]=o}else n?this.options.visualElement.renderState.vars[c]=o:r[c]=o}return this.options.layoutId&&(r.pointerEvents=i===this?yd(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Ag),this.root.sharedNodes.clear()}}}function Dg(e){e.updateLayout()}function jg(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?xm((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=lm(r);r.min=t[e].min,r.max=r.min+o})):Wg(o,n.layoutBox,t)&&xm((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=lm(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};um(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?um(a,e.applyTransform(r,!0),n.measuredBox):um(a,t,n.layoutBox);const l=!pg(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};fm(s,n.layoutBox,o.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};fm(a,t,i.layoutBox),yg(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Tg(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Mg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Og(e){e.clearSnapshot()}function Ag(e){e.clearMeasurements()}function Ng(e){e.isLayoutDirty=!1}function _g(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Lg(e){e.resolveTargetDelta()}function $g(e){e.calcProjection()}function Fg(e){e.resetSkewAndRotation()}function Ig(e){e.removeLeadSnapshot()}function qg(e,t,n){e.translate=jf(t.translate,0,n),e.scale=jf(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zg(e,t,n,r){e.min=jf(t.min,n.min,r),e.max=jf(t.max,n.max,r)}function Vg(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Bg={duration:.45,ease:[.4,0,.1,1]},Ug=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Kg=Ug("applewebkit/")&&!Ug("chrome/")?Math.round:_c;function Hg(e){e.min=Kg(e.min),e.max=Kg(e.max)}function Wg(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=vg(t),o=vg(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function Gg(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Yg=Pg({attachResizeListener:(e,t)=>Xp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qg={current:void 0},Xg=Pg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qg.current){const e=new Yg({});e.mount(window),e.setOptions({layoutScroll:!0}),Qg.current=e}return Qg.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Jg={pan:{Feature:class extends Gp{constructor(){super(...arguments),this.removePointerDownListener=_c}onPointerDown(e){this.session=new tm(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$m(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:zm(e),onStart:zm(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Kc.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Zp(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Gp{constructor(e){super(e),this.removeGroupControls=_c,this.removeListeners=_c,this.controls=new Im(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_c}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Xg,MeasureLayout:Wm}};function Zg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Kc.postRender((()=>o(t,Jp(t))))}function ey(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Kc.postRender((()=>o(t,Jp(t))))}const ty=new WeakMap,ny=new WeakMap,ry=e=>{const t=ty.get(e.target);t&&t(e)},oy=e=>{e.forEach(ry)};function iy(e,t,n){const r=function({root:e,...t}){const n=e||document;ny.has(n)||ny.set(n,{});const r=ny.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(oy,{root:e,...t})),r[o]}(t);return ty.set(e,n),r.observe(e),()=>{ty.delete(e),r.unobserve(e)}}const sy={some:0,all:1};const ay={inView:{Feature:class extends Gp{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e;return iy(this.node.current,{root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sy[r]},(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Gp{mount(){const{current:e}=this.node;e&&(this.unmount=ih(e,((e,t)=>(ey(this.node,t,"Start"),(e,{success:t})=>ey(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Gp{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(Nz){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lf(Xp(this.node.current,"focus",(()=>this.onFocus())),Xp(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Gp{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Qd(e,n),s=e=>{if(!Xd(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const i=e=>{Xd(e)&&(r(e),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,o)};return r.forEach((e=>{e.addEventListener("pointerenter",s,o)})),i}(e,((e,t)=>(Zg(this.node,t,"Start"),e=>Zg(this.node,e,"End")))))}unmount(){}}}},ly={layout:{ProjectionNode:Xg,MeasureLayout:Wm}},cy={current:null},uy={current:!1};const dy=[...wf,qh,Yh],hy=new WeakMap;const fy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class py{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=ch.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Kc.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=uu(t),this.isVariantNode=du(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const h in d){const e=d[h];void 0!==a[h]&&_u(e)&&e.set(a[h],!1)}}mount(e){this.current=e,hy.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),uy.current||function(){if(uy.current=!0,Oc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cy.current=e.matches;e.addListener(t),t()}else cy.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||cy.current),"production"!==process.env.NODE_ENV&&ru(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hc(this.notifyUpdate),Hc(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Au.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Kc.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Xc){const t=Xc[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<fy.length;n++){const t=fy[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_u(o))e.addValue(r,o),"development"===process.env.NODE_ENV&&ru("12.4.0"===o.version,`Attempting to mix Motion versions ${o.version} with 12.4.0 may not work as expected.`);else if(_u(i))e.addValue(r,mh(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,mh(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=mh(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(yf(r)||Mh(r))?r=parseFloat(r):!dy.find(xf(r))&&Yh.test(t)&&(r=nf(e,t)),this.setBaseTarget(e,_u(r)?r.get():r)),_u(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=md(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||_u(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new hh),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class my extends py{constructor(){super(...arguments),this.KeyframeResolver=kf}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_u(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class gy extends my{constructor(){super(...arguments),this.type="html",this.renderInstance=kd}readValueFromInstance(e,t){if(Au.has(t)){const e=tf(t);return e&&e.default||0}{const n=window.getComputedStyle(e),r=(Pu(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Lm(e,t)}build(e,t,n){Zu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return xd(e,t,n)}}class yy extends my{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=bm,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Sd(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Au.has(t)){const e=tf(t);return e&&e.default||0}return t=Cd.has(t)?t:yu(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Pd(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&Kc.postRender(this.updateDimensions)}build(e,t,n){cd(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Ed(e,t,0,r)}mount(e){this.isSVGTag=dd(e.tagName),super.mount(e)}}const vy=ou(Td({...Qp,...ay,...Jg,...ly},((e,t)=>id(e)?new yy(t):new gy(t,{allowProjection:e!==n.Fragment})))),by=({children:e})=>t.jsx("h3",{className:"scroll-m-20 text-2xl font-semibold tracking-tight",children:e}),xy=({size:e=35,color:r="black",speed:o=.9,strokeWidth:i=3.5,text:s,textSpeed:a=2e3})=>{const[l,c]=n.useState(0),u=Array.isArray(s)?s:s?[s]:[];return n.useEffect((()=>{if(u.length<=1)return;if(l>=u.length-1)return;const e=setInterval((()=>{c((e=>e<u.length-1?e+1:e))}),a);return()=>clearInterval(e)}),[u.length,a,l]),t.jsx("div",{className:"flex flex-col justify-center items-center h-full",children:t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[t.jsxs("div",{className:"loader-container",style:{"--uib-size":`${e}px`,"--uib-color":r,"--uib-speed":`${o}s`,"--uib-stroke":`${i}px`},children:[t.jsx("div",{className:"line"}),t.jsx("div",{className:"line"}),t.jsx("div",{className:"line"}),t.jsx("div",{className:"line"}),t.jsx("div",{className:"line"}),t.jsx("div",{className:"line"})]}),u.length>0&&t.jsx("div",{className:"text-center text-sm text-muted-foreground animate-fade-in",children:t.jsx(by,{children:u[l]})},l),t.jsx("style",{children:"\n .loader-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n height: var(--uib-size);\n width: var(--uib-size);\n }\n .line {\n position: absolute;\n top: calc(50% - var(--uib-stroke) / 2);\n left: 0;\n height: var(--uib-stroke);\n width: 100%;\n border-radius: calc(var(--uib-stroke) / 2);\n background-color: var(--uib-color);\n animation: rotate var(--uib-speed) ease-in-out infinite;\n transition: background-color 0.3s ease;\n }\n .line:nth-child(1) {\n animation-delay: calc(var(--uib-speed) * -0.375);\n }\n .line:nth-child(2) {\n animation-delay: calc(var(--uib-speed) * -0.375);\n opacity: 0.8;\n }\n .line:nth-child(3) {\n animation-delay: calc(var(--uib-speed) * -0.3);\n opacity: 0.6;\n }\n .line:nth-child(4) {\n animation-delay: calc(var(--uib-speed) * -0.225);\n opacity: 0.4;\n }\n .line:nth-child(5) {\n animation-delay: calc(var(--uib-speed) * -0.15);\n opacity: 0.2;\n }\n .line:nth-child(6) {\n animation-delay: calc(var(--uib-speed) * -0.075);\n opacity: 0.1;\n }\n @keyframes rotate {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(180deg);\n }\n }\n .animate-fade-in {\n animation: fadeIn 0.5s ease-in-out;\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "})]})})},wy="/segments",Sy="/automations",ky="/communication-groups",Cy=async(e,t)=>(await Ja(`${Sy}/${e}`,{method:"PATCH",body:JSON.stringify(t)})).data,Ey=e=>{const t=ue({queryKey:["automations",e],queryFn:()=>(async e=>(await Ja(`${Sy}/${e}`)).data)(e)});return{automation:t.data,isFetching:t.isFetching,isLoading:t.isLoading,fetchError:t.error,refetchAutomation:t.refetch}},Py=e=>{const t=ue({queryKey:["automations",e,"recipients"],queryFn:()=>(async e=>(await Ja(`${Sy}/${e}/recipients`)).data)(e)});return{recipients:t.data,isFetching:t.isFetching,isLoading:t.isLoading,fetchError:t.error,refetchAutomationRecipients:t.refetch}},Dy=()=>{const e=ne(),t=de({mutationFn:e=>(async e=>(await Ja(Sy,{method:"POST",body:JSON.stringify(e)})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["automations"]})}});return{createAutomation:t.mutate,isCreating:t.isPending,createError:t.error,isCreateSuccess:t.isSuccess}},jy=e=>{const t=ne(),n=de({mutationFn:t=>Cy(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:["automations"]})}});return{updateAutomation:n.mutate,isUpdating:n.isPending,updateError:n.error,isUpdateSuccess:n.isSuccess}};var Ty=(e=>(e.ONE_TIME="one_time",e))(Ty||{}),My=(e=>(e.DRAFT="draft",e.ACTIVE="active",e.RUNNING="running",e.SCHEDULED="scheduled",e.COMPLETED="completed",e.FAILED="failed",e.DEACTIVATED="deactivated",e))(My||{});
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.464.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
const Oy=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim()
|
|
17
|
+
/**
|
|
18
|
+
* @license lucide-react v0.464.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/;var Ay={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
23
|
+
/**
|
|
24
|
+
* @license lucide-react v0.464.0 - ISC
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the ISC license.
|
|
27
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/const Ny=n.forwardRef((({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>n.createElement("svg",{ref:c,...Ay,width:t,height:t,stroke:e,strokeWidth:o?24*Number(r)/Number(t):r,className:Oy("lucide",i),...l},[...a.map((([e,t])=>n.createElement(e,t))),...Array.isArray(s)?s:[s]]))),_y=(e,t)=>{const r=n.forwardRef((({className:r,...o},i)=>{return n.createElement(Ny,{ref:i,iconNode:t,className:Oy(`lucide-${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...o});var s}));return r.displayName=`${e}`,r},Ry=_y("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Ly=_y("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),$y=_y("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Fy=_y("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Iy=_y("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),qy=_y("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),zy=_y("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Vy=_y("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),By=_y("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Uy=_y("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ky=_y("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Hy={PrimaryButton:"bg-purple-600 text-white rounded-lg",PrimaryButtonHover:"hover:bg-purple-700",PrimaryButtonDisabled:"opacity-50 cursor-not-allowed",SecondaryButton:"border bg-gray-100 text-gray-800 rounded-lg",SecondaryButtonHover:"hover:bg-gray-200"},Wy={CloseButton:Ky,DropdownMenuTrigger:$y,UserIcon:Uy,ScheduleButton:Ry,SendButton:By,BackButton:Fy,NextButton:Iy},Gy=e=>({...Hy,...e||{}}),Yy=e=>({...Wy,...e||{}});
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v0.464.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/function Qy(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Qy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qy(e))&&(r&&(r+=" "),r+=t);return r}const Jy=e=>{const t=nv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Zy(n,t)||tv(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},Zy=(e,t)=>{if(0===e.length)return t.classGroupId;const n=t.nextPart.get(e[0]),r=n?Zy(e.slice(1),n):void 0;if(r)return r;if(0===t.validators.length)return;const o=e.join("-");return t.validators.find((({validator:e})=>e(o)))?.classGroupId},ev=/^\[(.+)\]$/,tv=e=>{if(ev.test(e)){const t=ev.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},nv=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sv(Object.entries(e.classGroups),n).forEach((([e,n])=>{rv(n,r,e,t)})),r},rv=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return iv(e)?void rv(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{rv(o,ov(t,e),n,r)}))}else{(""===e?t:ov(t,e)).classGroupId=n}}))},ov=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},iv=e=>e.isThemeGetter,sv=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,av=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},lv=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let d=0;d<e.length;d++){let c=e[d];if(0===a){if(c===o&&(r||e.slice(d,d+i)===t)){n.push(e.slice(l,d)),l=d+i;continue}if("/"===c){s=d;continue}}"["===c?a++:"]"===c&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},cv=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},uv=/\s+/;function dv(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=hv(e))&&(r&&(r+=" "),r+=t);return r}const hv=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hv(e[r]))&&(n&&(n+=" "),n+=t);return n};function fv(e,...t){let n,r,o,i=function(a){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:av(e.cacheSize),parseClassName:lv(e),...Jy(e)}))(l),r=n.cache.get,o=n.cache.set,i=s,s(a)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(uv);let a="";for(let l=s.length-1;l>=0;l-=1){const e=s[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(e);let h=Boolean(d),f=r(h?u.substring(0,d):u);if(!f){if(!h){a=e+(a.length>0?" "+a:a);continue}if(f=r(u),!f){a=e+(a.length>0?" "+a:a);continue}h=!1}const p=cv(t).join(":"),m=c?p+"!":p,g=m+f;if(i.includes(g))continue;i.push(g);const y=o(f,h);for(let n=0;n<y.length;++n)i.push(m+y[n]);a=e+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(dv.apply(null,arguments))}}const pv=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},mv=/^\[(?:([a-z-]+):)?(.+)\]$/i,gv=/^\d+\/\d+$/,yv=new Set(["px","full","screen"]),vv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kv=e=>Ev(e)||yv.has(e)||gv.test(e),Cv=e=>Fv(e,"length",Iv),Ev=e=>Boolean(e)&&!Number.isNaN(Number(e)),Pv=e=>Fv(e,"number",Ev),Dv=e=>Boolean(e)&&Number.isInteger(Number(e)),jv=e=>e.endsWith("%")&&Ev(e.slice(0,-1)),Tv=e=>mv.test(e),Mv=e=>vv.test(e),Ov=new Set(["length","size","percentage"]),Av=e=>Fv(e,Ov,qv),Nv=e=>Fv(e,"position",qv),_v=new Set(["image","url"]),Rv=e=>Fv(e,_v,Vv),Lv=e=>Fv(e,"",zv),$v=()=>!0,Fv=(e,t,n)=>{const r=mv.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Iv=e=>bv.test(e)&&!xv.test(e),qv=()=>!1,zv=e=>wv.test(e),Vv=e=>Sv.test(e),Bv=fv((()=>{const e=pv("colors"),t=pv("spacing"),n=pv("blur"),r=pv("brightness"),o=pv("borderColor"),i=pv("borderRadius"),s=pv("borderSpacing"),a=pv("borderWidth"),l=pv("contrast"),c=pv("grayscale"),u=pv("hueRotate"),d=pv("invert"),h=pv("gap"),f=pv("gradientColorStops"),p=pv("gradientColorStopPositions"),m=pv("inset"),g=pv("margin"),y=pv("opacity"),v=pv("padding"),b=pv("saturate"),x=pv("scale"),w=pv("sepia"),S=pv("skew"),k=pv("space"),C=pv("translate"),E=()=>["auto",Tv,t],P=()=>[Tv,t],D=()=>["",kv,Cv],j=()=>["auto",Ev,Tv],T=()=>["","0",Tv],M=()=>[Ev,Tv];return{cacheSize:500,separator:":",theme:{colors:[$v],spacing:[kv,Cv],blur:["none","",Mv,Tv],brightness:M(),borderColor:[e],borderRadius:["none","","full",Mv,Tv],borderSpacing:P(),borderWidth:D(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[jv,Cv],inset:E(),margin:E(),opacity:M(),padding:P(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Tv]}],container:["container"],columns:[{columns:[Mv]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Tv]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Dv,Tv]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Tv]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Dv,Tv]}],"grid-cols":[{"grid-cols":[$v]}],"col-start-end":[{col:["auto",{span:["full",Dv,Tv]},Tv]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[$v]}],"row-start-end":[{row:["auto",{span:[Dv,Tv]},Tv]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Tv]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Tv]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Tv,t]}],"min-w":[{"min-w":[Tv,t,"min","max","fit"]}],"max-w":[{"max-w":[Tv,t,"none","full","min","max","fit","prose",{screen:[Mv]},Mv]}],h:[{h:[Tv,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Tv,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Tv,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Tv,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Mv,Cv]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pv]}],"font-family":[{font:[$v]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Tv]}],"line-clamp":[{"line-clamp":["none",Ev,Pv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kv,Tv]}],"list-image":[{"list-image":["none",Tv]}],"list-style-type":[{list:["none","disc","decimal",Tv]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kv,Cv]}],"underline-offset":[{"underline-offset":["auto",kv,Tv]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Tv]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Tv]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Nv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Av]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[kv,Tv]}],"outline-w":[{outline:[kv,Cv]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[kv,Cv]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Mv,Lv]}],"shadow-color":[{shadow:[$v]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Mv,Tv]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Tv]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Tv]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Tv]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Dv,Tv]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Tv]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Tv]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Tv]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kv,Cv,Pv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Uv(...e){return Bv(Xy(e))}const Kv=({onClose:e,tailwindClassDefinitions:n,currentStep:r,setCurrentStep:o,isDisabled:i,createAutomation:s})=>t.jsx("div",{children:t.jsxs("div",{className:"flex justify-end space-x-4",children:[t.jsx("button",{className:Uv("px-4 py-2",n?.SecondaryButton,n?.SecondaryButtonHover),onClick:()=>{if("choose-automation-type"===r)e?.(!1);else{if("set-automation-name"!==r)throw new Error("Invalid step");o("choose-automation-type")}},children:"choose-automation-type"===r?"Cancel":"Back"}),t.jsx("button",{className:Uv("px-4 py-2",n?.PrimaryButton,n?.PrimaryButtonHover,i&&n?.PrimaryButtonDisabled),onClick:()=>{i||s()},disabled:i,children:"set-automation-name"===r?"Create":"Next"})]})}),Hv="mb-4",Wv="text-lg font-medium mb-2",Gv="text-sm text-gray-600",Yv="absolute top-3 right-3 bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded-full",Qv=()=>t.jsxs("div",{children:[t.jsx("div",{className:Hv,children:"📨"}),t.jsx("h3",{className:Wv,children:"One-Time Broadcast"}),t.jsx("p",{className:Gv,children:"Send a single message to your current list, like announcing a sale or newsletter."})]}),Xv=()=>t.jsxs("div",{children:[t.jsx("div",{className:Yv,children:"Coming Soon"}),t.jsx("div",{className:Hv,children:"✉️"}),t.jsx("h3",{className:Wv,children:"Patron Enters a List"}),t.jsx("p",{className:Gv,children:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria."})]}),Jv=()=>t.jsxs("div",{children:[t.jsx("div",{className:Yv,children:"Coming Soon"}),t.jsx("div",{className:Hv,children:"📅"}),t.jsx("h3",{className:Wv,children:"Date Milestone"}),t.jsx("p",{className:Gv,children:"Schedules around specific dates in your contact data, like birthdays, membership anniversaries, or renewal dates."})]}),Zv=()=>t.jsxs("div",{children:[t.jsx("div",{className:Yv,children:"Coming Soon"}),t.jsx("div",{className:Hv,children:"📬"}),t.jsx("h3",{className:Wv,children:"Realtime Activity"}),t.jsx("p",{className:Gv,children:"Responds to immediate actions your contacts take, like abandoned carts, form submissions, or appointment bookings."})]}),eb="text-3xl mb-8",tb="grid grid-cols-2 gap-6",nb="relative p-6 rounded-lg border border-gray-200 cursor-pointer flex flex-col items-center text-center hover:border-indigo-500 transition-colors",rb="opacity-60 cursor-not-allowed hover:border-gray-200",ob="relative p-6 border border-gray-200 rounded-lg",ib=({onNext:e})=>t.jsxs("div",{className:ob,children:[t.jsx("h1",{className:eb,children:"Choose Your Automation Type"}),t.jsxs("div",{className:tb,children:[t.jsx("div",{className:nb,onClick:()=>{e(Ty.ONE_TIME)},children:t.jsx(Qv,{})}),t.jsx("div",{className:`${nb} ${rb}`,children:t.jsx(Xv,{})}),t.jsx("div",{className:`${nb} ${rb}`,children:t.jsx(Jv,{})}),t.jsx("div",{className:`${nb} ${rb}`,children:t.jsx(Zv,{})})]})]});function sb(e,t){throw new Error(`Unreachable case statement: ${JSON.stringify(e)}. Valid values are: ${Object.values(t).join(", ")}`)}const ab=({selectedType:e,setAutomationName:n,automationName:r})=>t.jsxs("div",{className:"flex flex-col items-center justify-center p-8 max-w-lg mx-auto",children:[t.jsx("h2",{className:"text-2xl font-semibold mb-6 text-center",children:"Name Your Automation"}),t.jsxs("div",{className:"w-full space-y-4",children:[t.jsx("div",{className:"bg-gray-50 p-4 rounded-lg items-center justify-center text-center",children:(()=>{if(e===Ty.ONE_TIME)return t.jsx(Qv,{});throw sb(e,Ty)})()}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{htmlFor:"automationName",className:"block text-sm font-medium text-gray-700",children:"Automation Name"}),t.jsx("input",{id:"automationName",type:"text",value:r,onChange:e=>n(e.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500 shadow-sm",placeholder:"Enter a descriptive name...",autoFocus:!0}),t.jsx("p",{className:"text-sm text-gray-500",children:"Choose a name that helps you identify this automation's purpose"})]})]})]}),lb=()=>{const e=ne(),t=de({mutationFn:e=>(async e=>(await Ja(wy,{method:"POST",body:JSON.stringify(e)})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["segments"]})}}),n=ue({queryKey:["segments-conditions"],queryFn:()=>(async()=>(await Ja(`${wy}/conditions`,{method:"GET"})).data)()});return{createSegment:t.mutate,isCreating:t.isPending,createError:t.error,isCreateSuccess:t.isSuccess,segmentsConditions:n.data,isFetching:n.isFetching,isLoading:n.isLoading,fetchError:n.error,refetchSegmentsConditions:n.refetch}},cb=()=>{const e=ue({queryKey:["segments"],queryFn:()=>(async()=>(await Ja(`${wy}`)).data)()});return{segments:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchSegments:e.refetch}},ub=e=>{const t=ue({queryKey:["automations","recipients","count",e],queryFn:()=>(async e=>(await Ja(`${wy}/count`,{method:"POST",body:JSON.stringify(e)})).data)(e)});return{count:t.data,isFetching:t.isFetching,isLoading:t.isLoading,fetchError:t.error,refetchCount:t.refetch}},db=({onClose:e,setClickedCreate:n,isDisabled:r,tailwindClassDefinitions:o})=>t.jsx("div",{children:t.jsxs("div",{className:"flex justify-end space-x-4",children:[t.jsx("button",{className:Uv("px-4 py-2",o?.SecondaryButton,o?.SecondaryButtonHover),onClick:()=>e?.(!1),children:"Cancel"}),t.jsx("button",{className:Uv("px-4 py-2",o?.PrimaryButton,o?.PrimaryButtonHover,r&&o?.PrimaryButtonDisabled),onClick:()=>{n(!0)},disabled:r,children:"Create"})]})}),hb=({conditionNameToOperators:e,setConditionState:r,conditionState:o,tailwindClassDefinitions:i,iconDefinitions:s})=>{const[a,l]=n.useState(o.map((e=>e.value.map((e=>e.includes(",")?`"${e}"`:e)).join(", ")))),c=(e,t,n)=>{const i=[...o];if("value"===t){const r=[...a];r[e]=n,l(r);const o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/).map((e=>{const t=e.trim(),n=t.match(/^"(.*)"$/);return n?n[1]:t})).filter((e=>""!==e));i[e]={...i[e],[t]:o}}else i[e]={...i[e],[t]:n};r(i)};return t.jsxs("div",{className:"flex flex-col gap-2 ",children:[t.jsx(Nc,{mode:"popLayout",children:o.map(((n,i)=>t.jsxs(vy.div,{initial:{opacity:0,height:0,scale:.8},animate:{opacity:1,height:"auto",scale:1},exit:{opacity:0,height:0,scale:.8},transition:{duration:.2},className:`grid ${o.length>1?"grid-cols-[1fr_1fr_1fr_auto]":"grid-cols-[1fr_1fr_1fr]"} gap-4`,children:[t.jsx("select",{className:"p-2 border rounded-lg",value:n.field,onChange:e=>c(i,"field",e.target.value),children:Object.keys(e).map((e=>t.jsx("option",{children:e},e)))}),t.jsx("select",{className:"p-2 border rounded-lg",value:n.operator,onChange:e=>c(i,"operator",e.target.value),children:e[n.field].map((e=>t.jsx("option",{children:e},e)))}),t.jsx("input",{type:"text",className:"p-2 border rounded-lg",placeholder:'Enter values separated by commas. Use quotes for values containing commas: "San Francisco, CA"',value:a[i]||"",onChange:e=>c(i,"value",e.target.value)}),o.length>1&&t.jsx(vy.button,{whileHover:{scale:1.1},whileTap:{scale:.95},onClick:()=>(e=>{const t=o.filter(((t,n)=>n!==e));r(t);const n=a.filter(((t,n)=>n!==e));l(n)})(i),className:"p-2 hover:text-red-600","aria-label":"Delete condition",children:t.jsx(s.CloseButton,{})})]},i)))}),t.jsx("div",{children:t.jsxs(vy.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{const t={field:Object.keys(e)[0],operator:e[Object.keys(e)[0]][0],value:[]};r([...o,t]),l([...a,""])},className:Uv("flex items-center px-4 py-2 ",i?.SecondaryButton,i?.SecondaryButtonHover),children:[t.jsx("span",{className:"mr-2",children:"+"}),"Add Condition"]})})]})},fb=({nameAndDescriptionState:e,setNameAndDescriptionState:n})=>t.jsx("div",{children:t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"Name"}),t.jsx("input",{type:"text",placeholder:"Segment Name",className:"w-full p-2 border rounded-lg",value:e.name,onChange:t=>n({...e,name:t.target.value})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"Description"}),t.jsx("input",{type:"text",placeholder:"Description",className:"w-full p-2 border rounded-lg",value:e.description,onChange:t=>n({...e,description:t.target.value})})]})]})}),pb="relative p-6 border border-gray-200 rounded-lg",mb=({onClose:e,tailwindClassDefinitions:r,iconDefinitions:o})=>{const{segmentsConditions:i,isLoading:s,createSegment:a,isCreating:l}=lb(),[c,u]=n.useState(!1),d=Gy(r),h=Yy(o),[f,p]=n.useState([]),[m,g]=n.useState({name:"",description:""}),[y,v]=n.useState({}),b=m.name&&m.description&&f.some((e=>e.field&&e.operator&&e.value.length>0));n.useEffect((()=>{i&&(v(i.conditions.reduce(((e,t)=>(e[t.name]=t.operators,e)),{})),p([{field:i.conditions[0].name,operator:i.conditions[0].operators[0],value:[]}]))}),[i]);return s?t.jsx("div",{className:pb,children:t.jsx(xy,{text:["Fetching Segment data","Finishing up"]})}):l||c?t.jsx("div",{className:pb,children:t.jsx(xy,{text:["Creating Segment","Finishing up"]})}):t.jsxs("div",{className:pb,children:[t.jsx("button",{onClick:()=>e?.(!1),className:"absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 transition-colors duration-200","aria-label":"Close",children:t.jsx(h.CloseButton,{})}),t.jsxs("div",{className:"space-y-6",children:[t.jsx(fb,{nameAndDescriptionState:m,setNameAndDescriptionState:g}),t.jsx(hb,{conditionNameToOperators:y,conditionState:f,setConditionState:p,tailwindClassDefinitions:d,iconDefinitions:h}),t.jsx(db,{onClose:e,isDisabled:!b,setClickedCreate:()=>{if(!m.name||!m.description)return void e?.("error");u(!0);a({name:m.name,description:m.description,conditions:f},{onSuccess:t=>{e?.(t.id?t.id:"error")},onError:()=>{e?.("error")},onSettled:()=>{p([]),g({name:"",description:""})}})},tailwindClassDefinitions:d})]})]})};function gb(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function yb(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const s=i.createContext(o),a=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[a]||s,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[a]||s);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},vb(o,...n)]}function vb(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function bb(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function xb(...e){return t=>{let n=!1;const r=e.map((e=>{const r=bb(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():bb(e[t],null)}}}}function wb(...e){return i.useCallback(xb(...e),e)}var Sb=i.forwardRef(((e,n)=>{const{children:r,...o}=e,s=i.Children.toArray(r),a=s.find(Eb);if(a){const e=a.props.children,r=s.map((t=>t===a?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(kb,{...o,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return t.jsx(kb,{...o,ref:n,children:r})}));Sb.displayName="Slot";var kb=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n);return i.cloneElement(n,{...Pb(r,n.props),ref:t?xb(t,e):e})}return i.Children.count(n)>1?i.Children.only(null):null}));kb.displayName="SlotClone";var Cb=({children:e})=>t.jsx(t.Fragment,{children:e});function Eb(e){return i.isValidElement(e)&&e.type===Cb}function Pb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Db(e){const r=e+"CollectionProvider",[o,i]=yb(r),[s,a]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:o}=e,i=n.useRef(null),a=n.useRef(new Map).current;return t.jsx(s,{scope:r,itemMap:a,collectionRef:i,children:o})};l.displayName=r;const c=e+"CollectionSlot",u=n.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=wb(n,a(c,r).collectionRef);return t.jsx(Sb,{ref:i,children:o})}));u.displayName=c;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=n.forwardRef(((e,r)=>{const{scope:o,children:i,...s}=e,l=n.useRef(null),c=wb(r,l),u=a(d,o);return n.useEffect((()=>(u.itemMap.set(l,{ref:l,...s}),()=>{u.itemMap.delete(l)}))),t.jsx(Sb,{[h]:"",ref:c,children:i})}));return f.displayName=d,[{Provider:l,Slot:u,ItemSlot:f},function(t){const r=a(e+"CollectionConsumer",t);return n.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}var jb=Boolean(globalThis?.document)?i.useLayoutEffect:()=>{},Tb=i["useId".toString()]||(()=>{}),Mb=0;function Ob(e){const[t,n]=i.useState(Tb());return jb((()=>{n((e=>e??String(Mb++)))}),[e]),e||(t?`radix-${t}`:"")}var Ab=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=i.forwardRef(((e,r)=>{const{asChild:o,...i}=e,s=o?Sb:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...i,ref:r})}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{});function Nb(e,t){e&&s.flushSync((()=>e.dispatchEvent(t)))}function _b(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}function Rb({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=_b(t);return i.useEffect((()=>{o.current!==r&&(s(r),o.current=r)}),[r,o,s]),n}({defaultProp:t,onChange:n}),s=void 0!==e,a=s?e:r,l=_b(n);return[a,i.useCallback((t=>{if(s){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[s,e,o,l])]}var Lb=i.createContext(void 0);function $b(e){const t=i.useContext(Lb);return e||t||"ltr"}var Fb="rovingFocusGroup.onEntryFocus",Ib={bubbles:!1,cancelable:!0},qb="RovingFocusGroup",[zb,Vb,Bb]=Db(qb),[Ub,Kb]=yb(qb,[Bb]),[Hb,Wb]=Ub(qb),Gb=i.forwardRef(((e,n)=>t.jsx(zb.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(zb.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Yb,{...e,ref:n})})})));Gb.displayName=qb;var Yb=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...f}=e,p=i.useRef(null),m=wb(n,p),g=$b(a),[y=null,v]=Rb({prop:l,defaultProp:c,onChange:u}),[b,x]=i.useState(!1),w=_b(d),S=Vb(r),k=i.useRef(!1),[C,E]=i.useState(0);return i.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Fb,w),()=>e.removeEventListener(Fb,w)}),[w]),t.jsx(Hb,{scope:r,orientation:o,dir:g,loop:s,currentTabStopId:y,onItemFocus:i.useCallback((e=>v(e)),[v]),onItemShiftTab:i.useCallback((()=>x(!0)),[]),onFocusableItemAdd:i.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:i.useCallback((()=>E((e=>e-1))),[]),children:t.jsx(Ab.div,{tabIndex:b||0===C?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:gb(e.onMouseDown,(()=>{k.current=!0})),onFocus:gb(e.onFocus,(e=>{if(e.target===e.currentTarget&&!k.current&&!b){const t=new CustomEvent(Fb,Ib);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=S().filter((e=>e.focusable));Zb([e.find((e=>e.active)),e.find((e=>e.id===y)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}k.current=!1})),onBlur:gb(e.onBlur,(()=>x(!1)))})})})),Qb="RovingFocusGroupItem",Xb=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:a,...l}=e,c=Ob(),u=a||c,d=Wb(Qb,r),h=d.currentTabStopId===u,f=Vb(r),{onFocusableItemAdd:p,onFocusableItemRemove:m}=d;return i.useEffect((()=>{if(o)return p(),()=>m()}),[o,p,m]),t.jsx(zb.ItemSlot,{scope:r,id:u,focusable:o,active:s,children:t.jsx(Ab.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:gb(e.onMouseDown,(e=>{o?d.onItemFocus(u):e.preventDefault()})),onFocus:gb(e.onFocus,(()=>d.onItemFocus(u))),onKeyDown:gb(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Jb[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=d.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Zb(o)))}var n,r}))})})}));Xb.displayName=Qb;var Jb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zb(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var ex=Gb,tx=Xb;var nx=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=rx(r.current);s.current="mounted"===l?e:"none"}),[l]),jb((()=>{const t=r.current,n=o.current;if(n!==e){const r=s.current,i=rx(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),jb((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const s=rx(r.current).includes(i.animationName);if(i.target===t&&s&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},a=e=>{e.target===t&&(s.current=rx(r.current))};return t.addEventListener("animationstart",a),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",a),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),s=wb(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:s}):null};function rx(e){return e?.animationName||"none"}nx.displayName="Presence";var ox="Tabs",[ix,sx]=yb(ox,[Kb]),ax=Kb(),[lx,cx]=ix(ox),ux=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=$b(l),[h,f]=Rb({prop:o,onChange:i,defaultProp:s});return t.jsx(lx,{scope:r,baseId:Ob(),value:h,onValueChange:f,orientation:a,dir:d,activationMode:c,children:t.jsx(Ab.div,{dir:d,"data-orientation":a,...u,ref:n})})}));ux.displayName=ox;var dx="TabsList",hx=i.forwardRef(((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=cx(dx,r),a=ax(r);return t.jsx(ex,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:t.jsx(Ab.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})}));hx.displayName=dx;var fx="TabsTrigger",px=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=cx(fx,r),l=ax(r),c=yx(a.baseId,o),u=vx(a.baseId,o),d=o===a.value;return t.jsx(tx,{asChild:!0,...l,focusable:!i,active:d,children:t.jsx(Ab.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:n,onMouseDown:gb(e.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():a.onValueChange(o)})),onKeyDown:gb(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&a.onValueChange(o)})),onFocus:gb(e.onFocus,(()=>{d||i||!("manual"!==a.activationMode)||a.onValueChange(o)}))})})}));px.displayName=fx;var mx="TabsContent",gx=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,forceMount:s,children:a,...l}=e,c=cx(mx,r),u=yx(c.baseId,o),d=vx(c.baseId,o),h=o===c.value,f=i.useRef(h);return i.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),t.jsx(nx,{present:s||h,children:({present:r})=>t.jsx(Ab.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:d,tabIndex:0,...l,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:r&&a})})}));function yx(e,t){return`${e}-trigger-${t}`}function vx(e,t){return`${e}-content-${t}`}gx.displayName=mx;var bx=hx,xx=px,wx=gx;const Sx=ux,kx=i.forwardRef((({className:e,...n},r)=>t.jsx(bx,{ref:r,className:Uv("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...n})));kx.displayName=bx.displayName;const Cx=i.forwardRef((({className:e,...n},r)=>t.jsx(xx,{ref:r,className:Uv("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...n})));Cx.displayName=xx.displayName;const Ex=i.forwardRef((({className:e,...n},r)=>t.jsx(wx,{ref:r,className:Uv("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n})));Ex.displayName=wx.displayName;const Px=()=>t.jsx("div",{children:"Coming Soon"}),Dx=i.forwardRef((({className:e,...n},r)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:r,className:Uv("w-full caption-bottom text-sm",e),...n})})));Dx.displayName="Table";const jx=i.forwardRef((({className:e,...n},r)=>t.jsx("thead",{ref:r,className:Uv("[&_tr]:border-b",e),...n})));jx.displayName="TableHeader";const Tx=i.forwardRef((({className:e,...n},r)=>t.jsx("tbody",{ref:r,className:Uv("[&_tr:last-child]:border-0",e),...n})));Tx.displayName="TableBody";const Mx=i.forwardRef((({className:e,...n},r)=>t.jsx("tr",{ref:r,className:Uv("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...n})));Mx.displayName="TableRow";const Ox=i.forwardRef((({className:e,...n},r)=>t.jsx("th",{ref:r,className:Uv("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...n})));Ox.displayName="TableHead";const Ax=i.forwardRef((({className:e,...n},r)=>t.jsx("td",{ref:r,className:Uv("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n})));Ax.displayName="TableCell";const Nx="flex flex-col items-center justify-center h-full",_x=({automationId:e})=>{const{recipients:n,isLoading:r,fetchError:o}=Py(e);if(r)return t.jsx("div",{className:Nx,children:t.jsx(xy,{text:["Fetching Recipients","Finishing up"]})});if(o)return t.jsxs("div",{children:["Error: ",o.message]});if(!n||0===n.recipients.length)return t.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center",children:[t.jsx("div",{className:"mb-4",children:t.jsx(Wy.UserIcon,{className:"h-12 w-12 text-gray-400"})}),t.jsx("h3",{className:"mb-2 text-lg font-semibold text-gray-700",children:"No Recipients Found"}),t.jsx("p",{className:"text-gray-500",children:"This automation currently has no assigned recipients. Please update the include or exclude segments to add recipients."})]});const i="30%",s="35%",a="35%";return t.jsx("div",{className:"relative",children:t.jsxs(Dx,{children:[t.jsx(jx,{children:t.jsxs(Mx,{children:[t.jsx(Ox,{style:{width:i},children:"Name"}),t.jsx(Ox,{style:{width:s},children:"Email"}),t.jsx(Ox,{style:{width:a},children:"Phone"})]})}),t.jsx(Tx,{children:n.recipients.map((e=>t.jsxs(Mx,{className:"hover:bg-gray-50/50 transition-colors",children:[t.jsx(Ax,{style:{width:i},children:e.first_name||e.last_name?`${e.first_name||""} ${e.last_name||""}`.trim():t.jsx("span",{className:"text-gray-400",children:"Not provided"})}),t.jsx(Ax,{style:{width:s},children:e.email||t.jsx("span",{className:"text-gray-400",children:"Not provided"})}),t.jsx(Ax,{style:{width:a},children:e.phone||t.jsx("span",{className:"text-gray-400",children:"Not provided"})})]},e.reach_id)))})]})})};function Rx(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Lx(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const $x=6048e5;let Fx={};function Ix(){return Fx}function qx(e,t){const n=Ix(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Rx(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function zx(e){return qx(e,{weekStartsOn:1})}function Vx(e){const t=Rx(e),n=t.getFullYear(),r=Lx(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=zx(r),i=Lx(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=zx(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Bx(e){const t=Rx(e);return t.setHours(0,0,0,0),t}function Ux(e){const t=Rx(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Kx(e,t){return function(e,t){return Lx(e,+Rx(e)+t)}(e,6e4*t)}function Hx(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=Rx(e);return!isNaN(Number(n))}const Wx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Gx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yx={date:Gx({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Gx({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Gx({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Qx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Xx(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function Jx(e){return(t,n={})=>{const r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],a=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let l;l=e.valueCallback?e.valueCallback(a):a,l=n.valueCallback?n.valueCallback(l):l;return{value:l,rest:t.slice(i.length)}}}var Zx;const ew={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Wx[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Yx,formatRelative:(e,t,n,r)=>Qx[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Xx({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Xx({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Xx({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Xx({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Xx({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Zx={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Zx.matchPattern);if(!n)return null;const r=n[0],o=e.match(Zx.parsePattern);if(!o)return null;let i=Zx.valueCallback?Zx.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Jx({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Jx({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jx({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Jx({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Jx({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function tw(e){const t=Rx(e),n=function(e,t){const n=Bx(e),r=Bx(t),o=+n-Ux(n),i=+r-Ux(r);return Math.round((o-i)/864e5)}(t,function(e){const t=Rx(e),n=Lx(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function nw(e){const t=Rx(e),n=+zx(t)-+function(e){const t=Vx(e),n=Lx(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),zx(n)}(t);return Math.round(n/$x)+1}function rw(e,t){const n=Rx(e),r=n.getFullYear(),o=Ix(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=Lx(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=qx(s,t),l=Lx(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=qx(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ow(e,t){const n=Rx(e),r=+qx(n,t)-+function(e,t){const n=Ix(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=rw(e,t),i=Lx(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),qx(i,t)}(n,t);return Math.round(r/$x)+1}function iw(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const sw={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return iw("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):iw(n+1,2)},d:(e,t)=>iw(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>iw(e.getHours()%12||12,t.length),H:(e,t)=>iw(e.getHours(),t.length),m:(e,t)=>iw(e.getMinutes(),t.length),s:(e,t)=>iw(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return iw(Math.trunc(r*Math.pow(10,n-3)),t.length)}},aw="midnight",lw="noon",cw="morning",uw="afternoon",dw="evening",hw="night",fw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return sw.y(e,t)},Y:function(e,t,n,r){const o=rw(e,r),i=o>0?o:1-o;if("YY"===t){return iw(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):iw(i,t.length)},R:function(e,t){return iw(Vx(e),t.length)},u:function(e,t){return iw(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return iw(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return iw(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return sw.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return iw(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ow(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):iw(o,t.length)},I:function(e,t,n){const r=nw(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):iw(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):sw.d(e,t)},D:function(e,t,n){const r=tw(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):iw(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return iw(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return iw(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return iw(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?lw:0===r?aw:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?dw:r>=12?uw:r>=4?cw:hw,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return sw.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):sw.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):iw(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):iw(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):sw.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):sw.s(e,t)},S:function(e,t){return sw.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return mw(r);case"XXXX":case"XX":return gw(r);default:return gw(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return mw(r);case"xxxx":case"xx":return gw(r);default:return gw(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pw(r,":");default:return"GMT"+gw(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pw(r,":");default:return"GMT"+gw(r,":")}},t:function(e,t,n){return iw(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return iw(e.getTime(),t.length)}};function pw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+iw(i,2)}function mw(e,t){if(e%60==0){return(e>0?"-":"+")+iw(Math.abs(e)/60,2)}return gw(e,t)}function gw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+iw(Math.trunc(r/60),2)+t+iw(r%60,2)}const yw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},vw=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},bw={p:vw,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return yw(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",yw(r,t)).replace("{{time}}",vw(o,t))}},xw=/^D+$/,ww=/^Y+$/,Sw=["D","DD","YY","YYYY"];const kw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Cw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ew=/^'([^]*?)'?$/,Pw=/''/g,Dw=/[a-zA-Z]/;function jw(e,t,n){const r=Ix(),o=r.locale??ew,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Rx(e);if(!Hx(a))throw new RangeError("Invalid time value");let l=t.match(Cw).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,bw[t])(e,o.formatLong)}return e})).join("").match(kw).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Tw(e)};if(fw[t])return{isToken:!0,value:e};if(t.match(Dw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return ww.test(e)}(r)||function(e){return xw.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(Sw.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,fw[r[0]])(a,r,o.localize,c)})).join("")}function Tw(e){const t=e.match(Ew);return t?t[1].replace(Pw,"'"):e}var Mw=i.forwardRef(((e,n)=>{const{children:r,...o}=e,s=i.Children.toArray(r),a=s.find(Nw);if(a){const e=a.props.children,r=s.map((t=>t===a?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(Ow,{...o,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return t.jsx(Ow,{...o,ref:n,children:r})}));Mw.displayName="Slot";var Ow=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?xb(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));Ow.displayName="SlotClone";var Aw=({children:e})=>t.jsx(t.Fragment,{children:e});function Nw(e){return i.isValidElement(e)&&e.type===Aw}const _w=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Rw=Xy,Lw=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Rw(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const s=_w(t)||_w(r);return o[e][s]})),a=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...a}[t]):{...i,...a}[t]===n}))?[...e,n,r]:e}),[]);return Rw(e,s,l,null==n?void 0:n.class,null==n?void 0:n.className)},$w={base:"reach-styles-module__base___RP4iu",default:"reach-styles-module__default___pajjj",destructive:"reach-styles-module__destructive___BZSYi",outline:"reach-styles-module__outline___bNcaI",secondary:"reach-styles-module__secondary___osvqQ",ghost:"reach-styles-module__ghost___uU77B",link:"reach-styles-module__link___nSLOW"},Fw=Lw([$w.base],{variants:{variant:{default:$w.default,destructive:$w.destructive,outline:$w.outline,secondary:$w.secondary,ghost:$w.ghost,link:$w.link},size:{default:$w["size-default"],sm:$w["size-sm"],lg:$w["size-lg"],icon:$w["size-icon"]}},defaultVariants:{variant:"default",size:"default"}}),Iw=i.forwardRef((({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>t.jsx(o?Mw:"button",{className:Uv(Fw({variant:n,size:r,className:e})),ref:s,...i})));function qw(e,t=globalThis?.document){const n=_b(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}Iw.displayName="Button";var zw,Vw="dismissableLayer.update",Bw="dismissableLayer.pointerDownOutside",Uw="dismissableLayer.focusOutside",Kw=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hw=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(Kw),[h,f]=i.useState(null),p=h?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=wb(n,(e=>f(e))),y=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),x=h?y.indexOf(h):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,k=function(e,t=globalThis?.document){const n=_b(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Gw(Bw,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));S&&!n&&(s?.(e),l?.(e),e.defaultPrevented||c?.())}),p),C=function(e,t=globalThis?.document){const n=_b(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Gw(Uw,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||c?.())}),p);return qw((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),p),i.useEffect((()=>{if(h)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(zw=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Ww(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=zw)}}),[h,p,r,d]),i.useEffect((()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Ww())}),[h,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(Vw,e),()=>document.removeEventListener(Vw,e)}),[]),t.jsx(Ab.div,{...u,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:gb(e.onFocusCapture,C.onFocusCapture),onBlurCapture:gb(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:gb(e.onPointerDownCapture,k.onPointerDownCapture)})}));Hw.displayName="DismissableLayer";function Ww(){const e=new CustomEvent(Vw);document.dispatchEvent(e)}function Gw(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nb(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(Kw),o=i.useRef(null),s=wb(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(Ab.div,{...e,ref:s})})).displayName="DismissableLayerBranch";var Yw="focusScope.autoFocusOnMount",Qw="focusScope.autoFocusOnUnmount",Xw={bubbles:!1,cancelable:!0},Jw=i.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=e,[c,u]=i.useState(null),d=_b(s),h=_b(a),f=i.useRef(null),p=wb(n,(e=>u(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:nS(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||nS(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&nS(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,m.paused]),i.useEffect((()=>{if(c){rS.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Yw,Xw);c.addEventListener(Yw,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nS(r,{select:t}),document.activeElement!==n)return}((e=Zw(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&nS(c))}return()=>{c.removeEventListener(Yw,d),setTimeout((()=>{const e=new CustomEvent(Qw,Xw);c.addEventListener(Qw,h),c.dispatchEvent(e),e.defaultPrevented||nS(t??document.body,{select:!0}),c.removeEventListener(Qw,h),rS.remove(m)}),0)}}var e}),[c,d,h,m]);const g=i.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,i]=function(e){const t=Zw(e),n=eS(t,e),r=eS(t.reverse(),e);return[n,r]}(n);o&&i?e.shiftKey||t!==i?e.shiftKey&&t===o&&(e.preventDefault(),r&&nS(i,{select:!0})):(e.preventDefault(),r&&nS(o,{select:!0})):t===n&&e.preventDefault()}}),[r,o,m.paused]);return t.jsx(Ab.div,{tabIndex:-1,...l,ref:p,onKeyDown:g})}));function Zw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}function eS(e,t){for(const n of e)if(!tS(n,{upTo:t}))return n}function tS(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function nS(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Jw.displayName="FocusScope";var rS=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oS(e,t),e.unshift(t)},remove(t){e=oS(e,t),e[0]?.resume()}}}();function oS(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var iS=i.forwardRef(((e,n)=>{const{container:o,...s}=e,[a,l]=i.useState(!1);jb((()=>l(!0)),[]);const c=o||a&&globalThis?.document?.body;return c?r.createPortal(t.jsx(Ab.div,{...s,ref:n}),c):null}));iS.displayName="Portal";var sS=0;function aS(){i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lS()),document.body.insertAdjacentElement("beforeend",e[1]??lS()),sS++,()=>{1===sS&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),sS--}}),[])}function lS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cS=function(){return cS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cS.apply(this,arguments)};function uS(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var dS="right-scroll-bar-position",hS="width-before-scroll-bar";function fS(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var pS="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,mS=new WeakMap;function gS(e,t){var r=function(e,t){var r=n.useState((function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}}))[0];return r.callback=t,r.facade}(null,(function(t){return e.forEach((function(e){return fS(e,t)}))}));return pS((function(){var t=mS.get(r);if(t){var n=new Set(t),o=new Set(e),i=r.current;n.forEach((function(e){o.has(e)||fS(e,null)})),o.forEach((function(e){n.has(e)||fS(e,i)}))}mS.set(r,e)}),[e]),r}function yS(e){return e}var vS=function(e){var t=e.sideCar,n=uS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,cS({},n))};vS.isSideCarExport=!0;var bS=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=yS);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(i)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=cS({async:!0,ssr:!1},e),t}(),xS=function(){},wS=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:xS,onWheelCapture:xS,onTouchMoveCapture:xS}),o=r[0],s=r[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,x=uS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,S=gS([n,t]),k=cS(cS({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(w,{sideCar:bS,removeScrollBar:u,shards:h,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(l),cS(cS({},k),{ref:S})):i.createElement(v,cS({},k,{className:c,ref:S}),l))}));wS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wS.classNames={fullWidth:hS,zeroRight:dS};function SS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var kS=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=SS())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CS=function(){var e,t=(e=kS(),function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){return t(e.styles,e.dynamic),null}},ES={left:0,top:0,right:0,gap:0},PS=function(e){return parseInt(e||"",10)||0},DS=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ES;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[PS(t["padding"===e?"paddingLeft":"marginLeft"]),PS(n),PS(r)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jS=CS(),TS="data-scroll-locked",MS=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(TS,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(dS," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(hS," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(dS," .").concat(dS," {\n right: 0 ").concat(r,";\n }\n \n .").concat(hS," .").concat(hS," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(TS,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},OS=function(){var e=parseInt(document.body.getAttribute(TS)||"0",10);return isFinite(e)?e:0},AS=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect((function(){return document.body.setAttribute(TS,(OS()+1).toString()),function(){var e=OS()-1;e<=0?document.body.removeAttribute(TS):document.body.setAttribute(TS,e.toString())}}),[]);var s=i.useMemo((function(){return DS(o)}),[o]);return i.createElement(jS,{styles:MS(s,!t,o,n?"":"!important")})},NS=!1;if("undefined"!=typeof window)try{var _S=Object.defineProperty({},"passive",{get:function(){return NS=!0,!0}});window.addEventListener("test",_S,_S),window.removeEventListener("test",_S,_S)}catch(Rz){NS=!1}var RS=!!NS&&{passive:!1},LS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},$S=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),FS(e,r)){var o=IS(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FS=function(e,t){return"v"===e?function(e){return LS(e,"overflowY")}(t):function(e){return LS(e,"overflowX")}(t)},IS=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},qS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zS=function(e){return[e.deltaX,e.deltaY]},VS=function(e){return e&&"current"in e?e.current:e},BS=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},US=0,KS=[];function HS(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const WS=(GS=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(US++)[0],s=i.useState(CS)[0],a=i.useRef(e);i.useEffect((function(){a.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(VS),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=qS(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=$S(d,u);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=$S(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var f=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,a=t.contains(s),l=!1,c=i>0,u=0,d=0;do{var h=IS(e,s),f=h[0],p=h[1]-h[2]-o*f;(f||p)&&FS(e,s)&&(u+=p,d+=f),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(f,t,e,"h"===f?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(KS.length&&KS[KS.length-1]===s){var r="deltaY"in n?zS(n):qS(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(a.current.shards||[]).map(VS).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:HS(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.useCallback((function(e){n.current=qS(e),r.current=void 0}),[]),h=i.useCallback((function(t){u(t.type,zS(t),t.target,l(t,e.lockRef.current))}),[]),f=i.useCallback((function(t){u(t.type,qS(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return KS.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,RS),document.addEventListener("touchmove",c,RS),document.addEventListener("touchstart",d,RS),function(){KS=KS.filter((function(e){return e!==s})),document.removeEventListener("wheel",c,RS),document.removeEventListener("touchmove",c,RS),document.removeEventListener("touchstart",d,RS)}}),[]);var p=e.removeScrollBar;return i.createElement(i.Fragment,null,e.inert?i.createElement(s,{styles:BS(o)}):null,p?i.createElement(AS,{gapMode:e.gapMode}):null)},bS.useMedium(GS),vS);var GS,YS=i.forwardRef((function(e,t){return i.createElement(wS,cS({},e,{ref:t,sideCar:WS}))}));YS.classNames=wS.classNames;var QS=new WeakMap,XS=new WeakMap,JS={},ZS=0,ek=function(e){return e&&(e.host||ek(e.parentNode))},tk=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=ek(t);return n&&e.contains(n)?n:null})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);JS[n]||(JS[n]=new WeakMap);var i=JS[n],s=[],a=new Set,l=new Set(o),c=function(e){e&&!a.has(e)&&(a.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(QS.get(e)||0)+1,c=(i.get(e)||0)+1;QS.set(e,l),i.set(e,c),s.push(e),1===l&&o&&XS.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(Nz){}}))};return u(t),a.clear(),ZS++,function(){s.forEach((function(e){var t=QS.get(e)-1,o=i.get(e)-1;QS.set(e,t),i.set(e,o),t||(XS.has(e)||e.removeAttribute(r),XS.delete(e)),o||e.removeAttribute(n)})),--ZS||(QS=new WeakMap,QS=new WeakMap,XS=new WeakMap,JS={})}},nk=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),tk(r,o,n,"aria-hidden")):function(){return null}},rk="Dialog",[ok,ik]=yb(rk),[sk,ak]=ok(rk),lk=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d=!1,h]=Rb({prop:o,defaultProp:s,onChange:a});return t.jsx(sk,{scope:n,triggerRef:c,contentRef:u,contentId:Ob(),titleId:Ob(),descriptionId:Ob(),open:d,onOpenChange:h,onOpenToggle:i.useCallback((()=>h((e=>!e))),[h]),modal:l,children:r})};lk.displayName=rk;var ck="DialogTrigger";i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=ak(ck,r),s=wb(n,i.triggerRef);return t.jsx(Ab.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":jk(i.open),...o,ref:s,onClick:gb(e.onClick,i.onOpenToggle)})})).displayName=ck;var uk="DialogPortal",[dk,hk]=ok(uk,{forceMount:void 0}),fk=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:s}=e,a=ak(uk,n);return t.jsx(dk,{scope:n,forceMount:r,children:i.Children.map(o,(e=>t.jsx(nx,{present:r||a.open,children:t.jsx(iS,{asChild:!0,container:s,children:e})})))})};fk.displayName=uk;var pk="DialogOverlay",mk=i.forwardRef(((e,n)=>{const r=hk(pk,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ak(pk,e.__scopeDialog);return s.modal?t.jsx(nx,{present:o||s.open,children:t.jsx(gk,{...i,ref:n})}):null}));mk.displayName=pk;var gk=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=ak(pk,r);return t.jsx(YS,{as:Sb,allowPinchZoom:!0,shards:[i.contentRef],children:t.jsx(Ab.div,{"data-state":jk(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})})),yk="DialogContent",vk=i.forwardRef(((e,n)=>{const r=hk(yk,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=ak(yk,e.__scopeDialog);return t.jsx(nx,{present:o||s.open,children:t.jsx(s.modal?bk:xk,{...i,ref:n})})}));vk.displayName=yk;var bk=i.forwardRef(((e,n)=>{const r=ak(yk,e.__scopeDialog),o=i.useRef(null),s=wb(n,r.contentRef,o);return i.useEffect((()=>{const e=o.current;if(e)return nk(e)}),[]),t.jsx(wk,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gb(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:gb(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;(2===t.button||0===t.button&&!0===t.ctrlKey)&&e.preventDefault()})),onFocusOutside:gb(e.onFocusOutside,(e=>e.preventDefault()))})})),xk=i.forwardRef(((e,n)=>{const r=ak(yk,e.__scopeDialog),o=i.useRef(!1),s=i.useRef(!1);return t.jsx(wk,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})})),wk=i.forwardRef(((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,...l}=e,c=ak(yk,r),u=i.useRef(null),d=wb(n,u);return aS(),t.jsxs(t.Fragment,{children:[t.jsx(Jw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:a,children:t.jsx(Hw,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":jk(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(Ak,{titleId:c.titleId}),t.jsx(Nk,{contentRef:u,descriptionId:c.descriptionId})]})]})})),Sk="DialogTitle",kk=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=ak(Sk,r);return t.jsx(Ab.h2,{id:i.titleId,...o,ref:n})}));kk.displayName=Sk;var Ck="DialogDescription",Ek=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=ak(Ck,r);return t.jsx(Ab.p,{id:i.descriptionId,...o,ref:n})}));Ek.displayName=Ck;var Pk="DialogClose",Dk=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=ak(Pk,r);return t.jsx(Ab.button,{type:"button",...o,ref:n,onClick:gb(e.onClick,(()=>i.onOpenChange(!1)))})}));function jk(e){return e?"open":"closed"}Dk.displayName=Pk;var Tk="DialogTitleWarning",[Mk,Ok]=function(e,n){const r=i.createContext(n),o=e=>{const{children:n,...o}=e,s=i.useMemo((()=>o),Object.values(o));return t.jsx(r.Provider,{value:s,children:n})};return o.displayName=e+"Provider",[o,function(t){const o=i.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${e}\``)}]}(Tk,{contentName:yk,titleName:Sk,docsSlug:"dialog"}),Ak=({titleId:e})=>{const t=Ok(Tk);return i.useEffect((()=>{if(e){document.getElementById(e)}}),[`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`,e]),null},Nk=({contentRef:e,descriptionId:t})=>{const n=Ok("DialogDescriptionWarning");return i.useEffect((()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)}}),[`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`,e,t]),null},_k=mk,Rk=vk,Lk=kk,$k=Ek,Fk=Dk;const Ik=lk,qk=fk,zk=i.forwardRef((({className:e,...n},r)=>t.jsx(_k,{ref:r,className:Uv("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})));zk.displayName=_k.displayName;const Vk=i.forwardRef((({className:e,children:n,hideCloseButton:r=!1,...o},i)=>t.jsxs(qk,{children:[t.jsx(zk,{}),t.jsxs(Rk,{ref:i,className:Uv("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),onInteractOutside:e=>{e.composedPath().some((e=>"classList"in e&&Array.from(e.classList).includes("pac-item")))&&e.preventDefault()},...o,children:[n,!r&&t.jsxs(Fk,{className:"absolute right-6 top-6 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[t.jsx(Ky,{className:"h-6 w-6"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));Vk.displayName=Rk.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(Lk,{ref:r,className:Uv("text-lg font-semibold leading-none tracking-tight",e),...n}))).displayName=Lk.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx($k,{ref:r,className:Uv("text-sm text-muted-foreground",e),...n}))).displayName=$k.displayName;var Bk,Uk="dismissableLayer.update",Kk="dismissableLayer.pointerDownOutside",Hk="dismissableLayer.focusOutside",Wk=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gk=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(Wk),[h,f]=i.useState(null),p=h?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=wb(n,(e=>f(e))),y=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),x=h?y.indexOf(h):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,k=function(e,t=globalThis?.document){const n=_b(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Qk(Kk,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));S&&!n&&(s?.(e),l?.(e),e.defaultPrevented||c?.())}),p),C=function(e,t=globalThis?.document){const n=_b(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Qk(Hk,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(a?.(e),l?.(e),e.defaultPrevented||c?.())}),p);return qw((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),p),i.useEffect((()=>{if(h)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Bk=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),Yk(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Bk)}}),[h,p,r,d]),i.useEffect((()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),Yk())}),[h,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(Uk,e),()=>document.removeEventListener(Uk,e)}),[]),t.jsx(Ab.div,{...u,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:gb(e.onFocusCapture,C.onFocusCapture),onBlurCapture:gb(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:gb(e.onPointerDownCapture,k.onPointerDownCapture)})}));Gk.displayName="DismissableLayer";function Yk(){const e=new CustomEvent(Uk);document.dispatchEvent(e)}function Qk(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nb(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(Wk),o=i.useRef(null),s=wb(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(Ab.div,{...e,ref:s})})).displayName="DismissableLayerBranch";const Xk=["top","right","bottom","left"],Jk=Math.min,Zk=Math.max,eC=Math.round,tC=Math.floor,nC=e=>({x:e,y:e}),rC={left:"right",right:"left",bottom:"top",top:"bottom"},oC={start:"end",end:"start"};function iC(e,t,n){return Zk(e,Jk(t,n))}function sC(e,t){return"function"==typeof e?e(t):e}function aC(e){return e.split("-")[0]}function lC(e){return e.split("-")[1]}function cC(e){return"x"===e?"y":"x"}function uC(e){return"y"===e?"height":"width"}function dC(e){return["top","bottom"].includes(aC(e))?"y":"x"}function hC(e){return cC(dC(e))}function fC(e){return e.replace(/start|end/g,(e=>oC[e]))}function pC(e){return e.replace(/left|right|bottom|top/g,(e=>rC[e]))}function mC(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function gC(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function yC(e,t,n){let{reference:r,floating:o}=e;const i=dC(t),s=hC(t),a=uC(s),l=aC(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(lC(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function vC(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=sC(t,e),p=mC(f),m=a[h?"floating"===d?"reference":"floating":d],g=gC(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=gC(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function bC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xC(e){return Xk.some((t=>e[t]>=0))}function wC(){return"undefined"!=typeof window}function SC(e){return EC(e)?(e.nodeName||"").toLowerCase():"#document"}function kC(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function CC(e){var t;return null==(t=(EC(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function EC(e){return!!wC()&&(e instanceof Node||e instanceof kC(e).Node)}function PC(e){return!!wC()&&(e instanceof Element||e instanceof kC(e).Element)}function DC(e){return!!wC()&&(e instanceof HTMLElement||e instanceof kC(e).HTMLElement)}function jC(e){return!(!wC()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kC(e).ShadowRoot)}function TC(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=RC(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function MC(e){return["table","td","th"].includes(SC(e))}function OC(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(Nz){return!1}}))}function AC(e){const t=NC(),n=PC(e)?RC(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function NC(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _C(e){return["html","body","#document"].includes(SC(e))}function RC(e){return kC(e).getComputedStyle(e)}function LC(e){return PC(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $C(e){if("html"===SC(e))return e;const t=e.assignedSlot||e.parentNode||jC(e)&&e.host||CC(e);return jC(t)?t.host:t}function FC(e){const t=$C(e);return _C(t)?e.ownerDocument?e.ownerDocument.body:e.body:DC(t)&&TC(t)?t:FC(t)}function IC(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=FC(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=kC(o);if(i){const e=qC(s);return t.concat(s,s.visualViewport||[],TC(o)?o:[],e&&n?IC(e):[])}return t.concat(o,IC(o,[],n))}function qC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zC(e){const t=RC(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=DC(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=eC(n)!==i||eC(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function VC(e){return PC(e)?e:e.contextElement}function BC(e){const t=VC(e);if(!DC(t))return nC(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=zC(t);let s=(i?eC(n.width):n.width)/r,a=(i?eC(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const UC=nC(0);function KC(e){const t=kC(e);return NC()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:UC}function HC(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=VC(e);let s=nC(1);t&&(r?PC(r)&&(s=BC(r)):s=BC(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==kC(e))&&t}(i,n,r)?KC(i):nC(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=kC(i),t=r&&PC(r)?kC(r):r;let n=e,o=qC(n);for(;o&&r&&t!==n;){const e=BC(o),t=o.getBoundingClientRect(),r=RC(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=kC(o),o=qC(n)}}return gC({width:u,height:d,x:l,y:c})}function WC(e,t){const n=LC(e).scrollLeft;return t?t.left+n:HC(CC(e)).left+n}function GC(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:WC(e,r)),y:r.top+t.scrollTop}}function YC(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=kC(e),r=CC(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=NC();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=CC(e),n=LC(e),r=e.ownerDocument.body,o=Zk(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Zk(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+WC(e);const a=-n.scrollTop;return"rtl"===RC(r).direction&&(s+=Zk(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(CC(e));else if(PC(t))r=function(e,t){const n=HC(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=DC(e)?BC(e):nC(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=KC(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return gC(r)}function QC(e,t){const n=$C(e);return!(n===t||!PC(n)||_C(n))&&("fixed"===RC(n).position||QC(n,t))}function XC(e,t,n){const r=DC(t),o=CC(t),i="fixed"===n,s=HC(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=nC(0);if(r||!r&&!i)if(("body"!==SC(t)||TC(o))&&(a=LC(t)),r){const e=HC(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=WC(o));const c=!o||r||i?nC(0):GC(o,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function JC(e){return"static"===RC(e).position}function ZC(e,t){if(!DC(e)||"fixed"===RC(e).position)return null;if(t)return t(e);let n=e.offsetParent;return CC(e)===n&&(n=n.ownerDocument.body),n}function eE(e,t){const n=kC(e);if(OC(e))return n;if(!DC(e)){let t=$C(e);for(;t&&!_C(t);){if(PC(t)&&!JC(t))return t;t=$C(t)}return n}let r=ZC(e,t);for(;r&&MC(r)&&JC(r);)r=ZC(r,t);return r&&_C(r)&&JC(r)&&!AC(r)?n:r||function(e){let t=$C(e);for(;DC(t)&&!_C(t);){if(AC(t))return t;if(OC(t))return null;t=$C(t)}return null}(e)||n}const tE={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=CC(r),a=!!t&&OC(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nC(1);const u=nC(0),d=DC(r);if((d||!d&&!i)&&(("body"!==SC(r)||TC(s))&&(l=LC(r)),DC(r))){const e=HC(r);c=BC(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!s||d||i?nC(0):GC(s,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:CC,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?OC(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=IC(e,[],!1).filter((e=>PC(e)&&"body"!==SC(e))),o=null;const i="fixed"===RC(e).position;let s=i?$C(e):e;for(;PC(s)&&!_C(s);){const t=RC(s),n=AC(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||TC(s)&&!n&&QC(e,s))?r=r.filter((e=>e!==s)):o=t,s=$C(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i.reduce(((e,n)=>{const r=YC(t,n,o);return e.top=Zk(r.top,e.top),e.right=Jk(r.right,e.right),e.bottom=Jk(r.bottom,e.bottom),e.left=Zk(r.left,e.left),e}),YC(t,i[0],o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:eE,getElementRects:async function(e){const t=this.getOffsetParent||eE,n=this.getDimensions,r=await n(e.floating);return{reference:XC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=zC(e);return{width:t,height:n}},getScale:BC,isElement:PC,isRTL:function(e){return"rtl"===RC(e).direction}};function nE(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=VC(e),u=o||i?[...c?IC(c):[],...IC(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=CC(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f={rootMargin:-tC(u)+"px "+-tC(o.clientWidth-(c+d))+"px "+-tC(o.clientHeight-(u+h))+"px "+-tC(c)+"px",threshold:Zk(0,Jk(1,l))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}p=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(Nz){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let h,f=-1,p=null;s&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let m=l?HC(e):null;return l&&function t(){const r=HC(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const rE=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=aC(n),a=lC(n),l="y"===dC(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=sC(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oE=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=sC(e,t),c={x:n,y:r},u=await vC(t,l),d=dC(aC(o)),h=cC(d);let f=c[h],p=c[d];if(i){f=iC(f+u["y"===h?"top":"left"],f,f-u["y"===h?"bottom":"right"])}if(s){p=iC(p+u["y"===d?"top":"left"],p,p-u["y"===d?"bottom":"right"])}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[d]:s}}}}}},iE=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=sC(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=aC(o),v=dC(a),b=aC(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!m?[pC(a)]:function(e){const t=pC(e);return[fC(e),t,fC(t)]}(a)),S="none"!==p;!h&&S&&w.push(...function(e,t,n,r){const o=lC(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(aC(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fC)))),i}(a,m,p,x));const k=[a,...w],C=await vC(t,g),E=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lC(e),o=hC(e),i=uC(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=pC(s)),[s,pC(s)]}(o,s,x);E.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:o,overflows:E}],!E.every((e=>e<=0))){var D,j;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(j=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=P.filter((e=>{if(S){const t=dC(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},sE=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=sC(e,t),u=await vC(t,c),d=aC(o),h=lC(o),f="y"===dC(o),{width:p,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=h===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g="end"===h?"top":"bottom");const v=m-u.top-u.bottom,b=p-u.left-u.right;let x=Jk(m-u[g],v),w=Jk(p-u[y],b);if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(w=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=v),!t.middlewareData.shift&&!h){const e=Zk(u.left,0),t=Zk(u.right,0),n=Zk(u.top,0),r=Zk(u.bottom,0);f?w=p-2*(0!==e||0!==t?e+t:Zk(u.left,u.right)):x=m-2*(0!==n||0!==r?n+r:Zk(u.top,u.bottom))}await l({...t,availableWidth:w,availableHeight:x});const S=await s.getDimensions(a.floating);return p!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},aE=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=sC(e,t);switch(r){case"referenceHidden":{const e=bC(await vC(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:xC(e)}}}case"escaped":{const e=bC(await vC(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:xC(e)}}}default:return{}}}}},lE=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=sC(e,t)||{};if(null==c)return{};const d=mC(u),h={x:n,y:r},f=hC(o),p=uC(f),m=await s.getDimensions(c),g="y"===f,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[f]-h[f]-i.floating[p],w=h[f]-i.reference[f],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=S?S[b]:0;k&&await(null==s.isElement?void 0:s.isElement(S))||(k=a.floating[b]||i.floating[p]);const C=x/2-w/2,E=k/2-m[p]/2-1,P=Jk(d[y],E),D=Jk(d[v],E),j=P,T=k-m[p]-D,M=k/2-m[p]/2+C,O=iC(j,M,T),A=!l.arrow&&null!=lC(o)&&M!==O&&i.reference[p]/2-(M<j?P:D)-m[p]/2<0,N=A?M<j?M-j:M-T:0;return{[f]:h[f]+N,data:{[f]:O,centerOffset:M-O-N,...A&&{alignmentOffset:N}},reset:A}}}),cE=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=sC(e,t),u={x:n,y:r},d=dC(o),h=cC(d);let f=u[h],p=u[d];const m=sC(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===h?"height":"width",t=i.reference[h]-i.floating[e]+g.mainAxis,n=i.reference[h]+i.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,v;const e="y"===h?"width":"height",t=["top","left"].includes(aC(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=s.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=s.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[h]:f,[d]:p}}}},uE=(e,t,n)=>{const r={platform:tE,...n},o={...r.platform,_c:new Map};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=yC(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:n,fn:i}=a[m],{x:g,y:y,data:v,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[n]:{...f[n],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=yC(c,h,l))),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}})(e,t,{...r,platform:o})};var dE="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function hE(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!hE(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!hE(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function fE(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pE(e,t){const n=fE(e);return Math.round(t*n)/n}function mE(e){const t=i.useRef(e);return dE((()=>{t.current=e})),t}const gE=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&{}.hasOwnProperty.call(n,"current")?null!=n.current?lE({element:n.current,padding:r}).fn(t):{}:n?lE({element:n,padding:r}).fn(t):{}}}),yE=(e,t)=>({...oE(e),options:[e,t]}),vE=(e,t)=>({...cE(e),options:[e,t]}),bE=(e,t)=>({...iE(e),options:[e,t]}),xE=(e,t)=>({...sE(e),options:[e,t]}),wE=(e,t)=>({...aE(e),options:[e,t]}),SE=(e,t)=>({...gE(e),options:[e,t]});var kE=i.forwardRef(((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return t.jsx(Ab.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})}));kE.displayName="Arrow";var CE=kE;var EE="Popper",[PE,DE]=yb(EE),[jE,TE]=PE(EE),ME=e=>{const{__scopePopper:n,children:r}=e,[o,s]=i.useState(null);return t.jsx(jE,{scope:n,anchor:o,onAnchorChange:s,children:r})};ME.displayName=EE;var OE="PopperAnchor",AE=i.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:o,...s}=e,a=TE(OE,r),l=i.useRef(null),c=wb(n,l);return i.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:t.jsx(Ab.div,{...s,ref:c})}));AE.displayName=OE;var NE="PopperContent",[_E,RE]=PE(NE),LE=i.forwardRef(((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:l="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=e,b=TE(NE,r),[x,w]=i.useState(null),S=wb(n,(e=>w(e))),[k,C]=i.useState(null),E=function(e){const[t,n]=i.useState(void 0);return jb((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(k),P=E?.width??0,D=E?.height??0,j=o+("center"!==l?"-"+l:""),T="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(h)?h:[h],O=M.length>0,A={padding:T,boundary:M.filter(qE),altBoundary:O},{refs:N,floatingStyles:_,placement:R,isPositioned:L,middlewareData:$}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=i.useState(r);hE(p,r)||m(r);const[g,y]=i.useState(null),[v,b]=i.useState(null),x=i.useCallback((e=>{e!==C.current&&(C.current=e,y(e))}),[]),w=i.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),S=a||g,k=l||v,C=i.useRef(null),E=i.useRef(null),P=i.useRef(h),D=null!=u,j=mE(u),T=mE(o),M=mE(d),O=i.useCallback((()=>{if(!C.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};T.current&&(e.platform=T.current),uE(C.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==M.current};A.current&&!hE(P.current,t)&&(P.current=t,s.flushSync((()=>{f(t)})))}))}),[p,t,n,T,M]);dE((()=>{!1===d&&P.current.isPositioned&&(P.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const A=i.useRef(!1);dE((()=>(A.current=!0,()=>{A.current=!1})),[]),dE((()=>{if(S&&(C.current=S),k&&(E.current=k),S&&k){if(j.current)return j.current(S,k,O);O()}}),[S,k,O,j,D]);const N=i.useMemo((()=>({reference:C,floating:E,setReference:x,setFloating:w})),[x,w]),_=i.useMemo((()=>({reference:S,floating:k})),[S,k]),R=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=pE(_.floating,h.x),r=pE(_.floating,h.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...fE(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,_.floating,h.x,h.y]);return i.useMemo((()=>({...h,update:O,refs:N,elements:_,floatingStyles:R})),[h,O,N,_,R])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>nE(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[(F={mainAxis:a+D,alignmentAxis:c},{...rE(F),options:[F,I]}),d&&yE({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?vE():void 0,...A}),d&&bE({...A}),xE({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${n}px`),s.setProperty("--radix-popper-available-height",`${r}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&SE({element:k,padding:u}),zE({arrowWidth:P,arrowHeight:D}),m&&wE({strategy:"referenceHidden",...A})]});var F,I;const[q,z]=VE(R),V=_b(y);jb((()=>{L&&V?.()}),[L,V]);const B=$.arrow?.x,U=$.arrow?.y,K=0!==$.arrow?.centerOffset,[H,W]=i.useState();return jb((()=>{x&&W(window.getComputedStyle(x).zIndex)}),[x]),t.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:L?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(_E,{scope:r,placedSide:q,onArrowChange:C,arrowX:B,arrowY:U,shouldHideArrow:K,children:t.jsx(Ab.div,{"data-side":q,"data-align":z,...v,ref:S,style:{...v.style,animation:L?void 0:"none"}})})})}));LE.displayName=NE;var $E="PopperArrow",FE={top:"bottom",right:"left",bottom:"top",left:"right"},IE=i.forwardRef((function(e,n){const{__scopePopper:r,...o}=e,i=RE($E,r),s=FE[i.placedSide];return t.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:t.jsx(CE,{...o,ref:n,style:{...o.style,display:"block"}})})}));function qE(e){return null!==e}IE.displayName=$E;var zE=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,s=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,c]=VE(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+s/2,h=(o.arrow?.y??0)+a/2;let f="",p="";return"bottom"===l?(f=i?u:`${d}px`,p=-a+"px"):"top"===l?(f=i?u:`${d}px`,p=`${r.floating.height+a}px`):"right"===l?(f=-a+"px",p=i?u:`${h}px`):"left"===l&&(f=`${r.floating.width+a}px`,p=i?u:`${h}px`),{data:{x:f,y:p}}}});function VE(e){const[t,n="center"]=e.split("-");return[t,n]}var BE=ME,UE=AE,KE=LE,HE=IE,WE=["Enter"," "],GE=["ArrowUp","PageDown","End"],YE=["ArrowDown","PageUp","Home",...GE],QE={ltr:[...WE,"ArrowRight"],rtl:[...WE,"ArrowLeft"]},XE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},JE="Menu",[ZE,eP,tP]=Db(JE),[nP,rP]=yb(JE,[tP,DE,Kb]),oP=DE(),iP=Kb(),[sP,aP]=nP(JE),[lP,cP]=nP(JE),uP=e=>{const{__scopeMenu:n,open:r=!1,children:o,dir:s,onOpenChange:a,modal:l=!0}=e,c=oP(n),[u,d]=i.useState(null),h=i.useRef(!1),f=_b(a),p=$b(s);return i.useEffect((()=>{const e=()=>{h.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>h.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),t.jsx(BE,{...c,children:t.jsx(sP,{scope:n,open:r,onOpenChange:f,content:u,onContentChange:d,children:t.jsx(lP,{scope:n,onClose:i.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:h,dir:p,modal:l,children:o})})})};uP.displayName=JE;var dP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,...o}=e,i=oP(r);return t.jsx(UE,{...i,...o,ref:n})}));dP.displayName="MenuAnchor";var hP="MenuPortal",[fP,pP]=nP(hP,{forceMount:void 0}),mP=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=aP(hP,n);return t.jsx(fP,{scope:n,forceMount:r,children:t.jsx(nx,{present:r||s.open,children:t.jsx(iS,{asChild:!0,container:i,children:o})})})};mP.displayName=hP;var gP="MenuContent",[yP,vP]=nP(gP),bP=i.forwardRef(((e,n)=>{const r=pP(gP,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=aP(gP,e.__scopeMenu),a=cP(gP,e.__scopeMenu);return t.jsx(ZE.Provider,{scope:e.__scopeMenu,children:t.jsx(nx,{present:o||s.open,children:t.jsx(ZE.Slot,{scope:e.__scopeMenu,children:t.jsx(a.modal?xP:wP,{...i,ref:n})})})})})),xP=i.forwardRef(((e,n)=>{const r=aP(gP,e.__scopeMenu),o=i.useRef(null),s=wb(n,o);return i.useEffect((()=>{const e=o.current;if(e)return nk(e)}),[]),t.jsx(SP,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:gb(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),wP=i.forwardRef(((e,n)=>{const r=aP(gP,e.__scopeMenu);return t.jsx(SP,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})})),SP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...y}=e,v=aP(gP,r),b=cP(gP,r),x=oP(r),w=iP(r),S=eP(r),[k,C]=i.useState(null),E=i.useRef(null),P=wb(n,E,v.onContentChange),D=i.useRef(0),j=i.useRef(""),T=i.useRef(0),M=i.useRef(null),O=i.useRef("right"),A=i.useRef(0),N=g?YS:i.Fragment,_=g?{as:Sb,allowPinchZoom:!0}:void 0,R=e=>{const t=j.current+e,n=S().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let s=(a=e,l=Math.max(i,0),a.map(((e,t)=>a[(l+t)%a.length])));var a,l;1===o.length&&(s=s.filter((e=>e!==n)));const c=s.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return c!==n?c:void 0}(n.map((e=>e.textValue)),t,o),s=n.find((e=>e.textValue===i))?.ref.current;!function e(t){j.current=t,window.clearTimeout(D.current),""!==t&&(D.current=window.setTimeout((()=>e("")),1e3))}(t),s&&setTimeout((()=>s.focus()))};i.useEffect((()=>()=>window.clearTimeout(D.current)),[]),aS();const L=i.useCallback((e=>O.current===M.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const e=t[i].x,a=t[i].y,l=t[s].y;a>r!=l>r&&n<(t[s].x-e)*(r-a)/(l-a)+e&&(o=!o)}return o}(n,t)}(e,M.current?.area)),[]);return t.jsx(yP,{scope:r,searchRef:j,onItemEnter:i.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),onItemLeave:i.useCallback((e=>{L(e)||(E.current?.focus(),C(null))}),[L]),onTriggerLeave:i.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),pointerGraceTimerRef:T,onPointerGraceIntentChange:i.useCallback((e=>{M.current=e}),[]),children:t.jsx(N,{..._,children:t.jsx(Jw,{asChild:!0,trapped:s,onMountAutoFocus:gb(a,(e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:l,children:t.jsx(Gk,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:t.jsx(ex,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:C,onEntryFocus:gb(u,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:t.jsx(KE,{role:"menu","aria-orientation":"vertical","data-state":GP(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...y,ref:P,style:{outline:"none",...y.style},onKeyDown:gb(y.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&R(e.key));if(e.target!==E.current)return;if(!YE.includes(e.key))return;e.preventDefault();const o=S().filter((e=>!e.disabled)).map((e=>e.ref.current));GE.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)})),onBlur:gb(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),j.current="")})),onPointerMove:gb(e.onPointerMove,XP((e=>{const t=A.current!==e.clientX;if(e.currentTarget.contains(e.target)&&t){O.current=e.clientX>A.current?"right":"left",A.current=e.clientX}})))})})})})})})}));bP.displayName=gP;var kP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(Ab.div,{role:"group",...o,ref:n})}));kP.displayName="MenuGroup";var CP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(Ab.div,{...o,ref:n})}));CP.displayName="MenuLabel";var EP="MenuItem",PP="menu.itemSelect",DP=i.forwardRef(((e,n)=>{const{disabled:r=!1,onSelect:o,...s}=e,a=i.useRef(null),l=cP(EP,e.__scopeMenu),c=vP(EP,e.__scopeMenu),u=wb(n,a),d=i.useRef(!1);return t.jsx(jP,{...s,ref:u,disabled:r,onClick:gb(e.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(PP,{bubbles:!0,cancelable:!0});e.addEventListener(PP,(e=>o?.(e)),{once:!0}),Nb(e,t),t.defaultPrevented?d.current=!1:l.onClose()}})),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:gb(e.onPointerUp,(e=>{d.current||e.currentTarget?.click()})),onKeyDown:gb(e.onKeyDown,(e=>{r||""!==c.searchRef.current&&" "===e.key||WE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));DP.displayName=EP;var jP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:s,...a}=e,l=vP(EP,r),c=iP(r),u=i.useRef(null),d=wb(n,u),[h,f]=i.useState(!1),[p,m]=i.useState("");return i.useEffect((()=>{const e=u.current;e&&m((e.textContent??"").trim())}),[a.children]),t.jsx(ZE.ItemSlot,{scope:r,disabled:o,textValue:s??p,children:t.jsx(tx,{asChild:!0,...c,focusable:!o,children:t.jsx(Ab.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:gb(e.onPointerMove,XP((e=>{if(o)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:gb(e.onPointerLeave,XP((e=>l.onItemLeave(e)))),onFocus:gb(e.onFocus,(()=>f(!0))),onBlur:gb(e.onBlur,(()=>f(!1)))})})})})),TP=i.forwardRef(((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return t.jsx($P,{scope:e.__scopeMenu,checked:r,children:t.jsx(DP,{role:"menuitemcheckbox","aria-checked":YP(r)?"mixed":r,...i,ref:n,"data-state":QP(r),onSelect:gb(i.onSelect,(()=>o?.(!!YP(r)||!r)),{checkForDefaultPrevented:!1})})})}));TP.displayName="MenuCheckboxItem";var MP="MenuRadioGroup",[OP,AP]=nP(MP,{value:void 0,onValueChange:()=>{}}),NP=i.forwardRef(((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=_b(o);return t.jsx(OP,{scope:e.__scopeMenu,value:r,onValueChange:s,children:t.jsx(kP,{...i,ref:n})})}));NP.displayName=MP;var _P="MenuRadioItem",RP=i.forwardRef(((e,n)=>{const{value:r,...o}=e,i=AP(_P,e.__scopeMenu),s=r===i.value;return t.jsx($P,{scope:e.__scopeMenu,checked:s,children:t.jsx(DP,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":QP(s),onSelect:gb(o.onSelect,(()=>i.onValueChange?.(r)),{checkForDefaultPrevented:!1})})})}));RP.displayName=_P;var LP="MenuItemIndicator",[$P,FP]=nP(LP,{checked:!1}),IP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=FP(LP,r);return t.jsx(nx,{present:o||YP(s.checked)||!0===s.checked,children:t.jsx(Ab.span,{...i,ref:n,"data-state":QP(s.checked)})})}));IP.displayName=LP;var qP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(Ab.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})}));qP.displayName="MenuSeparator";var zP=i.forwardRef(((e,n)=>{const{__scopeMenu:r,...o}=e,i=oP(r);return t.jsx(HE,{...i,...o,ref:n})}));zP.displayName="MenuArrow";var[VP,BP]=nP("MenuSub"),UP="MenuSubTrigger",KP=i.forwardRef(((e,n)=>{const r=aP(UP,e.__scopeMenu),o=cP(UP,e.__scopeMenu),s=BP(UP,e.__scopeMenu),a=vP(UP,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},h=i.useCallback((()=>{l.current&&window.clearTimeout(l.current),l.current=null}),[]);return i.useEffect((()=>h),[h]),i.useEffect((()=>{const e=c.current;return()=>{window.clearTimeout(e),u(null)}}),[c,u]),t.jsx(dP,{asChild:!0,...d,children:t.jsx(jP,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":GP(r.open),...e,ref:xb(n,s.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:gb(e.onPointerMove,XP((t=>{a.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||l.current||(a.onPointerGraceIntentChange(null),l.current=window.setTimeout((()=>{r.onOpenChange(!0),h()}),100))}))),onPointerLeave:gb(e.onPointerLeave,XP((e=>{h();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=t[o?"left":"right"],s=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+(o?-5:5),y:e.clientY},{x:i,y:t.top},{x:s,y:t.top},{x:s,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:gb(e.onKeyDown,(t=>{e.disabled||""!==a.searchRef.current&&" "===t.key||QE[o.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())}))})})}));KP.displayName=UP;var HP="MenuSubContent",WP=i.forwardRef(((e,n)=>{const r=pP(gP,e.__scopeMenu),{forceMount:o=r.forceMount,...s}=e,a=aP(gP,e.__scopeMenu),l=cP(gP,e.__scopeMenu),c=BP(HP,e.__scopeMenu),u=i.useRef(null),d=wb(n,u);return t.jsx(ZE.Provider,{scope:e.__scopeMenu,children:t.jsx(nx,{present:o||a.open,children:t.jsx(ZE.Slot,{scope:e.__scopeMenu,children:t.jsx(SP,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:d,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:gb(e.onFocusOutside,(e=>{e.target!==c.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:gb(e.onEscapeKeyDown,(e=>{l.onClose(),e.preventDefault()})),onKeyDown:gb(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=XE[l.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())}))})})})})}));function GP(e){return e?"open":"closed"}function YP(e){return"indeterminate"===e}function QP(e){return YP(e)?"indeterminate":e?"checked":"unchecked"}function XP(e){return t=>"mouse"===t.pointerType?e(t):void 0}WP.displayName=HP;var JP=uP,ZP=dP,eD=mP,tD=bP,nD=kP,rD=CP,oD=DP,iD=TP,sD=NP,aD=RP,lD=IP,cD=qP,uD=zP,dD=KP,hD=WP,fD="DropdownMenu",[pD,mD]=yb(fD,[rP]),gD=rP(),[yD,vD]=pD(fD),bD=e=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:s,defaultOpen:a,onOpenChange:l,modal:c=!0}=e,u=gD(n),d=i.useRef(null),[h=!1,f]=Rb({prop:s,defaultProp:a,onChange:l});return t.jsx(yD,{scope:n,triggerId:Ob(),triggerRef:d,contentId:Ob(),open:h,onOpenChange:f,onOpenToggle:i.useCallback((()=>f((e=>!e))),[f]),modal:c,children:t.jsx(JP,{...u,open:h,onOpenChange:f,dir:o,modal:c,children:r})})};bD.displayName=fD;var xD="DropdownMenuTrigger",wD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=vD(xD,r),a=gD(r);return t.jsx(ZP,{asChild:!0,...a,children:t.jsx(Ab.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:xb(n,s.triggerRef),onPointerDown:gb(e.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(s.onOpenToggle(),s.open||e.preventDefault())})),onKeyDown:gb(e.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&s.onOpenToggle(),"ArrowDown"===e.key&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));wD.displayName=xD;var SD=e=>{const{__scopeDropdownMenu:n,...r}=e,o=gD(n);return t.jsx(eD,{...o,...r})};SD.displayName="DropdownMenuPortal";var kD="DropdownMenuContent",CD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,s=vD(kD,r),a=gD(r),l=i.useRef(!1);return t.jsx(tD,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...o,ref:n,onCloseAutoFocus:gb(e.onCloseAutoFocus,(e=>{l.current||s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()})),onInteractOutside:gb(e.onInteractOutside,(e=>{const t=e.detail.originalEvent;s.modal&&!(2===t.button||0===t.button&&!0===t.ctrlKey)||(l.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));CD.displayName=kD;i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(nD,{...i,...o,ref:n})})).displayName="DropdownMenuGroup";var ED=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(rD,{...i,...o,ref:n})}));ED.displayName="DropdownMenuLabel";var PD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(oD,{...i,...o,ref:n})}));PD.displayName="DropdownMenuItem";var DD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(iD,{...i,...o,ref:n})}));DD.displayName="DropdownMenuCheckboxItem";i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(sD,{...i,...o,ref:n})})).displayName="DropdownMenuRadioGroup";var jD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(aD,{...i,...o,ref:n})}));jD.displayName="DropdownMenuRadioItem";var TD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(lD,{...i,...o,ref:n})}));TD.displayName="DropdownMenuItemIndicator";var MD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(cD,{...i,...o,ref:n})}));MD.displayName="DropdownMenuSeparator";i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(uD,{...i,...o,ref:n})})).displayName="DropdownMenuArrow";var OD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(dD,{...i,...o,ref:n})}));OD.displayName="DropdownMenuSubTrigger";var AD=i.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=gD(r);return t.jsx(hD,{...i,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));AD.displayName="DropdownMenuSubContent";var ND=SD,_D=CD,RD=ED,LD=PD,$D=DD,FD=jD,ID=TD,qD=MD,zD=OD,VD=AD;const BD=bD,UD=wD;i.forwardRef((({className:e,inset:n,children:r,...o},i)=>t.jsxs(zD,{ref:i,className:Uv("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[r,t.jsx(Iy,{className:"ml-auto"})]}))).displayName=zD.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(VD,{ref:r,className:Uv("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}))).displayName=VD.displayName;const KD=i.forwardRef((({className:e,sideOffset:n=4,...r},o)=>t.jsx(ND,{children:t.jsx(_D,{ref:o,sideOffset:n,className:Uv("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})));KD.displayName=_D.displayName;const HD=i.forwardRef((({className:e,inset:n,...r},o)=>t.jsx(LD,{ref:o,className:Uv("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...r})));HD.displayName=LD.displayName;i.forwardRef((({className:e,children:n,checked:r,...o},i)=>t.jsxs($D,{ref:i,className:Uv("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[t.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(ID,{children:t.jsx(Ly,{className:"h-4 w-4"})})}),n]}))).displayName=$D.displayName;i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(FD,{ref:o,className:Uv("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(ID,{children:t.jsx(zy,{className:"h-2 w-2 fill-current"})})}),n]}))).displayName=FD.displayName;i.forwardRef((({className:e,inset:n,...r},o)=>t.jsx(RD,{ref:o,className:Uv("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}))).displayName=RD.displayName;const WD=i.forwardRef((({className:e,...n},r)=>t.jsx(qD,{ref:r,className:Uv("-mx-1 my-1 h-px bg-muted",e),...n})));WD.displayName=qD.displayName;const GD=({label:e,isCompleted:n,isActive:r})=>t.jsxs("div",{className:"flex items-center gap-3 py-3",children:[t.jsx("div",n?{className:"w-6 h-6 flex items-center justify-center",children:t.jsx(Ly,{className:"w-4 h-4 text-emerald-500"})}:{className:"w-6 h-6 flex items-center justify-center",children:t.jsx(Vy,{className:Uv("w-4 h-4",r?"text-[var(--reach-primary)]":"text-gray-600")})}),t.jsx("span",{className:Uv("text-sm font-medium",r?"text-gray-900":"text-gray-400"),children:e})]});function YD(...e){return Bv(Xy(e))}const QD=({iconDefinitions:e,tailwindClassDefinitions:n,handleBack:r,handleNext:o,backText:i,nextText:s,backDisabled:a,nextDisabled:l,hideBack:c})=>t.jsxs("div",{className:"flex gap-4",children:[!c&&t.jsxs(Iw,{onClick:r,disabled:a,className:YD("flex items-center gap-2",n.SecondaryButton,n.SecondaryButtonHover,a&&"opacity-50 cursor-not-allowed"),children:[t.jsx(e.BackButton,{}),t.jsx("span",{children:i})]}),t.jsxs(Iw,{onClick:o,disabled:l,className:YD("flex items-center gap-2",n.PrimaryButton,n.PrimaryButtonHover,l&&"opacity-50 cursor-not-allowed"),children:[t.jsx("span",{children:s}),t.jsx(e.NextButton,{})]})]}),XD=()=>{const e=ue({queryKey:["channel-accounts"],queryFn:()=>(async()=>(await Ja("/channel/accounts",{method:"GET"})).data)()});return{channelAccounts:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelAccounts:e.refetch}};var JD=(e=>(e.REACH_MANAGED="reach-managed",e.TWILLIO="twillio",e))(JD||{});const ZD=()=>{const e=ue({queryKey:["channel-senders"],queryFn:()=>(async()=>(await Ja("/channel/senders",{method:"GET"})).data)()});return{channelSenders:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelSenders:e.refetch}},ej=()=>{const e=ne(),t=de({mutationFn:e=>(async e=>(await Ja(`${ky}/${e}`)).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["communication-group"]})}});return{getCommunicationGroup:t.mutate,isGetting:t.isPending,getError:t.error,isGetSuccess:t.isSuccess}},tj=(e,t)=>{const n=ne(),r=de({mutationFn:e=>(async e=>(await Ja(`${ky}`,{method:"POST",body:JSON.stringify(e)})).data)(e),onSuccess:r=>(Cy(e,{action:[...t.action_data||[],{action_type:"send_communication",action_metadata:{action_type:"send_communication",communication_group_id:r.id}}]}),n.invalidateQueries({queryKey:["automations"]}),n.invalidateQueries({queryKey:["communicationGroups"]}),r)});return{createCommunicationForAutomation:r.mutate,isCreating:r.isPending}},nj=()=>{const e=ne(),t=de({mutationFn:({groupId:e,params:t})=>(async(e,t)=>(await Ja(`${ky}/${e}`,{method:"PATCH",body:JSON.stringify(t)})).data)(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:["communication-group"]})}});return{updateCommunicationGroup:t.mutate,isUpdating:t.isPending,updateError:t.error,isUpdateSuccess:t.isSuccess}},rj=i.forwardRef((({className:e,type:n,...r},o)=>t.jsx("input",{type:n,className:Uv("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r})));rj.displayName="Input";var oj=i.forwardRef(((e,n)=>t.jsx(Ab.label,{...e,ref:n,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));oj.displayName="Label";var ij=oj;const sj=Lw("text-[var(--reach-foreground)] text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),aj=i.forwardRef((({className:e,...n},r)=>t.jsx(ij,{ref:r,className:Uv(sj(),e),...n})));function lj(e,[t,n]){return Math.min(n,Math.max(t,e))}aj.displayName=ij.displayName;var cj=i.forwardRef(((e,n)=>t.jsx(Ab.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));cj.displayName="VisuallyHidden";var uj=[" ","Enter","ArrowUp","ArrowDown"],dj=[" ","Enter"],hj="Select",[fj,pj,mj]=Db(hj),[gj,yj]=yb(hj,[mj,DE]),vj=DE(),[bj,xj]=gj(hj),[wj,Sj]=gj(hj),kj=e=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:s,onOpenChange:a,value:l,defaultValue:c,onValueChange:u,dir:d,name:h,autoComplete:f,disabled:p,required:m,form:g}=e,y=vj(n),[v,b]=i.useState(null),[x,w]=i.useState(null),[S,k]=i.useState(!1),C=$b(d),[E=!1,P]=Rb({prop:o,defaultProp:s,onChange:a}),[D,j]=Rb({prop:l,defaultProp:c,onChange:u}),T=i.useRef(null),M=!v||(g||!!v.closest("form")),[O,A]=i.useState(new Set),N=Array.from(O).map((e=>e.props.value)).join(";");return t.jsx(BE,{...y,children:t.jsxs(bj,{required:m,scope:n,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:Ob(),value:D,onValueChange:j,open:E,onOpenChange:P,dir:C,triggerPointerDownPosRef:T,disabled:p,children:[t.jsx(fj.Provider,{scope:n,children:t.jsx(wj,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback((e=>{A((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:i.useCallback((e=>{A((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),M?t.jsxs(cT,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:f,value:D,onChange:e=>j(e.target.value),disabled:p,form:g,children:[void 0===D?t.jsx("option",{value:""}):null,Array.from(O)]},N):null]})})};kj.displayName=hj;var Cj="SelectTrigger",Ej=i.forwardRef(((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...s}=e,a=vj(r),l=xj(Cj,r),c=l.disabled||o,u=wb(n,l.onTriggerChange),d=pj(r),h=i.useRef("touch"),[f,p,m]=uT((e=>{const t=d().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=dT(t,e,n);void 0!==r&&l.onValueChange(r.value)})),g=e=>{c||(l.onOpenChange(!0),m()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return t.jsx(UE,{asChild:!0,...a,children:t.jsx(Ab.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":lT(l.value)?"":void 0,...s,ref:u,onClick:gb(s.onClick,(e=>{e.currentTarget.focus(),"mouse"!==h.current&&g(e)})),onPointerDown:gb(s.onPointerDown,(e=>{h.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())})),onKeyDown:gb(s.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||uj.includes(e.key)&&(g(),e.preventDefault())}))})})}));Ej.displayName=Cj;var Pj="SelectValue",Dj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=xj(Pj,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==s,h=wb(n,c.onValueNodeChange);return jb((()=>{u(d)}),[u,d]),t.jsx(Ab.span,{...l,ref:h,style:{pointerEvents:"none"},children:lT(c.value)?t.jsx(t.Fragment,{children:a}):s})}));Dj.displayName=Pj;var jj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return t.jsx(Ab.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})}));jj.displayName="SelectIcon";var Tj=e=>t.jsx(iS,{asChild:!0,...e});Tj.displayName="SelectPortal";var Mj="SelectContent",Oj=i.forwardRef(((e,n)=>{const r=xj(Mj,e.__scopeSelect),[o,a]=i.useState();if(jb((()=>{a(new DocumentFragment)}),[]),!r.open){const n=o;return n?s.createPortal(t.jsx(Nj,{scope:e.__scopeSelect,children:t.jsx(fj.Slot,{scope:e.__scopeSelect,children:t.jsx("div",{children:e.children})})}),n):null}return t.jsx(Rj,{...e,ref:n})}));Oj.displayName=Mj;var Aj=10,[Nj,_j]=gj(Mj),Rj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:v,...b}=e,x=xj(Mj,r),[w,S]=i.useState(null),[k,C]=i.useState(null),E=wb(n,(e=>S(e))),[P,D]=i.useState(null),[j,T]=i.useState(null),M=pj(r),[O,A]=i.useState(!1),N=i.useRef(!1);i.useEffect((()=>{if(w)return nk(w)}),[w]),aS();const _=i.useCallback((e=>{const[t,...n]=M().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(i?.scrollIntoView({block:"nearest"}),i===t&&k&&(k.scrollTop=0),i===r&&k&&(k.scrollTop=k.scrollHeight),i?.focus(),document.activeElement!==o)return}}),[M,k]),R=i.useCallback((()=>_([P,w])),[_,P,w]);i.useEffect((()=>{O&&R()}),[O,R]);const{onOpenChange:L,triggerPointerDownPosRef:$}=x;i.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-($.current?.x??0)),y:Math.abs(Math.round(t.pageY)-($.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),$.current=null};return null!==$.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,L,$]),i.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[F,I]=uT((e=>{const t=M().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=dT(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),q=i.useCallback(((e,t,n)=>{const r=!N.current&&!n;(void 0!==x.value&&x.value===t||r)&&(D(e),r&&(N.current=!0))}),[x.value]),z=i.useCallback((()=>w?.focus()),[w]),V=i.useCallback(((e,t,n)=>{(void 0!==x.value&&x.value===t||!N.current&&!n)&&T(e)}),[x.value]),B="popper"===o?$j:Lj,U=B===$j?{side:c,sideOffset:u,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:y,avoidCollisions:v}:{};return t.jsx(Nj,{scope:r,content:w,viewport:k,onViewportChange:C,itemRefCallback:q,selectedItem:P,onItemLeave:z,itemTextRefCallback:V,focusSelectedItem:R,selectedItemText:j,position:o,isPositioned:O,searchRef:F,children:t.jsx(YS,{as:Sb,allowPinchZoom:!0,children:t.jsx(Jw,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:gb(s,(e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:t.jsx(Hw,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:t.jsx(B,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...U,onPlaced:()=>A(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:gb(b.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=M().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=t.indexOf(e.target);t=t.slice(n+1)}setTimeout((()=>_(t))),e.preventDefault()}}))})})})})})}));Rj.displayName="SelectContentImpl";var Lj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onPlaced:o,...s}=e,a=xj(Mj,r),l=_j(Mj,r),[c,u]=i.useState(null),[d,h]=i.useState(null),f=wb(n,(e=>h(e))),p=pj(r),m=i.useRef(!1),g=i.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=l,w=i.useCallback((()=>{if(a.trigger&&a.valueNode&&c&&d&&y&&v&&b){const e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==a.dir){const o=n.left-(r.left-t.left),i=e.width+(e.left-o),s=Math.max(i,t.width),a=window.innerWidth-Aj,l=lj(o,[Aj,Math.max(Aj,a-s)]);c.style.minWidth=i+"px",c.style.left=l+"px"}else{const o=window.innerWidth-n.right-(t.right-r.right),i=window.innerWidth-e.right-o,s=e.width+i,a=Math.max(s,t.width),l=window.innerWidth-Aj,u=lj(o,[Aj,Math.max(Aj,l-a)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const i=p(),s=window.innerHeight-2*Aj,l=y.scrollHeight,u=window.getComputedStyle(d),h=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),x=h+f+l+parseInt(u.paddingBottom,10)+g,w=Math.min(5*v.offsetHeight,x),S=window.getComputedStyle(y),k=parseInt(S.paddingTop,10),C=parseInt(S.paddingBottom,10),E=e.top+e.height/2-Aj,P=s-E,D=v.offsetHeight/2,j=h+f+(v.offsetTop+D),T=x-j;if(j<=E){const e=i.length>0&&v===i[i.length-1].ref.current;c.style.bottom="0px";const t=Math.max(P,D+(e?C:0)+(d.clientHeight-y.offsetTop-y.offsetHeight)+g);c.style.height=j+t+"px"}else{const e=i.length>0&&v===i[0].ref.current;c.style.top="0px";const t=Math.max(E,h+y.offsetTop+(e?k:0)+D);c.style.height=t+T+"px",y.scrollTop=j-E+y.offsetTop}c.style.margin=`${Aj}px 0`,c.style.minHeight=w+"px",c.style.maxHeight=s+"px",o?.(),requestAnimationFrame((()=>m.current=!0))}}),[p,a.trigger,a.valueNode,c,d,y,v,b,a.dir,o]);jb((()=>w()),[w]);const[S,k]=i.useState();jb((()=>{d&&k(window.getComputedStyle(d).zIndex)}),[d]);const C=i.useCallback((e=>{e&&!0===g.current&&(w(),x?.(),g.current=!1)}),[w,x]);return t.jsx(Fj,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:t.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:t.jsx(Ab.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})}));Lj.displayName="SelectItemAlignedPosition";var $j=i.forwardRef(((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Aj,...s}=e,a=vj(r);return t.jsx(KE,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));$j.displayName="SelectPopperPosition";var[Fj,Ij]=gj(Mj,{}),qj="SelectViewport",zj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,nonce:o,...s}=e,a=_j(qj,r),l=Ij(qj,r),c=wb(n,a.onViewportChange),u=i.useRef(0);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),t.jsx(fj.Slot,{scope:r,children:t.jsx(Ab.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:gb(s.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Aj,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),s=Math.max(o,i);if(s<r){const o=s+e,i=Math.min(r,o),a=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop}))})})]})}));zj.displayName=qj;var Vj="SelectGroup",[Bj,Uj]=gj(Vj);i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=Ob();return t.jsx(Bj,{scope:r,id:i,children:t.jsx(Ab.div,{role:"group","aria-labelledby":i,...o,ref:n})})})).displayName=Vj;var Kj="SelectLabel",Hj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=Uj(Kj,r);return t.jsx(Ab.div,{id:i.id,...o,ref:n})}));Hj.displayName=Kj;var Wj="SelectItem",[Gj,Yj]=gj(Wj),Qj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,value:o,disabled:s=!1,textValue:a,...l}=e,c=xj(Wj,r),u=_j(Wj,r),d=c.value===o,[h,f]=i.useState(a??""),[p,m]=i.useState(!1),g=wb(n,(e=>u.itemRefCallback?.(e,o,s))),y=Ob(),v=i.useRef("touch"),b=()=>{s||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return t.jsx(Gj,{scope:r,value:o,disabled:s,textId:y,isSelected:d,onItemTextChange:i.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:t.jsx(fj.ItemSlot,{scope:r,value:o,disabled:s,textValue:h,children:t.jsx(Ab.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:g,onFocus:gb(l.onFocus,(()=>m(!0))),onBlur:gb(l.onBlur,(()=>m(!1))),onClick:gb(l.onClick,(()=>{"mouse"!==v.current&&b()})),onPointerUp:gb(l.onPointerUp,(()=>{"mouse"===v.current&&b()})),onPointerDown:gb(l.onPointerDown,(e=>{v.current=e.pointerType})),onPointerMove:gb(l.onPointerMove,(e=>{v.current=e.pointerType,s?u.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:gb(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()})),onKeyDown:gb(l.onKeyDown,(e=>{""!==u.searchRef?.current&&" "===e.key||(dj.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))})})})}));Qj.displayName=Wj;var Xj="SelectItemText",Jj=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:a,...l}=e,c=xj(Xj,r),u=_j(Xj,r),d=Yj(Xj,r),h=Sj(Xj,r),[f,p]=i.useState(null),m=wb(n,(e=>p(e)),d.onItemTextChange,(e=>u.itemTextRefCallback?.(e,d.value,d.disabled))),g=f?.textContent,y=i.useMemo((()=>t.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value)),[d.disabled,d.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=h;return jb((()=>(v(y),()=>b(y))),[v,b,y]),t.jsxs(t.Fragment,{children:[t.jsx(Ab.span,{id:d.textId,...l,ref:m}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?s.createPortal(l.children,c.valueNode):null]})}));Jj.displayName=Xj;var Zj="SelectItemIndicator",eT=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return Yj(Zj,r).isSelected?t.jsx(Ab.span,{"aria-hidden":!0,...o,ref:n}):null}));eT.displayName=Zj;var tT="SelectScrollUpButton",nT=i.forwardRef(((e,n)=>{const r=_j(tT,e.__scopeSelect),o=Ij(tT,e.__scopeSelect),[s,a]=i.useState(!1),l=wb(n,o.onScrollButtonChange);return jb((()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),s?t.jsx(iT,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));nT.displayName=tT;var rT="SelectScrollDownButton",oT=i.forwardRef(((e,n)=>{const r=_j(rT,e.__scopeSelect),o=Ij(rT,e.__scopeSelect),[s,a]=i.useState(!1),l=wb(n,o.onScrollButtonChange);return jb((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),s?t.jsx(iT,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));oT.displayName=rT;var iT=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...s}=e,a=_j("SelectScrollButton",r),l=i.useRef(null),c=pj(r),u=i.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return i.useEffect((()=>()=>u()),[u]),jb((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),t.jsx(Ab.div,{"aria-hidden":!0,...s,ref:n,style:{flexShrink:0,...s.style},onPointerDown:gb(s.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:gb(s.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:gb(s.onPointerLeave,(()=>{u()}))})})),sT=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return t.jsx(Ab.div,{"aria-hidden":!0,...o,ref:n})}));sT.displayName="SelectSeparator";var aT="SelectArrow";function lT(e){return""===e||void 0===e}i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=vj(r),s=xj(aT,r),a=_j(aT,r);return s.open&&"popper"===a.position?t.jsx(HE,{...i,...o,ref:n}):null})).displayName=aT;var cT=i.forwardRef(((e,n)=>{const{value:r,...o}=e,s=i.useRef(null),a=wb(n,s),l=function(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(r);return i.useEffect((()=>{const e=s.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),t.jsx(cj,{asChild:!0,children:t.jsx("select",{...o,ref:a,defaultValue:r})})}));function uT(e){const t=_b(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),s=i.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return i.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,s]}function dT(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(s=e,a=Math.max(o,0),s.map(((e,t)=>s[(a+t)%s.length])));var s,a;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}cT.displayName="BubbleSelect";var hT=Ej,fT=jj,pT=Tj,mT=Oj,gT=zj,yT=Hj,vT=Qj,bT=Jj,xT=eT,wT=nT,ST=oT,kT=sT;const CT=kj,ET=Dj,PT=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(hT,{ref:o,className:Uv("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,t.jsx(fT,{asChild:!0,children:t.jsx($y,{className:"h-4 w-4 opacity-50"})})]})));PT.displayName=hT.displayName;const DT=i.forwardRef((({className:e,...n},r)=>t.jsx(wT,{ref:r,className:Uv("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx(qy,{className:"h-4 w-4"})})));DT.displayName=wT.displayName;const jT=i.forwardRef((({className:e,...n},r)=>t.jsx(ST,{ref:r,className:Uv("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx($y,{className:"h-4 w-4"})})));jT.displayName=ST.displayName;const TT=i.forwardRef((({className:e,children:n,position:r="popper",...o},i)=>t.jsx(pT,{children:t.jsxs(mT,{ref:i,className:Uv("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[t.jsx(DT,{}),t.jsx(gT,{className:Uv("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),t.jsx(jT,{})]})})));TT.displayName=mT.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(yT,{ref:r,className:Uv("px-2 py-1.5 text-sm font-semibold",e),...n}))).displayName=yT.displayName;const MT=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(vT,{ref:o,className:Uv("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(xT,{children:t.jsx(Ly,{className:"h-4 w-4"})})}),t.jsx(bT,{children:n})]})));MT.displayName=vT.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(kT,{ref:r,className:Uv("-mx-1 my-1 h-px bg-muted",e),...n}))).displayName=kT.displayName;const OT=({automation:e})=>{const r=n.useCallback((()=>{const t=e.action_data?.find((e=>"send_communication"===e.action_type));return t?.action_metadata.communication_group_id}),[e.action_data]),[o,i]=n.useState(r()??null),[s,a]=n.useState(!1),[l,c]=n.useState(null),[u,d]=n.useState(null),[h,f]=n.useState(null),[p,m]=n.useState(null),{channelSenders:g}=ZD(),{channelAccounts:y}=XD(),{getCommunicationGroup:v}=ej(),{createCommunicationForAutomation:b}=tj(e.id,e),{updateCommunicationGroup:x}=nj(),{updateAutomation:w}=jy(e.id);if(n.useEffect((()=>{l&&u&&p&&!s&&(a(!0),o?x({groupId:o,params:{email_channel_sender_id:l,email_html_body:p,email_subject:u,...h&&{email_preview_text:h}}}):b({email_channel_sender_id:l,email_html_body:p,email_subject:u,...h&&{email_preview_text:h}},{onSuccess:e=>{i(e.id)}}),a(!1))}),[l,u,h,p,e.action_data,x,w,r,o,s,b]),n.useEffect((()=>{o&&v(o,{onSuccess:e=>{c(e.email_channel_sender_id),d(e.email_subject),f(e.email_preview_text),m(e.email_html_body)}})}),[r,v,e.action_data,e,o]),!y||!g)return t.jsx("div",{children:t.jsx(xy,{text:["Loading..."]})});const S=g.channel_senders?.filter((e=>e.channel_sender_metadata.userPart)),k=S?.map((e=>{const t=y.channel_accounts?.find((t=>t.id===e.channel_account_id));if(!t)return null;switch(t.channel_account_metadata.type){case JD.REACH_MANAGED:return{channel_sender_id:e.id,full_domain:`${e.channel_sender_metadata.userPart}@${t.channel_account_metadata.baseDomain}.embedreach.org`};case JD.TWILLIO:return null;default:throw sb(t.channel_account_metadata.type,JD)}})).filter((e=>null!==e));return t.jsx("div",{children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx(aj,{children:"From Email"}),t.jsxs(CT,{onValueChange:e=>{c(e)},value:l??void 0,children:[t.jsx(PT,{children:t.jsx(ET,{placeholder:"Select email",children:l?k?.find((e=>e.channel_sender_id===l))?.full_domain:""})}),t.jsx(TT,{children:k?.map((e=>t.jsx(MT,{value:e.channel_sender_id,children:e.full_domain},e.channel_sender_id)))})]})]}),t.jsxs("div",{children:[t.jsx(aj,{children:"Subject"}),t.jsx(rj,{placeholder:"Enter email subject",value:u??"",onChange:e=>d(e.target.value)})]}),t.jsxs("div",{children:[t.jsx(aj,{children:"Preview Text"}),t.jsx(rj,{placeholder:"Enter preview text",value:h??"",onChange:e=>f(e.target.value)})]})]}),t.jsxs("div",{className:"border rounded-lg p-4",children:[t.jsx("div",{className:"flex justify-between items-center mb-4",children:t.jsx("h3",{className:"font-medium",children:"Preview"})}),t.jsx(rj,{className:"min-h-[300px]",placeholder:"Email content preview...",value:p??"",onChange:e=>m(e.target.value)})]})]})})},AT=({automation:e})=>{const[r,o]=n.useState(!1),i=n.useCallback((()=>{const t=e.action_data?.find((e=>"send_communication"===e.action_type));return t?.action_metadata.communication_group_id}),[e.action_data]),[s,a]=n.useState(null),[l,c]=n.useState(null),[u,d]=n.useState(i()??null),{channelSenders:h}=ZD(),{channelAccounts:f}=XD(),{createCommunicationForAutomation:p}=tj(e.id,e),{updateCommunicationGroup:m}=nj(),{getCommunicationGroup:g}=ej(),{updateAutomation:y}=jy(e.id);if(n.useEffect((()=>{null===s||null===l||r||(o(!0),u?m({groupId:u,params:{sms_channel_sender_id:s,sms_message_body:l}}):p({sms_channel_sender_id:s,sms_message_body:l},{onSuccess:e=>{d(e.id)}}),o(!1))}),[s,l,r,e.action_data,u,p,y,m]),n.useEffect((()=>{u&&g(u,{onSuccess:e=>{a(e.sms_channel_sender_id),c(e.sms_message_body)}})}),[e.action_data,u,g]),!f||!h)return t.jsx("div",{children:t.jsx(xy,{text:["Loading..."]})});const v=h.channel_senders?.filter((e=>e.channel_sender_metadata.from));return t.jsx("div",{children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx(aj,{children:"From Number"}),t.jsxs(CT,{onValueChange:e=>{a(e)},value:s??void 0,children:[t.jsx(PT,{children:t.jsx(ET,{placeholder:"Select number",children:s?v?.find((e=>e.id===s))?.channel_sender_metadata.from:""})}),t.jsx(TT,{children:v?.map((e=>t.jsx(MT,{value:e.id,children:e.channel_sender_metadata.from},e.id)))})]})]})}),t.jsxs("div",{className:"border rounded-lg p-4",children:[t.jsx("div",{className:"flex justify-between items-center mb-4",children:t.jsx("h3",{className:"font-medium",children:"Preview"})}),t.jsxs("div",{className:"relative",children:[t.jsx(rj,{className:"min-h-[300px]",placeholder:"Text message preview...",value:l??"",onChange:e=>{c(e.target.value.slice(0,1600))},maxLength:1600}),t.jsxs("div",{className:"flex justify-end mt-2 text-sm transition-colors duration-300 "+(l&&l.length>1400?l.length>=1600?"text-red-500":"text-amber-500":"text-gray-500"),children:[l?l.length:0,"/1600 characters"]})]})]})]})})},NT=({automation:e})=>t.jsxs("div",{className:"p-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-6",children:"Edit Message Content"}),t.jsxs(Sx,{defaultValue:"email",className:"w-full",children:[t.jsxs(kx,{className:"mb-6 w-full justify-center",children:[t.jsx(Cx,{value:"email",children:"Email"}),t.jsx(Cx,{value:"text",children:"Text Message"})]}),t.jsx(Ex,{value:"email",className:"space-y-6",children:t.jsx(OT,{automation:e})}),t.jsx(Ex,{value:"text",className:"space-y-6",children:t.jsx(AT,{automation:e})})]})]});function _T(e){return(_T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RT(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function LT(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function $T(e){LT(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===_T(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)}function FT(e,t){LT(2,arguments);var n=$T(e),r=RT(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function IT(e,t){LT(2,arguments);var n=$T(e),r=RT(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var qT={};function zT(){return qT}function VT(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=zT(),d=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$T(e),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function BT(e){return LT(1,arguments),VT(e,{weekStartsOn:1})}function UT(e){LT(1,arguments);var t=function(e){LT(1,arguments);var t=$T(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=BT(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var s=BT(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),BT(n)}function KT(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function HT(e){LT(1,arguments);var t=$T(e);return t.setHours(0,0,0,0),t}function WT(e,t){LT(2,arguments);var n=HT(e),r=HT(t),o=n.getTime()-KT(n),i=r.getTime()-KT(r);return Math.round((o-i)/864e5)}function GT(e,t){return LT(2,arguments),FT(e,7*RT(t))}function YT(e,t){return LT(2,arguments),IT(e,12*RT(t))}function QT(e,t){LT(2,arguments);var n=HT(e),r=HT(t);return n.getTime()===r.getTime()}function XT(e){return LT(1,arguments),e instanceof Date||"object"===_T(e)&&"[object Date]"===Object.prototype.toString.call(e)}function JT(e,t){LT(2,arguments);var n=$T(e),r=$T(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function ZT(e){LT(1,arguments);var t=$T(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function eM(e){LT(1,arguments);var t=$T(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tM(e){LT(1,arguments);var t=$T(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function nM(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=zT(),d=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$T(e),f=h.getDay(),p=6+(f<d?-7:0)-(f-d);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function rM(e){return LT(1,arguments),nM(e,{weekStartsOn:1})}function oM(e,t){return LT(2,arguments),function(e,t){LT(2,arguments);var n=$T(e).getTime(),r=RT(t);return new Date(n+r)}(e,-RT(t))}function iM(e){LT(1,arguments);var t=$T(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function sM(e){LT(1,arguments);var t=$T(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=iM(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var s=iM(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function aM(e){LT(1,arguments);var t=$T(e),n=iM(t).getTime()-function(e){LT(1,arguments);var t=sM(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),iM(n)}(t).getTime();return Math.round(n/6048e5)+1}function lM(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=zT(),d=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$T(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function cM(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=$T(e),d=u.getUTCFullYear(),h=zT(),f=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:h.firstWeekContainsDate)&&void 0!==r?r:null===(l=h.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var m=lM(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var y=lM(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}function uM(e,t){LT(1,arguments);var n=$T(e),r=lM(n,t).getTime()-function(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=zT(),d=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),h=cM(e,t),f=new Date(0);return f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0),lM(f,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function dM(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var hM=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return dM("yy"===t?r%100:r,t.length)},fM=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):dM(n+1,2)},pM=function(e,t){return dM(e.getUTCDate(),t.length)},mM=function(e,t){return dM(e.getUTCHours()%12||12,t.length)},gM=function(e,t){return dM(e.getUTCHours(),t.length)},yM=function(e,t){return dM(e.getUTCMinutes(),t.length)},vM=function(e,t){return dM(e.getUTCSeconds(),t.length)},bM=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return dM(Math.floor(r*Math.pow(10,n-3)),t.length)},xM="midnight",wM="noon",SM="morning",kM="afternoon",CM="evening",EM="night",PM={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return hM(e,t)},Y:function(e,t,n,r){var o=cM(e,r),i=o>0?o:1-o;return"YY"===t?dM(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):dM(i,t.length)},R:function(e,t){return dM(sM(e),t.length)},u:function(e,t){return dM(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dM(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dM(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return fM(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return dM(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=uM(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):dM(o,t.length)},I:function(e,t,n){var r=aM(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):dM(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):pM(e,t)},D:function(e,t,n){var r=function(e){LT(1,arguments);var t=$T(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime();return Math.floor((n-r)/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):dM(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dM(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dM(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return dM(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?wM:0===o?xM:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?CM:o>=12?kM:o>=4?SM:EM,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return mM(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):gM(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):dM(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):dM(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):yM(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):vM(e,t)},S:function(e,t){return bM(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return jM(o);case"XXXX":case"XX":return TM(o);default:return TM(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return jM(o);case"xxxx":case"xx":return TM(o);default:return TM(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+DM(o,":");default:return"GMT"+TM(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+DM(o,":");default:return"GMT"+TM(o,":")}},t:function(e,t,n,r){return dM(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return dM((r._originalDate||e).getTime(),t.length)}};function DM(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var s=t;return n+String(o)+s+dM(i,2)}function jM(e,t){return e%60==0?(e>0?"-":"+")+dM(Math.abs(e)/60,2):TM(e,t)}function TM(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+dM(Math.floor(o/60),2)+n+dM(o%60,2)}var MM=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},OM=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},AM={p:OM,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return MM(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",MM(o,t)).replace("{{time}}",OM(i,t))}},NM=["D","DD"],_M=["YY","YYYY"];function RM(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var LM={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function $M(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var FM={date:$M({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:$M({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:$M({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},IM={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qM(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var s=e.defaultWidth,a=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[s]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var zM={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:qM({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qM({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:qM({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:qM({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:qM({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function VM(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;var i,s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(a,(function(e){return e.test(s)}));return i=e.valueCallback?e.valueCallback(l):l,{value:i=n.valueCallback?n.valueCallback(i):i,rest:t.slice(s.length)}}}var BM={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var o=r[0],i=t.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:s=n.valueCallback?n.valueCallback(s):s,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:VM({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:VM({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:VM({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:VM({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:VM({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},UM={code:"en-US",formatDistance:function(e,t,n){var r,o=LM[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:FM,formatRelative:function(e,t,n,r){return IM[e]},localize:zM,match:BM,options:{weekStartsOn:0,firstWeekContainsDate:1}},KM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,HM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,WM=/^'([^]*?)'?$/,GM=/''/g,YM=/[a-zA-Z]/;function QM(e,t,n){var r,o,i,s,a,l,c,u,d,h,f,p,m,g,y,v,b,x;LT(2,arguments);var w=String(t),S=zT(),k=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:S.locale)&&void 0!==r?r:UM,C=RT(null!==(i=null!==(s=null!==(a=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:S.firstWeekContainsDate)&&void 0!==s?s:null===(d=S.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=RT(null!==(f=null!==(p=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(y=n.locale)||void 0===y||null===(v=y.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==m?m:S.weekStartsOn)&&void 0!==p?p:null===(b=S.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==f?f:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var P=$T(e);if(!function(e){if(LT(1,arguments),!XT(e)&&"number"!=typeof e)return!1;var t=$T(e);return!isNaN(Number(t))}(P))throw new RangeError("Invalid time value");var D=oM(P,KT(P)),j={firstWeekContainsDate:C,weekStartsOn:E,locale:k,_originalDate:P};return w.match(HM).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,AM[t])(e,k.formatLong):e})).join("").match(KM).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(WM);if(!t)return e;return t[1].replace(GM,"'")}(r);var i=PM[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||-1===_M.indexOf(r)||RM(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==NM.indexOf(e)}(r)||RM(r,t,String(e)),i(D,r,k.localize,j);if(o.match(YM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function XM(e){return LT(1,arguments),Math.floor(function(e){return LT(1,arguments),$T(e).getTime()}(e)/1e3)}function JM(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=zT(),d=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),h=function(e,t){var n,r,o,i,s,a,l,c;LT(1,arguments);var u=$T(e),d=u.getFullYear(),h=zT(),f=RT(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:h.firstWeekContainsDate)&&void 0!==r?r:null===(l=h.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(d+1,0,f),p.setHours(0,0,0,0);var m=VT(p,t),g=new Date(0);g.setFullYear(d,0,f),g.setHours(0,0,0,0);var y=VT(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=y.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(h,0,d),f.setHours(0,0,0,0),VT(f,t)}function ZM(e,t){return LT(1,arguments),function(e,t,n){LT(2,arguments);var r=VT(e,n),o=VT(t,n),i=r.getTime()-KT(r),s=o.getTime()-KT(o);return Math.round((i-s)/6048e5)}(function(e){LT(1,arguments);var t=$T(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),eM(e),t)+1}function eO(e,t){LT(2,arguments);var n=$T(e),r=$T(t);return n.getTime()>r.getTime()}function tO(e,t){LT(2,arguments);var n=$T(e),r=$T(t);return n.getTime()<r.getTime()}function nO(e,t){LT(2,arguments);var n=$T(e),r=$T(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function rO(e,t){return LT(2,arguments),FT(e,-RT(t))}function oO(e,t){LT(2,arguments);var n=$T(e),r=RT(t),o=n.getFullYear(),i=n.getDate(),s=new Date(0);s.setFullYear(o,r,15),s.setHours(0,0,0,0);var a=function(e){LT(1,arguments);var t=$T(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(s);return n.setMonth(r,Math.min(i,a)),n}function iO(e,t){LT(2,arguments);var n=$T(e),r=RT(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}var sO=function(){return sO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sO.apply(this,arguments)};function aO(e,t,n){for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function lO(e){return"multiple"===e.mode}function cO(e){return"range"===e.mode}function uO(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var dO={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var hO=Object.freeze({__proto__:null,formatCaption:function(e,t){return QM(e,"LLLL y",t)},formatDay:function(e,t){return QM(e,"d",t)},formatMonthCaption:function(e,t){return QM(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return QM(e,"cccccc",t)},formatYearCaption:function(e,t){return QM(e,"yyyy",t)}}),fO=Object.freeze({__proto__:null,labelDay:function(e,t,n){return QM(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return QM(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var pO=n.createContext(void 0);function mO(e){var n,r,o=e.initialProps,i={captionLayout:"buttons",classNames:dO,formatters:hO,labels:fO,locale:UM,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},s=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,i=e.fromDate,s=e.toDate;return r?i=eM(r):t&&(i=new Date(t,0,1)),o?s=ZT(o):n&&(s=new Date(n,11,31)),{fromDate:i?HT(i):void 0,toDate:s?HT(s):void 0}}(o),a=s.fromDate,l=s.toDate,c=null!==(n=o.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"===c||a&&l||(c="buttons"),(uO(o)||lO(o)||cO(o))&&(r=o.onSelect);var u=sO(sO(sO({},i),o),{captionLayout:c,classNames:sO(sO({},i.classNames),o.classNames),components:sO({},o.components),formatters:sO(sO({},i.formatters),o.formatters),fromDate:a,labels:sO(sO({},i.labels),o.labels),mode:o.mode||i.mode,modifiers:sO(sO({},i.modifiers),o.modifiers),modifiersClassNames:sO(sO({},i.modifiersClassNames),o.modifiersClassNames),onSelect:r,styles:sO(sO({},i.styles),o.styles),toDate:l});return t.jsx(pO.Provider,{value:u,children:e.children})}function gO(){var e=n.useContext(pO);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function yO(e){var n=gO();return t.jsx("div",{className:n.classNames.caption_label,style:n.styles.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:(0,n.formatters.formatCaption)(e.displayMonth,{locale:n.locale})})}function vO(e){return t.jsx("svg",sO({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:t.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function bO(e){var n,r,o=e.onChange,i=e.value,s=e.children,a=e.caption,l=e.className,c=e.style,u=gO(),d=null!==(r=null===(n=u.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==r?r:vO;return t.jsxs("div",{className:l,style:c,children:[t.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),t.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:o,children:s}),t.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[a,t.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function xO(e){var n,r=gO(),o=r.fromDate,i=r.toDate,s=r.styles,a=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,u=r.components,d=r.labels.labelMonthDropdown;if(!o)return t.jsx(t.Fragment,{});if(!i)return t.jsx(t.Fragment,{});var h=[];if(function(e,t){LT(2,arguments);var n=$T(e),r=$T(t);return n.getFullYear()===r.getFullYear()}(o,i))for(var f=eM(o),p=o.getMonth();p<=i.getMonth();p++)h.push(oO(f,p));else for(f=eM(new Date),p=0;p<=11;p++)h.push(oO(f,p));var m=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:bO;return t.jsx(m,{name:"months","aria-label":d(),className:c.dropdown_month,style:s.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=oO(eM(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:h.map((function(e){return t.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function wO(e){var n,r=e.displayMonth,o=gO(),i=o.fromDate,s=o.toDate,a=o.locale,l=o.styles,c=o.classNames,u=o.components,d=o.formatters.formatYearCaption,h=o.labels.labelYearDropdown,f=[];if(!i)return t.jsx(t.Fragment,{});if(!s)return t.jsx(t.Fragment,{});for(var p=i.getFullYear(),m=s.getFullYear(),g=p;g<=m;g++)f.push(iO(tM(new Date),g));var y=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:bO;return t.jsx(y,{name:"years","aria-label":h(),className:c.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=iO(eM(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:d(r,{locale:a}),children:f.map((function(e){return t.jsx("option",{value:e.getFullYear(),children:d(e,{locale:a})},e.getFullYear())}))})}function SO(){var e=gO(),t=function(e){var t=e.month||e.defaultMonth||e.today||new Date,n=e.toDate,r=e.fromDate,o=e.numberOfMonths,i=void 0===o?1:o;return n&&JT(n,t)<0&&(t=IT(n,-1*(i-1))),r&&JT(t,r)<0&&(t=r),eM(t)}(e),r=function(e,t){var r=n.useState(e);return[void 0===t?r[0]:t,r[1]]}(t,e.month),o=r[1];return[r[0],function(t){var n;if(!e.disableNavigation){var r=eM(t);o(r),null===(n=e.onMonthChange)||void 0===n||n.call(e,r)}}]}var kO=n.createContext(void 0);function CO(e){var n=gO(),r=SO(),o=r[0],i=r[1],s=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=eM(e),i=JT(eM(IT(o,r)),o),s=[],a=0;a<i;a++){var l=IT(o,a);s.push(l)}return n&&(s=s.reverse()),s}(o,n),a=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.numberOfMonths,o=void 0===r?1:r,i=t.pagedNavigation?o:1,s=eM(e);if(!n)return IT(s,i);if(!(JT(n,e)<o))return IT(s,i)}}(o,n),l=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.numberOfMonths,o=t.pagedNavigation?void 0===r?1:r:1,i=eM(e);if(!n)return IT(i,-o);if(!(JT(i,n)<=0))return IT(i,-o)}}(o,n),c=function(e){return s.some((function(t){return nO(e,t)}))};return t.jsx(kO.Provider,{value:{currentMonth:o,displayMonths:s,goToMonth:i,goToDate:function(e,t){c(e)||(t&&tO(e,t)?i(IT(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:l,nextMonth:a,isDateDisplayed:c},children:e.children})}function EO(){var e=n.useContext(kO);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function PO(e){var n,r=gO(),o=r.classNames,i=r.styles,s=r.components,a=EO().goToMonth,l=function(t){a(IT(t,e.displayIndex?-e.displayIndex:0))},c=null!==(n=null==s?void 0:s.CaptionLabel)&&void 0!==n?n:yO,u=t.jsx(c,{id:e.id,displayMonth:e.displayMonth});return t.jsxs("div",{className:o.caption_dropdowns,style:i.caption_dropdowns,children:[t.jsx("div",{className:o.vhidden,children:u}),t.jsx(xO,{onChange:l,displayMonth:e.displayMonth}),t.jsx(wO,{onChange:l,displayMonth:e.displayMonth})]})}function DO(e){return t.jsx("svg",sO({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function jO(e){return t.jsx("svg",sO({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var TO=n.forwardRef((function(e,n){var r=gO(),o=r.classNames,i=r.styles,s=[o.button_reset,o.button];e.className&&s.push(e.className);var a=s.join(" "),l=sO(sO({},i.button_reset),i.button);return e.style&&Object.assign(l,e.style),t.jsx("button",sO({},e,{ref:n,type:"button",className:a,style:l}))}));function MO(e){var n,r,o=gO(),i=o.dir,s=o.locale,a=o.classNames,l=o.styles,c=o.labels,u=c.labelPrevious,d=c.labelNext,h=o.components;if(!e.nextMonth&&!e.previousMonth)return t.jsx(t.Fragment,{});var f=u(e.previousMonth,{locale:s}),p=[a.nav_button,a.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:s}),g=[a.nav_button,a.nav_button_next].join(" "),y=null!==(n=null==h?void 0:h.IconRight)&&void 0!==n?n:jO,v=null!==(r=null==h?void 0:h.IconLeft)&&void 0!==r?r:DO;return t.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&t.jsx(TO,{name:"previous-month","aria-label":f,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:t.jsx("rtl"===i?y:v,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&t.jsx(TO,{name:"next-month","aria-label":m,className:g,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:t.jsx("rtl"===i?v:y,{className:a.nav_icon,style:l.nav_icon})})]})}function OO(e){var n=gO().numberOfMonths,r=EO(),o=r.previousMonth,i=r.nextMonth,s=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return nO(e.displayMonth,t)})),c=0===l,u=l===a.length-1;return t.jsx(MO,{displayMonth:e.displayMonth,hideNext:n>1&&(c||!u),hidePrevious:n>1&&(u||!c),nextMonth:i,previousMonth:o,onPreviousClick:function(){o&&s(o)},onNextClick:function(){i&&s(i)}})}function AO(e){var n,r,o=gO(),i=o.classNames,s=o.styles,a=o.captionLayout,l=o.components,c=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:yO;return r=o.disableNavigation?t.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===a?t.jsx(PO,{displayMonth:e.displayMonth,id:e.id}):t.jsxs(t.Fragment,"dropdown-buttons"===a?{children:[t.jsx(PO,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.jsx(OO,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[t.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(OO,{displayMonth:e.displayMonth,id:e.id})]}),t.jsx("div",{className:i.caption,style:s.caption,children:r})}function NO(e){var n=gO(),r=n.footer;return r?t.jsx("tfoot",{className:n.classNames.tfoot,style:n.styles.tfoot,children:t.jsx("tr",{children:t.jsx("td",{colSpan:8,children:r})})}):t.jsx(t.Fragment,{})}function _O(){var e=gO(),n=e.classNames,r=e.styles,o=e.showWeekNumber,i=e.locale,s=e.formatters.formatWeekdayName,a=e.labels.labelWeekday,l=function(e,t,n){for(var r=n?BT(new Date):VT(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var s=FT(r,i);o.push(s)}return o}(i,e.weekStartsOn,e.ISOWeek);return t.jsxs("tr",{style:r.head_row,className:n.head_row,children:[o&&t.jsx("td",{style:r.head_cell,className:n.head_cell}),l.map((function(e,o){return t.jsx("th",{scope:"col",className:n.head_cell,style:r.head_cell,"aria-label":a(e,{locale:i}),children:s(e,{locale:i})},o)}))]})}function RO(){var e,n=gO(),r=n.components,o=null!==(e=null==r?void 0:r.HeadRow)&&void 0!==e?e:_O;return t.jsx("thead",{style:n.styles.head,className:n.classNames.head,children:t.jsx(o,{})})}function LO(e){var n=gO();return t.jsx(t.Fragment,{children:(0,n.formatters.formatDay)(e.date,{locale:n.locale})})}var $O=n.createContext(void 0);function FO(e){if(!lO(e.initialProps)){return t.jsx($O.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}return t.jsx(IO,{initialProps:e.initialProps,children:e.children})}function IO(e){var n=e.initialProps,r=e.children,o=n.selected,i=n.min,s=n.max,a={disabled:[]};return o&&a.disabled.push((function(e){var t=s&&o.length>s-1,n=o.some((function(t){return QT(t,e)}));return Boolean(t&&!n)})),t.jsx($O.Provider,{value:{selected:o,onDayClick:function(e,t,r){var a,l;if((null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,r),!Boolean(t.selected&&i&&(null==o?void 0:o.length)===i))&&!Boolean(!t.selected&&s&&(null==o?void 0:o.length)===s)){var c=o?aO([],o):[];if(t.selected){var u=c.findIndex((function(t){return QT(e,t)}));c.splice(u,1)}else c.push(e);null===(l=n.onSelect)||void 0===l||l.call(n,c,e,t,r)}},modifiers:a},children:r})}function qO(){var e=n.useContext($O);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var zO,VO,BO=n.createContext(void 0);function UO(e){if(!cO(e.initialProps)){return t.jsx(BO.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}return t.jsx(KO,{initialProps:e.initialProps,children:e.children})}function KO(e){var n=e.initialProps,r=e.children,o=n.selected,i=o||{},s=i.from,a=i.to,l=n.min,c=n.max,u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(s?(u.range_start=[s],a?(u.range_end=[a],QT(s,a)||(u.range_middle=[{after:s,before:a}])):u.range_end=[s]):a&&(u.range_start=[a],u.range_end=[a]),l&&(s&&!a&&u.disabled.push({after:rO(s,l-1),before:FT(s,l-1)}),s&&a&&u.disabled.push({after:s,before:FT(s,l-1)}),!s&&a&&u.disabled.push({after:rO(a,l-1),before:FT(a,l-1)})),c){if(s&&!a&&(u.disabled.push({before:FT(s,1-c)}),u.disabled.push({after:FT(s,c-1)})),s&&a){var d=c-(WT(a,s)+1);u.disabled.push({before:rO(s,d)}),u.disabled.push({after:FT(a,d)})}!s&&a&&(u.disabled.push({before:FT(a,1-c)}),u.disabled.push({after:FT(a,c-1)}))}return t.jsx(BO.Provider,{value:{selected:o,onDayClick:function(e,t,r){var i,s;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,r);var a=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(QT(o,e)&&QT(r,e))return;if(QT(o,e))return{from:o,to:void 0};if(QT(r,e))return;return eO(r,e)?{from:e,to:o}:{from:r,to:e}}return o?eO(e,o)?{from:o,to:e}:{from:e,to:o}:r?tO(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,o);null===(s=n.onSelect)||void 0===s||s.call(n,a,e,t,r)},modifiers:u},children:r})}function HO(){var e=n.useContext(BO);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function WO(e){return Array.isArray(e)?aO([],e):void 0!==e?[e]:[]}(VO=zO||(zO={})).Outside="outside",VO.Disabled="disabled",VO.Selected="selected",VO.Hidden="hidden",VO.Today="today",VO.RangeStart="range_start",VO.RangeEnd="range_end",VO.RangeMiddle="range_middle";var GO=zO.Selected,YO=zO.Disabled,QO=zO.Hidden,XO=zO.Today,JO=zO.RangeEnd,ZO=zO.RangeMiddle,eA=zO.RangeStart,tA=zO.Outside;var nA=n.createContext(void 0);function rA(e){var n=gO(),r=function(e,t,n){var r,o=((r={})[GO]=WO(e.selected),r[YO]=WO(e.disabled),r[QO]=WO(e.hidden),r[XO]=[e.today],r[JO]=[],r[ZO]=[],r[eA]=[],r[tA]=[],r);return e.fromDate&&o[YO].push({before:e.fromDate}),e.toDate&&o[YO].push({after:e.toDate}),lO(e)?o[YO]=o[YO].concat(t.modifiers[YO]):cO(e)&&(o[YO]=o[YO].concat(n.modifiers[YO]),o[eA]=n.modifiers[eA],o[ZO]=n.modifiers[ZO],o[JO]=n.modifiers[JO]),o}(n,qO(),HO()),o=function(e){var t={};return Object.entries(e).forEach((function(e){t[e[0]]=WO(e[1])})),t}(n.modifiers),i=sO(sO({},r),o);return t.jsx(nA.Provider,{value:i,children:e.children})}function oA(){var e=n.useContext(nA);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function iA(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(XT(t))return QT(e,t);var n,r,o,i,s;if(function(e){return Array.isArray(e)&&e.every(XT)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return n=e,s=(r=t).to,(i=r.from)&&s?(WT(s,i)<0&&(i=(o=[s,i])[0],s=o[1]),WT(n,i)>=0&&WT(s,n)>=0):s?QT(s,n):!!i&&QT(i,n);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var a=WT(t.before,e)>0,l=WT(t.after,e)<0;return eO(t.before,t.after)?l&&a:a||l}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?WT(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?WT(t.before,e)>0:"function"==typeof t&&t(e)}))}function sA(e,t,n){var r=Object.keys(t).reduce((function(n,r){return iA(e,t[r])&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!nO(e,n)&&(o.outside=!0),o}function aA(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,s=t.retry,a=void 0===s?{count:0,lastFocused:e}:s,l=o.weekStartsOn,c=o.fromDate,u=o.toDate,d=o.locale,h={day:FT,week:GT,month:IT,year:YT,startOfWeek:function(e){return o.ISOWeek?BT(e):VT(e,{locale:d,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?rM(e):nM(e,{locale:d,weekStartsOn:l})}}[n](e,"after"===r?1:-1);"before"===r&&c?h=function(e){var t,n;if(LT(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==_T(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=$T(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([c,h]):"after"===r&&u&&(h=function(e){var t,n;if(LT(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==_T(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=$T(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([u,h]));var f=!0;if(i){var p=sA(h,i);f=!p.disabled&&!p.hidden}return f?h:a.count>365?a.lastFocused:aA(h,{moveBy:n,direction:r,context:o,modifiers:i,retry:sO(sO({},a),{count:a.count+1})})}var lA=n.createContext(void 0);function cA(e){var r=EO(),o=oA(),i=n.useState(),s=i[0],a=i[1],l=n.useState(),c=l[0],u=l[1],d=function(e,t){for(var n,r,o=eM(e[0]),i=ZT(e[e.length-1]),s=o;s<=i;){var a=sA(s,t);if(a.disabled||a.hidden)s=FT(s,1);else{if(a.selected)return s;a.today&&!r&&(r=s),n||(n=s),s=FT(s,1)}}return r||n}(r.displayMonths,o),h=(null!=s?s:c&&r.isDateDisplayed(c))?c:d,f=function(e){a(e)},p=gO(),m=function(e,t){if(s){var n=aA(s,{moveBy:e,direction:t,context:p,modifiers:o});QT(s,n)||(r.goToDate(n,s),f(n))}};return t.jsx(lA.Provider,{value:{focusedDay:s,focusTarget:h,blur:function(){u(s),a(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}},children:e.children})}function uA(){var e=n.useContext(lA);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var dA=n.createContext(void 0);function hA(e){if(!uO(e.initialProps)){return t.jsx(dA.Provider,{value:{selected:void 0},children:e.children})}return t.jsx(fA,{initialProps:e.initialProps,children:e.children})}function fA(e){var n=e.initialProps;return t.jsx(dA.Provider,{value:{selected:n.selected,onDayClick:function(e,t,r){var o,i,s;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r),!t.selected||n.required?null===(s=n.onSelect)||void 0===s||s.call(n,e,e,t,r):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,r)}},children:e.children})}function pA(){var e=n.useContext(dA);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function mA(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(zO).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function gA(e,r,o){var i,s,a,l=gO(),c=uA(),u=function(e,t){return sA(e,oA(),t)}(e,r),d=function(e,t){var n=gO(),r=pA(),o=qO(),i=HO(),s=uA(),a=s.focusDayAfter,l=s.focusDayBefore,c=s.focusWeekAfter,u=s.focusWeekBefore,d=s.blur,h=s.focus,f=s.focusMonthBefore,p=s.focusMonthAfter,m=s.focusYearBefore,g=s.focusYearAfter,y=s.focusStartOfWeek,v=s.focusEndOfWeek;return{onClick:function(s){var a,l,c,u;uO(n)?null===(a=r.onDayClick)||void 0===a||a.call(r,e,t,s):lO(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,s):cO(n)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,s):null===(u=n.onDayClick)||void 0===u||u.call(n,e,t,s)},onFocus:function(r){var o;h(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;d(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?a():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():a();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),u();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?m():f();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():p();break;case"Home":r.preventDefault(),r.stopPropagation(),y();break;case"End":r.preventDefault(),r.stopPropagation(),v()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}}}(e,u),h=function(){var e=gO(),t=pA(),n=qO(),r=HO();return uO(e)?t.selected:lO(e)?n.selected:cO(e)?r.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);n.useEffect((function(){var t;u.outside||c.focusedDay&&f&&QT(c.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[c.focusedDay,e,o,f,u.outside]);var p=mA(l,u).join(" "),m=function(e,t){var n=sO({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=sO(sO({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(l,u),g=Boolean(u.outside&&!l.showOutsideDays||u.hidden),y=null!==(a=null===(s=l.components)||void 0===s?void 0:s.DayContent)&&void 0!==a?a:LO,v={style:m,className:p,children:t.jsx(y,{date:e,displayMonth:r,activeModifiers:u}),role:"gridcell"},b=c.focusTarget&&QT(c.focusTarget,e)&&!u.outside,x=c.focusedDay&&QT(c.focusedDay,e),w=sO(sO(sO({},v),((i={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,i.tabIndex=x||b?0:-1,i)),d);return{isButton:f,isHidden:g,activeModifiers:u,selectedDays:h,buttonProps:w,divProps:v}}function yA(e){var r=n.useRef(null),o=gA(e.date,e.displayMonth,r);return o.isHidden?t.jsx("div",{role:"gridcell"}):o.isButton?t.jsx(TO,sO({name:"day",ref:r},o.buttonProps)):t.jsx("div",sO({},o.divProps))}function vA(e){var n=e.number,r=e.dates,o=gO(),i=o.onWeekNumberClick,s=o.styles,a=o.classNames,l=o.locale,c=o.labels.labelWeekNumber,u=(0,o.formatters.formatWeekNumber)(Number(n),{locale:l});if(!i)return t.jsx("span",{className:a.weeknumber,style:s.weeknumber,children:u});var d=c(Number(n),{locale:l});return t.jsx(TO,{name:"week-number","aria-label":d,className:a.weeknumber,style:s.weeknumber,onClick:function(e){i(n,r,e)},children:u})}function bA(e){var n,r,o,i=gO(),s=i.styles,a=i.classNames,l=i.components,c=null!==(n=null==l?void 0:l.Day)&&void 0!==n?n:yA,u=null!==(r=null==l?void 0:l.WeekNumber)&&void 0!==r?r:vA;return i.showWeekNumber&&(o=t.jsx("td",{className:a.cell,style:s.cell,children:t.jsx(u,{number:e.weekNumber,dates:e.dates})})),t.jsxs("tr",{className:a.row,style:s.row,children:[o,e.dates.map((function(n){return t.jsx("td",{className:a.cell,style:s.cell,role:"presentation",children:t.jsx(c,{displayMonth:e.displayMonth,date:n})},XM(n))}))]})}function xA(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?rM(t):nM(t,n),o=(null==n?void 0:n.ISOWeek)?BT(e):VT(e,n),i=WT(r,o),s=[],a=0;a<=i;a++)s.push(FT(o,a));var l=s.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){LT(1,arguments);var t=$T(e),n=BT(t).getTime()-UT(t).getTime();return Math.round(n/6048e5)+1}(t):function(e,t){LT(1,arguments);var n=$T(e),r=VT(n,t).getTime()-JM(n,t).getTime();return Math.round(r/6048e5)+1}(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[]);return l}function wA(e){var n,r,o,i=gO(),s=i.locale,a=i.classNames,l=i.styles,c=i.hideHead,u=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,f=i.ISOWeek,p=function(e,t){var n=xA(eM(e),ZT(e),t);if(null==t?void 0:t.useFixedWeeks){var r=ZM(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],s=GT(i,6-r),a=xA(GT(i,1),s,t);n.push.apply(n,a)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(i.fixedWeeks),ISOWeek:f,locale:s,weekStartsOn:d,firstWeekContainsDate:h}),m=null!==(n=null==u?void 0:u.Head)&&void 0!==n?n:RO,g=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:bA,y=null!==(o=null==u?void 0:u.Footer)&&void 0!==o?o:NO;return t.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&t.jsx(m,{}),t.jsx("tbody",{className:a.tbody,style:l.tbody,children:p.map((function(n){return t.jsx(g,{displayMonth:e.displayMonth,dates:n.dates,weekNumber:n.weekNumber},n.weekNumber)}))}),t.jsx(y,{displayMonth:e.displayMonth})]})}var SA="undefined"!=typeof window&&window.document&&window.document.createElement?n.useLayoutEffect:n.useEffect,kA=!1,CA=0;function EA(){return"react-day-picker-".concat(++CA)}function PA(e){var r,o,i=gO(),s=i.dir,a=i.classNames,l=i.styles,c=i.components,u=EO().displayMonths,d=function(e){var t,r=null!=e?e:kA?EA():null,o=n.useState(r),i=o[0],s=o[1];return SA((function(){null===i&&s(EA())}),[]),n.useEffect((function(){!1===kA&&(kA=!0)}),[]),null!==(t=null!=e?e:i)&&void 0!==t?t:void 0}(i.id?"".concat(i.id,"-").concat(e.displayIndex):void 0),h=i.id?"".concat(i.id,"-grid-").concat(e.displayIndex):void 0,f=[a.month],p=l.month,m=0===e.displayIndex,g=e.displayIndex===u.length-1,y=!m&&!g;"rtl"===s&&(g=(r=[m,g])[0],m=r[1]),m&&(f.push(a.caption_start),p=sO(sO({},p),l.caption_start)),g&&(f.push(a.caption_end),p=sO(sO({},p),l.caption_end)),y&&(f.push(a.caption_between),p=sO(sO({},p),l.caption_between));var v=null!==(o=null==c?void 0:c.Caption)&&void 0!==o?o:AO;return t.jsxs("div",{className:f.join(" "),style:p,children:[t.jsx(v,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(wA,{id:h,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function DA(e){var n=gO();return t.jsx("div",{className:n.classNames.months,style:n.styles.months,children:e.children})}function jA(e){var r,o,i=e.initialProps,s=gO(),a=uA(),l=EO(),c=n.useState(!1),u=c[0],d=c[1];n.useEffect((function(){s.initialFocus&&a.focusTarget&&(u||(a.focus(a.focusTarget),d(!0)))}),[s.initialFocus,u,a.focus,a.focusTarget,a]);var h=[s.classNames.root,s.className];s.numberOfMonths>1&&h.push(s.classNames.multiple_months),s.showWeekNumber&&h.push(s.classNames.with_weeknumber);var f=sO(sO({},s.styles.root),s.style),p=Object.keys(i).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return sO(sO({},e),((n={})[t]=i[t],n))}),{}),m=null!==(o=null===(r=i.components)||void 0===r?void 0:r.Months)&&void 0!==o?o:DA;return t.jsx("div",sO({className:h.join(" "),style:f,dir:s.dir,id:s.id,nonce:i.nonce,title:i.title,lang:i.lang},p,{children:t.jsx(m,{children:l.displayMonths.map((function(e,n){return t.jsx(PA,{displayIndex:n,displayMonth:e},n)}))})}))}function TA(e){var n=e.children,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return t.jsx(mO,{initialProps:r,children:t.jsx(CO,{children:t.jsx(hA,{initialProps:r,children:t.jsx(FO,{initialProps:r,children:t.jsx(UO,{initialProps:r,children:t.jsx(rA,{children:t.jsx(cA,{children:n})})})})})})})}function MA(e){return t.jsx(TA,sO({},e,{children:t.jsx(jA,{initialProps:e})}))}function OA({className:e,classNames:n,showOutsideDays:r=!0,...o}){return t.jsx(MA,{showOutsideDays:r,className:Uv("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Uv(Fw({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Uv("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Uv(Fw({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:()=>t.jsx(Fy,{className:"h-4 w-4"}),IconRight:()=>t.jsx(Iy,{className:"h-4 w-4"})},...o})}OA.displayName="Calendar";var AA="Popover",[NA,_A]=yb(AA,[DE]),RA=DE(),[LA,$A]=NA(AA),FA=e=>{const{__scopePopover:n,children:r,open:o,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,c=RA(n),u=i.useRef(null),[d,h]=i.useState(!1),[f=!1,p]=Rb({prop:o,defaultProp:s,onChange:a});return t.jsx(BE,{...c,children:t.jsx(LA,{scope:n,contentId:Ob(),triggerRef:u,open:f,onOpenChange:p,onOpenToggle:i.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback((()=>h(!0)),[]),onCustomAnchorRemove:i.useCallback((()=>h(!1)),[]),modal:l,children:r})})};FA.displayName=AA;var IA="PopoverAnchor";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,s=$A(IA,r),a=RA(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=s;return i.useEffect((()=>(l(),()=>c())),[l,c]),t.jsx(UE,{...a,...o,ref:n})})).displayName=IA;var qA="PopoverTrigger",zA=i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=$A(qA,r),s=RA(r),a=wb(n,i.triggerRef),l=t.jsx(Ab.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":JA(i.open),...o,ref:a,onClick:gb(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:t.jsx(UE,{asChild:!0,...s,children:l})}));zA.displayName=qA;var VA="PopoverPortal",[BA,UA]=NA(VA,{forceMount:void 0}),KA=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=$A(VA,n);return t.jsx(BA,{scope:n,forceMount:r,children:t.jsx(nx,{present:r||s.open,children:t.jsx(iS,{asChild:!0,container:i,children:o})})})};KA.displayName=VA;var HA="PopoverContent",WA=i.forwardRef(((e,n)=>{const r=UA(HA,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=$A(HA,e.__scopePopover);return t.jsx(nx,{present:o||s.open,children:t.jsx(s.modal?GA:YA,{...i,ref:n})})}));WA.displayName=HA;var GA=i.forwardRef(((e,n)=>{const r=$A(HA,e.__scopePopover),o=i.useRef(null),s=wb(n,o),a=i.useRef(!1);return i.useEffect((()=>{const e=o.current;if(e)return nk(e)}),[]),t.jsx(YS,{as:Sb,allowPinchZoom:!0,children:t.jsx(QA,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gb(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:gb(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;a.current=2===t.button||0===t.button&&!0===t.ctrlKey}),{checkForDefaultPrevented:!1}),onFocusOutside:gb(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),YA=i.forwardRef(((e,n)=>{const r=$A(HA,e.__scopePopover),o=i.useRef(!1),s=i.useRef(!1);return t.jsx(QA,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})})),QA=i.forwardRef(((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...h}=e,f=$A(HA,r),p=RA(r);return aS(),t.jsx(Jw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:t.jsx(Hw,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:t.jsx(KE,{"data-state":JA(f.open),role:"dialog",id:f.contentId,...p,...h,ref:n,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),XA="PopoverClose";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=$A(XA,r);return t.jsx(Ab.button,{type:"button",...o,ref:n,onClick:gb(e.onClick,(()=>i.onOpenChange(!1)))})})).displayName=XA;function JA(e){return e?"open":"closed"}i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=RA(r);return t.jsx(HE,{...i,...o,ref:n})})).displayName="PopoverArrow";var ZA=KA,eN=WA;const tN=FA,nN=zA,rN=n.forwardRef((({className:e,align:n="center",sideOffset:r=4,...o},i)=>t.jsx(ZA,{children:t.jsx(eN,{ref:i,align:n,sideOffset:r,className:Uv("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})})));rN.displayName=eN.displayName;const oN=({automation:e})=>{const r=()=>e.trigger_metadata?.scheduled_at?new Date(e.trigger_metadata.scheduled_at):Kx(new Date,15),[o,s]=i.useState(r()),[a,l]=i.useState(r()<new Date?"Please select a time in the future":null),[c,u]=i.useState(jw(o,"HH:mm")),{updateAutomation:d}=jy(e.id),h=e=>{e<Kx(new Date,15)?l("Please select a time at least 15 minutes in the future"):(l(null),s(e))};return n.useEffect((()=>{d({trigger:{trigger_type:Ty.ONE_TIME,scheduled_at:o.toISOString()}})}),[o,d]),t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full max-w-[440px]",children:[t.jsxs(tN,{children:[t.jsx(nN,{asChild:!0,children:t.jsxs(Iw,{variant:"outline",className:Uv("w-full sm:w-[280px] justify-start text-left font-normal",!o&&"text-muted-foreground"),children:[t.jsx(Ry,{className:"mr-2 h-4 w-4"}),o?jw(o,"PPP"):t.jsx("span",{children:"Pick a date"})]})}),t.jsx(rN,{className:"w-auto p-0",children:t.jsx(OA,{mode:"single",selected:o,onSelect:e=>{if(!e)return;const[t,n]=c.split(":").map(Number);e.setHours(t,n),h(e)},disabled:e=>{const t=new Date;return t.setHours(0,0,0,0),e<t},initialFocus:!0})})]}),t.jsx("input",{type:"time",value:c,onChange:e=>{if(u(e.target.value),o&&e.target.value){const[t,n]=e.target.value.split(":").map(Number),r=new Date(o);r.setHours(t,n),h(r)}},className:Uv("flex h-10 w-full sm:w-[150px] rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a&&"border-red-500")})]}),a&&t.jsxs("p",{className:"text-destructive text-sm mt-2 flex items-center",children:[t.jsx("span",{className:"mr-2",children:"⚠️"}),a]})]})},iN=({automation:e,iconDefinitions:r,loading:o})=>{const i=n.useCallback((()=>{const t=e.action_data?.find((e=>"send_communication"===e.action_type));return t?.action_metadata.communication_group_id}),[e.action_data]),[s,a]=n.useState("email"),[l,c]=n.useState("sendNow"),{updateAutomation:u}=jy(e.id),{count:d,isLoading:h}=ub({include_segments:e.includeSegmentIds,exclude_segments:e.excludeSegmentIds}),f=i(),{getCommunicationGroup:p}=ej(),{channelSenders:m}=ZD(),{channelAccounts:g}=XD(),[y,v]=n.useState(null),[b,x]=n.useState(null),[w,S]=n.useState(null),[k,C]=n.useState(null);return n.useEffect((()=>{m&&S(m),g&&C(g)}),[m,g]),n.useEffect((()=>{f&&p(f,{onSuccess:e=>{const t=e.email_channel_sender_id,n=e.sms_channel_sender_id,r=w?.channel_senders.find((e=>e.id===t)),o=w?.channel_senders.find((e=>e.id===n));if(r&&e.email_subject&&e.email_preview_text&&e.email_html_body){const t=r.channel_sender_metadata?.userPart,n=k?.channel_accounts.find((e=>e.id===r.channel_account_id));if(n)switch(n.channel_account_metadata.type){case JD.REACH_MANAGED:v({fromEmail:`${t}@${n.channel_account_metadata.baseDomain}.embedreach.com`,subject:e.email_subject,previewText:e.email_preview_text,body:e.email_html_body});break;case JD.TWILLIO:break;default:throw sb(n.channel_account_metadata.type,JD)}}if(o){const t=w?.channel_senders.find((e=>e.id===n));t&&e.sms_message_body&&t.channel_sender_metadata?.from&&x({fromPhone:t.channel_sender_metadata.from,body:e.sms_message_body})}}})}),[k?.channel_accounts,w?.channel_senders,f,p]),n.useEffect((()=>{y?a("email"):b&&a("sms")}),[y,b]),o?t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsx(xy,{text:["Loading..."]})}):y||b?t.jsxs("div",{className:"max-w-6xl mx-auto p-6",children:[t.jsxs(vy.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-center mb-8",children:[t.jsx("h2",{className:"text-3xl font-bold text-gray-900",children:"Message Preview"}),t.jsx("p",{className:"text-gray-500 mt-2 text-lg",children:"Review your automation messages before sending"})]}),t.jsxs("div",{className:"flex gap-8",children:[t.jsx(vy.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"w-full",children:t.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden",children:[t.jsxs("div",{className:"flex border-b border-gray-100",children:[y&&t.jsxs("button",{onClick:()=>a("email"),className:"flex-1 py-4 px-6 text-center relative "+("email"===s?"text-primary font-medium":"text-gray-500 hover:text-gray-700"),children:[t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),t.jsx("span",{children:"Email Preview"})]}),"email"===s&&t.jsx(vy.div,{layoutId:"activeTab",className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary",initial:!1,transition:{type:"spring",stiffness:500,damping:30}})]}),b&&t.jsxs("button",{onClick:()=>a("sms"),className:"flex-1 py-4 px-6 text-center relative "+("sms"===s?"text-primary font-medium":"text-gray-500 hover:text-gray-700"),children:[t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),t.jsx("span",{children:"SMS Preview"})]}),"sms"===s&&t.jsx(vy.div,{layoutId:"activeTab",className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary",initial:!1,transition:{type:"spring",stiffness:500,damping:30}})]})]}),t.jsx("div",{className:"p-6",children:t.jsxs(Nc,{mode:"wait",children:["email"===s&&y&&t.jsx(vy.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"bg-gray-50 p-5 rounded-lg space-y-4 border border-gray-100",children:[t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("span",{className:"font-medium text-gray-700 w-24",children:"From:"}),t.jsx("span",{className:"text-gray-800",children:y.fromEmail})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("span",{className:"font-medium text-gray-700 w-24",children:"Subject:"}),t.jsx("span",{className:"text-gray-800 font-medium",children:y.subject})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("span",{className:"font-medium text-gray-700 w-24",children:"Preview Text:"}),t.jsx("span",{className:"text-gray-600 italic",children:y.previewText})]})]}),t.jsx("div",{className:"border rounded-lg p-6 min-h-[300px] bg-white shadow-inner",children:t.jsx("div",{dangerouslySetInnerHTML:{__html:y.body},className:"prose max-w-none"})})]})},"email"),"sms"===s&&b&&t.jsx(vy.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:t.jsxs("div",{className:"max-w-sm mx-auto",children:[t.jsx("div",{className:"bg-gray-50 p-5 rounded-lg border border-gray-100 mb-6",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"font-medium text-gray-700",children:"From:"}),t.jsx("span",{className:"text-gray-800",children:b.fromPhone})]})}),t.jsx("div",{className:"border-4 border-gray-800 rounded-3xl p-1 bg-gray-800 shadow-xl mx-auto max-w-xs",children:t.jsx("div",{className:"bg-gray-100 rounded-2xl p-4 h-[400px] overflow-y-auto",children:t.jsx("div",{className:"flex justify-end mb-4",children:t.jsx("div",{className:"bg-blue-500 text-white rounded-2xl rounded-tr-sm py-3 px-4 max-w-[80%] shadow-sm",children:b.body})})})})]})},"sms")]})})]})}),t.jsx(vy.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"w-full flex flex-col justify-center",children:t.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-gray-100 p-6",children:[t.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-6",children:"Delivery Options"}),t.jsxs("div",{className:"mb-6 bg-gray-50 rounded-lg p-6 flex flex-col justify-center",children:[t.jsx("h3",{className:"text-lg font-medium mb-3",children:"Estimated Matches"}),t.jsxs("div",{className:"flex items-center gap-3",children:[r.UserIcon&&t.jsx(r.UserIcon,{className:"w-6 h-6 text-purple-600"}),t.jsx("span",{className:"text-2xl font-bold text-purple-600",children:h?t.jsx("span",{className:"animate-pulse",children:"..."}):d?.count?.toLocaleString()??0}),t.jsx("span",{className:"text-gray-600",children:"users will receive this message"})]})]}),e.trigger_metadata.scheduled_at&&t.jsx("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center",children:t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-gray-700",children:"Currently scheduled for:"}),t.jsx("p",{className:"text-md font-bold text-blue-500",children:new Date(e.trigger_metadata.scheduled_at).toLocaleString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"})})]})}),t.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-8 max-w-2xl mx-auto",children:[t.jsxs("button",{onClick:()=>{c("sendNow"),u({trigger:{trigger_type:Ty.ONE_TIME,scheduled_at:new Date(Date.now()+3e5).toISOString()}})},className:"flex flex-col items-center justify-center p-4 rounded-xl transition-all "+("sendNow"===l?"bg-primary/10 border-2 border-primary text-primary":"bg-gray-50 border-2 border-gray-100 text-gray-700 hover:bg-gray-100"),children:[t.jsx("div",{className:"w-12 h-12 flex items-center justify-center mb-2",children:r.SendButton?t.jsx(r.SendButton,{className:"w-6 h-6"}):t.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})}),t.jsx("span",{className:"font-medium",children:"Send now"}),t.jsx("span",{className:"text-xs mt-1 text-center",children:"Campaign will begin sending in 5 minutes"})]}),t.jsxs("button",{onClick:()=>c("schedule"),className:"flex flex-col items-center justify-center p-4 rounded-xl transition-all "+("schedule"===l?"bg-primary/10 border-2 border-primary text-primary":"bg-gray-50 border-2 border-gray-100 text-gray-700 hover:bg-gray-100"),children:[t.jsx("div",{className:"w-12 h-12 flex items-center justify-center mb-2",children:r.ScheduleButton?t.jsx(r.ScheduleButton,{className:"w-6 h-6"}):t.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),t.jsx("span",{className:"font-medium",children:"Schedule"}),t.jsx("span",{className:"text-xs mt-1 text-center",children:"Choose date and time"})]})]}),t.jsx(Nc,{children:"schedule"===l&&t.jsx(vy.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.3},className:"overflow-hidden mb-8",children:t.jsx("div",{className:"bg-gray-50 rounded-xl p-5 border border-gray-100",children:t.jsx(oN,{automation:e})})})})]})})]})]}):t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsx("div",{children:"No preview data Please complete previous steps"})})},sN=({segments:e,allSegments:n,onRemove:r,availableSegments:o,onAddSegment:i,onCreateSegment:s})=>t.jsxs("div",{className:"relative min-h-[60px]",children:[t.jsx("div",{className:"overflow-y-auto h-[75px] flex flex-wrap gap-2 p-4 bg-gray-50 rounded-lg border border-gray-200",children:n.filter((t=>e.includes(t.id))).map((e=>t.jsxs("div",{className:"inline-flex items-center bg-gray-100 rounded-lg px-4 py-2",children:[t.jsx("span",{className:"max-w-[200px] truncate",title:e.name,children:e.name}),t.jsx("button",{className:"ml-2 text-gray-500 hover:text-gray-700",onClick:()=>r(e.id),children:"✕"})]},e.id)))}),t.jsxs(BD,{children:[t.jsx(UD,{asChild:!0,children:t.jsx("button",{className:"absolute -right-3 -top-3 w-8 h-8 bg-blue-500 hover:bg-blue-600 text-white rounded-full flex items-center justify-center shadow-md",children:"+"})}),t.jsxs(KD,{children:[o.map((e=>t.jsx(HD,{onClick:()=>i(e.id),children:e.name},e.id))),t.jsx(WD,{}),t.jsx(HD,{onClick:s,className:"text-blue-600",children:"+ Create New Segment"})]})]})]}),aN=({label:e,segments:n,allSegments:r,onAddSegment:o,onRemoveSegment:i,onCreateSegment:s})=>t.jsxs("div",{children:[t.jsx("label",{className:"block mb-2",children:e}),t.jsx("div",{className:"space-y-4",children:t.jsx(sN,{segments:n,allSegments:r,onRemove:i,availableSegments:r,onAddSegment:o,onCreateSegment:s})})]}),lN=({tailwindClassDefinitions:e,iconDefinitions:r,automation:o})=>{const[i,s]=n.useState(!1),{segments:a,isLoading:l,refetchSegments:c}=cb(),{updateAutomation:u}=jy(o.id),[d,h]=n.useState(o.includeSegmentIds||[]),[f,p]=n.useState(o.excludeSegmentIds||[]),{count:m,isLoading:g,refetchCount:y}=ub({include_segments:d,exclude_segments:f}),v=(e,t)=>{"include"===t?h((t=>[...t,e])):p((t=>[...t,e]))},b=(e,t)=>{"include"===t?h((t=>t.filter((t=>t!==e)))):p((t=>t.filter((t=>t!==e))))},x=()=>{s(!0)};n.useEffect((()=>{(JSON.stringify(o.includeSegmentIds)!==JSON.stringify(d)||JSON.stringify(o.excludeSegmentIds)!==JSON.stringify(f))&&(u({include_segments:d,exclude_segments:f}),y())}),[d,f,o.includeSegmentIds,o.excludeSegmentIds,u,y]);const[w,S]=n.useState(!1);return l?t.jsx("div",{children:t.jsx(xy,{text:["Fetching segments","Finishing up"]})}):t.jsxs("div",{className:"p-6",children:[t.jsx(Ik,{open:i,onOpenChange:s,children:t.jsx(Vk,{className:"max-w-4xl",hideCloseButton:!0,children:t.jsx(mb,{tailwindClassDefinitions:e,iconDefinitions:r,onClose:e=>{!1!==e&&"error"!==e&&c(),s(!1)}})})}),t.jsx("h2",{className:"text-2xl font-semibold",children:"Choose Audience"}),t.jsx("p",{className:"text-gray-600 mb-8",children:"The number of recipients will update in real-time as you add or remove lists."}),t.jsx("div",{className:"space-y-6 mx-auto ",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx(aN,{label:"Include Patrons from Lists",segments:d,allSegments:a?.segments||[],onAddSegment:e=>v(e,"include"),onRemoveSegment:e=>b(e,"include"),onCreateSegment:x}),t.jsx("div",{className:"border-t border-gray-200 my-8"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("button",{onClick:()=>S(!w),className:"flex items-center gap-2 text-gray-700 hover:text-gray-900 transition-colors",children:[t.jsx(vy.div,{animate:{rotate:w?180:0},transition:{duration:.2},children:t.jsx(r.DropdownMenuTrigger,{className:"w-5 h-5"})}),t.jsx("span",{className:"text-lg font-medium",children:"Don't send to"})]}),t.jsx(Nc,{children:w&&t.jsx(vy.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2,ease:"easeInOut"},style:{},children:t.jsx(aN,{label:"Exclude Patrons from Lists",segments:f,allSegments:a?.segments||[],onAddSegment:e=>v(e,"exclude"),onRemoveSegment:e=>b(e,"exclude"),onCreateSegment:x})})})]})]}),t.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 flex flex-col justify-center h-full",children:[t.jsx("h3",{className:"text-xl font-medium mb-6",children:"Estimated Matches"}),t.jsxs("div",{className:"flex items-center gap-3",children:[r.UserIcon&&t.jsx(r.UserIcon,{className:"w-6 h-6 text-purple-600"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-2xl font-semibold text-purple-600",children:g?t.jsx("span",{className:"animate-pulse",children:"..."}):m?.count?.toLocaleString()??0}),t.jsx("div",{className:"text-gray-600",children:"Matching Customers"})]})]})]})]})})]})},cN=({automationId:e,tailwindClassDefinitions:r,iconDefinitions:o,setOpenEditAutomationPopup:i})=>{const[s,a]=n.useState(0),{automation:l}=Ey(e),[c,u]=n.useState(!1),{updateAutomation:d}=jy(e);if(!l)return t.jsx("div",{children:t.jsx(xy,{text:["Fetching Automation data","Finishing up"]})});return t.jsxs("div",{className:"relative min-h-[500px] pb-16 flex flex-col justify-center",children:[t.jsxs("div",{className:"flex gap-8 items-center",children:[t.jsx("nav",{className:"space-y-0 w-50",children:[{id:"audience",title:"Choose Audience",isValid:()=>!!(l&&l.includeSegmentIds.length>0)},{id:"content",title:"Edit Content",isValid:()=>!!l.action_data?.length&&null!==l.action_data?.find((e=>"send_communication"===e.action_type))?.action_metadata.communication_group_id},{id:"preview",title:"Preview and Schedule",isValid:()=>!1}].map(((e,n)=>t.jsx("div",{className:`\n rounded-md transition-colors cursor-pointer\n ${n===s?"bg-[var(--reach-secondary)] text-[var(--reach-primary-foreground)] font-medium":n<s?"text-muted-foreground hover:bg-muted":"text-muted-foreground/60"}\n `,onClick:()=>{a(n)},children:t.jsx(GD,{label:e.title,isActive:n===s,isCompleted:e.isValid()})},e.id)))}),t.jsx("div",{className:"h-[100%] w-px bg-gray-200 dark:bg-gray-700"}),t.jsx("div",{className:"flex-1",children:t.jsxs(Nc,{mode:"wait",children:[0===s&&t.jsx(vy.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:t.jsx(lN,{tailwindClassDefinitions:r,iconDefinitions:o,automation:l})},"audience"),1===s&&t.jsx(vy.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:t.jsx(NT,{automation:l})},"content"),2===s&&t.jsx(vy.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},children:t.jsx(iN,{automation:l,tailwindClassDefinitions:r,iconDefinitions:o,loading:c})},"preview")]})})]}),t.jsx("div",{className:"absolute bottom-0 right-0 z-50",children:t.jsx(QD,{iconDefinitions:o,tailwindClassDefinitions:r,handleBack:()=>{a(s-1)},handleNext:()=>{2===s?(u(!0),d({status:My.ACTIVE}),i(!1)):a(s+1)},hideBack:0===s,backText:0===s?"Cancel":"Back",nextText:2===s?"Schedule":"Next",backDisabled:0===s,nextDisabled:2===s&&!(l.trigger_metadata.scheduled_at&&new Date(l.trigger_metadata.scheduled_at)>new Date&&Boolean(l.action_data?.some((e=>"send_communication"===e.action_type&&e.action_metadata.communication_group_id))))})})]})},uN={base:"reach-styles-module__base___eJmcH",default:"reach-styles-module__default___8NuEB",secondary:"reach-styles-module__secondary___H-ae8",destructive:"reach-styles-module__destructive___JsRNh",outline:"reach-styles-module__outline___9FFlV",google:"reach-styles-module__google___7eHwU",date:"reach-styles-module__date___gU3Tt",container:"reach-styles-module__container___5PrOx"},dN=Lw([uN.base],{variants:{variant:{default:uN.default,secondary:uN.secondary,destructive:uN.destructive,outline:uN.outline,google:uN.google,date:uN.date},size:{default:uN["size-default"],sm:uN["size-sm"]},iconOnly:{true:uN["icon-only"],false:""}},compoundVariants:[{iconOnly:!0,size:"sm",class:uN["icon-only-sm"]}],defaultVariants:{variant:"default",size:"default",iconOnly:!1}}),hN=i.forwardRef((({className:e,variant:n,size:r,iconOnly:o,truncate:i,...s},a)=>t.jsx("div",{ref:a,className:YD(dN({variant:n,size:r,iconOnly:o}),i&&"max-w-[90px]",e),...s})));hN.displayName="Badge";i.forwardRef((({className:e,...n},r)=>t.jsx("div",{ref:r,className:YD(uN.container,e),...n}))).displayName="BadgeContainer";const fN=({status:e})=>{switch(e){case My.DRAFT:return t.jsx(hN,{variant:"secondary",children:"Draft"});case My.ACTIVE:return t.jsx(hN,{variant:"default",className:"bg-green-600 hover:bg-green-700",children:"Active"});case My.RUNNING:return t.jsx(hN,{variant:"default",className:"bg-blue-500 hover:bg-blue-600",children:"Running"});case My.SCHEDULED:return t.jsx(hN,{variant:"default",className:"bg-purple-500 hover:bg-purple-600",children:"Scheduled"});case My.COMPLETED:return t.jsx(hN,{variant:"default",className:"bg-gray-500 hover:bg-gray-600",children:"Completed"});case My.FAILED:return t.jsx(hN,{variant:"destructive",children:"Failed"});case My.DEACTIVATED:return t.jsx(hN,{variant:"outline",className:"text-gray-500",children:"Deactivated"});default:sb(e,My)}},pN=({automation:e,tailwindClassDefinitions:r,iconDefinitions:o,autoOpenEditPopup:i})=>{const[s,a]=n.useState(!1),{updateAutomation:l}=jy(e.id);n.useEffect((()=>{i&&a(!0)}),[i]);return t.jsxs(t.Fragment,{children:[t.jsx(Ik,{open:s,onOpenChange:a,children:t.jsx(Vk,{className:"max-w-[98vw] max-h-[98vh] min-h-[80vh]",children:t.jsx(cN,{automationId:e.id,tailwindClassDefinitions:r,iconDefinitions:o,setOpenEditAutomationPopup:a})})}),t.jsxs("div",{className:"p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex justify-between items-start mb-4",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("h1",{className:"text-2xl font-semibold mb-1",children:[e.name," "]}),t.jsx(fN,{status:e.status})]}),t.jsx("div",{className:"text-sm text-gray-600",children:"View and edit this email campaign"})]}),t.jsxs(BD,{modal:!1,children:[t.jsx(UD,{asChild:!0,children:t.jsxs(Iw,{className:Uv(r.PrimaryButton),children:["Actions",t.jsx(o.DropdownMenuTrigger,{className:"ml-2 h-4 w-4"})]})}),t.jsxs(KD,{children:[(e.status===My.DRAFT||e.status===My.ACTIVE)&&t.jsx(HD,{onClick:()=>a(!0),children:"Edit"}),e.status===My.ACTIVE&&t.jsx(HD,{onClick:()=>{l({status:My.DRAFT})},children:"Convert to Draft"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-sm text-gray-600",children:"Name"}),t.jsx("div",{className:"font-medium",children:e.name})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm text-gray-600",children:"Date Created"}),t.jsx("div",{className:"font-medium",children:jw(new Date(e.created_at),"h:mma MM/dd/yy")})]}),t.jsx("div",{children:e.trigger_type===Ty.ONE_TIME&&e.trigger_metadata?.scheduled_at&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-sm text-gray-600",children:"Type"}),t.jsx("div",{className:"font-medium",children:"One Time"})]})}),t.jsx("div",{children:e.trigger_type===Ty.ONE_TIME&&e.trigger_metadata?.scheduled_at&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-sm text-gray-600",children:"Scheduled For"}),t.jsx("div",{className:"font-medium",children:jw(new Date(e.trigger_metadata.scheduled_at),"h:mma MM/dd/yy")})]})})]})]})]})};var mN=e=>null!=e;var gN=e=>"function"!=typeof e||e.length?e:e(),yN=e=>Array.isArray(e)?e:e?[e]:[];var vN=Ie;var bN,xN=function(e){const[t,n]=Me(),r=e?.throw?(e,t)=>{throw n(e instanceof Error?e:new Error(t)),e}:(e,t)=>{n(e instanceof Error?e:new Error(t))},o=e?.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),i=e?.prefix?`${e.prefix}.`:"",s=new Map,a=new Proxy({},{get(t,n){let a=s.get(n);a||(a=Me(void 0,{equals:!1}),s.set(n,a)),a[0]();const l=o.reduce(((e,t)=>{if(null!==e||!t)return e;try{return t.getItem(`${i}${n}`)}catch(Rz){return r(Rz,`Error reading ${i}${n} from ${t.name}`),null}}),null);return null!==l&&e?.deserializer?e.deserializer(l,n,e.options):l}});return!1!==e?.sync&&Fe((()=>{const e=e=>{let t=!1;o.forEach((n=>{try{n!==e.storageArea&&e.key&&e.newValue!==n.getItem(e.key)&&(e.newValue?n.setItem(e.key,e.newValue):n.removeItem(e.key),t=!0)}catch(Rz){r(Rz,`Error synching api ${n.name} from storage event (${e.key}=${e.newValue})`)}})),t&&e.key&&s.get(e.key)?.[1]()};"addEventListener"in globalThis?(globalThis.addEventListener("storage",e),Ie((()=>globalThis.removeEventListener("storage",e)))):(o.forEach((t=>t.addEventListener?.("storage",e))),Ie((()=>o.forEach((t=>t.removeEventListener?.("storage",e))))))})),[a,(t,n,a)=>{const l=e?.serializer?e.serializer(n,t,a??e.options):n,c=`${i}${t}`;o.forEach((e=>{try{e.getItem(c)!==l&&e.setItem(c,l)}catch(Rz){r(Rz,`Error setting ${i}${t} to ${l} in ${e.name}`)}}));const u=s.get(t);u&&u[1]()},{clear:()=>o.forEach((e=>{try{e.clear()}catch(Rz){r(Rz,`Error clearing ${e.name}`)}})),error:t,remove:e=>o.forEach((t=>{try{t.removeItem(`${i}${e}`)}catch(Rz){r(Rz,`Error removing ${i}${e} from ${t.name}`)}})),toJSON:()=>{const t={},n=(n,r)=>{if(!t.hasOwnProperty(n)){const o=r&&e?.deserializer?e.deserializer(r,n,e.options):r;o&&(t[n]=o)}};return o.forEach((e=>{if("function"==typeof e.getAll){let t;try{t=e.getAll()}catch(Rz){r(Rz,`Error getting all values from in ${e.name}`)}for(const e of t)n(e,t[e])}else{let o,i=0;try{for(;o=e.key(i++);)t.hasOwnProperty(o)||n(o,e.getItem(o))}catch(Rz){r(Rz,`Error getting all values from ${e.name}`)}}})),t}}]},wN=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:"boolean"==typeof r?`; ${n}`:`; ${n}=${r}`}return t},SN=("function"==typeof(bN={_cookies:[globalThis.document,"cookie"],getItem:e=>SN._cookies[0][SN._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)")?.pop()??null,setItem:(e,t,n)=>{const r=SN.getItem(e);SN._cookies[0][SN._cookies[1]]=`${e}=${t}${wN(n)}`;const o=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:SN});window.dispatchEvent(o)},removeItem:e=>{SN._cookies[0][SN._cookies[1]]=`${e}=deleted${wN({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return SN._cookies[0][SN._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,((r,o)=>(!t&&o&&n++===e&&(t=o),""))),t},get length(){let e=0;return SN._cookies[0][SN._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,(t=>(e+=t?1:0,""))),e}}).clear||(bN.clear=()=>{let e;for(;e=bN.key(0);)bN.removeItem(e)}),bN),kN=796,CN="bottom",EN="system",PN=Object.keys(Jn)[0],DN=Object.keys(tr)[0],jN=Ue({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function TN(){return Ke(jN)}var MN=Ue(void 0),ON=e=>{const[t,n]=Me(null),r=()=>{const e=t();null!=e&&(e.close(),n(null))},o=(r,o)=>{if(null!=t())return;const i=window.open("","TSQD-Devtools-Panel",`width=${r},height=${o},popup`);if(!i)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");i.document.head.innerHTML="",i.document.body.innerHTML="",function(e=window.document){if(e[Nt]){for(let t of e[Nt].keys())e.removeEventListener(t,Wt);delete e[Nt]}}(i.document),i.document.title="TanStack Query Devtools",i.document.body.style.margin="0",i.addEventListener("pagehide",(()=>{e.setLocalStore("pip_open","false"),n(null)})),[...(TN().shadowDOMTarget||document).styleSheets].forEach((e=>{try{const t=[...e.cssRules].map((e=>e.cssText)).join(""),n=document.createElement("style"),r=e.ownerNode;let o="";r&&"id"in r&&(o=r.id),o&&n.setAttribute("id",o),n.textContent=t,i.document.head.appendChild(n)}catch(Nz){const n=document.createElement("link");if(null==e.href)return;n.rel="stylesheet",n.type=e.type,n.media=e.media.toString(),n.href=e.href,i.document.head.appendChild(n)}})),Lt(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],i.document),e.setLocalStore("pip_open","true"),n(i)};Ne((()=>{"true"!==(e.localStore.pip_open??"false")||e.disabled||o(Number(window.innerWidth),Number(e.localStore.height||500))})),Ne((()=>{const e=(TN().shadowDOMTarget||document).querySelector("#_goober"),n=t();if(e&&n){const t=new MutationObserver((()=>{const t=(TN().shadowDOMTarget||n.document).querySelector("#_goober");t&&(t.textContent=e.textContent)}));t.observe(e,{childList:!0,subtree:!0,characterDataOldValue:!0}),Ie((()=>{t.disconnect()}))}}));const i=_e((()=>({pipWindow:t(),requestPipWindow:o,closePipWindow:r,disabled:e.disabled??!1})));return ut(MN.Provider,{value:i,get children(){return e.children}})},AN=()=>_e((()=>{const e=Ke(MN);if(!e)throw new Error("usePiPWindow must be used within a PiPProvider");return e()})),NN=Ue((()=>"dark"));function _N(){return Ke(NN)}var RN={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"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","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},LN=Object.keys(RN).join("|"),$N=new RegExp(LN,"g");var FN=7,IN=6,qN=5,zN=4,VN=3,BN=2,UN=1,KN=0;function HN(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:UN,!n.accessors){const r=WN(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}const o=function(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r],i=XN(o),s=YN(e,o);for(let e=0,t=s.length;e<t;e++)n.push({itemValue:s[e],attributes:i})}return n}(e,n.accessors),i={rankedValue:e,rank:KN,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let s=0;s<o.length;s++){const e=o[s];let r=WN(e.itemValue,t,n);const{minRanking:a,maxRanking:l,threshold:c=n.threshold}=e.attributes;r<a&&r>=UN?r=a:r>l&&(r=l),r=Math.min(r,l),r>=c&&r>i.rank&&(i.rank=r,i.passed=!0,i.accessorIndex=s,i.accessorThreshold=c,i.rankedValue=e.itemValue)}return i}function WN(e,t,n){return e=GN(e,n),(t=GN(t,n)).length>e.length?KN:e===t?FN:(e=e.toLowerCase())===(t=t.toLowerCase())?IN:e.startsWith(t)?qN:e.includes(` ${t}`)?zN:e.includes(t)?VN:1===t.length?KN:function(e){let t="";return e.split(" ").forEach((e=>{e.split("-").forEach((e=>{t+=e.substr(0,1)}))})),t}(e).includes(t)?BN:function(e,t){let n=0,r=0;function o(e,t,r){for(let o=r,i=t.length;o<i;o++){if(t[o]===e)return n+=1,o+1}return-1}function i(e){return UN+n/t.length*(1/e)}const s=o(t[0],e,0);if(s<0)return KN;r=s;for(let a=1,l=t.length;a<l;a++){r=o(t[a],e,r);if(!(r>-1))return KN}return i(r-s)}(e,t)}function GN(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace($N,(e=>RN[e]))),e}function YN(e,t){let n=t;"object"==typeof t&&(n=t.accessor);const r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}var QN={maxRanking:1/0,minRanking:-1/0};function XN(e){return"function"==typeof e?QN:{...QN,...e}}var JN={data:""},ZN=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,e_=/\/\*[^]*?\*\/| +/g,t_=/\n+/g,n_=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+s+";":r+="f"==i[1]?n_(s,i):i+"{"+n_(s,"k"==i[1]?"":t)+"}":"object"==typeof s?r+=n_(s,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=s&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n_.p?n_.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},r_={},o_=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+o_(e[n]);return t}return e};function i_(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=o_(e),s=r_[i]||(r_[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!r_[s]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=ZN.exec(e.replace(e_,""));)t[4]?r.shift():t[3]?(n=t[3].replace(t_," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(t_," ").trim();return r[0]})(e);r_[s]=n_(o?{["@keyframes "+s]:t}:t,n?"":"."+s)}let a=n&&r_.g?r_.g:null;return n&&(r_.g=r_[s]),l=r_[s],c=t,u=r,(d=a)?c.data=c.data.replace(d,l):-1===c.data.indexOf(l)&&(c.data=u?l+c.data:c.data+l),s;var l,c,u,d})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":n_(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,(r=t.target,"object"==typeof window?((r?r.querySelector("#_goober"):window._goober)||Object.assign((r||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:r||JN),t.g,t.o,t.k);var r}function s_(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=s_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function a_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=s_(e))&&(r&&(r+=" "),r+=t);return r}function l_(e,t){const n=Le(e),{onChange:r}=t;let o=new Set(t.appear?void 0:n);const i=new WeakSet,[s,a]=Me([],{equals:!1}),[l]=[Ve,ze],c=e=>{a((t=>(t.push.apply(t,e),t)));for(const t of e)i.delete(t)},u=(e,t,n)=>e.splice(n,0,t);return _e((t=>{const n=s(),a=e();if(Le(l))return l(),t;if(n.length){const e=t.filter((e=>!n.includes(e)));return n.length=0,r({list:e,added:[],removed:[],unchanged:e,finishRemoved:c}),e}return Le((()=>{const e=new Set(a),n=a.slice(),s=[],l=[],d=[];for(const t of a)(o.has(t)?d:s).push(t);let h=!s.length;for(let r=0;r<t.length;r++){const o=t[r];e.has(o)||(i.has(o)||(l.push(o),i.add(o)),u(n,o,r)),h&&o!==n[r]&&(h=!1)}return!l.length&&h?t:(r({list:n,added:s,removed:l,unchanged:d,finishRemoved:c}),o=e,n)}))}),t.appear?[]:n.slice())}function c_(...e){return t=e,(...e)=>{for(const n of t)n&&n(...e)};var t}i_.bind({g:1}),i_.bind({k:1});var u_=e=>e instanceof Element;function d_(e,t){if(t(e))return e;if("function"==typeof e&&!e.length)return d_(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const e=d_(r,t);e&&(Array.isArray(e)?n.push.apply(n,e):n.push(e))}return n.length?n:null}return null}function h_(e,t=u_,n=u_){const r=_e(e),o=_e((()=>d_(r(),t)));return o.toArray=()=>{const e=o();return Array.isArray(e)?e:e?[e]:[]},o}function f_(e){requestAnimationFrame((()=>requestAnimationFrame(e)))}function p_(e,t,n,r){const{onBeforeEnter:o,onEnter:i,onAfterEnter:s}=t;function a(t){t&&t.target!==n||(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),s?.(n))}o?.(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask((()=>{if(!n.parentNode)return r?.();i?.(n,(()=>a()))})),f_((()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!i||i.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))}))}function m_(e,t,n,r){const{onBeforeExit:o,onExit:i,onAfterExit:s}=t;if(!n.parentNode)return r?.();function a(t){t&&t.target!==n||(r?.(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),s?.(n))}o?.(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),i?.(n,(()=>a())),f_((()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!i||i.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))}))}var g_=e=>{const t=function(e){return _e((()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}}))}(e);return l_(h_((()=>e.children)).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:o,list:i}){const s=t();for(const t of n)p_(s,e,t);const a=[];for(const e of i)e.isConnected&&(e instanceof HTMLElement||e instanceof SVGElement)&&a.push({el:e,rect:e.getBoundingClientRect()});queueMicrotask((()=>{const e=[];for(const{el:t,rect:n}of a)if(t.isConnected){const r=t.getBoundingClientRect(),o=n.left-r.left,i=n.top-r.top;(o||i)&&(t.style.transform=`translate(${o}px, ${i}px)`,t.style.transitionDuration="0s",e.push(t))}document;for(const t of e){let e=function(n){(n.target===t||/transform$/.test(n.propertyName))&&(t.removeEventListener("transitionend",e),t.classList.remove(...s.move))};t.classList.add(...s.move),t.style.transform=t.style.transitionDuration="",t.addEventListener("transitionend",e)}}));for(const t of r)m_(s,e,t,(()=>o([t])))}})},y_=Symbol("fallback");function v_(e){for(const t of e)t.dispose()}function b_(e){const{by:t}=e;return _e(function(e,t,n,r={}){const o=new Map;return Ie((()=>v_(o.values()))),()=>{const n=e()||[];return Le((()=>{if(!n.length)return v_(o.values()),o.clear(),r.fallback?[Te((e=>(o.set(y_,{dispose:e}),r.fallback())))]:[];const e=new Array(n.length),s=o.get(y_);if(!o.size||s){s?.dispose(),o.delete(y_);for(let r=0;r<n.length;r++){const o=n[r];i(e,o,r,t(o,r))}return e}const a=new Set(o.keys());for(let r=0;r<n.length;r++){const s=n[r],l=t(s,r);a.delete(l);const c=o.get(l);c?(e[r]=c.mapped,c.setIndex?.(r),c.setItem((()=>s))):i(e,s,r,l)}for(const t of a)o.get(t)?.dispose(),o.delete(t);return e}))};function i(e,t,r,i){Te((s=>{const[a,l]=Me(t),c={setItem:l,dispose:s};if(n.length>1){const[e,t]=Me(r);c.setIndex=t,c.mapped=n(a,e)}else c.mapped=n(a);o.set(i,c),e[r]=c.mapped}))}}((()=>e.each),"function"==typeof t?t:e=>e[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function x_(e,t,n,r){const o=()=>{yN(gN(e)).forEach((e=>{e&&yN(gN(t)).forEach((t=>function(e,t,n,r){return e.addEventListener(t,n,r),vN(e.removeEventListener.bind(e,t,n,r))}(e,t,n,r)))}))};"function"==typeof e?Ne(o):Ae(o)}function w_(e,t,n){const r=new WeakMap,{observe:o,unobserve:i}=function(e,t){const n=new ResizeObserver(e);return Ie(n.disconnect.bind(n)),{observe:e=>n.observe(e,t),unobserve:n.unobserve.bind(n)}}((e=>{for(const n of e){const{contentRect:e,target:o}=n,i=Math.round(e.width),s=Math.round(e.height),a=r.get(o);a&&a.width===i&&a.height===s||(t(e,o,n),r.set(o,{width:i,height:s}))}}),n);Ne((t=>{const n=yN(gN(e)).filter(mN);return function(e,t,n,r){const o=e.length,i=t.length;let s,a,l=0;if(i)if(o){for(;l<i&&t[l]===e[l];l++);for(s of(t=t.slice(l),e=e.slice(l),t))e.includes(s)||r(s);for(a of e)t.includes(a)||n(a)}else for(;l<i;l++)r(t[l]);else for(;l<o;l++)n(e[l])}(n,t,o,i),n}),[])}var S_=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function k_(e){const t={};let n;for(;n=S_.exec(e);)t[n[1]]=n[2];return t}function C_(e,t){if("string"==typeof e){if("string"==typeof t)return`${e};${t}`;e=k_(e)}else"string"==typeof t&&(t=k_(t));return{...e,...t}}function E_(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function P_(e){return"[object String]"===Object.prototype.toString.call(e)}function D_(e){return t=>`${e()}-${t}`}function j_(e,t){return!!e&&(e===t||e.contains(t))}function T_(e,t=!1){const{activeElement:n}=M_(e);if(!n?.nodeName)return null;if(O_(n)&&n.contentDocument)return T_(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=M_(n).getElementById(e);if(t)return t}}return n}function M_(e){return e?e.ownerDocument||e:document}function O_(e){return"IFRAME"===e.tagName}var A_=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(A_||{});function N_(e){return"undefined"!=typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function __(){return N_(/^Mac/i)}function R_(){return N_(/^iPhone/i)||N_(/^iPad/i)||__()&&navigator.maxTouchPoints>1}function L_(e,t){return t&&("function"==typeof t?t(e):t[0](t[1],e)),e?.defaultPrevented}function $_(e){return t=>{for(const n of e)L_(t,n)}}function F_(e){return __()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function I_(e){if(e)if(function(){if(null==q_){q_=!1;try{document.createElement("div").focus({get preventScroll(){return q_=!0,!0}})}catch(Nz){}}return q_}())e.focus({preventScroll:!0});else{const t=function(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft});return n}(e);e.focus(),function(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}var q_=null;var z_=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],V_=[...z_,'[tabindex]:not([tabindex="-1"]):not([disabled])'],B_=z_.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",U_=V_.join(':not([hidden]):not([tabindex="-1"]),');function K_(e,t){const n=Array.from(e.querySelectorAll(B_)).filter(H_);return t&&H_(e)&&n.unshift(e),n.forEach(((e,t)=>{if(O_(e)&&e.contentDocument){const r=K_(e.contentDocument.body,!1);n.splice(t,1,...r)}})),n}function H_(e){return W_(e)&&!function(e){const t=parseInt(e.getAttribute("tabindex")||"0",10);return t<0}(e)}function W_(e){return e.matches(B_)&&G_(e)}function G_(e,t){return"#comment"!==e.nodeName&&function(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r="none"!==t&&"hidden"!==n&&"collapse"!==n;if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:o}=t(e);r="none"!==n&&"hidden"!==o&&"collapse"!==o}return r}(e)&&function(e,t){return!e.hasAttribute("hidden")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))}(e,t)&&(!e.parentElement||G_(e.parentElement,e))}function Y_(e){for(;e&&!Q_(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Q_(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function X_(){}function J_(e,t){return mt(e,t)}var Z_=new Map,eR=new Set;function tR(){if("undefined"==typeof window)return;const e=t=>{if(!t.target)return;const n=Z_.get(t.target);if(n&&(n.delete(t.propertyName),0===n.size&&(t.target.removeEventListener("transitioncancel",e),Z_.delete(t.target)),0===Z_.size)){for(const e of eR)e();eR.clear()}};document.body.addEventListener("transitionrun",(t=>{if(!t.target)return;let n=Z_.get(t.target);n||(n=new Set,Z_.set(t.target,n),t.target.addEventListener("transitioncancel",e)),n.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function nR(e,t){const n=rR(e,t,"left"),r=rR(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>l&&(s+=n+o-l),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function rR(e,t,n){const r="left"===n?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}"undefined"!=typeof document&&("loading"!==document.readyState?tR():document.addEventListener("DOMContentLoaded",tR));var oR={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function iR(e){return t=>(e(t),()=>e(void 0))}function sR(e,t){const[n,r]=Me(aR(t?.()));return Ne((()=>{r(e()?.tagName.toLowerCase()||aR(t?.()))})),n}function aR(e){return P_(e)?e:void 0}function lR(e){const[t,n]=gt(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return ut(en,mt(n,{get component(){return t.as}}))}var cR=["id","name","validationState","required","disabled","readOnly"];var uR=Ue();function dR(){const e=Ke(uR);if(void 0===e)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function hR(e){const t=dR(),n=J_({id:t.generateId("description")},e);return Ne((()=>Ie(t.registerDescription(n.id)))),ut(lR,mt({as:"div"},(()=>t.dataset()),n))}function fR(e){const t=dR(),n=J_({id:t.generateId("error-message")},e),[r,o]=gt(n,["forceMount"]),i=()=>"invalid"===t.validationState();return Ne((()=>{i()&&Ie(t.registerErrorMessage(o.id))})),ut(kt,{get when(){return r.forceMount||i()},get children(){return ut(lR,mt({as:"div"},(()=>t.dataset()),o))}})}function pR(e){let t;const n=dR(),r=J_({id:n.generateId("label")},e),[o,i]=gt(r,["ref"]),s=sR((()=>t),(()=>"label"));return Ne((()=>Ie(n.registerLabel(i.id)))),ut(lR,mt({as:"label",ref(e){const n=c_((e=>t=e),o.ref);"function"==typeof n&&n(e)},get for(){return _e((()=>"label"===s()))()?n.fieldId():void 0}},(()=>n.dataset()),i))}function mR(e,t){Ne($e(e,(e=>{if(null==e)return;const n=function(e){return function(e){return e.matches("textarea, input, select, button")}(e)?e.form:e.closest("form")}(e);null!=n&&(n.addEventListener("reset",t,{passive:!0}),Ie((()=>{n.removeEventListener("reset",t)})))})))}function gR(e){const[t,n]=Me(e.defaultValue?.()),r=_e((()=>void 0!==e.value?.())),o=_e((()=>r()?e.value?.():t()));return[o,t=>{Le((()=>{const i=function(e,...t){return"function"==typeof e?e(...t):e}(t,o());return Object.is(i,o())||(r()||n(i),e.onChange?.(i)),i}))}]}function yR(e){const[t,n]=gR(e);return[()=>t()??!1,n]}var vR=Object.defineProperty,bR=(e,t)=>{for(var n in t)vR(e,n,{get:t[n],enumerable:!0})},xR=Ue();function wR(){return Ke(xR)}function SR(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function kR(e,t){const n=function(e){const t=e.map(((e,t)=>[t,e]));let n=!1;return t.sort((([e,t],[r,o])=>{const i=t.ref(),s=o.ref();return i===s?0:i&&s?SR(i,s)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1):0})),n?t.map((([e,t])=>t)):e}(e);e!==n&&t(n)}function CR(e,t){if("function"!=typeof IntersectionObserver)return void function(e,t){Ne((()=>{const n=setTimeout((()=>{kR(e(),t)}));Ie((()=>clearTimeout(n)))}))}(e,t);let n=[];Ne((()=>{const r=function(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return M_(r).body}(e()),o=new IntersectionObserver((()=>{const r=!!n.length;n=e(),r&&kR(e(),t)}),{root:r});for(const t of e()){const e=t.ref();e&&o.observe(e)}Ie((()=>o.disconnect()))}))}function ER(e={}){const[t,n]=function(e){const[t,n]=gR(e);return[()=>t()??[],n]}({value:()=>gN(e.items),onChange:t=>e.onItemsChange?.(t)});CR(t,n);const r=e=>(n((t=>{const n=function(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const t=e[r]?.ref();if(t&&SR(t,n))return r+1}return 0}(t,e);return function(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}(t,e,n)})),()=>{n((t=>{const n=t.filter((t=>t.ref()!==e.ref()));return t.length===n.length?t:n}))});return{DomCollectionProvider:e=>ut(xR.Provider,{value:{registerItem:r},get children(){return e.children}})}}function PR(e){const t=function(){const e=wR();if(void 0===e)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}(),n=J_({shouldRegisterItem:!0},e);Ne((()=>{if(!n.shouldRegisterItem)return;Ie(t.registerItem(n.getItem()))}))}function DR(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=t=>{if(null==t)return"";const n=e.getKey??"key",r=P_(n)?t[n]:n(t);return null!=r?String(r):""},i=t=>{if(null==t)return"";const n=e.getTextValue??"textValue",r=P_(n)?t[n]:n(t);return null!=r?String(r):""},s=t=>{if(null==t)return!1;const n=e.getDisabled??"disabled";return(P_(n)?t[n]:n(t))??!1},a=t=>{if(null!=t)return P_(e.getSectionChildren)?t[e.getSectionChildren]:e.getSectionChildren?.(t)};for(const l of e.dataSource)if(P_(l)||"number"==typeof l)r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;else if(null!=a(l)){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const o=a(l)??[];if(o.length>0){const i=DR({dataSource:o,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...i),t+=i.length}}else r.push({type:"item",rawValue:l,key:o(l),textValue:i(l),disabled:s(l),level:n,index:t}),t++;return r}function jR(e,t=[]){return _e((()=>{const n=DR({dataSource:gN(e.dataSource),getKey:gN(e.getKey),getTextValue:gN(e.getTextValue),getDisabled:gN(e.getDisabled),getSectionChildren:gN(e.getSectionChildren)});for(let e=0;e<t.length;e++)t[e]();return e.factory(n)}))}var TR=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),MR=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function OR(e){return function(e){if(Intl.Locale){const t=new Intl.Locale(e).maximize().script??"";return TR.has(t)}const t=e.split("-")[0];return MR.has(t)}(e)?"rtl":"ltr"}function AR(){let e="undefined"!=typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:OR(e)}}var NR=AR(),_R=new Set;function RR(){NR=AR();for(const e of _R)e(NR)}var LR=Ue();function $R(){const e=function(){const[e,t]=Me(NR),n=_e((()=>e()));return Fe((()=>{0===_R.size&&window.addEventListener("languagechange",RR),_R.add(t),Ie((()=>{_R.delete(t),0===_R.size&&window.removeEventListener("languagechange",RR)}))})),{locale:()=>n().locale,direction:()=>n().direction}}();return Ke(LR)||e}var FR=new Map;var IR=class e extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function qR(e){return __()||R_()?e.altKey:e.ctrlKey}function zR(e){return __()?e.metaKey:e.ctrlKey}function VR(e){return new IR(e)}function BR(e){const t=J_({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=Me(!1),[o,i]=Me(),s=_e((()=>{const e=gN(t.selectedKeys);return null!=e?VR(e):e})),a=_e((()=>{const e=gN(t.defaultSelectedKeys);return null!=e?VR(e):new IR})),[l,c]=function(e){const[t,n]=gR(e);return[()=>t()??new IR,n]}({value:s,defaultValue:a,onChange:e=>t.onSelectionChange?.(e)}),[u,d]=Me(gN(t.selectionBehavior));return Ne((()=>{const e=l();"replace"===gN(t.selectionBehavior)&&"toggle"===u()&&"object"==typeof e&&0===e.size&&d("replace")})),Ne((()=>{d(gN(t.selectionBehavior)??"toggle")})),{selectionMode:()=>gN(t.selectionMode),disallowEmptySelection:()=>gN(t.disallowEmptySelection)??!1,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:l,setSelectedKeys:e=>{!gN(t.allowDuplicateSelectionEvents)&&function(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}(e,l())||c(e)}}}function UR(e,t,n){const r=mt({selectOnFocus:()=>"replace"===gN(e.selectionManager).selectionBehavior()},e),o=()=>t(),{direction:i}=$R();let s={top:0,left:0};x_((()=>gN(r.isVirtualized)?void 0:o()),"scroll",(()=>{const e=o();e&&(s={top:e.scrollTop,left:e.scrollLeft})}));const{typeSelectHandlers:a}=function(e){const[t,n]=Me(""),[r,o]=Me(-1);return{typeSelectHandlers:{onKeyDown:i=>{if(gN(e.isDisabled))return;const s=gN(e.keyboardDelegate),a=gN(e.selectionManager);if(!s.getKeyForSearch)return;const l=function(e){return 1!==e.length&&/^[A-Z]/i.test(e)?"":e}(i.key);if(!l||i.ctrlKey||i.metaKey)return;" "===l&&t().trim().length>0&&(i.preventDefault(),i.stopPropagation());let c=n((e=>e+l)),u=s.getKeyForSearch(c,a.focusedKey())??s.getKeyForSearch(c);null==u&&function(e){return e.split("").every((t=>t===e[0]))}(c)&&(c=c[0],u=s.getKeyForSearch(c,a.focusedKey())??s.getKeyForSearch(c)),null!=u&&(a.setFocusedKey(u),e.onTypeSelect?.(u)),clearTimeout(r()),o(window.setTimeout((()=>n("")),500))}}}}({isDisabled:()=>gN(r.disallowTypeAhead),keyboardDelegate:()=>gN(r.keyboardDelegate),selectionManager:()=>gN(r.selectionManager)}),l=()=>gN(r.orientation)??"vertical",c=()=>{const e=gN(r.autoFocus);if(!e)return;const n=gN(r.selectionManager),o=gN(r.keyboardDelegate);let i;"first"===e&&(i=o.getFirstKey?.()),"last"===e&&(i=o.getLastKey?.());const s=n.selectedKeys();s.size&&(i=s.values().next().value),n.setFocused(!0),n.setFocusedKey(i);const a=t();a&&null==i&&!gN(r.shouldUseVirtualFocus)&&I_(a)};Fe((()=>{r.deferAutoFocus?setTimeout(c,0):c()})),Ne($e([o,()=>gN(r.isVirtualized),()=>gN(r.selectionManager).focusedKey()],(e=>{const[t,n,o]=e;if(n)o&&r.scrollToKey?.(o);else if(o&&t){const e=t.querySelector(`[data-key="${o}"]`);e&&nR(t,e)}})));return{tabIndex:_e((()=>{if(!gN(r.shouldUseVirtualFocus))return null==gN(r.selectionManager).focusedKey()?0:-1})),onKeyDown:e=>{L_(e,a.onKeyDown),e.altKey&&"Tab"===e.key&&e.preventDefault();const n=t();if(!n?.contains(e.target))return;const o=gN(r.selectionManager),s=gN(r.selectOnFocus),c=t=>{null!=t&&(o.setFocusedKey(t),e.shiftKey&&"multiple"===o.selectionMode()?o.extendSelection(t):s&&!qR(e)&&o.replaceSelection(t))},u=gN(r.keyboardDelegate),d=gN(r.shouldFocusWrap),h=o.focusedKey();switch(e.key){case"vertical"===l()?"ArrowDown":"ArrowRight":if(u.getKeyBelow){let t;e.preventDefault(),t=null!=h?u.getKeyBelow(h):u.getFirstKey?.(),null==t&&d&&(t=u.getFirstKey?.(h)),c(t)}break;case"vertical"===l()?"ArrowUp":"ArrowLeft":if(u.getKeyAbove){let t;e.preventDefault(),t=null!=h?u.getKeyAbove(h):u.getLastKey?.(),null==t&&d&&(t=u.getLastKey?.(h)),c(t)}break;case"vertical"===l()?"ArrowLeft":"ArrowUp":if(u.getKeyLeftOf){e.preventDefault();const t="rtl"===i();let n;n=null!=h?u.getKeyLeftOf(h):t?u.getFirstKey?.():u.getLastKey?.(),c(n)}break;case"vertical"===l()?"ArrowRight":"ArrowDown":if(u.getKeyRightOf){e.preventDefault();const t="rtl"===i();let n;n=null!=h?u.getKeyRightOf(h):t?u.getLastKey?.():u.getFirstKey?.(),c(n)}break;case"Home":if(u.getFirstKey){e.preventDefault();const t=u.getFirstKey(h,zR(e));null!=t&&(o.setFocusedKey(t),zR(e)&&e.shiftKey&&"multiple"===o.selectionMode()?o.extendSelection(t):s&&o.replaceSelection(t))}break;case"End":if(u.getLastKey){e.preventDefault();const t=u.getLastKey(h,zR(e));null!=t&&(o.setFocusedKey(t),zR(e)&&e.shiftKey&&"multiple"===o.selectionMode()?o.extendSelection(t):s&&o.replaceSelection(t))}break;case"PageDown":if(u.getKeyPageBelow&&null!=h){e.preventDefault();c(u.getKeyPageBelow(h))}break;case"PageUp":if(u.getKeyPageAbove&&null!=h){e.preventDefault();c(u.getKeyPageAbove(h))}break;case"a":zR(e)&&"multiple"===o.selectionMode()&&!0!==gN(r.disallowSelectAll)&&(e.preventDefault(),o.selectAll());break;case"Escape":e.defaultPrevented||(e.preventDefault(),gN(r.disallowEmptySelection)||o.clearSelection());break;case"Tab":if(!gN(r.allowsTabNavigation)){if(e.shiftKey)n.focus();else{const e=function(e,t){const n=t?.tabbable?U_:B_,r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>t?.from?.contains(e)?NodeFilter.FILTER_REJECT:e.matches(n)&&G_(e)&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(r.currentNode=t.from),r}(n,{tabbable:!0});let t,r;do{r=e.lastChild(),r&&(t=r)}while(r);t&&!t.contains(document.activeElement)&&I_(t)}break}}},onMouseDown:e=>{o()===e.target&&e.preventDefault()},onFocusIn:e=>{const t=gN(r.selectionManager),n=gN(r.keyboardDelegate),i=gN(r.selectOnFocus);if(t.isFocused())e.currentTarget.contains(e.target)||t.setFocused(!1);else if(e.currentTarget.contains(e.target))if(t.setFocused(!0),null==t.focusedKey()){const r=e=>{null!=e&&(t.setFocusedKey(e),i&&t.replaceSelection(e))},o=e.relatedTarget;o&&e.currentTarget.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey()??n.getLastKey?.()):r(t.firstSelectedKey()??n.getFirstKey?.())}else if(!gN(r.isVirtualized)){const e=o();if(e){e.scrollTop=s.top,e.scrollLeft=s.left;const n=e.querySelector(`[data-key="${t.focusedKey()}"]`);n&&(I_(n),nR(e,n))}}},onFocusOut:e=>{const t=gN(r.selectionManager);e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)}}}function KR(e,t){const n=()=>gN(e.selectionManager),r=()=>gN(e.key),o=()=>gN(e.shouldUseVirtualFocus),i=e=>{"none"!==n().selectionMode()&&("single"===n().selectionMode()?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):e?.shiftKey?n().extendSelection(r()):"toggle"===n().selectionBehavior()||zR(e)||"pointerType"in e&&"touch"===e.pointerType?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>gN(e.disabled)||n().isDisabled(r()),a=()=>!s()&&n().canSelectItem(r());let l=null;const c=_e((()=>{if(!o()&&!s())return r()===n().focusedKey()?0:-1})),u=_e((()=>gN(e.virtualized)?void 0:r()));return Ne($e([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],(([t,n,r,o,i])=>{t&&n===o&&i&&!r&&document.activeElement!==t&&(e.focus?e.focus():I_(t))}))),{isSelected:()=>n().isSelected(r()),isDisabled:s,allowsSelection:a,tabIndex:c,dataKey:u,onPointerDown:t=>{a()&&(l=t.pointerType,"mouse"!==t.pointerType||0!==t.button||gN(e.shouldSelectOnPressUp)||i(t))},onPointerUp:t=>{a()&&"mouse"===t.pointerType&&0===t.button&&gN(e.shouldSelectOnPressUp)&&gN(e.allowsDifferentPressOrigin)&&i(t)},onClick:t=>{a()&&(gN(e.shouldSelectOnPressUp)&&!gN(e.allowsDifferentPressOrigin)||"mouse"!==l)&&i(t)},onKeyDown:e=>{a()&&["Enter"," "].includes(e.key)&&(qR(e)?n().toggleSelection(r()):i(e))},onMouseDown:e=>{s()&&e.preventDefault()},onFocus:e=>{const i=t();o()||s()||!i||e.target===i&&n().setFocusedKey(r())}}}var HR=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(null==e||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if("none"===this.state.selectionMode())return!1;const t=this.getKey(e);return null!=t&&this.state.selectedKeys().has(t)}isEmpty(){return 0===this.state.selectedKeys().size}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every((t=>e.has(t)))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t);e&&!(null!=n?.index&&null!=e?.index&&n.index<e.index)||(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t);e&&!(null!=n?.index&&null!=e?.index&&n.index>e.index)||(e=n)}return e?.key}extendSelection(e){if("none"===this.selectionMode())return;if("single"===this.selectionMode())return void this.replaceSelection(e);const t=this.getKey(e);if(null==t)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new IR(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?null!=n.index&&null!=r.index&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;null!=r;){const e=this.collection().getItem(r);if(e&&"item"===e.type&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?t&&"item"===t.type?t.key:null:e}toggleSelection(e){if("none"===this.selectionMode())return;if("single"===this.selectionMode()&&!this.isSelected(e))return void this.replaceSelection(e);const t=this.getKey(e);if(null==t)return;const n=new IR(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),this.disallowEmptySelection()&&0===n.size||this.state.setSelectedKeys(n)}replaceSelection(e){if("none"===this.selectionMode())return;const t=this.getKey(e);if(null==t)return;const n=this.canSelectItem(t)?new IR([t],t,t):new IR;this.state.setSelectedKeys(n)}setSelectedKeys(e){if("none"===this.selectionMode())return;const t=new IR;for(const n of e){const e=this.getKey(n);if(null!=e&&(t.add(e),"single"===this.selectionMode()))break}this.state.setSelectedKeys(t)}selectAll(){"multiple"===this.selectionMode()&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new IR)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){"none"!==this.selectionMode()&&("single"===this.selectionMode()?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):"toggle"===this.selectionBehavior()||t&&"touch"===t.pointerType?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if("none"===this.state.selectionMode())return!1;const t=this.collection().getItem(e);return null!=t&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(t=>{for(;null!=t;){if(this.canSelectItem(t)){const n=this.collection().getItem(t);if(!n)continue;"item"===n.type&&e.push(t)}t=this.collection().getKeyAfter(t)}})(this.collection().getFirstKey()),e}},WR=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(0===this.keyMap.size)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),"item"===o.type&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};var GR,YR=e=>"function"==typeof e?e():e,QR=e=>{const t=_e((()=>{const t=YR(e.element);if(t)return getComputedStyle(t)})),n=()=>t()?.animationName??"none",[r,o]=Me(YR(e.show)?"present":"hidden");let i="none";return Ne((r=>{const s=YR(e.show);return Le((()=>{if(r===s)return s;const e=i,a=n();if(s)o("present");else if("none"===a||"none"===t()?.display)o("hidden");else{o(!0===r&&e!==a?"hiding":"hidden")}})),s})),Ne((()=>{const t=YR(e.element);if(!t)return;const s=e=>{e.target===t&&(i=n())},a=e=>{const i=n().includes(e.animationName);e.target===t&&i&&"hiding"===r()&&o("hidden")};t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),Ie((()=>{t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}))})),{present:()=>"present"===r()||"hiding"===r(),state:r}},XR="data-kb-top-layer",JR=!1,ZR=[];function eL(e){return ZR.findIndex((t=>t.node===e))}function tL(){return ZR.filter((e=>e.isPointerBlocking))}function nL(){return tL().length>0}function rL(e){const t=eL([...tL()].slice(-1)[0]?.node);return eL(e)<t}var oL={layers:ZR,isTopMostLayer:function(e){return ZR[ZR.length-1].node===e},hasPointerBlockingLayer:nL,isBelowPointerBlockingLayer:rL,addLayer:function(e){ZR.push(e)},removeLayer:function(e){const t=eL(e);t<0||ZR.splice(t,1)},indexOf:eL,find:function(e){return ZR[eL(e)]},assignPointerEventToLayers:function(){for(const{node:e}of ZR)e.style.pointerEvents=rL(e)?"none":"auto"},disableBodyPointerEvents:function(e){if(nL()&&!JR){const t=M_(e);GR=document.body.style.pointerEvents,t.body.style.pointerEvents="none",JR=!0}},restoreBodyPointerEvents:function(e){if(nL())return;const t=M_(e);t.body.style.pointerEvents=GR,0===t.body.style.length&&t.body.removeAttribute("style"),JR=!1}};bR({},{Button:()=>aL,Root:()=>sL});var iL=["button","color","file","image","reset","submit"];function sL(e){let t;const n=J_({type:"button"},e),[r,o]=gt(n,["ref","type","disabled"]),i=sR((()=>t),(()=>"button")),s=_e((()=>{const e=i();return null!=e&&function(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==iL.indexOf(e.type)}({tagName:e,type:r.type})})),a=_e((()=>"input"===i())),l=_e((()=>"a"===i()&&null!=t?.getAttribute("href")));return ut(lR,mt({as:"button",ref(e){const n=c_((e=>t=e),r.ref);"function"==typeof n&&n(e)},get type(){return s()||a()?r.type:void 0},get role(){return s()||l()?void 0:"button"},get tabIndex(){return s()||l()||r.disabled?void 0:0},get disabled(){return s()||a()?r.disabled:void 0},get"aria-disabled"(){return!(s()||a()||!r.disabled)||void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var aL=sL,lL=["top","right","bottom","left"],cL=Math.min,uL=Math.max,dL=Math.round,hL=Math.floor,fL=e=>({x:e,y:e}),pL={left:"right",right:"left",bottom:"top",top:"bottom"},mL={start:"end",end:"start"};function gL(e,t,n){return uL(e,cL(t,n))}function yL(e,t){return"function"==typeof e?e(t):e}function vL(e){return e.split("-")[0]}function bL(e){return e.split("-")[1]}function xL(e){return"x"===e?"y":"x"}function wL(e){return"y"===e?"height":"width"}function SL(e){return["top","bottom"].includes(vL(e))?"y":"x"}function kL(e){return xL(SL(e))}function CL(e){return e.replace(/start|end/g,(e=>mL[e]))}function EL(e){return e.replace(/left|right|bottom|top/g,(e=>pL[e]))}function PL(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function DL(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function jL(e,t,n){let{reference:r,floating:o}=e;const i=SL(t),s=kL(t),a=wL(s),l=vL(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(bL(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function TL(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=yL(t,e),p=PL(f),m=a[h?"floating"===d?"reference":"floating":d],g=DL(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=DL(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function ML(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OL(e){return lL.some((t=>e[t]>=0))}function AL(e){return RL(e)?(e.nodeName||"").toLowerCase():"#document"}function NL(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _L(e){var t;return null==(t=(RL(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function RL(e){return e instanceof Node||e instanceof NL(e).Node}function LL(e){return e instanceof Element||e instanceof NL(e).Element}function $L(e){return e instanceof HTMLElement||e instanceof NL(e).HTMLElement}function FL(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof NL(e).ShadowRoot)}function IL(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=KL(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function qL(e){return["table","td","th"].includes(AL(e))}function zL(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(Nz){return!1}}))}function VL(e){const t=BL(),n=LL(e)?KL(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function BL(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function UL(e){return["html","body","#document"].includes(AL(e))}function KL(e){return NL(e).getComputedStyle(e)}function HL(e){return LL(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function WL(e){if("html"===AL(e))return e;const t=e.assignedSlot||e.parentNode||FL(e)&&e.host||_L(e);return FL(t)?t.host:t}function GL(e){const t=WL(e);return UL(t)?e.ownerDocument?e.ownerDocument.body:e.body:$L(t)&&IL(t)?t:GL(t)}function YL(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=GL(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=NL(o);return i?t.concat(s,s.visualViewport||[],IL(o)?o:[],s.frameElement&&n?YL(s.frameElement):[]):t.concat(o,YL(o,[],n))}function QL(e){const t=KL(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=$L(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=dL(n)!==i||dL(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function XL(e){return LL(e)?e:e.contextElement}function JL(e){const t=XL(e);if(!$L(t))return fL(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=QL(t);let s=(i?dL(n.width):n.width)/r,a=(i?dL(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}var ZL=fL(0);function e$(e){const t=NL(e);return BL()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ZL}function t$(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=XL(e);let s=fL(1);t&&(r?LL(r)&&(s=JL(r)):s=JL(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==NL(e))&&t}(i,n,r)?e$(i):fL(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=NL(i),t=r&&LL(r)?NL(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=JL(o),t=o.getBoundingClientRect(),r=KL(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=NL(o),o=n.frameElement}}return DL({width:u,height:d,x:l,y:c})}function n$(e){return t$(_L(e)).left+HL(e).scrollLeft}function r$(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=NL(e),r=_L(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=BL();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=_L(e),n=HL(e),r=e.ownerDocument.body,o=uL(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=uL(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+n$(e);const a=-n.scrollTop;return"rtl"===KL(r).direction&&(s+=uL(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(_L(e));else if(LL(t))r=function(e,t){const n=t$(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=$L(e)?JL(e):fL(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=e$(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return DL(r)}function o$(e,t){const n=WL(e);return!(n===t||!LL(n)||UL(n))&&("fixed"===KL(n).position||o$(n,t))}function i$(e,t,n){const r=$L(t),o=_L(t),i="fixed"===n,s=t$(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=fL(0);if(r||!r&&!i)if(("body"!==AL(t)||IL(o))&&(a=HL(t)),r){const e=t$(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=n$(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function s$(e){return"static"===KL(e).position}function a$(e,t){return $L(e)&&"fixed"!==KL(e).position?t?t(e):e.offsetParent:null}function l$(e,t){const n=NL(e);if(zL(e))return n;if(!$L(e)){let t=WL(e);for(;t&&!UL(t);){if(LL(t)&&!s$(t))return t;t=WL(t)}return n}let r=a$(e,t);for(;r&&qL(r)&&s$(r);)r=a$(r,t);return r&&UL(r)&&s$(r)&&!VL(r)?n:r||function(e){let t=WL(e);for(;$L(t)&&!UL(t);){if(VL(t))return t;if(zL(t))return null;t=WL(t)}return null}(e)||n}var c$={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=_L(r),a=!!t&&zL(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=fL(1);const u=fL(0),d=$L(r);if((d||!d&&!i)&&(("body"!==AL(r)||IL(s))&&(l=HL(r)),$L(r))){const e=t$(r);c=JL(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:_L,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?zL(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=YL(e,[],!1).filter((e=>LL(e)&&"body"!==AL(e))),o=null;const i="fixed"===KL(e).position;let s=i?WL(e):e;for(;LL(s)&&!UL(s);){const t=KL(s),n=VL(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||IL(s)&&!n&&o$(e,s))?r=r.filter((e=>e!==s)):o=t,s=WL(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i.reduce(((e,n)=>{const r=r$(t,n,o);return e.top=uL(r.top,e.top),e.right=cL(r.right,e.right),e.bottom=cL(r.bottom,e.bottom),e.left=uL(r.left,e.left),e}),r$(t,i[0],o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:l$,getElementRects:async function(e){const t=this.getOffsetParent||l$,n=this.getDimensions,r=await n(e.floating);return{reference:i$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=QL(e);return{width:t,height:n}},getScale:JL,isElement:LL,isRTL:function(e){return"rtl"===KL(e).direction}};function u$(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=XL(e),u=o||i?[...c?YL(c):[],...YL(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=_L(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f={rootMargin:-hL(u)+"px "+-hL(o.clientWidth-(c+d))+"px "+-hL(o.clientHeight-(u+h))+"px "+-hL(c)+"px",threshold:uL(0,cL(1,l))||1};let p=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}p=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(Nz){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let h,f=-1,p=null;s&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let m=l?t$(e):null;return l&&function t(){const r=t$(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var d$=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=vL(n),a=bL(n),l="y"===SL(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=yL(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},h$=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=yL(e,t),c={x:n,y:r},u=await TL(t,l),d=SL(vL(o)),h=xL(d);let f=c[h],p=c[d];if(i){f=gL(f+u["y"===h?"top":"left"],f,f-u["y"===h?"bottom":"right"])}if(s){p=gL(p+u["y"===d?"top":"left"],p,p-u["y"===d?"bottom":"right"])}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},f$=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=yL(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=vL(o),v=SL(a),b=vL(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=h||(b||!m?[EL(a)]:function(e){const t=EL(e);return[CL(e),t,CL(t)]}(a)),S="none"!==p;!h&&S&&w.push(...function(e,t,n,r){const o=bL(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(vL(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(CL)))),i}(a,m,p,x));const k=[a,...w],C=await TL(t,g),E=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=bL(e),o=kL(e),i=wL(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=EL(s)),[s,EL(s)]}(o,s,x);E.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:o,overflows:E}],!E.every((e=>e<=0))){var D,j;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:P},reset:{placement:t}};let n=null==(j=P.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=P.filter((e=>{if(S){const t=SL(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},p$=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=yL(e,t),l=await TL(t,a),c=vL(n),u=bL(n),d="y"===SL(n),{width:h,height:f}=r.floating;let p,m;"top"===c||"bottom"===c?(p=c,m=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p="end"===u?"top":"bottom");const g=f-l.top-l.bottom,y=h-l.left-l.right,v=cL(f-l[p],g),b=cL(h-l[m],y),x=!t.middlewareData.shift;let w=v,S=b;if(d?S=u||x?cL(b,y):y:w=u||x?cL(v,g):g,x&&!u){const e=uL(l.left,0),t=uL(l.right,0),n=uL(l.top,0),r=uL(l.bottom,0);d?S=h-2*(0!==e||0!==t?e+t:uL(l.left,l.right)):w=f-2*(0!==n||0!==r?n+r:uL(l.top,l.bottom))}await s({...t,availableWidth:S,availableHeight:w});const k=await o.getDimensions(i.floating);return h!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}},m$=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=yL(e,t);switch(r){case"referenceHidden":{const e=ML(await TL(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:OL(e)}}}case"escaped":{const e=ML(await TL(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:OL(e)}}}default:return{}}}}},g$=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=yL(e,t)||{};if(null==c)return{};const d=PL(u),h={x:n,y:r},f=kL(o),p=wL(f),m=await s.getDimensions(c),g="y"===f,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[f]-h[f]-i.floating[p],w=h[f]-i.reference[f],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=S?S[b]:0;k&&await(null==s.isElement?void 0:s.isElement(S))||(k=a.floating[b]||i.floating[p]);const C=x/2-w/2,E=k/2-m[p]/2-1,P=cL(d[y],E),D=cL(d[v],E),j=P,T=k-m[p]-D,M=k/2-m[p]/2+C,O=gL(j,M,T),A=!l.arrow&&null!=bL(o)&&M!==O&&i.reference[p]/2-(M<j?P:D)-m[p]/2<0,N=A?M<j?M-j:M-T:0;return{[f]:h[f]+N,data:{[f]:O,centerOffset:M-O-N,...A&&{alignmentOffset:N}},reset:A}}}),y$=(e,t,n)=>{const r={platform:c$,...n},o={...r.platform,_c:new Map};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=jL(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:n,fn:i}=a[m],{x:g,y:y,data:v,reset:b}=await i({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f={...f,[n]:{...f[n],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=jL(c,h,l))),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}})(e,t,{...r,platform:o})},v$=Ue();function b$(){const e=Ke(v$);if(void 0===e)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var x$=Rt('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),w$={top:180,right:-90,bottom:0,left:90};function S$(e){const t=b$(),n=J_({size:30},e),[r,o]=gt(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=function(e){const[t,n]=Me();return Ne((()=>{const t=e();var r;t&&n((r=t,M_(r).defaultView||window).getComputedStyle(t))})),t}(t.contentRef),a=()=>2*Number.parseInt(s()?.getPropertyValue(`border-${i()}-width`)||"0px")*(30/r.size);return ut(lR,mt({as:"div",ref(e){const n=c_(t.setArrowRef,r.ref);"function"==typeof n&&n(e)},"aria-hidden":"true",get style(){return C_({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:s()?.getPropertyValue("background-color")||"none",stroke:s()?.getPropertyValue(`border-${i()}-color`)||"none","stroke-width":a()},r.style)}},o,{get children(){const e=x$(),t=e.firstChild;return Ae((()=>$t(t,"transform",`rotate(${w$[i()]} 15 15) translate(0 2)`))),e}}))}function k$(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if("function"==typeof DOMRect)return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function C$(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var E$={top:"bottom",right:"left",bottom:"top",left:"right"};var P$=Object.assign((function(e){const t=J_({getAnchorRect:e=>e?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=Me(),[o,i]=Me(),[s,a]=Me(t.placement),l=()=>{return e=t.anchorRef?.(),n=t.getAnchorRect,{contextElement:e,getBoundingClientRect:()=>{const t=n(e);return t?k$(t):e?e.getBoundingClientRect():k$()}};var e,n},{direction:c}=$R();async function u(){const e=l(),r=n(),i=o();if(!e||!r)return;const s=(i?.clientHeight||0)/2,u="number"==typeof t.gutter?t.gutter+s:t.gutter??s;r.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),e.getBoundingClientRect();const d=[d$((({placement:e})=>{const n=!!e.split("-")[1];return{mainAxis:u,crossAxis:n?void 0:t.shift,alignmentAxis:t.shift}}))];if(!1!==t.flip){const e="string"==typeof t.flip?t.flip.split(" "):void 0;if(void 0!==e&&!e.every(C$))throw new Error("`flip` expects a spaced-delimited list of placements");d.push(f$({padding:t.overflowPadding,fallbackPlacements:e}))}(t.slide||t.overlap)&&d.push(h$({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),d.push(p$({padding:t.overflowPadding,apply({availableWidth:e,availableHeight:n,rects:o}){const i=Math.round(o.reference.width);e=Math.floor(e),n=Math.floor(n),r.style.setProperty("--kb-popper-anchor-width",`${i}px`),r.style.setProperty("--kb-popper-content-available-width",`${e}px`),r.style.setProperty("--kb-popper-content-available-height",`${n}px`),t.sameWidth&&(r.style.width=`${i}px`),t.fitViewport&&(r.style.maxWidth=`${e}px`,r.style.maxHeight=`${n}px`)}})),t.hideWhenDetached&&d.push(m$({padding:t.detachedPadding})),i&&d.push(g$({element:i,padding:t.arrowPadding}));const h=await y$(e,r,{placement:t.placement,strategy:"absolute",middleware:d,platform:{...c$,isRTL:()=>"rtl"===c()}});if(a(h.placement),t.onCurrentPlacementChange?.(h.placement),!r)return;r.style.setProperty("--kb-popper-content-transform-origin",function(e,t){const[n,r]=e.split("-"),o=E$[n];return r?"left"===n||"right"===n?`${o} ${"start"===r?"top":"bottom"}`:"start"===r?`${o} ${"rtl"===t?"right":"left"}`:`${o} ${"rtl"===t?"left":"right"}`:`${o} center`}(h.placement,c()));const f=Math.round(h.x),p=Math.round(h.y);let m;if(t.hideWhenDetached&&(m=h.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(r.style,{top:"0",left:"0",transform:`translate3d(${f}px, ${p}px, 0)`,visibility:m}),i&&h.middlewareData.arrow){const{x:e,y:t}=h.middlewareData.arrow,n=h.placement.split("-")[0];Object.assign(i.style,{left:null!=e?`${e}px`:"",top:null!=t?`${t}px`:"",[n]:"100%"})}}return Ne((()=>{const e=l(),t=n();if(!e||!t)return;Ie(u$(e,t,u,{elementResize:"function"==typeof ResizeObserver}))})),Ne((()=>{const e=n(),r=t.contentRef?.();e&&r&&queueMicrotask((()=>{e.style.zIndex=getComputedStyle(r).zIndex}))})),ut(v$.Provider,{value:{currentPlacement:s,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:i},get children(){return t.children}})}),{Arrow:S$,Context:v$,usePopperContext:b$,Positioner:function(e){const t=b$(),[n,r]=gt(e,["ref","style"]);return ut(lR,mt({as:"div",ref(e){const r=c_(t.setPositionerRef,n.ref);"function"==typeof r&&r(e)},"data-popper-positioner":"",get style(){return C_({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}});var D$="interactOutside.pointerDownOutside",j$="interactOutside.focusOutside";var T$=Ue();function M$(e){let t;const n=Ke(T$),[r,o]=gt(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]);!function(e,t){let n,r=X_;const o=()=>M_(t()),i=t=>e.onPointerDownOutside?.(t),s=t=>e.onFocusOutside?.(t),a=t=>e.onInteractOutside?.(t),l=n=>{const r=n.target;return r instanceof HTMLElement&&!r.closest(`[${XR}]`)&&!!j_(o(),r)&&!j_(t(),r)&&!e.shouldExcludeElement?.(r)},c=e=>{function n(){const n=t(),r=e.target;if(!n||!r||!l(e))return;const o=$_([i,a]);r.addEventListener(D$,o,{once:!0});const s=new CustomEvent(D$,{bubbles:!1,cancelable:!0,detail:{originalEvent:e,isContextMenu:2===e.button||F_(e)&&0===e.button}});r.dispatchEvent(s)}"touch"===e.pointerType?(o().removeEventListener("click",n),r=n,o().addEventListener("click",n,{once:!0})):n()},u=e=>{const n=t(),r=e.target;if(!n||!r||!l(e))return;const o=$_([s,a]);r.addEventListener(j$,o,{once:!0});const i=new CustomEvent(j$,{bubbles:!1,cancelable:!0,detail:{originalEvent:e,isContextMenu:!1}});r.dispatchEvent(i)};Ne((()=>{gN(e.isDisabled)||(n=window.setTimeout((()=>{o().addEventListener("pointerdown",c,!0)}),0),o().addEventListener("focusin",u,!0),Ie((()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",u,!0)})))}))}({shouldExcludeElement:e=>!!t&&(r.excludedElements?.some((t=>j_(t(),e)))||[...i].some((t=>j_(t,e)))),onPointerDownOutside:e=>{t&&!oL.isBelowPointerBlockingLayer(t)&&(r.bypassTopMostLayerCheck||oL.isTopMostLayer(t))&&(r.onPointerDownOutside?.(e),r.onInteractOutside?.(e),e.defaultPrevented||r.onDismiss?.())},onFocusOutside:e=>{r.onFocusOutside?.(e),r.onInteractOutside?.(e),e.defaultPrevented||r.onDismiss?.()}},(()=>t)),function(e){const t=t=>{t.key===A_.Escape&&e.onEscapeKeyDown?.(t)};Ne((()=>{if(gN(e.isDisabled))return;const n=e.ownerDocument?.()??M_();n.addEventListener("keydown",t),Ie((()=>{n.removeEventListener("keydown",t)}))}))}({ownerDocument:()=>M_(t),onEscapeKeyDown:e=>{t&&oL.isTopMostLayer(t)&&(r.onEscapeKeyDown?.(e),!e.defaultPrevented&&r.onDismiss&&(e.preventDefault(),r.onDismiss()))}}),Fe((()=>{if(!t)return;oL.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const e=n?.registerNestedLayer(t);oL.assignPointerEventToLayers(),oL.disableBodyPointerEvents(t),Ie((()=>{t&&(oL.removeLayer(t),e?.(),oL.assignPointerEventToLayers(),oL.restoreBodyPointerEvents(t))}))})),Ne($e([()=>t,()=>r.disableOutsidePointerEvents],(([e,t])=>{if(!e)return;const n=oL.find(e);n&&n.isPointerBlocking!==t&&(n.isPointerBlocking=t,oL.assignPointerEventToLayers()),t&&oL.disableBodyPointerEvents(e),Ie((()=>{oL.restoreBodyPointerEvents(e)}))}),{defer:!0}));return ut(T$.Provider,{value:{registerNestedLayer:e=>{i.add(e);const t=n?.registerNestedLayer(e);return()=>{i.delete(e),t?.()}}},get children(){return ut(lR,mt({as:"div",ref(e){const n=c_((e=>t=e),r.ref);"function"==typeof n&&n(e)}},o))}})}function O$(e={}){const[t,n]=yR({value:()=>gN(e.open),defaultValue:()=>!!gN(e.defaultOpen),onChange:t=>e.onOpenChange?.(t)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var A$={};bR(A$,{Description:()=>hR,ErrorMessage:()=>fR,Item:()=>$$,ItemControl:()=>F$,ItemDescription:()=>I$,ItemIndicator:()=>q$,ItemInput:()=>z$,ItemLabel:()=>V$,Label:()=>B$,RadioGroup:()=>K$,Root:()=>U$});var N$=Ue();function _$(){const e=Ke(N$);if(void 0===e)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var R$=Ue();function L$(){const e=Ke(R$);if(void 0===e)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function $$(e){const t=dR(),n=_$(),r=J_({id:`${t.generateId("item")}-${bt()}`},e),[o,i]=gt(r,["value","disabled","onPointerDown"]),[s,a]=Me(),[l,c]=Me(),[u,d]=Me(),[h,f]=Me(),[p,m]=Me(!1),g=_e((()=>n.isSelectedValue(o.value))),y=_e((()=>o.disabled||t.isDisabled()||!1)),v=e=>{L_(e,o.onPointerDown),p()&&e.preventDefault()},b=_e((()=>({...t.dataset(),"data-disabled":y()?"":void 0,"data-checked":g()?"":void 0}))),x={value:()=>o.value,dataset:b,isSelected:g,isDisabled:y,inputId:s,labelId:l,descriptionId:u,inputRef:h,select:()=>n.setSelectedValue(o.value),generateId:D_((()=>i.id)),registerInput:iR(a),registerLabel:iR(c),registerDescription:iR(d),setIsFocused:m,setInputRef:f};return ut(R$.Provider,{value:x,get children(){return ut(lR,mt({as:"div",role:"group",onPointerDown:v},b,i))}})}function F$(e){const t=L$(),n=J_({id:t.generateId("control")},e),[r,o]=gt(n,["onClick","onKeyDown"]);return ut(lR,mt({as:"div",onClick:e=>{L_(e,r.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:e=>{L_(e,r.onKeyDown),e.key===A_.Space&&(t.select(),t.inputRef()?.focus())}},(()=>t.dataset()),o))}function I$(e){const t=L$(),n=J_({id:t.generateId("description")},e);return Ne((()=>Ie(t.registerDescription(n.id)))),ut(lR,mt({as:"div"},(()=>t.dataset()),n))}function q$(e){const t=L$(),n=J_({id:t.generateId("indicator")},e),[r,o]=gt(n,["ref","forceMount"]),[i,s]=Me(),{present:a}=QR({show:()=>r.forceMount||t.isSelected(),element:()=>i()??null});return ut(kt,{get when(){return a()},get children(){return ut(lR,mt({as:"div",ref(e){const t=c_(s,r.ref);"function"==typeof t&&t(e)}},(()=>t.dataset()),o))}})}function z$(e){const t=dR(),n=_$(),r=L$(),o=J_({id:r.generateId("input")},e),[i,s]=gt(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),[a,l]=Me(!1);return Ne($e([()=>r.isSelected(),()=>r.value()],(e=>{if(!e[0]&&e[1]===r.value())return;l(!0);const t=r.inputRef();t?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}),{defer:!0})),Ne((()=>Ie(r.registerInput(s.id)))),ut(lR,mt({as:"input",ref(e){const t=c_(r.setInputRef,i.ref);"function"==typeof t&&t(e)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return C_({...oR},i.style)},get"aria-labelledby"(){return[i["aria-labelledby"],r.labelId(),null!=i["aria-labelledby"]&&null!=s["aria-label"]?s.id:void 0].filter(Boolean).join(" ")||void 0},get"aria-describedby"(){return[i["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0},onChange:e=>{if(L_(e,i.onChange),e.stopPropagation(),!a()){n.setSelectedValue(r.value());e.target.checked=r.isSelected()}l(!1)},onFocus:e=>{L_(e,i.onFocus),r.setIsFocused(!0)},onBlur:e=>{L_(e,i.onBlur),r.setIsFocused(!1)}},(()=>r.dataset()),s))}function V$(e){const t=L$(),n=J_({id:t.generateId("label")},e);return Ne((()=>Ie(t.registerLabel(n.id)))),ut(lR,mt({as:"label",get for(){return t.inputId()}},(()=>t.dataset()),n))}function B$(e){return ut(pR,mt({as:"span"},e))}function U$(e){let t;const n=J_({id:`radiogroup-${bt()}`,orientation:"vertical"},e),[r,o,i]=gt(n,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],cR),[s,a]=gR({value:()=>r.value,defaultValue:()=>r.defaultValue,onChange:e=>r.onChange?.(e)}),{formControlContext:l}=function(e){const t=J_({id:`form-control-${bt()}`},e),[n,r]=Me(),[o,i]=Me(),[s,a]=Me(),[l,c]=Me();return{formControlContext:{name:()=>gN(t.name)??gN(t.id),dataset:_e((()=>({"data-valid":"valid"===gN(t.validationState)?"":void 0,"data-invalid":"invalid"===gN(t.validationState)?"":void 0,"data-required":gN(t.required)?"":void 0,"data-disabled":gN(t.disabled)?"":void 0,"data-readonly":gN(t.readOnly)?"":void 0}))),validationState:()=>gN(t.validationState),isRequired:()=>gN(t.required),isDisabled:()=>gN(t.disabled),isReadOnly:()=>gN(t.readOnly),labelId:n,fieldId:o,descriptionId:s,errorMessageId:l,getAriaLabelledBy:(e,t,r)=>{const o=null!=r||null!=n();return[r,n(),o&&null!=t?e:void 0].filter(Boolean).join(" ")||void 0},getAriaDescribedBy:e=>[s(),l(),e].filter(Boolean).join(" ")||void 0,generateId:D_((()=>gN(t.id))),registerLabel:iR(r),registerField:iR(i),registerDescription:iR(a),registerErrorMessage:iR(c)}}}(o);mR((()=>t),(()=>a(r.defaultValue??"")));const c=()=>l.getAriaDescribedBy(r["aria-describedby"]),u=e=>e===s(),d={ariaDescribedBy:c,isSelectedValue:u,setSelectedValue:e=>{if(!l.isReadOnly()&&!l.isDisabled()&&(a(e),t))for(const n of t.querySelectorAll("[type='radio']")){n.checked=u(n.value)}}};return ut(uR.Provider,{value:l,get children(){return ut(N$.Provider,{value:d,get children(){return ut(lR,mt({as:"div",ref(e){const n=c_((e=>t=e),r.ref);"function"==typeof n&&n(e)},role:"radiogroup",get id(){return gN(o.id)},get"aria-invalid"(){return"invalid"===l.validationState()||void 0},get"aria-required"(){return l.isRequired()||void 0},get"aria-disabled"(){return l.isDisabled()||void 0},get"aria-readonly"(){return l.isReadOnly()||void 0},get"aria-orientation"(){return r.orientation},get"aria-labelledby"(){return l.getAriaLabelledBy(gN(o.id),i["aria-label"],r["aria-labelledby"])},get"aria-describedby"(){return c()}},(()=>l.dataset()),i))}})}})}var K$=Object.assign(U$,{Description:hR,ErrorMessage:fR,Item:$$,ItemControl:F$,ItemDescription:I$,ItemIndicator:q$,ItemInput:z$,ItemLabel:V$,Label:B$}),H$=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;null!=t;){const e=this.collection().getItem(t);if(e&&"item"===e.type&&!e.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;null!=t;){const e=this.collection().getItem(t);if(e&&"item"===e.type&&!e.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;null!=e;){const t=this.collection().getItem(e);if(t&&"item"===t.type&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;null!=e;){const t=this.collection().getItem(e);if(t&&"item"===t.type&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=null!=o?this.getItem(o):null;return o}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=null!=o?this.getItem(o):null;return o}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let r=null!=t?this.getKeyBelow(t):this.getFirstKey();for(;null!=r;){const t=this.collection().getItem(r);if(t){const o=t.textValue.slice(0,e.length);if(t.textValue&&0===n.compare(o,e))return r}r=this.getKeyBelow(r)}}};function W$(e,t,n){const r=function(e){const{locale:t}=$R(),n=_e((()=>t()+(e?Object.entries(e).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"")));return _e((()=>{const r=n();let o;return FR.has(r)&&(o=FR.get(r)),o||(o=new Intl.Collator(t(),e),FR.set(r,o)),o}))}({usage:"search",sensitivity:"base"});return UR({selectionManager:()=>gN(e.selectionManager),keyboardDelegate:_e((()=>{const n=gN(e.keyboardDelegate);return n||new H$(e.collection,t,r)})),autoFocus:()=>gN(e.autoFocus),deferAutoFocus:()=>gN(e.deferAutoFocus),shouldFocusWrap:()=>gN(e.shouldFocusWrap),disallowEmptySelection:()=>gN(e.disallowEmptySelection),selectOnFocus:()=>gN(e.selectOnFocus),disallowTypeAhead:()=>gN(e.disallowTypeAhead),shouldUseVirtualFocus:()=>gN(e.shouldUseVirtualFocus),allowsTabNavigation:()=>gN(e.allowsTabNavigation),isVirtualized:()=>gN(e.isVirtualized),scrollToKey:t=>gN(e.scrollToKey)?.(t),orientation:()=>gN(e.orientation)},t)}var G$="focusScope.autoFocusOnMount",Y$="focusScope.autoFocusOnUnmount",Q$={bubbles:!1,cancelable:!0},X$={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=E_(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=E_(this.stack,e),this.active()?.resume()}};function J$(e,t){const[n,r]=Me(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=t=>e.onMountAutoFocus?.(t),a=t=>e.onUnmountAutoFocus?.(t),l=()=>M_(t()),c=()=>{const e=l().createElement("span");return e.setAttribute("data-focus-trap",""),e.tabIndex=0,Object.assign(e.style,oR),e},u=()=>{const e=t();return e?K_(e,!0).filter((e=>!e.hasAttribute("data-focus-trap"))):[]},d=()=>{const e=u();return e.length>0?e[0]:null};Ne((()=>{const e=t();if(!e)return;X$.add(o);const n=T_(e);if(!j_(e,n)){const t=new CustomEvent(G$,Q$);e.addEventListener(G$,s),e.dispatchEvent(t),t.defaultPrevented||setTimeout((()=>{I_(d()),T_(e)===n&&I_(e)}),0)}Ie((()=>{e.removeEventListener(G$,s),setTimeout((()=>{const r=new CustomEvent(Y$,Q$);(()=>{const e=t();if(!e)return!1;const n=T_(e);return!!n&&!j_(e,n)&&W_(n)})()&&r.preventDefault(),e.addEventListener(Y$,a),e.dispatchEvent(r),r.defaultPrevented||I_(n??l().body),e.removeEventListener(Y$,a),X$.remove(o)}),0)}))})),Ne((()=>{const r=t();if(!r||!gN(e.trapFocus)||n())return;const o=e=>{const t=e.target;t?.closest(`[${XR}]`)||(j_(r,t)?i=t:I_(i))},s=e=>{const t=e.relatedTarget??T_(r);t?.closest(`[${XR}]`)||j_(r,t)||I_(i)};l().addEventListener("focusin",o),l().addEventListener("focusout",s),Ie((()=>{l().removeEventListener("focusin",o),l().removeEventListener("focusout",s)}))})),Ne((()=>{const r=t();if(!r||!gN(e.trapFocus)||n())return;const o=c();r.insertAdjacentElement("afterbegin",o);const i=c();function s(e){const t=d(),n=(()=>{const e=u();return e.length>0?e[e.length-1]:null})();I_(e.relatedTarget===t?n:t)}r.insertAdjacentElement("beforeend",i),o.addEventListener("focusin",s),i.addEventListener("focusin",s);const a=new MutationObserver((e=>{for(const t of e)t.previousSibling===i&&(i.remove(),r.insertAdjacentElement("beforeend",i)),t.nextSibling===o&&(o.remove(),r.insertAdjacentElement("afterbegin",o))}));a.observe(r,{childList:!0,subtree:!1}),Ie((()=>{o.removeEventListener("focusin",s),i.removeEventListener("focusin",s),o.remove(),i.remove(),a.disconnect()}))}))}var Z$="data-live-announcer";function eF(e){Ne((()=>{gN(e.isDisabled)||Ie(function(e,t=document.body){const n=new Set(e),r=new Set,o=e=>{for(const r of e.querySelectorAll(`[${Z$}], [${XR}]`))n.add(r);const t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(const t of n)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),s=t(e);if(s===NodeFilter.FILTER_ACCEPT&&i(e),s!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)i(e),e=o.nextNode()}},i=e=>{const t=tF.get(e)??0;"true"===e.getAttribute("aria-hidden")&&0===t||(0===t&&e.setAttribute("aria-hidden","true"),r.add(e),tF.set(e,t+1))};nF.length&&nF[nF.length-1].disconnect();o(t);const s=new MutationObserver((e=>{for(const t of e)if("childList"===t.type&&0!==t.addedNodes.length&&![...n,...r].some((e=>e.contains(t.target)))){for(const e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(const e of t.addedNodes)!(e instanceof HTMLElement||e instanceof SVGElement)||"true"!==e.dataset.liveAnnouncer&&"true"!==e.dataset.reactAriaTopLayer?e instanceof Element&&o(e):n.add(e)}}));s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return nF.push(a),()=>{s.disconnect();for(const e of r){const t=tF.get(e);if(null==t)return;1===t?(e.removeAttribute("aria-hidden"),tF.delete(e)):tF.set(e,t-1)}a===nF[nF.length-1]?(nF.pop(),nF.length&&nF[nF.length-1].observe()):nF.splice(nF.indexOf(a),1)}}(gN(e.targets),gN(e.root)))}))}var tF=new WeakMap,nF=[];var rF=new Map,oF=e=>{Ne((()=>{const t=YR(e.style)??{},n=YR(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=rF.get(e.key);o?o.activeCount++:rF.set(e.key,{activeCount:1,originalStyles:r,properties:n.map((e=>e.key))}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);Ie((()=>{const t=rF.get(e.key);if(t)if(1===t.activeCount){rF.delete(e.key);for(const[n,r]of Object.entries(t.originalStyles))e.element.style[n]=r;for(const n of t.properties)e.element.style.removeProperty(n);0===e.element.style.length&&e.element.removeAttribute("style"),e.cleanup?.()}else t.activeCount--}))}))},iF=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},sF=(e,t)=>{const n=getComputedStyle(e),r="x"===t?n.overflowX:n.overflowY;return"auto"===r||"scroll"===r||"HTML"===e.tagName&&"visible"===r},[aF,lF]=Me([]),cF=e=>[e.deltaX,e.deltaY],uF=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],dF=(e,t,n,r)=>{const o=null!==r&&hF(r,e),[i,s]=((e,t,n)=>{const r="x"===t&&"rtl"===window.getComputedStyle(e).direction?-1:1;let o=e,i=0,s=0,a=!1;do{const[e,l,c]=iF(o,t),u=c-e-r*l;0===l&&0===u||!sF(o,t)||(i+=u,s+=l),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]})(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1)&&!(n<0&&Math.abs(s)<1)},hF=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},fF=e=>{const t=mt({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=bt();let r=[0,0],o=null,i=null;Ne((()=>{YR(t.enabled)&&(lF((e=>[...e,n])),Ie((()=>{lF((e=>e.filter((e=>e!==n))))})))})),Ne((()=>{if(!YR(t.enabled)||!YR(t.hideScrollbar))return;const{body:e}=document,n=window.innerWidth-e.offsetWidth;if(YR(t.preventScrollbarShift)){const r={overflow:"hidden"},o=[];n>0&&("padding"===YR(t.preventScrollbarShiftMode)?r.paddingRight=`calc(${window.getComputedStyle(e).paddingRight} + ${n}px)`:r.marginRight=`calc(${window.getComputedStyle(e).marginRight} + ${n}px)`,o.push({key:"--scrollbar-width",value:`${n}px`}));const i=window.scrollY,s=window.scrollX;oF({key:"prevent-scroll",element:e,style:r,properties:o,cleanup:()=>{YR(t.restoreScrollPosition)&&n>0&&window.scrollTo(s,i)}})}else oF({key:"prevent-scroll",element:e,style:{overflow:"hidden"}})})),Ne((()=>{var e;(e=n,aF().indexOf(e)===aF().length-1&&YR(t.enabled))&&(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),Ie((()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)})))}));const s=e=>{r=uF(e),o=null,i=null},a=e=>{const n=e.target,r=YR(t.element),o=cF(e),i=Math.abs(o[0])>Math.abs(o[1])?"x":"y",s=dF(n,i,"x"===i?o[0]:o[1],r);let a;a=!r||!hF(r,n)||!s,a&&e.cancelable&&e.preventDefault()},l=e=>{const n=YR(t.element),s=e.target;let a;if(2===e.touches.length)a=!YR(t.allowPinchZoom);else{if(null==o||null===i){const t=uF(e).map(((e,t)=>r[t]-e)),n=Math.abs(t[0])>Math.abs(t[1])?"x":"y";o=n,i="x"===n?t[0]:t[1]}if("range"===s.type)a=!1;else{const e=dF(s,o,i,n);a=!n||!hF(n,s)||!e}}a&&e.cancelable&&e.preventDefault()}},pF=Ue();function mF(){return Ke(pF)}function gF(){const e=mF();if(void 0===e)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var yF=Ue();function vF(){const e=Ke(yF);if(void 0===e)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var bF=Ue();function xF(){const e=Ke(bF);if(void 0===e)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function wF(e){let t;const n=xF(),r=gF(),o=J_({id:n.generateId(`item-${bt()}`)},e),[i,s]=gt(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=Me(),[c,u]=Me(),[d,h]=Me(),f=()=>r.listState().selectionManager(),p=()=>s.id,m=()=>{i.onSelect?.(),i.closeOnSelect&&setTimeout((()=>{r.close(!0)}))};PR({getItem:()=>({ref:()=>t,type:"item",key:p(),textValue:i.textValue??d()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const g=KR({key:p,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},(()=>t)),y=e=>{L_(e,i.onPointerMove),"mouse"===e.pointerType&&(i.disabled?r.onItemLeave(e):(r.onItemEnter(e),e.defaultPrevented||(I_(e.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},v=e=>{L_(e,i.onPointerLeave),"mouse"===e.pointerType&&r.onItemLeave(e)},b=e=>{L_(e,i.onPointerUp),i.disabled||0!==e.button||m()},x=e=>{if(L_(e,i.onKeyDown),!e.repeat&&!i.disabled)switch(e.key){case"Enter":case" ":m()}},w=_e((()=>i.indeterminate?"mixed":null!=i.checked?i.checked:void 0)),S=_e((()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":f().focusedKey()===p()?"":void 0}))),k={isChecked:()=>i.checked,dataset:S,setLabelRef:h,generateId:D_((()=>s.id)),registerLabel:iR(l),registerDescription:iR(u)};return ut(yF.Provider,{value:k,get children(){return ut(lR,mt({as:"div",ref(e){const n=c_((e=>t=e),i.ref);"function"==typeof n&&n(e)},get tabIndex(){return g.tabIndex()},get"aria-checked"(){return w()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return g.dataKey()},get onPointerDown(){return $_([i.onPointerDown,g.onPointerDown])},get onPointerUp(){return $_([b,g.onPointerUp])},get onClick(){return $_([i.onClick,g.onClick])},get onKeyDown(){return $_([x,g.onKeyDown])},get onMouseDown(){return $_([i.onMouseDown,g.onMouseDown])},get onFocus(){return $_([i.onFocus,g.onFocus])},onPointerMove:y,onPointerLeave:v},S,s))}})}function SF(e){const t=J_({closeOnSelect:!1},e),[n,r]=gt(t,["checked","defaultChecked","onChange","onSelect"]),o=function(e={}){const[t,n]=yR({value:()=>gN(e.isSelected),defaultValue:()=>!!gN(e.defaultIsSelected),onChange:t=>e.onSelectedChange?.(t)});return{isSelected:t,setIsSelected:t=>{gN(e.isReadOnly)||gN(e.isDisabled)||n(t)},toggle:()=>{gN(e.isReadOnly)||gN(e.isDisabled)||n(!t())}}}({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:e=>n.onChange?.(e),isDisabled:()=>r.disabled});return ut(wF,mt({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{n.onSelect?.(),o.toggle()}},r))}var kF=Ue();function CF(){return Ke(kF)}var EF={next:(e,t)=>"ltr"===e?"horizontal"===t?"ArrowRight":"ArrowDown":"horizontal"===t?"ArrowLeft":"ArrowUp",previous:(e,t)=>EF.next("ltr"===e?"rtl":"ltr",t)},PF=e=>"horizontal"===e?"ArrowDown":"ArrowRight",DF=e=>"horizontal"===e?"ArrowUp":"ArrowLeft";function jF(e){const t=xF(),n=gF(),r=CF(),{direction:o}=$R(),i=J_({id:t.generateId("trigger")},e),[s,a]=gt(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();void 0!==r&&(l=()=>t.value()??s.id,void 0===r.lastValue()&&r.setLastValue(l));const c=sR((()=>n.triggerRef()),(()=>"button")),u=_e((()=>"a"===c()&&null!=n.triggerRef()?.getAttribute("href")));Ne($e((()=>r?.value()),(e=>{u()&&e===l()&&n.triggerRef()?.focus()})));const d=()=>{void 0!==r?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)};return Ne((()=>Ie(n.registerTriggerId(s.id)))),ut(sL,mt({ref(e){const t=c_(n.setTriggerRef,s.ref);"function"==typeof t&&t(e)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return _e((()=>!!n.isOpen()))()?n.contentId():void 0},get"data-highlighted"(){return void 0!==l()&&r?.value()===l()||void 0},get tabIndex(){return void 0!==r?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:e=>{L_(e,s.onPointerDown),e.currentTarget.dataset.pointerType=e.pointerType,s.disabled||"touch"===e.pointerType||0!==e.button||d()},onMouseOver:e=>{L_(e,s.onMouseOver),"touch"!==n.triggerRef()?.dataset.pointerType&&(s.disabled||void 0===r||void 0===r.value()||r.setValue(l))},onClick:e=>{L_(e,s.onClick),s.disabled||"touch"===e.currentTarget.dataset.pointerType&&d()},onKeyDown:e=>{if(L_(e,s.onKeyDown),!s.disabled){if(u())switch(e.key){case"Enter":case" ":return}switch(e.key){case"Enter":case" ":case PF(t.orientation()):e.stopPropagation(),e.preventDefault(),function(e){if(document.contains(e)){const t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let n=Y_(e);for(;e&&n&&e!==t&&n!==t;)nR(n,e),n=Y_(e=n)}else{const{left:t,top:n}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:r,top:o}=e.getBoundingClientRect();(Math.abs(t-r)>1||Math.abs(n-o)>1)&&e.scrollIntoView?.({block:"nearest"})}}}(e.currentTarget),n.open("first"),r?.setAutoFocusMenu(!0),r?.setValue(l);break;case DF(t.orientation()):e.stopPropagation(),e.preventDefault(),n.open("last");break;case EF.next(o(),t.orientation()):if(void 0===r)break;e.stopPropagation(),e.preventDefault(),r.nextMenu();break;case EF.previous(o(),t.orientation()):if(void 0===r)break;e.stopPropagation(),e.preventDefault(),r.previousMenu()}}},onFocus:e=>{L_(e,s.onFocus),void 0!==r&&"touch"!==e.currentTarget.dataset.pointerType&&r.setValue(l)},role:void 0!==r?"menuitem":void 0},(()=>n.dataset()),a))}var TF=Ue();function MF(){return Ke(TF)}function OF(e){let t;const n=xF(),r=gF(),o=CF(),i=MF(),{direction:s}=$R(),a=J_({id:n.generateId(`content-${bt()}`)},e),[l,c]=gt(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>null==r.parentMenuContext()&&void 0===o&&n.isModal(),h=W$({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>"horizontal"===n.orientation()?"vertical":"horizontal"},(()=>t));J$({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:e=>{void 0===o&&l.onOpenAutoFocus?.(e)},onUnmountAutoFocus:l.onCloseAutoFocus},(()=>t));const f=e=>{l.onEscapeKeyDown?.(e),o?.setAutoFocusMenu(!1),r.close(!0)},p=e=>{l.onFocusOutside?.(e),n.isModal()&&e.preventDefault()};Ne((()=>Ie(r.registerContentId(l.id))));const m={ref:c_((e=>{r.setContentRef(e),t=e}),l.ref),role:"menu",get id(){return l.id},get tabIndex(){return h.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:$_([l.onKeyDown,h.onKeyDown,e=>{if(j_(e.currentTarget,e.target)&&("Tab"===e.key&&r.isOpen()&&e.preventDefault(),void 0!==o&&"true"!==e.currentTarget.getAttribute("aria-haspopup")))switch(e.key){case EF.next(s(),n.orientation()):e.stopPropagation(),e.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case EF.previous(s(),n.orientation()):if(e.currentTarget.hasAttribute("data-closed"))break;e.stopPropagation(),e.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu()}}]),onMouseDown:$_([l.onMouseDown,h.onMouseDown]),onFocusIn:$_([l.onFocusIn,h.onFocusIn]),onFocusOut:$_([l.onFocusOut,h.onFocusOut]),onPointerEnter:e=>{L_(e,l.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},onPointerMove:e=>{if(L_(e,l.onPointerMove),"mouse"!==e.pointerType)return;const t=u!==e.clientX;j_(e.currentTarget,e.target)&&t&&(r.setPointerDir(e.clientX>u?"right":"left"),u=e.clientX)},get"data-orientation"(){return n.orientation()}};return ut(kt,{get when(){return r.contentPresent()},get children(){return ut(kt,{get when(){return void 0===i||null!=r.parentMenuContext()},get fallback(){return ut(lR,mt({as:"div"},(()=>r.dataset()),m,c))},get children(){return ut(P$.Positioner,{get children(){return ut(M$,mt({get disableOutsidePointerEvents(){return _e((()=>!!d()))()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return C_({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:f,onFocusOutside:p,get onDismiss(){return r.close}},(()=>r.dataset()),m,c))}})}})}})}function AF(e){let t;const n=xF(),r=gF(),[o,i]=gt(e,["ref"]);return fF({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),ut(OF,mt({ref(e){const n=c_((e=>{t=e}),o.ref);"function"==typeof n&&n(e)}},i))}var NF=Ue();function _F(e){const t=J_({id:xF().generateId(`group-${bt()}`)},e),[n,r]=Me(),o={generateId:D_((()=>t.id)),registerLabelId:iR(r)};return ut(NF.Provider,{value:o,get children(){return ut(lR,mt({as:"div",role:"group",get"aria-labelledby"(){return n()}},t))}})}function RF(e){const t=function(){const e=Ke(NF);if(void 0===e)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}(),n=J_({id:t.generateId("label")},e),[r,o]=gt(n,["id"]);return Ne((()=>Ie(t.registerLabelId(r.id)))),ut(lR,mt({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function LF(e){const t=gF();return ut(lR,mt({as:"span","aria-hidden":"true"},(()=>t.dataset()),J_({children:"▼"},e)))}function $F(e){return ut(wF,mt({role:"menuitem",closeOnSelect:!0},e))}function FF(e){const t=vF(),n=J_({id:t.generateId("description")},e),[r,o]=gt(n,["id"]);return Ne((()=>Ie(t.registerDescription(r.id)))),ut(lR,mt({as:"div",get id(){return r.id}},(()=>t.dataset()),o))}function IF(e){const t=vF(),n=J_({id:t.generateId("indicator")},e),[r,o]=gt(n,["forceMount"]);return ut(kt,{get when(){return r.forceMount||t.isChecked()},get children(){return ut(lR,mt({as:"div"},(()=>t.dataset()),o))}})}function qF(e){const t=vF(),n=J_({id:t.generateId("label")},e),[r,o]=gt(n,["ref","id"]);return Ne((()=>Ie(t.registerLabel(r.id)))),ut(lR,mt({as:"div",ref(e){const n=c_(t.setLabelRef,r.ref);"function"==typeof n&&n(e)},get id(){return r.id}},(()=>t.dataset()),o))}function zF(e){const t=gF();return ut(kt,{get when(){return t.contentPresent()},get children(){return ut(Zt,e)}})}var VF=Ue();function BF(e){const t=J_({id:xF().generateId(`radiogroup-${bt()}`)},e),[n,r]=gt(t,["value","defaultValue","onChange","disabled"]),[o,i]=gR({value:()=>n.value,defaultValue:()=>n.defaultValue,onChange:e=>n.onChange?.(e)});return ut(VF.Provider,{value:{isDisabled:()=>n.disabled,isSelectedValue:e=>e===o(),setSelectedValue:i},get children(){return ut(_F,r)}})}function UF(e){const t=function(){const e=Ke(VF);if(void 0===e)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}(),n=J_({closeOnSelect:!1},e),[r,o]=gt(n,["value","onSelect"]);return ut(wF,mt({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{r.onSelect?.(),t.setSelectedValue(r.value)}},o))}function KF(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top])}return i}function HF(e){const t=xF(),n=wR(),r=mF(),o=CF(),i=MF(),s=J_({placement:"horizontal"===t.orientation()?"bottom-start":"right-start"},e),[a,l]=gt(s,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[h,f]=Me(),[p,m]=Me(),[g,y]=Me(),[v,b]=Me(),[x,w]=Me(!0),[S,k]=Me(l.placement),[C,E]=Me([]),[P,D]=Me([]),{DomCollectionProvider:j}=ER({items:P,onItemsChange:D}),T=O$({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:e=>a.onOpenChange?.(e)}),{present:M}=QR({show:()=>t.forceMount()||T.isOpen(),element:()=>v()??null}),O=function(e){const t=BR(e),n=jR({dataSource:()=>gN(e.dataSource),getKey:()=>gN(e.getKey),getTextValue:()=>gN(e.getTextValue),getDisabled:()=>gN(e.getDisabled),getSectionChildren:()=>gN(e.getSectionChildren),factory:t=>new WR(e.filter?e.filter(t):t)},[()=>e.filter]),r=new HR(n,t);return Oe((()=>{const e=t.focusedKey();null==e||n().getItem(e)||t.setFocusedKey(void 0)})),{collection:n,selectionManager:()=>r}}({selectionMode:"none",dataSource:P}),A=e=>{w(e),T.open()},N=(e=!1)=>{T.close(),e&&r&&r.close(!0)},_=()=>{const e=v();e&&(I_(e),O.selectionManager().setFocused(!0),O.selectionManager().setFocusedKey(void 0))},R=()=>{null!=i?setTimeout((()=>_())):_()},L=e=>{return d===u?.side&&(t=e,n=u?.area,!!n&&function(e,t){const[n,r]=e;let o=!1;for(let i=t.length,s=0,a=i-1;s<i;a=s++){const[e,l]=t[s],[c,u]=t[a],[,d]=t[0===a?i-1:a-1]||[0,0],h=(l-u)*(n-e)-(e-c)*(r-l);if(u<l){if(r>=u&&r<l){if(0===h)return!0;h>0&&(r===u?r>d&&(o=!o):o=!o)}}else if(l<u){if(r>l&&r<=u){if(0===h)return!0;h<0&&(r===u?r<d&&(o=!o):o=!o)}}else if(r==l&&(n>=c&&n<=e||n>=e&&n<=c))return!0}return o}([t.clientX,t.clientY],n));var t,n};eF({isDisabled:()=>!(null==r&&T.isOpen()&&t.isModal()),targets:()=>[v(),...C()].filter(Boolean)}),Ne((()=>{const e=v();if(!e||!r)return;const t=r.registerNestedMenu(e);Ie((()=>{t()}))})),Ne((()=>{void 0===r&&o?.registerMenu(t.value(),[v(),...C()])})),Ne((()=>{void 0===r&&void 0!==o&&(o.value()===t.value()?(g()?.focus(),o.autoFocusMenu()&&A(!0)):N())})),Ne((()=>{void 0===r&&void 0!==o&&T.isOpen()&&o.setValue(t.value())})),Ie((()=>{void 0===r&&o?.unregisterMenu(t.value())}));const $={dataset:_e((()=>({"data-expanded":T.isOpen()?"":void 0,"data-closed":T.isOpen()?void 0:""}))),isOpen:T.isOpen,contentPresent:M,nestedMenus:C,currentPlacement:S,pointerGraceTimeoutId:()=>c,autoFocus:x,listState:()=>O,parentMenuContext:()=>r,triggerRef:g,contentRef:v,triggerId:h,contentId:p,setTriggerRef:y,setContentRef:b,open:A,close:N,toggle:e=>{w(e),T.toggle()},focusContent:R,onItemEnter:e=>{L(e)&&e.preventDefault()},onItemLeave:e=>{L(e)||R()},onTriggerLeave:e=>{L(e)&&e.preventDefault()},setPointerDir:e=>d=e,setPointerGraceTimeoutId:e=>c=e,setPointerGraceIntent:e=>u=e,registerNestedMenu:e=>{E((t=>[...t,e]));const t=r?.registerNestedMenu(e);return()=>{E((t=>E_(t,e))),t?.()}},registerItemToParentDomCollection:n?.registerItem,registerTriggerId:iR(f),registerContentId:iR(m)};return ut(j,{get children(){return ut(pF.Provider,{value:$,get children(){return ut(kt,{when:void 0===i,get fallback(){return l.children},get children(){return ut(P$,mt({anchorRef:g,contentRef:v,onCurrentPlacementChange:k},l))}})}})}})}function WF(e){const{direction:t}=$R();return ut(HF,mt({get placement(){return"rtl"===t()?"left-start":"right-start"},flip:!0},e))}var GF=(e,t)=>"ltr"===e?["horizontal"===t?"ArrowLeft":"ArrowUp"]:["horizontal"===t?"ArrowRight":"ArrowDown"];function YF(e){const t=gF(),n=xF(),[r,o]=gt(e,["onFocusOutside","onKeyDown"]),{direction:i}=$R();return ut(OF,mt({onOpenAutoFocus:e=>{e.preventDefault()},onCloseAutoFocus:e=>{e.preventDefault()},onFocusOutside:e=>{r.onFocusOutside?.(e);const n=e.target;j_(t.triggerRef(),n)||t.close()},onKeyDown:e=>{L_(e,r.onKeyDown);const o=j_(e.currentTarget,e.target),s=GF(i(),n.orientation()).includes(e.key),a=null!=t.parentMenuContext();o&&s&&a&&(t.close(),I_(t.triggerRef()))}},o))}var QF=["Enter"," "],XF=(e,t)=>"ltr"===e?[...QF,"horizontal"===t?"ArrowRight":"ArrowDown"]:[...QF,"horizontal"===t?"ArrowLeft":"ArrowUp"];function JF(e){let t;const n=xF(),r=gF(),o=J_({id:n.generateId(`sub-trigger-${bt()}`)},e),[i,s]=gt(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=$R(),u=()=>i.id,d=()=>{const e=r.parentMenuContext();if(null==e)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return e.listState().selectionManager()},h=KR({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},(()=>t)),f=e=>{L_(e,i.onClick),r.isOpen()||i.disabled||r.open(!0)},p=e=>{L_(e,i.onKeyDown),e.repeat||i.disabled||XF(c(),n.orientation()).includes(e.key)&&(e.stopPropagation(),e.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(r.listState().collection().getFirstKey()))};return Ne((()=>{if(null==r.registerItemToParentDomCollection)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");Ie(r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:i.textValue??t?.textContent??"",disabled:i.disabled??!1}))})),Ne($e((()=>r.parentMenuContext()?.pointerGraceTimeoutId()),(e=>{Ie((()=>{window.clearTimeout(e),r.parentMenuContext()?.setPointerGraceIntent(null)}))}))),Ne((()=>Ie(r.registerTriggerId(i.id)))),Ie((()=>{l()})),ut(lR,mt({as:"div",ref(e){const n=c_((e=>{r.setTriggerRef(e),t=e}),i.ref);"function"==typeof n&&n(e)},get id(){return i.id},role:"menuitem",get tabIndex(){return h.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return _e((()=>!!r.isOpen()))()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return h.dataKey()},get"data-highlighted"(){return d().focusedKey()===u()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return $_([i.onPointerDown,h.onPointerDown])},get onPointerUp(){return $_([i.onPointerUp,h.onPointerUp])},get onClick(){return $_([f,h.onClick])},get onKeyDown(){return $_([p,h.onKeyDown])},get onMouseDown(){return $_([i.onMouseDown,h.onMouseDown])},get onFocus(){return $_([i.onFocus,h.onFocus])},onPointerMove:e=>{if(L_(e,i.onPointerMove),"mouse"!==e.pointerType)return;const t=r.parentMenuContext();t?.onItemEnter(e),e.defaultPrevented||(i.disabled?t?.onItemLeave(e):(r.isOpen()||a||(r.parentMenuContext()?.setPointerGraceIntent(null),a=window.setTimeout((()=>{r.open(!1),l()}),100)),t?.onItemEnter(e),e.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),I_(e.currentTarget),t?.listState().selectionManager().setFocused(!0),t?.listState().selectionManager().setFocusedKey(u()))))},onPointerLeave:e=>{if(L_(e,i.onPointerLeave),"mouse"!==e.pointerType)return;l();const t=r.parentMenuContext(),n=r.contentRef();if(n){t?.setPointerGraceIntent({area:KF(r.currentPlacement(),e,n),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(t?.pointerGraceTimeoutId());const o=window.setTimeout((()=>{t?.setPointerGraceIntent(null)}),300);t?.setPointerGraceTimeoutId(o)}else{if(t?.onTriggerLeave(e),e.defaultPrevented)return;t?.setPointerGraceIntent(null)}t?.onItemLeave(e)}},(()=>r.dataset()),s))}function ZF(e){const t=CF(),n=J_({id:`menu-${bt()}`,modal:!0},e),[r,o]=gt(n,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),i=O$({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:e=>r.onOpenChange?.(e)}),s={isModal:()=>r.modal??!0,preventScroll:()=>r.preventScroll??s.isModal(),forceMount:()=>r.forceMount??!1,generateId:D_((()=>r.id)),value:()=>r.value,orientation:()=>r.orientation??t?.orientation()??"horizontal"};return ut(bF.Provider,{value:s,get children(){return ut(HF,mt({get open(){return i.isOpen()},get onOpenChange(){return i.setIsOpen}},o))}})}function eI(e){let t;const n=J_({orientation:"horizontal"},e),[r,o]=gt(n,["ref","orientation"]),i=sR((()=>t),(()=>"hr"));return ut(lR,mt({as:"hr",ref(e){const n=c_((e=>t=e),r.ref);"function"==typeof n&&n(e)},get role(){return"hr"!==i()?"separator":void 0},get"aria-orientation"(){return"vertical"===r.orientation?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}bR({},{Root:()=>eI,Separator:()=>tI});var tI=eI,nI={};function rI(e){const t=xF(),n=gF(),[r,o]=gt(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return ut(AF,mt({onCloseAutoFocus:e=>{r.onCloseAutoFocus?.(e),i||I_(n.triggerRef()),i=!1,e.preventDefault()},onInteractOutside:e=>{r.onInteractOutside?.(e),t.isModal()&&!e.detail.isContextMenu||(i=!0)}},o))}function oI(e){return ut(ZF,J_({id:`dropdownmenu-${bt()}`},e))}bR(nI,{Arrow:()=>S$,CheckboxItem:()=>SF,Content:()=>rI,DropdownMenu:()=>iI,Group:()=>_F,GroupLabel:()=>RF,Icon:()=>LF,Item:()=>$F,ItemDescription:()=>FF,ItemIndicator:()=>IF,ItemLabel:()=>qF,Portal:()=>zF,RadioGroup:()=>BF,RadioItem:()=>UF,Root:()=>oI,Separator:()=>eI,Sub:()=>WF,SubContent:()=>YF,SubTrigger:()=>JF,Trigger:()=>jF});var iI=Object.assign(oI,{Arrow:S$,CheckboxItem:SF,Content:rI,Group:_F,GroupLabel:RF,Icon:LF,Item:$F,ItemDescription:FF,ItemIndicator:IF,ItemLabel:qF,Portal:zF,RadioGroup:BF,RadioItem:UF,Separator:eI,Sub:WF,SubContent:YF,SubTrigger:JF,Trigger:jF}),sI={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},aI=Rt('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),lI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),cI=Rt('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),uI=Rt('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),dI=Rt('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),hI=Rt('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),fI=Rt('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),pI=Rt('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),mI=Rt('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),gI=Rt('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),yI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),vI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),bI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),xI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),wI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),SI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),kI=Rt('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),CI=Rt('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),EI=Rt('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),PI=Rt('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),DI=Rt('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),jI=Rt('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),TI=Rt('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function MI(){return aI()}function OI(){return lI()}function AI(){return cI()}function NI(){return uI()}function _I(){return dI()}function RI(){return(e=dI()).style.setProperty("transform","rotate(90deg)"),e;var e}function LI(){return(e=dI()).style.setProperty("transform","rotate(-90deg)"),e;var e}function $I(){return hI()}function FI(){return fI()}function II(){return pI()}function qI(){return mI()}function zI(){return gI()}function VI(){return yI()}function BI(){return vI()}function UI(){return bI()}function KI(){return xI()}function HI(e){return t=wI(),n=t.firstChild,Ae((()=>$t(n,"stroke","dark"===e.theme?"#12B76A":"#027A48"))),t;var t,n}function WI(){return SI()}function GI(){return kI()}function YI(e){return[ut(kt,{get when(){return e.checked},get children(){var t=wI(),n=t.firstChild;return Ae((()=>$t(n,"stroke","dark"===e.theme?"#9B8AFB":"#6938EF"))),t}}),ut(kt,{get when(){return!e.checked},get children(){var t=CI(),n=t.firstChild;return Ae((()=>$t(n,"stroke","dark"===e.theme?"#9B8AFB":"#6938EF"))),t}})]}function QI(){return EI()}function XI(){return PI()}function JI(){return DI()}function ZI(){return jI()}function eq(){const e=bt();return t=TI(),i=(o=(r=(n=t.firstChild).nextSibling).nextSibling).firstChild,a=(s=o.nextSibling).firstChild,u=(c=(l=s.nextSibling).nextSibling).firstChild,h=(d=c.nextSibling).firstChild,m=(p=(f=d.nextSibling).nextSibling).firstChild,y=(g=p.nextSibling).firstChild,x=(b=(v=g.nextSibling).nextSibling).firstChild,S=(w=b.nextSibling).firstChild,E=(C=(k=w.nextSibling).nextSibling).firstChild,D=(P=C.nextSibling).firstChild,M=(T=(j=P.nextSibling).nextSibling).firstChild,A=(O=T.nextSibling).firstChild,R=(_=(N=O.nextSibling).nextSibling).firstChild,$=(L=_.nextSibling).firstChild,q=(I=(F=L.nextSibling).firstChild.nextSibling.nextSibling.nextSibling).nextSibling,V=(z=F.nextSibling).firstChild,U=(B=z.nextSibling).firstChild,ie=(oe=(re=(ne=(te=(ee=(Z=(J=(X=(Q=(Y=(G=(W=(H=(K=B.nextSibling).firstChild).nextSibling).nextSibling.firstChild).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling,ae=(se=K.nextSibling).firstChild,ce=(le=se.nextSibling).firstChild,he=(de=(ue=le.nextSibling).firstChild).nextSibling,pe=(fe=ue.nextSibling).firstChild,ge=(me=fe.nextSibling).firstChild,Re=(_e=(Ne=(Ae=(Oe=(Me=(Te=(je=(De=(Pe=(Ee=(Ce=(ke=(Se=(we=(xe=(be=(ve=(ye=me.nextSibling).firstChild).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling).nextSibling,$t(n,"id",`a-${e}`),$t(r,"fill",`url(#a-${e})`),$t(i,"id",`am-${e}`),$t(s,"id",`b-${e}`),$t(a,"filter",`url(#am-${e})`),$t(l,"mask",`url(#b-${e})`),$t(u,"id",`ah-${e}`),$t(d,"id",`k-${e}`),$t(h,"filter",`url(#ah-${e})`),$t(f,"mask",`url(#k-${e})`),$t(m,"id",`ae-${e}`),$t(g,"id",`j-${e}`),$t(y,"filter",`url(#ae-${e})`),$t(v,"mask",`url(#j-${e})`),$t(x,"id",`ai-${e}`),$t(w,"id",`i-${e}`),$t(S,"filter",`url(#ai-${e})`),$t(k,"mask",`url(#i-${e})`),$t(E,"id",`aj-${e}`),$t(P,"id",`h-${e}`),$t(D,"filter",`url(#aj-${e})`),$t(j,"mask",`url(#h-${e})`),$t(M,"id",`ag-${e}`),$t(O,"id",`g-${e}`),$t(A,"filter",`url(#ag-${e})`),$t(N,"mask",`url(#g-${e})`),$t(R,"id",`af-${e}`),$t(L,"id",`f-${e}`),$t($,"filter",`url(#af-${e})`),$t(F,"mask",`url(#f-${e})`),$t(I,"id",`m-${e}`),$t(q,"fill",`url(#m-${e})`),$t(V,"id",`ak-${e}`),$t(B,"id",`e-${e}`),$t(U,"filter",`url(#ak-${e})`),$t(K,"mask",`url(#e-${e})`),$t(H,"id",`n-${e}`),$t(W,"fill",`url(#n-${e})`),$t(G,"id",`r-${e}`),$t(Y,"fill",`url(#r-${e})`),$t(Q,"id",`s-${e}`),$t(X,"fill",`url(#s-${e})`),$t(J,"id",`q-${e}`),$t(Z,"fill",`url(#q-${e})`),$t(ee,"id",`p-${e}`),$t(te,"fill",`url(#p-${e})`),$t(ne,"id",`o-${e}`),$t(re,"fill",`url(#o-${e})`),$t(oe,"id",`l-${e}`),$t(ie,"fill",`url(#l-${e})`),$t(ae,"id",`al-${e}`),$t(le,"id",`d-${e}`),$t(ce,"filter",`url(#al-${e})`),$t(ue,"mask",`url(#d-${e})`),$t(de,"id",`u-${e}`),$t(he,"fill",`url(#u-${e})`),$t(pe,"id",`ad-${e}`),$t(me,"id",`c-${e}`),$t(ge,"filter",`url(#ad-${e})`),$t(ye,"mask",`url(#c-${e})`),$t(ve,"id",`t-${e}`),$t(be,"fill",`url(#t-${e})`),$t(xe,"id",`v-${e}`),$t(we,"stroke",`url(#v-${e})`),$t(Se,"id",`aa-${e}`),$t(ke,"stroke",`url(#aa-${e})`),$t(Ce,"id",`w-${e}`),$t(Ee,"stroke",`url(#w-${e})`),$t(Pe,"id",`ac-${e}`),$t(De,"stroke",`url(#ac-${e})`),$t(je,"id",`ab-${e}`),$t(Te,"stroke",`url(#ab-${e})`),$t(Me,"id",`y-${e}`),$t(Oe,"stroke",`url(#y-${e})`),$t(Ae,"id",`x-${e}`),$t(Ne,"stroke",`url(#x-${e})`),$t(_e,"id",`z-${e}`),$t(Re,"stroke",`url(#z-${e})`),t;var t,n,r,o,i,s,a,l,c,u,d,h,f,p,m,g,y,v,b,x,w,S,k,C,E,P,D,j,T,M,O,A,N,_,R,L,$,F,I,q,z,V,B,U,K,H,W,G,Y,Q,X,J,Z,ee,te,ne,re,oe,ie,se,ae,le,ce,ue,de,he,fe,pe,me,ge,ye,ve,be,xe,we,Se,ke,Ce,Ee,Pe,De,je,Te,Me,Oe,Ae,Ne,_e,Re}var tq=Rt('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),nq=Rt('<button title="Copy object to clipboard">'),rq=Rt('<button title="Remove all items"aria-label="Remove all items">'),oq=Rt('<button title="Delete item"aria-label="Delete item">'),iq=Rt('<button title="Toggle value"aria-label="Toggle value">'),sq=Rt('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),aq=Rt("<div>"),lq=Rt("<div><button> <span></span> <span> "),cq=Rt("<input>"),uq=Rt("<span>"),dq=Rt("<div><span>:"),hq=Rt("<div><div><button> [<!>...<!>]");var fq=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n)));return o=tq(),Ae((()=>Ft(o,a_(r().expander,n`
|
|
35
|
+
transform: rotate(${e.expanded?90:0}deg);
|
|
36
|
+
`,e.expanded&&n`
|
|
37
|
+
& svg {
|
|
38
|
+
top: -1px;
|
|
66
39
|
}
|
|
67
|
-
|
|
68
|
-
|
|
40
|
+
`)))),o;var o},pq=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n))),[o,i]=Me("NoCopy");return It(s=nq(),"click","NoCopy"===o()?()=>{navigator.clipboard.writeText(Hn(e.value)).then((()=>{i("SuccessCopy"),setTimeout((()=>{i("NoCopy")}),1500)}),(e=>{i("ErrorCopy"),setTimeout((()=>{i("NoCopy")}),1500)}))}:void 0,!0),Vt(s,ut(Ct,{get children(){return[ut(Et,{get when(){return"NoCopy"===o()},get children(){return ut(UI,{})}}),ut(Et,{get when(){return"SuccessCopy"===o()},get children(){return ut(HI,{get theme(){return t()}})}}),ut(Et,{get when(){return"ErrorCopy"===o()},get children(){return ut(WI,{})}})]}})),Ae((e=>{var t=r().actionButton,n="NoCopy"===o()?"Copy object to clipboard":"SuccessCopy"===o()?"Object copied to clipboard":"Error copying object to clipboard";return t!==e.e&&Ft(s,e.e=t),n!==e.t&&$t(s,"aria-label",e.t=n),e}),{e:void 0,t:void 0}),s;var s},mq=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n))),o=TN().client;return(i=rq()).$$click=()=>{const t=or(e.activeQuery.state.data,e.dataPath,[]);o.setQueryData(e.activeQuery.queryKey,t)},Vt(i,ut(GI,{})),Ae((()=>Ft(i,r().actionButton))),i;var i},gq=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n))),o=TN().client;return(i=oq()).$$click=()=>{const t=ir(e.activeQuery.state.data,e.dataPath);o.setQueryData(e.activeQuery.queryKey,t)},Vt(i,ut(OI,{})),Ae((()=>Ft(i,a_(r().actionButton)))),i;var i},yq=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n))),o=TN().client;return(i=iq()).$$click=()=>{const t=or(e.activeQuery.state.data,e.dataPath,!e.value);o.setQueryData(e.activeQuery.queryKey,t)},Vt(i,ut(YI,{get theme(){return t()},get checked(){return e.value}})),Ae((()=>Ft(i,a_(r().actionButton,n`
|
|
41
|
+
width: ${sI.size[3.5]};
|
|
42
|
+
height: ${sI.size[3.5]};
|
|
43
|
+
`)))),i;var i};function vq(e){return Symbol.iterator in e}function bq(e){const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Sq(n):wq(n))),o=TN().client,[i,s]=Me((e.defaultExpanded||[]).includes(e.label)),[a,l]=Me([]),c=_e((()=>Array.isArray(e.value)?e.value.map(((e,t)=>({label:t.toString(),value:e}))):null!==e.value&&"object"==typeof e.value&&vq(e.value)&&"function"==typeof e.value[Symbol.iterator]?e.value instanceof Map?Array.from(e.value,(([e,t])=>({label:e,value:t}))):Array.from(e.value,((e,t)=>({label:t.toString(),value:e}))):"object"==typeof e.value&&null!==e.value?Object.entries(e.value).map((([e,t])=>({label:e,value:t}))):[])),u=_e((()=>Array.isArray(e.value)?"array":null!==e.value&&"object"==typeof e.value&&vq(e.value)&&"function"==typeof e.value[Symbol.iterator]?"Iterable":"object"==typeof e.value&&null!==e.value?"object":typeof e.value)),d=_e((()=>function(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}(c(),100))),h=e.dataPath??[];return Vt(f=aq(),ut(kt,{get when(){return d().length},get children(){return[(t=lq(),n=t.firstChild,o=n.firstChild,f=o.nextSibling,p=f.nextSibling.nextSibling,m=p.firstChild,n.$$click=()=>s((e=>!e)),Vt(n,ut(fq,{get expanded(){return i()}}),o),Vt(f,(()=>e.label)),Vt(p,(()=>"iterable"===String(u()).toLowerCase()?"(Iterable) ":""),m),Vt(p,(()=>c().length),m),Vt(p,(()=>c().length>1?"items":"item"),null),Vt(t,ut(kt,{get when(){return e.editable},get children(){var t=aq();return Vt(t,ut(pq,{get value(){return e.value}}),null),Vt(t,ut(kt,{get when(){return e.itemsDeletable&&void 0!==e.activeQuery},get children(){return ut(gq,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Vt(t,ut(kt,{get when(){return"array"===u()&&void 0!==e.activeQuery},get children(){return ut(mq,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Vt(t,ut(kt,{get when(){return _e((()=>!!e.onEdit))()&&!Kn(e.value).meta},get children(){var t=sq();return t.$$click=()=>{e.onEdit?.()},Vt(t,ut(KI,{})),Ae((()=>Ft(t,r().actionButton))),t}}),null),Ae((()=>Ft(t,r().actions))),t}}),null),Ae((e=>{var o=r().expanderButtonContainer,i=r().expanderButton,s=r().info;return o!==e.e&&Ft(t,e.e=o),i!==e.t&&Ft(n,e.t=i),s!==e.a&&Ft(p,e.a=s),e}),{e:void 0,t:void 0,a:void 0}),t),ut(kt,{get when(){return i()},get children(){return[ut(kt,{get when(){return 1===d().length},get children(){var t=aq();return Vt(t,ut(b_,{get each(){return c()},by:e=>e.label,children:t=>ut(bq,{get defaultExpanded(){return e.defaultExpanded},get label(){return t().label},get value(){return t().value},get editable(){return e.editable},get dataPath(){return[...h,t().label]},get activeQuery(){return e.activeQuery},get itemsDeletable(){return"array"===u()||"Iterable"===u()||"object"===u()}})})),Ae((()=>Ft(t,r().subEntry))),t}}),ut(kt,{get when(){return d().length>1},get children(){var t=aq();return Vt(t,ut(St,{get each(){return d()},children:(t,n)=>{return o=hq(),d=(u=(c=(s=(i=o.firstChild).firstChild).firstChild).nextSibling).nextSibling.nextSibling,s.$$click=()=>l((e=>e.includes(n)?e.filter((e=>e!==n)):[...e,n])),Vt(s,ut(fq,{get expanded(){return a().includes(n)}}),c),Vt(s,100*n,u),Vt(s,100*n+100-1,d),Vt(i,ut(kt,{get when(){return a().includes(n)},get children(){var n=aq();return Vt(n,ut(b_,{get each(){return t()},by:e=>e.label,children:t=>ut(bq,{get defaultExpanded(){return e.defaultExpanded},get label(){return t().label},get value(){return t().value},get editable(){return e.editable},get dataPath(){return[...h,t().label]},get activeQuery(){return e.activeQuery}})})),Ae((()=>Ft(n,r().subEntry))),n}}),null),Ae((e=>{var t=r().entry,n=r().expanderButton;return t!==e.e&&Ft(i,e.e=t),n!==e.t&&Ft(s,e.t=n),e}),{e:void 0,t:void 0}),o;var o,i,s,c,u,d}})),Ae((()=>Ft(t,r().subEntry))),t}})]}})];var t,n,o,f,p,m}}),null),Vt(f,ut(kt,{get when(){return 0===d().length},get children(){var t=dq(),n=t.firstChild;return Vt(n,(()=>e.label),n.firstChild),Vt(t,ut(kt,{get when(){return _e((()=>!(!e.editable||void 0===e.activeQuery)))()&&("string"===u()||"number"===u()||"boolean"===u())},get fallback(){return Vt(t=uq(),(()=>Yn(e.value))),Ae((()=>Ft(t,r().value))),t;var t},get children(){return[ut(kt,{get when(){return _e((()=>!(!e.editable||void 0===e.activeQuery)))()&&("string"===u()||"number"===u())},get children(){var t=cq();return t.addEventListener("change",(t=>{const n=or(e.activeQuery.state.data,h,"number"===u()?t.target.valueAsNumber:t.target.value);o.setQueryData(e.activeQuery.queryKey,n)})),Ae((e=>{var n="number"===u()?"number":"text",o=a_(r().value,r().editableInput);return n!==e.e&&$t(t,"type",e.e=n),o!==e.t&&Ft(t,e.t=o),e}),{e:void 0,t:void 0}),Ae((()=>t.value=e.value)),t}}),ut(kt,{get when(){return"boolean"===u()},get children(){var t=uq();return Vt(t,ut(yq,{get activeQuery(){return e.activeQuery},dataPath:h,get value(){return e.value}}),null),Vt(t,(()=>Yn(e.value)),null),Ae((()=>Ft(t,a_(r().value,r().actions,r().editableInput)))),t}})]}}),null),Vt(t,ut(kt,{get when(){return e.editable&&e.itemsDeletable&&void 0!==e.activeQuery},get children(){return ut(gq,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Ae((e=>{var o=r().row,i=r().label;return o!==e.e&&Ft(t,e.e=o),i!==e.t&&Ft(n,e.t=i),e}),{e:void 0,t:void 0}),t}}),null),Ae((()=>Ft(f,r().entry))),f;var f}var xq=(e,t)=>{const{colors:n,font:r,size:o,border:i}=sI,s=(t,n)=>"light"===e?t:n;return{entry:t`
|
|
44
|
+
& * {
|
|
45
|
+
font-size: ${r.size.xs};
|
|
46
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
47
|
+
'Liberation Mono', 'Courier New', monospace;
|
|
48
|
+
}
|
|
49
|
+
position: relative;
|
|
50
|
+
outline: none;
|
|
51
|
+
word-break: break-word;
|
|
52
|
+
`,subEntry:t`
|
|
53
|
+
margin: 0 0 0 0.5em;
|
|
54
|
+
padding-left: 0.75em;
|
|
55
|
+
border-left: 2px solid ${s(n.gray[300],n.darkGray[400])};
|
|
56
|
+
/* outline: 1px solid ${n.teal[400]}; */
|
|
57
|
+
`,expander:t`
|
|
58
|
+
& path {
|
|
59
|
+
stroke: ${n.gray[400]};
|
|
60
|
+
}
|
|
61
|
+
& svg {
|
|
62
|
+
width: ${o[3]};
|
|
63
|
+
height: ${o[3]};
|
|
64
|
+
}
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
transition: all 0.1s ease;
|
|
68
|
+
/* outline: 1px solid ${n.blue[400]}; */
|
|
69
|
+
`,expanderButtonContainer:t`
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
line-height: ${o[4]};
|
|
73
|
+
min-height: ${o[4]};
|
|
74
|
+
gap: ${o[2]};
|
|
75
|
+
`,expanderButton:t`
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
color: inherit;
|
|
78
|
+
font: inherit;
|
|
79
|
+
outline: inherit;
|
|
80
|
+
height: ${o[5]};
|
|
81
|
+
background: transparent;
|
|
82
|
+
border: none;
|
|
83
|
+
padding: 0;
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: ${o[1]};
|
|
87
|
+
position: relative;
|
|
88
|
+
/* outline: 1px solid ${n.green[400]}; */
|
|
89
|
+
|
|
90
|
+
&:focus-visible {
|
|
91
|
+
border-radius: ${i.radius.xs};
|
|
92
|
+
outline: 2px solid ${n.blue[800]};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
& svg {
|
|
96
|
+
position: relative;
|
|
97
|
+
left: 1px;
|
|
98
|
+
}
|
|
99
|
+
`,info:t`
|
|
100
|
+
color: ${s(n.gray[500],n.gray[500])};
|
|
101
|
+
font-size: ${r.size.xs};
|
|
102
|
+
margin-left: ${o[1]};
|
|
103
|
+
/* outline: 1px solid ${n.yellow[400]}; */
|
|
104
|
+
`,label:t`
|
|
105
|
+
color: ${s(n.gray[700],n.gray[300])};
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
`,value:t`
|
|
108
|
+
color: ${s(n.purple[600],n.purple[400])};
|
|
109
|
+
flex-grow: 1;
|
|
110
|
+
`,actions:t`
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
gap: ${o[2]};
|
|
113
|
+
align-items: center;
|
|
114
|
+
`,row:t`
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
gap: ${o[2]};
|
|
117
|
+
width: 100%;
|
|
118
|
+
margin: ${o[.25]} 0px;
|
|
119
|
+
line-height: ${o[4.5]};
|
|
120
|
+
align-items: center;
|
|
121
|
+
`,editableInput:t`
|
|
122
|
+
border: none;
|
|
123
|
+
padding: ${o[.5]} ${o[1]} ${o[.5]} ${o[1.5]};
|
|
124
|
+
flex-grow: 1;
|
|
125
|
+
border-radius: ${i.radius.xs};
|
|
126
|
+
background-color: ${s(n.gray[200],n.darkGray[500])};
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
background-color: ${s(n.gray[300],n.darkGray[600])};
|
|
130
|
+
}
|
|
131
|
+
`,actionButton:t`
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: ${s(n.gray[500],n.gray[500])};
|
|
134
|
+
border: none;
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
padding: 0px;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
width: ${o[3]};
|
|
141
|
+
height: ${o[3]};
|
|
142
|
+
position: relative;
|
|
143
|
+
z-index: 1;
|
|
144
|
+
|
|
145
|
+
&:hover svg {
|
|
146
|
+
color: ${s(n.gray[600],n.gray[400])};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&:focus-visible {
|
|
150
|
+
border-radius: ${i.radius.xs};
|
|
151
|
+
outline: 2px solid ${n.blue[800]};
|
|
152
|
+
outline-offset: 2px;
|
|
153
|
+
}
|
|
154
|
+
`}},wq=e=>xq("light",e),Sq=e=>xq("dark",e);Lt(["click"]);var kq=Rt('<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>'),Cq=Rt("<div>"),Eq=Rt('<aside aria-label="Tanstack query devtools"><div></div><button aria-label="Close tanstack query devtools">'),Pq=Rt("<select name=tsqd-queries-filter-sort>"),Dq=Rt("<select name=tsqd-mutations-filter-sort>"),jq=Rt("<span>Asc"),Tq=Rt("<span>Desc"),Mq=Rt('<button aria-label="Open in picture-in-picture mode"title="Open in picture-in-picture mode">'),Oq=Rt("<div>Settings"),Aq=Rt("<span>Position"),Nq=Rt("<span>Top"),_q=Rt("<span>Bottom"),Rq=Rt("<span>Left"),Lq=Rt("<span>Right"),$q=Rt("<span>Theme"),Fq=Rt("<span>Light"),Iq=Rt("<span>Dark"),qq=Rt("<span>System"),zq=Rt("<div><div class=tsqd-queries-container>"),Vq=Rt("<div><div class=tsqd-mutations-container>"),Bq=Rt('<div><div><div><button aria-label="Close Tanstack query devtools"><span>TANSTACK</span><span> v</span></button></div></div><div><div><div><input aria-label="Filter queries by query key"type=text placeholder=Filter name=tsqd-query-filter-input></div><div></div><button class=tsqd-query-filter-sort-order-btn></button></div><div><button aria-label="Clear query cache"></button><button>'),Uq=Rt("<option>Sort by "),Kq=Rt("<div class=tsqd-query-disabled-indicator>disabled"),Hq=Rt("<button><div></div><code class=tsqd-query-hash>"),Wq=Rt("<div role=tooltip id=tsqd-status-tooltip>"),Gq=Rt("<span>"),Yq=Rt("<button><span></span><span>"),Qq=Rt("<button><span></span> Error"),Xq=Rt('<div><span></span>Trigger Error<select><option value=""disabled selected>'),Jq=Rt('<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">'),Zq=Rt("<form><textarea name=data></textarea><div><span></span><div><button type=button>Cancel</button><button>Save"),ez=Rt('<div><div>Query Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-observers-count><span>Observers:</span><span></span></div><div class=tsqd-query-details-last-updated><span>Last Updated:</span><span></span></div></div><div>Actions</div><div><button><span></span>Refetch</button><button><span></span>Invalidate</button><button><span></span>Reset</button><button><span></span>Remove</button><button><span></span> Loading</button></div><div>Data </div><div>Query Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),tz=Rt("<option>"),nz=Rt('<div><div>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),[rz,oz]=Me(null),[iz,sz]=Me(null),[az,lz]=Me(0),[cz,uz]=Me(!1),dz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n))),o=AN(),i=_e((()=>TN().buttonPosition||"bottom-right")),s=_e((()=>"true"===e.localStore.open||"false"!==e.localStore.open&&(TN().initialIsOpen||false))),a=_e((()=>e.localStore.position||TN().position||CN));let l;Ne((()=>{const t=l.parentElement,n=e.localStore.height||500,r=e.localStore.width||500,o=a();t.style.setProperty("--tsqd-panel-height",`${"top"===o?"-":""}${n}px`),t.style.setProperty("--tsqd-panel-width",`${"left"===o?"-":""}${r}px`)})),Fe((()=>{const e=()=>{const e=l.parentElement,t=getComputedStyle(e).fontSize;e.style.setProperty("--tsqd-font-size",t)};e(),window.addEventListener("focus",e),Ie((()=>{window.removeEventListener("focus",e)}))}));const c=_e((()=>e.localStore.pip_open??"false"));return[ut(kt,{get when(){return _e((()=>!!o().pipWindow))()&&"true"==c()},get children(){return ut(Zt,{get mount(){return o().pipWindow?.document.body},get children(){return ut(hz,{get children(){return ut(mz,e)}})}})}}),(u=Cq(),"function"==typeof l?zt(l,u):l=u,Vt(u,ut(g_,{name:"tsqd-panel-transition",get children(){return ut(kt,{get when(){return _e((()=>!(!s()||o().pipWindow)))()&&"false"==c()},get children(){return ut(pz,{get localStore(){return e.localStore},get setLocalStore(){return e.setLocalStore}})}})}}),null),Vt(u,ut(g_,{name:"tsqd-button-transition",get children(){return ut(kt,{get when(){return!s()},get children(){var t=kq(),n=t.firstChild,o=n.nextSibling;return Vt(n,ut(eq,{})),o.$$click=()=>e.setLocalStore("open","true"),Vt(o,ut(eq,{})),Ae((()=>Ft(t,a_(r().devtoolsBtn,r()[`devtoolsBtn-position-${i()}`],"tsqd-open-btn-container")))),t}})}}),null),Ae((()=>Ft(u,a_(n`
|
|
155
|
+
& .tsqd-panel-transition-exit-active,
|
|
156
|
+
& .tsqd-panel-transition-enter-active {
|
|
157
|
+
transition:
|
|
158
|
+
opacity 0.3s,
|
|
159
|
+
transform 0.3s;
|
|
69
160
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
@keyframes fadeIn {
|
|
75
|
-
from {
|
|
76
|
-
opacity: 0;
|
|
77
|
-
transform: translateY(5px);
|
|
161
|
+
|
|
162
|
+
& .tsqd-panel-transition-exit-to,
|
|
163
|
+
& .tsqd-panel-transition-enter {
|
|
164
|
+
${"top"===a()||"bottom"===a()?"transform: translateY(var(--tsqd-panel-height));":"transform: translateX(var(--tsqd-panel-width));"}
|
|
78
165
|
}
|
|
79
|
-
|
|
166
|
+
|
|
167
|
+
& .tsqd-button-transition-exit-active,
|
|
168
|
+
& .tsqd-button-transition-enter-active {
|
|
169
|
+
transition:
|
|
170
|
+
opacity 0.3s,
|
|
171
|
+
transform 0.3s;
|
|
80
172
|
opacity: 1;
|
|
81
|
-
transform: translateY(0);
|
|
82
173
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*/const Ud=en("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Bd={PrimaryButton:"bg-purple-600 text-white rounded-lg",PrimaryButtonHover:"hover:bg-purple-700",PrimaryButtonDisabled:"opacity-50 cursor-not-allowed",SecondaryButton:"border bg-gray-100 rounded-lg",SecondaryButtonHover:"hover:bg-gray-200"},_d={CloseButton:Ud,DropdownMenuTrigger:jd,UserIcon:Nd,ScheduleButton:Fd},$d=e=>({...Bd,...e||{}}),zd=e=>({..._d,...e||{}});function Rs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Rs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Kd(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Rs(e))&&(r&&(r+=" "),r+=t);return r}const or="-",Hd=e=>{const t=Wd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(or);return a[0]===""&&a.length!==1&&a.shift(),Fs(a,t)||Gd(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Fs=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fs(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(or);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},js=/^\[(.+)\]$/,Gd=e=>{if(js.test(e)){const t=js.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Wd=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Yd(Object.entries(e.classGroups),n).forEach(([i,s])=>{sr(s,r,i,t)}),r},sr=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ns(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(qd(o)){sr(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{sr(s,Ns(t,i),n,r)})})},Ns=(e,t)=>{let n=e;return t.split(or).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},qd=e=>e.isThemeGetter,Yd=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,Xd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Us="!",Zd=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let m=a[v];if(c===0){if(m===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(m==="/"){d=v;continue}}m==="["?c++:m==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Us),p=h?f.substring(1):f,y=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:s}):s},Jd=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Qd=e=>({cache:Xd(e.cacheSize),parseClassName:Zd(e),...Hd(e)}),ef=/\s+/,tf=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(ef);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let p=!!h,y=r(p?f.substring(0,h):f);if(!y){if(!p){a=c+(a.length>0?" "+a:a);continue}if(y=r(f),!y){a=c+(a.length>0?" "+a:a);continue}p=!1}const v=Jd(u).join(":"),m=d?v+Us:v,b=m+y;if(i.includes(b))continue;i.push(b);const x=o(y,p);for(let S=0;S<x.length;++S){const g=x[S];i.push(m+g)}a=c+(a.length>0?" "+a:a)}return a};function nf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bs(t))&&(r&&(r+=" "),r+=n);return r}const Bs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bs(e[r]))&&(n&&(n+=" "),n+=t);return n};function rf(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=Qd(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=tf(l,n);return o(l,u),u}return function(){return i(nf.apply(null,arguments))}}const G=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_s=/^\[(?:([a-z-]+):)?(.+)\]$/i,of=/^\d+\/\d+$/,sf=new Set(["px","full","screen"]),af=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,df=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>Je(e)||sf.has(e)||of.test(e),Ie=e=>Qe(e,"length",bf),Je=e=>!!e&&!Number.isNaN(Number(e)),ir=e=>Qe(e,"number",Je),pt=e=>!!e&&Number.isInteger(Number(e)),ff=e=>e.endsWith("%")&&Je(e.slice(0,-1)),j=e=>_s.test(e),Re=e=>af.test(e),hf=new Set(["length","size","percentage"]),pf=e=>Qe(e,hf,$s),mf=e=>Qe(e,"position",$s),gf=new Set(["image","url"]),yf=e=>Qe(e,gf,wf),vf=e=>Qe(e,"",xf),mt=()=>!0,Qe=(e,t,n)=>{const r=_s.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},bf=e=>lf.test(e)&&!cf.test(e),$s=()=>!1,xf=e=>uf.test(e),wf=e=>df.test(e),Tf=rf(()=>{const e=G("colors"),t=G("spacing"),n=G("blur"),r=G("brightness"),o=G("borderColor"),i=G("borderRadius"),s=G("borderSpacing"),a=G("borderWidth"),l=G("contrast"),c=G("grayscale"),u=G("hueRotate"),d=G("invert"),f=G("gap"),h=G("gradientColorStops"),p=G("gradientColorStopPositions"),y=G("inset"),v=G("margin"),m=G("opacity"),b=G("padding"),x=G("saturate"),S=G("scale"),g=G("sepia"),k=G("skew"),D=G("space"),M=G("translate"),C=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",j,t],R=()=>[j,t],te=()=>["",De,Ie],Z=()=>["auto",Je,j],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],me=()=>["","0",j],we=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ge=()=>[Je,j];return{cacheSize:500,separator:":",theme:{colors:[mt],spacing:[De,Ie],blur:["none","",Re,j],brightness:ge(),borderColor:[e],borderRadius:["none","","full",Re,j],borderSpacing:R(),borderWidth:te(),contrast:ge(),grayscale:me(),hueRotate:ge(),invert:me(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[ff,Ie],inset:N(),margin:N(),opacity:ge(),padding:R(),saturate:ge(),scale:ge(),sepia:me(),skew:ge(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[Re]}],"break-after":[{"break-after":we()}],"break-before":[{"break-before":we()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),j]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pt,j]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:me()}],shrink:[{shrink:me()}],order:[{order:["first","last","none",pt,j]}],"grid-cols":[{"grid-cols":[mt]}],"col-start-end":[{col:["auto",{span:["full",pt,j]},j]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[mt]}],"row-start-end":[{row:["auto",{span:[pt,j]},j]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[Re]},Re]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Re,Ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ir]}],"font-family":[{font:[mt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",Je,ir]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",De,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",De,Ie]}],"underline-offset":[{"underline-offset":["auto",De,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),mf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:ke()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[De,j]}],"outline-w":[{outline:[De,Ie]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[De,Ie]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Re,vf]}],"shadow-color":[{shadow:[mt]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Re,j]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[g]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:ge()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:ge()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[pt,j]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[De,Ie,ir]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ar(...e){return Tf(Kd(e))}const Sf=({onClose:e,setClickedCreate:t,isDisabled:n,tailwindClassDefinitions:r})=>A.jsx("div",{children:A.jsxs("div",{className:"flex justify-end space-x-4",children:[A.jsx("button",{className:ar("px-4 py-2",r==null?void 0:r.SecondaryButton,r==null?void 0:r.SecondaryButtonHover),onClick:()=>e==null?void 0:e(!1),children:"Cancel"}),A.jsx("button",{className:ar("px-4 py-2",r==null?void 0:r.PrimaryButton,r==null?void 0:r.PrimaryButtonHover,n&&(r==null?void 0:r.PrimaryButtonDisabled)),onClick:()=>{t(!0)},disabled:n,children:"Create"})]})}),lr=P.createContext({});function cr(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const tn=P.createContext(null),ur=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Ef extends Pn.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=o-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Pf({children:e,isPresent:t,anchorX:n}){const r=P.useId(),o=P.useRef(null),i=P.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=P.useContext(ur);return P.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u,right:d}=i.current;if(t||!o.current||!a||!l)return;const f=n==="left"?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=r;const h=document.createElement("style");return s&&(h.nonce=s),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
`),()=>{document.head.removeChild(h)}},[t]),A.jsx(Ef,{isPresent:t,childRef:o,sizeRef:i,children:Pn.cloneElement(e,{ref:o})})}const Cf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a})=>{const l=cr(Af),c=P.useId(),u=P.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=P.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),i?[Math.random(),u]:[n,u]);return P.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),Pn.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),s==="popLayout"&&(e=A.jsx(Pf,{isPresent:n,anchorX:a,children:e})),A.jsx(tn.Provider,{value:d,children:e})};function Af(){return new Map}function zs(e=!0){const t=P.useContext(tn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=P.useId();P.useEffect(()=>{e&&o(i)},[e]);const s=P.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const nn=e=>e.key||"";function Ks(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const dr=typeof window<"u",Hs=dr?P.useLayoutEffect:P.useEffect,kf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left"})=>{const[l,c]=zs(s),u=P.useMemo(()=>Ks(e),[e]),d=s&&!l?[]:u.map(nn),f=P.useRef(!0),h=P.useRef(u),p=cr(()=>new Map),[y,v]=P.useState(u),[m,b]=P.useState(u);Hs(()=>{f.current=!1,h.current=u;for(let g=0;g<m.length;g++){const k=nn(m[g]);d.includes(k)?p.delete(k):p.get(k)!==!0&&p.set(k,!1)}},[m,d.length,d.join("-")]);const x=[];if(u!==y){let g=[...u];for(let k=0;k<m.length;k++){const D=m[k],M=nn(D);d.includes(M)||(g.splice(k,0,D),x.push(D))}return i==="wait"&&x.length&&(g=x),b(Ks(g)),v(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&m.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=P.useContext(lr);return A.jsx(A.Fragment,{children:m.map(g=>{const k=nn(g),D=s&&!l?!1:u===m||d.includes(k),M=()=>{if(p.has(k))p.set(k,!0);else return;let C=!0;p.forEach(L=>{L||(C=!1)}),C&&(S==null||S(),b(h.current),s&&(c==null||c()),r&&r())};return A.jsx(Cf,{isPresent:D,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:D?void 0:M,anchorX:a,children:g},k)})})},pe=e=>e;let et=pe,Fe=pe;process.env.NODE_ENV!=="production"&&(et=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Fe=(e,t)=>{if(!e)throw new Error(t)});function fr(e){let t;return()=>(t===void 0&&(t=e()),t)}const tt=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Pe=e=>e*1e3,Me=e=>e/1e3,Df={skipAnimations:!1,useManualTiming:!1},rn=["read","resolveKeyframes","update","preRender","render","postRender"],Gs={value:null,addProjectionMetrics:null};function Mf(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){s.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const y=h&&o?n:r;return f&&s.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(a=d,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Gs.value&&Gs.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(d))}};return u}const Vf=40;function Ws(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=rn.reduce((m,b)=>(m[b]=Mf(i,t?b:void 0),m),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,h=()=>{const m=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(m-o.timestamp,Vf),1),o.timestamp=m,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:rn.reduce((m,b)=>{const x=s[b];return m[b]=(S,g=!1,k=!1)=>(n||p(),x.schedule(S,g,k)),m},{}),cancel:m=>{for(let b=0;b<rn.length;b++)s[rn[b]].cancel(m)},state:o,steps:s}}const{schedule:H,cancel:je,state:se,steps:hr}=Ws(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0),qs=P.createContext({strict:!1}),Ys={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},nt={};for(const e in Ys)nt[e]={isEnabled:t=>Ys[e].some(n=>!!t[n])};function Lf(e){for(const t in e)nt[t]={...nt[t],...e[t]}}const Of=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function on(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Of.has(e)}let Xs=e=>!on(e);function If(e){e&&(Xs=t=>t.startsWith("on")?!on(t):e(t))}try{If(require("@emotion/is-prop-valid").default)}catch{}function Rf(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Xs(o)||n===!0&&on(o)||!t&&!on(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Zs=new Set;function sn(e,t,n){e||Zs.has(t)||(console.warn(t),Zs.add(t))}function Ff(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&sn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const an=P.createContext({});function ln(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function gt(e){return typeof e=="string"||Array.isArray(e)}const pr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mr=["initial",...pr];function cn(e){return ln(e.animate)||mr.some(t=>gt(e[t]))}function Js(e){return!!(cn(e)||e.variants)}function jf(e,t){if(cn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gt(n)?n:void 0,animate:gt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Nf(e){const{initial:t,animate:n}=jf(e,P.useContext(an));return P.useMemo(()=>({initial:t,animate:n}),[Qs(t),Qs(n)])}function Qs(e){return Array.isArray(e)?e.join(" "):e}const Uf=Symbol.for("motionComponentSymbol");function rt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Bf(e,t,n){return P.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rt(n)&&(n.current=r))},[t])}const gr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ei="data-"+gr("framerAppearId"),{schedule:yr,cancel:iy}=Ws(queueMicrotask,!1),ti=P.createContext({});function _f(e,t,n,r,o){var i,s;const{visualElement:a}=P.useContext(an),l=P.useContext(qs),c=P.useContext(tn),u=P.useContext(ur).reducedMotion,d=P.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=P.useContext(ti);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&$f(d.current,n,o,h);const p=P.useRef(!1);P.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const y=n[ei],v=P.useRef(!!y&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,y))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,y)));return Hs(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),yr.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,y)}),v.current=!1))}),f}function $f(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ni(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&rt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function ni(e){if(e)return e.options.allowProjection!==!1?e.projection:ni(e.parent)}function zf({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var i,s;e&&Lf(e);function a(c,u){let d;const f={...P.useContext(ur),...c,layoutId:Kf(c)},{isStatic:h}=f,p=Nf(c),y=r(c,h);if(!h&&dr){Hf(f,e);const v=Gf(f);d=v.MeasureLayout,p.visualElement=_f(o,y,f,t,v.ProjectionNode)}return A.jsxs(an.Provider,{value:p,children:[d&&p.visualElement?A.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,Bf(y,p.visualElement,u),y,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(s=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&s!==void 0?s:""})`}`;const l=P.forwardRef(a);return l[Uf]=o,l}function Kf({layoutId:e}){const t=P.useContext(lr).id;return t&&e!==void 0?t+"-"+e:e}function Hf(e,t){const n=P.useContext(qs).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?et(!1,r):Fe(!1,r)}}function Gf(e){const{drag:t,layout:n}=nt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ri=e=>t=>typeof t=="string"&&t.startsWith(e),vr=ri("--"),Wf=ri("var(--"),br=e=>Wf(e)?qf.test(e.split("/*")[0].trim()):!1,qf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yt={};function Yf(e){for(const t in e)yt[t]=e[t],vr(t)&&(yt[t].isCSSVariable=!0)}const ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(ot);function oi(e,{layout:t,layoutId:n}){return ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yt[e]||e==="opacity")}const ue=e=>!!(e&&e.getVelocity),si=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ve=(e,t,n)=>n>t?t:n<e?e:n,st={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},vt={...st,transform:e=>Ve(0,1,e)},un={...st,default:1},bt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ne=bt("deg"),Ce=bt("%"),O=bt("px"),Xf=bt("vh"),Zf=bt("vw"),ii={...Ce,parse:e=>Ce.parse(e)/100,transform:e=>Ce.transform(e*100)},Jf={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,radius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,backgroundPositionX:O,backgroundPositionY:O},Qf={rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:un,scaleX:un,scaleY:un,scaleZ:un,skew:Ne,skewX:Ne,skewY:Ne,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:vt,originX:ii,originY:ii,originZ:O},ai={...st,transform:Math.round},xr={...Jf,...Qf,zIndex:ai,size:O,fillOpacity:vt,strokeOpacity:vt,numOctaves:ai},eh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},th=ot.length;function nh(e,t,n){let r="",o=!0;for(let i=0;i<th;i++){const s=ot[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=si(a,xr[s]);if(!l){o=!1;const u=eh[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function wr(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(ze.has(l)){s=!0;continue}else if(vr(l)){o[l]=c;continue}else{const u=si(c,xr[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=nh(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const Tr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function li(e,t,n){for(const r in t)!ue(t[r])&&!oi(r,n)&&(e[r]=t[r])}function rh({transformTemplate:e},t){return P.useMemo(()=>{const n=Tr();return wr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function oh(e,t){const n=e.style||{},r={};return li(r,n,e),Object.assign(r,rh(e,t)),r}function sh(e,t){const n={},r=oh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ih=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sr(e){return typeof e!="string"||e.includes("-")?!1:!!(ih.indexOf(e)>-1||/[A-Z]/u.test(e))}const ah={offset:"stroke-dashoffset",array:"stroke-dasharray"},lh={offset:"strokeDashoffset",array:"strokeDasharray"};function ch(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?ah:lh;e[i.offset]=O.transform(-r);const s=O.transform(t),a=O.transform(n);e[i.array]=`${s} ${a}`}function ci(e,t,n){return typeof e=="string"?e:O.transform(t+n*e)}function uh(e,t,n){const r=ci(t,e.x,e.width),o=ci(n,e.y,e.height);return`${r} ${o}`}function Er(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(wr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=uh(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&ch(f,s,a,l,!1)}const ui=()=>({...Tr(),attrs:{}}),Pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function dh(e,t,n,r){const o=P.useMemo(()=>{const i=ui();return Er(i,t,Pr(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};li(i,e.style,e),o.style={...i,...o.style}}return o}function fh(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Sr(n)?dh:sh)(r,i,s,n),c=Rf(r,typeof n=="string",e),u=n!==P.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=P.useMemo(()=>ue(d)?d.get():d,[d]);return P.createElement(n,{...u,children:f})}}function di(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cr(e,t,n,r){if(typeof t=="function"){const[o,i]=di(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=di(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Ar=e=>Array.isArray(e),hh=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),ph=e=>Ar(e)?e[e.length-1]||0:e;function dn(e){const t=ue(e)?e.get():e;return hh(t)?t.toValue():t}function mh({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:gh(r,o,i,e),renderState:t()};return n&&(s.onMount=a=>n({props:r,current:a,...s}),s.onUpdate=a=>n(a)),s}const fi=e=>(t,n)=>{const r=P.useContext(an),o=P.useContext(tn),i=()=>mh(e,t,r,o);return n?i():cr(i)};function gh(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=dn(i[f]);let{initial:s,animate:a}=e;const l=cn(e),c=Js(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!ln(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Cr(e,f[h]);if(p){const{transitionEnd:y,transition:v,...m}=p;for(const b in m){let x=m[b];if(Array.isArray(x)){const S=u?x.length-1:0;x=x[S]}x!==null&&(o[b]=x)}for(const b in y)o[b]=y[b]}}}return o}function kr(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(ue(o[s])||t.style&&ue(t.style[s])||oi(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return i}const yh={useVisualState:fi({scrapeMotionValuesFromProps:kr,createRenderState:Tr})};function hi(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function pi(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const mi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function gi(e,t,n,r){pi(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(mi.has(o)?o:gr(o),t.attrs[o])}function yi(e,t,n){const r=kr(e,t,n);for(const o in e)if(ue(e[o])||ue(t[o])){const i=ot.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const vi=["x","y","width","height","cx","cy","r"],vh={useVisualState:fi({scrapeMotionValuesFromProps:yi,createRenderState:ui,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in o)if(ze.has(a)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let a=0;a<vi.length;a++){const l=vi[a];e[l]!==t[l]&&(s=!0)}s&&H.read(()=>{hi(n,r),H.render(()=>{Er(r,o,Pr(n.tagName),e.transformTemplate),gi(n,r)})})}})};function bh(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const s={...Sr(r)?vh:yh,preloadedFeatures:e,useRender:fh(o),createVisualElement:t,Component:r};return zf(s)}}function fn(e,t,n){const r=e.getProps();return Cr(r,t,n!==void 0?n:r.custom,e)}const xh=fr(()=>window.ScrollTimeline!==void 0);class wh{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(xh()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Th extends wh{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Dr(e,t){return e?e[t]||e.default||e:void 0}const Mr=2e4;function bi(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mr;)t+=n,r=e.next(t);return t>=Mr?1/0:t}function Vr(e){return typeof e=="function"}function xi(e,t){e.timeline=t,e.onfinish=null}const Lr=e=>Array.isArray(e)&&typeof e[0]=="number",Sh={linearEasing:void 0};function Eh(e,t){const n=fr(e);return()=>{var r;return(r=Sh[t])!==null&&r!==void 0?r:n()}}const hn=Eh(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wi=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(tt(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ti(e){return!!(typeof e=="function"&&hn()||!e||typeof e=="string"&&(e in Or||hn())||Lr(e)||Array.isArray(e)&&e.every(Ti))}const xt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Or={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xt([0,.65,.55,1]),circOut:xt([.55,0,1,.45]),backIn:xt([.31,.01,.66,-.59]),backOut:xt([.33,1.53,.69,.99])};function Si(e,t){if(e)return typeof e=="function"&&hn()?wi(e,t):Lr(e)?xt(e):Array.isArray(e)?e.map(n=>Si(n,t)||Or.easeOut):Or[e]}const Te={x:!1,y:!1};function Ei(){return Te.x||Te.y}function Ph(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;const i=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Pi(e,t){const n=Ph(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ci(e){return!(e.pointerType==="touch"||Ei())}function Ch(e,t,n={}){const[r,o,i]=Pi(e,n),s=a=>{if(!Ci(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ci(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",s,o)}),i}const Ai=(e,t)=>t?e===t?!0:Ai(e,t.parentElement):!1,Ir=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ah=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function kh(e){return Ah.has(e.tagName)||e.tabIndex!==-1}const wt=new WeakSet;function ki(e){return t=>{t.key==="Enter"&&e(t)}}function Rr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Dh=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ki(()=>{if(wt.has(n))return;Rr(n,"down");const o=ki(()=>{Rr(n,"up")}),i=()=>Rr(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Di(e){return Ir(e)&&!Ei()}function Mh(e,t,n={}){const[r,o,i]=Pi(e,n),s=a=>{const l=a.currentTarget;if(!Di(a)||wt.has(l))return;wt.add(l);const c=t(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!Di(h)||!wt.has(l))&&(wt.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{u(h,n.useGlobalTarget||Ai(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{!kh(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),a.addEventListener("focus",c=>Dh(c,o),o)}),i}function Vh(e){return e==="x"||e==="y"?Te[e]?null:(Te[e]=!0,()=>{Te[e]=!1}):Te.x||Te.y?null:(Te.x=Te.y=!0,()=>{Te.x=Te.y=!1})}const Mi=new Set(["width","height","top","left","right","bottom",...ot]);let pn;function Lh(){pn=void 0}const Ae={now:()=>(pn===void 0&&Ae.set(se.isProcessing||Df.useManualTiming?se.timestamp:performance.now()),pn),set:e=>{pn=e,queueMicrotask(Lh)}};function Fr(e,t){e.indexOf(t)===-1&&e.push(t)}function jr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nr{constructor(){this.subscriptions=[]}add(t){return Fr(this.subscriptions,t),()=>jr(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Vi(e,t){return t?e*(1e3/t):0}const Li=30,Oh=e=>!isNaN(parseFloat(e));class Ih{constructor(t,n={}){this.version="12.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Ae.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Oh(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&sn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Nr);const r=this.events[t].add(n);return t==="change"?()=>{r(),H.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Li)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Li);return Vi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(e,t){return new Ih(e,t)}function Rh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function Fh(e,t){const n=fn(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=ph(i[s]);Rh(e,s,a)}}function jh(e){return!!(ue(e)&&e.add)}function Ur(e,t){const n=e.getValue("willChange");if(jh(n))return n.add(t)}function Oi(e){return e.props[ei]}const Ii=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nh=1e-7,Uh=12;function Bh(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Ii(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>Nh&&++a<Uh);return s}function St(e,t,n,r){if(e===t&&n===r)return pe;const o=i=>Bh(i,0,1,e,n);return i=>i===0||i===1?i:Ii(o(i),t,r)}const Ri=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fi=e=>t=>1-e(1-t),ji=St(.33,1.53,.69,.99),Br=Fi(ji),Ni=Ri(Br),Ui=e=>(e*=2)<1?.5*Br(e):.5*(2-Math.pow(2,-10*(e-1))),_r=e=>1-Math.sin(Math.acos(e)),Bi=Fi(_r),_i=Ri(_r),$i=e=>/^0[^.\s]+$/u.test(e);function _h(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$i(e):!0}const Et=e=>Math.round(e*1e5)/1e5,$r=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $h(e){return e==null}const zh=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zr=(e,t)=>n=>!!(typeof n=="string"&&zh.test(n)&&n.startsWith(e)||t&&!$h(n)&&Object.prototype.hasOwnProperty.call(n,t)),zi=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match($r);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Kh=e=>Ve(0,255,e),Kr={...st,transform:e=>Math.round(Kh(e))},Ke={test:zr("rgb","red"),parse:zi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Kr.transform(e)+", "+Kr.transform(t)+", "+Kr.transform(n)+", "+Et(vt.transform(r))+")"};function Hh(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Hr={test:zr("#"),parse:Hh,transform:Ke.transform},it={test:zr("hsl","hue"),parse:zi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ce.transform(Et(t))+", "+Ce.transform(Et(n))+", "+Et(vt.transform(r))+")"},de={test:e=>Ke.test(e)||Hr.test(e)||it.test(e),parse:e=>Ke.test(e)?Ke.parse(e):it.test(e)?it.parse(e):Hr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ke.transform(e):it.transform(e)},Gh=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Wh(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match($r))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Gh))===null||n===void 0?void 0:n.length)||0)>0}const Ki="number",Hi="color",qh="var",Yh="var(",Gi="${}",Xh=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Xh,l=>(de.test(l)?(r.color.push(i),o.push(Hi),n.push(de.parse(l))):l.startsWith(Yh)?(r.var.push(i),o.push(qh),n.push(l)):(r.number.push(i),o.push(Ki),n.push(parseFloat(l))),++i,Gi)).split(Gi);return{values:n,split:a,indexes:r,types:o}}function Wi(e){return Pt(e).values}function qi(e){const{split:t,types:n}=Pt(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Ki?i+=Et(o[s]):a===Hi?i+=de.transform(o[s]):i+=o[s]}return i}}const Zh=e=>typeof e=="number"?0:e;function Jh(e){const t=Wi(e);return qi(e)(t.map(Zh))}const Ue={test:Wh,parse:Wi,createTransformer:qi,getAnimatableNone:Jh},Qh=new Set(["brightness","contrast","saturate","opacity"]);function ep(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match($r)||[];if(!r)return e;const o=n.replace(r,"");let i=Qh.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const tp=/\b([a-z-]*)\(.*?\)/gu,Gr={...Ue,getAnimatableNone:e=>{const t=e.match(tp);return t?t.map(ep).join(" "):e}},np={...xr,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:Gr,WebkitFilter:Gr},Wr=e=>np[e];function Yi(e,t){let n=Wr(e);return n!==Gr&&(n=Ue),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rp=new Set(["auto","none","0"]);function op(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!rp.has(i)&&Pt(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=Yi(n,o)}const Xi=e=>e===st||e===O,Zi=(e,t)=>parseFloat(e.split(", ")[t]),Ji=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Zi(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Zi(i[1],e):0}},sp=new Set(["x","y","z"]),ip=ot.filter(e=>!sp.has(e));function ap(e){const t=[];return ip.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const at={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ji(4,13),y:Ji(5,14)};at.translateX=at.x,at.translateY=at.y;const He=new Set;let qr=!1,Yr=!1;function Qi(){if(Yr){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=ap(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yr=!1,qr=!1,He.forEach(e=>e.complete()),He.clear()}function ea(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yr=!0)})}function lp(){ea(),Qi()}class Xr{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),qr||(qr=!0,H.read(ea),H.resolveKeyframes(Qi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ta=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),cp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function up(e){const t=cp.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const dp=4;function na(e,t,n=1){Fe(n<=dp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=up(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return ta(s)?parseFloat(s):s}return br(o)?na(o,t,n+1):o}const ra=e=>t=>t.test(e),oa=[st,O,Ce,Ne,Zf,Xf,{test:e=>e==="auto",parse:e=>e}],sa=e=>oa.find(ra(e));class ia extends Xr{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),br(c))){const u=na(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Mi.has(r)||t.length!==2)return;const[o,i]=t,s=sa(o),a=sa(i);if(s!==a)if(Xi(s)&&Xi(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)_h(t[o])&&r.push(o);r.length&&op(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=at[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const aa=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ue.test(e)||e==="0")&&!e.startsWith("url("));function fp(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function hp(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=aa(o,t),a=aa(i,t);return et(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:fp(e)||(n==="spring"||Vr(n))&&r}const pp=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(pp),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const mp=40;class la{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ae.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>mp?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&lp(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ae.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!hp(t,r,o,i))if(s)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const q=(e,t,n)=>e+(t-e)*n;function Zr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Zr(l,a,e+1/3),i=Zr(l,a,e),s=Zr(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Jr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},yp=[Hr,Ke,it],vp=e=>yp.find(t=>t.test(e));function ca(e){const t=vp(e);if(et(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===it&&(n=gp(n)),n}const ua=(e,t)=>{const n=ca(e),r=ca(t);if(!n||!r)return gn(e,t);const o={...n};return i=>(o.red=Jr(n.red,r.red,i),o.green=Jr(n.green,r.green,i),o.blue=Jr(n.blue,r.blue,i),o.alpha=q(n.alpha,r.alpha,i),Ke.transform(o))},bp=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(bp),Qr=new Set(["none","hidden"]);function xp(e,t){return Qr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function wp(e,t){return n=>q(e,t,n)}function eo(e){return typeof e=="number"?wp:typeof e=="string"?br(e)?gn:de.test(e)?ua:Ep:Array.isArray(e)?da:typeof e=="object"?de.test(e)?ua:Tp:gn}function da(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>eo(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function Tp(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=eo(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function Sp(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const Ep=(e,t)=>{const n=Ue.createTransformer(t),r=Pt(e),o=Pt(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Qr.has(e)&&!o.values.length||Qr.has(t)&&!r.values.length?xp(e,t):Ct(da(Sp(r,o),o.values),n):(et(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function fa(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?q(e,t,n):eo(e)(e,t)}const Pp=5;function ha(e,t,n){const r=Math.max(t-Pp,0);return Vi(n-e(r),t-r)}const Y={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},to=.001;function Cp({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let o,i;et(e<=Pe(Y.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Ve(Y.minDamping,Y.maxDamping,s),e=Ve(Y.minDuration,Y.maxDuration,Me(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=no(c,s),p=Math.exp(-d);return to-f/h*p},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-d),y=no(Math.pow(c,2),s);return(-o(c)+to>0?-1:1)*((f-h)*p)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-to+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=kp(o,i,a);if(e=Pe(e),isNaN(l))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const Ap=12;function kp(e,t,n){let r=n;for(let o=1;o<Ap;o++)r=r-e(r)/t(r);return r}function no(e,t){return e*Math.sqrt(1-t*t)}const Dp=["duration","bounce"],Mp=["stiffness","damping","mass"];function pa(e,t){return t.some(n=>e[n]!==void 0)}function Vp(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!pa(e,Mp)&&pa(e,Dp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Ve(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Y.mass,stiffness:o,damping:i}}else{const n=Cp(e);t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function ma(e=Y.visualDuration,t=Y.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Vp({...n,velocity:-Me(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),v=s-i,m=Me(Math.sqrt(l/u)),b=Math.abs(v)<5;r||(r=b?Y.restSpeed.granular:Y.restSpeed.default),o||(o=b?Y.restDelta.granular:Y.restDelta.default);let x;if(y<1){const g=no(m,y);x=k=>{const D=Math.exp(-y*m*k);return s-D*((p+y*m*v)/g*Math.sin(g*k)+v*Math.cos(g*k))}}else if(y===1)x=g=>s-Math.exp(-m*g)*(v+(p+m*v)*g);else{const g=m*Math.sqrt(y*y-1);x=k=>{const D=Math.exp(-y*m*k),M=Math.min(g*k,300);return s-D*((p+y*m*v)*Math.sinh(M)+g*v*Math.cosh(M))/g}}const S={calculatedDuration:h&&d||null,next:g=>{const k=x(g);if(h)a.done=g>=d;else{let D=0;y<1&&(D=g===0?Pe(p):ha(x,g,k));const M=Math.abs(D)<=r,C=Math.abs(s-k)<=o;a.done=M&&C}return a.value=a.done?s:k,a},toString:()=>{const g=Math.min(bi(S),Mr),k=wi(D=>S.next(g*D).value,g,30);return g+"ms "+k}};return S}function ga({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=M=>a!==void 0&&M<a||l!==void 0&&M>l,p=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let y=n*t;const v=d+y,m=s===void 0?v:s(v);m!==v&&(y=m-d);const b=M=>-y*Math.exp(-M/r),x=M=>m+b(M),S=M=>{const C=b(M),L=x(M);f.done=Math.abs(C)<=c,f.value=f.done?m:L};let g,k;const D=M=>{h(f.value)&&(g=M,k=ma({keyframes:[f.value,p(f.value)],velocity:ha(x,M,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:M=>{let C=!1;return!k&&g===void 0&&(C=!0,S(M),D(M)),g!==void 0&&M>=g?k.next(M-g):(!C&&S(M),f)}}}const Lp=St(.42,0,1,1),Op=St(0,0,.58,1),ya=St(.42,0,.58,1),Ip=e=>Array.isArray(e)&&typeof e[0]!="number",va={linear:pe,easeIn:Lp,easeInOut:ya,easeOut:Op,circIn:_r,circInOut:_i,circOut:Bi,backIn:Br,backInOut:Ni,backOut:ji,anticipate:Ui},ba=e=>{if(Lr(e)){Fe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return St(t,n,r,o)}else if(typeof e=="string")return Fe(va[e]!==void 0,`Invalid easing type '${e}'`),va[e];return e};function Rp(e,t,n){const r=[],o=n||fa,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||pe:t;a=Ct(l,a)}r.push(a)}return r}function Fp(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Fe(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Rp(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=tt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ve(e[0],e[i-1],u)):c}function jp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=tt(0,t,r);e.push(q(n,1,o))}}function Np(e){const t=[0];return jp(t,e.length-1),t}function Up(e,t){return e.map(n=>n*t)}function Bp(e,t){return e.map(()=>t||ya).splice(0,e.length-1)}function yn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Ip(r)?r.map(ba):ba(r),i={done:!1,value:t[0]},s=Up(n&&n.length===t.length?n:Np(t),e),a=Fp(s,t,{ease:Array.isArray(o)?o:Bp(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const _p=e=>{const t=({timestamp:n})=>e(n);return{start:()=>H.update(t,!0),stop:()=>je(t),now:()=>se.isProcessing?se.timestamp:Ae.now()}},$p={decay:ga,inertia:ga,tween:yn,keyframes:yn,spring:ma},zp=e=>e/100;class ro extends la{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,s=(o==null?void 0:o.KeyframeResolver)||Xr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=Vr(n)?n:$p[n]||yn;let l,c;a!==yn&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Fe(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Ct(zp,fa(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=bi(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:y,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?m<0:m>u;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,S=i;if(h){const M=Math.min(this.currentTime,u)/d;let C=Math.floor(M),L=M%1;!L&&M>=1&&(L=1),L===1&&C--,C=Math.min(C,h+1),!!(C%2)&&(p==="reverse"?(L=1-L,y&&(L-=y/d)):p==="mirror"&&(S=s)),x=Ve(0,1,L)*d}const g=b?{done:!1,value:l[0]}:S.next(x);a&&(g.value=a(g.value));let{done:k}=g;!b&&c!==null&&(k=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return D&&o!==void 0&&(g.value=mn(l,this.options,o)),v&&v(g.value),D&&this.finish(),g}get duration(){const{resolved:t}=this;return t?Me(t.calculatedDuration):0}get time(){return Me(this.currentTime)}set time(t){t=Pe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Me(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=_p,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Kp=new Set(["opacity","clipPath","filter","transform"]);function Hp(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Si(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const Gp=fr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),vn=10,Wp=2e4;function qp(e){return Vr(e.type)||e.type==="spring"||!Ti(e.ease)}function Yp(e,t){const n=new ro({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Wp;)r=n.sample(i),o.push(r.value),i+=vn;return{times:void 0,keyframes:o,duration:i-vn,ease:"linear"}}const xa={anticipate:Ui,backInOut:Ni,circInOut:_i};function Xp(e){return e in xa}class wa extends la{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new ia(i,(s,a)=>this.onKeyframesResolved(s,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&hn()&&Xp(i)&&(i=xa[i]),qp(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...y}=this.options,v=Yp(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,i=v.ease,s="keyframes"}const u=Hp(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(xi(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:s,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Me(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Me(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Pe(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return pe;const{animation:r}=n;xi(r,t)}return pe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new ro({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),y=Pe(this.time);c.setWithVelocity(p.sample(y-vn).value,p.sample(y).value,vn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Gp()&&r&&Kp.has(r)&&!l&&!c&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}const Zp={type:"spring",stiffness:500,damping:25,restSpeed:10},Jp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qp={type:"keyframes",duration:.8},em={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tm=(e,{keyframes:t})=>t.length>2?Qp:ze.has(e)?e.startsWith("scale")?Jp(t[1]):Zp:em;function nm({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const oo=(e,t,n,r={},o,i)=>s=>{const a=Dr(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Pe(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};nm(a)||(u={...u,...tm(e,u)}),u.duration&&(u.duration=Pe(u.duration)),u.repeatDelay&&(u.repeatDelay=Pe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const f=mn(u.keyframes,a);if(f!==void 0)return H.update(()=>{u.onUpdate(f),u.onComplete()}),new Th([])}return!i&&wa.supports(u)?new wa(u):new ro(u)};function rm({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ta(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),h=l[d];if(h===void 0||u&&rm(u,d))continue;const p={delay:n,...Dr(s||{},d)};let y=!1;if(window.MotionHandoffAnimation){const m=Oi(e);if(m){const b=window.MotionHandoffAnimation(m,d,H);b!==null&&(p.startTime=b,y=!0)}}Ur(e,d),f.start(oo(d,f,h,e.shouldReduceMotion&&Mi.has(d)?{type:!1}:p,e,y));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{H.update(()=>{a&&Fh(e,a)})}),c}function so(e,t,n={}){var r;const o=fn(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Ta(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return om(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function om(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(sm).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(so(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function sm(e,t){return e.sortNodePosition(t)}function im(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>so(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=so(e,t,n);else{const o=typeof t=="function"?fn(e,t,n.custom):t;r=Promise.all(Ta(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Sa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const am=mr.length;function Ea(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ea(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<am;n++){const r=mr[n],o=e.props[r];(gt(o)||o===!1)&&(t[r]=o)}return t}const lm=[...pr].reverse(),cm=pr.length;function um(e){return t=>Promise.all(t.map(({animation:n,options:r})=>im(e,n,r)))}function dm(e){let t=um(e),n=Pa(),r=!0;const o=l=>(c,u)=>{var d;const f=fn(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...y}=f;c={...c,...y,...p}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=Ea(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<cm;v++){const m=lm[v],b=n[m],x=c[m]!==void 0?c[m]:u[m],S=gt(x),g=m===l?b.isActive:null;g===!1&&(p=v);let k=x===u[m]&&x!==c[m]&&S;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),b.protectedKeys={...h},!b.isActive&&g===null||!x&&!b.prevProp||ln(x)||typeof x=="boolean")continue;const D=fm(b.prevProp,x);let M=D||m===l&&b.isActive&&!k&&S||v>p&&S,C=!1;const L=Array.isArray(x)?x:[x];let N=L.reduce(o(m),{});g===!1&&(N={});const{prevResolvedValues:R={}}=b,te={...R,...N},Z=K=>{M=!0,f.has(K)&&(C=!0,f.delete(K)),b.needsAnimating[K]=!0;const Q=e.getValue(K);Q&&(Q.liveStyle=!1)};for(const K in te){const Q=N[K],me=R[K];if(h.hasOwnProperty(K))continue;let we=!1;Ar(Q)&&Ar(me)?we=!Sa(Q,me):we=Q!==me,we?Q!=null?Z(K):f.add(K):Q!==void 0&&f.has(K)?Z(K):b.protectedKeys[K]=!0}b.prevProp=x,b.prevResolvedValues=N,b.isActive&&(h={...h,...N}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(k&&D)||C)&&d.push(...L.map(K=>({animation:K,options:{type:m}})))}if(f.size){const v={};f.forEach(m=>{const b=e.getBaseTarget(m),x=e.getValue(m);x&&(x.liveStyle=!0),v[m]=b??null}),d.push({animation:v})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Pa(),r=!0}}}function fm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sa(t,e):!1}function Ge(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pa(){return{animate:Ge(!0),whileInView:Ge(),whileHover:Ge(),whileTap:Ge(),whileDrag:Ge(),whileFocus:Ge(),exit:Ge()}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class hm extends Be{constructor(t){super(t),t.animationState||(t.animationState=dm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ln(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let pm=0;class mm extends Be{constructor(){super(...arguments),this.id=pm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const gm={animation:{Feature:hm},exit:{Feature:mm}};function At(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function kt(e){return{point:{x:e.pageX,y:e.pageY}}}const ym=e=>t=>Ir(t)&&e(t,kt(t));function Dt(e,t,n,r){return At(e,t,ym(n),r)}const Ca=(e,t)=>Math.abs(e-t);function vm(e,t){const n=Ca(e.x,t.x),r=Ca(e.y,t.y);return Math.sqrt(n**2+r**2)}class Aa{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ao(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=vm(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:y}=se;this.history.push({...p,timestamp:y});const{onStart:v,onMove:m}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=io(f,this.transformPagePoint),H.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ao(d.type==="pointercancel"?this.lastMoveEventInfo:io(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Ir(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=kt(t),a=io(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=se;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,ao(a,this.history)),this.removeListeners=Ct(Dt(this.contextWindow,"pointermove",this.handlePointerMove),Dt(this.contextWindow,"pointerup",this.handlePointerUp),Dt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),je(this.updatePoint)}}function io(e,t){return t?{point:t(e.point)}:e}function ka(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ao({point:e},t){return{point:e,delta:ka(e,Da(t)),offset:ka(e,bm(t)),velocity:xm(t,.1)}}function bm(e){return e[0]}function Da(e){return e[e.length-1]}function xm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Da(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Pe(t)));)n--;if(!r)return{x:0,y:0};const i=Me(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Ma=1e-4,wm=1-Ma,Tm=1+Ma,Va=.01,Sm=0-Va,Em=0+Va;function fe(e){return e.max-e.min}function Pm(e,t,n){return Math.abs(e-t)<=n}function La(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=fe(n)/fe(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wm&&e.scale<=Tm||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sm&&e.translate<=Em||isNaN(e.translate))&&(e.translate=0)}function Mt(e,t,n,r){La(e.x,t.x,n.x,r?r.originX:void 0),La(e.y,t.y,n.y,r?r.originY:void 0)}function Oa(e,t,n){e.min=n.min+t.min,e.max=e.min+fe(t)}function Cm(e,t,n){Oa(e.x,t.x,n.x),Oa(e.y,t.y,n.y)}function Ia(e,t,n){e.min=t.min-n.min,e.max=e.min+fe(t)}function Vt(e,t,n){Ia(e.x,t.x,n.x),Ia(e.y,t.y,n.y)}function Am(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function Ra(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function km(e,{top:t,left:n,bottom:r,right:o}){return{x:Ra(e.x,n,o),y:Ra(e.y,t,r)}}function Fa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Dm(e,t){return{x:Fa(e.x,t.x),y:Fa(e.y,t.y)}}function Mm(e,t){let n=.5;const r=fe(e),o=fe(t);return o>r?n=tt(t.min,t.max-r,e.min):r>o&&(n=tt(e.min,e.max-o,t.min)),Ve(0,1,n)}function Vm(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const lo=.35;function Lm(e=lo){return e===!1?e=0:e===!0&&(e=lo),{x:ja(e,"left","right"),y:ja(e,"top","bottom")}}function ja(e,t,n){return{min:Na(e,t),max:Na(e,n)}}function Na(e,t){return typeof e=="number"?e:e[t]||0}const Ua=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:Ua(),y:Ua()}),Ba=()=>({min:0,max:0}),J=()=>({x:Ba(),y:Ba()});function be(e){return[e("x"),e("y")]}function _a({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Om({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Im(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function co(e){return e===void 0||e===1}function uo({scale:e,scaleX:t,scaleY:n}){return!co(e)||!co(t)||!co(n)}function We(e){return uo(e)||$a(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $a(e){return za(e.x)||za(e.y)}function za(e){return e&&e!=="0%"}function bn(e,t,n){const r=e-n,o=t*r;return n+o}function Ka(e,t,n,r,o){return o!==void 0&&(e=bn(e,o,r)),bn(e,n,r)+t}function fo(e,t=0,n=1,r,o){e.min=Ka(e.min,t,n,r,o),e.max=Ka(e.max,t,n,r,o)}function Ha(e,{x:t,y:n}){fo(e.x,t.translate,t.scale,t.originPoint),fo(e.y,n.translate,n.scale,n.originPoint)}const Ga=.999999999999,Wa=1.0000000000001;function Rm(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ut(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Ha(e,s)),r&&We(i.latestValues)&&ut(e,i.latestValues))}t.x<Wa&&t.x>Ga&&(t.x=1),t.y<Wa&&t.y>Ga&&(t.y=1)}function ct(e,t){e.min=e.min+t,e.max=e.max+t}function qa(e,t,n,r,o=.5){const i=q(e.min,e.max,o);fo(e,t,n,i,r)}function ut(e,t){qa(e.x,t.x,t.scaleX,t.scale,t.originX),qa(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ya(e,t){return _a(Im(e.getBoundingClientRect(),t))}function Fm(e,t,n){const r=Ya(e,n),{scroll:o}=t;return o&&(ct(r.x,o.offset.x),ct(r.y,o.offset.y)),r}const Xa=({current:e})=>e?e.ownerDocument.defaultView:null,jm=new WeakMap;class Nm{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kt(u).point)},i=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vh(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),be(v=>{let m=this.getAxisMotionValue(v).get()||0;if(Ce.test(m)){const{projection:b}=this.visualElement;if(b&&b.layout){const x=b.layout.layoutBox[v];x&&(m=fe(x)*(parseFloat(m)/100))}}this.originPoint[v]=m}),p&&H.postRender(()=>p(u,d)),Ur(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},s=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=Um(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),y&&y(u,d)},a=(u,d)=>this.stop(u,d),l=()=>be(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Aa(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Xa(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&H.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!xn(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Am(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&rt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=km(o.layoutBox,n):this.constraints=!1,this.elastic=Lm(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&be(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Vm(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rt(t))return!1;const r=t.current;Fe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Fm(r,o.root,this.visualElement.getTransformPagePoint());let s=Dm(o.layout.layoutBox,i);if(n){const a=n(Om(s));this.hasMutatedConstraints=!!a,a&&(s=_a(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=be(u=>{if(!xn(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ur(this.visualElement,t),r.start(oo(t,r,0,n,this.visualElement,!1))}stopAnimation(){be(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){be(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){be(n=>{const{drag:r}=this.getProps();if(!xn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-q(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};be(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=Mm({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),be(s=>{if(!xn(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(q(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;jm.set(this.visualElement,this);const t=this.visualElement.current,n=Dt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();rt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),H.read(r);const s=At(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(be(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=lo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function xn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Um(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Bm extends Be{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new Nm(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Za=e=>(t,n)=>{e&&H.postRender(()=>e(t,n))};class _m extends Be{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new Aa(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Za(t),onStart:Za(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&H.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Dt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ja(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Ja(e,t.target.x),r=Ja(e,t.target.y);return`${n}% ${r}%`}},$m={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ue.parse(e);if(o.length>5)return r;const i=Ue.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=q(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class zm extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;Yf(Km),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),wn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||H.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Qa(e){const[t,n]=zs(),r=P.useContext(lr);return A.jsx(zm,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(ti),isPresent:t,safeToRemove:n})}const Km={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:$m};function Hm(e,t,n){const r=ue(e)?e:Tt(e);return r.start(oo("",r,t,n)),r.animation}function Gm(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Wm=(e,t)=>e.depth-t.depth;class qm{constructor(){this.children=[],this.isDirty=!1}add(t){Fr(this.children,t),this.isDirty=!0}remove(t){jr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Wm),this.isDirty=!1,this.children.forEach(t)}}function Ym(e,t){const n=Ae.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(je(r),e(i-t))};return H.read(r,!0),()=>je(r)}const el=["TopLeft","TopRight","BottomLeft","BottomRight"],Xm=el.length,tl=e=>typeof e=="string"?parseFloat(e):e,nl=e=>typeof e=="number"||O.test(e);function Zm(e,t,n,r,o,i){o?(e.opacity=q(0,n.opacity!==void 0?n.opacity:1,Jm(r)),e.opacityExit=q(t.opacity!==void 0?t.opacity:1,0,Qm(r))):i&&(e.opacity=q(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<Xm;s++){const a=`border${el[s]}Radius`;let l=rl(t,a),c=rl(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||nl(l)===nl(c)?(e[a]=Math.max(q(tl(l),tl(c),r),0),(Ce.test(c)||Ce.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function rl(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Jm=ol(0,.5,Bi),Qm=ol(.5,.95,pe);function ol(e,t,n){return r=>r<e?0:r>t?1:n(tt(e,t,r))}function sl(e,t){e.min=t.min,e.max=t.max}function xe(e,t){sl(e.x,t.x),sl(e.y,t.y)}function il(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function al(e,t,n,r,o){return e-=t,e=bn(e,1/n,r),o!==void 0&&(e=bn(e,1/o,r)),e}function eg(e,t=0,n=1,r=.5,o,i=e,s=e){if(Ce.test(t)&&(t=parseFloat(t),t=q(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=q(i.min,i.max,r);e===i&&(a-=t),e.min=al(e.min,t,n,a,o),e.max=al(e.max,t,n,a,o)}function ll(e,t,[n,r,o],i,s){eg(e,t[n],t[r],t[o],t.scale,i,s)}const tg=["x","scaleX","originX"],ng=["y","scaleY","originY"];function cl(e,t,n,r){ll(e.x,t,tg,n?n.x:void 0,r?r.x:void 0),ll(e.y,t,ng,n?n.y:void 0,r?r.y:void 0)}function ul(e){return e.translate===0&&e.scale===1}function dl(e){return ul(e.x)&&ul(e.y)}function fl(e,t){return e.min===t.min&&e.max===t.max}function rg(e,t){return fl(e.x,t.x)&&fl(e.y,t.y)}function hl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pl(e,t){return hl(e.x,t.x)&&hl(e.y,t.y)}function ml(e){return fe(e.x)/fe(e.y)}function gl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class og{constructor(){this.members=[]}add(t){Fr(this.members,t),t.scheduleRender()}remove(t){if(jr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sg(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ho=["","X","Y","Z"],ig={visibility:"hidden"},yl=1e3;let ag=0;function po(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Oi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",H,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vl(r)}function bl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=ag++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ug),this.nodes.forEach(mg),this.nodes.forEach(gg),this.nodes.forEach(dg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new qm)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Nr),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Gm(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Ym(f,250),wn.hasAnimatedSinceResize&&(wn.hasAnimatedSinceResize=!1,this.nodes.forEach(wl))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||wg,{onLayoutAnimationStart:v,onLayoutAnimationComplete:m}=u.getProps(),b=!this.targetLayout||!pl(this.targetLayout,p),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const S={...Dr(y,"layout"),onPlay:v,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||wl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,je(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yg),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xl);return}this.isUpdating||this.nodes.forEach(hg),this.isUpdating=!1,this.nodes.forEach(pg),this.nodes.forEach(lg),this.nodes.forEach(cg),this.clearAllSnapshots();const a=Ae.now();se.delta=Ve(0,1e3/60,a-se.timestamp),se.timestamp=a,se.isProcessing=!0,hr.update.process(se),hr.preRender.process(se),hr.render.process(se),se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fg),this.sharedNodes.forEach(vg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,H.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){H.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!fe(this.snapshot.measuredBox.x)&&!fe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!dl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||We(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Tg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:a}=this.options;if(!a)return J();const l=a.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(Sg))){const{scroll:u}=this.root;u&&(ct(l.x,u.offset.x),ct(l.y,u.offset.y))}return l}removeElementScroll(s){var a;const l=J();if(xe(l,s),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&xe(l,s),ct(l.x,d.offset.x),ct(l.y,d.offset.y))}return l}applyTransform(s,a=!1){const l=J();xe(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ut(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),We(u.latestValues)&&ut(l,u.latestValues)}return We(this.latestValues)&&ut(l,this.latestValues),l}removeTransform(s){const a=J();xe(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!We(c.latestValues))continue;uo(c.latestValues)&&c.updateSnapshot();const u=J(),d=c.measurePageBox();xe(u,d),cl(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return We(this.latestValues)&&cl(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=se.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Vt(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xe(this.target,this.layout.layoutBox),Ha(this.target,this.targetDelta)):xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Vt(this.relativeTargetOrigin,this.target,h.target),xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||uo(this.parent.latestValues)||$a(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===se.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;xe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Rm(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=J());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(il(this.prevProjectionDelta.x,this.projectionDelta.x),il(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!gl(this.projectionDelta.x,this.prevProjectionDelta.x)||!gl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lt(),this.projectionDelta=lt(),this.projectionDeltaWithTransform=lt()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=lt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=J(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=h!==p,v=this.getStack(),m=!v||v.members.length<=1,b=!!(y&&!m&&this.options.crossfade===!0&&!this.path.some(xg));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const g=S/1e3;Tl(d.x,s.x,g),Tl(d.y,s.y,g),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bg(this.relativeTarget,this.relativeTargetOrigin,f,g),x&&rg(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=J()),xe(x,this.relativeTarget)),y&&(this.animationValues=u,Zm(u,c,this.latestValues,g,b,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=g},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(je(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=H.update(()=>{wn.hasAnimatedSinceResize=!0,this.currentAnimation=Hm(0,yl,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(yl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Al(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||J();const d=fe(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=fe(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}xe(a,l),ut(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new og),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&po("z",s,c,this.animationValues);for(let u=0;u<ho.length;u++)po(`rotate${ho[u]}`,s,c,this.animationValues),po(`skew${ho[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ig;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=dn(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=dn(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!We(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=sg(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in yt){if(f[y]===void 0)continue;const{correct:v,applyTo:m,isCSSVariable:b}=yt[y],x=c.transform==="none"?f[y]:v(f[y],d);if(m){const S=m.length;for(let g=0;g<S;g++)c[m[g]]=x}else b?this.options.visualElement.renderState.vars[y]=x:c[y]=x}return this.options.layoutId&&(c.pointerEvents=d===this?dn(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(xl),this.root.sharedNodes.clear()}}}function lg(e){e.updateLayout()}function cg(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?be(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=fe(f);f.min=r[d].min,f.max=f.min+h}):Al(i,n.layoutBox,r)&&be(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=fe(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=lt();Mt(a,r,n.layoutBox);const l=lt();s?Mt(l,e.applyTransform(o,!0),n.measuredBox):Mt(l,r,n.layoutBox);const c=!dl(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=J();Vt(p,n.layoutBox,f.layoutBox);const y=J();Vt(y,r,h.layoutBox),pl(p,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function ug(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function fg(e){e.clearSnapshot()}function xl(e){e.clearMeasurements()}function hg(e){e.isLayoutDirty=!1}function pg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mg(e){e.resolveTargetDelta()}function gg(e){e.calcProjection()}function yg(e){e.resetSkewAndRotation()}function vg(e){e.removeLeadSnapshot()}function Tl(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sl(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function bg(e,t,n,r){Sl(e.x,t.x,n.x,r),Sl(e.y,t.y,n.y,r)}function xg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wg={duration:.45,ease:[.4,0,.1,1]},El=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Pl=El("applewebkit/")&&!El("chrome/")?Math.round:pe;function Cl(e){e.min=Pl(e.min),e.max=Pl(e.max)}function Tg(e){Cl(e.x),Cl(e.y)}function Al(e,t,n){return e==="position"||e==="preserve-aspect"&&!Pm(ml(t),ml(n),.2)}function Sg(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Eg=bl({attachResizeListener:(e,t)=>At(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mo={current:void 0},kl=bl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mo.current){const e=new Eg({});e.mount(window),e.setOptions({layoutScroll:!0}),mo.current=e}return mo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Pg={pan:{Feature:_m},drag:{Feature:Bm,ProjectionNode:kl,MeasureLayout:Qa}};function Dl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&H.postRender(()=>i(t,kt(t)))}class Cg extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=Ch(t,(n,r)=>(Dl(this.node,r,"Start"),o=>Dl(this.node,o,"End"))))}unmount(){}}class Ag extends Be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ct(At(this.node.current,"focus",()=>this.onFocus()),At(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ml(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&H.postRender(()=>i(t,kt(t)))}class kg extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=Mh(t,(n,r)=>(Ml(this.node,r,"Start"),(o,{success:i})=>Ml(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const go=new WeakMap,yo=new WeakMap,Dg=e=>{const t=go.get(e.target);t&&t(e)},Mg=e=>{e.forEach(Dg)};function Vg({root:e,...t}){const n=e||document;yo.has(n)||yo.set(n,{});const r=yo.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Mg,{root:e,...t})),r[o]}function Lg(e,t,n){const r=Vg(t);return go.set(e,n),r.observe(e),()=>{go.delete(e),r.unobserve(e)}}const Og={some:0,all:1};class Ig extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Og[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lg(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Rg(t,n))&&this.startObserver()}unmount(){}}function Rg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Fg={inView:{Feature:Ig},tap:{Feature:kg},focus:{Feature:Ag},hover:{Feature:Cg}},jg={layout:{ProjectionNode:kl,MeasureLayout:Qa}},vo={current:null},Vl={current:!1};function Ng(){if(Vl.current=!0,!!dr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vo.current=e.matches;e.addListener(t),t()}else vo.current=!1}const Ug=[...oa,de,Ue],Bg=e=>Ug.find(ra(e)),_g=new WeakMap;function $g(e,t,n){for(const r in t){const o=t[r],i=n[r];if(ue(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&sn(o.version==="12.4.0",`Attempting to mix Motion versions ${o.version} with 12.4.0 may not work as expected.`);else if(ue(i))e.addValue(r,Tt(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Tt(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ll=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Xr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ae.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,H.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=s;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=cn(n),this.isVariantNode=Js(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&ue(p)&&p.set(l[h],!1)}}mount(t){this.current=t,_g.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Vl.current||Ng(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:vo.current,process.env.NODE_ENV!=="production"&&sn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),je(this.notifyUpdate),je(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ze.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&H.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in nt){const n=nt[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ll.length;r++){const o=Ll[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=$g(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ta(o)||$i(o))?o=parseFloat(o):!Bg(o)&&Ue.test(n)&&(o=Yi(t,n)),this.setBaseTarget(t,ue(o)?o.get():o)),ue(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Cr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ue(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Nr),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ol extends zg{constructor(){super(...arguments),this.KeyframeResolver=ia}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ue(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Kg(e){return window.getComputedStyle(e)}class Hg extends Ol{constructor(){super(...arguments),this.type="html",this.renderInstance=pi}readValueFromInstance(t,n){if(ze.has(n)){const r=Wr(n);return r&&r.default||0}else{const r=Kg(t),o=(vr(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ya(t,n)}build(t,n,r){wr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return kr(t,n,r)}}class Gg extends Ol{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&hi(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ze.has(n)){const r=Wr(n);return r&&r.default||0}return n=mi.has(n)?n:gr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return yi(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&H.postRender(this.updateDimensions)}build(t,n,r){Er(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){gi(t,n,r,o)}mount(t){this.isSVGTag=Pr(t.tagName),super.mount(t)}}const Wg=(e,t)=>Sr(e)?new Gg(t):new Hg(t,{allowProjection:e!==P.Fragment}),qg=bh({...gm,...Fg,...Pg,...jg},Wg),bo=Ff(qg),Yg=({conditionNameToOperators:e,setConditionState:t,conditionState:n,tailwindClassDefinitions:r,iconDefinitions:o})=>{const[i,s]=P.useState(n.map(u=>u.value.map(d=>d.includes(",")?`"${d}"`:d).join(", "))),a=(u,d,f)=>{const h=[...n];if(d==="value"){const p=[...i];p[u]=f,s(p);const y=f.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/).map(v=>{const m=v.trim(),b=m.match(/^"(.*)"$/);return b?b[1]:m}).filter(v=>v!=="");h[u]={...h[u],[d]:y}}else h[u]={...h[u],[d]:f};t(h)},l=()=>{const u={field:Object.keys(e)[0],operator:e[Object.keys(e)[0]][0],value:[]};t([...n,u]),s([...i,""])},c=u=>{const d=n.filter((h,p)=>p!==u);t(d);const f=i.filter((h,p)=>p!==u);s(f)};return A.jsxs("div",{className:"flex flex-col gap-2 ",children:[A.jsx(kf,{mode:"popLayout",children:n.map((u,d)=>A.jsxs(bo.div,{initial:{opacity:0,height:0,scale:.8},animate:{opacity:1,height:"auto",scale:1},exit:{opacity:0,height:0,scale:.8},transition:{duration:.2},className:`grid ${n.length>1?"grid-cols-[1fr_1fr_1fr_auto]":"grid-cols-[1fr_1fr_1fr]"} gap-4`,children:[A.jsx("select",{className:"p-2 border rounded-lg",value:u.field,onChange:f=>a(d,"field",f.target.value),children:Object.keys(e).map(f=>A.jsx("option",{children:f},f))}),A.jsx("select",{className:"p-2 border rounded-lg",value:u.operator,onChange:f=>a(d,"operator",f.target.value),children:e[u.field].map(f=>A.jsx("option",{children:f},f))}),A.jsx("input",{type:"text",className:"p-2 border rounded-lg",placeholder:'Enter values separated by commas. Use quotes for values containing commas: "San Francisco, CA"',value:i[d]||"",onChange:f=>a(d,"value",f.target.value)}),n.length>1&&A.jsx(bo.button,{whileHover:{scale:1.1},whileTap:{scale:.95},onClick:()=>c(d),className:"p-2 hover:text-red-600","aria-label":"Delete condition",children:A.jsx(o.CloseButton,{})})]},d))}),A.jsx("div",{children:A.jsxs(bo.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:l,className:ar("flex items-center px-4 py-2 ",r==null?void 0:r.SecondaryButton,r==null?void 0:r.SecondaryButtonHover),children:[A.jsx("span",{className:"mr-2",children:"+"}),"Add Condition"]})})]})},Xg=({nameAndDescriptionState:e,setNameAndDescriptionState:t})=>A.jsx("div",{children:A.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[A.jsxs("div",{children:[A.jsx("label",{className:"block text-sm font-medium mb-2",children:"Name"}),A.jsx("input",{type:"text",placeholder:"Segment Name",className:"w-full p-2 border rounded-lg",value:e.name,onChange:n=>t({...e,name:n.target.value})})]}),A.jsxs("div",{children:[A.jsx("label",{className:"block text-sm font-medium mb-2",children:"Description"}),A.jsx("input",{type:"text",placeholder:"Description",className:"w-full p-2 border rounded-lg",value:e.description,onChange:n=>t({...e,description:n.target.value})})]})]})}),xo={container:"relative p-6 border border-gray-200 rounded-lg"},Zg=({onClose:e,tailwindClassDefinitions:t,iconDefinitions:n})=>{const{segmentsConditions:r,isLoading:o,createSegment:i,isCreating:s}=Vd(),[a,l]=P.useState(!1),c=$d(t),u=zd(n),[d,f]=P.useState([]),[h,p]=P.useState({name:"",description:""}),[y,v]=P.useState({}),m=h.name&&h.description&&d.some(x=>x.field&&x.operator&&x.value.length>0);P.useEffect(()=>{r&&(v(r.conditions.reduce((x,S)=>(x[S.name]=S.operators,x),{})),f([{field:r.conditions[0].name,operator:r.conditions[0].operators[0],value:[]}]))},[r]);const b=()=>{if(!h.name||!h.description){console.error("Name and description are required"),e==null||e("error");return}l(!0);const x={name:h.name,description:h.description,conditions:d};i(x,{onSuccess:S=>{S.id?e==null||e(S.id):e==null||e("error")},onError:()=>{console.error("Error creating segment"),e==null||e("error")},onSettled:()=>{f([]),p({name:"",description:""})}})};return o?A.jsx("div",{className:xo.container,children:A.jsx(Os,{text:["Fetching Segment data","Finishing up"]})}):s||a?A.jsx("div",{className:xo.container,children:A.jsx(Os,{text:["Creating Segment","Finishing up"]})}):A.jsxs("div",{className:xo.container,children:[A.jsx("button",{onClick:()=>e==null?void 0:e(!1),className:"absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 transition-colors duration-200","aria-label":"Close",children:A.jsx(u.CloseButton,{})}),A.jsxs("div",{className:"space-y-6",children:[A.jsx(Xg,{nameAndDescriptionState:h,setNameAndDescriptionState:p}),A.jsx(Yg,{conditionNameToOperators:y,conditionState:d,setConditionState:f,tailwindClassDefinitions:c,iconDefinitions:u}),A.jsx(Sf,{onClose:e,isDisabled:!m,setClickedCreate:b,tailwindClassDefinitions:c})]})]})};re.ReachProvider=kd,re.SegmentBuilder=Zg,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
174
|
+
|
|
175
|
+
& .tsqd-button-transition-exit-to,
|
|
176
|
+
& .tsqd-button-transition-enter {
|
|
177
|
+
transform: ${"relative"===i()?"none;":"top-left"===i()?"translateX(-72px);":"top-right"===i()?"translateX(72px);":"translateY(72px);"};
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
`,"tsqd-transitions-container")))),u)];var u},hz=e=>{const t=AN(),n=_N(),r=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,o=_e((()=>"dark"===n()?Oz(r):Mz(r)));return Ne((()=>{const e=t().pipWindow,n=()=>{e&&lz(e.innerWidth)};e&&(e.addEventListener("resize",n),n()),Ie((()=>{e&&e.removeEventListener("resize",n)}))})),(i=Cq()).style.setProperty("--tsqd-font-size","16px"),i.style.setProperty("max-height","100vh"),i.style.setProperty("height","100vh"),i.style.setProperty("width","100vw"),Vt(i,(()=>e.children)),Ae((()=>Ft(i,a_(o().panel,(()=>{const{colors:e}=sI,t=(e,t)=>"dark"===n()?t:e;return az()<kN?r`
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
background-color: ${t(e.gray[300],e.gray[600])};
|
|
183
|
+
`:r`
|
|
184
|
+
flex-direction: row;
|
|
185
|
+
background-color: ${t(e.gray[200],e.darkGray[900])};
|
|
186
|
+
`})(),{[r`
|
|
187
|
+
min-width: min-content;
|
|
188
|
+
`]:az()<700},"tsqd-main-panel")))),i;var i},fz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n)));let o;Fe((()=>{w_(o,(({width:e},t)=>{t===o&&lz(e)}))}));return i=Cq(),"function"==typeof o?zt(o,i):o=i,i.style.setProperty("--tsqd-font-size","16px"),Vt(i,(()=>e.children)),Ae((()=>Ft(i,a_(r().parentPanel,(()=>{const{colors:e}=sI,r=(e,n)=>"dark"===t()?n:e;return az()<kN?n`
|
|
189
|
+
flex-direction: column;
|
|
190
|
+
background-color: ${r(e.gray[300],e.gray[600])};
|
|
191
|
+
`:n`
|
|
192
|
+
flex-direction: row;
|
|
193
|
+
background-color: ${r(e.gray[200],e.darkGray[900])};
|
|
194
|
+
`})(),{[n`
|
|
195
|
+
min-width: min-content;
|
|
196
|
+
`]:az()<700},"tsqd-main-panel")))),i;var i},pz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n))),[o,i]=Me(!1),s=_e((()=>e.localStore.position||TN().position||CN)),a=t=>{const n=t.currentTarget.parentElement;if(!n)return;i(!0);const{height:r,width:a}=n.getBoundingClientRect(),l=t.clientX,c=t.clientY;let u=0;const d=nr(3.5),h=nr(12),f=t=>{if(t.preventDefault(),"left"===s()||"right"===s()){const r="right"===s()?l-t.clientX:t.clientX-l;u=Math.round(a+r),u<h&&(u=h),e.setLocalStore("width",String(Math.round(u)));const o=n.getBoundingClientRect().width;Number(e.localStore.width)<o&&e.setLocalStore("width",String(o))}else{const n="bottom"===s()?c-t.clientY:t.clientY-c;u=Math.round(r+n),u<d&&(u=d,oz(null)),e.setLocalStore("height",String(Math.round(u)))}},p=()=>{o()&&i(!1),document.removeEventListener("mousemove",f,!1),document.removeEventListener("mouseUp",p,!1)};document.addEventListener("mousemove",f,!1),document.addEventListener("mouseup",p,!1)};let l;Fe((()=>{w_(l,(({width:e},t)=>{t===l&&lz(e)}))})),Ne((()=>{const t=l.parentElement?.parentElement?.parentElement;if(!t)return;const n=`${"padding"}${(r=e.localStore.position||CN).charAt(0).toUpperCase()+r.slice(1)}`;var r;const o="left"===e.localStore.position||"right"===e.localStore.position,i=(({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o})=>({padding:e,paddingTop:t,paddingBottom:n,paddingLeft:r,paddingRight:o}))(t.style);t.style[n]=`${o?e.localStore.width:e.localStore.height}px`,Ie((()=>{Object.entries(i).forEach((([e,n])=>{t.style[e]=n}))}))}));return c=Eq(),d=(u=c.firstChild).nextSibling,"function"==typeof l?zt(l,c):l=c,u.$$mousedown=a,d.$$click=()=>e.setLocalStore("open","false"),Vt(d,ut(AI,{})),Vt(c,ut(mz,e),null),Ae((o=>{var i=a_(r().panel,r()[`panel-position-${s()}`],(()=>{const{colors:e}=sI,r=(e,n)=>"dark"===t()?n:e;return az()<kN?n`
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
background-color: ${r(e.gray[300],e.gray[600])};
|
|
199
|
+
`:n`
|
|
200
|
+
flex-direction: row;
|
|
201
|
+
background-color: ${r(e.gray[200],e.darkGray[900])};
|
|
202
|
+
`})(),{[n`
|
|
203
|
+
min-width: min-content;
|
|
204
|
+
`]:az()<700&&("right"===s()||"left"===s())},"tsqd-main-panel"),a="bottom"===s()||"top"===s()?`${e.localStore.height||500}px`:"auto",l="right"===s()||"left"===s()?`${e.localStore.width||500}px`:"auto",h=a_(r().dragHandle,r()[`dragHandle-position-${s()}`],"tsqd-drag-handle"),f=a_(r().closeBtn,r()[`closeBtn-position-${s()}`],"tsqd-minimize-btn");return i!==o.e&&Ft(c,o.e=i),a!==o.t&&(null!=(o.t=a)?c.style.setProperty("height",a):c.style.removeProperty("height")),l!==o.a&&(null!=(o.a=l)?c.style.setProperty("width",l):c.style.removeProperty("width")),h!==o.o&&Ft(u,o.o=h),f!==o.i&&Ft(d,o.i=f),o}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),c;var c,u,d},mz=e=>{let t;Cz(),Dz();const n=_N(),r=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,o=_e((()=>"dark"===n()?Oz(r):Mz(r))),i=AN(),[s,a]=Me("queries"),l=_e((()=>e.localStore.sort||PN)),c=_e((()=>Number(e.localStore.sortOrder)||1)),u=_e((()=>e.localStore.mutationSort||DN)),d=_e((()=>Number(e.localStore.mutationSortOrder)||1)),h=_e((()=>Jn[l()])),f=_e((()=>tr[u()])),p=_e((()=>TN().onlineManager)),m=_e((()=>TN().client.getQueryCache())),g=_e((()=>TN().client.getMutationCache())),y=Ez((e=>e().getAll().length),!1),v=_e($e((()=>[y(),e.localStore.filter,l(),c()]),(()=>{const t=m().getAll(),n=e.localStore.filter?t.filter((t=>HN(t.queryHash,e.localStore.filter||"").passed)):[...t];return h()?n.sort(((e,t)=>h()(e,t)*c())):n}))),b=jz((e=>e().getAll().length),!1),x=_e($e((()=>[b(),e.localStore.mutationFilter,u(),d()]),(()=>{const t=g().getAll(),n=e.localStore.mutationFilter?t.filter((t=>HN(`${t.options.mutationKey?JSON.stringify(t.options.mutationKey)+" - ":""}${new Date(t.state.submittedAt).toLocaleString()}`,e.localStore.mutationFilter||"").passed)):[...t];return f()?n.sort(((e,t)=>f()(e,t)*d())):n}))),w=t=>{e.setLocalStore("position",t)},S=e=>{const n=getComputedStyle(t).getPropertyValue("--tsqd-font-size");e.style.setProperty("--tsqd-font-size",n)};return[(C=Bq(),E=C.firstChild,P=E.firstChild,D=P.firstChild,j=D.firstChild,T=j.nextSibling,M=T.firstChild,O=E.nextSibling,A=O.firstChild,N=A.firstChild,_=N.firstChild,R=N.nextSibling,L=R.nextSibling,$=A.nextSibling,F=$.firstChild,I=F.nextSibling,"function"==typeof t?zt(t,C):t=C,D.$$click=()=>{i().pipWindow||e.showPanelViewOnly?e.onClose&&e.onClose():e.setLocalStore("open","false")},Vt(T,(()=>TN().queryFlavor),M),Vt(T,(()=>TN().version),null),Vt(P,ut(A$.Root,{get class(){return a_(o().viewToggle)},get value(){return s()},onChange:e=>{a(e),oz(null),sz(null)},get children(){return[ut(A$.Item,{value:"queries",class:"tsqd-radio-toggle",get children(){return[ut(A$.ItemInput,{}),ut(A$.ItemControl,{get children(){return ut(A$.ItemIndicator,{})}}),ut(A$.ItemLabel,{title:"Toggle Queries View",children:"Queries"})]}}),ut(A$.Item,{value:"mutations",class:"tsqd-radio-toggle",get children(){return[ut(A$.ItemInput,{}),ut(A$.ItemControl,{get children(){return ut(A$.ItemIndicator,{})}}),ut(A$.ItemLabel,{title:"Toggle Mutations View",children:"Mutations"})]}})]}}),null),Vt(E,ut(kt,{get when(){return"queries"===s()},get children(){return ut(vz,{})}}),null),Vt(E,ut(kt,{get when(){return"mutations"===s()},get children(){return ut(bz,{})}}),null),Vt(N,ut(MI,{}),_),_.$$input=t=>{"queries"===s()?e.setLocalStore("filter",t.currentTarget.value):e.setLocalStore("mutationFilter",t.currentTarget.value)},Vt(R,ut(kt,{get when(){return"queries"===s()},get children(){var t=Pq();return t.addEventListener("change",(t=>{e.setLocalStore("sort",t.currentTarget.value)})),Vt(t,(()=>Object.keys(Jn).map((e=>{return(t=Uq()).value=e,Vt(t,e,null),t;var t})))),Ae((()=>t.value=l())),t}}),null),Vt(R,ut(kt,{get when(){return"mutations"===s()},get children(){var t=Dq();return t.addEventListener("change",(t=>{e.setLocalStore("mutationSort",t.currentTarget.value)})),Vt(t,(()=>Object.keys(tr).map((e=>{return(t=Uq()).value=e,Vt(t,e,null),t;var t})))),Ae((()=>t.value=u())),t}}),null),Vt(R,ut(AI,{}),null),L.$$click=()=>{"queries"===s()?e.setLocalStore("sortOrder",String(-1*c())):e.setLocalStore("mutationSortOrder",String(-1*d()))},Vt(L,ut(kt,{get when(){return 1===("queries"===s()?c():d())},get children(){return[jq(),ut(NI,{})]}}),null),Vt(L,ut(kt,{get when(){return-1===("queries"===s()?c():d())},get children(){return[Tq(),ut(_I,{})]}}),null),F.$$click=()=>{"queries"===s()?m().clear():g().clear()},Vt(F,ut(OI,{})),I.$$click=()=>{cz()?(p().setOnline(!0),uz(!1)):(p().setOnline(!1),uz(!0))},Vt(I,(k=_e((()=>!!cz())),()=>k()?ut(zI,{}):ut(qI,{}))),Vt($,ut(kt,{get when(){return _e((()=>!i().pipWindow))()&&!i().disabled},get children(){var t=Mq();return t.$$click=()=>{i().requestPipWindow(Number(window.innerWidth),Number(e.localStore.height??500))},Vt(t,ut(BI,{})),Ae((()=>Ft(t,a_(o().actionsBtn,"tsqd-actions-btn","tsqd-action-open-pip")))),t}}),null),Vt($,ut(nI.Root,{gutter:4,get children(){return[ut(nI.Trigger,{get class(){return a_(o().actionsBtn,"tsqd-actions-btn","tsqd-action-settings")},get children(){return ut(VI,{})}}),ut(nI.Portal,{ref:e=>S(e),get mount(){return _e((()=>!!i().pipWindow))()?i().pipWindow.document.body:document.body},get children(){return ut(nI.Content,{get class(){return a_(o().settingsMenu,"tsqd-settings-menu")},get children(){return[(t=Oq(),Ae((()=>Ft(t,a_(o().settingsMenuHeader,"tsqd-settings-menu-header")))),t),ut(kt,{get when(){return!e.showPanelViewOnly},get children(){return ut(nI.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[ut(nI.SubTrigger,{get class(){return a_(o().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[Aq(),ut(AI,{})]}}),ut(nI.Portal,{ref:e=>S(e),get mount(){return _e((()=>!!i().pipWindow))()?i().pipWindow.document.body:document.body},get children(){return ut(nI.SubContent,{get class(){return a_(o().settingsMenu,"tsqd-settings-submenu")},get children(){return[ut(nI.Item,{onSelect:()=>{w("top")},as:"button",get class(){return a_(o().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[Nq(),ut(NI,{})]}}),ut(nI.Item,{onSelect:()=>{w("bottom")},as:"button",get class(){return a_(o().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[_q(),ut(_I,{})]}}),ut(nI.Item,{onSelect:()=>{w("left")},as:"button",get class(){return a_(o().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[Rq(),ut(RI,{})]}}),ut(nI.Item,{onSelect:()=>{w("right")},as:"button",get class(){return a_(o().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-right")},get children(){return[Lq(),ut(LI,{})]}})]}})}})]}})}}),ut(nI.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[ut(nI.SubTrigger,{get class(){return a_(o().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[$q(),ut(AI,{})]}}),ut(nI.Portal,{ref:e=>S(e),get mount(){return _e((()=>!!i().pipWindow))()?i().pipWindow.document.body:document.body},get children(){return ut(nI.SubContent,{get class(){return a_(o().settingsMenu,"tsqd-settings-submenu")},get children(){return[ut(nI.Item,{onSelect:()=>{e.setLocalStore("theme_preference","light")},as:"button",get class(){return a_(o().settingsSubButton,"light"===e.localStore.theme_preference&&o().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[Fq(),ut($I,{})]}}),ut(nI.Item,{onSelect:()=>{e.setLocalStore("theme_preference","dark")},as:"button",get class(){return a_(o().settingsSubButton,"dark"===e.localStore.theme_preference&&o().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[Iq(),ut(FI,{})]}}),ut(nI.Item,{onSelect:()=>{e.setLocalStore("theme_preference","system")},as:"button",get class(){return a_(o().settingsSubButton,"system"===e.localStore.theme_preference&&o().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[qq(),ut(II,{})]}})]}})}})]}})];var t}})}})]}}),null),Vt(C,ut(kt,{get when(){return"queries"===s()},get children(){var e=zq();return Vt(e.firstChild,ut(b_,{by:e=>e.queryHash,get each(){return v()},children:e=>ut(gz,{get query(){return e()}})})),Ae((()=>Ft(e,a_(o().overflowQueryContainer,"tsqd-queries-overflow-container")))),e}}),null),Vt(C,ut(kt,{get when(){return"mutations"===s()},get children(){var e=Vq();return Vt(e.firstChild,ut(b_,{by:e=>e.mutationId,get each(){return x()},children:e=>ut(yz,{get mutation(){return e()}})})),Ae((()=>Ft(e,a_(o().overflowQueryContainer,"tsqd-mutations-overflow-container")))),e}}),null),Ae((e=>{var t=a_(o().queriesContainer,az()<kN&&(rz()||iz())&&r`
|
|
205
|
+
height: 50%;
|
|
206
|
+
max-height: 50%;
|
|
207
|
+
`,az()<kN&&!(rz()||iz())&&r`
|
|
208
|
+
height: 100%;
|
|
209
|
+
max-height: 100%;
|
|
210
|
+
`,"tsqd-queries-container"),n=a_(o().row,"tsqd-header"),i=o().logoAndToggleContainer,a=a_(o().logo,"tsqd-text-logo-container"),l=a_(o().tanstackLogo,"tsqd-text-logo-tanstack"),u=a_(o().queryFlavorLogo,"tsqd-text-logo-query-flavor"),h=a_(o().row,"tsqd-filters-actions-container"),f=a_(o().filtersContainer,"tsqd-filters-container"),p=a_(o().filterInput,"tsqd-query-filter-textfield-container"),m=a_("tsqd-query-filter-textfield"),g=a_(o().filterSelect,"tsqd-query-filter-sort-container"),y="Sort order "+(-1===("queries"===s()?c():d())?"descending":"ascending"),v=-1===("queries"===s()?c():d()),b=a_(o().actionsContainer,"tsqd-actions-container"),x=a_(o().actionsBtn,"tsqd-actions-btn","tsqd-action-clear-cache"),w=`Clear ${s()} cache`,S=a_(o().actionsBtn,cz()&&o().actionsBtnOffline,"tsqd-actions-btn","tsqd-action-mock-offline-behavior"),k=cz()?"Unset offline mocking behavior":"Mock offline behavior",M=cz(),q=cz()?"Unset offline mocking behavior":"Mock offline behavior";return t!==e.e&&Ft(C,e.e=t),n!==e.t&&Ft(E,e.t=n),i!==e.a&&Ft(P,e.a=i),a!==e.o&&Ft(D,e.o=a),l!==e.i&&Ft(j,e.i=l),u!==e.n&&Ft(T,e.n=u),h!==e.s&&Ft(O,e.s=h),f!==e.h&&Ft(A,e.h=f),p!==e.r&&Ft(N,e.r=p),m!==e.d&&Ft(_,e.d=m),g!==e.l&&Ft(R,e.l=g),y!==e.u&&$t(L,"aria-label",e.u=y),v!==e.c&&$t(L,"aria-pressed",e.c=v),b!==e.w&&Ft($,e.w=b),x!==e.m&&Ft(F,e.m=x),w!==e.f&&$t(F,"title",e.f=w),S!==e.y&&Ft(I,e.y=S),k!==e.g&&$t(I,"aria-label",e.g=k),M!==e.p&&$t(I,"aria-pressed",e.p=M),q!==e.b&&$t(I,"title",e.b=q),e}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),Ae((()=>_.value="queries"===s()?e.localStore.filter||"":e.localStore.mutationFilter||"")),C),ut(kt,{get when(){return _e((()=>"queries"===s()))()&&rz()},get children(){return ut(wz,{})}}),ut(kt,{get when(){return _e((()=>"mutations"===s()))()&&iz()},get children(){return ut(Sz,{})}})];var k,C,E,P,D,j,T,M,O,A,N,_,R,L,$,F,I},gz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n))),{colors:o,alpha:i}=sI,s=(e,n)=>"dark"===t()?n:e,a=Ez((t=>t().find({queryKey:e.query.queryKey})?.state),!0,(t=>t.query.queryHash===e.query.queryHash)),l=Ez((t=>t().find({queryKey:e.query.queryKey})?.isDisabled()??!1),!0,(t=>t.query.queryHash===e.query.queryHash)),c=Ez((t=>t().find({queryKey:e.query.queryKey})?.isStale()??!1),!0,(t=>t.query.queryHash===e.query.queryHash)),u=Ez((t=>t().find({queryKey:e.query.queryKey})?.getObserversCount()??0),!0,(t=>t.query.queryHash===e.query.queryHash)),d=_e((()=>function({queryState:e,observerCount:t,isStale:n}){return"fetching"===e.fetchStatus?"blue":t?"paused"===e.fetchStatus?"purple":n?"yellow":"green":"gray"}({queryState:a(),observerCount:u(),isStale:c()})));return ut(kt,{get when(){return a()},get children(){var t=Hq(),a=t.firstChild,c=a.nextSibling;return t.$$click=()=>oz(e.query.queryHash===rz()?null:e.query.queryHash),Vt(a,u),Vt(c,(()=>e.query.queryHash)),Vt(t,ut(kt,{get when(){return l()},get children(){return Kq()}}),null),Ae((l=>{var c=a_(r().queryRow,rz()===e.query.queryHash&&r().selectedQueryRow,"tsqd-query-row"),u=`Query key ${e.query.queryHash}`,h=a_("gray"===d()?n`
|
|
211
|
+
background-color: ${s(o[d()][200],o[d()][700])};
|
|
212
|
+
color: ${s(o[d()][700],o[d()][300])};
|
|
213
|
+
`:n`
|
|
214
|
+
background-color: ${s(o[d()][200]+i[80],o[d()][900])};
|
|
215
|
+
color: ${s(o[d()][800],o[d()][300])};
|
|
216
|
+
`,"tsqd-query-observer-count");return c!==l.e&&Ft(t,l.e=c),u!==l.t&&$t(t,"aria-label",l.t=u),h!==l.a&&Ft(a,l.a=h),l}),{e:void 0,t:void 0,a:void 0}),t}})},yz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n))),{colors:o,alpha:i}=sI,s=(e,n)=>"dark"===t()?n:e,a=jz((t=>{const n=t().getAll().find((t=>t.mutationId===e.mutation.mutationId));return n?.state})),l=jz((t=>{const n=t().getAll().find((t=>t.mutationId===e.mutation.mutationId));return!!n&&n.state.isPaused})),c=jz((t=>{const n=t().getAll().find((t=>t.mutationId===e.mutation.mutationId));return n?n.state.status:"idle"})),u=_e((()=>Gn({isPaused:l(),status:c()})));return ut(kt,{get when(){return a()},get children(){var t=Hq(),a=t.firstChild,l=a.nextSibling;return t.$$click=()=>{sz(e.mutation.mutationId===iz()?null:e.mutation.mutationId)},Vt(a,ut(kt,{get when(){return"purple"===u()},get children(){return ut(ZI,{})}}),null),Vt(a,ut(kt,{get when(){return"green"===u()},get children(){return ut(QI,{})}}),null),Vt(a,ut(kt,{get when(){return"red"===u()},get children(){return ut(JI,{})}}),null),Vt(a,ut(kt,{get when(){return"yellow"===u()},get children(){return ut(XI,{})}}),null),Vt(l,ut(kt,{get when(){return e.mutation.options.mutationKey},get children(){return[_e((()=>JSON.stringify(e.mutation.options.mutationKey)))," -"," "]}}),null),Vt(l,(()=>new Date(e.mutation.state.submittedAt).toLocaleString()),null),Ae((l=>{var c=a_(r().queryRow,iz()===e.mutation.mutationId&&r().selectedQueryRow,"tsqd-query-row"),d=`Mutation submitted at ${new Date(e.mutation.state.submittedAt).toLocaleString()}`,h=a_("gray"===u()?n`
|
|
217
|
+
background-color: ${s(o[u()][200],o[u()][700])};
|
|
218
|
+
color: ${s(o[u()][700],o[u()][300])};
|
|
219
|
+
`:n`
|
|
220
|
+
background-color: ${s(o[u()][200]+i[80],o[u()][900])};
|
|
221
|
+
color: ${s(o[u()][800],o[u()][300])};
|
|
222
|
+
`,"tsqd-query-observer-count");return c!==l.e&&Ft(t,l.e=c),d!==l.t&&$t(t,"aria-label",l.t=d),h!==l.a&&Ft(a,l.a=h),l}),{e:void 0,t:void 0,a:void 0}),t}})},vz=()=>{const e=Ez((e=>e().getAll().filter((e=>"stale"===Wn(e))).length)),t=Ez((e=>e().getAll().filter((e=>"fresh"===Wn(e))).length)),n=Ez((e=>e().getAll().filter((e=>"fetching"===Wn(e))).length)),r=Ez((e=>e().getAll().filter((e=>"paused"===Wn(e))).length)),o=Ez((e=>e().getAll().filter((e=>"inactive"===Wn(e))).length)),i=_N(),s=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,a=_e((()=>"dark"===i()?Oz(s):Mz(s)));return Vt(l=Cq(),ut(xz,{label:"Fresh",color:"green",get count(){return t()}}),null),Vt(l,ut(xz,{label:"Fetching",color:"blue",get count(){return n()}}),null),Vt(l,ut(xz,{label:"Paused",color:"purple",get count(){return r()}}),null),Vt(l,ut(xz,{label:"Stale",color:"yellow",get count(){return e()}}),null),Vt(l,ut(xz,{label:"Inactive",color:"gray",get count(){return o()}}),null),Ae((()=>Ft(l,a_(a().queryStatusContainer,"tsqd-query-status-container")))),l;var l},bz=()=>{const e=jz((e=>e().getAll().filter((e=>"green"===Gn({isPaused:e.state.isPaused,status:e.state.status}))).length)),t=jz((e=>e().getAll().filter((e=>"yellow"===Gn({isPaused:e.state.isPaused,status:e.state.status}))).length)),n=jz((e=>e().getAll().filter((e=>"purple"===Gn({isPaused:e.state.isPaused,status:e.state.status}))).length)),r=jz((e=>e().getAll().filter((e=>"red"===Gn({isPaused:e.state.isPaused,status:e.state.status}))).length)),o=_N(),i=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,s=_e((()=>"dark"===o()?Oz(i):Mz(i)));return Vt(a=Cq(),ut(xz,{label:"Paused",color:"purple",get count(){return n()}}),null),Vt(a,ut(xz,{label:"Pending",color:"yellow",get count(){return t()}}),null),Vt(a,ut(xz,{label:"Success",color:"green",get count(){return e()}}),null),Vt(a,ut(xz,{label:"Error",color:"red",get count(){return r()}}),null),Ae((()=>Ft(a,a_(s().queryStatusContainer,"tsqd-query-status-container")))),a;var a},xz=e=>{const t=_N(),n=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,r=_e((()=>"dark"===t()?Oz(n):Mz(n))),{colors:o,alpha:i}=sI,s=(e,n)=>"dark"===t()?n:e;let a;const[l,c]=Me(!1),[u,d]=Me(!1),h=_e((()=>!(rz()&&az()<1024&&az()>kN)&&!(az()<kN)));return f=Yq(),m=(p=f.firstChild).nextSibling,"function"==typeof a?zt(a,f):a=f,f.addEventListener("mouseleave",(()=>{c(!1),d(!1)})),f.addEventListener("mouseenter",(()=>c(!0))),f.addEventListener("blur",(()=>d(!1))),f.addEventListener("focus",(()=>d(!0))),qt(f,mt({get disabled(){return h()},get class(){return a_(r().queryStatusTag,!h()&&n`
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
&:hover {
|
|
225
|
+
background: ${s(o.gray[200],o.darkGray[400])}${i[80]};
|
|
226
|
+
}
|
|
227
|
+
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},(()=>l()||u()?{"aria-describedby":"tsqd-status-tooltip"}:{})),!1,!0),Vt(f,ut(kt,{get when(){return _e((()=>!h()))()&&(l()||u())},get children(){var t=Wq();return Vt(t,(()=>e.label)),Ae((()=>Ft(t,a_(r().statusTooltip,"tsqd-query-status-tooltip")))),t}}),p),Vt(f,ut(kt,{get when(){return h()},get children(){var t=Gq();return Vt(t,(()=>e.label)),Ae((()=>Ft(t,a_(r().queryStatusTagLabel,"tsqd-query-status-tag-label")))),t}}),m),Vt(m,(()=>e.count)),Ae((t=>{var i=a_(n`
|
|
228
|
+
width: ${sI.size[1.5]};
|
|
229
|
+
height: ${sI.size[1.5]};
|
|
230
|
+
border-radius: ${sI.border.radius.full};
|
|
231
|
+
background-color: ${sI.colors[e.color][500]};
|
|
232
|
+
`,"tsqd-query-status-tag-dot"),a=a_(r().queryStatusCount,e.count>0&&"gray"!==e.color&&n`
|
|
233
|
+
background-color: ${s(o[e.color][100],o[e.color][900])};
|
|
234
|
+
color: ${s(o[e.color][700],o[e.color][300])};
|
|
235
|
+
`,"tsqd-query-status-tag-count");return i!==t.e&&Ft(p,t.e=i),a!==t.t&&Ft(m,t.t=a),t}),{e:void 0,t:void 0}),f;var f,p,m},wz=()=>{const e=_N(),t=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,n=_e((()=>"dark"===e()?Oz(t):Mz(t))),{colors:r}=sI,o=(t,n)=>"dark"===e()?n:t,i=TN().client,[s,a]=Me(!1),[l,c]=Me("view"),[u,d]=Me(!1),h=_e((()=>TN().errorTypes||[])),f=Ez((e=>e().getAll().find((e=>e.queryHash===rz()))),!1),p=Ez((e=>e().getAll().find((e=>e.queryHash===rz()))),!1),m=Ez((e=>e().getAll().find((e=>e.queryHash===rz()))?.state),!1),g=Ez((e=>e().getAll().find((e=>e.queryHash===rz()))?.state.data),!1),y=Ez((e=>{const t=e().getAll().find((e=>e.queryHash===rz()));return t?Wn(t):"inactive"})),v=Ez((e=>{const t=e().getAll().find((e=>e.queryHash===rz()));return t?t.state.status:"pending"})),b=Ez((e=>e().getAll().find((e=>e.queryHash===rz()))?.getObserversCount()??0)),x=_e((()=>{return"fresh"===(e=y())?"green":"stale"===e?"yellow":"paused"===e?"purple":"inactive"===e?"gray":"blue";var e})),w=()=>{const e=f()?.fetch();e?.catch((()=>{}))},S=e=>{const t=e?.initializer(f())??new Error("Unknown error from devtools"),n=f().options;f().setState({status:"error",error:t,fetchMeta:{...f().state.fetchMeta,__previousQueryOptions:n}})};Ne((()=>{"fetching"!==y()&&a(!1)}));return ut(kt,{get when(){return _e((()=>!!f()))()&&m()},get children(){var e=ez(),k=e.firstChild,C=k.nextSibling,E=C.firstChild,P=E.firstChild,D=P.nextSibling,j=E.nextSibling,T=j.firstChild.nextSibling,M=j.nextSibling.firstChild.nextSibling,O=C.nextSibling,A=O.nextSibling,N=A.firstChild,_=N.firstChild,R=N.nextSibling,L=R.firstChild,$=R.nextSibling,F=$.firstChild,I=$.nextSibling,q=I.firstChild,z=I.nextSibling,V=z.firstChild,B=V.nextSibling,U=A.nextSibling,K=U.nextSibling,H=K.nextSibling;return Vt(P.firstChild,(()=>Yn(f().queryKey,!0))),Vt(D,y),Vt(T,b),Vt(M,(()=>new Date(m().dataUpdatedAt).toLocaleTimeString())),N.$$click=w,R.$$click=()=>i.invalidateQueries(f()),$.$$click=()=>i.resetQueries(f()),I.$$click=()=>{i.removeQueries(f()),oz(null)},z.$$click=()=>{if(void 0===f()?.state.data)a(!0),(()=>{const e=f(),t=e.state,n=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:!0}),e.setState({...t,fetchStatus:"idle",fetchMeta:null}),n&&e.fetch(n)})();else{const e=f();if(!e)return;const t=e.options;e.fetch({...t,queryFn:()=>new Promise((()=>{})),gcTime:-1}),e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:t}})}},Vt(z,(()=>"pending"===v()?"Restore":"Trigger"),B),Vt(A,ut(kt,{get when(){return 0===h().length||"error"===v()},get children(){var e=Qq(),n=e.firstChild,s=n.nextSibling;return e.$$click=()=>{f().state.error?i.resetQueries(f()):S()},Vt(e,(()=>"error"===v()?"Restore":"Trigger"),s),Ae((i=>{var s=a_(t`
|
|
236
|
+
color: ${o(r.red[500],r.red[400])};
|
|
237
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),a="pending"===v(),l=t`
|
|
238
|
+
background-color: ${o(r.red[500],r.red[400])};
|
|
239
|
+
`;return s!==i.e&&Ft(e,i.e=s),a!==i.t&&(e.disabled=i.t=a),l!==i.a&&Ft(n,i.a=l),i}),{e:void 0,t:void 0,a:void 0}),e}}),null),Vt(A,ut(kt,{get when(){return!(0===h().length||"error"===v())},get children(){var e=Xq(),r=e.firstChild,o=r.nextSibling.nextSibling;return o.addEventListener("change",(e=>{const t=h().find((t=>t.name===e.currentTarget.value));S(t)})),Vt(o,ut(wt,{get each(){return h()},children:e=>{return Vt(t=tz(),(()=>e.name)),Ae((()=>t.value=e.name)),t;var t}}),null),Vt(e,ut(AI,{}),null),Ae((i=>{var s=a_(n().actionsSelect,"tsqd-query-details-actions-btn","tsqd-query-details-action-error-multiple"),a=t`
|
|
240
|
+
background-color: ${sI.colors.red[400]};
|
|
241
|
+
`,l="pending"===v();return s!==i.e&&Ft(e,i.e=s),a!==i.t&&Ft(r,i.t=a),l!==i.a&&(o.disabled=i.a=l),i}),{e:void 0,t:void 0,a:void 0}),e}}),null),Vt(U,(()=>"view"===l()?"Explorer":"Editor"),null),Vt(e,ut(kt,{get when(){return"view"===l()},get children(){var e=Jq();return Vt(e,ut(bq,{label:"Data",defaultExpanded:["Data"],get value(){return g()},editable:!0,onEdit:()=>c("edit"),get activeQuery(){return f()}})),Ae((t=>null!=(t=sI.size[2])?e.style.setProperty("padding",t):e.style.removeProperty("padding"))),e}}),K),Vt(e,ut(kt,{get when(){return"edit"===l()},get children(){var e=Zq(),i=e.firstChild,s=i.nextSibling,a=s.firstChild,l=a.nextSibling,h=l.firstChild,p=h.nextSibling;return e.addEventListener("submit",(e=>{e.preventDefault();const t=new FormData(e.currentTarget).get("data");try{const e=JSON.parse(t);f().setState({...f().state,data:e}),c("view")}catch(n){d(!0)}})),i.addEventListener("focus",(()=>d(!1))),Vt(a,(()=>u()?"Invalid Value":"")),h.$$click=()=>c("view"),Ae((c=>{var d=a_(n().devtoolsEditForm,"tsqd-query-details-data-editor"),f=n().devtoolsEditTextarea,m=u(),g=n().devtoolsEditFormActions,y=n().devtoolsEditFormError,v=n().devtoolsEditFormActionContainer,b=a_(n().devtoolsEditFormAction,t`
|
|
242
|
+
color: ${o(r.gray[600],r.gray[300])};
|
|
243
|
+
`),x=a_(n().devtoolsEditFormAction,t`
|
|
244
|
+
color: ${o(r.blue[600],r.blue[400])};
|
|
245
|
+
`);return d!==c.e&&Ft(e,c.e=d),f!==c.t&&Ft(i,c.t=f),m!==c.a&&$t(i,"data-error",c.a=m),g!==c.o&&Ft(s,c.o=g),y!==c.i&&Ft(a,c.i=y),v!==c.n&&Ft(l,c.n=v),b!==c.s&&Ft(h,c.s=b),x!==c.h&&Ft(p,c.h=x),c}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),Ae((()=>i.value=JSON.stringify(g(),null,2))),e}}),K),Vt(H,ut(bq,{label:"Query",defaultExpanded:["Query","queryKey"],get value(){return p()}})),Ae((i=>{var a=a_(n().detailsContainer,"tsqd-query-details-container"),l=a_(n().detailsHeader,"tsqd-query-details-header"),c=a_(n().detailsBody,"tsqd-query-details-summary-container"),u=a_(n().queryDetailsStatus,"gray"===x()?t`
|
|
246
|
+
background-color: ${o(r[x()][200],r[x()][700])};
|
|
247
|
+
color: ${o(r[x()][700],r[x()][300])};
|
|
248
|
+
border-color: ${o(r[x()][400],r[x()][600])};
|
|
249
|
+
`:t`
|
|
250
|
+
background-color: ${o(r[x()][100],r[x()][900])};
|
|
251
|
+
color: ${o(r[x()][700],r[x()][300])};
|
|
252
|
+
border-color: ${o(r[x()][400],r[x()][600])};
|
|
253
|
+
`),d=a_(n().detailsHeader,"tsqd-query-details-header"),h=a_(n().actionsBody,"tsqd-query-details-actions-container"),f=a_(t`
|
|
254
|
+
color: ${o(r.blue[600],r.blue[400])};
|
|
255
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),p="fetching"===y(),m=t`
|
|
256
|
+
background-color: ${o(r.blue[600],r.blue[400])};
|
|
257
|
+
`,g=a_(t`
|
|
258
|
+
color: ${o(r.yellow[600],r.yellow[400])};
|
|
259
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),b="pending"===v(),w=t`
|
|
260
|
+
background-color: ${o(r.yellow[600],r.yellow[400])};
|
|
261
|
+
`,S=a_(t`
|
|
262
|
+
color: ${o(r.gray[600],r.gray[300])};
|
|
263
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),E="pending"===v(),P=t`
|
|
264
|
+
background-color: ${o(r.gray[600],r.gray[400])};
|
|
265
|
+
`,j=a_(t`
|
|
266
|
+
color: ${o(r.pink[500],r.pink[400])};
|
|
267
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),T="fetching"===y(),M=t`
|
|
268
|
+
background-color: ${o(r.pink[500],r.pink[400])};
|
|
269
|
+
`,B=a_(t`
|
|
270
|
+
color: ${o(r.cyan[500],r.cyan[400])};
|
|
271
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),W=s(),G=t`
|
|
272
|
+
background-color: ${o(r.cyan[500],r.cyan[400])};
|
|
273
|
+
`,Y=a_(n().detailsHeader,"tsqd-query-details-header"),Q=a_(n().detailsHeader,"tsqd-query-details-header"),X=sI.size[2];return a!==i.e&&Ft(e,i.e=a),l!==i.t&&Ft(k,i.t=l),c!==i.a&&Ft(C,i.a=c),u!==i.o&&Ft(D,i.o=u),d!==i.i&&Ft(O,i.i=d),h!==i.n&&Ft(A,i.n=h),f!==i.s&&Ft(N,i.s=f),p!==i.h&&(N.disabled=i.h=p),m!==i.r&&Ft(_,i.r=m),g!==i.d&&Ft(R,i.d=g),b!==i.l&&(R.disabled=i.l=b),w!==i.u&&Ft(L,i.u=w),S!==i.c&&Ft($,i.c=S),E!==i.w&&($.disabled=i.w=E),P!==i.m&&Ft(F,i.m=P),j!==i.f&&Ft(I,i.f=j),T!==i.y&&(I.disabled=i.y=T),M!==i.g&&Ft(q,i.g=M),B!==i.p&&Ft(z,i.p=B),W!==i.b&&(z.disabled=i.b=W),G!==i.T&&Ft(V,i.T=G),Y!==i.A&&Ft(U,i.A=Y),Q!==i.O&&Ft(K,i.O=Q),X!==i.I&&(null!=(i.I=X)?H.style.setProperty("padding",X):H.style.removeProperty("padding")),i}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0}),e}})},Sz=()=>{const e=_N(),t=TN().shadowDOMTarget?i_.bind({target:TN().shadowDOMTarget}):i_,n=_e((()=>"dark"===e()?Oz(t):Mz(t))),{colors:r}=sI,o=(t,n)=>"dark"===e()?n:t,i=jz((e=>{const t=e().getAll().find((e=>e.mutationId===iz()));return!!t&&t.state.isPaused})),s=jz((e=>{const t=e().getAll().find((e=>e.mutationId===iz()));return t?t.state.status:"idle"})),a=_e((()=>Gn({isPaused:i(),status:s()}))),l=jz((e=>e().getAll().find((e=>e.mutationId===iz()))),!1);return ut(kt,{get when(){return l()},get children(){var e=nz(),i=e.firstChild,c=i.nextSibling,u=c.firstChild,d=u.firstChild,h=d.nextSibling,f=u.nextSibling.firstChild.nextSibling,p=c.nextSibling,m=p.nextSibling,g=m.nextSibling,y=g.nextSibling,v=y.nextSibling,b=v.nextSibling,x=b.nextSibling,w=x.nextSibling;return Vt(d.firstChild,ut(kt,{get when(){return l().options.mutationKey},fallback:"No mutationKey found",get children(){return Yn(l().options.mutationKey,!0)}})),Vt(h,ut(kt,{get when(){return"purple"===a()},children:"pending"}),null),Vt(h,ut(kt,{get when(){return"purple"!==a()},get children(){return s()}}),null),Vt(f,(()=>new Date(l().state.submittedAt).toLocaleTimeString())),Vt(m,ut(bq,{label:"Variables",defaultExpanded:["Variables"],get value(){return l().state.variables}})),Vt(y,ut(bq,{label:"Context",defaultExpanded:["Context"],get value(){return l().state.context}})),Vt(b,ut(bq,{label:"Data",defaultExpanded:["Data"],get value(){return l().state.data}})),Vt(w,ut(bq,{label:"Mutation",defaultExpanded:["Mutation"],get value(){return l()}})),Ae((s=>{var l=a_(n().detailsContainer,"tsqd-query-details-container"),u=a_(n().detailsHeader,"tsqd-query-details-header"),d=a_(n().detailsBody,"tsqd-query-details-summary-container"),f=a_(n().queryDetailsStatus,"gray"===a()?t`
|
|
274
|
+
background-color: ${o(r[a()][200],r[a()][700])};
|
|
275
|
+
color: ${o(r[a()][700],r[a()][300])};
|
|
276
|
+
border-color: ${o(r[a()][400],r[a()][600])};
|
|
277
|
+
`:t`
|
|
278
|
+
background-color: ${o(r[a()][100],r[a()][900])};
|
|
279
|
+
color: ${o(r[a()][700],r[a()][300])};
|
|
280
|
+
border-color: ${o(r[a()][400],r[a()][600])};
|
|
281
|
+
`),S=a_(n().detailsHeader,"tsqd-query-details-header"),k=sI.size[2],C=a_(n().detailsHeader,"tsqd-query-details-header"),E=sI.size[2],P=a_(n().detailsHeader,"tsqd-query-details-header"),D=sI.size[2],j=a_(n().detailsHeader,"tsqd-query-details-header"),T=sI.size[2];return l!==s.e&&Ft(e,s.e=l),u!==s.t&&Ft(i,s.t=u),d!==s.a&&Ft(c,s.a=d),f!==s.o&&Ft(h,s.o=f),S!==s.i&&Ft(p,s.i=S),k!==s.n&&(null!=(s.n=k)?m.style.setProperty("padding",k):m.style.removeProperty("padding")),C!==s.s&&Ft(g,s.s=C),E!==s.h&&(null!=(s.h=E)?y.style.setProperty("padding",E):y.style.removeProperty("padding")),P!==s.r&&Ft(v,s.r=P),D!==s.d&&(null!=(s.d=D)?b.style.setProperty("padding",D):b.style.removeProperty("padding")),j!==s.l&&Ft(x,s.l=j),T!==s.u&&(null!=(s.u=T)?w.style.setProperty("padding",T):w.style.removeProperty("padding")),s}),{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),e}})},kz=new Map,Cz=()=>{const e=_e((()=>TN().client.getQueryCache())),t=e().subscribe((t=>{var n;n=()=>{for(const[n,r]of kz.entries())r.shouldUpdate(t)&&r.setter(n(e))},Je(n,!1)}));return Ie((()=>{kz.clear(),t()})),t},Ez=(e,t=!0,n=()=>!0)=>{const r=_e((()=>TN().client.getQueryCache())),[o,i]=Me(e(r),t?void 0:{equals:!1});return Ne((()=>{i(e(r))})),kz.set(e,{setter:i,shouldUpdate:n}),Ie((()=>{kz.delete(e)})),o},Pz=new Map,Dz=()=>{const e=_e((()=>TN().client.getMutationCache())),t=e().subscribe((()=>{for(const[t,n]of Pz.entries())queueMicrotask((()=>{n(t(e))}))}));return Ie((()=>{Pz.clear(),t()})),t},jz=(e,t=!0)=>{const n=_e((()=>TN().client.getMutationCache())),[r,o]=Me(e(n),t?void 0:{equals:!1});return Ne((()=>{o(e(n))})),Pz.set(e,o),Ie((()=>{Pz.delete(e)})),r},Tz=(e,t)=>{const{colors:n,font:r,size:o,alpha:i,shadow:s,border:a}=sI,l=(t,n)=>"light"===e?t:n;return{devtoolsBtn:t`
|
|
282
|
+
z-index: 100000;
|
|
283
|
+
position: fixed;
|
|
284
|
+
padding: 4px;
|
|
285
|
+
text-align: left;
|
|
286
|
+
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
justify-content: center;
|
|
290
|
+
border-radius: 9999px;
|
|
291
|
+
box-shadow: ${s.md()};
|
|
292
|
+
overflow: hidden;
|
|
293
|
+
|
|
294
|
+
& div {
|
|
295
|
+
position: absolute;
|
|
296
|
+
top: -8px;
|
|
297
|
+
left: -8px;
|
|
298
|
+
right: -8px;
|
|
299
|
+
bottom: -8px;
|
|
300
|
+
border-radius: 9999px;
|
|
301
|
+
|
|
302
|
+
& svg {
|
|
303
|
+
position: absolute;
|
|
304
|
+
width: 100%;
|
|
305
|
+
height: 100%;
|
|
306
|
+
}
|
|
307
|
+
filter: blur(6px) saturate(1.2) contrast(1.1);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
&:focus-within {
|
|
311
|
+
outline-offset: 2px;
|
|
312
|
+
outline: 3px solid ${n.green[600]};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
& button {
|
|
316
|
+
position: relative;
|
|
317
|
+
z-index: 1;
|
|
318
|
+
padding: 0;
|
|
319
|
+
border-radius: 9999px;
|
|
320
|
+
background-color: transparent;
|
|
321
|
+
border: none;
|
|
322
|
+
height: 40px;
|
|
323
|
+
display: flex;
|
|
324
|
+
width: 40px;
|
|
325
|
+
overflow: hidden;
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
outline: none;
|
|
328
|
+
& svg {
|
|
329
|
+
position: absolute;
|
|
330
|
+
width: 100%;
|
|
331
|
+
height: 100%;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
`,panel:t`
|
|
335
|
+
position: fixed;
|
|
336
|
+
z-index: 9999;
|
|
337
|
+
display: flex;
|
|
338
|
+
gap: ${sI.size[.5]};
|
|
339
|
+
& * {
|
|
340
|
+
box-sizing: border-box;
|
|
341
|
+
text-transform: none;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
& *::-webkit-scrollbar {
|
|
345
|
+
width: 7px;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
& *::-webkit-scrollbar-track {
|
|
349
|
+
background: transparent;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
& *::-webkit-scrollbar-thumb {
|
|
353
|
+
background: ${l(n.gray[300],n.darkGray[200])};
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
& *::-webkit-scrollbar-thumb:hover {
|
|
357
|
+
background: ${l(n.gray[400],n.darkGray[300])};
|
|
358
|
+
}
|
|
359
|
+
`,parentPanel:t`
|
|
360
|
+
z-index: 9999;
|
|
361
|
+
display: flex;
|
|
362
|
+
height: 100%;
|
|
363
|
+
gap: ${sI.size[.5]};
|
|
364
|
+
& * {
|
|
365
|
+
box-sizing: border-box;
|
|
366
|
+
text-transform: none;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
& *::-webkit-scrollbar {
|
|
370
|
+
width: 7px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
& *::-webkit-scrollbar-track {
|
|
374
|
+
background: transparent;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
& *::-webkit-scrollbar-thumb {
|
|
378
|
+
background: ${l(n.gray[300],n.darkGray[200])};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
& *::-webkit-scrollbar-thumb:hover {
|
|
382
|
+
background: ${l(n.gray[400],n.darkGray[300])};
|
|
383
|
+
}
|
|
384
|
+
`,"devtoolsBtn-position-bottom-right":t`
|
|
385
|
+
bottom: 12px;
|
|
386
|
+
right: 12px;
|
|
387
|
+
`,"devtoolsBtn-position-bottom-left":t`
|
|
388
|
+
bottom: 12px;
|
|
389
|
+
left: 12px;
|
|
390
|
+
`,"devtoolsBtn-position-top-left":t`
|
|
391
|
+
top: 12px;
|
|
392
|
+
left: 12px;
|
|
393
|
+
`,"devtoolsBtn-position-top-right":t`
|
|
394
|
+
top: 12px;
|
|
395
|
+
right: 12px;
|
|
396
|
+
`,"devtoolsBtn-position-relative":t`
|
|
397
|
+
position: relative;
|
|
398
|
+
`,"panel-position-top":t`
|
|
399
|
+
top: 0;
|
|
400
|
+
right: 0;
|
|
401
|
+
left: 0;
|
|
402
|
+
max-height: 90%;
|
|
403
|
+
min-height: ${o[14]};
|
|
404
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
405
|
+
`,"panel-position-bottom":t`
|
|
406
|
+
bottom: 0;
|
|
407
|
+
right: 0;
|
|
408
|
+
left: 0;
|
|
409
|
+
max-height: 90%;
|
|
410
|
+
min-height: ${o[14]};
|
|
411
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
412
|
+
`,"panel-position-right":t`
|
|
413
|
+
bottom: 0;
|
|
414
|
+
right: 0;
|
|
415
|
+
top: 0;
|
|
416
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
417
|
+
max-width: 90%;
|
|
418
|
+
`,"panel-position-left":t`
|
|
419
|
+
bottom: 0;
|
|
420
|
+
left: 0;
|
|
421
|
+
top: 0;
|
|
422
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
423
|
+
max-width: 90%;
|
|
424
|
+
`,closeBtn:t`
|
|
425
|
+
position: absolute;
|
|
426
|
+
cursor: pointer;
|
|
427
|
+
z-index: 5;
|
|
428
|
+
display: flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
outline: none;
|
|
432
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
|
433
|
+
&:hover {
|
|
434
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
435
|
+
}
|
|
436
|
+
&:focus-visible {
|
|
437
|
+
outline: 2px solid ${n.blue[600]};
|
|
438
|
+
}
|
|
439
|
+
& svg {
|
|
440
|
+
color: ${l(n.gray[600],n.gray[400])};
|
|
441
|
+
width: ${o[2]};
|
|
442
|
+
height: ${o[2]};
|
|
443
|
+
}
|
|
444
|
+
`,"closeBtn-position-top":t`
|
|
445
|
+
bottom: 0;
|
|
446
|
+
right: ${o[2]};
|
|
447
|
+
transform: translate(0, 100%);
|
|
448
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
449
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
450
|
+
border-top: none;
|
|
451
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
452
|
+
border-radius: 0px 0px ${a.radius.sm} ${a.radius.sm};
|
|
453
|
+
padding: ${o[.5]} ${o[1.5]} ${o[1]} ${o[1.5]};
|
|
454
|
+
|
|
455
|
+
&::after {
|
|
456
|
+
content: ' ';
|
|
457
|
+
position: absolute;
|
|
458
|
+
bottom: 100%;
|
|
459
|
+
left: -${o[2.5]};
|
|
460
|
+
height: ${o[1.5]};
|
|
461
|
+
width: calc(100% + ${o[5]});
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
& svg {
|
|
465
|
+
transform: rotate(180deg);
|
|
466
|
+
}
|
|
467
|
+
`,"closeBtn-position-bottom":t`
|
|
468
|
+
top: 0;
|
|
469
|
+
right: ${o[2]};
|
|
470
|
+
transform: translate(0, -100%);
|
|
471
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
472
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
473
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
474
|
+
border-bottom: none;
|
|
475
|
+
border-radius: ${a.radius.sm} ${a.radius.sm} 0px 0px;
|
|
476
|
+
padding: ${o[1]} ${o[1.5]} ${o[.5]} ${o[1.5]};
|
|
477
|
+
|
|
478
|
+
&::after {
|
|
479
|
+
content: ' ';
|
|
480
|
+
position: absolute;
|
|
481
|
+
top: 100%;
|
|
482
|
+
left: -${o[2.5]};
|
|
483
|
+
height: ${o[1.5]};
|
|
484
|
+
width: calc(100% + ${o[5]});
|
|
485
|
+
}
|
|
486
|
+
`,"closeBtn-position-right":t`
|
|
487
|
+
bottom: ${o[2]};
|
|
488
|
+
left: 0;
|
|
489
|
+
transform: translate(-100%, 0);
|
|
490
|
+
border-right: none;
|
|
491
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
492
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
493
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
494
|
+
border-radius: ${a.radius.sm} 0px 0px ${a.radius.sm};
|
|
495
|
+
padding: ${o[1.5]} ${o[.5]} ${o[1.5]} ${o[1]};
|
|
496
|
+
|
|
497
|
+
&::after {
|
|
498
|
+
content: ' ';
|
|
499
|
+
position: absolute;
|
|
500
|
+
left: 100%;
|
|
501
|
+
height: calc(100% + ${o[5]});
|
|
502
|
+
width: ${o[1.5]};
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
& svg {
|
|
506
|
+
transform: rotate(-90deg);
|
|
507
|
+
}
|
|
508
|
+
`,"closeBtn-position-left":t`
|
|
509
|
+
bottom: ${o[2]};
|
|
510
|
+
right: 0;
|
|
511
|
+
transform: translate(100%, 0);
|
|
512
|
+
border-left: none;
|
|
513
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
514
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
515
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
|
516
|
+
border-radius: 0px ${a.radius.sm} ${a.radius.sm} 0px;
|
|
517
|
+
padding: ${o[1.5]} ${o[1]} ${o[1.5]} ${o[.5]};
|
|
518
|
+
|
|
519
|
+
&::after {
|
|
520
|
+
content: ' ';
|
|
521
|
+
position: absolute;
|
|
522
|
+
right: 100%;
|
|
523
|
+
height: calc(100% + ${o[5]});
|
|
524
|
+
width: ${o[1.5]};
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
& svg {
|
|
528
|
+
transform: rotate(90deg);
|
|
529
|
+
}
|
|
530
|
+
`,queriesContainer:t`
|
|
531
|
+
flex: 1 1 700px;
|
|
532
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
|
533
|
+
display: flex;
|
|
534
|
+
flex-direction: column;
|
|
535
|
+
& * {
|
|
536
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
537
|
+
}
|
|
538
|
+
`,dragHandle:t`
|
|
539
|
+
position: absolute;
|
|
540
|
+
transition: background-color 0.125s ease;
|
|
541
|
+
&:hover {
|
|
542
|
+
background-color: ${n.purple[400]}${l("",i[90])};
|
|
543
|
+
}
|
|
544
|
+
z-index: 4;
|
|
545
|
+
`,"dragHandle-position-top":t`
|
|
546
|
+
bottom: 0;
|
|
547
|
+
width: 100%;
|
|
548
|
+
height: 3px;
|
|
549
|
+
cursor: ns-resize;
|
|
550
|
+
`,"dragHandle-position-bottom":t`
|
|
551
|
+
top: 0;
|
|
552
|
+
width: 100%;
|
|
553
|
+
height: 3px;
|
|
554
|
+
cursor: ns-resize;
|
|
555
|
+
`,"dragHandle-position-right":t`
|
|
556
|
+
left: 0;
|
|
557
|
+
width: 3px;
|
|
558
|
+
height: 100%;
|
|
559
|
+
cursor: ew-resize;
|
|
560
|
+
`,"dragHandle-position-left":t`
|
|
561
|
+
right: 0;
|
|
562
|
+
width: 3px;
|
|
563
|
+
height: 100%;
|
|
564
|
+
cursor: ew-resize;
|
|
565
|
+
`,row:t`
|
|
566
|
+
display: flex;
|
|
567
|
+
justify-content: space-between;
|
|
568
|
+
align-items: center;
|
|
569
|
+
padding: ${sI.size[2]} ${sI.size[2.5]};
|
|
570
|
+
gap: ${sI.size[2.5]};
|
|
571
|
+
border-bottom: ${l(n.gray[300],n.darkGray[500])} 1px solid;
|
|
572
|
+
align-items: center;
|
|
573
|
+
& > button {
|
|
574
|
+
padding: 0;
|
|
575
|
+
background: transparent;
|
|
576
|
+
border: none;
|
|
577
|
+
display: flex;
|
|
578
|
+
gap: ${o[.5]};
|
|
579
|
+
flex-direction: column;
|
|
580
|
+
}
|
|
581
|
+
`,logoAndToggleContainer:t`
|
|
582
|
+
display: flex;
|
|
583
|
+
gap: ${sI.size[3]};
|
|
584
|
+
align-items: center;
|
|
585
|
+
`,logo:t`
|
|
586
|
+
cursor: pointer;
|
|
587
|
+
display: flex;
|
|
588
|
+
flex-direction: column;
|
|
589
|
+
background-color: transparent;
|
|
590
|
+
border: none;
|
|
591
|
+
gap: ${sI.size[.5]};
|
|
592
|
+
padding: 0px;
|
|
593
|
+
&:hover {
|
|
594
|
+
opacity: 0.7;
|
|
595
|
+
}
|
|
596
|
+
&:focus-visible {
|
|
597
|
+
outline-offset: 4px;
|
|
598
|
+
border-radius: ${a.radius.xs};
|
|
599
|
+
outline: 2px solid ${n.blue[800]};
|
|
600
|
+
}
|
|
601
|
+
`,tanstackLogo:t`
|
|
602
|
+
font-size: ${r.size.md};
|
|
603
|
+
font-weight: ${r.weight.bold};
|
|
604
|
+
line-height: ${r.lineHeight.xs};
|
|
605
|
+
white-space: nowrap;
|
|
606
|
+
color: ${l(n.gray[600],n.gray[300])};
|
|
607
|
+
`,queryFlavorLogo:t`
|
|
608
|
+
font-weight: ${r.weight.semibold};
|
|
609
|
+
font-size: ${r.size.xs};
|
|
610
|
+
background: linear-gradient(
|
|
611
|
+
to right,
|
|
612
|
+
${l("#ea4037, #ff9b11","#dd524b, #e9a03b")}
|
|
613
|
+
);
|
|
614
|
+
background-clip: text;
|
|
615
|
+
-webkit-background-clip: text;
|
|
616
|
+
line-height: 1;
|
|
617
|
+
-webkit-text-fill-color: transparent;
|
|
618
|
+
white-space: nowrap;
|
|
619
|
+
`,queryStatusContainer:t`
|
|
620
|
+
display: flex;
|
|
621
|
+
gap: ${sI.size[2]};
|
|
622
|
+
height: min-content;
|
|
623
|
+
`,queryStatusTag:t`
|
|
624
|
+
display: flex;
|
|
625
|
+
gap: ${sI.size[1.5]};
|
|
626
|
+
box-sizing: border-box;
|
|
627
|
+
height: ${sI.size[6.5]};
|
|
628
|
+
background: ${l(n.gray[50],n.darkGray[500])};
|
|
629
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
630
|
+
border-radius: ${sI.border.radius.sm};
|
|
631
|
+
font-size: ${r.size.sm};
|
|
632
|
+
padding: ${sI.size[1]};
|
|
633
|
+
padding-left: ${sI.size[1.5]};
|
|
634
|
+
align-items: center;
|
|
635
|
+
font-weight: ${r.weight.medium};
|
|
636
|
+
border: ${l("1px solid "+n.gray[300],"1px solid transparent")};
|
|
637
|
+
user-select: none;
|
|
638
|
+
position: relative;
|
|
639
|
+
&:focus-visible {
|
|
640
|
+
outline-offset: 2px;
|
|
641
|
+
outline: 2px solid ${n.blue[800]};
|
|
642
|
+
}
|
|
643
|
+
`,queryStatusTagLabel:t`
|
|
644
|
+
font-size: ${r.size.xs};
|
|
645
|
+
`,queryStatusCount:t`
|
|
646
|
+
font-size: ${r.size.xs};
|
|
647
|
+
padding: 0 5px;
|
|
648
|
+
display: flex;
|
|
649
|
+
align-items: center;
|
|
650
|
+
justify-content: center;
|
|
651
|
+
color: ${l(n.gray[500],n.gray[400])};
|
|
652
|
+
background-color: ${l(n.gray[200],n.darkGray[300])};
|
|
653
|
+
border-radius: 2px;
|
|
654
|
+
font-variant-numeric: tabular-nums;
|
|
655
|
+
height: ${sI.size[4.5]};
|
|
656
|
+
`,statusTooltip:t`
|
|
657
|
+
position: absolute;
|
|
658
|
+
z-index: 1;
|
|
659
|
+
background-color: ${l(n.gray[50],n.darkGray[500])};
|
|
660
|
+
top: 100%;
|
|
661
|
+
left: 50%;
|
|
662
|
+
transform: translate(-50%, calc(${sI.size[2]}));
|
|
663
|
+
padding: ${sI.size[.5]} ${sI.size[2]};
|
|
664
|
+
border-radius: ${sI.border.radius.sm};
|
|
665
|
+
font-size: ${r.size.xs};
|
|
666
|
+
border: 1px solid ${l(n.gray[400],n.gray[600])};
|
|
667
|
+
color: ${l(n.gray[600],n.gray[300])};
|
|
668
|
+
|
|
669
|
+
&::before {
|
|
670
|
+
top: 0px;
|
|
671
|
+
content: ' ';
|
|
672
|
+
display: block;
|
|
673
|
+
left: 50%;
|
|
674
|
+
transform: translate(-50%, -100%);
|
|
675
|
+
position: absolute;
|
|
676
|
+
border-color: transparent transparent
|
|
677
|
+
${l(n.gray[400],n.gray[600])} transparent;
|
|
678
|
+
border-style: solid;
|
|
679
|
+
border-width: 7px;
|
|
680
|
+
/* transform: rotate(180deg); */
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
&::after {
|
|
684
|
+
top: 0px;
|
|
685
|
+
content: ' ';
|
|
686
|
+
display: block;
|
|
687
|
+
left: 50%;
|
|
688
|
+
transform: translate(-50%, calc(-100% + 2px));
|
|
689
|
+
position: absolute;
|
|
690
|
+
border-color: transparent transparent
|
|
691
|
+
${l(n.gray[100],n.darkGray[500])} transparent;
|
|
692
|
+
border-style: solid;
|
|
693
|
+
border-width: 7px;
|
|
694
|
+
}
|
|
695
|
+
`,filtersContainer:t`
|
|
696
|
+
display: flex;
|
|
697
|
+
gap: ${sI.size[2]};
|
|
698
|
+
& > button {
|
|
699
|
+
cursor: pointer;
|
|
700
|
+
padding: ${sI.size[.5]} ${sI.size[1.5]} ${sI.size[.5]}
|
|
701
|
+
${sI.size[2]};
|
|
702
|
+
border-radius: ${sI.border.radius.sm};
|
|
703
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
704
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
705
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
706
|
+
font-size: ${r.size.xs};
|
|
707
|
+
display: flex;
|
|
708
|
+
align-items: center;
|
|
709
|
+
line-height: ${r.lineHeight.sm};
|
|
710
|
+
gap: ${sI.size[1.5]};
|
|
711
|
+
max-width: 160px;
|
|
712
|
+
&:focus-visible {
|
|
713
|
+
outline-offset: 2px;
|
|
714
|
+
border-radius: ${a.radius.xs};
|
|
715
|
+
outline: 2px solid ${n.blue[800]};
|
|
716
|
+
}
|
|
717
|
+
& svg {
|
|
718
|
+
width: ${sI.size[3]};
|
|
719
|
+
height: ${sI.size[3]};
|
|
720
|
+
color: ${l(n.gray[500],n.gray[400])};
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
`,filterInput:t`
|
|
724
|
+
padding: ${o[.5]} ${o[2]};
|
|
725
|
+
border-radius: ${sI.border.radius.sm};
|
|
726
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
727
|
+
display: flex;
|
|
728
|
+
box-sizing: content-box;
|
|
729
|
+
align-items: center;
|
|
730
|
+
gap: ${sI.size[1.5]};
|
|
731
|
+
max-width: 160px;
|
|
732
|
+
min-width: 100px;
|
|
733
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
734
|
+
height: min-content;
|
|
735
|
+
color: ${l(n.gray[600],n.gray[400])};
|
|
736
|
+
& > svg {
|
|
737
|
+
width: ${o[3]};
|
|
738
|
+
height: ${o[3]};
|
|
739
|
+
}
|
|
740
|
+
& input {
|
|
741
|
+
font-size: ${r.size.xs};
|
|
742
|
+
width: 100%;
|
|
743
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
744
|
+
border: none;
|
|
745
|
+
padding: 0;
|
|
746
|
+
line-height: ${r.lineHeight.sm};
|
|
747
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
748
|
+
&::placeholder {
|
|
749
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
750
|
+
}
|
|
751
|
+
&:focus {
|
|
752
|
+
outline: none;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
&:focus-within {
|
|
757
|
+
outline-offset: 2px;
|
|
758
|
+
border-radius: ${a.radius.xs};
|
|
759
|
+
outline: 2px solid ${n.blue[800]};
|
|
760
|
+
}
|
|
761
|
+
`,filterSelect:t`
|
|
762
|
+
padding: ${sI.size[.5]} ${sI.size[2]};
|
|
763
|
+
border-radius: ${sI.border.radius.sm};
|
|
764
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
765
|
+
display: flex;
|
|
766
|
+
align-items: center;
|
|
767
|
+
gap: ${sI.size[1.5]};
|
|
768
|
+
box-sizing: content-box;
|
|
769
|
+
max-width: 160px;
|
|
770
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
771
|
+
height: min-content;
|
|
772
|
+
& > svg {
|
|
773
|
+
color: ${l(n.gray[600],n.gray[400])};
|
|
774
|
+
width: ${sI.size[2]};
|
|
775
|
+
height: ${sI.size[2]};
|
|
776
|
+
}
|
|
777
|
+
& > select {
|
|
778
|
+
appearance: none;
|
|
779
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
780
|
+
min-width: 100px;
|
|
781
|
+
line-height: ${r.lineHeight.sm};
|
|
782
|
+
font-size: ${r.size.xs};
|
|
783
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
784
|
+
border: none;
|
|
785
|
+
&:focus {
|
|
786
|
+
outline: none;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
&:focus-within {
|
|
790
|
+
outline-offset: 2px;
|
|
791
|
+
border-radius: ${a.radius.xs};
|
|
792
|
+
outline: 2px solid ${n.blue[800]};
|
|
793
|
+
}
|
|
794
|
+
`,actionsContainer:t`
|
|
795
|
+
display: flex;
|
|
796
|
+
gap: ${sI.size[2]};
|
|
797
|
+
`,actionsBtn:t`
|
|
798
|
+
border-radius: ${sI.border.radius.sm};
|
|
799
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
800
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
801
|
+
width: ${sI.size[6.5]};
|
|
802
|
+
height: ${sI.size[6.5]};
|
|
803
|
+
justify-content: center;
|
|
804
|
+
display: flex;
|
|
805
|
+
align-items: center;
|
|
806
|
+
gap: ${sI.size[1.5]};
|
|
807
|
+
max-width: 160px;
|
|
808
|
+
cursor: pointer;
|
|
809
|
+
padding: 0;
|
|
810
|
+
&:hover {
|
|
811
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
812
|
+
}
|
|
813
|
+
& svg {
|
|
814
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
815
|
+
width: ${sI.size[3]};
|
|
816
|
+
height: ${sI.size[3]};
|
|
817
|
+
}
|
|
818
|
+
&:focus-visible {
|
|
819
|
+
outline-offset: 2px;
|
|
820
|
+
border-radius: ${a.radius.xs};
|
|
821
|
+
outline: 2px solid ${n.blue[800]};
|
|
822
|
+
}
|
|
823
|
+
`,actionsBtnOffline:t`
|
|
824
|
+
& svg {
|
|
825
|
+
stroke: ${l(n.yellow[700],n.yellow[500])};
|
|
826
|
+
fill: ${l(n.yellow[700],n.yellow[500])};
|
|
827
|
+
}
|
|
828
|
+
`,overflowQueryContainer:t`
|
|
829
|
+
flex: 1;
|
|
830
|
+
overflow-y: auto;
|
|
831
|
+
& > div {
|
|
832
|
+
display: flex;
|
|
833
|
+
flex-direction: column;
|
|
834
|
+
}
|
|
835
|
+
`,queryRow:t`
|
|
836
|
+
display: flex;
|
|
837
|
+
align-items: center;
|
|
838
|
+
padding: 0;
|
|
839
|
+
border: none;
|
|
840
|
+
cursor: pointer;
|
|
841
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
842
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
|
843
|
+
line-height: 1;
|
|
844
|
+
&:focus {
|
|
845
|
+
outline: none;
|
|
846
|
+
}
|
|
847
|
+
&:focus-visible {
|
|
848
|
+
outline-offset: -2px;
|
|
849
|
+
border-radius: ${a.radius.xs};
|
|
850
|
+
outline: 2px solid ${n.blue[800]};
|
|
851
|
+
}
|
|
852
|
+
&:hover .tsqd-query-hash {
|
|
853
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
& .tsqd-query-observer-count {
|
|
857
|
+
padding: 0 ${sI.size[1]};
|
|
858
|
+
user-select: none;
|
|
859
|
+
min-width: ${sI.size[6.5]};
|
|
860
|
+
align-self: stretch;
|
|
861
|
+
display: flex;
|
|
862
|
+
align-items: center;
|
|
863
|
+
justify-content: center;
|
|
864
|
+
font-size: ${r.size.xs};
|
|
865
|
+
font-weight: ${r.weight.medium};
|
|
866
|
+
border-bottom-width: 1px;
|
|
867
|
+
border-bottom-style: solid;
|
|
868
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[700])};
|
|
869
|
+
}
|
|
870
|
+
& .tsqd-query-hash {
|
|
871
|
+
user-select: text;
|
|
872
|
+
font-size: ${r.size.xs};
|
|
873
|
+
display: flex;
|
|
874
|
+
align-items: center;
|
|
875
|
+
min-height: ${sI.size[6]};
|
|
876
|
+
flex: 1;
|
|
877
|
+
padding: ${sI.size[1]} ${sI.size[2]};
|
|
878
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
879
|
+
'Liberation Mono', 'Courier New', monospace;
|
|
880
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
881
|
+
text-align: left;
|
|
882
|
+
text-overflow: clip;
|
|
883
|
+
word-break: break-word;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
& .tsqd-query-disabled-indicator {
|
|
887
|
+
align-self: stretch;
|
|
888
|
+
display: flex;
|
|
889
|
+
align-items: center;
|
|
890
|
+
padding: 0 ${sI.size[2]};
|
|
891
|
+
color: ${l(n.gray[800],n.gray[300])};
|
|
892
|
+
background-color: ${l(n.gray[300],n.darkGray[600])};
|
|
893
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
894
|
+
font-size: ${r.size.xs};
|
|
895
|
+
}
|
|
896
|
+
`,selectedQueryRow:t`
|
|
897
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
898
|
+
`,detailsContainer:t`
|
|
899
|
+
flex: 1 1 700px;
|
|
900
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
|
901
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
902
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
903
|
+
display: flex;
|
|
904
|
+
flex-direction: column;
|
|
905
|
+
overflow-y: auto;
|
|
906
|
+
display: flex;
|
|
907
|
+
text-align: left;
|
|
908
|
+
`,detailsHeader:t`
|
|
909
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
910
|
+
position: sticky;
|
|
911
|
+
top: 0;
|
|
912
|
+
z-index: 2;
|
|
913
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
|
914
|
+
padding: ${sI.size[1.5]} ${sI.size[2]};
|
|
915
|
+
font-weight: ${r.weight.medium};
|
|
916
|
+
font-size: ${r.size.xs};
|
|
917
|
+
line-height: ${r.lineHeight.xs};
|
|
918
|
+
text-align: left;
|
|
919
|
+
`,detailsBody:t`
|
|
920
|
+
margin: ${sI.size[1.5]} 0px ${sI.size[2]} 0px;
|
|
921
|
+
& > div {
|
|
922
|
+
display: flex;
|
|
923
|
+
align-items: stretch;
|
|
924
|
+
padding: 0 ${sI.size[2]};
|
|
925
|
+
line-height: ${r.lineHeight.sm};
|
|
926
|
+
justify-content: space-between;
|
|
927
|
+
& > span {
|
|
928
|
+
font-size: ${r.size.xs};
|
|
929
|
+
}
|
|
930
|
+
& > span:nth-child(2) {
|
|
931
|
+
font-variant-numeric: tabular-nums;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
& > div:first-child {
|
|
936
|
+
margin-bottom: ${sI.size[1.5]};
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
& code {
|
|
940
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
941
|
+
'Liberation Mono', 'Courier New', monospace;
|
|
942
|
+
margin: 0;
|
|
943
|
+
font-size: ${r.size.xs};
|
|
944
|
+
line-height: ${r.lineHeight.xs};
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
& pre {
|
|
948
|
+
margin: 0;
|
|
949
|
+
display: flex;
|
|
950
|
+
align-items: center;
|
|
951
|
+
}
|
|
952
|
+
`,queryDetailsStatus:t`
|
|
953
|
+
border: 1px solid ${n.darkGray[200]};
|
|
954
|
+
border-radius: ${sI.border.radius.sm};
|
|
955
|
+
font-weight: ${r.weight.medium};
|
|
956
|
+
padding: ${sI.size[1]} ${sI.size[2.5]};
|
|
957
|
+
`,actionsBody:t`
|
|
958
|
+
flex-wrap: wrap;
|
|
959
|
+
margin: ${sI.size[2]} 0px ${sI.size[2]} 0px;
|
|
960
|
+
display: flex;
|
|
961
|
+
gap: ${sI.size[2]};
|
|
962
|
+
padding: 0px ${sI.size[2]};
|
|
963
|
+
& > button {
|
|
964
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
965
|
+
font-size: ${r.size.xs};
|
|
966
|
+
padding: ${sI.size[1]} ${sI.size[2]};
|
|
967
|
+
display: flex;
|
|
968
|
+
border-radius: ${sI.border.radius.sm};
|
|
969
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
970
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
971
|
+
align-items: center;
|
|
972
|
+
gap: ${sI.size[2]};
|
|
973
|
+
font-weight: ${r.weight.medium};
|
|
974
|
+
line-height: ${r.lineHeight.xs};
|
|
975
|
+
cursor: pointer;
|
|
976
|
+
&:focus-visible {
|
|
977
|
+
outline-offset: 2px;
|
|
978
|
+
border-radius: ${a.radius.xs};
|
|
979
|
+
outline: 2px solid ${n.blue[800]};
|
|
980
|
+
}
|
|
981
|
+
&:hover {
|
|
982
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
&:disabled {
|
|
986
|
+
opacity: 0.6;
|
|
987
|
+
cursor: not-allowed;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
& > span {
|
|
991
|
+
width: ${o[1.5]};
|
|
992
|
+
height: ${o[1.5]};
|
|
993
|
+
border-radius: ${sI.border.radius.full};
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
`,actionsSelect:t`
|
|
997
|
+
font-size: ${r.size.xs};
|
|
998
|
+
padding: ${sI.size[.5]} ${sI.size[2]};
|
|
999
|
+
display: flex;
|
|
1000
|
+
border-radius: ${sI.border.radius.sm};
|
|
1001
|
+
overflow: hidden;
|
|
1002
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
1003
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1004
|
+
align-items: center;
|
|
1005
|
+
gap: ${sI.size[2]};
|
|
1006
|
+
font-weight: ${r.weight.medium};
|
|
1007
|
+
line-height: ${r.lineHeight.sm};
|
|
1008
|
+
color: ${l(n.red[500],n.red[400])};
|
|
1009
|
+
cursor: pointer;
|
|
1010
|
+
position: relative;
|
|
1011
|
+
&:hover {
|
|
1012
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
1013
|
+
}
|
|
1014
|
+
& > span {
|
|
1015
|
+
width: ${o[1.5]};
|
|
1016
|
+
height: ${o[1.5]};
|
|
1017
|
+
border-radius: ${sI.border.radius.full};
|
|
1018
|
+
}
|
|
1019
|
+
&:focus-within {
|
|
1020
|
+
outline-offset: 2px;
|
|
1021
|
+
border-radius: ${a.radius.xs};
|
|
1022
|
+
outline: 2px solid ${n.blue[800]};
|
|
1023
|
+
}
|
|
1024
|
+
& select {
|
|
1025
|
+
position: absolute;
|
|
1026
|
+
top: 0;
|
|
1027
|
+
left: 0;
|
|
1028
|
+
width: 100%;
|
|
1029
|
+
height: 100%;
|
|
1030
|
+
appearance: none;
|
|
1031
|
+
background-color: transparent;
|
|
1032
|
+
border: none;
|
|
1033
|
+
color: transparent;
|
|
1034
|
+
outline: none;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
& svg path {
|
|
1038
|
+
stroke: ${sI.colors.red[400]};
|
|
1039
|
+
}
|
|
1040
|
+
& svg {
|
|
1041
|
+
width: ${sI.size[2]};
|
|
1042
|
+
height: ${sI.size[2]};
|
|
1043
|
+
}
|
|
1044
|
+
`,settingsMenu:t`
|
|
1045
|
+
display: flex;
|
|
1046
|
+
& * {
|
|
1047
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
1048
|
+
}
|
|
1049
|
+
flex-direction: column;
|
|
1050
|
+
gap: ${o[.5]};
|
|
1051
|
+
border-radius: ${sI.border.radius.sm};
|
|
1052
|
+
border: 1px solid ${l(n.gray[300],n.gray[700])};
|
|
1053
|
+
background-color: ${l(n.gray[50],n.darkGray[600])};
|
|
1054
|
+
font-size: ${r.size.xs};
|
|
1055
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
1056
|
+
z-index: 99999;
|
|
1057
|
+
min-width: 120px;
|
|
1058
|
+
padding: ${o[.5]};
|
|
1059
|
+
`,settingsSubTrigger:t`
|
|
1060
|
+
display: flex;
|
|
1061
|
+
align-items: center;
|
|
1062
|
+
justify-content: space-between;
|
|
1063
|
+
border-radius: ${sI.border.radius.xs};
|
|
1064
|
+
padding: ${sI.size[1]} ${sI.size[1]};
|
|
1065
|
+
cursor: pointer;
|
|
1066
|
+
background-color: transparent;
|
|
1067
|
+
border: none;
|
|
1068
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
1069
|
+
& svg {
|
|
1070
|
+
color: ${l(n.gray[600],n.gray[400])};
|
|
1071
|
+
transform: rotate(-90deg);
|
|
1072
|
+
width: ${sI.size[2]};
|
|
1073
|
+
height: ${sI.size[2]};
|
|
1074
|
+
}
|
|
1075
|
+
&:hover {
|
|
1076
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
1077
|
+
}
|
|
1078
|
+
&:focus-visible {
|
|
1079
|
+
outline-offset: 2px;
|
|
1080
|
+
outline: 2px solid ${n.blue[800]};
|
|
1081
|
+
}
|
|
1082
|
+
&.data-disabled {
|
|
1083
|
+
opacity: 0.6;
|
|
1084
|
+
cursor: not-allowed;
|
|
1085
|
+
}
|
|
1086
|
+
`,settingsMenuHeader:t`
|
|
1087
|
+
padding: ${sI.size[1]} ${sI.size[1]};
|
|
1088
|
+
font-weight: ${r.weight.medium};
|
|
1089
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1090
|
+
color: ${l(n.gray[500],n.gray[400])};
|
|
1091
|
+
font-size: ${r.size.xs};
|
|
1092
|
+
`,settingsSubButton:t`
|
|
1093
|
+
display: flex;
|
|
1094
|
+
align-items: center;
|
|
1095
|
+
justify-content: space-between;
|
|
1096
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
1097
|
+
font-size: ${r.size.xs};
|
|
1098
|
+
border-radius: ${sI.border.radius.xs};
|
|
1099
|
+
padding: ${sI.size[1]} ${sI.size[1]};
|
|
1100
|
+
cursor: pointer;
|
|
1101
|
+
background-color: transparent;
|
|
1102
|
+
border: none;
|
|
1103
|
+
& svg {
|
|
1104
|
+
color: ${l(n.gray[600],n.gray[400])};
|
|
1105
|
+
}
|
|
1106
|
+
&:hover {
|
|
1107
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
1108
|
+
}
|
|
1109
|
+
&:focus-visible {
|
|
1110
|
+
outline-offset: 2px;
|
|
1111
|
+
outline: 2px solid ${n.blue[800]};
|
|
1112
|
+
}
|
|
1113
|
+
`,themeSelectedButton:t`
|
|
1114
|
+
background-color: ${l(n.purple[100],n.purple[900])};
|
|
1115
|
+
color: ${l(n.purple[700],n.purple[300])};
|
|
1116
|
+
& svg {
|
|
1117
|
+
color: ${l(n.purple[700],n.purple[300])};
|
|
1118
|
+
}
|
|
1119
|
+
&:hover {
|
|
1120
|
+
background-color: ${l(n.purple[100],n.purple[900])};
|
|
1121
|
+
}
|
|
1122
|
+
`,viewToggle:t`
|
|
1123
|
+
border-radius: ${sI.border.radius.sm};
|
|
1124
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
|
1125
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
1126
|
+
display: flex;
|
|
1127
|
+
padding: 0;
|
|
1128
|
+
font-size: ${r.size.xs};
|
|
1129
|
+
color: ${l(n.gray[700],n.gray[300])};
|
|
1130
|
+
overflow: hidden;
|
|
1131
|
+
|
|
1132
|
+
&:has(:focus-visible) {
|
|
1133
|
+
outline: 2px solid ${n.blue[800]};
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
& .tsqd-radio-toggle {
|
|
1137
|
+
opacity: 0.5;
|
|
1138
|
+
display: flex;
|
|
1139
|
+
& label {
|
|
1140
|
+
display: flex;
|
|
1141
|
+
align-items: center;
|
|
1142
|
+
cursor: pointer;
|
|
1143
|
+
line-height: ${r.lineHeight.md};
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
& label:hover {
|
|
1147
|
+
background-color: ${l(n.gray[100],n.darkGray[500])};
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
& > [data-checked] {
|
|
1152
|
+
opacity: 1;
|
|
1153
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
1154
|
+
& label:hover {
|
|
1155
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
& .tsqd-radio-toggle:first-child {
|
|
1160
|
+
& label {
|
|
1161
|
+
padding: 0 ${sI.size[1.5]} 0 ${sI.size[2]};
|
|
1162
|
+
}
|
|
1163
|
+
border-right: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
& .tsqd-radio-toggle:nth-child(2) {
|
|
1167
|
+
& label {
|
|
1168
|
+
padding: 0 ${sI.size[2]} 0 ${sI.size[1.5]};
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
`,devtoolsEditForm:t`
|
|
1172
|
+
padding: ${o[2]};
|
|
1173
|
+
& > [data-error='true'] {
|
|
1174
|
+
outline: 2px solid ${l(n.red[200],n.red[800])};
|
|
1175
|
+
outline-offset: 2px;
|
|
1176
|
+
border-radius: ${a.radius.xs};
|
|
1177
|
+
}
|
|
1178
|
+
`,devtoolsEditTextarea:t`
|
|
1179
|
+
width: 100%;
|
|
1180
|
+
max-height: 500px;
|
|
1181
|
+
font-family: 'Fira Code', monospace;
|
|
1182
|
+
font-size: ${r.size.xs};
|
|
1183
|
+
border-radius: ${a.radius.sm};
|
|
1184
|
+
field-sizing: content;
|
|
1185
|
+
padding: ${o[2]};
|
|
1186
|
+
background-color: ${l(n.gray[100],n.darkGray[800])};
|
|
1187
|
+
color: ${l(n.gray[900],n.gray[100])};
|
|
1188
|
+
border: 1px solid ${l(n.gray[200],n.gray[700])};
|
|
1189
|
+
resize: none;
|
|
1190
|
+
&:focus {
|
|
1191
|
+
outline-offset: 2px;
|
|
1192
|
+
border-radius: ${a.radius.xs};
|
|
1193
|
+
outline: 2px solid ${l(n.blue[200],n.blue[800])};
|
|
1194
|
+
}
|
|
1195
|
+
`,devtoolsEditFormActions:t`
|
|
1196
|
+
display: flex;
|
|
1197
|
+
justify-content: space-between;
|
|
1198
|
+
gap: ${o[2]};
|
|
1199
|
+
align-items: center;
|
|
1200
|
+
padding-top: ${o[1]};
|
|
1201
|
+
font-size: ${r.size.xs};
|
|
1202
|
+
`,devtoolsEditFormError:t`
|
|
1203
|
+
color: ${l(n.red[700],n.red[500])};
|
|
1204
|
+
`,devtoolsEditFormActionContainer:t`
|
|
1205
|
+
display: flex;
|
|
1206
|
+
gap: ${o[2]};
|
|
1207
|
+
`,devtoolsEditFormAction:t`
|
|
1208
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
1209
|
+
font-size: ${r.size.xs};
|
|
1210
|
+
padding: ${o[1]} ${sI.size[2]};
|
|
1211
|
+
display: flex;
|
|
1212
|
+
border-radius: ${a.radius.sm};
|
|
1213
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
1214
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1215
|
+
align-items: center;
|
|
1216
|
+
gap: ${o[2]};
|
|
1217
|
+
font-weight: ${r.weight.medium};
|
|
1218
|
+
line-height: ${r.lineHeight.xs};
|
|
1219
|
+
cursor: pointer;
|
|
1220
|
+
&:focus-visible {
|
|
1221
|
+
outline-offset: 2px;
|
|
1222
|
+
border-radius: ${a.radius.xs};
|
|
1223
|
+
outline: 2px solid ${n.blue[800]};
|
|
1224
|
+
}
|
|
1225
|
+
&:hover {
|
|
1226
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
&:disabled {
|
|
1230
|
+
opacity: 0.6;
|
|
1231
|
+
cursor: not-allowed;
|
|
1232
|
+
}
|
|
1233
|
+
`}},Mz=e=>Tz("light",e),Oz=e=>Tz("dark",e);Lt(["click","mousedown","input"]);const Az=Object.freeze(Object.defineProperty({__proto__:null,default:e=>{const[t,n]=xN({prefix:"TanstackQueryDevtools"}),r=rr(),o=_e((()=>{const e=t.theme_preference||EN;return"system"!==e?e:r()}));return ut(jN.Provider,{value:e,get children(){return ut(ON,{localStore:t,setLocalStore:n,get children(){return ut(NN.Provider,{value:o,get children(){return ut(dz,{localStore:t,setLocalStore:n})}})}})}})}},Symbol.toStringTag,{value:"Module"}));Symbol;e.CreateAutomationModal=({onClose:e,tailwindClassDefinitions:r,iconDefinitions:o})=>{const{createAutomation:i,isCreating:s}=Dy(),[a,l]=n.useState(!1),c=Gy(r),u=Yy(o),[d,h]=n.useState("choose-automation-type"),[f,p]=n.useState({name:void 0,type:void 0}),m=void 0!==f.name&&void 0!==f.type;n.useEffect((()=>{if(f.type&&!f.name){const e=new Date,t=e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),n=`Campaign ${e.toLocaleDateString([],{month:"short",day:"numeric"})} ${t}`;p((e=>({...e,name:n})))}}),[f]);return s||a?t.jsx("div",{className:ob,children:t.jsx(xy,{text:["Creating Automation","Finishing up"]})}):t.jsxs("div",{className:"relative overflow-hidden",children:[t.jsxs(Nc,{mode:"wait",children:["choose-automation-type"===d&&t.jsx(vy.div,{initial:{opacity:0,filter:"blur(8px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(8px)"},transition:{duration:.3,ease:"easeInOut"},children:t.jsx(ib,{onNext:e=>{p({...f,type:e}),h("set-automation-name")}})},"choose-automation-type"),"set-automation-name"===d&&f.type&&t.jsx(vy.div,{initial:{opacity:0,filter:"blur(8px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(8px)"},transition:{duration:.3,ease:"easeInOut"},children:t.jsx(ab,{tailwindClassDefinitions:c,iconDefinitions:u,selectedType:f.type,setAutomationName:e=>{p({...f,name:e})},automationName:f.name??""})},"set-automation-name")]}),t.jsx("div",{className:"pt-2",children:t.jsx(Kv,{onClose:e,tailwindClassDefinitions:c,currentStep:d,setCurrentStep:h,isDisabled:!m,createAutomation:async()=>{if(!m||!f.name||!f.type)return;l(!0);i({name:f.name,type:f.type},{onSuccess:t=>{e?.(t.id?t.id:"error")},onError:()=>{e?.("error")},onSettled:()=>{p({name:void 0,type:void 0})}})}})})]})},e.ReachProvider=({authToken:e,tenantExternalId:r,children:o})=>{const[i]=n.useState((()=>(e&&(Ga=e),new G({defaultOptions:{queries:{retry:(e,t)=>!(t instanceof Error&&"Unauthorized"===t.message)&&e<3,...Wa}}}))));return t.jsxs(re,{client:i,children:[t.jsx(Ba,{clientSideID:"67a3c277012e1f09c67de499",context:{kind:"user",key:r||"anonymous",custom:{businessId:r}},options:{streaming:!1},timeout:2,reactOptions:{useCamelCaseFlagKeys:!1,sendEventsOnFlagRead:!0},children:t.jsx(bc,{children:t.jsx(il,{children:t.jsx(tl,{children:o})})})}),t.jsx(lr,{})]})},e.SegmentBuilder=mb,e.ViewAutomationModal=({automationId:e,tailwindClassDefinitions:n,iconDefinitions:r,autoOpenEditPopup:o})=>{const i=e,s=o,a=Gy(n),l=Yy(r),{automation:c,isFetching:u,isLoading:d,fetchError:h}=Ey(i);return c||!u&&!d?h?t.jsxs("div",{children:["Error: ",h.message]}):c?t.jsxs("div",{className:ob,children:[t.jsx(pN,{automation:c,tailwindClassDefinitions:a,iconDefinitions:l,autoOpenEditPopup:s}),t.jsx("div",{className:"pt-4",children:t.jsxs(Sx,{defaultValue:"content",children:[t.jsxs(kx,{children:[t.jsx(Cx,{value:"content",children:"Content"}),t.jsx(Cx,{value:"recipients",children:"Recipients"})]}),t.jsx(Ex,{value:"recipients",children:t.jsx(_x,{automationId:i,tailwindClassDefinitions:a,iconDefinitions:l})}),t.jsx(Ex,{value:"content",children:t.jsx(Px,{automationId:i,tailwindClassDefinitions:a,iconDefinitions:l})})]})})]}):t.jsx("div",{children:"No automation found"}):t.jsx("div",{className:ob,children:t.jsx(xy,{text:["Fetching Automation data","Finishing up"]})})},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|