PageSourceSearch

https://prcexperimentationstrategygenerator.lovable.app/assets/index-Dgfff62x.js

js prcexperimentationstrategygenerator.lovable.app collected 2026-10-03 03:39:16 UTC 907,834 bytes, 449 lines download raw bytes

vendor: 4,305 bytes, lines 1-9
1var kT=Object.defineProperty;var ty=e=>{throw TypeError(e)};var ST=(e,t,n)=>t in e?kT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tr=(e,t,n)=>ST(e,typeof t!="symbol"?t+"":t,n),vd=(e,t,n)=>t.has(e)||ty("Cannot "+n);var D=(e,t,n)=>(vd(e,t,"read from private field"),n?n.call(e):t.get(e)),xe=(e,t,n)=>t.has(e)?ty("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),le=(e,t,n,r)=>(vd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ct=(e,t,n)=>(vd(e,t,"access private method"),n);var El=(e,t,n,r)=>({set _(s){le(e,t,s,n)},get _(){return D(e,t,r)}});function ET(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var b0={exports:{}},Eu={},k0={exports:{}},de={};/**
2 * @license React
3 * react.production.min.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 */var ll=Symbol.for("react.element"),CT=Symbol.for("react.portal"),jT=Symbol.for("react.fragment"),TT=Symbol.for("react.strict_mode"),NT=Symbol.for("react.profiler"),_T=Symbol.for("react.provider"),RT=Symbol.for("react.context"),PT=Symbol.for("react.forward_ref"),AT=Symbol.for("react.suspense"),OT=Symbol.for("react.memo"),IT=Symbol.for("react.lazy"),ny=Symbol.iterator;function DT(e){return e===null||typeof e!="object"?null:(e=ny&&e[ny]||e["@@iterator"],typeof e=="function"?e:null)}var S0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E0=Object.assign,C0={};function So(e,t,n){this.props=e,this.context=t,this.refs=C0,this.updater=n||S0}So.prototype.isReactComponent={};So.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};So.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function j0(){}j0.prototype=So.prototype;function Ip(e,t,n){this.props=e,this.context=t,this.refs=C0,this.updater=n||S0}var Dp=Ip.prototype=new j0;Dp.constructor=Ip;E0(Dp,So.prototype);Dp.isPureReactComponent=!0;var ry=Array.isArray,T0=Object.prototype.hasOwnProperty,Mp={current:null},N0={key:!0,ref:!0,__self:!0,__source:!0};function _0(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)T0.call(t,r)&&!N0.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:ll,type:e,key:i,ref:o,props:s,_owner:Mp.current}}function MT(e,t){return{$$typeof:ll,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lp(e){return typeof e=="object"&&e!==null&&e.$$typeof===ll}function LT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var sy=/\/+/g;function xd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?LT(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function cc(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ll:case CT:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+xd(o,0):r,ry(s)?(n="",e!=null&&(n=e.replace(sy,"$&/")+"/"),cc(s,t,n,"",function(u){return u})):s!=null&&(Lp(s)&&(s=MT(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(sy,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",ry(e))for(var a=0;a<e.length;a++){i=e[a];var c=r+xd(i,a);o+=cc(i,t,n,c,s)}else if(c=DT(e),typeof c=="function")for(e=c.call(e),a=0;!(i=e.next()).done;)i=i.value,c=r+xd(i,a++),o+=cc(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Cl(e,t,n){if(e==null)return e;var r=[],s=0;return cc(e,r,"","",function(i){return t.call(n,i,s++)}),r}function $T(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Tt={current:null},uc={transition:null},BT={ReactCurrentDispatcher:Tt,ReactCurrentBatchConfig:uc,ReactCurrentOwner:Mp};function R0(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Cl,forEach:function(e,t,n){Cl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Cl(e,function(){t++}),t},toArray:function(e){return Cl(e,function(t){return t})||[]},only:function(e){if(!Lp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};de.Component=So;de.Fragment=jT;de.Profiler=NT;de.PureComponent=Ip;de.StrictMode=TT;de.Suspense=AT;de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BT;de.act=R0;de.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=E0({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Mp.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)T0.call(t,c)&&!N0.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ll,type:e.type,key:s,ref:i,props:r,_owner:o}};de.createContext=function(e){return e={$$typeof:RT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_T,_context:e},e.Consumer=e};de.createElement=_0;de.createFactory=function(e){var t=_0.bind(null,e);return t.type=e,t};de.createRef=function(){return{current:null}};de.forwardRef=function(e){return{$$typeof:PT,render:e}};de.isValidElement=Lp;de.lazy=function(e){return{$$typeof:IT,_payload:{_status:-1,_result:e},_init:$T}};de.memo=function(e,t){return{$$typeof:OT,type:e,compare:t===void 0?null:t}};de.startTransition=function(e){var t=uc.transition;uc.transition={};try{e()}finally{uc.transition=t}};de.unstable_act=R0;de.useCallback=function(e,t){return Tt.current.useCallback(e,t)};de.useContext=function(e){return Tt.current.useContext(e)};de.useDebugValue=function(){};de.useDeferredValue=function(e){return Tt.current.useDeferredValue(e)};de.useEffect=function(e,t){return Tt.current.useEffect(e,t)};de.useId=function(){return Tt.current.useId()};de.useImperativeHandle=function(e,t,n){return Tt.current.useImperativeHandle(e,t,n)};de.useInsertionEffect=function(e,t){return Tt.current.useInsertionEffect(e,t)};de.useLayoutEffect=function(e,t){return Tt.current.useLayoutEffect(e,t)};de.useMemo=function(e,t){return Tt.current.useMemo(e,t)};de.useReducer=function(e,t,n){return Tt.current.useReducer(e,t,n)};de.useRef=function(e){return Tt.current.useRef(e)};de.useState=function(e){return Tt.current.useState(e)};de.useSyncExternalStore=function(e,t,n){return Tt.current.useSyncExternalStore(e,t,n)};de.useTransition=function(){return Tt.current.useTransition()};de.version="18.3.1";k0.exports=de;var x=k0.exports;const I=al(x),$p=ET({__proto__:null,default:I},[x]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var FT=x,VT=Symbol.for("react.element"),UT=Symbol.for("react.fragment"),zT=Object.prototype.hasOwnProperty,WT=FT.__SECRET_INT
vendor: 11,388 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,HT={key:!0,ref:!0,__self:!0,__source:!0};function P0(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)zT.call(t,r)&&!HT.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:VT,type:e,key:i,ref:o,props:s,_owner:WT.current}}Eu.Fragment=UT;Eu.jsx=P0;Eu.jsxs=P0;b0.exports=Eu;var l=b0.exports,A0={exports:{}},Kt={},O0={exports:{}},I0={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(N,R){var $=N.length;N.push(R);e:for(;0<$;){var O=$-1>>>1,L=N[O];if(0<s(L,R))N[O]=R,N[$]=L,$=O;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var R=N[0],$=N.pop();if($!==R){N[0]=$;e:for(var O=0,L=N.length,q=L>>>1;O<q;){var Q=2*(O+1)-1,U=N[Q],K=Q+1,J=N[K];if(0>s(U,$))K<L&&0>s(J,U)?(N[O]=J,N[K]=$,O=K):(N[O]=U,N[Q]=$,O=Q);else if(K<L&&0>s(J,$))N[O]=J,N[K]=$,O=K;else break e}}return R}function s(N,R){var $=N.sortIndex-R.sortIndex;return $!==0?$:N.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var c=[],u=[],d=1,h=null,f=3,m=!1,w=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(N){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=N)r(u),R.sortIndex=R.expirationTime,t(c,R);else break;R=n(u)}}function S(N){if(y=!1,p(N),!w)if(n(c)!==null)w=!0,W(k);else{var R=n(u);R!==null&&V(S,R.startTime-N)}}function k(N,R){w=!1,y&&(y=!1,v(j),j=-1),m=!0;var $=f;try{for(p(R),h=n(c);h!==null&&(!(h.expirationTime>R)||N&&!M());){var O=h.callback;if(typeof O=="function"){h.callback=null,f=h.priorityLevel;var L=O(h.expirationTime<=R);R=e.unstable_now(),typeof L=="function"?h.callback=L:h===n(c)&&r(c),p(R)}else r(c);h=n(c)}if(h!==null)var q=!0;else{var Q=n(u);Q!==null&&V(S,Q.startTime-R),q=!1}return q}finally{h=null,f=$,m=!1}}var E=!1,C=null,j=-1,_=5,P=-1;function M(){return!(e.unstable_now()-P<_)}function A(){if(C!==null){var N=e.unstable_now();P=N;var R=!0;try{R=C(!0,N)}finally{R?z():(E=!1,C=null)}}else E=!1}var z;if(typeof g=="function")z=function(){g(A)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,F=T.port2;T.port1.onmessage=A,z=function(){F.postMessage(null)}}else z=function(){b(A,0)};function W(N){C=N,E||(E=!0,z())}function V(N,R){j=b(function(){N(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){w||m||(w=!0,W(k))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var $=f;f=R;try{return N()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,R){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=f;f=N;try{return R()}finally{f=$}},e.unstable_scheduleCallback=function(N,R,$){var O=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?O+$:O):$=O,N){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=$+L,N={id:d++,callback:R,priorityLevel:N,startTime:$,expirationTime:L,sortIndex:-1},$>O?(N.sortIndex=$,t(u,N),n(c)===null&&N===n(u)&&(y?(v(j),j=-1):y=!0,V(S,$-O))):(N.sortIndex=L,t(c,N),w||m||(w=!0,W(k))),N},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(N){var R=f;return function(){var $=f;f=R;try{return N.apply(this,arguments)}finally{f=$}}}})(I0);O0.exports=I0;var qT=O0.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var KT=x,qt=qT;function B(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var D0=new Set,Sa={};function ri(e,t){uo(e,t),uo(e+"Capture",t)}function uo(e,t){for(Sa[e]=t,e=0;e<t.length;e++)D0.add(t[e])}var fr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mh=Object.prototype.hasOwnProperty,GT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iy={},oy={};function YT(e){return Mh.call(oy,e)?!0:Mh.call(iy,e)?!1:GT.test(e)?oy[e]=!0:(iy[e]=!0,!1)}function QT(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function JT(e,t,n,r){if(t===null||typeof t>"u"||QT(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Nt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){lt[e]=new Nt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];lt[t]=new Nt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){lt[e]=new Nt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){lt[e]=new Nt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){lt[e]=new Nt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){lt[e]=new Nt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){lt[e]=new Nt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){lt[e]=new Nt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){lt[e]=new Nt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bp=/[\-:]([a-z])/g;function Fp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bp,Fp);lt[t]=new Nt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bp,Fp);lt[t]=new Nt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bp,Fp);lt[t]=new Nt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){lt[e]=new Nt(e,1,!1,e.toLowerCase(),null,!1,!1)});lt.xlinkHref=new Nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){lt[e]=new Nt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vp(e,t,n,r){var s=lt.hasOwnProperty(t)?lt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(JT(t,n,s,r)&&(n=null),r||s===null?YT(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var wr=KT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,jl=Symbol.for("react.element"),Ci=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),Up=Symbol.for("react.strict_mode"),Lh=Symbol.for("react.profiler"),M0=Symbol.for("react.provider"),L0=Symbol.for("react.context"),zp=Symbol.for("react.forward_ref"),$h=Symbol.for("react.suspense"),Bh=Symbol.for("react.suspense_list"),Wp=Symbol.for("react.memo"),Ir=Symbol.for("react.lazy"),$0=Symbol.for("react.offscreen"),ay=Symbol.iterator;function Fo(e){return e===null||typeof e!="object"?null:(e=ay&&e[ay]||e["@@iterator"],typeof e=="function"?e:null)}var Be=Object.assign,wd;function Zo(e){if(wd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wd=t&&t[1]||""}return`
34`+wd+e}var bd=!1;function kd(e,t){if(!e||bd)return"";bd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 17,106 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var c=`
37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=a);break}}}finally{bd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zo(e):""}function XT(e){switch(e.tag){case 5:return Zo(e.type);case 16:return Zo("Lazy");case 13:return Zo("Suspense");case 19:return Zo("SuspenseList");case 0:case 2:case 15:return e=kd(e.type,!1),e;case 11:return e=kd(e.type.render,!1),e;case 1:return e=kd(e.type,!0),e;default:return""}}function Fh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case Ci:return"Portal";case Lh:return"Profiler";case Up:return"StrictMode";case $h:return"Suspense";case Bh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L0:return(e.displayName||"Context")+".Consumer";case M0:return(e._context.displayName||"Context")+".Provider";case zp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wp:return t=e.displayName||null,t!==null?t:Fh(e.type)||"Memo";case Ir:t=e._payload,e=e._init;try{return Fh(e(t))}catch{}}return null}function ZT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fh(t);case 8:return t===Up?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function as(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eN(e){var t=B0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tl(e){e._valueTracker||(e._valueTracker=eN(e))}function F0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=B0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ic(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vh(e,t){var n=t.checked;return Be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ly(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=as(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function V0(e,t){t=t.checked,t!=null&&Vp(e,"checked",t,!1)}function Uh(e,t){V0(e,t);var n=as(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zh(e,t.type,n):t.hasOwnProperty("defaultValue")&&zh(e,t.type,as(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zh(e,t,n){(t!=="number"||Ic(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ea=Array.isArray;function zi(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+as(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Wh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return Be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(ea(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:as(n)}}function U0(e,t){var n=as(t.value),r=as(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function dy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function z0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Hh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?z0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Nl,W0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Nl=Nl||document.createElement("div"),Nl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ea(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var oa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tN=["Webkit","ms","Moz","O"];Object.keys(oa).forEach(function(e){tN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oa[t]=oa[e]})});function H0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||oa.hasOwnProperty(e)&&oa[e]?(""+t).trim():t+"px"}function q0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=H0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var nN=Be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qh(e,t){if(t){if(nN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Kh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gh=null;function Hp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yh=null,Wi=null,Hi=null;function hy(e){if(e=dl(e)){if(typeof Yh!="function")throw Error(B(280));var t=e.stateNode;t&&(t=_u(t),Yh(e.stateNode,e.type,t))}}function K0(e){Wi?Hi?Hi.push(e):Hi=[e]:Wi=e}function G0(){if(Wi){var e=Wi,t=Hi;if(Hi=Wi=null,hy(e),t)for(e=0;e<t.length;e++)hy(t[e])}}function Y0(e,t){return e(t)}function Q0(){}var Sd=!1;function J0(e,t,n){if(Sd)return e(t,n);Sd=!0;try{return Y0(e,t,n)}finally{Sd=!1,(Wi!==null||Hi!==null)&&(Q0(),G0())}}function Ca(e,t){var n=e.stateNode;if(n===null)return null;var r=_u(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(B(231,t,typeof n));return n}var Qh=!1;if(fr)try{var Vo={};Object.defineProperty(Vo,"passive",{get:function(){Qh=!0}}),window.addEventListener("test",Vo,Vo),window.removeEventListener("test",Vo,Vo)}catch{Qh=!1}function rN(e,t,n,r,s,i,o,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var aa=!1,Dc=null,Mc=!1,Jh=null,sN={onError:function(e){aa=!0,Dc=e}};function iN(e,t,n,r,s,i,o,a,c){aa=!1,Dc=null,rN.apply(sN,arguments)}function oN(e,t,n,r,s,i,o,a,c){if(iN.apply(this,arguments),aa){if(aa){var u=Dc;aa=!1,Dc=null}else throw Error(B(198));Mc||(Mc=!0,Jh=u)}}function si(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function X0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function fy(e){if(si(e)!==e)throw Error(B(188))}function aN(e){var t=e.alternate;if(!t){if(t=si(e),t===null)throw Error(B(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return fy(s),e;if(i===r)return fy(s),t;i=i.sibling}throw Error(B(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function Z0(e){return e=aN(e),e!==null?eb(e):null}function eb(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=eb(e);if(t!==null)return t;e=e.sibling}return null}var tb=qt.unstable_scheduleCallback,py=qt.unstable_cancelCallback,lN=qt.unstable_shouldYield,cN=qt.unstable_requestPaint,ze=qt.unstable_now,uN=qt.unstable_getCurrentPriorityLevel,qp=qt.unstable_ImmediatePriority,nb=qt.unstable_UserBlockingPriority,Lc=qt.unstable_NormalPriority,dN=qt.unstable_LowPriority,rb=qt.unstable_IdlePriority,Cu=null,Fn=null;function hN(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(Cu,e,void 0,(e.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:mN,fN=Math.log,pN=Math.LN2;function mN(e){return e>>>=0,e===0?32:31-(fN(e)/pN|0)|0}var _l=64,Rl=4194304;function ta(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $c(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=ta(a):(i&=o,i!==0&&(r=ta(i)))}else o=n&~s,o!==0?r=ta(o):i!==0&&(r=ta(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-En(t),s=1<<n,r|=e[n],t&=~s;return r}function gN(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yN(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-En(i),a=1<<o,c=s[o];c===-1?(!(a&n)||a&r)&&(s[o]=gN(a,t)):c<=t&&(e.expiredLanes|=a),i&=~a}}function Xh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function sb(){var e=_l;return _l<<=1,!(_l&4194240)&&(_l=64),e}function Ed(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-En(t),e[t]=n}function vN(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-En(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Kp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-En(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ke=0;function ib(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ob,Gp,ab,lb,cb,Zh=!1,Pl=[],Qr=null,Jr=null,Xr=null,ja=new Map,Ta=new Map,Lr=[],xN="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function my(e,t){switch(e){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":ja.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ta.delete(t.pointerId)}}function Uo(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=dl(t),t!==null&&Gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function wN(e,t,n,r,s){switch(t){case"focusin":return Qr=Uo(Qr,e,t,n,r,s),!0;case"dragenter":return Jr=Uo(Jr,e,t,n,r,s),!0;case"mouseover":return Xr=Uo(Xr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ja.set(i,Uo(ja.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ta.set(i,Uo(Ta.get(i)||null,e,t,n,r,s)),!0}return!1}function ub(e){var t=As(e.target);if(t!==null){var n=si(t);if(n!==null){if(t=n.tag,t===13){if(t=X0(n),t!==null){e.blockedOn=t,cb(e.priority,function(){ab(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ef(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gh=r,n.target.dispatchEvent(r),Gh=null}else return t=dl(n),t!==null&&Gp(t),e.blockedOn=n,!1;t.shift()}return!0}function gy(e,t,n){dc(e)&&n.delete(t)}function bN(){Zh=!1,Qr!==null&&dc(Qr)&&(Qr=null),Jr!==null&&dc(Jr)&&(Jr=null),Xr!==null&&dc(Xr)&&(Xr=null),ja.forEach(gy),Ta.forEach(gy)}function zo(e,t){e.blockedOn===t&&(e.blockedOn=null,Zh||(Zh=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,bN)))}function Na(e){function t(s){return zo(s,e)}if(0<Pl.length){zo(Pl[0],e);for(var n=1;n<Pl.length;n++){var r=Pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qr!==null&&zo(Qr,e),Jr!==null&&zo(Jr,e),Xr!==null&&zo(Xr,e),ja.forEac
vendor: 8,713 bytes, line 37
37h(t),Ta.forEach(t),n=0;n<Lr.length;n++)r=Lr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lr.length&&(n=Lr[0],n.blockedOn===null);)ub(n),n.blockedOn===null&&Lr.shift()}var qi=wr.ReactCurrentBatchConfig,Bc=!0;function kN(e,t,n,r){var s=ke,i=qi.transition;qi.transition=null;try{ke=1,Yp(e,t,n,r)}finally{ke=s,qi.transition=i}}function SN(e,t,n,r){var s=ke,i=qi.transition;qi.transition=null;try{ke=4,Yp(e,t,n,r)}finally{ke=s,qi.transition=i}}function Yp(e,t,n,r){if(Bc){var s=ef(e,t,n,r);if(s===null)Id(e,t,r,Fc,n),my(e,r);else if(wN(s,e,t,n,r))r.stopPropagation();else if(my(e,r),t&4&&-1<xN.indexOf(e)){for(;s!==null;){var i=dl(s);if(i!==null&&ob(i),i=ef(e,t,n,r),i===null&&Id(e,t,r,Fc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}var Fc=null;function ef(e,t,n,r){if(Fc=null,e=Hp(r),e=As(e),e!==null)if(t=si(e),t===null)e=null;else if(n=t.tag,n===13){if(e=X0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fc=e,null}function db(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(uN()){case qp:return 1;case nb:return 4;case Lc:case dN:return 16;case rb:return 536870912;default:return 16}default:return 16}}var qr=null,Qp=null,hc=null;function hb(){if(hc)return hc;var e,t=Qp,n=t.length,r,s="value"in qr?qr.value:qr.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return hc=s.slice(e,1<r?1-r:void 0)}function fc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Al(){return!0}function yy(){return!1}function Gt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Al:yy,this.isPropagationStopped=yy,this}return Be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Al)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),t}var Eo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jp=Gt(Eo),ul=Be({},Eo,{view:0,detail:0}),EN=Gt(ul),Cd,jd,Wo,ju=Be({},ul,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wo&&(Wo&&e.type==="mousemove"?(Cd=e.screenX-Wo.screenX,jd=e.screenY-Wo.screenY):jd=Cd=0,Wo=e),Cd)},movementY:function(e){return"movementY"in e?e.movementY:jd}}),vy=Gt(ju),CN=Be({},ju,{dataTransfer:0}),jN=Gt(CN),TN=Be({},ul,{relatedTarget:0}),Td=Gt(TN),NN=Be({},Eo,{animationName:0,elapsedTime:0,pseudoElement:0}),_N=Gt(NN),RN=Be({},Eo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PN=Gt(RN),AN=Be({},Eo,{data:0}),xy=Gt(AN),ON={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},DN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=DN[e])?!!t[e]:!1}function Xp(){return MN}var LN=Be({},ul,{key:function(e){if(e.key){var t=ON[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?IN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xp,charCode:function(e){return e.type==="keypress"?fc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$N=Gt(LN),BN=Be({},ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wy=Gt(BN),FN=Be({},ul,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xp}),VN=Gt(FN),UN=Be({},Eo,{propertyName:0,elapsedTime:0,pseudoElement:0}),zN=Gt(UN),WN=Be({},ju,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),HN=Gt(WN),qN=[9,13,27,32],Zp=fr&&"CompositionEvent"in window,la=null;fr&&"documentMode"in document&&(la=document.documentMode);var KN=fr&&"TextEvent"in window&&!la,fb=fr&&(!Zp||la&&8<la&&11>=la),by=" ",ky=!1;function pb(e,t){switch(e){case"keyup":return qN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ti=!1;function GN(e,t){switch(e){case"compositionend":return mb(t);case"keypress":return t.which!==32?null:(ky=!0,by);case"textInput":return e=t.data,e===by&&ky?null:e;default:return null}}function YN(e,t){if(Ti)return e==="compositionend"||!Zp&&pb(e,t)?(e=hb(),hc=Qp=qr=null,Ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return fb&&t.locale!=="ko"?null:t.data;default:return null}}var QN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!QN[e.type]:t==="textarea"}function gb(e,t,n,r){K0(r),t=Vc(t,"onChange"),0<t.length&&(n=new Jp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ca=null,_a=null;function JN(e){Tb(e,0)}function Tu(e){var t=Ri(e);if(F0(t))return e}function XN(e,t){if(e==="change")return t}var yb=!1;if(fr){var Nd;if(fr){var _d="oninput"in document;if(!_d){var Ey=document.createElement("div");Ey.setAttribute("oninput","return;"),_d=typeof Ey.oninput=="function"}Nd=_d}else Nd=!1;yb=Nd&&(!document.documentMode||9<document.documentMode)}function Cy(){ca&&(ca.detachEvent("onpropertychange",vb),_a=ca=null)}function vb(e){if(e.propertyName==="value"&&Tu(_a)){var t=[];gb(t,_a,e,Hp(e)),J0(JN,t)}}function ZN(e,t,n){e==="focusin"?(Cy(),ca=t,_a=n,ca.attachEvent("onpropertychange",vb)):e==="focusout"&&Cy()}function e_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Tu(_a)}function t_(e,t){if(e==="click")return Tu(t)}
vendor: 5,017 bytes, line 37
37function n_(e,t){if(e==="input"||e==="change")return Tu(t)}function r_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jn=typeof Object.is=="function"?Object.is:r_;function Ra(e,t){if(jn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Mh.call(t,s)||!jn(e[s],t[s]))return!1}return!0}function jy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ty(e,t){var n=jy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jy(n)}}function xb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wb(){for(var e=window,t=Ic();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ic(e.document)}return t}function em(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function s_(e){var t=wb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xb(n.ownerDocument.documentElement,n)){if(r!==null&&em(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Ty(n,i);var o=Ty(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var i_=fr&&"documentMode"in document&&11>=document.documentMode,Ni=null,tf=null,ua=null,nf=!1;function Ny(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nf||Ni==null||Ni!==Ic(r)||(r=Ni,"selectionStart"in r&&em(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ua&&Ra(ua,r)||(ua=r,r=Vc(tf,"onSelect"),0<r.length&&(t=new Jp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ni)))}function Ol(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:Ol("Animation","AnimationEnd"),animationiteration:Ol("Animation","AnimationIteration"),animationstart:Ol("Animation","AnimationStart"),transitionend:Ol("Transition","TransitionEnd")},Rd={},bb={};fr&&(bb=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Nu(e){if(Rd[e])return Rd[e];if(!_i[e])return e;var t=_i[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in bb)return Rd[e]=t[n];return e}var kb=Nu("animationend"),Sb=Nu("animationiteration"),Eb=Nu("animationstart"),Cb=Nu("transitionend"),jb=new Map,_y="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ps(e,t){jb.set(e,t),ri(t,[e])}for(var Pd=0;Pd<_y.length;Pd++){var Ad=_y[Pd],o_=Ad.toLowerCase(),a_=Ad[0].toUpperCase()+Ad.slice(1);ps(o_,"on"+a_)}ps(kb,"onAnimationEnd");ps(Sb,"onAnimationIteration");ps(Eb,"onAnimationStart");ps("dblclick","onDoubleClick");ps("focusin","onFocus");ps("focusout","onBlur");ps(Cb,"onTransitionEnd");uo("onMouseEnter",["mouseout","mouseover"]);uo("onMouseLeave",["mouseout","mouseover"]);uo("onPointerEnter",["pointerout","pointerover"]);uo("onPointerLeave",["pointerout","pointerover"]);ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ri("onBeforeInput",["compositionend","keypress","textInput","paste"]);ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var na="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),l_=new Set("cancel close invalid load scroll toggle".split(" ").concat(na));function Ry(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,oN(r,t,void 0,e),e.currentTarget=null}function Tb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==i&&s.isPropagationStopped())break e;Ry(s,a,u),i=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,u=a.currentTarget,a=a.listener,c!==i&&s.isPropagationStopped())break e;Ry(s,a,u),i=c}}}if(Mc)throw e=Jh,Mc=!1,Jh=null,e}function Te(e,t){var n=t[lf];n===void 0&&(n=t[lf]=new Set);var r=e+"__bubble";n.has(r)||(Nb(t,e,2,!1),n.add(r))}function Od(e,t,n){var r=0;t&&(r|=4),Nb(n,e,r,t)}var Il="_reactListening"+Math.random().toString(36).slice(2);function Pa(e){if(!e[Il]){e[Il]=!0,D0.forEach(function(n){n!=="selectionchange"&&(l_.has(n)||Od(n,!1,e),Od(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Il]||(t[Il]=!0,Od("selectionchange",!1,t))}}function Nb(e,t,n,r){switch(db(t)){case 1:var s=kN;break;case 4:s=SN;break;default:s=Yp}n=s.bind(null,t,n,e),s=void 0,!Qh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Id(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;a!==null;){if(o=As(a),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}a=a.parentNode}}r=r.return}J0(function(){var u=i,d=Hp(n),h=[];e:{var f=jb.get(e);if(f!==void 0){var m=Jp,w=e;switch(e){case"keypress":if(fc(n)===0)break e;case"keydown":case"keyup":m=$N;break;case"focusin":w="focus",m=Td;break;case"focusout":w="blur",m=Td;break;case"beforeblur":case"afterblur":m=Td;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=jN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=VN;break;case kb:case Sb:case Eb:m=_N;break;case Cb:m=zN;break;case"scroll":m=EN;break;case"wheel":m=HN;break;case"copy":case"cut":case"paste":m=PN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=wy}var y=(t&4)!==0,b=!y&&e==="scroll",v=y?f!==null?f+"Capture":null:f;y=[];for(var g=u,p;g!==null;){p=g;var S=p.stateNode;if(p.tag===5&&S!==null&&(p=S,v!==null&&(S=Ca(g,v),S!=null&&y.push(Aa(g,S,p)))),b)break;g=g.return}0<y.length&&(f=new m(f,w,null,n,d),h.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Gh&&(w=n.relatedTarget||n.fromElement)&&(As(w)||w[pr]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(w=n.relatedTarget||n.toElement,m=u,w=w?As(w):null,w!==null&&(b=si(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=u),m!==w)){if(y=vy,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=wy,S="onPointerLeave",v="onPointerEnter",g="pointer"),b=m==null?f:Ri(m),p=w==null?f:Ri(w),f=new y(S,g+"leave",m,n,d),f.target=b,f.relatedTarget=p,S=null,As(d)===u&&(y=new y(v,g+"enter",w,n,d),y.target=p,y.relatedTarget=b,S=y),b=S,m&&w)t:{for(y=m,v=w,g=0,p=y;p;p=di(p))g++;for(p=0,S=v;S;S=di(S))p++;for(;0<g-p;)y=di(y),g--;for(;0<p-g;)v=di(v),p--;for(;g--;){if(y===v||v!==null&&y===v.alternate)break t;y=di(y),v=di(v)}y=null}else y=null;m!==null&&Py(h,f,m,y,!1),w!==null&&b!==null&&Py(h,b,w,y,!0)}}
vendor: 7,582 bytes, lines 37-38
37e:{if(f=u?Ri(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var k=XN;else if(Sy(f))if(yb)k=n_;else{k=e_;var E=ZN}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=t_);if(k&&(k=k(e,u))){gb(h,k,n,d);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&zh(f,"number",f.value)}switch(E=u?Ri(u):window,e){case"focusin":(Sy(E)||E.contentEditable==="true")&&(Ni=E,tf=u,ua=null);break;case"focusout":ua=tf=Ni=null;break;case"mousedown":nf=!0;break;case"contextmenu":case"mouseup":case"dragend":nf=!1,Ny(h,n,d);break;case"selectionchange":if(i_)break;case"keydown":case"keyup":Ny(h,n,d)}var C;if(Zp)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Ti?pb(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(fb&&n.locale!=="ko"&&(Ti||j!=="onCompositionStart"?j==="onCompositionEnd"&&Ti&&(C=hb()):(qr=d,Qp="value"in qr?qr.value:qr.textContent,Ti=!0)),E=Vc(u,j),0<E.length&&(j=new xy(j,e,null,n,d),h.push({event:j,listeners:E}),C?j.data=C:(C=mb(n),C!==null&&(j.data=C)))),(C=KN?GN(e,n):YN(e,n))&&(u=Vc(u,"onBeforeInput"),0<u.length&&(d=new xy("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}Tb(h,t)})}function Aa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ca(e,n),i!=null&&r.unshift(Aa(e,i,s)),i=Ca(e,t),i!=null&&r.push(Aa(e,i,s))),e=e.return}return r}function di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Py(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,s?(c=Ca(n,i),c!=null&&o.unshift(Aa(n,c,a))):s||(c=Ca(n,i),c!=null&&o.push(Aa(n,c,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var c_=/\r\n?/g,u_=/\u0000|\uFFFD/g;function Ay(e){return(typeof e=="string"?e:""+e).replace(c_,`
38`).replace(u_,"")}function Dl(e,t,n){if(t=Ay(t),Ay(e)!==t&&n)throw Error(B(425))}function Uc(){}var rf=null,sf=null;function of(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=typeof setTimeout=="function"?setTimeout:void 0,d_=typeof clearTimeout=="function"?clearTimeout:void 0,Oy=typeof Promise=="function"?Promise:void 0,h_=typeof queueMicrotask=="function"?queueMicrotask:typeof Oy<"u"?function(e){return Oy.resolve(null).then(e).catch(f_)}:af;function f_(e){setTimeout(function(){throw e})}function Dd(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Na(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Na(t)}function Zr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Iy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Co=Math.random().toString(36).slice(2),Ln="__reactFiber$"+Co,Oa="__reactProps$"+Co,pr="__reactContainer$"+Co,lf="__reactEvents$"+Co,p_="__reactListeners$"+Co,m_="__reactHandles$"+Co;function As(e){var t=e[Ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pr]||n[Ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Iy(e);e!==null;){if(n=e[Ln])return n;e=Iy(e)}return t}e=n,n=e.parentNode}return null}function dl(e){return e=e[Ln]||e[pr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ri(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function _u(e){return e[Oa]||null}var cf=[],Pi=-1;function ms(e){return{current:e}}function Ne(e){0>Pi||(e.current=cf[Pi],cf[Pi]=null,Pi--)}function Ce(e,t){Pi++,cf[Pi]=e.current,e.current=t}var ls={},mt=ms(ls),At=ms(!1),Gs=ls;function ho(e,t){var n=e.type.contextTypes;if(!n)return ls;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ot(e){return e=e.childContextTypes,e!=null}function zc(){Ne(At),Ne(mt)}function Dy(e,t,n){if(mt.current!==ls)throw Error(B(168));Ce(mt,t),Ce(At,n)}function _b(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(B(108,ZT(e)||"Unknown",s));return Be({},n,r)}function Wc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ls,Gs=mt.current,Ce(mt,e),Ce(At,At.current),!0}function My(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=_b(e,t,Gs),r.__reactInternalMemoizedMergedChildContext=e,Ne(At),Ne(mt),Ce(mt,e)):Ne(At),Ce(At,n)}var lr=null,Ru=!1,Md=!1;function Rb(e){lr===null?lr=[e]:lr.push(e)}function g_(e){Ru=!0,Rb(e)}function gs(){if(!Md&&lr!==null){Md=!0;var e=0,t=ke;try{var n=lr;for(ke=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}lr=null,Ru=!1}catch(s){throw lr!==null&&(lr=lr.slice(e+1)),tb(qp,gs),s}finally{ke=t,Md=!1}}return null}var Ai=[],Oi=0,Hc=null,qc=0,Xt=[],Zt=0,Ys=null,ur=1,dr="";function Cs(e,t){Ai[Oi++]=qc,Ai[Oi++]=Hc,Hc=e,qc=t}function Pb(e,t,n){Xt[Zt++]=ur,Xt[Zt++]=dr,Xt[Zt++]=Ys,Ys=e;var r=ur;e=dr;var s=32-En(r)-1;r&=~(1<<s),n+=1;var i=32-En(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,ur=1<<32-En(t)+s|n<<s|r,dr=i+e}else ur=1<<i|n<<s|r,dr=e}function tm(e){e.return!==null&&(Cs(e,1),Pb(e,1,0))}function nm(e){for(;e===Hc;)Hc=Ai[--Oi],Ai[Oi]=null,qc=Ai[--Oi],Ai[Oi]=null;for(;e===Ys;)Ys=Xt[--Zt],Xt[Zt]=null,dr=Xt[--Zt],Xt[Zt]=null,ur=Xt[--Zt],Xt[Zt]=null}var Wt=null,Ut=null,Oe=!1,kn=null;function Ab(e,t){var n=en(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ly(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Ut=Zr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ys!==null?{id:ur,overflow:dr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Ut=null,!0):!1;default:return!1}}function uf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function df(e){if(Oe){var t=Ut;if(t){var n=t;if(!Ly(e,t)){if(uf(e))throw Error(B(418));t=Zr(n.nextSibling);var r=Wt;t&&Ly(e,t)?Ab(r,n):(e.flags=e.flags&-4097|2,Oe=!1,Wt=e)}}else{if(uf(e))throw Error(B(418));e.flags=e.flags&-4097|2,Oe=!1,Wt=e}}}function $y(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Ml(e){if(e!==Wt)return!1;if(!Oe)return $y(e),Oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!of(e.type,e.memoizedProps)),t&&(t=Ut)){if(uf(e))throw Ob(),Error(B(418));for(;t;)Ab(e,t),t=Zr(t.nextSibling)}if($y(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317)
vendor: 14,299 bytes, line 38
38);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ut=Zr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ut=null}}else Ut=Wt?Zr(e.stateNode.nextSibling):null;return!0}function Ob(){for(var e=Ut;e;)e=Zr(e.nextSibling)}function fo(){Ut=Wt=null,Oe=!1}function rm(e){kn===null?kn=[e]:kn.push(e)}var y_=wr.ReactCurrentBatchConfig;function Ho(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(B(309));var r=n.stateNode}if(!r)throw Error(B(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function Ll(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function By(e){var t=e._init;return t(e._payload)}function Ib(e){function t(v,g){if(e){var p=v.deletions;p===null?(v.deletions=[g],v.flags|=16):p.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=rs(v,g),v.index=0,v.sibling=null,v}function i(v,g,p){return v.index=p,e?(p=v.alternate,p!==null?(p=p.index,p<g?(v.flags|=2,g):p):(v.flags|=2,g)):(v.flags|=1048576,g)}function o(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,p,S){return g===null||g.tag!==6?(g=zd(p,v.mode,S),g.return=v,g):(g=s(g,p),g.return=v,g)}function c(v,g,p,S){var k=p.type;return k===ji?d(v,g,p.props.children,S,p.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ir&&By(k)===g.type)?(S=s(g,p.props),S.ref=Ho(v,g,p),S.return=v,S):(S=wc(p.type,p.key,p.props,null,v.mode,S),S.ref=Ho(v,g,p),S.return=v,S)}function u(v,g,p,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==p.containerInfo||g.stateNode.implementation!==p.implementation?(g=Wd(p,v.mode,S),g.return=v,g):(g=s(g,p.children||[]),g.return=v,g)}function d(v,g,p,S,k){return g===null||g.tag!==7?(g=qs(p,v.mode,S,k),g.return=v,g):(g=s(g,p),g.return=v,g)}function h(v,g,p){if(typeof g=="string"&&g!==""||typeof g=="number")return g=zd(""+g,v.mode,p),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case jl:return p=wc(g.type,g.key,g.props,null,v.mode,p),p.ref=Ho(v,null,g),p.return=v,p;case Ci:return g=Wd(g,v.mode,p),g.return=v,g;case Ir:var S=g._init;return h(v,S(g._payload),p)}if(ea(g)||Fo(g))return g=qs(g,v.mode,p,null),g.return=v,g;Ll(v,g)}return null}function f(v,g,p,S){var k=g!==null?g.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return k!==null?null:a(v,g,""+p,S);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case jl:return p.key===k?c(v,g,p,S):null;case Ci:return p.key===k?u(v,g,p,S):null;case Ir:return k=p._init,f(v,g,k(p._payload),S)}if(ea(p)||Fo(p))return k!==null?null:d(v,g,p,S,null);Ll(v,p)}return null}function m(v,g,p,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(p)||null,a(g,v,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case jl:return v=v.get(S.key===null?p:S.key)||null,c(g,v,S,k);case Ci:return v=v.get(S.key===null?p:S.key)||null,u(g,v,S,k);case Ir:var E=S._init;return m(v,g,p,E(S._payload),k)}if(ea(S)||Fo(S))return v=v.get(p)||null,d(g,v,S,k,null);Ll(g,S)}return null}function w(v,g,p,S){for(var k=null,E=null,C=g,j=g=0,_=null;C!==null&&j<p.length;j++){C.index>j?(_=C,C=null):_=C.sibling;var P=f(v,C,p[j],S);if(P===null){C===null&&(C=_);break}e&&C&&P.alternate===null&&t(v,C),g=i(P,g,j),E===null?k=P:E.sibling=P,E=P,C=_}if(j===p.length)return n(v,C),Oe&&Cs(v,j),k;if(C===null){for(;j<p.length;j++)C=h(v,p[j],S),C!==null&&(g=i(C,g,j),E===null?k=C:E.sibling=C,E=C);return Oe&&Cs(v,j),k}for(C=r(v,C);j<p.length;j++)_=m(C,v,j,p[j],S),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?j:_.key),g=i(_,g,j),E===null?k=_:E.sibling=_,E=_);return e&&C.forEach(function(M){return t(v,M)}),Oe&&Cs(v,j),k}function y(v,g,p,S){var k=Fo(p);if(typeof k!="function")throw Error(B(150));if(p=k.call(p),p==null)throw Error(B(151));for(var E=k=null,C=g,j=g=0,_=null,P=p.next();C!==null&&!P.done;j++,P=p.next()){C.index>j?(_=C,C=null):_=C.sibling;var M=f(v,C,P.value,S);if(M===null){C===null&&(C=_);break}e&&C&&M.alternate===null&&t(v,C),g=i(M,g,j),E===null?k=M:E.sibling=M,E=M,C=_}if(P.done)return n(v,C),Oe&&Cs(v,j),k;if(C===null){for(;!P.done;j++,P=p.next())P=h(v,P.value,S),P!==null&&(g=i(P,g,j),E===null?k=P:E.sibling=P,E=P);return Oe&&Cs(v,j),k}for(C=r(v,C);!P.done;j++,P=p.next())P=m(C,v,j,P.value,S),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?j:P.key),g=i(P,g,j),E===null?k=P:E.sibling=P,E=P);return e&&C.forEach(function(A){return t(v,A)}),Oe&&Cs(v,j),k}function b(v,g,p,S){if(typeof p=="object"&&p!==null&&p.type===ji&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case jl:e:{for(var k=p.key,E=g;E!==null;){if(E.key===k){if(k=p.type,k===ji){if(E.tag===7){n(v,E.sibling),g=s(E,p.props.children),g.return=v,v=g;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ir&&By(k)===E.type){n(v,E.sibling),g=s(E,p.props),g.ref=Ho(v,E,p),g.return=v,v=g;break e}n(v,E);break}else t(v,E);E=E.sibling}p.type===ji?(g=qs(p.props.children,v.mode,S,p.key),g.return=v,v=g):(S=wc(p.type,p.key,p.props,null,v.mode,S),S.ref=Ho(v,g,p),S.return=v,v=S)}return o(v);case Ci:e:{for(E=p.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===p.containerInfo&&g.stateNode.implementation===p.implementation){n(v,g.sibling),g=s(g,p.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Wd(p,v.mode,S),g.return=v,v=g}return o(v);case Ir:return E=p._init,b(v,g,E(p._payload),S)}if(ea(p))return w(v,g,p,S);if(Fo(p))return y(v,g,p,S);Ll(v,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,g!==null&&g.tag===6?(n(v,g.sibling),g=s(g,p),g.return=v,v=g):(n(v,g),g=zd(p,v.mode,S),g.return=v,v=g),o(v)):n(v,g)}return b}var po=Ib(!0),Db=Ib(!1),Kc=ms(null),Gc=null,Ii=null,sm=null;function im(){sm=Ii=Gc=null}function om(e){var t=Kc.current;Ne(Kc),e._currentValue=t}function hf(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ki(e,t){Gc=e,sm=Ii=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(sm!==e)if(e={context:e,memoizedValue:t,next:null},Ii===null){if(Gc===null)throw Error(B(308));Ii=e,Gc.dependencies={lanes:0,firstContext:e}}else Ii=Ii.next=e;return t}var Os=null;function am(e){Os===null?Os=[e]:Os.push(e)}function Mb(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,am(t)):(n.next=s.next,s.next=n),t.interleaved=n,mr(e,r)}function mr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dr=!1;function lm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lb(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function es(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ve&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,mr(e,n)}return s=r.interleaved,s===null?(t.next=t,am(r)):(t.next=s.next,s.next=t),r.interleaved=t,mr(e,n)}function pc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kp(e,n)}}function Fy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yc(e,t,n,r){var s=e.updateQueue;Dr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,a=i;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(f=t,m=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(m,h,f);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,f=typeof w=="function"?w.call(m,h,f):w,f==null)break e;h=Be({},h,f);break e;case 2:Dr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Js|=o,e.lanes=o,e.memoizedState=h}}function Vy(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(B(191,s));s.call(r)}}}var hl={},Vn=ms(hl),Ia=ms(hl),Da=ms(hl);function Is(e){if(e===hl)throw Error(B(174));return e}function cm(e,t){switch(Ce(Da,t),Ce(Ia,e),Ce(Vn,hl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hh(t,e)}Ne(Vn),Ce(Vn,t)}function mo(){Ne(Vn),Ne(Ia),Ne(Da)}function $b(e){Is(Da.current);var t=Is(Vn.current),n=Hh(t,e.type);t!==n&&(Ce(Ia,e),Ce(Vn,n))}function um(e){Ia.current===e&&(Ne(Vn),Ne(Ia))}var Me=ms(0);function Qc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ld=[];function dm(){for(var e=0;e<Ld.length;e++)Ld[e]._workInProgressVersionPrimary=null;Ld.length=0}var mc=wr.ReactCurrentDispatcher,$d=wr.ReactCurrentBatchConfig,Qs=0,$e=null,Qe=null,et=null,Jc=!1,da=!1,Ma=0,v_=0;function ut(){throw Error(B(321))}function hm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jn(e[n],t[n]))return!1;return!0}function fm(e,t,n,r,s,i){if(Qs=i,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,mc.current=e===null||e.memoizedState===null?k_:S_,e=n(r,s),da){i=0;do{if(da=!1,Ma=0,25<=i)throw Error(B(301));i+=1,et=Qe=null,t.updateQueue=null,mc.current=E_,e=n(r,s)}while(da)}if(mc.current=Xc,t=Qe!==null&&Qe.next!==null,Qs=0,et=Qe=$e=null,Jc=!1,t)throw Error(B(300));return e}function pm(){var e=Ma!==0;return Ma=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?$e.memoizedState=et=e:et=et.next=e,et}function on(){if(Qe===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=et===null?$e.memoizedState:et.next;if(t!==null)et=t,Qe=e;else{if(e===null)throw Error(B(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},et===null?$e.memoizedState=et=e:et=et.next=e}return et}function La(e,t){return typeof t=="function"?t(e):t}function Bd(e){var t=on(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=Qe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,c=null,u=i;do{var d=u.lane;if((Qs&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=h,o=r):c=c.next=h,$e.lanes|=d,Js|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=a,jn(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,$e.lanes|=i,Js|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fd(e){var t=on(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);jn(i,t.memoizedState)||(Pt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Bb(){}function Fb(e,t){var n=$e,r=on(),s=t(),i=!jn(r.memoizedState,s);if(i&&(r.memoizedState=s,Pt=!0),r=r.queue,mm(zb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,$a(9,Ub.bind(null,n,r,s,t),void 0,null),tt===null)throw Error(B(349));Qs&30||Vb(n,t,s)}return s}function Vb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ub(e,t,n,r){t.value=n,t.getSnapshot=r,Wb(t)&&Hb(e)}function zb(e,t,n){return n(function(){Wb(t)&&Hb(e)}
vendor: 4,917 bytes, line 38
38)}function Wb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jn(e,n)}catch{return!0}}function Hb(e){var t=mr(e,1);t!==null&&Cn(t,e,1,-1)}function Uy(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:e},t.queue=e,e=e.dispatch=b_.bind(null,$e,e),[t.memoizedState,e]}function $a(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function qb(){return on().memoizedState}function gc(e,t,n,r){var s=On();$e.flags|=e,s.memoizedState=$a(1|t,n,void 0,r===void 0?null:r)}function Pu(e,t,n,r){var s=on();r=r===void 0?null:r;var i=void 0;if(Qe!==null){var o=Qe.memoizedState;if(i=o.destroy,r!==null&&hm(r,o.deps)){s.memoizedState=$a(t,n,i,r);return}}$e.flags|=e,s.memoizedState=$a(1|t,n,i,r)}function zy(e,t){return gc(8390656,8,e,t)}function mm(e,t){return Pu(2048,8,e,t)}function Kb(e,t){return Pu(4,2,e,t)}function Gb(e,t){return Pu(4,4,e,t)}function Yb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qb(e,t,n){return n=n!=null?n.concat([e]):null,Pu(4,4,Yb.bind(null,t,e),n)}function gm(){}function Jb(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xb(e,t){var n=on();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zb(e,t,n){return Qs&21?(jn(n,t)||(n=sb(),$e.lanes|=n,Js|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function x_(e,t){var n=ke;ke=n!==0&&4>n?n:4,e(!0);var r=$d.transition;$d.transition={};try{e(!1),t()}finally{ke=n,$d.transition=r}}function e1(){return on().memoizedState}function w_(e,t,n){var r=ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},t1(e))n1(t,n);else if(n=Mb(e,t,n,r),n!==null){var s=jt();Cn(n,e,r,s),r1(n,t,r)}}function b_(e,t,n){var r=ns(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(t1(e))n1(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,jn(a,o)){var c=t.interleaved;c===null?(s.next=s,am(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Mb(e,t,s,r),n!==null&&(s=jt(),Cn(n,e,r,s),r1(n,t,r))}}function t1(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function n1(e,t){da=Jc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function r1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kp(e,n)}}var Xc={readContext:sn,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},k_={readContext:sn,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:zy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,gc(4194308,4,Yb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gc(4194308,4,e,t)},useInsertionEffect:function(e,t){return gc(4,2,e,t)},useMemo:function(e,t){var n=On();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=On();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=w_.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:Uy,useDebugValue:gm,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=Uy(!1),t=e[0];return e=x_.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,s=On();if(Oe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),tt===null)throw Error(B(349));Qs&30||Vb(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,zy(zb.bind(null,r,i,e),[e]),r.flags|=2048,$a(9,Ub.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=On(),t=tt.identifierPrefix;if(Oe){var n=dr,r=ur;n=(r&~(1<<32-En(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ma++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=v_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},S_={readContext:sn,useCallback:Jb,useContext:sn,useEffect:mm,useImperativeHandle:Qb,useInsertionEffect:Kb,useLayoutEffect:Gb,useMemo:Xb,useReducer:Bd,useRef
vendor: 4,179 bytes, lines 38-40
38:qb,useState:function(){return Bd(La)},useDebugValue:gm,useDeferredValue:function(e){var t=on();return Zb(t,Qe.memoizedState,e)},useTransition:function(){var e=Bd(La)[0],t=on().memoizedState;return[e,t]},useMutableSource:Bb,useSyncExternalStore:Fb,useId:e1,unstable_isNewReconciler:!1},E_={readContext:sn,useCallback:Jb,useContext:sn,useEffect:mm,useImperativeHandle:Qb,useInsertionEffect:Kb,useLayoutEffect:Gb,useMemo:Xb,useReducer:Fd,useRef:qb,useState:function(){return Fd(La)},useDebugValue:gm,useDeferredValue:function(e){var t=on();return Qe===null?t.memoizedState=e:Zb(t,Qe.memoizedState,e)},useTransition:function(){var e=Fd(La)[0],t=on().memoizedState;return[e,t]},useMutableSource:Bb,useSyncExternalStore:Fb,useId:e1,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=Be({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ff(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Be({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Au={isMounted:function(e){return(e=e._reactInternals)?si(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jt(),s=ns(e),i=hr(r,s);i.payload=t,n!=null&&(i.callback=n),t=es(e,i,s),t!==null&&(Cn(t,e,s,r),pc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jt(),s=ns(e),i=hr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=es(e,i,s),t!==null&&(Cn(t,e,s,r),pc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jt(),r=ns(e),s=hr(n,r);s.tag=2,t!=null&&(s.callback=t),t=es(e,s,r),t!==null&&(Cn(t,e,r,n),pc(t,e,r))}};function Wy(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Ra(n,r)||!Ra(s,i):!0}function s1(e,t,n){var r=!1,s=ls,i=t.contextType;return typeof i=="object"&&i!==null?i=sn(i):(s=Ot(t)?Gs:mt.current,r=t.contextTypes,i=(r=r!=null)?ho(e,s):ls),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Au,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Hy(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Au.enqueueReplaceState(t,t.state,null)}function pf(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},lm(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=sn(i):(i=Ot(t)?Gs:mt.current,s.context=ho(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ff(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Au.enqueueReplaceState(s,s.state,null),Yc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function go(e,t){try{var n="",r=t;do n+=XT(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Vd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function mf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var C_=typeof WeakMap=="function"?WeakMap:Map;function i1(e,t,n){n=hr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){eu||(eu=!0,Cf=r),mf(e,t)},n}function o1(e,t,n){n=hr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){mf(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){mf(e,t),typeof r!="function"&&(ts===null?ts=new Set([this]):ts.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}
vendor: 5,655 bytes, line 40
40function qy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new C_;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=B_.bind(null,e,t,n),t.then(e,e))}function Ky(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Gy(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=hr(-1,1),t.tag=2,es(n,t,1))),n.lanes|=1),e)}var j_=wr.ReactCurrentOwner,Pt=!1;function bt(e,t,n,r){t.child=e===null?Db(t,null,n,r):po(t,e.child,n,r)}function Yy(e,t,n,r,s){n=n.render;var i=t.ref;return Ki(t,s),r=fm(e,t,n,r,i,s),n=pm(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gr(e,t,s)):(Oe&&n&&tm(t),t.flags|=1,bt(e,t,r,s),t.child)}function Qy(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Em(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,a1(e,t,i,r,s)):(e=wc(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ra,n(o,r)&&e.ref===t.ref)return gr(e,t,s)}return t.flags|=1,e=rs(i,r),e.ref=t.ref,e.return=t,t.child=e}function a1(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ra(i,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,gr(e,t,s)}return gf(e,t,n,r,s)}function l1(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(Mi,$t),$t|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(Mi,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(Mi,$t),$t|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(Mi,$t),$t|=r;return bt(e,t,s,n),t.child}function c1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gf(e,t,n,r,s){var i=Ot(n)?Gs:mt.current;return i=ho(t,i),Ki(t,s),n=fm(e,t,n,r,i,s),r=pm(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gr(e,t,s)):(Oe&&r&&tm(t),t.flags|=1,bt(e,t,n,s),t.child)}function Jy(e,t,n,r,s){if(Ot(n)){var i=!0;Wc(t)}else i=!1;if(Ki(t,s),t.stateNode===null)yc(e,t),s1(t,n,r),pf(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=sn(u):(u=Ot(n)?Gs:mt.current,u=ho(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==u)&&Hy(t,o,r,u),Dr=!1;var f=t.memoizedState;o.state=f,Yc(t,r,o,s),c=t.memoizedState,a!==r||f!==c||At.current||Dr?(typeof d=="function"&&(ff(t,n,d,r),c=t.memoizedState),(a=Dr||Wy(t,n,a,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Lb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:mn(t.type,a),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=sn(c):(c=Ot(n)?Gs:mt.current,c=ho(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==c)&&Hy(t,o,r,c),Dr=!1,f=t.memoizedState,o.state=f,Yc(t,r,o,s);var w=t.memoizedState;a!==h||f!==w||At.current||Dr?(typeof m=="function"&&(ff(t,n,m,r),w=t.memoizedState),(u=Dr||Wy(t,n,u,r,f,w,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return yf(e,t,n,r,i,s)}function yf(e,t,n,r,s,i){c1(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&My(t,n,!1),gr(e,t,i);r=t.stateNode,j_.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=po(t,e.child,null,i),t.child=po(t,null,a,i)):bt(e,t,a,i),t.memoizedState=r.state,s&&My(t,n,!0),t.child}function u1(e){var t=e.stateNode;t.pendingContext?Dy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Dy(e,t.context,!1),cm(e,t.containerInfo)}
vendor: 8,684 bytes, line 40
40function Xy(e,t,n,r,s){return fo(),rm(s),t.flags|=256,bt(e,t,n,r),t.child}var vf={dehydrated:null,treeContext:null,retryLane:0};function xf(e){return{baseLanes:e,cachePool:null,transitions:null}}function d1(e,t,n){var r=t.pendingProps,s=Me.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ce(Me,s&1),e===null)return df(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Du(o,r,0,null),e=qs(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=xf(n),t.memoizedState=vf,e):ym(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return T_(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=rs(s,c),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=rs(a,i):(i=qs(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?xf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=vf,r}return i=e.child,e=i.sibling,r=rs(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ym(e,t){return t=Du({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function $l(e,t,n,r){return r!==null&&rm(r),po(t,e.child,null,n),e=ym(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function T_(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Vd(Error(B(422))),$l(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Du({mode:"visible",children:r.children},s,0,null),i=qs(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&po(t,e.child,null,o),t.child.memoizedState=xf(o),t.memoizedState=vf,i);if(!(t.mode&1))return $l(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(B(419)),r=Vd(i,r,void 0),$l(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pt||a){if(r=tt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mr(e,s),Cn(r,e,s,-1))}return Sm(),r=Vd(Error(B(421))),$l(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=F_.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ut=Zr(s.nextSibling),Wt=t,Oe=!0,kn=null,e!==null&&(Xt[Zt++]=ur,Xt[Zt++]=dr,Xt[Zt++]=Ys,ur=e.id,dr=e.overflow,Ys=t),t=ym(t,r.children),t.flags|=4096,t)}function Zy(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),hf(e.return,t,n)}function Ud(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function h1(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(bt(e,t,r.children,n),r=Me.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zy(e,n,t);else if(e.tag===19)Zy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ce(Me,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Qc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ud(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Qc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ud(t,!0,n,null,i);break;case"together":Ud(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Js|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=rs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function N_(e,t,n){switch(t.tag){case 3:u1(t),fo();break;case 5:$b(t);break;case 1:Ot(t.type)&&Wc(t);break;case 4:cm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Ce(Kc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(Me,Me.current&1),t.flags|=128,null):n&t.child.childLanes?d1(e,t,n):(Ce(Me,Me.current&1),e=gr(e,t,n),e!==null?e.sibling:null);Ce(Me,Me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return h1(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ce(Me,Me.current),r)break;return null;case 22:case 23:return t.lanes=0,l1(e,t,n)}return gr(e,t,n)}var f1,wf,p1,m1;f1=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};wf=function(){};p1=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Is(Vn.current);var i=null;switch(n){case"input":s=Vh(e,s),r=Vh(e,r),i=[];break;case"select":s=Be({},s,{value:void 0}),r=Be({},r,{value:void 0}),i=[];break;case"textarea":s=Wh(e,s),r=Wh(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Uc)}qh(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Sa.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Sa.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Te("scroll",e),i||a===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};m1=function(e,t,n,r){n!==r&&(t.flags|=4)};function qo(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function __(e,t,n){var r=t.pendingProps;switch(nm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return Ot(t.type)&&zc(),dt(t),null;case 3:return r=t.stateNode,mo(),Ne(At),Ne(mt),dm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(Nf(kn),kn=null))),wf(e,t),dt(t),null;case 5:um(t);var s=Is(Da.current);
vendor: 33,253 bytes, line 40
40if(n=t.type,e!==null&&t.stateNode!=null)p1(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return dt(t),null}if(e=Is(Vn.current),Ml(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ln]=t,r[Oa]=i,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(s=0;s<na.length;s++)Te(na[s],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":ly(r,i),Te("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Te("invalid",r);break;case"textarea":uy(r,i),Te("invalid",r)}qh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Dl(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Dl(r.textContent,a,e),s=["children",""+a]):Sa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Te("scroll",r)}switch(n){case"input":Tl(r),cy(r,i,!0);break;case"textarea":Tl(r),dy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Uc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=z0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ln]=t,e[Oa]=r,f1(e,t,!1,!1),t.stateNode=e;e:{switch(o=Kh(n,r),n){case"dialog":Te("cancel",e),Te("close",e),s=r;break;case"iframe":case"object":case"embed":Te("load",e),s=r;break;case"video":case"audio":for(s=0;s<na.length;s++)Te(na[s],e);s=r;break;case"source":Te("error",e),s=r;break;case"img":case"image":case"link":Te("error",e),Te("load",e),s=r;break;case"details":Te("toggle",e),s=r;break;case"input":ly(e,r),s=Vh(e,r),Te("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Be({},r,{value:void 0}),Te("invalid",e);break;case"textarea":uy(e,r),s=Wh(e,r),Te("invalid",e);break;default:s=r}qh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var c=a[i];i==="style"?q0(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&W0(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ea(e,c):typeof c=="number"&&Ea(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Sa.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Te("scroll",e):c!=null&&Vp(e,i,c,o))}switch(n){case"input":Tl(e),cy(e,r,!1);break;case"textarea":Tl(e),dy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+as(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?zi(e,!!r.multiple,i,!1):r.defaultValue!=null&&zi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Uc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dt(t),null;case 6:if(e&&t.stateNode!=null)m1(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=Is(Da.current),Is(Vn.current),Ml(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ln]=t,(i=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Dl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ln]=t,t.stateNode=r}return dt(t),null;case 13:if(Ne(Me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oe&&Ut!==null&&t.mode&1&&!(t.flags&128))Ob(),fo(),t.flags|=98560,i=!1;else if(i=Ml(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(B(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317));i[Ln]=t}else fo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dt(t),i=!1}else kn!==null&&(Nf(kn),kn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Me.current&1?Xe===0&&(Xe=3):Sm())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return mo(),wf(e,t),e===null&&Pa(t.stateNode.containerInfo),dt(t),null;case 10:return om(t.type._context),dt(t),null;case 17:return Ot(t.type)&&zc(),dt(t),null;case 19:if(Ne(Me),i=t.memoizedState,i===null)return dt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)qo(i,!1);else{if(Xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Qc(e),o!==null){for(t.flags|=128,qo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(Me,Me.current&1|2),t.child}e=e.sibling}i.tail!==null&&ze()>yo&&(t.flags|=128,r=!0,qo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Oe)return dt(t),null}else 2*ze()-i.renderingStartTime>yo&&n!==1073741824&&(t.flags|=128,r=!0,qo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ze(),t.sibling=null,n=Me.current,Ce(Me,r?n&1|2:n&1),t):(dt(t),null);case 22:case 23:return km(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$t&1073741824&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function R_(e,t){switch(nm(t),t.tag){case 1:return Ot(t.type)&&zc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mo(),Ne(At),Ne(mt),dm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return um(t),null;case 13:if(Ne(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));fo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(Me),null;case 4:return mo(),null;case 10:return om(t.type._context),null;case 22:case 23:return km(),null;case 24:return null;default:return null}}var Bl=!1,ft=!1,P_=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Di(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function bf(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var ev=!1;function A_(e,t){if(rf=Bc,e=wb(),em(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var m;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(c=o),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(sf={focusedElem:e,selectionRange:n},Bc=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,b=w.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:mn(t.type,y),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(S){Ue(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return w=ev,ev=!1,w}function ha(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&bf(t,n,i)}s=s.next}while(s!==r)}}function Ou(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function kf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function g1(e){var t=e.alternate;t!==null&&(e.alternate=null,g1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ln],delete t[Oa],delete t[lf],delete t[p_],delete t[m_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function y1(e){return e.tag===5||e.tag===3||e.tag===4}function tv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||y1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Uc));else if(r!==4&&(e=e.child,e!==null))for(Sf(e,t,n),e=e.sibling;e!==null;)Sf(e,t,n),e=e.sibling}function Ef(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ef(e,t,n),e=e.sibling;e!==null;)Ef(e,t,n),e=e.sibling}var it=null,wn=!1;function Nr(e,t,n){for(n=n.child;n!==null;)v1(e,t,n),n=n.sibling}function v1(e,t,n){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(Cu,n)}catch{}switch(n.tag){case 5:ft||Di(n,t);case 6:var r=it,s=wn;it=null,Nr(e,t,n),it=r,wn=s,it!==null&&(wn?(e=it,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):it.removeChild(n.stateNode));break;case 18:it!==null&&(wn?(e=it,n=n.stateNode,e.nodeType===8?Dd(e.parentNode,n):e.nodeType===1&&Dd(e,n),Na(e)):Dd(it,n.stateNode));break;case 4:r=it,s=wn,it=n.stateNode.containerInfo,wn=!0,Nr(e,t,n),it=r,wn=s;break;case 0:case 11:case 14:case 15:if(!ft&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&bf(n,t,o),s=s.next}while(s!==r)}Nr(e,t,n);break;case 1:if(!ft&&(Di(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ue(n,t,a)}Nr(e,t,n);break;case 21:Nr(e,t,n);break;case 22:n.mode&1?(ft=(r=ft)||n.memoizedState!==null,Nr(e,t,n),ft=r):Nr(e,t,n);break;default:Nr(e,t,n)}}function nv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new P_),t.forEach(function(r){var s=V_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function un(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:it=a.stateNode,wn=!1;break e;case 3:it=a.stateNode.containerInfo,wn=!0;break e;case 4:it=a.stateNode.containerInfo,wn=!0;break e}a=a.return}if(it===null)throw Error(B(160));v1(i,o,s),it=null,wn=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ue(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)x1(t,e),t=t.sibling}function x1(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(un(t,e),An(e),r&4){try{ha(3,e,e.return),Ou(3,e)}catch(y){Ue(e,e.return,y)}try{ha(5,e,e.return)}catch(y){Ue(e,e.return,y)}}break;case 1:un(t,e),An(e),r&512&&n!==null&&Di(n,n.return);break;case 5:if(un(t,e),An(e),r&512&&n!==null&&Di(n,n.return),e.flags&32){var s=e.stateNode;try{Ea(s,"")}catch(y){Ue(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&V0(s,i),Kh(a,o);var u=Kh(a,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?q0(s,h):d==="dangerouslySetInnerHTML"?W0(s,h):d==="children"?Ea(s,h):Vp(s,d,h,u)}switch(a){case"input":Uh(s,i);break;case"textarea":U0(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?zi(s,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?zi(s,!!i.multiple,i.defaultValue,!0):zi(s,!!i.multiple,i.multiple?[]:"",!1))}s[Oa]=i}catch(y){Ue(e,e.return,y)}}break;case 6:if(un(t,e),An(e),r&4){if(e.stateNode===null)throw Error(B(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){Ue(e,e.return,y)}}break;case 3:if(un(t,e),An(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Na(t.containerInfo)}catch(y){Ue(e,e.return,y)}break;case 4:un(t,e),An(e);break;case 13:un(t,e),An(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(wm=ze())),r&4&&nv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ft=(u=ft)||d,un(t,e),ft=u):un(t,e),An(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Y=e,d=e.child;d!==null;){for(h=Y=d;Y!==null;){switch(f=Y,m=f.child,f.tag){case 0:case 11:case 14:case 15:ha(4,f,f.return);break;case 1:Di(f,f.return);var w=f.stateNode;if(typeof w.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){Ue(r,n,y)}}break;case 5:Di(f,f.return);break;case 22:if(f.memoizedState!==null){sv(h);continue}}m!==null?(m.return=f,Y=m):sv(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=H0("display",o))}catch(y){Ue(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){Ue(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:un(t,e),An(e),r&4&&nv(e);break;case 21:break;default:un(t,e),An(e)}}function An(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(y1(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ea(s,""),r.flags&=-33);var i=tv(e);Ef(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=tv(e);Sf(e,a,o);break;default:throw Error(B(161))}}catch(c){Ue(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function O_(e,t,n){Y=e,w1(e)}function w1(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var s=Y,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Bl;if(!o){var a=s.alternate,c=a!==null&&a.memoizedState!==null||ft;a=Bl;var u=ft;if(Bl=o,(ft=c)&&!u)for(Y=s;Y!==null;)o=Y,c=o.child,o.tag===22&&o.memoizedState!==null?iv(s):c!==null?(c.return=o,Y=c):iv(s);for(;i!==null;)Y=i,w1(i),i=i.sibling;Y=s,Bl=a,ft=u}rv(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,Y=i):rv(e)}}function rv(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ft||Ou(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ft)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:mn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Vy(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Vy(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Na(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}ft||t.flags&512&&kf(t)}catch(f){Ue(t,t.return,f)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function sv(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function iv(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ou(4,t)}catch(c){Ue(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ue(t,s,c)}}var i=t.return;try{kf(t)}catch(c){Ue(t,i,c)}break;case 5:var o=t.return;try{kf(t)}catch(c){Ue(t,o,c)}}}catch(c){Ue(t,t.return,c)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var I_=Math.ceil,Zc=wr.ReactCurrentDispatcher,vm=wr.ReactCurrentOwner,nn=wr.ReactCurrentBatchConfig,ve=0,tt=null,qe=null,at=0,$t=0,Mi=ms(0),Xe=0,Ba=null,Js=0,Iu=0,xm=0,fa=null,Rt=null,wm=0,yo=1/0,or=null,eu=!1,Cf=null,ts=null,Fl=!1,Kr=null,tu=0,pa=0,jf=null,vc=-1,xc=0;function jt(){return ve&6?ze():vc!==-1?vc:vc=ze()}function ns(e){return e.mode&1?ve&2&&at!==0?at&-at:y_.transition!==null?(xc===0&&(xc=sb()),xc):(e=ke,e!==0||(e=window.event,e=e===void 0?16:db(e.type)),e):1}function Cn(e,t,n,r){if(50<pa)throw pa=0,jf=null,Error(B(185));cl(e,n,r),(!(ve&2)||e!==tt)&&(e===tt&&(!(ve&2)&&(Iu|=n),Xe===4&&$r(e,at)),It(e,r),n===1&&ve===0&&!(t.mode&1)&&(yo=ze()+500,Ru&&gs()))}function It(e,t){var n=e.callbackNode;yN(e,t);var r=$c(e,e===tt?at:0);if(r===0)n!==null&&py(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&py(n),t===1)e.tag===0?g_(ov.bind(null,e)):Rb(ov.bind(null,e)),h_(function(){!(ve&6)&&gs()}),n=null;else{switch(ib(r)){case 1:n=qp;break;case 4:n=nb;break;case 16:n=Lc;break;case 536870912:n=rb;break;default:n=Lc}n=N1(n,b1.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function b1(e,t){if(vc=-1,xc=0,ve&6)throw Error(B(327));var n=e.callbackNode;if(Gi()&&e.callbackNode!==n)return null;var r=$c(e,e===tt?at:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nu(e,r);else{t=r;var s=ve;ve|=2;var i=S1();(tt!==e||at!==t)&&(or=null,yo=ze()+500,Hs(e,t));do try{L_();break}catch(a){k1(e,a)}while(!0);im(),Zc.current=i,ve=s,qe!==null?t=0:(tt=null,at=0,t=Xe)}if(t!==0){if(t===2&&(s=Xh(e),s!==0&&(r=s,t=Tf(e,s))),t===1)throw n=Ba,Hs(e,0),$r(e,r),It(e,ze()),n;if(t===6)$r(e,r);else{if(s=e.current.alternate,!(r&30)&&!D_(s)&&(t=nu(e,r),t===2&&(i=Xh(e),i!==0&&(r=i,t=Tf(e,i))),t===1))throw n=Ba,Hs(e,0),$r(e,r),It(e,ze()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:js(e,Rt,or);break;case 3:if($r(e,r),(r&130023424)===r&&(t=wm+500-ze(),10<t)){if($c(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){jt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=af(js.bind(null,e,Rt,or),t);break}js(e,Rt,or);break;case 4:if($r(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-En(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I_(r/1960))-r,10<r){e.timeoutHandle=af(js.bind(null,e,Rt,or),r);break}js(e,Rt,or);break;case 5:js(e,Rt,or);break;default:throw Error(B(329))}}}return It(e,ze()),e.callbackNode===n?b1.bind(null,e):null}function Tf(e,t){var n=fa;return e.current.memoizedState.isDehydrated&&(Hs(e,t).flags|=256),e=nu(e,t),e!==2&&(t=Rt,Rt=n,t!==null&&Nf(t)),e}function Nf(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function D_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!jn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $r(e,t){for(t&=~xm,t&=~Iu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-En(t),r=1<<n;e[n]=-1,t&=~r}}function ov(e){if(ve&6)throw Error(B(327));Gi();var t=$c(e,0);if(!(t&1))return It(e,ze()),null;var n=nu(e,t);if(e.tag!==0&&n===2){var r=Xh(e);r!==0&&(t=r,n=Tf(e,r))}if(n===1)throw n=Ba,Hs(e,0),$r(e,t),It(e,ze()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,js(e,Rt,or),It(e,ze()),null}function bm(e,t){var n=ve;ve|=1;try{return e(t)}finally{ve=n,ve===0&&(yo=ze()+500,Ru&&gs())}}function Xs(e){Kr!==null&&Kr.tag===0&&!(ve&6)&&Gi();var t=ve;ve|=1;var n=nn.transition,r=ke;try{if(nn.transition=null,ke=1,e)return e()}finally{ke=r,nn.transition=n,ve=t,!(ve&6)&&gs()}}function km(){$t=Mi.current,Ne(Mi)}function Hs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,d_(n)),qe!==null)for(n=qe.return;n!==null;){var r=n;switch(nm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zc();break;case 3:mo(),Ne(At),Ne(mt),dm();break;case 5:um(r);break;case 4:mo();break;case 13:Ne(Me);break;case 19:Ne(Me);break;case 10:om(r.type._context);break;case 22:case 23:km()}n=n.return}if(tt=e,qe=e=rs(e.current,null),at=$t=t,Xe=0,Ba=null,xm=Iu=Js=0,Rt=fa=null,Os!==null){for(t=0;t<Os.length;t++)if(n=Os[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Os=null}return e}function k1(e,t){do{var n=qe;try{if(im(),mc.current=Xc,Jc){for(var r=$e.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Jc=!1}if(Qs=0,et=Qe=$e=null,da=!1,Ma=0,vm.current=null,n===null||n.return===null){Xe=1,Ba=t,qe=null;break}e:{var i=e,o=n.return,a=n,c=t;if(t=at,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ky(o);if(m!==null){m.flags&=-257,Gy(m,o,a,i,t),m.mode&1&&qy(i,u,t),t=m,c=u;var w=t.updateQueue;if(w===null){var y=new Set;y.add(c),t.updateQueue=y}else w.add(c);break e}else{if(!(t&1)){qy(i,u,t),Sm();break e}c=Error(B(426))}}else if(Oe&&a.mode&1){var b=Ky(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Gy(b,o,a,i,t),rm(go(c,a));break e}}i=c=go(c,a),Xe!==4&&(Xe=2),fa===null?fa=[i]:fa.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=i1(i,c,t);Fy(i,v);break e;case 1:a=c;var g=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ts===null||!ts.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=o1(i,a,t);Fy(i,S);break e}}i=i.return}while(i!==null)}C1(n)}catch(k){t=k,qe===n&&n!==null&&(qe=n=n.return);continue}break}while(!0)}function S1(){var e=Zc.current;return Zc.current=Xc,e===null?Xc:e}function Sm(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),tt===null||!(Js&268435455)&&!(Iu&268435455)||$r(tt,at)}function nu(e,t){var n=ve;ve|=2;var r=S1();(tt!==e||at!==t)&&(or=null,Hs(e,t));do try{M_();break}catch(s){k1(e,s)}while(!0);if(im(),ve=n,Zc.current=r,qe!==null)throw Error(B(261));return tt=null,at=0,Xe}function M_(){for(;qe!==null;)E1(qe)}function L_(){for(;qe!==null&&!lN();)E1(qe)}function E1(e){var t=T1(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?C1(e):qe=t,vm.current=null}function C1(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=R_(n,t),n!==null){n.flags&=32767,qe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,qe=null;return}}else if(n=__(n,t,$t),n!==null){qe=n;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);Xe===0&&(Xe=5)}function js(e,t,n){var r=ke,s=nn.transition;try{nn.transition=null,ke=1,$_(e,t,n,r)}finally{nn.transition=s,ke=r}return null}function $_(e,t,n,r){do Gi();while(Kr!==null);if(ve&6)throw Error(B(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(vN(e,i),e===tt&&(qe=tt=null,at=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fl||(Fl=!0,N1(Lc,function(){return Gi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=nn.transition,nn.transition=null;var o=ke;ke=1;var a=ve;ve|=4,vm.current=null,A_(e,n),x1(n,e),s_(sf),Bc=!!rf,sf=rf=null,e.current=n,O_(n),cN(),ve=a,ke=o,nn.transition=i}else e.current=n;if(Fl&&(Fl=!1,Kr=e,tu=s),i=e.pendingLanes,i===0&&(ts=null),hN(n.stateNode),It(e,ze()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(eu)throw eu=!1,e=Cf,Cf=null,e;return tu&1&&e.tag!==0&&Gi(),i=e.pendingLanes,i&1?e===jf?pa++:(pa=0,jf=e):pa=0,gs(),null}function Gi(){if(Kr!==null){var e=ib(tu),t=nn.transition,n=ke;try{if(nn.transition=null,ke=16>e?16:e,Kr===null)var r=!1;else{if(e=Kr,Kr=null,tu=0,ve&6)throw Error(B(331));var s=ve;for(ve|=4,Y=e.current;Y!==null;){var i=Y,o=i.child;if(Y.flags&16){var a=i.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(Y=u;Y!==null;){var d=Y;switch(d.tag){case 0:case 11:case 15:ha(8,d,i)}var h=d.child;if(h!==null)h.return=d,Y=h;else for(;Y!==null;){d=Y;var f=d.sibling,m=d.return;if(g1(d),d===u){Y=null;break}if(f!==null){f.return=m,Y=f;break}Y=m}}}var w=i.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}Y=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Y=o;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ha(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,Y=v;break e}Y=i.return}}var g=e.current;for(Y=g;Y!==null;){o=Y;var p=o.child;if(o.subtreeFlags&2064&&p!==null)p.return=o,Y=p;else e:for(o=g;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ou(9,a)}}catch(k){Ue(a,a.return,k)}if(a===o){Y=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,Y=S;break e}Y=a.return}}if(ve=s,gs(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(Cu,e)}catch{}r=!0}return r}finally{ke=n,nn.transition=t}}return!1}function av(e,t,n){t=go(n,t),t=i1(e,t,1),e=es(e,t,1),t=jt(),e!==null&&(cl(e,1,t),It(e,t))}function Ue(e,t,n){if(e.tag===3)av(e,e,n);else for(;t!==null;){if(t.tag===3){av(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ts===null||!ts.has(r))){e=go(n,e),e=o1(t,e,1),t=es(t,e,1),e=jt(),t!==null&&(cl(t,1,e),It(t,e));break}}t=t.return}}function B_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=jt(),e.pingedLanes|=e.suspendedLanes&n,tt===e&&(at&n)===n&&(Xe===4||Xe===3&&(at&130023424)===at&&500>ze()-wm?Hs(e,0):xm|=n),It(e,t)}function j1(e,t){t===0&&(e.mode&1?(t=Rl,Rl<<=1,!(Rl&130023424)&&(Rl=4194304)):t=1);var n=jt();e=mr(e,t),e!==null&&(cl(e,t,n),It(e,n))}function F_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),j1(e,n)}function V_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(t),j1(e,n)}var T1;T1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||At.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,N_(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,Oe&&t.flags&1048576&&Pb(t,qc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yc(e,t),e=t.pendingProps;var s=ho(t,mt.current);Ki(t,n),s=fm(null,t,r,e,s,n);var i=pm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(r)?(i=!0,Wc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,lm(t),s.updater=Au,t.stateNode=s,s._reactInternals=t,pf(t,r,e,n),t=yf(null,t,r,!0,i,n)):(t.tag=0,Oe&&i&&tm(t),bt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yc(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=z_(r),e=mn(r,e),s){case 0:t=gf(null,t,r,e,n);break e;case 1:t=Jy(null,t,r,e,n);break e;case 11:t=Yy(null,t,r,e,n);break e;case 14:t=Qy(null,t,r,mn(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mn(r,s),gf(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mn(r,s),Jy(e,t,r,s,n);case 3:e:{if(u1(t),e===null)throw Error(B(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Lb(e,t),Yc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=go(Error(B(423)),t),t=Xy(e,t,r,n,s);break e}else if(r!==s){s=go(Error(B(424)),t),t=Xy(e,t,r,n,s);break e}else for(Ut=Zr(t.stateNode.containerInfo.firstChild),Wt=t,Oe=!0,kn=null,n=Db(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fo(),r===s){t=gr(e,t,n);break e}bt(e,t,r,n)}t=t.child}return t;case 5:return $b(t),e===null&&df(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,of(r,s)?o=null:i!==null&&of(r,i)&&(t.flags|=32),c1(e,t),bt(e,t,o,n),t.child;case 6:return e===null&&df(t),null;case 13:return d1(e,t,n);case 4:return cm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=po(t,null,r,n):bt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mn(r,s),Yy(e,t,r,s,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Ce(Kc,r._currentValue),r._currentValue=o,i!==null)if(jn(i.value,o)){if(i.children===s.children&&!At.current){t=gr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=hr(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),hf(i.return,n,t),a.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),hf(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}bt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Ki(t,n),s=sn(s),r=r(s),t.flags|=1,bt(e,t,r,n),t.child;case 14:return r=t.type,s=mn(r,t.pendingProps),s=mn(r.type,s),Qy(e,t,r,s,n);case 15:return a1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mn(r,s),yc(e,t),t.tag=1,Ot(r)?(e=!0,Wc(t)):e=!1,Ki(t,n),s1(t,r,s),pf(t,r,s,n),yf(null,t,r,!0,e,n);case 19:return h1(e,t,n);case 22:return l1(e,t,n)}throw Error(B(156,t.tag))};function N1(e,t){return tb(e,t)}function U_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,n,r){return new U_(e,t,n,r)}function Em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function z_(e){if(typeof e=="function")return Em(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zp)return 11;if(e===Wp)return 14}return 2}function rs(e,t){var n=e.alternate;return n===null?(n=en(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,322 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wc(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Em(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ji:return qs(n.children,s,i,t);case Up:o=8,s|=8;break;case Lh:return e=en(12,n,t,s|2),e.elementType=Lh,e.lanes=i,e;case $h:return e=en(13,n,t,s),e.elementType=$h,e.lanes=i,e;case Bh:return e=en(19,n,t,s),e.elementType=Bh,e.lanes=i,e;case $0:return Du(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M0:o=10;break e;case L0:o=9;break e;case zp:o=11;break e;case Wp:o=14;break e;case Ir:o=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=en(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function qs(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Du(e,t,n,r){return e=en(22,e,r,t),e.elementType=$0,e.lanes=n,e.stateNode={isHidden:!1},e}function zd(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function Wd(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W_(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ed(0),this.expirationTimes=Ed(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ed(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Cm(e,t,n,r,s,i,o,a,c){return e=new W_(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=en(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lm(i),e}function H_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ci,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _1(e){if(!e)return ls;e=e._reactInternals;e:{if(si(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(Ot(n))return _b(e,n,t)}return t}function R1(e,t,n,r,s,i,o,a,c){return e=Cm(n,r,!0,e,s,i,o,a,c),e.context=_1(null),n=e.current,r=jt(),s=ns(n),i=hr(r,s),i.callback=t??null,es(n,i,s),e.current.lanes=s,cl(e,s,r),It(e,r),e}function Mu(e,t,n,r){var s=t.current,i=jt(),o=ns(s);return n=_1(n),t.context===null?t.context=n:t.pendingContext=n,t=hr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=es(s,t,o),e!==null&&(Cn(e,s,o,i),pc(e,s,o)),o}function ru(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function lv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jm(e,t){lv(e,t),(e=e.alternate)&&lv(e,t)}function q_(){return null}var P1=typeof reportError=="function"?reportError:function(e){console.error(e)};function Tm(e){this._internalRoot=e}Lu.prototype.render=Tm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Mu(e,t,null,null)};Lu.prototype.unmount=Tm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xs(function(){Mu(null,e,null,null)}),t[pr]=null}};function Lu(e){this._internalRoot=e}Lu.prototype.unstable_scheduleHydration=function(e){if(e){var t=lb();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lr.length&&t!==0&&t<Lr[n].priority;n++);Lr.splice(n,0,e),n===0&&ub(e)}};function Nm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function cv(){}
vendor: 5,083 bytes, line 40
40function K_(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=ru(o);i.call(u)}}var o=R1(t,r,e,0,null,!1,!1,"",cv);return e._reactRootContainer=o,e[pr]=o.current,Pa(e.nodeType===8?e.parentNode:e),Xs(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=ru(c);a.call(u)}}var c=Cm(e,0,!1,null,null,!1,!1,"",cv);return e._reactRootContainer=c,e[pr]=c.current,Pa(e.nodeType===8?e.parentNode:e),Xs(function(){Mu(t,c,n,r)}),c}function Bu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var c=ru(o);a.call(c)}}Mu(t,o,e,s)}else o=K_(n,t,e,s,r);return ru(o)}ob=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ta(t.pendingLanes);n!==0&&(Kp(t,n|1),It(t,ze()),!(ve&6)&&(yo=ze()+500,gs()))}break;case 13:Xs(function(){var r=mr(e,1);if(r!==null){var s=jt();Cn(r,e,1,s)}}),jm(e,1)}};Gp=function(e){if(e.tag===13){var t=mr(e,134217728);if(t!==null){var n=jt();Cn(t,e,134217728,n)}jm(e,134217728)}};ab=function(e){if(e.tag===13){var t=ns(e),n=mr(e,t);if(n!==null){var r=jt();Cn(n,e,t,r)}jm(e,t)}};lb=function(){return ke};cb=function(e,t){var n=ke;try{return ke=e,t()}finally{ke=n}};Yh=function(e,t,n){switch(t){case"input":if(Uh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=_u(r);if(!s)throw Error(B(90));F0(r),Uh(r,s)}}}break;case"textarea":U0(e,n);break;case"select":t=n.value,t!=null&&zi(e,!!n.multiple,t,!1)}};Y0=bm;Q0=Xs;var G_={usingClientEntryPoint:!1,Events:[dl,Ri,_u,K0,G0,bm]},Ko={findFiberByHostInstance:As,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Y_={bundleType:Ko.bundleType,version:Ko.version,rendererPackageName:Ko.rendererPackageName,rendererConfig:Ko.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Z0(e),e===null?null:e.stateNode},findFiberByHostInstance:Ko.findFiberByHostInstance||q_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{Cu=Vl.inject(Y_),Fn=Vl}catch{}}Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G_;Kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nm(t))throw Error(B(200));return H_(e,t,null,n)};Kt.createRoot=function(e,t){if(!Nm(e))throw Error(B(299));var n=!1,r="",s=P1;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Cm(e,1,!1,null,null,n,!1,r,s),e[pr]=t.current,Pa(e.nodeType===8?e.parentNode:e),new Tm(t)};Kt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=Z0(t),e=e===null?null:e.stateNode,e};Kt.flushSync=function(e){return Xs(e)};Kt.hydrate=function(e,t,n){if(!$u(t))throw Error(B(200));return Bu(null,e,t,!0,n)};Kt.hydrateRoot=function(e,t,n){if(!Nm(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=P1;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=R1(t,null,e,1,n??null,s,!1,i,o),e[pr]=t.current,Pa(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Lu(t)};Kt.render=function(e,t,n){if(!$u(t))throw Error(B(200));return Bu(null,e,t,!1,n)};Kt.unmountComponentAtNode=function(e){if(!$u(e))throw Error(B(40));return e._reactRootContainer?(Xs(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[pr]=null})}),!0):!1};Kt.unstable_batchedUpdates=bm;Kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$u(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return Bu(e,t,n,!1,r)};Kt.version="18.3.1-next-f1338f8080-20240426";function A1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A1)}catch(e){console.error(e)}}A1(),A0.exports=Kt;var fl=A0.exports;const O1=al(fl);var I1,uv=fl;I1=uv.createRoot,uv.hydrateRoot;var Q_=typeof Element<"u",J_=typeof Map=="function",X_=typeof Set=="function",Z_=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function bc(e,t){if(e===t)return!0;
40if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!bc(e[r],t[r]))return!1;return!0}var i;if(J_&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!bc(r.value[1],t.get(r.value[0])))return!1;return!0}if(X_&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Z_&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(Q_&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!bc(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var eR=function(t,n){try{return bc(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const tR=al(eR);var nR=function(e,t,n,r,s,i,o,a){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,i,o,a],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},rR=nR;const dv=al(rR);var sR=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),a=Object.keys(n);if(o.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<o.length;u++){var d=o[u];if(!c(d))return!1;var h=t[d],f=n[d];if(i=r?r.call(s,h,f,d):void 0,i===!1||i===void 0&&h!==f)return!1}return!0};const iR=al(sR);var D1=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(D1||{}),Hd={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},hv=Object.values(D1),Fu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},M1=Object.entries(Fu).reduce((e,[t,n])=>(e[n]=t,e),{}),Sn="data-rh",Yi={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Qi=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},oR=e=>{let t=Qi(e,"title");const n=Qi(e,Yi.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Qi(e,Yi.DEFAULT_TITLE);return t||r||void 0},aR=e=>Qi(e,Yi.ON_CHANGE_CLIENT_STATE)||(()=>{}),qd=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),lR=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),cR=e=>console&&typeof console.warn=="function"&&console.warn(e),Go=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&cR(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(c=>{let u;const d=Object.keys(c);for(let f=0;f<d.length;f+=1){const m=d[f],w=m.toLowerCase();t.indexOf(w)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(w==="rel"&&c[w].toLowerCase()==="stylesheet")&&(u=w),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(u=m)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return r[u]||(r[u]={}),o[u]||(o[u]={}),r[u][h]?!1:(o[u][h]=!0,!0)}
40).reverse().forEach(c=>s.push(c));const a=Object.keys(o);for(let c=0;c<a.length;c+=1){const u=a[c],d={...r[u],...o[u]};r[u]=d}return s},[]).reverse()},uR=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},dR=e=>({baseTag:lR(["href"],e),bodyAttributes:qd("bodyAttributes",e),defer:Qi(e,Yi.DEFER),encode:Qi(e,Yi.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:qd("htmlAttributes",e),linkTags:Go("link",["rel","href"],e),metaTags:Go("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Go("noscript",["innerHTML"],e),onChangeClientState:aR(e),scriptTags:Go("script",["src","innerHTML"],e),styleTags:Go("style",["cssText"],e),title:oR(e),titleAttributes:qd("titleAttributes",e),prioritizeSeoTags:uR(e,Yi.PRIORITIZE_SEO_TAGS)}),L1=e=>Array.isArray(e)?e.join(""):e,hR=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Kd=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(hR(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},fv=(e,t)=>({...e,[t]:void 0}),fR=["noscript","script","style"],_f=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),$1=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),pR=(e,t,n,r)=>{const s=$1(n),i=L1(t);return s?`<${e} ${Sn}="true" ${s}>${_f(i,r)}</${e}>`:`<${e} ${Sn}="true">${_f(i,r)}</${e}>`},mR=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${_f(i[d],n)}"`;return u?`${u} ${h}`:h},""),a=i.innerHTML||i.cssText||"",c=fR.indexOf(e)===-1;return`${r}<${e} ${Sn}="true" ${o}${c?"/>":`>${a}</${e}>`}`},""),B1=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=Fu[r];return n[s||r]=e[r],n},t),gR=(e,t,n)=>{const r={key:t,[Sn]:!0},s=B1(n,r);return[I.createElement("title",s,t)]},kc=(e,t)=>t.map((n,r)=>{const s={key:r,[Sn]:!0};return Object.keys(n).forEach(i=>{const a=Fu[i]||i;if(a==="innerHTML"||a==="cssText"){const c=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[a]=n[i]}),I.createElement(e,s)}),Qt=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>gR(e,t.title,t.titleAttributes),toString:()=>pR(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>B1(t),toString:()=>$1(t)};default:return{toComponent:()=>kc(e,t),toString:()=>mR(e,t,n)}}},yR=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Kd(e,Hd.meta),i=Kd(t,Hd.link),o=Kd(n,Hd.script);return{priorityMethods:{toComponent:()=>[...kc("meta",s.priority),...kc("link",i.priority),...kc("script",o.priority)],toString:()=>`${Qt("meta",s.priority,r)} ${Qt("link",i.priority,r)} ${Qt("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},vR=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:f}=e,m={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:m,linkTags:d,metaTags:h,scriptTags:f}=yR(e)),{priority:m,base:Qt("base",t,r),bodyAttributes:Qt("bodyAttributes",n,r),htmlAttributes:Qt("htmlAttributes",s,r),link:Qt("link",d,r),meta:Qt("meta",h,r),noscript:Qt("noscript",i,r),script:Qt("script",f,r),style:Qt("style",o,r),title:Qt("title",{title:a,titleAttributes:c},r)}},Rf=vR,Ul=[],_m=!!(typeof window<"u"&&window.document&&window.document.createElement),Pf=class{constructor(e,t){tr(this,"instances",[]);tr(this,"canUseDOM",_m);tr(this,"context");tr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ul:this.instances,add:e=>{(this.canUseDOM?Ul:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ul:this.instances).indexOf(e);(this.canUseDOM?Ul:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Rf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},xR=parseInt(I.version.split(".")[0],10),Af=xR>=19,wR={},F1=I.createContext(wR),$s,V1=($s=class extends x.Component{constructor(n){super(n);tr(this,"helmetData");Af?this.helmetData=null:this.helmetData=new Pf(this.props.context||{},$s.canUseDOM)}render(){return Af?I.createElement(I.Fragment,null,this.props.children):I.createElement(F1.Provider,{value:this.helmetData.value},this.props.children)}},tr($s,"canUseDOM",_m),$s),hi=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Sn}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(a=>{const c=document.createElement(e);for(const u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(u==="innerHTML")c.innerHTML=a.innerHTML;else if(u==="cssText"){const d=a.cssText;
40c.appendChild(document.createTextNode(d))}else{const d=u,h=typeof a[d]>"u"?"":a[d];c.setAttribute(u,h)}c.setAttribute(Sn,"true"),s.some((u,d)=>(o=d,c.isEqualNode(u)))?s.splice(o,1):i.push(c)}),s.forEach(a=>{var c;return(c=a.parentNode)==null?void 0:c.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},Of=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Sn),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const a of o){const c=t[a]||"";n.getAttribute(a)!==c&&n.setAttribute(a,c),s.indexOf(a)===-1&&s.push(a);const u=i.indexOf(a);u!==-1&&i.splice(u,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(Sn):n.getAttribute(Sn)!==o.join(",")&&n.setAttribute(Sn,o.join(","))},bR=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=L1(e)),Of("title",t)},pv=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:f}=e;Of("body",r),Of("html",s),bR(h,f);const m={baseTag:hi("base",n),linkTags:hi("link",i),metaTags:hi("meta",o),noscriptTags:hi("noscript",a),scriptTags:hi("script",u),styleTags:hi("style",d)},w={},y={};Object.keys(m).forEach(b=>{const{newTags:v,oldTags:g}=m[b];v.length&&(w[b]=v),g.length&&(y[b]=m[b].oldTags)}),t&&t(),c(e,w,y)},Yo=null,kR=e=>{Yo&&cancelAnimationFrame(Yo),e.defer?Yo=requestAnimationFrame(()=>{pv(e,()=>{Yo=null})}):(pv(e),Yo=null)},SR=kR,mv=class extends x.Component{constructor(){super(...arguments);tr(this,"rendered",!1)}shouldComponentUpdate(t){return!iR(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=dR(t.get().map(i=>{const{context:o,...a}=i.props;return a}));V1.canUseDOM?SR(s):Rf&&(r=Rf(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Sc=[],gv=e=>{const t={};for(const n of Object.keys(e))t[M1[n]||n]=e[n];return t},bs=e=>{const t={};for(const n of Object.keys(e)){const r=Fu[n];t[r||n]=e[n]}return t},yv=(e,t)=>{if(!_m)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(t);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const c=t[a];c==null||c===!1?n.removeAttribute(a):c===!0?n.setAttribute(a,""):n.setAttribute(a,String(c))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},Gd=()=>{const e={},t={};for(const n of Sc){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,gv(r)),s&&Object.assign(t,gv(s))}yv("html",e),yv("body",t)},ER=class extends x.Component{componentDidMount(){Sc.push(this),Gd()}componentDidUpdate(){Gd()}componentWillUnmount(){const e=Sc.indexOf(this);e!==-1&&Sc.splice(e,1),Gd()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return I.createElement("title",bs(t),e)}renderBase(){const{base:e}=this.props;return e?I.createElement("base",bs(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>I.createElement("meta",{key:n,...bs(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>I.createElement("link",{key:n,...bs(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=bs(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),I.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=bs(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),I.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=bs(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),I.createElement("noscript",{key:n,...i})})}render(){return I.createElement(I.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Dh,Rm=(Dh=class extends x.Component{shouldComponentUpdate(e){return!tR(fv(this.props,"helmetData"),fv(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
40warnOnInvalidChildren(e,t){return dv(hv.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${hv.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),dv(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return I.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((c,u)=>(c[M1[u]||u]=i[u],c),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Pf)){const s=r;r=new Pf(s.context,!0),delete n.helmetData}return Af?I.createElement(ER,{...n}):r?I.createElement(mv,{...n,context:r.value}):I.createElement(F1.Consumer,null,s=>I.createElement(mv,{...n,context:s}))}},tr(Dh,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Dh);const CR=1,jR=1e6;let Yd=0;function TR(){return Yd=(Yd+1)%Number.MAX_SAFE_INTEGER,Yd.toString()}const Qd=new Map,vv=e=>{if(Qd.has(e))return;const t=setTimeout(()=>{Qd.delete(e),ma({type:"REMOVE_TOAST",toastId:e})},jR);Qd.set(e,t)},NR=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,CR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?vv(n):e.toasts.forEach(r=>{vv(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ec=[];let Cc={toasts:[]};function ma(e){Cc=NR(Cc,e),Ec.forEach(t=>{t(Cc)})}function _R({...e}){const t=TR(),n=s=>ma({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>ma({type:"DISMISS_TOAST",toastId:t});return ma({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function RR(){const[e,t]=x.useState(Cc);return x.useEffect(()=>(Ec.push(t),()=>{const n=Ec.indexOf(t);n>-1&&Ec.splice(n,1)}),[e]),{...e,toast:_R,dismiss:n=>ma({type:"DISMISS_TOAST",toastId:n})}}function ye(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function xv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function U1(...e){return t=>{let n=!1;const r=e.map(s=>{const i=xv(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():xv(e[s],null)}}}}function Re(...e){return x.useCallback(U1(...e),e)}function PR(e,t){const n=x.createContext(t),r=i=>{const{children:o,...a}=i,c=x.useMemo(()=>a,Object.values(a));return l.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(i){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function br(e,t=[]){let n=[];function r(i,o){const a=x.createContext(o),c=n.length;n=[...n,o];const u=h=>{var v;const{scope:f,children:m,...w}=h,y=((v=f==null?void 0:f[e])==null?void 0:v[c])||a,b=x.useMemo(()=>w,Object.values(w));return l.jsx(y.Provider,{value:b,children:m})};u.displayName=i+"Provider";function d(h,f){var y;const m=((y=f==null?void 0:f[e])==null?void 0:y[c])||a,w=x.useContext(m);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[e])||i;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,AR(s,...t)]}function AR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Fa(e){const t=IR(e),n=x.forwardRef((r,s)=>{const{children:i,...o}=r,a=x.Children.toArray(i),c=a.find(MR);if(c){const u=c.props.children,d=a.map(h=>h===c?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:h);return l.jsx(t,{...o,ref:s,children:x.isValidElement(u)?x.cloneElement(u,void 0,d):null})}return l.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var OR=Fa("Slot");function IR(e){const t=x.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 9,537 bytes, line 40
40if(x.isValidElement(s)){const o=$R(s),a=LR(i,s.props);return s.type!==x.Fragment&&(a.ref=r?U1(r,o):o),x.cloneElement(s,a)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var z1=Symbol("radix.slottable");function DR(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=z1,t}function MR(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z1}function LR(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const c=i(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function $R(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pm(e){const t=e+"CollectionProvider",[n,r]=br(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:b,children:v}=y,g=I.useRef(null),p=I.useRef(new Map).current;return l.jsx(s,{scope:b,itemMap:p,collectionRef:g,children:v})};o.displayName=t;const a=e+"CollectionSlot",c=Fa(a),u=I.forwardRef((y,b)=>{const{scope:v,children:g}=y,p=i(a,v),S=Re(b,p.collectionRef);return l.jsx(c,{ref:S,children:g})});u.displayName=a;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=Fa(d),m=I.forwardRef((y,b)=>{const{scope:v,children:g,...p}=y,S=I.useRef(null),k=Re(b,S),E=i(d,v);return I.useEffect(()=>(E.itemMap.set(S,{ref:S,...p}),()=>void E.itemMap.delete(S))),l.jsx(f,{[h]:"",ref:k,children:g})});m.displayName=d;function w(y){const b=i(e+"CollectionConsumer",y);return I.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const p=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((E,C)=>p.indexOf(E.ref.current)-p.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},w,r]}var BR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pe=BR.reduce((e,t)=>{const n=Fa(`Primitive.${t}`),r=x.forwardRef((s,i)=>{const{asChild:o,...a}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function W1(e,t){e&&fl.flushSync(()=>e.dispatchEvent(t))}function Gn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function FR(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e);x.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var VR="DismissableLayer",If="dismissableLayer.update",UR="dismissableLayer.pointerDownOutside",zR="dismissableLayer.focusOutside",wv,H1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vu=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=e,u=x.useContext(H1),[d,h]=x.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),w=Re(t,C=>h(C)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(b),g=d?y.indexOf(d):-1,p=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=v,k=HR(C=>{const j=C.target,_=[...u.branches].some(P=>P.contains(j));!S||_||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),E=qR(C=>{const j=C.target;[...u.branches].some(P=>P.contains(j))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return FR(C=>{g===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),x.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),bv(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=wv)}},[d,f,n,u]),x.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),bv())},[d,u]),x.useEffect(()=>{const C=()=>m({});return document.addEventListener(If,C),()=>document.removeEventListener(If,C)},[]),l.jsx(pe.div,{...c,ref:w,style:{pointerEvents:p?S?"auto":"none":void 0,...e.style},onFocusCapture:ye(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ye(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ye(e.onPointerDownCapture,k.onPointerDownCapture)})});Vu.displayName=VR;var WR="DismissableLayerBranch",q1=x.forwardRef((e,t)=>{const n=x.useContext(H1),r=x.useRef(null),s=Re(t,r);return x.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.jsx(pe.div,{...e,ref:s})});q1.displayName=WR;function HR(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){K1(UR,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qR(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!r.current&&K1(zR,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bv(){const e=new CustomEvent(If);document.dispatchEvent(e)}function K1(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?W1(s,i):s.dispatchEvent(i)}var KR=Vu,GR=q1,Yn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},YR="Portal",Am=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=x.useState(!1);Yn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?O1.createPortal(l.jsx(pe.div,{...r,ref:t}),o):null});Am.displayName=YR;function QR(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var ys=e=>{const{present:t,children:n}=e,r=JR(t),s=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),i=Re(r.ref,XR(s));return typeof n=="function"||r.isPresent?x.cloneElement(s,{ref:i}):null};ys.displayName="Presence";function JR(e){const[t,n]=x.useState(),r=x.useRef(null),s=x.useRef(e),i=x.useRef("none"),o=e?"mounted":"unmounted",[a,c]=QR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=zl(r.current);i.current=a==="mounted"?u:"none"},[a]),Yn(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,m=zl(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Yn(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const y=zl(r.current).includes(m.animationName);if(m.target===t&&y&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=m=>{m.target===t&&(i.current=zl(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function zl(e){return(e==null?void 0:e.animationName)||"none"}function XR(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZR=$p[" useInsertionEffect ".trim().toString()]||Yn;function ii({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=eP({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:s;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const h=d.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const u=x.useCallback(d=>{var h;if(a){const f=tP(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else i(d)},[a,e,i,o]);return[c,u]}function eP({defaultProp:e,onChange:t}
40){const[n,r]=x.useState(e),s=x.useRef(n),i=x.useRef(t);return ZR(()=>{i.current=t},[t]),x.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function tP(e){return typeof e=="function"}var nP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rP="VisuallyHidden",Uu=x.forwardRef((e,t)=>l.jsx(pe.span,{...e,ref:t,style:{...nP,...e.style}}));Uu.displayName=rP;var sP=Uu,Om="ToastProvider",[Im,iP,oP]=Pm("Toast"),[G1,MU]=br("Toast",[oP]),[aP,zu]=G1(Om),Y1=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,c]=x.useState(null),[u,d]=x.useState(0),h=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Om}\`. Expected non-empty \`string\`.`),l.jsx(Im.Provider,{scope:t,children:l.jsx(aP,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:c,onToastAdd:x.useCallback(()=>d(m=>m+1),[]),onToastRemove:x.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};Y1.displayName=Om;var Q1="ToastViewport",lP=["F8"],Df="toast.viewportPause",Mf="toast.viewportResume",J1=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=lP,label:s="Notifications ({hotkey})",...i}=e,o=zu(Q1,n),a=iP(n),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),h=x.useRef(null),f=Re(t,h,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;x.useEffect(()=>{const b=v=>{var p;r.length!==0&&r.every(S=>v[S]||v.code===S)&&((p=h.current)==null||p.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),x.useEffect(()=>{const b=c.current,v=h.current;if(w&&b&&v){const g=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(Df);v.dispatchEvent(E),o.isClosePausedRef.current=!0}},p=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Mf);v.dispatchEvent(E),o.isClosePausedRef.current=!1}},S=E=>{!b.contains(E.relatedTarget)&&p()},k=()=>{b.contains(document.activeElement)||p()};return b.addEventListener("focusin",g),b.addEventListener("focusout",S),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",k),window.addEventListener("blur",g),window.addEventListener("focus",p),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",k),window.removeEventListener("blur",g),window.removeEventListener("focus",p)}}},[w,o.isClosePausedRef]);const y=x.useCallback(({tabbingDirection:b})=>{const g=a().map(p=>{const S=p.ref.current,k=[S,...bP(S)];return b==="forwards"?k:k.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return x.useEffect(()=>{const b=h.current;if(b){const v=g=>{var k,E,C;const p=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!p){const j=document.activeElement,_=g.shiftKey;if(g.target===b&&_){(k=u.current)==null||k.focus();return}const A=y({tabbingDirection:_?"backwards":"forwards"}),z=A.findIndex(T=>T===j);Jd(A.slice(z+1))?g.preventDefault():_?(E=u.current)==null||E.focus():(C=d.current)==null||C.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[a,y]),l.jsxs(GR,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Lf,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});Jd(b)}}),l.jsx(Im.Slot,{scope:n,children:l.jsx(pe.ol,{tabIndex:-1,...i,ref:f})}),w&&l.jsx(Lf,{ref:d,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});Jd(b)}})]})});J1.displayName=Q1;var X1="ToastFocusProxy",Lf=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=zu(X1,n);return l.jsx(Uu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});Lf.displayName=X1;var pl="Toast",cP="toast.swipeStart",uP="toast.swipeMove",dP="toast.swipeCancel",hP="toast.swipeEnd",Z1=x.forwardRef((e,t)=>
40{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a,c]=ii({prop:r,defaultProp:s??!0,onChange:i,caller:pl});return l.jsx(ys,{present:n||a,children:l.jsx(mP,{open:a,...o,ref:t,onClose:()=>c(!1),onPause:Gn(e.onPause),onResume:Gn(e.onResume),onSwipeStart:ye(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ye(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ye(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ye(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Z1.displayName=pl;var[fP,pP]=G1(pl,{onClose(){}}),mP=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...w}=e,y=zu(pl,n),[b,v]=x.useState(null),g=Re(t,T=>v(T)),p=x.useRef(null),S=x.useRef(null),k=s||y.duration,E=x.useRef(0),C=x.useRef(k),j=x.useRef(0),{onToastAdd:_,onToastRemove:P}=y,M=Gn(()=>{var F;(b==null?void 0:b.contains(document.activeElement))&&((F=y.viewport)==null||F.focus()),o()}),A=x.useCallback(T=>{!T||T===1/0||(window.clearTimeout(j.current),E.current=new Date().getTime(),j.current=window.setTimeout(M,T))},[M]);x.useEffect(()=>{const T=y.viewport;if(T){const F=()=>{A(C.current),u==null||u()},W=()=>{const V=new Date().getTime()-E.current;C.current=C.current-V,window.clearTimeout(j.current),c==null||c()};return T.addEventListener(Df,W),T.addEventListener(Mf,F),()=>{T.removeEventListener(Df,W),T.removeEventListener(Mf,F)}}},[y.viewport,k,c,u,A]),x.useEffect(()=>{i&&!y.isClosePausedRef.current&&A(k)},[i,k,y.isClosePausedRef,A]),x.useEffect(()=>(_(),()=>P()),[_,P]);const z=x.useMemo(()=>b?ok(b):null,[b]);return y.viewport?l.jsxs(l.Fragment,{children:[z&&l.jsx(gP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),l.jsx(fP,{scope:n,onClose:M,children:fl.createPortal(l.jsx(Im.ItemSlot,{scope:n,children:l.jsx(KR,{asChild:!0,onEscapeKeyDown:ye(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||M(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(pe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ye(e.onKeyDown,T=>{T.key==="Escape"&&(a==null||a(T.nativeEvent),T.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:ye(e.onPointerDown,T=>{T.button===0&&(p.current={x:T.clientX,y:T.clientY})}),onPointerMove:ye(e.onPointerMove,T=>{if(!p.current)return;const F=T.clientX-p.current.x,W=T.clientY-p.current.y,V=!!S.current,N=["left","right"].includes(y.swipeDirection),R=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,$=N?R(0,F):0,O=N?0:R(0,W),L=T.pointerType==="touch"?10:2,q={x:$,y:O},Q={originalEvent:T,delta:q};V?(S.current=q,Wl(uP,h,Q,{discrete:!1})):kv(q,y.swipeDirection,L)?(S.current=q,Wl(cP,d,Q,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(F)>L||Math.abs(W)>L)&&(p.current=null)}),onPointerUp:ye(e.onPointerUp,T=>{const F=S.current,W=T.target;if(W.hasPointerCapture(T.pointerId)&&W.releasePointerCapture(T.pointerId),S.current=null,p.current=null,F){const V=T.currentTarget,N={originalEvent:T,delta:F};kv(F,y.swipeDirection,y.swipeThreshold)?Wl(hP,m,N,{discrete:!0}):Wl(dP,f,N,{discrete:!0}),V.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),gP=e=>{const{__scopeToast:t,children:n,...r}=e,s=zu(pl,t),[i,o]=x.useState(!1),[a,c]=x.useState(!1);return xP(()=>o(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:l.jsx(Am,{asChild:!0,children:l.jsx(Uu,{...r,children:i&&l.jsxs(l.Fragment,{children:[s.label," ",n]})})})},yP="ToastTitle",ek=x.forwardRef((e,t)=>
vendor: 7,442 bytes, lines 40-90
40{const{__scopeToast:n,...r}=e;return l.jsx(pe.div,{...r,ref:t})});ek.displayName=yP;var vP="ToastDescription",tk=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(pe.div,{...r,ref:t})});tk.displayName=vP;var nk="ToastAction",rk=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(ik,{altText:n,asChild:!0,children:l.jsx(Dm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nk}\`. Expected non-empty \`string\`.`),null)});rk.displayName=nk;var sk="ToastClose",Dm=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=pP(sk,n);return l.jsx(ik,{asChild:!0,children:l.jsx(pe.button,{type:"button",...r,ref:t,onClick:ye(e.onClick,s.onClose)})})});Dm.displayName=sk;var ik=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return l.jsx(pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function ok(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),wP(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...ok(r))}}),t}function Wl(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?W1(s,i):s.dispatchEvent(i)}var kv=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function xP(e=()=>{}){const t=Gn(e);Yn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function wP(e){return e.nodeType===e.ELEMENT_NODE}function bP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Jd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var kP=Y1,ak=J1,lk=Z1,ck=ek,uk=tk,dk=rk,hk=Dm;function fk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=fk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=fk(e))&&(r&&(r+=" "),r+=t);return r}const Sv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ev=pk,Wu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ev(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=Sv(d)||Sv(h);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(w=>{let[y,b]=w;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...u,h,f]:u},[]);return Ev(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const SP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var EP={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"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const CP=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},c)=>x.createElement("svg",{ref:c,...EP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mk("lucide",s),...a},[...o.map(([u,d])=>x.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const se=(e,t)=>{const n=x.forwardRef(({className:r,...s},i)=>x.createElement(CP,{ref:i,iconNode:t,className:mk(`lucide-${SP(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const St=se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const jP=se("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const $f=se("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const gk=se("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const yk=se("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const TP=se("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}
90],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const vk=se("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"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const xk=se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const wk=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const NP=se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const _P=se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const Cv=se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const oi=se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const RP=se("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const PP=se("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const AP=se("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const OP=se("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const IP=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const DP=se("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
155y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const jv=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const Mm=se("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const MP=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const bk=se("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const LP=se("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const $P=se("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const BP=se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const Zs=se("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const Hl=se("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const kk=se("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const Lm=se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const FP=se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const VP=se("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const ss=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const Tv=se("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const Sk=se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const Ek=se("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const UP=se("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const zP=se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const Ck=se("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const cs=se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const WP=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const Nv=se("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const Hu=se("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const HP=se("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const jk=se("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const $m=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const qu=se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
vendor: 13,070 bytes, lines 300-310
300 */const Tk=se("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const Un=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const su=se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Bm="-",qP=e=>{const t=GP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Bm);return a[0]===""&&a.length!==1&&a.shift(),Nk(a,t)||KP(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},Nk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Nk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Bm);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},_v=/^\[(.+)\]$/,KP=e=>{if(_v.test(e)){const t=_v.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},GP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return QP(Object.entries(e.classGroups),n).forEach(([i,o])=>{Bf(o,r,i,t)}),r},Bf=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Rv(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(YP(s)){Bf(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Bf(o,Rv(t,i),n,r)})})},Rv=(e,t)=>{let n=e;return t.split(Bm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},YP=e=>e.isThemeGetter,QP=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,JP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},_k="!",XP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const c=[];let u=0,d=0,h;for(let b=0;b<a.length;b++){let v=a[b];if(u===0){if(v===s&&(r||a.slice(b,b+i)===t)){c.push(a.slice(d,b)),d=b+i;continue}if(v==="/"){h=b;continue}}v==="["?u++:v==="]"&&u--}const f=c.length===0?a:a.substring(d),m=f.startsWith(_k),w=m?f.substring(1):f,y=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:w,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},ZP=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},eA=e=>({cache:JP(e.cacheSize),parseClassName:XP(e),...qP(e)}),tA=/\s+/,nA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(tA);let a="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let w=!!m,y=r(w?f.substring(0,m):f);if(!y){if(!w){a=u+(a.length>0?" "+a:a);continue}if(y=r(f),!y){a=u+(a.length>0?" "+a:a);continue}w=!1}const b=ZP(d).join(":"),v=h?b+_k:b,g=v+y;if(i.includes(g))continue;i.push(g);const p=s(y,w);for(let S=0;S<p.length;++S){const k=p[S];i.push(v+k)}a=u+(a.length>0?" "+a:a)}return a};function rA(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Rk(t))&&(r&&(r+=" "),r+=n);return r}const Rk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Rk(e[r]))&&(n&&(n+=" "),n+=t);return n};function sA(e,...t){let n,r,s,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=eA(u),r=n.cache.get,s=n.cache.set,i=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=nA(c,n);return s(c,d),d}return function(){return i(rA.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Pk=/^\[(?:([a-z-]+):)?(.+)\]$/i,iA=/^\d+\/\d+$/,oA=new Set(["px","full","screen"]),aA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lA=/\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$/,cA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>Ji(e)||oA.has(e)||iA.test(e),_r=e=>jo(e,"length",xA),Ji=e=>!!e&&!Number.isNaN(Number(e)),Xd=e=>jo(e,"number",Ji),Qo=e=>!!e&&Number.isInteger(Number(e)),hA=e=>e.endsWith("%")&&Ji(e.slice(0,-1)),ce=e=>Pk.test(e),Rr=e=>aA.test(e),fA=new Set(["length","size","percentage"]),pA=e=>jo(e,fA,Ak),mA=e=>jo(e,"position",Ak),gA=new Set(["image","url"]),yA=e=>jo(e,gA,bA),vA=e=>jo(e,"",wA),Jo=()=>!0,jo=(e,t,n)=>{const r=Pk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},xA=e=>lA.test(e)&&!cA.test(e),Ak=()=>!1,wA=e=>uA.test(e),bA=e=>dA.test(e),kA=()=>{const e=je("colors"),t=je("spacing"),n=je("blur"),r=je("brightness"),s=je("borderColor"),i=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),c=je("contrast"),u=je("grayscale"),d=je("hueRotate"),h=je("invert"),f=je("gap"),m=je("gradientColorStops"),w=je("gradientColorStopPositions"),y=je("inset"),b=je("margin"),v=je("opacity"),g=je("padding"),p=je("saturate"),S=je("scale"),k=je("sepia"),E=je("skew"),C=je("space"),j=je("translate"),_=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",ce,t],A=()=>[ce,t],z=()=>["",nr,_r],T=()=>["auto",Ji,ce],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",ce],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[Ji,ce];return{cacheSize:500,separator:":",theme:{colors:[Jo],spacing:[nr,_r],blur:["none","",Rr,ce],brightness:O(),borderColor:[e],borderRadius:["none","","full",Rr,ce],borderSpacing:A(),borderWidth:z(),contrast:O(),grayscale:R(),hueRotate:O(),invert:R(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[hA,_r],inset:M(),margin:M(),opacity:O(),padding:A(),saturate:O(),scale:O(),sepia:R(),skew:O(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],container:["container"],columns:[{columns:[Rr]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...F(),ce]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],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",Qo,ce]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Qo,ce]}],"grid-cols":[{"grid-cols":[Jo]}],"col-start-end":[{col:["auto",{span:["full",Qo,ce]},ce]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[Jo]}],"row-start-end":[{row:["auto",{span:[Qo,ce]},ce]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ce,t]}],"min-w":[{"min-w":[ce,t,"min","max","fit"]}],"max-w":[{"max-w":[ce,t,"none","full","min","max","fit","prose",{screen:[Rr]},Rr]}],h:[{h:[ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Rr,_r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xd]}],"font-family":[{font:[Jo]}],"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",ce]}],"line-clamp":[{"line-clamp":["none",Ji,Xd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nr,ce]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nr,_r]}],"underline-offset":[{"underline-offset":["auto",nr,ce]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],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",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),mA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 5,180 bytes, line 310
310],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[v]}],"border-style":[{border:[...W(),"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":[v]}],"divide-style":[{divide:W()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[nr,ce]}],"outline-w":[{outline:[nr,_r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[nr,_r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Rr,vA]}],"shadow-color":[{shadow:[Jo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Rr,ce]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[p]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ce]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Qo,ce]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],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",ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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"]}
vendor: 4,642 bytes, line 310
310],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",ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nr,_r,Xd]}],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"]}}},SA=sA(kA);function Z(...e){return SA(pk(e))}const EA=kP,Ok=x.forwardRef(({className:e,...t},n)=>l.jsx(ak,{ref:n,className:Z("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Ok.displayName=ak.displayName;const CA=Wu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ik=x.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(lk,{ref:r,className:Z(CA({variant:t}),e),...n}));Ik.displayName=lk.displayName;const jA=x.forwardRef(({className:e,...t},n)=>l.jsx(dk,{ref:n,className:Z("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));jA.displayName=dk.displayName;const Dk=x.forwardRef(({className:e,...t},n)=>l.jsx(hk,{ref:n,className:Z("absolute right-2 top-2 rounded-md p-1 text-foreground
310/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(Un,{className:"h-4 w-4"})}));Dk.displayName=hk.displayName;const Mk=x.forwardRef(({className:e,...t},n)=>l.jsx(ck,{ref:n,className:Z("text-sm font-semibold",e),...t}));Mk.displayName=ck.displayName;const Lk=x.forwardRef(({className:e,...t},n)=>l.jsx(uk,{ref:n,className:Z("text-sm opacity-90",e),...t}));Lk.displayName=uk.displayName;function TA(){const{toasts:e}=RR();return l.jsxs(EA,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return l.jsxs(Ik,{...i,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(Mk,{children:n}),r&&l.jsx(Lk,{children:r})]}),s,l.jsx(Dk,{})]},t)}),l.jsx(Ok,{})]})}var Pv=["light","dark"],NA="(prefers-color-scheme: dark)",_A=x.createContext(void 0),RA={setTheme:e=>{},themes:[]},PA=()=>{var e;return(e=x.useContext(_A))!=null?e:RA};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Pv.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(w,y=!1,b=!0)=>{let v=o?o[w]:w,g=y?w+"|| ''":`'${v}'`,p="";return s&&b&&!y&&Pv.includes(w)&&(p+=`d.style.colorScheme = '${w}';`),n==="class"?y||v?p+=`c.add(${g})`:p+="null":v&&(p+=`d[s](n,${g})`),p},m=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${NA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return x.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var AA=e=>{switch(e){case"success":return DA;case"info":return LA;case"warning":return MA;case"error":return $A;default:return null}},OA=Array(12).fill(0),IA=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},OA.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),DA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),MA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),LA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),$A=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),BA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),FA=()=>
310{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ff=1,VA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ff++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
310this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],I.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(zA(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),a=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ff++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_t=new VA,UA=(e,t)=>{let n=(t==null?void 0:t.id)||Ff++;return _t.addToast({title:e,...t,id:n}),n},zA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WA=UA,HA=()=>_t.toasts,qA=()=>_t.getActiveToasts(),Av=Object.assign(WA,{success:_t.success,info:_t.info,warning:_t.warning,error:_t.error,custom:_t.custom,message:_t.message,promise:_t.promise,dismiss:_t.dismiss,loading:_t.loading},{getHistory:HA,getToasts:qA});function KA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}KA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
310left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
310:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
310--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
311`);function ql(e){return e.label!==void 0}var GA=3,YA="32px",QA="16px",Ov=4e3,JA=356,XA=14,ZA=20,e2=200;function dn(...e){return e.filter(Boolean).join(" ")}function t2(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var n2=e=>{var t,n,r,s,i,o,a,c,u,d,h;let{invert:f,toast:m,unstyled:w,interacting:y,setHeights:b,visibleToasts:v,heights:g,index:p,toasts:S,expanded:k,removeToast:E,defaultRichColors:C,closeButton:j,style:_,cancelButtonStyle:P,actionButtonStyle:M,className:A="",descriptionClassName:z="",duration:T,position:F,gap:W,loadingIcon:V,expandByDefault:N,classNames:R,icons:$,closeButtonAriaLabel:O="Close toast",pauseWhenPageIsHidden:L}=e,[q,Q]=I.useState(null),[U,K]=I.useState(null),[J,ee]=I.useState(!1),[ie,me]=I.useState(!1),[Pe,gt]=I.use
vendor: 4,387 bytes, line 311
311State(!1),[nt,Mt]=I.useState(!1),[oe,yt]=I.useState(!1),[Zn,Sr]=I.useState(0),[er,Lo]=I.useState(0),Er=I.useRef(m.duration||T||Ov),$o=I.useRef(null),Pn=I.useRef(null),kl=p===0,Sl=p+1<=v,vt=m.type,ue=m.dismissible!==!1,Ze=m.className||"",Bo=m.descriptionClassName||"",xs=I.useMemo(()=>g.findIndex(ae=>ae.toastId===m.id)||0,[g,m.id]),md=I.useMemo(()=>{var ae;return(ae=m.closeButton)!=null?ae:j},[m.closeButton,j]),Jg=I.useMemo(()=>m.duration||T||Ov,[m.duration,T]),gd=I.useRef(0),ci=I.useRef(0),Xg=I.useRef(0),ui=I.useRef(null),[vT,xT]=F.split("-"),Zg=I.useMemo(()=>g.reduce((ae,Se,Ae)=>Ae>=xs?ae:ae+Se.height,0),[g,xs]),ey=FA(),wT=m.invert||f,yd=vt==="loading";ci.current=I.useMemo(()=>xs*W+Zg,[xs,Zg]),I.useEffect(()=>{Er.current=Jg},[Jg]),I.useEffect(()=>{ee(!0)},[]),I.useEffect(()=>{let ae=Pn.current;if(ae){let Se=ae.getBoundingClientRect().height;return Lo(Se),b(Ae=>[{toastId:m.id,height:Se,position:m.position},...Ae]),()=>b(Ae=>Ae.filter(an=>an.toastId!==m.id))}},[b,m.id]),I.useLayoutEffect(()=>{if(!J)return;let ae=Pn.current,Se=ae.style.height;ae.style.height="auto";let Ae=ae.getBoundingClientRect().height;ae.style.height=Se,Lo(Ae),b(an=>an.find(ln=>ln.toastId===m.id)?an.map(ln=>ln.toastId===m.id?{...ln,height:Ae}:ln):[{toastId:m.id,height:Ae,position:m.position},...an])},[J,m.title,m.description,b,m.id]);let Cr=I.useCallback(()=>{me(!0),Sr(ci.current),b(ae=>ae.filter(Se=>Se.toastId!==m.id)),setTimeout(()=>{E(m)},e2)},[m,E,b,ci]);I.useEffect(()=>{if(m.promise&&vt==="loading"||m.duration===1/0||m.type==="loading")return;let ae;return k||y||L&&ey?(()=>{if(Xg.current<gd.current){let Se=new Date().getTime()-gd.current;Er.current=Er.current-Se}Xg.current=new Date().getTime()})():Er.current!==1/0&&(gd.current=new Date().getTime(),ae=setTimeout(()=>{var Se;(Se=m.onAutoClose)==null||Se.call(m,m),Cr()},Er.current)),()=>clearTimeout(ae)},[k,y,m,vt,L,ey,Cr]),I.useEffect(()=>{m.delete&&Cr()},[Cr,m.delete]);function bT(){var ae,Se,Ae;return $!=null&&$.loading?I.createElement("div",{className:dn(R==null?void 0:R.loader,(ae=m==null?void 0:m.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":vt==="loading"},$.loading):V?I.createElement("div",{className:dn(R==null?void 0:R.loader,(Se=m==null?void 0:m.classNames)==null?void 0:Se.loader,"sonner-loader"),"data-visible":vt==="loading"},V):I.createElement(IA,{className:dn(R==null?void 0:R.loader,(Ae=m==null?void 0:m.classNames)==null?void 0:Ae.loader),visible:vt==="loading"})}return I.createElement("li",{tabIndex:0,ref:Pn,className:dn(A,Ze,R==null?void 0:R.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[vt],(n=m==null?void 0:m.classNames)==null?void 0:n[vt]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:C,"data-styled":!(m.jsx||m.unstyled||w),"data-mounted":J,"data-promise":!!m.promise,"data-swiped":oe,"data-removed":ie,"data-visible":Sl,"data-y-position":vT,"data-x-position":xT,"data-index":p,"data-front":kl,"data-swiping":Pe,"data-dismissible":ue,"data-type":vt,"data-invert":wT,"data-swipe-out":nt,"data-swipe-direction":U,"data-expanded":!!(k||N&&J),style:{"--index":p,"--toasts-before":p,"--z-index":S.length-p,"--offset":`${ie?Zn:ci.current}px`,"--initial-height":N?"auto":`${er}px`,..._,...m.style},onDragEnd:()=>{gt(!1),Q(null),ui.current=null},onPointerDown:ae=>{yd||!ue||($o.current=new Date,Sr(ci.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(gt(!0),ui.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,Se,Ae,an;if(nt||!ue)return;ui.current=null;let ln=Number(((ae=Pn.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jr=Number(((Se=Pn.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ws=new Date().getTime()-((Ae=$o.current)==null?void 0:Ae.getTime()),cn=q==="x"?ln:jr,Tr=Math.abs(cn)/ws;if(Math.abs(cn)>=ZA||Tr>.11){Sr(ci.current),(an=m.onDismiss)==null||an.call(m,m),K(q==="x"?ln>0?"right":"left":jr>0?"down":"up"),Cr(),Mt(!0),yt(!1);return}gt(!1),Q(null)},onPointerMove:ae=>{var Se,Ae,an,ln;if(!ui.current||!ue||((Se=window.getSelection())==null?void 0:Se.toString().length)>0)return;let jr=ae.clientY-ui.current.y,ws=ae.clientX-ui.current.x,cn=(Ae=e.swipeDirections)!=null?Ae:t2(F);!q&&(Math.abs(ws)>1||Math.abs(jr)>1)&&Q(Math.abs(ws)>Math.abs(jr)?"x":"y");let Tr={x:0,y:0};
311q==="y"?(cn.includes("top")||cn.includes("bottom"))&&(cn.includes("top")&&jr<0||cn.includes("bottom")&&jr>0)&&(Tr.y=jr):q==="x"&&(cn.includes("left")||cn.includes("right"))&&(cn.includes("left")&&ws<0||cn.includes("right")&&ws>0)&&(Tr.x=ws),(Math.abs(Tr.x)>0||Math.abs(Tr.y)>0)&&yt(!0),(an=Pn.current)==null||an.style.setProperty("--swipe-amount-x",`${Tr.x}px`),(ln=Pn.current)==null||ln.style.setProperty("--swipe-amount-y",`${Tr.y}px`)}},md&&!m.jsx?I.createElement("button",{"aria-label":O,"data-disabled":yd,"data-close-button":!0,onClick:yd||!ue?()=>{}:()=>{var ae;Cr(),(ae=m.onDismiss)==null||ae.call(m,m)},className:dn(R==null?void 0:R.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(i=$==null?void 0:$.close)!=null?i:BA):null,m.jsx||x.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:I.createElement(I.Fragment,null,vt||m.icon||m.promise?I.createElement("div",{"data-icon":"",className:dn(R==null?void 0:R.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||bT():null,m.type!=="loading"?m.
311icon||($==null?void 0:$[vt])||AA(vt):null):null,I.createElement("div",{"data-content":"",className:dn(R==null?void 0:R.content,(a=m==null?void 0:m.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:dn(R==null?void 0:R.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?I.createElement("div",{"data-description":"",className:dn(z,Bo,R==null?void 0:R.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),x.isValidElement(m.cancel)?m.cancel:m.cancel&&ql(m.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:ae=>{var Se,Ae;ql(m.cancel)&&ue&&((Ae=(Se=m.cancel).onClick)==null||Ae.call(Se,ae),Cr())},className:dn(R==null?void 0:R.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,x.isValidElement(m.action)?m.action:m.action&&ql(m.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||M,onClick:ae=>{var Se,Ae;ql(m.action)&&((Ae=(Se=m.action).onClick)==null||Ae.call(Se,ae),!ae.defaultPrevented&&Cr())},className:dn(R==null?void 0:R.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function Iv(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function r2(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?QA:YA;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),n}var s2=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:m,visibleToasts:w=GA,toastOptions:y,dir:b=Iv(),gap:v=XA,loadingIcon:g,icons:p,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:k}=e,[E,C]=I.useState([]),j=I.useMemo(()=>Array.from(new Set([r].concat(E.filter(L=>L.position).map(L=>L.position)))),[E,r]),[_,P]=I.useState([]),[M,A]=I.useState(!1),[z,T]=I.useState(!1),[F,W]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=I.useRef(null),N=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=I.useRef(null),$=I.useRef(!1),O=I.useCallback(L=>{C(q=>{var Q;return(Q=q.find(U=>U.id===L.id))!=null&&Q.delete||_t.dismiss(L.id),q.filter(({id:U})=>U!==L.id)})},[]);return I.useEffect(()=>_t.subscribe(L=>{if(L.dismiss){C(q=>q.map(Q=>Q.id===L.id?{...Q,delete:!0}:Q));return}setTimeout(()=>{O1.flushSync(()=>{C(q=>{let Q=q.findIndex(U=>U.id===L.id);return Q!==-1?[...q.slice(0,Q),{...q[Q],...L},...q.slice(Q+1)]:[L,...q]})})})}),[]),I.useEffect(()=>{if(d!=="system"){W(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:q})=>{W(q?"dark":"light")})}catch{L.addListener(({matches:Q})=>{try{W(Q?"dark":"light")}catch(U){console.error(U)}})}},[d]),I.useEffect(()=>{E.length<=1&&A(!1)},[E]),I.useEffect(()=>{let L=q=>{var Q,U;s.every(K=>q[K]||q.code===K)&&(A(!0),(Q=V.current)==null||Q.focus()),q.code==="Escape"&&(document.activeElement===V.current||(U=V.current)!=null&&U.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[s]),I.useEffect(()=>{if(V.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,$.current=!1)}},[V.current]),I.createElement("section",{ref:t,"aria-label":`${S} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((L,q)=>{var Q;let[U,K]=L.split("-");return E.length?I.createElement("ol",{key:L,dir:b==="auto"?Iv():b,tabIndex:-1,ref:V,className:a,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":U,"data-lifted":M&&E.length>1&&!i,"data-x-position":K,style:{"--front-toast-height":`${((Q=_[0])==null?void 0:Q.height)||0}px`,"--width":`${JA}px`,"--gap":`${v}px`,...m,...r2(c,u)},onBlur:J=>{$.current&&!J.currentTarget.contains(J.relatedTarget)&&($.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||$.current||($.current=!0,R.current=J.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{z||A(!1)},onDragEnd:()=>A(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||T(!0)},onPointerUp:()=>T(!1)},E.filter(J=>!J.position&&q===0||J.position===L).map((J,ee)=>{var ie,me;return I.createElement(n2,{key:J.id,icons:p,index:ee,toast:J,defaultRichColors:h,duration:(ie=y==null?void 0:y.duration)!=null?ie:f,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:w,closeButton:(me=y==null?void 0:y.closeButton)!=null?me:o,interacting:z,position:L,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:O,toasts:E.filter(Pe=>Pe.position==J.position),heights:_.filter(Pe=>Pe.position==J.position),setHeights:P,expandByDefault:i,gap:v,loadingIcon:g,expanded:M,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const i2=({...e})=>{const{theme:t="system"}=PA();return l.jsx(s2,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var o2=$p[" useId ".trim().toString()]||(()=>{}),a2=0;function ga(e){const[t,n]=x.useState(o2());return Yn(()=>{n(r=>r??String(a2++))},[e]),t?`radix-${t}`:""}const l2=["top","right","bottom","left"],us=Math.min,Bt=Math.max,iu=Math.round,Kl=Math.floor,zn=e=>({x:e,y:e}
vendor: 10,346 bytes, line 311
311),c2={left:"right",right:"left",bottom:"top",top:"bottom"},u2={start:"end",end:"start"};function Vf(e,t,n){return Bt(e,us(t,n))}function yr(e,t){return typeof e=="function"?e(t):e}function vr(e){return e.split("-")[0]}function To(e){return e.split("-")[1]}function Fm(e){return e==="x"?"y":"x"}function Vm(e){return e==="y"?"height":"width"}const d2=new Set(["top","bottom"]);function Bn(e){return d2.has(vr(e))?"y":"x"}function Um(e){return Fm(Bn(e))}function h2(e,t,n){n===void 0&&(n=!1);const r=To(e),s=Um(e),i=Vm(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ou(o)),[o,ou(o)]}function f2(e){const t=ou(e);return[Uf(e),t,Uf(t)]}function Uf(e){return e.replace(/start|end/g,t=>u2[t])}const Dv=["left","right"],Mv=["right","left"],p2=["top","bottom"],m2=["bottom","top"];function g2(e,t,n){switch(e){case"top":case"bottom":return n?t?Mv:Dv:t?Dv:Mv;case"left":case"right":return t?p2:m2;default:return[]}}function y2(e,t,n,r){const s=To(e);let i=g2(vr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Uf)))),i}function ou(e){return e.replace(/left|right|bottom|top/g,t=>c2[t])}function v2(e){return{top:0,right:0,bottom:0,left:0,...e}}function $k(e){return typeof e!="number"?v2(e):{top:e,right:e,bottom:e,left:e}}function au(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Lv(e,t,n){let{reference:r,floating:s}=e;const i=Bn(t),o=Um(t),a=Vm(o),c=vr(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-s.width,y:h};break;default:m={x:r.x,y:r.y}}switch(To(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const x2=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Lv(u,r,c),f=r,m={},w=0;for(let y=0;y<a.length;y++){const{name:b,fn:v}=a[y],{x:g,y:p,data:S,reset:k}=await v({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=g??d,h=p??h,m={...m,[b]:{...m[b],...S}},k&&w<=50&&(w++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:d,y:h}=Lv(u,f,c)),y=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:m}};async function Va(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=yr(t,e),w=$k(m),b=a[f?h==="floating"?"reference":"floating":h],v=au(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:c})),g=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,p=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(p))?await(i.getScale==null?void 0:i.getScale(p))||{x:1,y:1}:{x:1,y:1},k=au(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:p,strategy:c}):g);return{top:(v.top-k.top+w.top)/S.y,bottom:(k.bottom-v.bottom+w.bottom)/S.y,left:(v.left-k.left+w.left)/S.x,right:(k.right-v.right+w.right)/S.x}}const w2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=t,{element:u,padding:d=0}=yr(e,t)||{};if(u==null)return{};const h=$k(d),f={x:n,y:r},m=Um(s),w=Vm(m),y=await o.getDimensions(u),b=m==="y",v=b?"top":"left",g=b?"bottom":"right",p=b?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[m]-f[m]-i.floating[w],k=f[m]-i.reference[m],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=E?E[p]:0;(!C||!await(o.isElement==null?void 0:o.isElement(E)))&&(C=a.floating[p]||i.floating[w]);const j=S/2-k/2,_=C/2-y[w]/2-1,P=us(h[v],_),M=us(h[g],_),A=P,z=C-y[w]-M,T=C/2-y[w]/2+j,F=Vf(A,T,z),W=!c.arrow&&To(s)!=null&&T!==F&&i.reference[w]/2-(T<A?P:M)-y[w]/2<0,V=W?T<A?T-A:T-z:0;return{[m]:f[m]+V,data:{[m]:F,centerOffset:T-F-V,...W&&{alignmentOffset:V}},reset:W}}}),b2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...b}=yr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=vr(s),g=Bn(a),p=vr(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=f||(p||!y?[ou(a)]:f2(a)),E=w!=="none";!f&&E&&k.push(...y2(a,y,w,S));const C=[a,...k],j=await Va(t,b),_=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&_.push(j[v]),h){const T=h2(s,o,S);_.push(j[T[0]],j[T[1]])}if(P=[...P,{placement:s,overflows:_}],!_.every(T=>T<=0)){var M,A;const T=(((M=i.flip)==null?void 0:M.index)||0)+1,F=C[T];if(F&&(!(h==="alignment"?g!==Bn(F):!1)||P.every(N=>N.overflows[0]>0&&Bn(N.placement)===g)))return{data:{index:T,overflows:P},reset:{placement:F}};let W=(A=P.filter(V=>V.overflows[0]<=0).sort((V,N)=>V.overflows[1]-N.overflows[1])[0])==null?void 0:A.placement;if(!W)switch(m){case"bestFit":{var z;const V=(z=P.filter(N=>{if(E){const R=Bn(N.placement);return R===g||R==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((N,R)=>N[1]-R[1])[0])==null?void 0:z[0];V&&(W=V);break}case"initialPlacement":W=a;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function $v(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bv(e){return l2.some(t=>e[t]>=0)}const k2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=yr(e,t);switch(r){case"referenceHidden":{const i=await Va(t,{...s,elementContext:"reference"}),o=$v(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Bv(o)}}}case"escaped":{const i=await Va(t,{...s,altBoundary:!0}),o=$v(i,n.floating);return{data:{escapedOffsets:o,escaped:Bv(o)}}}default:return{}}}}},Bk=new Set(["left","top"]);async function S2(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=vr(n),a=To(n),c=Bn(n)==="y",u=Bk.has(o)?-1:1,d=i&&c?-1:1,h=yr(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const E2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,c=await S2(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},C2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:v,y:g}=b;return{x:v,y:g}}},...c}=yr(e,t),u={x:n,y:r},d=await Va(t,c),h=Bn(vr(s)),f=Fm(h);let m=u[f],w=u[h];if(i){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=m+d[b],p=m-d[v];m=Vf(g,m,p)}if(o){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=w+d[b],p=w-d[v];w=Vf(g,w,p)}const y=a.fn({...t,[f]:m,[h]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:i,[h]:o}}}}}},j2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=yr(e,t),d={x:n,y:r},h=Bn(s),f=Fm(h);let m=d[f],w=d[h];const y=yr(a,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const p=f==="y"?"height":"width",S=i.reference[f]-i.floating[p]+b.mainAxis,k=i.reference[f]+i.reference[p]-b.mainAxis;m<S?m=S:m>k&&(m=k)}if(u){var v,g;const p=f==="y"?"width":"height",S=Bk.has(vr(s)),k=i.reference[h]-i.floating[p]+(S&&((v=o.offset)==null?void 0:v[h])||0)+(S?0:b.crossAxis),E=i.reference[h]+i.reference[p]+(S?0:((g=o.offset)==null?void 0:g[h])||0)-(S?b.crossAxis:0);w<k?w=k:w>E&&(w=E)}return{[f]:m,[h]:w}}}},T2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:c=()=>{},...u}=yr(e,t),d=await Va(t,u),h=vr(s),f=To(s),m=Bn(s)==="y",{width:w,height:y}=i.floating;let b,v;h==="top"||h==="bottom"?(b=h,v=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,b=f==="end"?"top":"bottom");const g=y-d.top-d.bottom,p=w-d.left-d.right,S=us(y-d[b],g),k=us(w-d[v],p),E=!t.middlewareData.shift;let C=S,j=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=p),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=g),E&&!f){const P=Bt(d.left,0),M=Bt(d.right,0),A=Bt(d.top,0),z=Bt(d.bottom,0);m?j=w-2*(P!==0||M!==0?P+M:Bt(d.left,d.right)):C=y-2*(A!==0||z!==0?A+z:Bt(d.top,d.bottom))}await c({...t,availableWidth:j,availableHeight:C});const _=await o.getDimensions(a.floating);return w!==_.width||y!==_.height?{reset:{rects:!0}}:{}}}};function Ku(){return typeof window<"u"}function No(e){return Fk(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xn(e){var t;return(t=(Fk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fk(e){return Ku()?e instanceof Node||e instanceof Ht(e).Node:!1}function Tn(e){return Ku()?e instanceof Element||e instanceof Ht(e).Element:!1}function Qn(e){return Ku()?e instanceof HTMLElement||e instanceof Ht(e).HTMLElement:!1}function Fv(e){return!Ku()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot}const N2=new Set(["inline","contents"]);function ml(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Nn(e);
vendor: 4,121 bytes, line 311
311return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N2.has(s)}const _2=new Set(["table","td","th"]);function R2(e){return _2.has(No(e))}const P2=[":popover-open",":modal"];function Gu(e){return P2.some(t=>{try{return e.matches(t)}catch{return!1}})}const A2=["transform","translate","scale","rotate","perspective"],O2=["transform","translate","scale","rotate","perspective","filter"],I2=["paint","layout","strict","content"];function zm(e){const t=Wm(),n=Tn(e)?Nn(e):e;return A2.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||O2.some(r=>(n.willChange||"").includes(r))||I2.some(r=>(n.contain||"").includes(r))}function D2(e){let t=ds(e);for(;Qn(t)&&!vo(t);){if(zm(t))return t;if(Gu(t))return null;t=ds(t)}return null}function Wm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const M2=new Set(["html","body","#document"]);function vo(e){return M2.has(No(e))}function Nn(e){return Ht(e).getComputedStyle(e)}function Yu(e){return Tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ds(e){if(No(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fv(e)&&e.host||Xn(e);return Fv(t)?t.host:t}function Vk(e){const t=ds(e);return vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qn(t)&&ml(t)?t:Vk(t)}function Ua(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Vk(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Ht(s);if(i){const a=zf(o);return t.concat(o,o.visualViewport||[],ml(s)?s:[],a&&n?Ua(a):[])}return t.concat(s,Ua(s,[],n))}function zf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uk(e){const t=Nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Qn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=iu(n)!==i||iu(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Hm(e){return Tn(e)?e:e.contextElement}function Xi(e){const t=Hm(e);if(!Qn(t))return zn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=Uk(t);let o=(i?iu(n.width):n.width)/r,a=(i?iu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const L2=zn(0);function zk(e){const t=Ht(e);return!Wm()||!t.visualViewport?L2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ht(e)?!1:t}function ei(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Hm(e);let o=zn(1);t&&(r?Tn(r)&&(o=Xi(r)):o=Xi(e));const a=$2(i,n,r)?zk(i):zn(0);let c=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=Ht(i),m=r&&Tn(r)?Ht(r):r;let w=f,y=zf(w);for(;y&&r&&m!==w;){const b=Xi(y),v=y.getBoundingClientRect(),g=Nn(y),p=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*b.x,S=v.top+(y.clientTop+parseFloat(g.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,h*=b.y,c+=p,u+=S,w=Ht(y),y=zf(w)}}return au({width:d,height:h,x:c,y:u})}function qm(e,t){const n=Yu(e).scrollLeft;return t?t.left+n:ei(Xn(e)).left+n}function Wk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:qm(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function B2(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Xn(r),a=t?Gu(t.floating):!1;if(r===o||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=zn(1);const d=zn(0),h=Qn(r);if((h||!h&&!i)&&((No(r)!=="body"||ml(o))&&(c=Yu(r)),Qn(r))){const m=ei(r);u=Xi(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=o&&!h&&!i?Wk(o,c,!0):zn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function F2(e){return Array.from(e.getClientRects())}function V2(e){const t=Xn(e),n=Yu(e),r=e.ownerDocument.body,s=Bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+qm(e);const a=-n.scrollTop;return Nn(r).direction==="rtl"&&(o+=Bt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}
vendor: 4,590 bytes, line 311
311function U2(e,t){const n=Ht(e),r=Xn(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const u=Wm();(!u||u&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}const z2=new Set(["absolute","fixed"]);function W2(e,t){const n=ei(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Qn(e)?Xi(e):zn(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:a,x:c,y:u}}function Vv(e,t,n){let r;if(t==="viewport")r=U2(e,n);else if(t==="document")r=V2(Xn(e));else if(Tn(t))r=W2(t,n);else{const s=zk(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return au(r)}function Hk(e,t){const n=ds(e);return n===t||!Tn(n)||vo(n)?!1:Nn(n).position==="fixed"||Hk(n,t)}function H2(e,t){const n=t.get(e);if(n)return n;let r=Ua(e,[],!1).filter(a=>Tn(a)&&No(a)!=="body"),s=null;const i=Nn(e).position==="fixed";let o=i?ds(e):e;for(;Tn(o)&&!vo(o);){const a=Nn(o),c=zm(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&z2.has(s.position)||ml(o)&&!c&&Hk(e,o))?r=r.filter(d=>d!==o):s=a,o=ds(o)}return t.set(e,r),r}function q2(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Gu(t)?[]:H2(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,d)=>{const h=Vv(t,d,s);return u.top=Bt(h.top,u.top),u.right=us(h.right,u.right),u.bottom=us(h.bottom,u.bottom),u.left=Bt(h.left,u.left),u},Vv(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function K2(e){const{width:t,height:n}=Uk(e);return{width:t,height:n}}function G2(e,t,n){const r=Qn(t),s=Xn(t),i=n==="fixed",o=ei(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=zn(0);function u(){c.x=qm(s)}if(r||!r&&!i)if((No(t)!=="body"||ml(s))&&(a=Yu(t)),r){const m=ei(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?Wk(s,a):zn(0),h=o.left+a.scrollLeft-c.x-d.x,f=o.top+a.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function Zd(e){return Nn(e).position==="static"}function Uv(e,t){if(!Qn(e)||Nn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xn(e)===n&&(n=n.ownerDocument.body),n}function qk(e,t){const n=Ht(e);if(Gu(e))return n;if(!Qn(e)){let s=ds(e);for(;s&&!vo(s);){if(Tn(s)&&!Zd(s))return s;s=ds(s)}return n}let r=Uv(e,t);for(;r&&R2(r)&&Zd(r);)r=Uv(r,t);return r&&vo(r)&&Zd(r)&&!zm(r)?n:r||D2(e)||n}const Y2=async function(e){const t=this.getOffsetParent||qk,n=this.getDimensions,r=await n(e.floating);return{reference:G2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q2(e){return Nn(e).direction==="rtl"}const J2={convertOffsetParentRelativeRectToViewportRelativeRect:B2,getDocumentElement:Xn,getClippingRect:q2,getOffsetParent:qk,getElementRects:Y2,getClientRects:F2,getDimensions:K2,getScale:Xi,isElement:Tn,isRTL:Q2};function Kk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function X2(e,t){let n=null,r;const s=Xn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:m}=u;if(a||t(),!f||!m)return;const w=Kl(h),y=Kl(s.clientWidth-(d+f)),b=Kl(s.clientHeight-(h+m)),v=Kl(d),p={rootMargin:-w+"px "+-y+"px "+-b+"px "+-v+"px",threshold:Bt(0,us(1,c))||1};let S=!0;function k(E){const C=E[0].intersectionRatio;if(C!==c){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!Kk(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(k,{...p,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,p)}n.observe(e)}return o(!0),i}function Z2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Hm(e),d=s||i?[...u?Ua(u):[],...Ua(t)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const h=u&&a?X2(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var p;(p=m)==null||p.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let w,y=c?ei(e):null;c&&b();function b(){const v=ei(e);y&&!Kk(y,v)&&n(),y=v,w=requestAnimationFrame(b)}return n(),()=>{var v;d.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),h==null||h(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(w)}}
vendor: 4,250 bytes, line 311
311const eO=E2,tO=C2,nO=b2,rO=T2,sO=k2,zv=w2,iO=j2,oO=(e,t,n)=>{const r=new Map,s={platform:J2,...n},i={...s.platform,_c:r};return x2(e,t,{...s,platform:i})};var aO=typeof document<"u",lO=function(){},jc=aO?x.useLayoutEffect:lO;function lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lu(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!lu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wv(e,t){const n=Gk(e);return Math.round(t*n)/n}function eh(e){const t=x.useRef(e);return jc(()=>{t.current=e}),t}function cO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,h]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=x.useState(r);lu(f,r)||m(r);const[w,y]=x.useState(null),[b,v]=x.useState(null),g=x.useCallback(N=>{N!==E.current&&(E.current=N,y(N))},[]),p=x.useCallback(N=>{N!==C.current&&(C.current=N,v(N))},[]),S=i||w,k=o||b,E=x.useRef(null),C=x.useRef(null),j=x.useRef(d),_=c!=null,P=eh(c),M=eh(s),A=eh(u),z=x.useCallback(()=>{if(!E.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};M.current&&(N.platform=M.current),oO(E.current,C.current,N).then(R=>{const $={...R,isPositioned:A.current!==!1};T.current&&!lu(j.current,$)&&(j.current=$,fl.flushSync(()=>{h($)}))})},[f,t,n,M,A]);jc(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(N=>({...N,isPositioned:!1})))},[u]);const T=x.useRef(!1);jc(()=>(T.current=!0,()=>{T.current=!1}),[]),jc(()=>{if(S&&(E.current=S),k&&(C.current=k),S&&k){if(P.current)return P.current(S,k,z);z()}},[S,k,z,P,_]);const F=x.useMemo(()=>({reference:E,floating:C,setReference:g,setFloating:p}),[g,p]),W=x.useMemo(()=>({reference:S,floating:k}),[S,k]),V=x.useMemo(()=>{const N={position:n,left:0,top:0};if(!W.floating)return N;const R=Wv(W.floating,d.x),$=Wv(W.floating,d.y);return a?{...N,transform:"translate("+R+"px, "+$+"px)",...Gk(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:$}},[n,a,W.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:z,refs:F,elements:W,floatingStyles:V}),[d,z,F,W,V])}const uO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zv({element:r.current,padding:s}).fn(n):{}:r?zv({element:r,padding:s}).fn(n):{}}}},dO=(e,t)=>({...eO(e),options:[e,t]}),hO=(e,t)=>({...tO(e),options:[e,t]}),fO=(e,t)=>({...iO(e),options:[e,t]}),pO=(e,t)=>({...nO(e),options:[e,t]}),mO=(e,t)=>({...rO(e),options:[e,t]}),gO=(e,t)=>({...sO(e),options:[e,t]}),yO=(e,t)=>({...uO(e),options:[e,t]});var vO="Arrow",Yk=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return l.jsx(pe.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yk.displayName=vO;var xO=Yk;function Km(e){const[t,n]=x.useState(void 0);return Yn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qk="Popper",[Jk,Xk]=br(Qk),[LU,Zk]=Jk(Qk),eS="PopperAnchor",tS=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=Zk(eS,n),o=x.useRef(null),a=Re(t,o);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:l.jsx(pe.div,{...s,ref:a})});tS.displayName=eS;var Gm="PopperContent",[wO,bO]=Jk(Gm),nS=x.forwardRef((e,t)=>
vendor: 4,199 bytes, line 311
311{var J,ee,ie,me,Pe,gt;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:w,...y}=e,b=Zk(Gm,n),[v,g]=x.useState(null),p=Re(t,nt=>g(nt)),[S,k]=x.useState(null),E=Km(S),C=(E==null?void 0:E.width)??0,j=(E==null?void 0:E.height)??0,_=r+(i!=="center"?"-"+i:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],A=M.length>0,z={padding:P,boundary:M.filter(SO),altBoundary:A},{refs:T,floatingStyles:F,placement:W,isPositioned:V,middlewareData:N}=cO({strategy:"fixed",placement:_,whileElementsMounted:(...nt)=>Z2(...nt,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[dO({mainAxis:s+j,alignmentAxis:o}),c&&hO({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?fO():void 0,...z}),c&&pO({...z}),mO({...z,apply:({elements:nt,rects:Mt,availableWidth:oe,availableHeight:yt})=>{const{width:Zn,height:Sr}=Mt.reference,er=nt.floating.style;er.setProperty("--radix-popper-available-width",`${oe}px`),er.setProperty("--radix-popper-available-height",`${yt}px`),er.setProperty("--radix-popper-anchor-width",`${Zn}px`),er.setProperty("--radix-popper-anchor-height",`${Sr}px`)}}),S&&yO({element:S,padding:a}),EO({arrowWidth:C,arrowHeight:j}),f&&gO({strategy:"referenceHidden",...z})]}),[R,$]=iS(W),O=Gn(w);Yn(()=>{V&&(O==null||O())},[V,O]);const L=(J=N.arrow)==null?void 0:J.x,q=(ee=N.arrow)==null?void 0:ee.y,Q=((ie=N.arrow)==null?void 0:ie.centerOffset)!==0,[U,K]=x.useState();return Yn(()=>{v&&K(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:V?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(me=N.transformOrigin)==null?void 0:me.x,(Pe=N.transformOrigin)==null?void 0:Pe.y].join(" "),...((gt=N.hide)==null?void 0:gt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(wO,{scope:n,placedSide:R,onArrowChange:k,arrowX:L,arrowY:q,shouldHideArrow:Q,children:l.jsx(pe.div,{"data-side":R,"data-align":$,...y,ref:p,style:{...y.style,animation:V?void 0:"none"}})})})});nS.displayName=Gm;var rS="PopperArrow",kO={top:"bottom",right:"left",bottom:"top",left:"right"},sS=x.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=bO(rS,r),o=kO[i.placedSide];return l.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:l.jsx(xO,{...s,ref:n,style:{...s.style,display:"block"}})})});sS.displayName=rS;function SO(e){return e!==null}var EO=e=>({name:"transformOrigin",options:e,fn(t){var b,v,g;const{placement:n,rects:r,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=iS(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,m=(((g=s.arrow)==null?void 0:g.y)??0)+c/2;let w="",y="";return u==="bottom"?(w=o?h:`${f}px`,y=`${-c}px`):u==="top"?(w=o?h:`${f}px`,y=`${r.floating.height+c}px`):u==="right"?(w=`${-c}px`,y=o?h:`${m}px`):u==="left"&&(w=`${r.floating.width+c}px`,y=o?h:`${m}px`),{data:{x:w,y}}}});function iS(e){const[t,n="center"]=e.split("-");return[t,n]}var CO=tS,jO=nS,TO=sS,[Qu,$U]=br("Tooltip",[Xk]),Ym=Xk(),oS="TooltipProvider",NO=700,Hv="tooltip.open",[_O,aS]=Qu(oS),lS=e=>{const{__scopeTooltip:t,delayDuration:n=NO,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=x.useRef(!0),a=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(_O,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 4,665 bytes, line 311
311o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};lS.displayName=oS;var cS="Tooltip",[BU,Ju]=Qu(cS),Wf="TooltipTrigger",RO=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ju(Wf,n),i=aS(Wf,n),o=Ym(n),a=x.useRef(null),c=Re(t,a,s.onTriggerChange),u=x.useRef(!1),d=x.useRef(!1),h=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(CO,{asChild:!0,...o,children:l.jsx(pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ye(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ye(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ye(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ye(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ye(e.onBlur,s.onClose),onClick:ye(e.onClick,s.onClose)})})});RO.displayName=Wf;var PO="TooltipPortal",[FU,AO]=Qu(PO,{forceMount:void 0}),xo="TooltipContent",uS=x.forwardRef((e,t)=>{const n=AO(xo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Ju(xo,e.__scopeTooltip);return l.jsx(ys,{present:r||o.open,children:o.disableHoverableContent?l.jsx(dS,{side:s,...i,ref:t}):l.jsx(OO,{side:s,...i,ref:t})})}),OO=x.forwardRef((e,t)=>{const n=Ju(xo,e.__scopeTooltip),r=aS(xo,e.__scopeTooltip),s=x.useRef(null),i=Re(t,s),[o,a]=x.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=x.useCallback(()=>{a(null),h(!1)},[h]),m=x.useCallback((w,y)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},g=$O(v,b.getBoundingClientRect()),p=BO(v,g),S=FO(y.getBoundingClientRect()),k=UO([...p,...S]);a(k),h(!0)},[h]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(c&&d){const w=b=>m(b,d),y=b=>m(b,c);return c.addEventListener("pointerleave",w),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",y)}}},[c,d,m,f]),x.useEffect(()=>{if(o){const w=y=>{const b=y.target,v={x:y.clientX,y:y.clientY},g=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),p=!VO(v,o);g?f():p&&(f(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,d,o,u,f]),l.jsx(dS,{...e,ref:i})}),[IO,DO]=Qu(cS,{isInside:!1}),MO=DR("TooltipContent"),dS=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,c=Ju(xo,n),u=Ym(n),{onClose:d}=c;return x.useEffect(()=>(document.addEventListener(Hv,d),()=>document.removeEventListener(Hv,d)),[d]),x.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),l.jsx(Vu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:l.jsxs(jO,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(MO,{children:r}),l.jsx(IO,{scope:n,isInside:!0,children:l.jsx(sP,{id:c.contentId,role:"tooltip",children:s||r})})]})})});uS.displayName=xo;var hS="TooltipArrow",LO=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Ym(n);return DO(hS,n).isInside?null:l.jsx(TO,{...s,...r,ref:t})});LO.displayName=hS;function $O(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function BO(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function FO(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function VO(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;
311o=i++){const a=t[i],c=t[o],u=a.x,d=a.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function UO(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),zO(t)}function zO(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var WO=lS,fS=uS;const HO=WO,qO=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(fS,{ref:r,sideOffset:t,className:Z("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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}));qO.displayName=fS.displayName;var Xu=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(){}},Zu=typeof window>"u"||"Deno"in globalThis;function gn(){}function KO(e,t){return typeof e=="function"?e(t):e}function GO(e){return typeof e=="number"&&e>=0&&e!==1/0}function YO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Hf(e,t){return typeof e=="function"?e(t):e}function QO(e,t){return typeof e=="function"?e(t):e}function qv(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Qm(o,t.options))return!1}else if(!Wa(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Kv(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(za(t.options.mutationKey)!==za(i))return!1}else if(!Wa(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Qm(e,t){return((t==null?void 0:t.queryKeyHashFn)||za)(e)}function za(e){return JSON.stringify(e,(t,n)=>qf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Wa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wa(e[n],t[n])):!1}function pS(e,t){if(e===t)return e;const n=Gv(e)&&Gv(t);if(n||qf(e)&&qf(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,u++):(a[h]=pS(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:a}return t}function Gv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qf(e){if(!Yv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Yv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yv(e){return Object.prototype.toString.call(e)==="[object Object]"}function JO(e){return new Promise(t=>{setTimeout(t,e)})}function XO(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pS(e,t):t}function ZO(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function eI(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Jm=Symbol();function mS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Jm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Bs,Vr,no,f0,tI=(f0=class extends Xu{constructor(){super();xe(this,Bs);xe(this,Vr);xe(this,no);le(this,no,t=>{if(!Zu&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}
vendor: 20,047 bytes, line 311
311onSubscribe(){D(this,Vr)||this.setEventListener(D(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Vr))==null||t.call(this),le(this,Vr,void 0))}setEventListener(t){var n;le(this,no,t),(n=D(this,Vr))==null||n.call(this),le(this,Vr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,Bs)!==t&&(le(this,Bs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,Bs)=="boolean"?D(this,Bs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bs=new WeakMap,Vr=new WeakMap,no=new WeakMap,f0),gS=new tI,ro,Ur,so,p0,nI=(p0=class extends Xu{constructor(){super();xe(this,ro,!0);xe(this,Ur);xe(this,so);le(this,so,t=>{if(!Zu&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,Ur)||this.setEventListener(D(this,so))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Ur))==null||t.call(this),le(this,Ur,void 0))}setEventListener(t){var n;le(this,so,t),(n=D(this,Ur))==null||n.call(this),le(this,Ur,t(this.setOnline.bind(this)))}setOnline(t){D(this,ro)!==t&&(le(this,ro,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,ro)}},ro=new WeakMap,Ur=new WeakMap,so=new WeakMap,p0),cu=new nI;function rI(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function sI(e){return Math.min(1e3*2**e,3e4)}function yS(e){return(e??"online")==="online"?cu.isOnline():!0}var vS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function th(e){return e instanceof vS}function xS(e){let t=!1,n=0,r=!1,s;const i=rI(),o=y=>{var b;r||(f(new vS(y)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},c=()=>{t=!1},u=()=>gS.isFocused()&&(e.networkMode==="always"||cu.isOnline())&&e.canRun(),d=()=>yS(e.networkMode)&&e.canRun(),h=y=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),i.resolve(y))},f=y=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),i.reject(y))},m=()=>new Promise(y=>{var b;s=v=>{(r||u())&&y(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(r)return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var E;if(r)return;const g=e.retry??(Zu?0:3),p=e.retryDelay??sI,S=typeof p=="function"?p(n,v):p,k=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,v);if(t||!k){f(v);return}n++,(E=e.onFail)==null||E.call(e,n,v),JO(S).then(()=>u()?void 0:m()).then(()=>{t?f(v):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?w():m().then(w),i)}}var iI=e=>setTimeout(e,0);function oI(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=iI;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var kt=oI(),Fs,m0,wS=(m0=class{constructor(){xe(this,Fs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&le(this,Fs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zu?1/0:5*60*1e3))}clearGcTimeout(){D(this,Fs)&&(clearTimeout(D(this,Fs)),le(this,Fs,void 0))}},Fs=new WeakMap,m0),io,Vs,Jt,Us,ht,il,zs,vn,ir,g0,aI=(g0=class extends wS{constructor(t){super();xe(this,vn);xe(this,io);xe(this,Vs);xe(this,Jt);xe(this,Us);xe(this,ht);xe(this,il);xe(this,zs);le(this,zs,!1),le(this,il,t.defaultOptions),this.setOptions(t.options),this.observers=[],le(this,Us,t.client),le(this,Jt,D(this,Us).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,le(this,io,cI(this.options)),this.state=t.state??D(this,io),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,ht))==null?void 0:t.promise}setOptions(t){this.options={...D(this,il),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,Jt).remove(this)}setData(t,n){const r=XO(this.state.data,t,this.options);return ct(this,vn,ir).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ct(this,vn,ir).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=D(this,ht))==null?void 0:r.promise;return(s=D(this,ht))==null||s.cancel(t),n?n.then(gn).catch(gn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,io))}isActive(){return this.observers.some(t=>QO(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Hf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!YO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,ht))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,ht))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,ht)&&(D(this,zs)?D(this,ht).cancel({revert:!0}):D(this,ht).cancelRetry()),this.scheduleGc()),D(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ct(this,vn,ir).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,ht))return D(this,ht).continueRetry(),D(this,ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(le(this,zs,!0),r.signal)})},i=()=>{const f=mS(this.options,n),w=(()=>{const y={client:D(this,Us),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return le(this,zs,!1),this.options.persister?this.options.persister(f,w,this):f(w)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Us),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),le(this,Vs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&ct(this,vn,ir).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const c=f=>{var m,w,y,b;th(f)&&f.silent||ct(this,vn,ir).call(this,{type:"error",error:f}),th(f)||((w=(m=D(this,Jt).config).onError)==null||w.call(m,f,this),(b=(y=D(this,Jt).config).onSettled)==null||b.call(y,this.state.data,f,this)),this.scheduleGc()};return le(this,ht,xS({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var m,w,y,b;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){c(v);return}(w=(m=D(this,Jt).config).onSuccess)==null||w.call(m,f,this),(b=(y=D(this,Jt).config).onSettled)==null||b.call(y,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,m)=>{ct(this,vn,ir).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{ct(this,vn,ir).call(this,{type:"pause"})},onContinue:()=>{ct(this,vn,ir).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),D(this,ht).start()}},io=new WeakMap,Vs=new WeakMap,Jt=new WeakMap,Us=new WeakMap,ht=new WeakMap,il=new WeakMap,zs=new WeakMap,vn=new WeakSet,ir=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...lI(r.data,this.options),fetchMeta:t.meta??null};case"success":return le(this,Vs,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return th(s)&&s.revert&&D(this,Vs)?{...D(this,Vs),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),kt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,Jt).notify({query:this,type:"updated",action:t})})},g0);function lI(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cI(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?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"}}var In,y0,uI=(y0=class extends Xu{constructor(t={}){super();xe(this,In);this.config=t,le(this,In,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Qm(s,n);let o=this.get(i);return o||(o=new aI({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){D(this,In).has(t.queryHash)||(D(this,In).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,In).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,In).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,In).get(t)}getAll(){return[...D(this,In).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qv(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>qv(t,r)):n}notify(t){kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},In=new WeakMap,y0),Dn,wt,Ws,Mn,Pr,v0,dI=(v0=class extends wS{constructor(t){super();xe(this,Mn);xe(this,Dn);xe(this,wt);xe(this,Ws);this.mutationId=t.mutationId,le(this,wt,t.mutationCache),le(this,Dn,[]),this.state=t.state||hI(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,Dn).includes(t)||(D(this,Dn).push(t),this.clearGcTimeout(),D(this,wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){le(this,Dn,D(this,Dn).filter(n=>n!==t)),this.scheduleGc(),D(this,wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Dn).length||(this.state.status==="pending"?this.scheduleGc():D(this,wt).remove(this))}continue(){var t;return((t=D(this,Ws))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,c,u,d,h,f,m,w,y,b,v,g,p,S,k,E,C,j;const n=()=>{ct(this,Mn,Pr).call(this,{type:"continue"})};le(this,Ws,xS({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,P)=>{ct(this,Mn,Pr).call(this,{type:"failed",failureCount:_,error:P})},onPause:()=>{ct(this,Mn,Pr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,wt).canRun(this)}));const r=this.state.status==="pending",s=!D(this,Ws).canStart();try{if(r)n();else{ct(this,Mn,Pr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=D(this,wt).config).onMutate)==null?void 0:o.call(i,t,this));const P=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,t));P!==this.state.context&&ct(this,Mn,Pr).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const _=await D(this,Ws).start();return await((d=(u=D(this,wt).config).onSuccess)==null?void 0:d.call(u,_,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,_,t,this.state.context)),await((w=(m=D(this,wt).config).onSettled)==null?void 0:w.call(m,_,null,this.state.variables,this.state.context,this)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,_,null,t,this.state.context)),ct(this,Mn,Pr).call(this,{type:"success",data:_}),_}catch(_){try{throw await((g=(v=D(this,wt).config).onError)==null?void 0:g.call(v,_,t,this.state.context,this)),await((S=(p=this.options).onError)==null?void 0:S.call(p,_,t,this.state.context)),await((E=(k=D(this,wt).config).onSettled)==null?void 0:E.call(k,void 0,_,this.state.variables,this.state.context,this)),await((j=(C=this.options).onSettled)==null?void 0:j.call(C,void 0,_,t,this.state.context)),_}finally{ct(this,Mn,Pr).call(this,{type:"error",error:_})}}finally{D(this,wt).runNext(this)}}},Dn=new WeakMap,wt=new WeakMap,Ws=new WeakMap,Mn=new WeakSet,Pr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),kt.batch(()=>{D(this,Dn).forEach(r=>{r.onMutationUpdate(t)}),D(this,wt).notify({mutation:this,type:"updated",action:t})})},v0);function hI(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,xn,ol,x0,fI=(x0=class extends Xu{constructor(t={}){super();xe(this,cr);xe(this,xn);xe(this,ol);this.config=t,le(this,cr,new Set),le(this,xn,new Map),le(this,ol,0)}build(t,n,r){const s=new dI({mutationCache:this,mutationId:++El(this,ol)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){D(this,cr).add(t);const n=Gl(t);if(typeof n=="string"){const r=D(this,xn).get(n);r?r.push(t):D(this,xn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,cr).delete(t)){const n=Gl(t);if(typeof n=="string"){const r=D(this,xn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&D(this,xn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Gl(t);if(typeof n=="string"){const r=D(this,xn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Gl(t);if(typeof n=="string"){const s=(r=D(this,xn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{D(this,cr).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,cr).clear(),D(this,xn).clear()})}getAll(){return Array.from(D(this,cr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Kv(n,r))}findAll(t={}){return this.getAll().filter(n=>Kv(t,n))}notify(t){kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return kt.batch(()=>Promise.all(t.map(n=>n.continue().catch(gn))))}},cr=new WeakMap,xn=new WeakMap,ol=new WeakMap,x0);function Gl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Qv(e){return{onFetch:(t,n)=>{var d,h,f,m,w;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const b=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},v=mS(t.options,t.fetchOptions),g=async(p,S,k)=>{if(y)return Promise.reject();if(S==null&&p.pages.length)return Promise.resolve(p);const C=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:S,direction:k?"backward":"forward",meta:t.options.meta};return b(M),M})(),j=await v(C),{maxPages:_}=t.options,P=k?eI:ZO;return{pages:P(p.pages,j,_),pageParams:P(p.pageParams,S,_)}};if(s&&i.length){const p=s==="backward",S=p?pI:Jv,k={pages:i,pageParams:o},E=S(r,k);a=await g(k,E,p)}else{const p=e??i.length;do{const S=c===0?o[0]??r.initialPageParam:Jv(r,a);if(c>0&&S==null)break;a=await g(a,S),c++}while(c<p)}return a};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Jv(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 pI(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Fe,zr,Wr,oo,ao,Hr,lo,co,w0,mI=(w0=class{constructor(e={}){xe(this,Fe);xe(this,zr);xe(this,Wr);xe(this,oo);xe(this,ao);xe(this,Hr);xe(this,lo);xe(this,co);le(this,Fe,e.queryCache||new uI),le(this,zr,e.mutationCache||new fI),le(this,Wr,e.defaultOptions||{}),le(this,oo,new Map),le(this,ao,new Map),le(this,Hr,0)}mount(){El(this,Hr)._++,D(this,Hr)===1&&(le(this,lo,gS.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Fe).onFocus())})),le(this,co,cu.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Fe).onOnline())})))}unmount(){var e,t;El(this,Hr)._--,D(this,Hr)===0&&((e=D(this,lo))==null||e.call(this),le(this,lo,void 0),(t=D(this,co))==null||t.call(this),le(this,co,void 0))}isFetching(e){return D(this,Fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,zr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Fe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,Fe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Hf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,Fe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=D(this,Fe).get(r.queryHash),i=s==null?void 0:s.state.data,o=KO(t,i);if(o!==void 0)return D(this,Fe).build(this,r).setData(o,{...n,manual:!0})}
311setQueriesData(e,t,n){return kt.batch(()=>D(this,Fe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Fe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,Fe);kt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,Fe);return kt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=kt.batch(()=>D(this,Fe).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(gn).catch(gn)}invalidateQueries(e,t={}){return kt.batch(()=>(D(this,Fe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=kt.batch(()=>D(this,Fe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(gn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(gn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,Fe).build(this,t);return n.isStaleByTime(Hf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gn).catch(gn)}fetchInfiniteQuery(e){return e.behavior=Qv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gn).catch(gn)}ensureInfiniteQueryData(e){return e.behavior=Qv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cu.isOnline()?D(this,zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Fe)}getMutationCache(){return D(this,zr)}getDefaultOptions(){return D(this,Wr)}setDefaultOptions(e){le(this,Wr,e)}setQueryDefaults(e,t){D(this,oo).set(za(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,oo).values()],n={};return t.forEach(r=>{Wa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,ao).set(za(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,ao).values()],n={};return t.forEach(r=>{Wa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,Wr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Qm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Jm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,Wr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,Fe).clear(),D(this,zr).clear()}},Fe=new WeakMap,zr=new WeakMap,Wr=new WeakMap,oo=new WeakMap,ao=new WeakMap,Hr=new WeakMap,lo=new WeakMap,co=new WeakMap,w0),gI=x.createContext(void 0),yI=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(gI.Provider,{value:e,children:t}));/**
312 * @remix-run/router v1.23.0
313 *
314 * Copyright (c) Remix Software Inc.
315 *
316 * This source code is licensed under the MIT license found in the
317 * LICENSE.md file in the root directory of this source tree.
318 *
319 * @license MIT
320 */function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ha.apply(this,arguments)}var Gr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Gr||(Gr={}));const Xv="popstate";function vI(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Kf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:uu(s)}return wI(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xI(){return Math.random().toString(36).substr(2,8)}function Zv(e,t){return{usr:e.state,key:e.key,idx:t}}function Kf(e,t,n,r){return n===void 0&&(n=null),Ha({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_o(t):t,{state:n,key:t&&t.key||r||xI()})}function uu(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function _o(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function wI(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Gr.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Ha({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=Gr.Pop;let b=d(),v=b==null?null:b-u;u=b,c&&c({action:a,location:y.location,delta:v})}function f(b,v){a=Gr.Push;let g=Kf(y.location,b,v);u=d()+1;let p=Zv(g,u),S=y.createHref(g);try{o.pushState(p,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&c&&c({action:a,location:y.location,delta:1})}function m(b,v){a=Gr.Replace;let g=Kf(y.location,b,v);u=d();let p=Zv(g,u),S=y.createHref(g);o.replaceState(p,"",S),i&&c&&c({action:a,location:y.location,delta:0})}function w(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:uu(b);return g=g.replace(/ $/,"%20"),Ke(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return a},get location(){return e(s,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Xv,h),c=b,()=>{s.removeEventListener(Xv,h),c=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let v=w(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:m,go(b){return o.go(b)}};return y}var ex;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ex||(ex={}));function bI(e,t,n){return n===void 0&&(n="/"),kI(e,t,n,!1)}function kI(e,t,n,r){let s=typeof t=="string"?_o(t):t,i=Xm(s.pathname||"/",n);if(i==null)return null;let o=kS(e);SI(o);let a=null;for(let c=0;a==null&&c<o.length;++c){let u=II(i);a=AI(o[c],u,r)}return a}function kS(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ke(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
320id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=is([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Ke(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kS(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:RI(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let c of SS(i.path))s(i,o,c)}),t}function SS(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=SS(r.join("/")),a=[];return a.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&a.push(...o),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function SI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:PI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const EI=/^:[\w-]+$/,CI=3,jI=2,TI=1,NI=10,_I=-2,tx=e=>e==="*";function RI(e,t){let n=e.split("/"),r=n.length;return n.some(tx)&&(r+=_I),t&&(r+=jI),n.filter(s=>!tx(s)).reduce((s,i)=>s+(EI.test(i)?CI:i===""?TI:NI),r)}function PI(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function AI(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=nx({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=nx({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 9,180 bytes, lines 320-329
320Object.assign(s,h.params),o.push({params:s,pathname:is([i,h.pathname]),pathnameBase:$I(is([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=is([i,h.pathnameBase]))}return o}function nx(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=OI(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let y=a[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[h];return m&&!w?u[f]=void 0:u[f]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function OI(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),bS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function II(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return bS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Xm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function DI(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?_o(e):e;return{pathname:n?n.startsWith("/")?n:MI(n,t):t,search:BI(r),hash:FI(s)}}function MI(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function nh(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function LI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ES(e,t){let n=LI(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function CS(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=_o(e):(s=Ha({},e),Ke(!s.pathname||!s.pathname.includes("?"),nh("?","pathname","search",s)),Ke(!s.pathname||!s.pathname.includes("#"),nh("#","pathname","hash",s)),Ke(!s.search||!s.search.includes("#"),nh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let c=DI(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const is=e=>e.join("/").replace(/\/\/+/g,"/"),$I=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,FI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function VI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const jS=["post","put","patch","delete"];new Set(jS);const UI=["get",...jS];new Set(UI);/**
321 * React Router v6.30.1
322 *
323 * Copyright (c) Remix Software Inc.
324 *
325 * This source code is licensed under the MIT license found in the
326 * LICENSE.md file in the root directory of this source tree.
327 *
328 * @license MIT
329 */function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qa.apply(this,arguments)}const Zm=x.createContext(null),zI=x.createContext(null),ai=x.createContext(null),ed=x.createContext(null),li=x.createContext({outlet:null,matches:[],isDataRoute:!1}),TS=x.createContext(null);function WI(e,t){let{relative:n}=t===void 0?{}:t;gl()||Ke(!1);let{basename:r,navigator:s}=x.useContext(ai),{hash:i,pathname:o,search:a}=_S(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:is([r,o])),s.createHref({pathname:c,search:a,hash:i})}function gl(){return x.useContext(ed)!=null}function Ro(){return gl()||Ke(!1),x.useContext(ed).location}function NS(e){x.useContext(ai).static||x.useLayoutEffect(e)}function HI(){let{isDataRoute:e}=x.useContext(li);return e?sD():qI()}function qI(){gl()||Ke(!1);let e=x.useContext(Zm),{basename:t,future:n,navigator:r}=x.useContext(ai),{matches:s}=x.useContext(li),{pathname:i}=Ro(),o=JSON.stringify(ES(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return NS(()=>{a.current=!0}),x.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let h=CS(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:is([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function _S(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(ai),{matches:s}=x.useContext(li),{pathname:i}=Ro(),o=JSON.stringify(ES(s,r.v7_relativeSplatPath));return x.useMemo(()=>CS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function KI(e,t){return GI(e,t)}function GI(e,t,n,r){gl()||Ke(!1);let{navigator:s}=x.useContext(ai),{matches:i}=x.useContext(li),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Ro(),d;if(t){var h;let b=typeof t=="string"?_o(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||Ke(!1),d=b}else d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let b=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=bI(e,{pathname:m}),y=ZI(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:is([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:is([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&y?x.createElement(ed.Provider,{value:{location:qa({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Gr.Pop}},y):y}function YI(){let e=rD(),t=VI(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const QI=x.createElement(YI,null);class JI extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(li.Provider,{value:this.props.routeContext},x.createElement(TS.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function XI(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(Zm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(li.Provider,{value:t},r)}function ZI(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||Ke(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:m}=n,w=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||w){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let m,w=!1,y=null,b=null;n&&(m=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||QI,c&&(u<0&&f===0?(w=!0,b=null):u===f&&(w=!0,b=h.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,f+1)),g=()=>{let p;return m?p=y:w?p=b:h.route.Component?p=x.createElement(h.route.Component,null):h.route.element?p=h.route.element:p=d,x.createElement(XI,{match:h,routeC
329ontext:{outlet:d,matches:v,isDataRoute:n!=null},children:p})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?x.createElement(JI,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var RS=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(RS||{}),du=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(du||{});function eD(e){let t=x.useContext(Zm);return t||Ke(!1),t}function tD(e){let t=x.useContext(zI);return t||Ke(!1),t}function nD(e){let t=x.useContext(li);return t||Ke(!1),t}function PS(e){let t=nD(),n=t.matches[t.matches.length-1];return n.route.id||Ke(!1),n.route.id}function rD(){var e;let t=x.useContext(TS),n=tD(du.UseRouteError),r=PS(du.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function sD(){let{router:e}=eD(RS.UseNavigateStable),t=PS(du.UseNavigateStable),n=x.useRef(!1);return NS(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,qa({fromRouteId:t},i)))},[e,t])}function iD(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Tc(e){Ke(!1)}function oD(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Gr.Pop,navigator:i,static:o=!1,future:a}=e;gl()&&Ke(!1);let c=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:c,navigator:i,static:o,future:qa({v7_relativeSplatPath:!1},a)}),[c,a,i,o]);typeof r=="string"&&(r=_o(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:w="default"}=r,y=x.useMemo(()=>{let b=Xm(d,c);return b==null?null:{location:{pathname:b,search:h,hash:f,state:m,key:w},navigationType:s}},[c,d,h,f,m,w,s]);return y==null?null:x.createElement(ai.Provider,{value:u},x.createElement(ed.Provider,{children:n,value:y}))}function aD(e){let{children:t,location:n}=e;return KI(Gf(t),n)}new Promise(()=>{});function Gf(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,Gf(r.props.children,i));return}r.type!==Tc&&Ke(!1),!r.props.index||!r.props.children||Ke(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Gf(r.props.children,i)),n.push(o)}),n}/**
330 * React Router DOM v6.30.1
331 *
332 * Copyright (c) Remix Software Inc.
333 *
334 * This source code is licensed under the MIT license found in the
335 * LICENSE.md file in the root directory of this source tree.
336 *
337 * @license MIT
338 */function Yf(){return Yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yf.apply(this,arguments)}function lD(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function cD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uD(e,t){return e.button===0&&(!t||t==="_self")&&!cD(e)}const dD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],hD="6";try{window.__reactRouterVersion=hD}catch{}const fD="startTransition",rx=$p[fD];function pD(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=vI({window:s,v5Compat:!0}));let o=i.current,[a,c]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=x.useCallback(h=>{u&&rx?rx(()=>c(h)):c(h)},[c,u]);return x.useLayoutEffect(()=>o.listen(d),[o,d]),x.useEffect(()=>iD(r),[r]),x.createElement(oD,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const mD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Li=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=lD(t,dD),{basename:m}=x.useContext(ai),w,y=!1;if(typeof u=="string"&&gD.test(u)&&(w=u,mD))try{let p=new URL(window.location.href),S=u.startsWith("//")?new URL(p.protocol+u):new URL(u),k=Xm(S.pathname,m);S.origin===p.origin&&k!=null?u=k+S.search+S.hash:y=!0}catch{}let b=WI(u,{relative:s}),v=yD(u,{replace:o,state:a,target:c,preventScrollReset:d,relative:s,viewTransition:h});function g(p){r&&r(p),p.defaultPrevented||v(p)}return x.createElement("a",Yf({},f,{href:w||b,onClick:y||i?r:g,ref:n,target:c}))});var sx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(sx||(sx={}));var ix;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ix||(ix={}));function yD(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,c=HI(),u=Ro(),d=_S(e,{relative:o});return x.useCallback(h=>{if(uD(h,n)){h.preventDefault();let f=r!==void 0?r:uu(u)===uu(d);c(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,c,d,r,s,n,e,i,o,a])}const vD=()=>{const{pathname:e}=Ro();return x.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[e]),null},eg=x.createContext({});function tg(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const AS=typeof window<"u",OS=AS?x.useLayoutEffect:x.useEffect,td=x.createContext(null);function ng(e,t){e.indexOf(t)===-1&&e.push(t)}function rg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Jn=(e,t,n)=>n>t?t:n<e?e:n;let nd=()=>{},wo=()=>{};const xr={}
vendor: 9,128 bytes, line 338
338,IS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function DS(e){return typeof e=="object"&&e!==null}const MS=e=>/^0[^.\s]+$/u.test(e);function sg(e){let t;return()=>(t===void 0&&(t=e()),t)}const rn=e=>e,xD=(e,t)=>n=>t(e(n)),yl=(...e)=>e.reduce(xD),Ka=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ig{constructor(){this.subscriptions=[]}add(t){return ng(this.subscriptions,t),()=>rg(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wn=e=>e*1e3,tn=e=>e/1e3;function LS(e,t){return t?e*(1e3/t):0}const $S=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,wD=1e-7,bD=12;function kD(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=$S(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>wD&&++a<bD);return o}function vl(e,t,n,r){if(e===t&&n===r)return rn;const s=i=>kD(i,0,1,e,n);return i=>i===0||i===1?i:$S(s(i),t,r)}const BS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,FS=e=>t=>1-e(1-t),VS=vl(.33,1.53,.69,.99),og=FS(VS),US=BS(og),zS=e=>(e*=2)<1?.5*og(e):.5*(2-Math.pow(2,-10*(e-1))),ag=e=>1-Math.sin(Math.acos(e)),WS=FS(ag),HS=BS(ag),SD=vl(.42,0,1,1),ED=vl(0,0,.58,1),qS=vl(.42,0,.58,1),CD=e=>Array.isArray(e)&&typeof e[0]!="number",KS=e=>Array.isArray(e)&&typeof e[0]=="number",ox={linear:rn,easeIn:SD,easeInOut:qS,easeOut:ED,circIn:ag,circInOut:HS,circOut:WS,backIn:og,backInOut:US,backOut:VS,anticipate:zS},jD=e=>typeof e=="string",ax=e=>{if(KS(e)){wo(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return vl(t,n,r,s)}else if(jD(e))return wo(ox[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ox[e];return e},Yl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],lx={value:null,addProjectionMetrics:null};function TD(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(a)}const d={schedule:(h,f=!1,m=!1)=>{const y=m&&s?n:r;return f&&o.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(a=h,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),t&&lx.value&&lx.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const ND=40;function GS(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Yl.reduce((p,S)=>(p[S]=TD(i,t?S:void 0),p),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:m,postRender:w}=o,y=()=>{const p=xr.useManualTiming?s.timestamp:performance.now();n=!1,xr.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(p-s.timestamp,ND),1)),s.timestamp=p,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),m.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},b=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:Yl.reduce((p,S)=>{const k=o[S];return p[S]=(E,C=!1,j=!1)=>(n||b(),k.schedule(E,C,j)),p},{}),cancel:p=>{for(let S=0;S<Yl.length;S++)o[Yl[S]].cancel(p)},state:s,steps:o}}const{schedule:_e,cancel:hs,state:ot,steps:rh}=GS(typeof requestAnimationFrame<"u"?requestAnimationFrame:rn,!0);let Nc;function _D(){Nc=void 0}const Et={now:()=>(Nc===void 0&&Et.set(ot.isProcessing||xr.useManualTiming?ot.timestamp:performance.now()),Nc),set:e=>{Nc=e,queueMicrotask(_D)}},YS=e=>t=>typeof t=="string"&&t.startsWith(e),QS=YS("--"),RD=YS("var(--"),lg=e=>RD(e)?PD.test(e.split("/*")[0].trim()):!1,PD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Po={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ga={...Po,transform:e=>Jn(0,1,e)},Ql={...Po,default:1},ya=e=>Math.round(e*1e5)/1e5,cg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AD(e){return e==null}const OD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ug=(e,t)=>n=>!!(typeof n=="string"&&OD.test(n)&&n.startsWith(e)||t&&!AD(n)&&Object.prototype.hasOwnProperty.call(n,t)),JS=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(cg);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ID=e=>Jn(0,255,e),sh={...Po,transform:e=>Math.round(ID(e))},Ds={test:ug("rgb","red"),parse:JS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sh.transform(e)+", "+sh.transform(t)+", "+sh.transform(n)+", "+ya(Ga.transform(r))+")"};function DD(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Qf={test:ug("#"),parse:DD,transform:Ds.transform},xl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ar=xl("deg"),Hn=xl("%"),G=xl("px"),MD=xl("vh"),LD=xl("vw"),ux={...Hn,parse:e=>Hn.parse(e)/100,transform:e=>Hn.transform(e*100)},$i={test:ug("hsl","hue"),parse:JS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hn.transform(ya(t))+", "+Hn.transform(ya(n))+", "+ya(Ga.transform(r))+")"},He={test:e=>Ds.test(e)||Qf.test(e)||$i.test(e),parse:e=>Ds.test(e)?Ds.parse(e):$i.test(e)?$i.parse(e):Qf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ds.transform(e):$i.transform(e),getAnimatableNone:e=>{const t=He.parse(e);return t.alpha=0,He.transform(t)}},$D=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function BD(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(cg))==null?void 0:t.length)||0)+(((n=e.match($D))==null?void 0:n.length)||0)>0}const XS="number",ZS="color",FD="var",VD="var(",dx="${}",UD=/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 Ya(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(UD,c=>(He.test(c)?(r.color.push(i),s.push(ZS),n.push(He.parse(c))):c.startsWith(VD)?(r.var.push(i),s.push(FD),n.push(c)):(r.number.push(i),s.push(XS),n.push(parseFloat(c))),++i,dx)).split(dx);return{values:n,split:a,indexes:r,types:s}}function eE(e){return Ya(e).values}function tE(e){const{split:t,types:n}=Ya(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===XS?i+=ya(s[o]):a===ZS?i+=He.transform(s[o]):i+=s[o]}return i}}const zD=e=>typeof e=="number"?0:He.test(e)?He.getAnimatableNone(e):e;function WD(e){const t=eE(e);return tE(e)(t.map(zD))}const fs={test:BD,parse:eE,createTransformer:tE,getAnimatableNone:WD};function ih(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 HD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=ih(c,a,e+1/3),i=ih(c,a,e),o=ih(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function hu(e,t){return n=>n>0?t:e}const Le=(e,t,n)=>e+(t-e)*n,oh=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},qD=[Qf,Ds,$i],KD=e=>qD.find(t=>t.test(e));function hx(e){const t=KD(e);if(nd(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===$i&&(n=HD(n)),n}const fx=(e,t)=>{const n=hx(e),r=hx(t);if(!n||!r)return hu(e,t);const s={...n};return i=>(s.red=oh(n.red,r.red,i),s.green=oh(n.green,r.green,i),s.blue=oh(n.blue,r.blue,i),s.alpha=Le(n.alpha,r.alpha,i),Ds.transform(s))},Jf=new Set(["none","hidden"]);function GD(e,t){return Jf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YD(e,t){return n=>Le(e,t,n)}function dg(e){return typeof e=="number"?YD:typeof e=="string"?lg(e)?hu:He.test(e)?fx:XD:Array.isArray(e)?nE:typeof e=="object"?He.test(e)?fx:QD:hu}function nE(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>dg(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function QD(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=dg(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function JD(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const XD=(e,t)=>{const n=fs.createTransformer(t),r=Ya(e),s=Ya(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Jf.has(e)&&!s.values.length||Jf.has(t)&&!r.values.length?GD(e,t):yl(nE(JD(r,s),s.values),n):(nd(!0,`Complex values '${e}' and '${t}
338' 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.`,"complex-values-different"),hu(e,t))};function rE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Le(e,t,n):dg(e)(e,t)}const ZD=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_e.update(t,n),stop:()=>hs(t),now:()=>ot.isProcessing?ot.timestamp:Et.now()}},sE=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},fu=2e4;function hg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<fu;)t+=n,r=e.next(t);return t>=fu?1/0:t}function eM(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(hg(r),fu);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:tn(s)}}const tM=5;function iE(e,t,n){const r=Math.max(t-tM,0);return LS(n-e(r),t-r)}const De={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},ah=.001;function nM({duration:e=De.duration,bounce:t=De.bounce,velocity:n=De.velocity,mass:r=De.mass}){let s,i;nd(e<=Wn(De.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Jn(De.minDamping,De.maxDamping,o),e=Jn(De.minDuration,De.maxDuration,tn(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,m=Xf(u,o),w=Math.exp(-h);return ah-f/m*w},i=u=>{const h=u*o*e,f=h*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,w=Math.exp(-h),y=Xf(Math.pow(u,2),o);return(-s(u)+ah>0?-1:1)*((f-m)*w)/y}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-ah+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const a=5/e,c=sM(s,i,a);if(e=Wn(e),isNaN(c))return{stiffness:De.stiffness,damping:De.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const rM=12;function sM(e,t,n){let r=n;for(let s=1;s<rM;s++)r=r-e(r)/t(r);return r}function Xf(e,t){return e*Math.sqrt(1-t*t)}const iM=["duration","bounce"],oM=["stiffness","damping","mass"];function px(e,t){return t.some(n=>e[n]!==void 0)}function aM(e){let t={velocity:De.velocity,stiffness:De.stiffness,damping:De.damping,mass:De.mass,isResolvedFromDuration:!1,...e};if(!px(e,oM)&&px(e,iM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Jn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:De.mass,stiffness:s,damping:i}}else{const n=nM(e);t={...t,...n,mass:De.mass},t.isResolvedFromDuration=!0}return t}function pu(e=De.visualDuration,t=De.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=aM({...n,velocity:-tn(n.velocity||0)}),w=f||0,y=u/(2*Math.sqrt(c*d)),b=o-i,v=tn(Math.sqrt(c/d)),g=Math.abs(b)<5;r||(r=g?De.restSpeed.granular:De.restSpeed.default),s||(s=g?De.restDelta.granular:De.restDelta.default);let p;if(y<1){const k=Xf(v,y);p=E=>{const C=Math.exp(-y*v*E);return o-C*((w+y*v*b)/k*Math.sin(k*E)+b*Math.cos(k*E))}}else if(y===1)p=k=>o-Math.exp(-v*k)*(b+(w+v*b)*k);
vendor: 15,836 bytes, line 338
338else{const k=v*Math.sqrt(y*y-1);p=E=>{const C=Math.exp(-y*v*E),j=Math.min(k*E,300);return o-C*((w+y*v*b)*Math.sinh(j)+k*b*Math.cosh(j))/k}}const S={calculatedDuration:m&&h||null,next:k=>{const E=p(k);if(m)a.done=k>=h;else{let C=k===0?w:0;y<1&&(C=k===0?Wn(w):iE(p,k,E));const j=Math.abs(C)<=r,_=Math.abs(o-E)<=s;a.done=j&&_}return a.value=a.done?o:E,a},toString:()=>{const k=Math.min(hg(S),fu),E=sE(C=>S.next(k*C).value,k,30);return k+"ms "+E},toTransition:()=>{}};return S}pu.applyToOptions=e=>{const t=eM(e,100,pu);return e.ease=t.ease,e.duration=Wn(t.duration),e.type="keyframes",e};function Zf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=j=>a!==void 0&&j<a||c!==void 0&&j>c,w=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let y=n*t;const b=h+y,v=o===void 0?b:o(b);v!==b&&(y=v-h);const g=j=>-y*Math.exp(-j/r),p=j=>v+g(j),S=j=>{const _=g(j),P=p(j);f.done=Math.abs(_)<=u,f.value=f.done?v:P};let k,E;const C=j=>{m(f.value)&&(k=j,E=pu({keyframes:[f.value,w(f.value)],velocity:iE(p,j,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:j=>{let _=!1;return!E&&k===void 0&&(_=!0,S(j),C(j)),k!==void 0&&j>=k?E.next(j-k):(!_&&S(j),f)}}}function lM(e,t,n){const r=[],s=n||xr.mix||rE,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||rn:t;a=yl(c,a)}r.push(a)}return r}function cM(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(wo(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=lM(t,r,s),c=a.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Ka(e[h],e[h+1],d);return a[h](f)};return n?d=>u(Jn(e[0],e[i-1],d)):u}function uM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Ka(0,t,r);e.push(Le(n,1,s))}}function dM(e){const t=[0];return uM(t,e.length-1),t}function hM(e,t){return e.map(n=>n*t)}function fM(e,t){return e.map(()=>t||qS).splice(0,e.length-1)}function va({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=CD(r)?r.map(ax):ax(r),i={done:!1,value:t[0]},o=hM(n&&n.length===t.length?n:dM(t),e),a=cM(o,t,{ease:Array.isArray(s)?s:fM(t,s)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const pM=e=>e!==null;function fg(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(pM),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const mM={decay:Zf,inertia:Zf,tween:va,keyframes:va,spring:pu};function oE(e){typeof e.type=="string"&&(e.type=mM[e.type])}class pg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const gM=e=>e/100;class mg extends pg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Et.now()&&this.tick(Et.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;oE(t);const{type:n=va,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=n||va;c!==va&&typeof a[0]!="number"&&(this.mixKeyframes=yl(gM,rE(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=hg(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:m,type:w,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let p=this.currentTime,S=r;if(h){const j=Math.min(this.currentTime,s)/a;let _=Math.floor(j),P=j%1;!P&&j>=1&&(P=1),P===1&&_--,_=Math.min(_,h+1),!!(_%2)&&(f==="reverse"?(P=1-P,m&&(P-=m/a)):f==="mirror"&&(S=o)),p=Jn(0,1,P)*a}const k=g?{done:!1,value:d[0]}:S.next(p);i&&(k.value=i(k.value));let{done:E}=k;!g&&c!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&w!==Zf&&(k.value=fg(d,this.options,b,this.speed)),y&&y(k.value),C&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tn(t)}get time(){return tn(this.currentTime)}set time(t){var n;t=Wn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Et.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=tn(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=ZD,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Et.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function yM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ms=e=>e*180/Math.PI,ep=e=>{const t=Ms(Math.atan2(e[1],e[0]));return tp(t)},vM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ep,rotateZ:ep,skewX:e=>Ms(Math.atan(e[1])),skewY:e=>Ms(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tp=e=>(e=e%360,e<0&&(e+=360),e),mx=ep,gx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gx,scaleY:yx,scale:e=>(gx(e)+yx(e))/2,rotateX:e=>tp(Ms(Math.atan2(e[6],e[5]))),rotateY:e=>tp(Ms(Math.atan2(-e[2],e[0]))),rotateZ:mx,rotate:mx,skewX:e=>Ms(Math.atan(e[4])),skewY:e=>Ms(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function np(e){return e.includes("scale")?1:0}function rp(e,t){if(!e||e==="none")return np(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=xM,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=vM,s=a}if(!s)return np(t);const i=r[t],o=s[1].split(",").map(bM);return typeof i=="function"?i(o):o[i]}const wM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return rp(n,t)};function bM(e){return parseFloat(e.trim())}const Ao=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oo=new Set(Ao),vx=e=>e===Po||e===G,kM=new Set(["x","y","z"]),SM=Ao.filter(e=>!kM.has(e));function EM(e){const t=[];return SM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Yr={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:(e,{transform:t})=>rp(t,"x"),y:(e,{transform:t})=>rp(t,"y")};Yr.translateX=Yr.x;Yr.translateY=Yr.y;const Ks=new Set;let sp=!1,ip=!1,op=!1;function aE(){if(ip){const e=Array.from(Ks).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=EM(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ip=!1,sp=!1,Ks.forEach(e=>e.complete(op)),Ks.clear()}function lE(){Ks.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ip=!0)})}function CM(){op=!0,lE(),aE(),op=!1}class gg{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ks.add(this),sp||(sp=!0,_e.read(lE),_e.resolveKeyframes(aE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}yM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ks.delete(this)}cancel(){this.state==="scheduled"&&(Ks.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const jM=e=>e.startsWith("--");function TM(e,t,n){jM(t)?e.style.setProperty(t,n):e.style[t]=n}const NM=sg(()=>window.ScrollTimeline!==void 0),_M={};function RM(e,t){const n=sg(e);return()=>_M[t]??n()}const cE=RM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ra=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,xx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ra([0,.65,.55,1]),circOut:ra([.55,0,1,.45]),backIn:ra([.31,.01,.66,-.59]),backOut:ra([.33,1.53,.69,.99])};function uE(e,t){if(e)return typeof e=="function"?cE()?sE(e,t):"ease-out":KS(e)?ra(e):Array.isArray(e)?e.map(n=>uE(n,t)||xx.easeOut):xx[e]}function PM(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=uE(a,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function dE(e){return typeof e=="function"&&"applyToOptions"in e}function AM({type:e,...t}){return dE(e)&&cE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OM extends pg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,wo(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=AM(t);this.animation=PM(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=fg(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):TM(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+tn(t)}get time(){return tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&NM()?(this.animation.timeline=t,rn):n(this)}}const hE={anticipate:zS,backInOut:US,circInOut:HS};function IM(e){return e in hE}function DM(e){typeof e.ease=="string"&&IM(e.ease)&&(e.ease=hE[e.ease])}const lh=10;class MM extends OM{constructor(t){DM(t),oE(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new mg({...o,autoplay:!1}),c=Math.max(lh,Et.now()-this.startTime),u=Jn(0,lh,c-lh);n.setWithVelocity(a.sample(Math.max(0,c-u)).value,a.sample(c).value,u),a.stop()}}const wx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fs.test(e)||e==="0")&&!e.startsWith("url("));function LM(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 $M(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=wx(s,t),a=wx(i,t);return nd(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:LM(e)||(n==="spring"||dE(n))&&r}function ap(e){e.duration=0,e.type="keyframes"}const BM=new Set(["opacity","clipPath","filter","transform"]),FM=sg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));
338function VM(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return FM()&&n&&BM.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const UM=40;class zM extends pg{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:d,...h}){var w;super(),this.stop=()=>{var y,b;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Et.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||gg;this.keyframeResolver=new m(a,(y,b,v)=>this.onKeyframesResolved(y,b,f,!v),c,u,d),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Et.now(),$M(t,i,o,a)||((xr.instantAnimations||!c)&&(d==null||d(fg(t,r,n))),t[0]=t[t.length-1],ap(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>UM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!u&&VM(f)?new MM({...f,element:f.motionValue.owner.current}):new mg(f);m.finished.then(()=>this.notifyFinished()).catch(rn),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),CM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const WM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HM(e){const t=WM.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const qM=4;function fE(e,t,n=1){wo(n<=qM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=HM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return IS(o)?parseFloat(o):o}return lg(s)?fE(s,t,n+1):s}function yg(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const KM={type:"spring",stiffness:500,damping:25,restSpeed:10},GM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YM={type:"keyframes",duration:.8},QM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},JM=(e,{keyframes:t})=>t.length>2?YM:Oo.has(e)?e.startsWith("scale")?GM(t[1]):KM:QM;function XM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const ZM=e=>e!==null;function eL(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(ZM),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function pE(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const vg=(e,t,n,r={},s,i)=>o=>{const a=yg(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Wn(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};XM(a)||Object.assign(d,JM(e,d)),d.duration&&(d.duration=Wn(d.duration)),d.repeatDelay&&(d.repeatDelay=Wn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ap(d),d.delay===0&&(h=!0)),(xr.instantAnimations||xr.skipAnimations)&&(h=!0,ap(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const f=eL(d.keyframes,a);if(f!==void 0){_e.update(()=>{d.onUpdate(f),d.onComplete()});return}}return a.isSync?new mg(d):new zM(d)},mE=new Set(["width","height","top","left","right","bottom",...Ao]),bx=30,tL=e=>!isNaN(parseFloat(e));
vendor: 20,740 bytes, line 338
338class nL{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Et.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Et.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tL(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ig);const r=this.events[t].add(n);return t==="change"?()=>{r(),_e.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Et.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bx);return LS(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bo(e,t){return new nL(e,t)}function kx(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xg(e,t,n,r){if(typeof t=="function"){const[s,i]=kx(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=kx(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Zi(e,t,n){const r=e.getProps();return xg(r,t,n!==void 0?n:r.custom,e)}const lp=e=>Array.isArray(e);function rL(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bo(n))}function sL(e){return lp(e)?e[e.length-1]||0:e}function iL(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=sL(i[o]);rL(e,o,a)}}const pt=e=>!!(e&&e.getVelocity);function oL(e){return!!(pt(e)&&e.add)}function cp(e,t){const n=e.getValue("willChange");if(oL(n))return n.add(t);if(!n&&xr.WillChange){const r=new xr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function wg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const aL="framerAppearId",gE="data-"+wg(aL);function yE(e){return e.props[gE]}function lL({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vE(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(i=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in a){const h=e.getValue(d,e.latestValues[d]??null),f=a[d];if(f===void 0||u&&lL(u,d))continue;const m={delay:n,...yg(i||{},d)},w=h.get();if(w!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===w&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const v=yE(e);if(v){const g=window.MotionHandoffAnimation(v,d,_e);g!==null&&(m.startTime=g,y=!0)}}cp(e,d),h.start(vg(d,h,f,e.shouldReduceMotion&&mE.has(d)?{type:!1}:m,e,y));const b=h.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{_e.update(()=>{o&&iL(e,o)})}),c}function up(e,t,n={}){var c;const r=Zi(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(vE(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return cL(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function cL(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(up(c,t,{...o,delay:n+(typeof r=="function"?0:r)+pE(e.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function uL(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>up(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=up(e,t,n);else{const s=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(vE(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const dL={test:e=>e==="auto",parse:e=>e},xE=e=>t=>t.test(e),wE=[Po,G,Hn,Ar,LD,MD,dL],Sx=e=>wE.find(xE(e));function hL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||MS(e):!0}const fL=new Set(["brightness","contrast","saturate","opacity"]);function pL(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cg)||[];if(!r)return e;const s=n.replace(r,"");let i=fL.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const mL=/\b([a-z-]*)\(.*?\)/gu,dp={...fs,getAnimatableNone:e=>{const t=e.match(mL);return t?t.map(pL).join(" "):e}},Ex={...Po,transform:Math.round},gL={rotate:Ar,rotateX:Ar,rotateY:Ar,rotateZ:Ar,scale:Ql,scaleX:Ql,scaleY:Ql,scaleZ:Ql,skew:Ar,skewX:Ar,skewY:Ar,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Ga,originX:ux,originY:ux,originZ:G},bg={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,backgroundPositionX:G,backgroundPositionY:G,...gL,zIndex:Ex,fillOpacity:Ga,strokeOpacity:Ga,numOctaves:Ex},yL={...bg,color:He,backgroundColor:He,outlineColor:He,fill:He,stroke:He,borderColor:He,borderTopColor:He,borderRightColor:He,borderBottomColor:He,borderLeftColor:He,filter:dp,WebkitFilter:dp},bE=e=>yL[e];function kE(e,t){let n=bE(e);return n!==dp&&(n=fs),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vL=new Set(["auto","none","0"]);function xL(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!vL.has(i)&&Ya(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=kE(n,s)}class wL extends gg{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),lg(h))){const f=fE(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!mE.has(r)||t.length!==2)return;const[s,i]=t,o=Sx(s),a=Sx(i),c=cx(s),u=cx(i);if(c!==u&&Yr[r]){this.needsMeasurement=!0;return}if(o!==a)if(vx(o)&&vx(a))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Yr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||hL(t[s]))&&r.push(s);r.length&&xL(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=Yr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Yr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function bL(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const SE=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function EE(e){return DS(e)&&"offsetHeight"in e}const{schedule:kg,cancel:VU}=GS(queueMicrotask,!1),pn={x:!1,y:!1};function CE(){return pn.x||pn.y}function kL(e){return e==="x"||e==="y"?pn[e]?null:(pn[e]=!0,()=>{pn[e]=!1}):pn.x||pn.y?null:(pn.x=pn.y=!0,()=>{pn.x=pn.y=!1})}function jE(e,t){const n=bL(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Cx(e){return!(e.pointerType==="touch"||CE())}function SL(e,t,n={}){const[r,s,i]=jE(e,n),o=a=>{if(!Cx(a))return;const{target:c}=a,u=t(c,a);if(typeof u!="function"||!c)return;const d=h=>{Cx(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const TE=(e,t)=>t?e===t?!0:TE(e,t.parentElement):!1,Sg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,EL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function NE(e){return EL.has(e.tagName)||e.isContentEditable===!0}const _c=new WeakSet;function jx(e){return t=>{t.key==="Enter"&&e(t)}}function ch(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const CL=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=jx(()=>{if(_c.has(n))return;ch(n,"down");const s=jx(()=>{ch(n,"up")}),i=()=>ch(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Tx(e){return Sg(e)&&!CE()}function jL(e,t,n={}){const[r,s,i]=jE(e,n),o=a=>{const c=a.currentTarget;if(!Tx(a))return;_c.add(c);const u=t(c,a),d=(m,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),_c.has(c)&&_c.delete(c),Tx(m)&&typeof u=="function"&&u(m,{success:w})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||TE(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),EE(a)&&(a.addEventListener("focus",u=>CL(u,s)),!NE(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function _E(e){return DS(e)&&"ownerSVGElement"in e}function TL(e){return _E(e)&&e.tagName==="svg"}const NL=[...wE,He,fs],_L=e=>NL.find(xE(e)),Nx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bi=()=>({x:Nx(),y:Nx()}),_x=()=>({min:0,max:0}),Ye=()=>({x:_x(),y:_x()}),hp={current:null},RE={current:!1},RL=typeof window<"u";function PL(){if(RE.current=!0,!!RL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hp.current=e.matches;e.addEventListener("change",t),t()}else hp.current=!1}const AL=new WeakMap;function rd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qa(e){return typeof e=="string"||Array.isArray(e)}const Eg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cg=["initial",...Eg];function sd(e){return rd(e.animate)||Cg.some(t=>Qa(e[t]))}function PE(e){return!!(sd(e)||e.variants)}function OL(e,t,n){for(const r in t){const s=t[r],i=n[r];if(pt(s))e.addValue(r,s);else if(pt(i))e.addValue(r,bo(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,bo(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Rx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let mu={};function AE(e){mu=e}function IL(){return mu}class DL{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gg,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 f=Et.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,_e.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=sd(n),this.isVariantNode=PE(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&pt(m)&&m.set(c[f])}}mount(t){var n;this.current=t,AL.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((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(RE.current||PL(),this.shouldReduceMotion=hp.current),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),hs(this.notifyUpdate),hs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Oo.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 mu){const n=mu[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(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):Ye()}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<Rx.length;r++){const s=Rx[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=OL(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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=bo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(IS(r)||MS(r))?r=parseFloat(r):!_L(r)&&fs.test(n)&&(r=kE(t,n)),this.setBaseTarget(t,pt(r)?r.get():r)),pt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=xg(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!pt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ig),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){kg.render(this.render)}}class vs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class OE extends DL{constructor(){super(...arguments),this.KeyframeResolver=wL}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[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;pt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function IE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ML({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LL(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 uh(e){return e===void 0||e===1}function fp({scale:e,scaleX:t,scaleY:n}){return!uh(e)||!uh(t)||!uh(n)}function Ts(e){return fp(e)||DE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function DE(e){return Px(e.x)||Px(e.y)}function Px(e){return e&&e!=="0%"}function gu(e,t,n){const r=e-n,s=t*r;return n+s}
vendor: 2,001 bytes, line 338
338function Ax(e,t,n,r,s){return s!==void 0&&(e=gu(e,s,r)),gu(e,n,r)+t}function pp(e,t=0,n=1,r,s){e.min=Ax(e.min,t,n,r,s),e.max=Ax(e.max,t,n,r,s)}function ME(e,{x:t,y:n}){pp(e.x,t.translate,t.scale,t.originPoint),pp(e.y,n.translate,n.scale,n.originPoint)}const Ox=.999999999999,Ix=1.0000000000001;function $L(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Vi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ME(e,o)),r&&Ts(i.latestValues)&&Vi(e,i.latestValues))}t.x<Ix&&t.x>Ox&&(t.x=1),t.y<Ix&&t.y>Ox&&(t.y=1)}function Fi(e,t){e.min=e.min+t,e.max=e.max+t}function Dx(e,t,n,r,s=.5){const i=Le(e.min,e.max,s);pp(e,t,n,i,r)}function Vi(e,t){Dx(e.x,t.x,t.scaleX,t.scale,t.originX),Dx(e.y,t.y,t.scaleY,t.scale,t.originY)}function LE(e,t){return IE(LL(e.getBoundingClientRect(),t))}function BL(e,t,n){const r=LE(e,n),{scroll:s}=t;return s&&(Fi(r.x,s.offset.x),Fi(r.y,s.offset.y)),r}const FL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VL=Ao.length;function UL(e,t,n){let r="",s=!0;for(let i=0;i<VL;i++){const o=Ao[i],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const u=SE(a,bg[o]);if(!c){s=!1;const d=FL[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function jg(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(Oo.has(c)){o=!0;continue}else if(QS(c)){s[c]=u;continue}else{const d=SE(u,bg[c]);c.startsWith("origin")?(a=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=UL(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}function $E(e,{style:t,vars:n},r,s){const i=e.style;let o;
vendor: 5,911 bytes, line 338
338for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Mx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Mx(e,t.target.x),r=Mx(e,t.target.y);return`${n}% ${r}%`}},zL={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=fs.parse(e);if(s.length>5)return r;const i=fs.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const u=Le(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},mp={borderRadius:{...Xo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xo,borderTopRightRadius:Xo,borderBottomLeftRadius:Xo,borderBottomRightRadius:Xo,boxShadow:zL};function BE(e,{layout:t,layoutId:n}){return Oo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mp[e]||e==="opacity")}function Tg(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(pt(r[a])||s&&pt(s[a])||BE(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function WL(e){return window.getComputedStyle(e)}class HL extends OE{constructor(){super(...arguments),this.type="html",this.renderInstance=$E}readValueFromInstance(t,n){var r;if(Oo.has(n))return(r=this.projection)!=null&&r.isProjecting?np(n):wM(t,n);{const s=WL(t),i=(QS(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return LE(t,n)}build(t,n,r){jg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Tg(t,n,r)}}const qL={offset:"stroke-dashoffset",array:"stroke-dasharray"},KL={offset:"strokeDashoffset",array:"strokeDasharray"};function GL(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?qL:KL;e[i.offset]=G.transform(-r);const o=G.transform(t),a=G.transform(n);e[i.array]=`${o} ${a}`}const YL=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function FE(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,u,d){if(jg(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of YL)h[m]!==void 0&&(f[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&GL(h,s,i,o,!1)}const VE=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"]),UE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function QL(e,t,n,r){$E(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(VE.has(s)?s:wg(s),t.attrs[s])}function zE(e,t,n){const r=Tg(e,t,n);for(const s in e)if(pt(e[s])||pt(t[s])){const i=Ao.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class JL extends OE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oo.has(n)){const r=bE(n);return r&&r.default||0}return n=VE.has(n)?n:wg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return zE(t,n,r)}build(t,n,r){FE(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){QL(t,n,r,s)}mount(t){this.isSVGTag=UE(t.tagName),super.mount(t)}}const XL=Cg.length;function WE(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?WE(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<XL;n++){const r=Cg[n],s=e.props[r];(Qa(s)||s===!1)&&(t[r]=s)}return t}function HE(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 ZL=[...Eg].reverse(),e$=Eg.length;function t$(e){return t=>Promise.all(t.map(({animation:n,options:r})=>uL(e,n,r)))}function n$(e){let t=t$(e),n=Lx(),r=!0;const s=c=>(u,d)=>{var f;const h=Zi(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:w,...y}=h;u={...u,...y,...w}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,d=WE(e.parent)||{},h=[],f=new Set;let m={},w=1/0;for(let b=0;b<e$;b++){const v=ZL[b],g=n[v],p=u[v]!==void 0?u[v]:d[v],S=Qa(p),k=v===c?g.isActive:null;k===!1&&(w=b);let E=p===d[v]&&p!==u[v]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),g.protectedKeys={...m},!g.isActive&&k===null||!p&&!g.prevProp||rd(p)||typeof p=="boolean")continue;const C=r$(g.prevProp,p);let j=C||v===c&&g.isActive&&!E&&S||b>w&&S,_=!1;const P=Array.isArray(p)?p:[p];let M=P.reduce(s(v),{});k===!1&&(M={});const{prevResolvedValues:A={}}=g,z={...A,...M},T=V=>{j=!0,f.has(V)&&(_=!0,f.delete(V)),g.needsAnimating[V]=!0;const N=e.getValue(V);N&&(N.liveStyle=!1)};for(const V in z){const N=M[V],R=A[V];if(m.hasOwnProperty(V))continue;let $=!1;lp(N)&&lp(R)?$=!HE(N,R):$=N!==R,$?N!=null?T(V):f.add(V):N!==void 0&&f.has(V)?T(V):g.protectedKeys[V]=!0}g.prevProp=p,g.prevResolvedValues=M,g.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(j=!1);const F=E&&C;j&&(!F||_)&&h.push(...P.map(V=>{const N={type:v};if(typeof V=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,$=Zi(R,V);if(R.enteringChildren&&$){const{delayChildren:O}=$.transition||{};N.delay=pE(R.enteringChildren,e,O)}}return{animation:V,options:N}}))}
vendor: 4,225 bytes, line 338
338if(f.size){const b={};if(typeof u.initial!="boolean"){const v=Zi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const g=e.getBaseTarget(v),p=e.getValue(v);p&&(p.liveStyle=!0),b[v]=g??null}),h.push({animation:b})}let y=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(h):Promise.resolve()}function a(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Lx()}}}function r$(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HE(t,e):!1}function ks(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lx(){return{animate:ks(!0),whileInView:ks(),whileHover:ks(),whileTap:ks(),whileDrag:ks(),whileFocus:ks(),exit:ks()}}const qE=1e-4,s$=1-qE,i$=1+qE,KE=.01,o$=0-KE,a$=0+KE;function Ct(e){return e.max-e.min}function l$(e,t,n){return Math.abs(e-t)<=n}function $x(e,t,n,r=.5){e.origin=r,e.originPoint=Le(t.min,t.max,e.origin),e.scale=Ct(n)/Ct(t),e.translate=Le(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s$&&e.scale<=i$||isNaN(e.scale))&&(e.scale=1),(e.translate>=o$&&e.translate<=a$||isNaN(e.translate))&&(e.translate=0)}function xa(e,t,n,r){$x(e.x,t.x,n.x,r?r.originX:void 0),$x(e.y,t.y,n.y,r?r.originY:void 0)}function Bx(e,t,n){e.min=n.min+t.min,e.max=e.min+Ct(t)}function c$(e,t,n){Bx(e.x,t.x,n.x),Bx(e.y,t.y,n.y)}function Fx(e,t,n){e.min=t.min-n.min,e.max=e.min+Ct(t)}function yu(e,t,n){Fx(e.x,t.x,n.x),Fx(e.y,t.y,n.y)}function Vx(e,t,n,r,s){return e-=t,e=gu(e,1/n,r),s!==void 0&&(e=gu(e,1/s,r)),e}function u$(e,t=0,n=1,r=.5,s,i=e,o=e){if(Hn.test(t)&&(t=parseFloat(t),t=Le(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Le(i.min,i.max,r);e===i&&(a-=t),e.min=Vx(e.min,t,n,a,s),e.max=Vx(e.max,t,n,a,s)}function Ux(e,t,[n,r,s],i,o){u$(e,t[n],t[r],t[s],t.scale,i,o)}const d$=["x","scaleX","originX"],h$=["y","scaleY","originY"];function zx(e,t,n,r){Ux(e.x,t,d$,n?n.x:void 0,r?r.x:void 0),Ux(e.y,t,h$,n?n.y:void 0,r?r.y:void 0)}function Wx(e,t){e.min=t.min,e.max=t.max}function hn(e,t){Wx(e.x,t.x),Wx(e.y,t.y)}function Hx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qx(e){return e.translate===0&&e.scale===1}function GE(e){return qx(e.x)&&qx(e.y)}function Kx(e,t){return e.min===t.min&&e.max===t.max}function f$(e,t){return Kx(e.x,t.x)&&Kx(e.y,t.y)}function Gx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function YE(e,t){return Gx(e.x,t.x)&&Gx(e.y,t.y)}function Yx(e){return Ct(e.x)/Ct(e.y)}function Qx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Yt(e){return[e("x"),e("y")]}function p$(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:w}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const QE=["TopLeft","TopRight","BottomLeft","BottomRight"],m$=QE.length,Jx=e=>typeof e=="string"?parseFloat(e):e,Xx=e=>typeof e=="number"||G.test(e);function g$(e,t,n,r,s,i){s?(e.opacity=Le(0,n.opacity??1,y$(r)),e.opacityExit=Le(t.opacity??1,0,v$(r))):i&&(e.opacity=Le(t.opacity??1,n.opacity??1,r));for(let o=0;o<m$;o++){const a=`border${QE[o]}Radius`;let c=Zx(t,a),u=Zx(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Xx(c)===Xx(u)?(e[a]=Math.max(Le(Jx(c),Jx(u),r),0),(Hn.test(u)||Hn.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Le(t.rotate||0,n.rotate||0,r))}function Zx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const y$=JE(0,.5,WS),v$=JE(.5,.95,rn);
vendor: 17,937 bytes, line 338
338function JE(e,t,n){return r=>r<e?0:r>t?1:n(Ka(e,t,r))}function x$(e,t){const n=Et.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(hs(r),e(i-t))};return _e.setup(r,!0),()=>hs(r)}function Ja(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Rc(e){return pt(e)?e.get():e}function w$(e,t,n){const r=pt(e)?e:bo(e);return r.start(vg("",r,t,n)),r.animation}const b$=(e,t)=>e.depth-t.depth;class k${constructor(){this.children=[],this.isDirty=!1}add(t){ng(this.children,t),this.isDirty=!0}remove(t){rg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(b$),this.isDirty=!1,this.children.forEach(t)}}class S${constructor(){this.members=[]}add(t){ng(this.members,t),t.scheduleRender()}remove(t){if(rg(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(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];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:s}=t.options;s===!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)}}const Pc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dh=["","X","Y","Z"],E$=1e3;let C$=0;function hh(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function XE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=yE(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_e,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&XE(r)}function ZE({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=C$++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(N$),this.nodes.forEach(A$),this.nodes.forEach(O$),this.nodes.forEach(_$)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new k$)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ig),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=_E(o)&&!TL(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;_e.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=x$(f,250),Pc.hasAnimatedSinceResize&&(Pc.hasAnimatedSinceResize=!1,this.nodes.forEach(nw)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||u.getDefaultTransition()||$$,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!YE(this.targetLayout,m),g=!h&&f;if(this.options.layoutRoot||this.resumeFrom||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const p={...yg(w,"layout"),onPlay:y,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p),this.setAnimationOrigin(d,g)}else h||nw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hs(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(I$),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&XE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ew);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(P$),this.nodes.forEach(j$),this.nodes.forEach(T$)):this.nodes.forEach(tw),this.clearAllSnapshots();const a=Et.now();ot.delta=Jn(0,1e3/60,a-ot.timestamp),ot.timestamp=a,ot.isProcessing=!0,rh.update.process(ot),rh.preRender.process(ot),rh.render.process(ot),ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(R$),this.sharedNodes.forEach(D$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ct(this.snapshot.measuredBox.x)&&!Ct(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ye(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!GE(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Ts(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),B$(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ye();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(F$))){const{scroll:d}=this.root;d&&(Fi(a.x,d.offset.x),Fi(a.y,d.offset.y))}return a}removeElementScroll(o){var c;const a=Ye();if(hn(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&hn(a,o),Fi(a.x,h.offset.x),Fi(a.y,h.offset.y))}return a}applyTransform(o,a=!1){const c=Ye();hn(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Vi(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ts(d.latestValues)&&Vi(c,d.latestValues)}return Ts(this.latestValues)&&Vi(c,this.latestValues),c}removeTransform(o){const a=Ye();hn(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Ts(u.latestValues))continue;fp(u.latestValues)&&u.updateSnapshot();const d=Ye(),h=u.measurePageBox();hn(d,h),zx(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Ts(this.latestValues)&&zx(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=ot.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ye(),this.targetWithTransforms=Ye()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),c$(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hn(this.target,this.layout.layoutBox),ME(this.target,this.targetDelta)):hn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||fp(this.parent.latestValues)||DE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ye(),this.relativeTargetOrigin=Ye(),yu(this.relativeTargetOrigin,a,c),hn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ot.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;hn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;$L(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ye());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Hx(this.prevProjectionDelta.x,this.projectionDelta.x),Hx(this.prevProjectionDelta.y,this.projectionDelta.y)),xa(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Qx(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bi(),this.projectionDelta=Bi(),this.projectionDeltaWithTransform=Bi()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Bi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Ye(),m=c?c.source:void 0,w=this.layout?this.layout.source:void 0,y=m!==w,b=this.getStack(),v=!b||b.members.length<=1,g=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(L$));this.animationProgress=0;let p;this.mixTargetDelta=S=>{const k=S/1e3;rw(h.x,o.x,k),rw(h.y,o.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),M$(this.relativeTarget,this.relativeTargetOrigin,f,k),p&&f$(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=Ye()),hn(p,this.relativeTarget)),y&&(this.animationValues=d,g$(d,u,this.latestValues,k,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(hs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{Pc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bo(0)),this.currentAnimation=w$(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(E$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&eC(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ye();const h=Ct(this.layout.layoutBox.x);
vendor: 5,324 bytes, line 338
338c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=Ct(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}hn(a,c),Vi(a,d),xa(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new S$),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&hh("z",o,u,this.animationValues);for(let d=0;d<dh.length;d++)hh(`rotate${dh[d]}`,o,u,this.animationValues),hh(`skew${dh[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Rc(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Rc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ts(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=p$(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:m}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const w in mp){if(d[w]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:v}=mp[w],g=h==="none"?d[w]:y(d[w],u);if(b){const p=b.length;for(let S=0;S<p;S++)o[b[S]]=g}else v?this.options.visualElement.renderState.vars[w]=g:o[w]=g}this.options.layoutId&&(o.pointerEvents=u===this?Rc(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ew),this.root.sharedNodes.clear()}}}function j$(e){e.updateLayout()}function T$(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Yt(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Ct(f);f.min=r[h].min,f.max=f.min+m}):eC(i,t.layoutBox,r)&&Yt(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Ct(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const a=Bi();xa(a,r,t.layoutBox);const c=Bi();o?xa(c,e.applyTransform(s,!0),t.measuredBox):xa(c,r,t.layoutBox);const u=!GE(a);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const w=Ye();yu(w,t.layoutBox,f.layoutBox);const y=Ye();yu(y,r,m.layoutBox),YE(w,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function N$(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 _$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function R$(e){e.clearSnapshot()}function ew(e){e.clearMeasurements()}function tw(e){e.isLayoutDirty=!1}function P$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function A$(e){e.resolveTargetDelta()}function O$(e){e.calcProjection()}
vendor: 30,630 bytes, lines 338-346
338function I$(e){e.resetSkewAndRotation()}function D$(e){e.removeLeadSnapshot()}function rw(e,t,n){e.translate=Le(t.translate,0,n),e.scale=Le(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sw(e,t,n,r){e.min=Le(t.min,n.min,r),e.max=Le(t.max,n.max,r)}function M$(e,t,n,r){sw(e.x,t.x,n.x,r),sw(e.y,t.y,n.y,r)}function L$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $$={duration:.45,ease:[.4,0,.1,1]},iw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ow=iw("applewebkit/")&&!iw("chrome/")?Math.round:rn;function aw(e){e.min=ow(e.min),e.max=ow(e.max)}function B$(e){aw(e.x),aw(e.y)}function eC(e,t,n){return e==="position"||e==="preserve-aspect"&&!l$(Yx(t),Yx(n),.2)}function F$(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const V$=ZE({attachResizeListener:(e,t)=>Ja(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fh={current:void 0},tC=ZE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fh.current){const e=new V$({});e.mount(window),e.setOptions({layoutScroll:!0}),fh.current=e}return fh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ng=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function lw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function U$(...e){return t=>{let n=!1;const r=e.map(s=>{const i=lw(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():lw(e[s],null)}}}}function z$(...e){return x.useCallback(U$(...e),e)}class W$ extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=EE(r)&&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=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function H$({children:e,isPresent:t,anchorX:n,root:r}){var d;const s=x.useId(),i=x.useRef(null),o=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=x.useContext(Ng),c=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),u=z$(i,c);return x.useInsertionEffect(()=>{const{width:h,height:f,top:m,left:w,right:y}=o.current;if(t||!i.current||!h||!f)return;const b=n==="left"?`left: ${w}`:`right: ${y}`;i.current.dataset.motionPopId=s;const v=document.createElement("style");a&&(v.nonce=a);const g=r??document.head;return g.appendChild(v),v.sheet&&v.sheet.insertRule(`
339          [data-motion-pop-id="${s}"] {
340            position: absolute !important;
341            width: ${h}px !important;
342            height: ${f}px !important;
343            ${b}px !important;
344            top: ${m}px !important;
345          }
346        `),()=>{g.contains(v)&&g.removeChild(v)}},[t]),l.jsx(W$,{isPresent:t,childRef:i,sizeRef:o,children:x.cloneElement(e,{ref:u})})}const q$=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const u=tg(K$),d=x.useId();let h=!0,f=x.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:m=>{u.set(m,!0);for(const w of u.values())if(!w)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return i&&h&&(f={...f}),x.useMemo(()=>{u.forEach((m,w)=>u.set(w,!1))},[n]),x.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=l.jsx(H$,{isPresent:n,anchorX:a,root:c,children:e})),l.jsx(td.Provider,{value:f,children:e})};function K$(){return new Map}function nC(e=!0){const t=x.useContext(td);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{if(e)return s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Jl=e=>e.key||"";function cw(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const ko=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[u,d]=nC(o),h=x.useMemo(()=>cw(e),[e]),f=o&&!u?[]:h.map(Jl),m=x.useRef(!0),w=x.useRef(h),y=tg(()=>new Map),b=x.useRef(new Set),[v,g]=x.useState(h),[p,S]=x.useState(h);OS(()=>{m.current=!1,w.current=h;for(let C=0;C<p.length;C++){const j=Jl(p[C]);f.includes(j)?(y.delete(j),b.current.delete(j)):y.get(j)!==!0&&y.set(j,!1)}},[p,f.length,f.join("-")]);const k=[];if(h!==v){let C=[...h];for(let j=0;j<p.length;j++){const _=p[j],P=Jl(_);f.includes(P)||(C.splice(j,0,_),k.push(_))}return i==="wait"&&k.length&&(C=k),S(cw(C)),g(h),null}const{forceRender:E}=x.useContext(eg);return l.jsx(l.Fragment,{children:p.map(C=>{const j=Jl(C),_=o&&!u?!1:h===p||f.includes(j),P=()=>{if(b.current.has(j))return;if(b.current.add(j),y.has(j))y.set(j,!0);else return;let M=!0;y.forEach(A=>{A||(M=!1)}),M&&(E==null||E(),S(w.current),o&&(d==null||d()),r&&r())};return l.jsx(q$,{isPresent:_,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:_?void 0:P,anchorX:a,children:C},j)})})},rC=x.createContext({strict:!1}),uw={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"]};let dw=!1;function G$(){if(dw)return;const e={};for(const t in uw)e[t]={isEnabled:n=>uw[t].some(r=>!!n[r])};AE(e),dw=!0}function sC(){return G$(),IL()}function Y$(e){const t=sC();for(const n in e)t[n]={...t[n],...e[n]};AE(t)}const Q$=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 vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Q$.has(e)}let iC=e=>!vu(e);function J$(e){typeof e=="function"&&(iC=t=>t.startsWith("on")?!vu(t):e(t))}try{J$(require("@emotion/is-prop-valid").default)}catch{}function X$(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(iC(s)||n===!0&&vu(s)||!t&&!vu(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const id=x.createContext({});function Z$(e,t){if(sd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Qa(n)?n:void 0,animate:Qa(r)?r:void 0}}return e.inherit!==!1?t:{}}function e5(e){const{initial:t,animate:n}=Z$(e,x.useContext(id));return x.useMemo(()=>({initial:t,animate:n}),[hw(t),hw(n)])}function hw(e){return Array.isArray(e)?e.join(" "):e}const _g=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function oC(e,t,n){for(const r in t)!pt(t[r])&&!BE(r,n)&&(e[r]=t[r])}function t5({transformTemplate:e},t){return x.useMemo(()=>{const n=_g();return jg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function n5(e,t){const n=e.style||{},r={};return oC(r,n,e),Object.assign(r,t5(e,t)),r}function r5(e,t){const n={},r=n5(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 aC=()=>({..._g(),attrs:{}});function s5(e,t,n,r){const s=x.useMemo(()=>{const i=aC();return FE(i,t,UE(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};oC(i,e.style,e),s.style={...i,...s.style}}return s}const i5=["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 Rg(e){return typeof e!="string"||e.includes("-")?!1:!!(i5.indexOf(e)>-1||/[A-Z]/u.test(e))}function o5(e,t,n,{latestValues:r},s,i=!1,o){const c=(o??Rg(e)?s5:r5)(t,r,s,e),u=X$(t,typeof e=="string",i),d=e!==x.Fragment?{...u,...c,ref:n}:{},{children:h}=t,f=x.useMemo(()=>pt(h)?h.get():h,[h]);return x.createElement(e,{...d,children:f})}function a5({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:l5(n,r,s,e),renderState:t()}}function l5(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=Rc(i[f]);let{initial:o,animate:a}=e;const c=sd(e),u=PE(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?a:o;if(h&&typeof h!="boolean"&&!rd(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const w=xg(e,f[m]);if(w){const{transitionEnd:y,transition:b,...v}=w;for(const g in v){let p=v[g];if(Array.isArray(p)){const S=d?p.length-1:0;p=p[S]}p!==null&&(s[g]=p)}for(const g in y)s[g]=y[g]}}}return s}const lC=e=>(t,n)=>{const r=x.useContext(id),s=x.useContext(td),i=()=>a5(e,t,r,s);return n?i():tg(i)},c5=lC({scrapeMotionValuesFromProps:Tg,createRenderState:_g}),u5=lC({scrapeMotionValuesFromProps:zE,createRenderState:aC}),d5=Symbol.for("motionComponentSymbol");function h5(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const s=x.useRef(null);return x.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const c=o(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const cC=x.createContext({});function sa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function f5(e,t,n,r,s,i){var b,v;const{visualElement:o}=x.useContext(id),a=x.useContext(rC),c=x.useContext(td),u=x.useContext(Ng).reducedMotion,d=x.useRef(null);r=r||a.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,isSVG:i}));const h=d.current,f=x.useContext(cC);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&p5(d.current,n,s,f);const m=x.useRef(!1);x.useInsertionEffect(()=>{h&&m.current&&h.update(n,c)});const w=n[gE],y=x.useRef(!!w&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,w))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,w)));return OS(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,w)}),y.current=!1),h.enteringChildren=void 0)}),h}function p5(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:uC(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&sa(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function uC(e){if(e)return e.options.allowProjection!==!1?e.projection:uC(e.parent)}function ph(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Y$(r);const i=n?n==="svg":Rg(e),o=i?u5:c5;function a(u,d){let h;const f={...x.useContext(Ng),...u,layoutId:m5(u)},{isStatic:m}=f,w=e5(u),y=o(u,m);if(!m&&AS){g5();const b=y5(f);h=b.MeasureLayout,w.visualElement=f5(e,y,f,s,b.ProjectionNode,i)}return l.jsxs(id.Provider,{value:w,children:[h&&w.visualElement?l.jsx(h,{visualElement:w.visualElement,...f}):null,o5(e,u,h5(y,w.visualElement,d),y,m,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[d5]=e,c}function m5({layoutId:e}){const t=x.useContext(eg).id;return t&&e!==void 0?t+"-"+e:e}function g5(e,t){x.useContext(rC).strict}function y5(e){const t=sC(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function v5(e,t){if(typeof Proxy>"u")return ph;const n=new Map,r=(i,o)=>ph(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,ph(o,void 0,e,t)),n.get(o))})}const x5=(e,t)=>t.isSVG??Rg(e)?new JL(t):new HL(t,{allowProjection:e!==x.Fragment});class w5 extends vs{constructor(t){super(t),t.animationState||(t.animationState=n$(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();rd(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.call(this)}}let b5=0;class k5 extends vs{constructor(){super(...arguments),this.id=b5++}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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 S5={animation:{Feature:w5},exit:{Feature:k5}};function wl(e){return{point:{x:e.pageX,y:e.pageY}}}const E5=e=>t=>Sg(t)&&e(t,wl(t));function wa(e,t,n,r){return Ja(e,t,E5(n),r)}const dC=({current:e})=>e?e.ownerDocument.defaultView:null,fw=(e,t)=>Math.abs(e-t);function C5(e,t){const n=fw(e.x,t.x),r=fw(e.y,t.y);return Math.sqrt(n**2+r**2)}const pw=new Set(["auto","scroll"]);class hC{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=gh(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,y=C5(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!y)return;const{point:b}=m,{timestamp:v}=ot;this.history.push({...b,timestamp:v});const{onStart:g,onMove:p}=this.handlers;w||(g&&g(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,m)},this.handlePointerMove=(m,w)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=mh(w,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(m,w)=>{this.end();const{onEnd:y,onSessionEnd:b,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=gh(m.type==="pointercancel"?this.lastMoveEventInfo:mh(w,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,g),b&&b(m,g)},!Sg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=wl(t),u=mh(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=ot;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,gh(u,this.history)),this.removeListeners=yl(wa(this.contextWindow,"pointermove",this.handlePointerMove),wa(this.contextWindow,"pointerup",this.handlePointerUp),wa(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(pw.has(r.overflowX)||pw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),_e.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hs(this.updatePoint)}}function mh(e,t){return t?{point:t(e.point)}:e}function mw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gh({point:e},t){return{point:e,delta:mw(e,fC(t)),offset:mw(e,j5(t)),velocity:T5(t,.1)}}function j5(e){return e[0]}function fC(e){return e[e.length-1]}function T5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=fC(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Wn(t)));)n--;if(!r)return{x:0,y:0};const i=tn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function N5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Le(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Le(n,e,r.max):Math.min(e,n)),e}function gw(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 _5(e,{top:t,left:n,bottom:r,right:s}){return{x:gw(e.x,n,s),y:gw(e.y,t,r)}}function yw(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 R5(e,t){return{x:yw(e.x,t.x),y:yw(e.y,t.y)}}function P5(e,t){let n=.5;const r=Ct(e),s=Ct(t);return s>r?n=Ka(t.min,t.max-r,e.min):r>s&&(n=Ka(e.min,e.max-s,t.min)),Jn(0,1,n)}function A5(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 gp=.35;function O5(e=gp){return e===!1?e=0:e===!0&&(e=gp),{x:vw(e,"left","right"),y:vw(e,"top","bottom")}}function vw(e,t,n){return{min:xw(e,t),max:xw(e,n)}}function xw(e,t){return typeof e=="number"?e:e[t]||0}const I5=new WeakMap;class D5{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=Ye(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n?(this.stopAnimation(),this.snapToCursor(wl(h).point)):this.pauseAnimation()},o=(h,f)=>{this.stopAnimation();const{drag:m,dragPropagation:w,onDragStart:y}=this.getProps();if(m&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kL(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yt(v=>{let g=this.getAxisMotionValue(v).get()||0;if(Hn.test(g)){const{projection:p}=this.visualElement;if(p&&p.layout){const S=p.layout.layoutBox[v];S&&(g=Ct(S)*(parseFloat(g)/100))}}this.originPoint[v]=g}),y&&_e.postRender(()=>y(h,f)),cp(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:w,onDirectionLock:y,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(w&&this.currentDirection===null){this.currentDirection=M5(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Yt(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new hC(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:dC(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&_e.postRender(()=>a(r,s))}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:s}=this.getProps();if(!r||!Xl(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=N5(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&sa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=_5(r.layoutBox,t):this.constraints=!1,this.elastic=O5(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Yt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=A5(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!sa(t))return!1;const r=t.current;wo(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=BL(r,s.root,this.visualElement.getTransformPagePoint());let o=R5(s.layout.layoutBox,i);if(n){const a=n(ML(o));this.hasMutatedConstraints=!!a,a&&(o=IE(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Yt(d=>{if(!Xl(d,n,this.currentDirection))return;let h=c&&c[d]||{};o&&(h={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,w)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cp(this.visualElement,t),r.start(vg(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Yt(n=>{const{drag:r}=this.getProps();if(!Xl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-Le(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!sa(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Yt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=P5({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Yt(o=>{if(!Xl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(Le(c,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;I5.set(this.visualElement,this);const t=this.visualElement.current,n=wa(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&!NE(c.target)&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();sa(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),_e.read(r);const o=Ja(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yt(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=gp,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Xl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function M5(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class L5 extends vs{constructor(t){super(t),this.removeGroupControls=rn,this.removeListeners=rn,this.controls=new D5(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const ww=e=>(t,n)=>{e&&_e.postRender(()=>e(t,n))};class $5 extends vs{constructor(){super(...arguments),this.removePointerDownListener=rn}onPointerDown(t){this.session=new hC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:ww(t),onStart:ww(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&_e.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=wa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let yh=!1;class B5 extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),yh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Pc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,yh=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||_e.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;yh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function pC(e){const[t,n]=nC(),r=x.useContext(eg);return l.jsx(B5,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(cC),isPresent:t,safeToRemove:n})}const F5={pan:{Feature:$5},drag:{Feature:L5,ProjectionNode:tC,MeasureLayout:pC}};function bw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&_e.postRender(()=>i(t,wl(t)))}class V5 extends vs{mount(){const{current:t}=this.node;t&&(this.unmount=SL(t,(n,r)=>(bw(this.node,r,"Start"),s=>bw(this.node,s,"End"))))}unmount(){}}class U5 extends vs{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=yl(Ja(this.node.current,"focus",()=>this.onFocus()),Ja(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&_e.postRender(()=>i(t,wl(t)))}class z5 extends vs{mount(){const{current:t}=this.node;t&&(this.unmount=jL(t,(n,r)=>(kw(this.node,r,"Start"),(s,{success:i})=>kw(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yp=new WeakMap,vh=new WeakMap,W5=e=>{const t=yp.get(e.target);t&&t(e)},H5=e=>{e.forEach(W5)};function q5({root:e,...t}){const n=e||document;vh.has(n)||vh.set(n,{});const r=vh.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(H5,{root:e,...t})),r[s]}
346function K5(e,t,n){const r=q5(t);return yp.set(e,n),r.observe(e),()=>{yp.delete(e),r.unobserve(e)}}const G5={some:0,all:1};class Y5 extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:G5[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return K5(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Q5(t,n))&&this.startObserver()}unmount(){}}function Q5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const J5={inView:{Feature:Y5},tap:{Feature:z5},focus:{Feature:U5},hover:{Feature:V5}},X5={layout:{ProjectionNode:tC,MeasureLayout:pC}},Z5={...S5,...J5,...F5,...X5},H=v5(Z5,x5),Zl={challengeContext:"",challengeType:null,maskScores:[],cognitiveBiases:[],assumptions:null,criticalOpportunity:null,actionAnalysis:null,validationStakeholders:[],experiment:null,metrics:null,currentStage:1,completedStages:[]};function Io(){const[e,t]=x.useState(()=>{const v=localStorage.getItem("experimentData");if(v)try{const g=JSON.parse(v);return{...Zl,...g}}catch{return Zl}return Zl}),n=x.useCallback(v=>{t(g=>{const p=v(g);return localStorage.setItem("experimentData",JSON.stringify(p)),p})},[]),r=x.useCallback(v=>{n(g=>({...g,challengeContext:v}))},[n]),s=x.useCallback(v=>{n(g=>({...g,challengeType:v}))},[n]),i=x.useCallback(v=>{n(g=>({...g,maskScores:v}))},[n]),o=x.useCallback(v=>{n(g=>({...g,cognitiveBiases:v}))},[n]),a=x.useCallback(v=>{n(g=>({...g,assumptions:v}))},[n]),c=x.useCallback(v=>{n(g=>({...g,criticalOpportunity:v}))},[n]),u=x.useCallback(v=>{n(g=>({...g,actionAnalysis:v}))},[n]),d=x.useCallback(v=>{n(g=>({...g,validationStakeholders:v}))},[n]),h=x.useCallback(v=>{n(g=>({...g,experiment:v}))},[n]),f=x.useCallback(v=>{n(g=>({...g,metrics:v}))},[n]),m=x.useCallback(v=>{n(g=>{const p=g.completedStages.includes(v)?g.completedStages:[...g.completedStages,v],S=Math.max(g.currentStage,v+1);return{...g,completedStages:p,currentStage:S}})},[n]),w=x.useCallback(v=>{n(g=>v<=g.currentStage?{...g,currentStage:v}:g)},[n]),y=x.useCallback(()=>{localStorage.removeItem("experimentData"),t(Zl)},[]),b=x.useCallback((v=3)=>[...e.maskScores].sort((g,p)=>p.score-g.score).slice(0,v),[e.maskScores]);return{data:e,updateChallengeContext:r,updateChallengeType:s,updateMaskScores:i,updateCognitiveBiases:o,updateAssumptions:a,updateCriticalOpportunity:c,updateActionAnalysis:u,updateValidationStakeholders:d,updateExperiment:h,updateMetrics:f,completeStage:m,goToStage:w,resetData:y,getTopMasks:b}}const Sw=[{number:1,letter:"B",title:"Bias Recognition",subtitle:"MASKS Assessment"},{number:2,letter:"R",title:"Research Strategy",subtitle:"Critical Opportunity"},{number:3,letter:"A",title:"Action Analysis",subtitle:"Impact & Readiness"},{number:4,letter:"V",title:"Validation",subtitle:"Gather Input"},{number:5,letter:"E",title:"Experimentation",subtitle:"Strategy Design"},{number:6,letter:"R",title:"Results",subtitle:"Metrics & Execution"}],e4=[{label:"Unlearning",stages:[1,2]},{label:"Testing",stages:[3,4]},{label:"Committing",stages:[5,6]}];function t4({currentStage:e,completedStages:t,onStageClick:n}){const r=i=>t.includes(i)?"complete":i===e?"active":i<=Math.max(...t,0)+1?"available":"locked",s=i=>i.includes(e)||i.some(o=>t.includes(o));return l.jsxs("div",{className:"w-full py-6",children:[l.jsx("div",{className:"mb-3 px-2",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-accent mb-1.5",children:"Continuous Learning"}),l.jsx("div",{className:"w-full h-3 border-l-2 border-r-2 border-t-2 border-accent/40 rounded-t-lg"})]})}),l.jsx("div",{className:"grid grid-cols-3 gap-2 mb-3 px-2",children:e4.map(i=>{const o=s(i.stages);return l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("p",{className:Z("text-[11px] font-semibold uppercase tracking-wider mb-1.5 transition-colors",o?"text-primary":"text-muted-foreground"),children:i.label}),l.jsx("div",{className:Z("w-full h-2 border-l-2 border-r-2 border-t-2 roun
346ded-t-md transition-colors",o?"border-primary/60":"border-border")})]},i.label)})}),l.jsxs("div",{className:"flex items-center justify-between relative",children:[l.jsx("div",{className:"absolute top-5 left-0 right-0 h-0.5 bg-border"}),l.jsx(H.div,{className:"absolute top-5 left-0 h-0.5 bg-primary",initial:{width:"0%"},animate:{width:`${Math.max(...t,0)/(Sw.length-1)*100}%`},transition:{duration:.5,ease:"easeInOut"}}),Sw.map(i=>{const o=r(i.number),a=o!=="locked";return l.jsxs(H.button,{onClick:()=>a&&n(i.number),className:Z("relative flex flex-col items-center gap-2 z-10",a?"cursor-pointer":"cursor-not-allowed"),whileHover:a?{scale:1.05}:{},whileTap:a?{scale:.95}:{},children:[l.jsx(H.div,{className:Z("w-10 h-10 rounded-full flex items-center justify-center border-2 transition-colors",o==="complete"&&"bg-stage-complete border-stage-complete text-white",o==="active"&&"bg-primary border-primary text-primary-foreground shadow-glow",o==="available"&&"bg-card border-primary text-primary",o==="locked"&&"bg-muted border-stage-locked text-stage-locked"),initial:{scale:0},animate:{scale:1},transition:{delay:i.number*.1},children:o==="complete"?l.jsx(xk,{className:"w-5 h-5"}):o==="locked"?l.jsx(FP,{className:"w-4 h-4"}):l.jsx("span",{className:"font-bold text-sm",children:i.letter})}),l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:Z("text-xs font-medium",o==="active"?"text-primary":"text-muted-foreground"),children:i.title}),l.jsx("p",{className:"text-[10px] text-muted-foreground hidden sm:block",children:i.subtitle})]})]},i.number)})]})]})}const Dt=[{id:1,name:"The Hero",category:"protective",statement:"I'll save the day",consequence:"Creates dependency, blocks team problem-solving",experimentationBias:"Avoids handing experiments to others — must personally lead every initiative",color:"mask-hero",icon:"🦸",recommendations:[{insight:"The Hero Mask often grows from early success as a problem-solver. But at scale, stepping in as the hero creates a bottleneck. It stops your team from building their own ability to solve problems.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Pick one recurring crisis you always handle yourself. Hand it fully to a team member for 30 days and track the outcome."},{insight:"When you always rescue your team, you send a hidden message: failure is not safe here. That message kills experimentation.",source:"Dr. Diane Dye, Brave Business Mastercast",actionStep:'Keep a "Hero Log" this week. Track every time you step in to save the day, then ask: "What would have happened if I had not?"'}]},{id:2,name:"The Perfectionist",category:"protective",statement:"It must be flawless",consequence:"Slows decisions, prevents delegation",experimentationBias:'Delays launching experiments until conditions are "perfect," missing key learning windows',color:"mask-perfectionist",icon:"✨",recommendations:[{insight:'Perfectionism in leadership often disguises itself as "high standards." In experimentation, waiting for perfect always costs more than learning from an imperfect test.',source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:'Launch your next experiment at 70% readiness. Set a "good enough" threshold before you start — and stick to it.'},{insight:'The Perfectionist Mask stops leaders from modeling the "test and learn" mindset their teams need to innovate.',source:"Dr. Diane Dye, CEO Innovation Cohort Framework",actionStep:'Share an unfinished work-in-progress with your team this week and ask for input. Show them that "done" beats "perfect."'}]},{id:3,name:"The Protector",category:"protective",statement:"I'll shield them from failure",consequence:"Limits team growth, reduces accountability",experimentationBias:"Avoids risky experiments that might expose the team to failure",color:"mask-protector",icon:"🛡️",recommendations:[{insight:"Shielding people from all failure creates helplessness. Teams that never face manageable failure never build the resilience they need to experiment.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:'Design a "safe-to-fail" experiment with your team. Keep the downside small, but make the learning real.'},{insight:"The best leaders protect their team's psychological safety — not from failure itself, but from being punished for honest attempts.",source:'Dr. Diane Dye, Executive Innovators Community Workshop — "From Protection to Permission"',actionStep:'At your next all-hands, call out a recent team failure as a "learning investment." Celebrate what was learned, not just what succeeded.'}]},{id:4,name:"The Visionary",category:"protective",statement:"I see what others can't",consequence:"Team can't execute without you, innovation bottlenecks",experimentationBias:"Only backs their own ideas — dismisses experiments suggested by others",color:"mask-visionary",icon:"🔮",recommendations:[{insight:"Vision without shared ownership becomes a single point of failure. The best innovations come from experiments spread across the team — not one leader's big idea.",s
346ource:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"This month, approve an experiment proposed entirely by someone else on your team — even if it is not how you would do it."},{insight:"When a leader holds the vision too tightly, the team learns to imagine but not to act on their own.",source:"Dr. Diane Dye, Brave Business Mastercast",actionStep:"Ask three team members each to propose one experiment. Commit to running at least one without changing it."}]},{id:5,name:"The Driver",category:"protective",statement:"Push harder, move faster",consequence:"Burnout culture, high turnover",experimentationBias:"Rushes through experiments and drops them before collecting useful data",color:"mask-driver",icon:"🏎️",recommendations:[{insight:"Speed without reflection is just noise. Experiments need time for data to surface. The Driver's urge to speed up often kills experiments before they can teach anything.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Set a minimum runtime for your current experiment. Write the end date down and do not review results until then."},{insight:"The organizations that scale fastest are not the ones that move fastest — they are the ones that learn fastest. Learning takes observation time.",source:'Dr. Diane Dye, CEO Innovation Cohort — "Speed vs. Velocity"',actionStep:'Block 30 minutes each week as an "observation window." Review experiment data — but make no decisions during that time.'}]},{id:6,name:"The Expert",category:"control",statement:"I know best",consequence:"Team stops thinking on their own and waits for your input",experimentationBias:"Only runs experiments in familiar areas — avoids learning something new",color:"mask-expert",icon:"🎓",recommendations:[{insight:"Expertise is valuable — but when you use it as authority, it shuts down the open thinking that experiments need. The expert must become the learner.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Run an experiment in an area where you have zero expertise. Let your team lead while you watch and learn."},{insight:"When the leader is always the expert, the team becomes order-takers instead of innovators. Experimentation requires intellectual humility at the top.",source:`Dr. Diane Dye, Executive Innovators Community — "The Beginner's Advantage"`,actionStep:'In your next strategy session, ask questions instead of giving answers. Count how many times you hold back your "expert opinion."'}]},{id:7,name:"The Firefighter",category:"control",statement:"I'll handle the crisis",consequence:"Reactive culture, no strategic time",experimentationBias:"Too busy fighting fires to run strategic experiments",color:"mask-firefighter",icon:"🔥",recommendations:[{insight:"If you are always fighting fires, you never build fire-resistant systems. Strategic experiments are the fire prevention plan your organization is missing.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:'Block 2 hours per week on your calendar as "strategic experimentation time." Guard it the same way you guard board meetings.'},{insight:"The Firefighter Mask is self-reinforcing: by solving every crisis yourself, you prevent systems from being built that would stop future crises.",source:"Dr. Diane Dye, Brave Business Mastercast",actionStep:'For every fire you fight this week, ask: "What experiment could prevent this from happening again?" Then start one.'}]},{id:8,name:"The Closer",category:"control",statement:"I'll seal the deal",consequence:"Sales team can't close without you, growth ceiling",experimentationBias:"Will not let others experiment with client relationships",color:"mask-closer",icon:"🤝",recommendations:[{insight:"When only the CEO can close deals, the company's revenue ceiling equals the CEO's personal bandwidth. Experimenting with your sales process is how you break through that ceiling.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Let a team member lead the next three client conversations while you observe silently. Note what they do differently — it might be better."},{insight:"The Closer Mask often hides a deeper fear: that the product or team is not strong enough to sell itself. Experiments reveal whether that fear is real.",source:'Dr. Diane Dye, CEO Innovation Cohort — "The Trust Experiment"',actionStep:"Run a 2-week experiment where your team closes deals on their own. Track close rate and customer satisfaction vs. your personal baseline."}]},{id:9,name:"The Harmonizer",category:"control",statement:"Keep everyone happy",consequence:"Avoids tough conversations, mediocrity spreads",experimentationBias:"Avoids experiments that might create conflict or disagreement",color:"mask-harmonizer",icon:"☮️",recommendations:[{insight:"Harmony without honesty leads to stagnation. The most transformative experiments create productive tension — that is how teams know they are pushing boundaries.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Propose one experiment this week that you know 
346will make someone uncomfortable. Frame it as a learning opportunity, not a threat to the status quo."},{insight:"Leaders who value harmony over honesty build cultures where people smile while the organization quietly declines. Brave experiments need brave conversations.",source:"Dr. Diane Dye, Brave Business Mastercast",actionStep:`Have one conversation this week that you have been putting off. Use Dr. Dye's framework: "I care about [person/team] AND I need to address [issue]."`}]},{id:10,name:"The Lone Wolf",category:"control",statement:"I'll figure it out alone",consequence:"Isolation, missed opportunities, blind spots",experimentationBias:"Runs experiments alone and misses insights that come from working with others",color:"mask-lonewolf",icon:"🐺",recommendations:[{insight:"Isolation is the enemy of innovation. The best experiments are designed together because different perspectives reveal blind spots no single leader can see alone.",source:"Dr. Diane Dye, Creating Critical Opportunity workbook",actionStep:"Share your biggest current challenge with a peer group or advisory board. Ask for three approaches you have not thought of."},{insight:"The Lone Wolf Mask often grows in founders who built something from nothing. But what got you here will not get you there — scale requires collective thinking.",source:'Dr. Diane Dye, Executive Innovators Community — "From Founder to Leader"',actionStep:"Co-design your next experiment with at least two other people. Give them real decision-making power, not just a chance to give input."}]}],rr=[{maskId:1,question:"When a crisis hits, I feel I must personally step in to resolve it.",personalQuestion:"When a problem comes up in this situation, I feel I must personally step in and fix it myself."},{maskId:2,question:"I often delay decisions or launches until everything feels completely right.",personalQuestion:"I often delay deciding or acting on this situation until everything feels exactly right."},{maskId:3,question:"I tend to take on difficult tasks myself to protect my team from potential failure.",personalQuestion:"I tend to handle the harder parts of this situation myself to protect others from the risk of failing."},{maskId:4,question:"I believe my strategic vision is what drives success, and others may not fully understand it.",personalQuestion:"I believe I see what this situation really needs, and outside input rarely changes my view."},{maskId:5,question:"I push my team to move faster and work harder to achieve our goals.",personalQuestion:"I push myself to move faster and work harder on this situation, often without stopping to reflect."},{maskId:6,question:"Team members often wait for my input before making decisions in my area of expertise.",personalQuestion:"I lean heavily on what I already know rather than looking for new information about this situation."},{maskId:7,question:"I spend a significant amount of time putting out fires and handling urgent issues.",personalQuestion:"I spend most of my energy reacting to what is urgent in this situation rather than what is important."},{maskId:8,question:"I'm typically the one who needs to close important deals or client relationships.",personalQuestion:"I feel I have to personally carry this situation across the finish line myself."},{maskId:9,question:"I prioritize keeping team harmony and avoid conversations that might create tension.",personalQuestion:"I avoid conversations or decisions about this situation that might cause tension or discomfort."},{maskId:10,question:"I prefer working through challenges independently before involving others.",personalQuestion:"I prefer working through this situation alone rather than asking peers, mentors, or advisors for help."}],Pg=[{level:0,description:"No issues. Everything is running smoothly.",response:"Monitor"},{level:1,description:"Very minor annoyance — occasional hiccups, easy to ignore.",response:"Note for improvement"},{level:2,description:"Minor annoyance — noticeable but not hurting results.",response:"Keep an eye on pattern"},{level:3,description:"Annoying enough to distract people now and then.",response:"Low-level intervention"},{level:4,description:"Disruptive but manageable if people stay focused.",response:"Adjust priorities or roles"},{level:5,description:"This issue is actively hurting productivity and morale within a team.",response:"Active intervention needed"},{level:6,description:"This pain point is affecting work across teams and can no longer be ignored.",response:"Strategic response required"},{level:7,description:"Major disruption. Performance, trust, or engagement is taking a hit.",response:"Leadership attention critical"},{level:8,description:"Serious breakdown. Culture or systems are under stress.",response:"Communication or reboot needed"},{level:9,description:"Dysfunction is visible and destabilizing. Leaders are burning out.",response:"Emergency transformation"},{level:10,description:"Emergency action or shutdown is required right now.",response:"Radical change immediately"}],ti=[{id:"lean-startup",name:"Build-Measure-Learn (Lean Startup)",description:"Build small experiments to test your key assumptions quickly with real customers or stakeholders.",source:"Eric Ries, The Lean Startup",sourceUrl:"https://theleanstartup.com/",bestFor:["New product ideas","Market validation","Process changes"],steps:["Identify the riskiest assumption","Design the smallest experiment to test it","Build the minimum viable product or process","Measure results with actionable metrics","Learn and pivot or persevere"],timeframe:"2-4 weeks",citedInsight:'"A minimum viable experiment is not about building less — it is about learning faster. Every day you spend perfecting is a day your competitor spends learning." — Dr. Diane Dye, Creating Critical Opportunity workbook',citedSource:"Dr. Diane Dye, People Risk Consulting"},{id:"five-x-five",name:"5×5 Method",description:"Five Days. Five Decisions. One Breakthrough. A time-bound framework for CEO decision velocity.",source:"Dr. Diane Dye, People Risk Consulting",bestFor:["Leadership decisions","Strategic pivots","Team restructuring"],steps:["Day 1: Assess & Define using the Organizational Pain Scale","Day 2: Diagnose People & Process Risk with RACI mapping","Day 3: Design Options & Tradeoffs","Day 4: Decide & Sequence (30/60/90 Action Plan)","Day 5: Commit & Signal to stakeholders"],timeframe:"5 days",citedInsight:'"Decision velocity is the competitive edge no one talks about. The 5×5 Method moves leaders from thinking to commitment in five days — because the cost of indecision adds up every single day." — Dr. Diane Dye, Creating Critical Opportunity workbook',citedSource:"Dr. Diane Dye, People Risk Consulting"},{id:"design-sprint",name:"Design Sprint",description:"A five-day process to answer key business questions through design, prototyping, and testing.",source:"Jake Knapp, Google Ventures",sourceUrl:"https://www.thesprintbook.com/",bestFor:["Product design","Customer experience","Service innovation"],steps:["Monday: Map and choose target","Tuesday: Sketch competing solutions","Wednesday: Decide on best solution","Thursday: Bu
346ild a realistic prototype","Friday: Test with real customers"],timeframe:"5 days",citedInsight:'"Prototyping is not about building — it is about making your assumptions visible and testable before you invest." — Dr. Diane Dye, Creating Critical Opportunity workbook',citedSource:"Dr. Diane Dye, People Risk Consulting"},{id:"hypothesis-driven",name:"Hypothesis-Driven Development",description:"Frame every initiative as a testable hypothesis with clear success criteria before you Execute.",source:"Barry O'Reilly, Lean Enterprise",sourceUrl:"https://barryoreilly.com/",bestFor:["Technology initiatives","Process optimization","Cultural change"],steps:['State the hypothesis: "We believe [this capability]..."','Define the test: "...will result in [this outcome]..."','Set the criteria: "...we will know this when we see [measurable signal]"',"Run the experiment within a set time box","Evaluate and document your learnings"],timeframe:"2-6 weeks",citedInsight:'"Every initiative is a hypothesis until proven otherwise. Stating what you believe — and how you will know you are wrong — is what separates experimentation from guessing." — Dr. Diane Dye, Creating Critical Opportunity workbook',citedSource:"Dr. Diane Dye, People Risk Consulting"},{id:"safe-to-fail",name:"Safe-to-Fail Probes",description:"Run small experiments where failure gives you useful learning without causing serious damage.",source:"Dave Snowden, Cynefin Framework",sourceUrl:"https://thecynefin.co/",bestFor:["Complex problems","Uncertain environments","Cultural experiments"],steps:["Identify a complex challenge without a clear solution","Design multiple small probes — not one big bet","Make sure each probe can be reversed or contained","Amplify what works, dampen what does not","Let patterns emerge before you scale anything"],timeframe:"1-3 months",citedInsight:`"In complex environments, a leader's job is not to predict the right answer. It is to create conditions for the right answer to emerge through many small experiments." — Dr. Diane Dye, Creating Critical Opportunity workbook`,citedSource:"Dr. Diane Dye, People Risk Consulting"},{id:"a-b-testing",name:"A/B Testing Framework",description:"Run side-by-side experiments with control groups to measure the real impact of a specific change.",source:"Widely used in tech and marketing",bestFor:["Marketing campaigns","Process variations","Pricing experiments"],steps:["Define the single variable you are testing","Create a control group (A) and a variant group (B)","Make sure your sample size is large enough to trust the result","Run the test long enough to collect meaningful data","Analyze results and roll out the winner"],timeframe:"2-4 weeks",citedInsight:'"Do not guess when you can test. The most dangerous assumption in business is thinking you already know what will work." — Dr. Diane Dye, Brave Business Mastercast',citedSource:"Brave Business Mastercast"}],n4=Wu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),te=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?OR:"button";return l.jsx(o,{className:Z(n4({variant:t,size:n,className:e})),ref:i,...s})});te.displayName="Button";const he=x.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:Z("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
346he.displayName="Card";const we=x.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:Z("flex flex-col space-y-1.5 p-6",e),...t}));we.displayName="CardHeader";const ge=x.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:Z("text-2xl font-semibold leading-none tracking-tight",e),...t}));ge.displayName="CardTitle";const be=x.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:Z("text-sm text-muted-foreground",e),...t}));be.displayName="CardDescription";const fe=x.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:Z("p-6 pt-0",e),...t}));fe.displayName="CardContent";const r4=x.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:Z("flex items-center p-6 pt-0",e),...t}));r4.displayName="CardFooter";function mC(e,[t,n]){return Math.min(n,Math.max(t,e))}var s4=x.createContext(void 0);function gC(e){const t=x.useContext(s4);return e||t||"ltr"}function yC(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vC=["PageUp","PageDown"],xC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wC={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Do="Slider",[vp,i4,o4]=Pm(Do),[bC,zU]=br(Do,[o4]),[a4,od]=bC(Do),kC=x.forwardRef((e,t)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:h=()=>{},onValueCommit:f=()=>{},inverted:m=!1,form:w,...y}=e,b=x.useRef(new Set),v=x.useRef(0),p=o==="horizontal"?l4:c4,[S=[],k]=ii({prop:d,defaultProp:u,onChange:M=>{var z;(z=[...b.current][v.current])==null||z.focus(),h(M)}}),E=x.useRef(S);function C(M){const A=p4(S,M);P(M,A)}function j(M){P(M,v.current)}function _(){const M=E.current[v.current];S[v.current]!==M&&f(S)}function P(M,A,{commit:z}={commit:!1}){const T=v4(i),F=x4(Math.round((M-r)/i)*i+r,T),W=mC(F,[r,s]);k((V=[])=>{const N=h4(V,W,A);if(y4(N,c*i)){v.current=N.indexOf(W);const R=String(N)!==String(V);return R&&z&&f(N),R?N:V}else return V})}return l.jsx(a4,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:s,valueIndexToChangeRef:v,thumbs:b.current,values:S,orientation:o,form:w,children:l.jsx(vp.Provider,{scope:e.__scopeSlider,children:l.jsx(vp.Slot,{scope:e.__scopeSlider,children:l.jsx(p,{"aria-disabled":a,"data-disabled":a?"":void 0,...y,ref:t,onPointerDown:ye(y.onPointerDown,()=>{a||(E.current=S)}),min:r,max:s,inverted:m,onSlideStart:a?void 0:C,onSlideMove:a?void 0:j,onSlideEnd:a?void 0:_,onHomeKeyDown:()=>!a&&P(r,0,{commit:!0}),onEndKeyDown:()=>!a&&P(s,S.length-1,{commit:!0}),onStepKeyDown:({event:M,direction:A})=>{if(!a){const F=vC.includes(M.key)||M.shiftKey&&xC.includes(M.key)?10:1,W=v.current,V=S[W],N=i*F*A;P(V+N,W,{commit:!0})}}})})})})});kC.displayName=Do;var[SC,EC]=bC(Do,{startEdge:"left",endEdge:"right",size:"width",direction:1}),l4=x.forwardRef((e,t)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:o,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...d}=e,[h,f]=x.useState(null),m=Re(t,p=>f(p)),w=x.useRef(void 0),y=gC(s),b=y==="ltr",v=b&&!i||!b&&i;function g(p){const S=w.current||h.getBoundingClientRect(),k=[0,S.width],C=Ag(k,v?[n,r]:[r,n]);return w.current=S,C(p-S.left)}return l.jsx(SC,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:l.jsx(CC,{dir:y,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:p=>{const S=g(p.clientX);o==null||o(S)},onSlideMove:p=>{const S=g(p.clientX);a==null||a(S)},onSlideEnd:()=>{w.current=void 0,c==null||c()},onStepKeyDown:p=>{const k=wC[v?"from-left":"from-right"].includes(p.key);u==null||u({event:p,direction:k?-1:1})}})})}),c4=x.forwardRef((e,t)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:a,onStepKeyDown:c,...u}=e,d=x.useRef(null),h=Re(t,d),f=x.useRef(void 0),m=!s;function w(y){const b=f.current||d.current.getBoundingClientRect(),v=[0,b.height],p=Ag(v,m?[r,n]:[n,r]);return f.current=b,p(y-b.top)}return l.jsx(SC,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:l.jsx(CC,{"data-orientation":"vertical",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const b=w(y.clientY);i==null||i(b)},onSlideMove:y=>{const b=w(y.clientY);o==null||o(b)},onSlideEnd:()=>{f.current=void 0,a==null||a()},onStepKeyDown:y=>{const v=wC[m?"from-bottom":"from-top"].includes(y.key);c==null||c({event:y,direction:v?-1:1})}})})}),CC=x.forwardRef((e,t)=>
vendor: 3,105 bytes, line 346
346{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:c,...u}=e,d=od(Do,n);return l.jsx(pe.span,{...u,ref:t,onKeyDown:ye(e.onKeyDown,h=>{h.key==="Home"?(o(h),h.preventDefault()):h.key==="End"?(a(h),h.preventDefault()):vC.concat(xC).includes(h.key)&&(c(h),h.preventDefault())}),onPointerDown:ye(e.onPointerDown,h=>{const f=h.target;f.setPointerCapture(h.pointerId),h.preventDefault(),d.thumbs.has(f)?f.focus():r(h)}),onPointerMove:ye(e.onPointerMove,h=>{h.target.hasPointerCapture(h.pointerId)&&s(h)}),onPointerUp:ye(e.onPointerUp,h=>{const f=h.target;f.hasPointerCapture(h.pointerId)&&(f.releasePointerCapture(h.pointerId),i(h))})})}),jC="SliderTrack",TC=x.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=od(jC,n);return l.jsx(pe.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:t})});TC.displayName=jC;var xp="SliderRange",NC=x.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,s=od(xp,n),i=EC(xp,n),o=x.useRef(null),a=Re(t,o),c=s.values.length,u=s.values.map(f=>PC(f,s.min,s.max)),d=c>1?Math.min(...u):0,h=100-Math.max(...u);return l.jsx(pe.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:a,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:h+"%"}})});NC.displayName=xp;var wp="SliderThumb",_C=x.forwardRef((e,t)=>{const n=i4(e.__scopeSlider),[r,s]=x.useState(null),i=Re(t,a=>s(a)),o=x.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return l.jsx(u4,{...e,ref:i,index:o})}),u4=x.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:s,...i}=e,o=od(wp,n),a=EC(wp,n),[c,u]=x.useState(null),d=Re(t,g=>u(g)),h=c?o.form||!!c.closest("form"):!0,f=Km(c),m=o.values[r],w=m===void 0?0:PC(m,o.min,o.max),y=f4(r,o.values.length),b=f==null?void 0:f[a.size],v=b?m4(b,w,a.direction):0;return x.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),l.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${w}% + ${v}px)`},children:[l.jsx(vp.ItemSlot,{scope:e.__scopeSlider,children:l.jsx(pe.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":o.min,"aria-valuenow":m,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:m===void 0?{display:"none"}:e.style,onFocus:ye(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),h&&l.jsx(RC,{name:s??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:m},r)]})});_C.displayName=wp;var d4="RadioBubbleInput",RC=x.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const s=x.useRef(null),i=Re(s,r),o=yC(t);return x.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const h=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(h)}},[o,t]),l.jsx(pe.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});RC.displayName=d4;function h4(e=[],t,n){const r=[...e];return r[n]=t,r.sort((s,i)=>s-i)}
346function PC(e,t,n){const i=100/(n-t)*(e-t);return mC(i,[0,100])}function f4(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function p4(e,t){if(e.length===1)return 0;const n=e.map(s=>Math.abs(s-t)),r=Math.min(...n);return n.indexOf(r)}function m4(e,t,n){const r=e/2,i=Ag([0,50],[0,r]);return(r-i(t)*n)*n}function g4(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function y4(e,t){if(t>0){const n=g4(e);return Math.min(...n)>=t}return!0}function Ag(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function v4(e){return(String(e).split(".")[1]||"").length}function x4(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var AC=kC,w4=TC,b4=NC,k4=_C;const Og=x.forwardRef(({className:e,...t},n)=>l.jsxs(AC,{ref:n,className:Z("relative flex w-full touch-none select-none items-center",e),...t,children:[l.jsx(w4,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:l.jsx(b4,{className:"absolute h-full bg-primary"})}),l.jsx(k4,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Og.displayName=AC.displayName;function S4({onComplete:e,initialScores:t=[],challengeType:n="team",challengeContext:r}){const[s,i]=x.useState(0),[o,a]=x.useState(()=>{const y={};return t.forEach(b=>{y[b.maskId]=b.score}),y}),c=rr[s],u=o[c.maskId]||3,d=n==="personal"?c.personalQuestion:c.question,h=y=>{a(b=>({...b,[c.maskId]:y[0]}))},f=()=>{if(s<rr.length-1)i(y=>y+1);else{const y=rr.map(b=>({maskId:b.maskId,score:o[b.maskId]||3}));e(y)}},m=()=>{s>0&&i(y=>y-1)},w=[{value:1,label:"Rarely"},{value:2,label:"Sometimes"},{value:3,label:"Often"},{value:4,label:"Frequently"},{value:5,label:"Always"}];return l.jsxs("div",{className:"max-w-2xl mx-auto",children:[r&&l.jsxs("div",{className:"mb-4 rounded-lg border border-primary/20 bg-primary/5 p-3",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-0.5",children:n==="personal"?"Personal lens — looking at yourself in:":"Team lens — looking at yourself as a leader of:"}),l.jsx("p",{className:"text-sm text-foreground",children:r})]}),l.jsxs("div",{className:"mb-8",children:[l.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground mb-2",children:[l.jsxs("span",{children:["Question ",s+1," of ",rr.length]}),l.jsxs("span",{children:[Math.round((s+1)/rr.length*100),"% complete"]})]}),l.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:l.jsx(H.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(s+1)/rr.length*100}%`},transition:{duration:.3}})})]}),l.jsx(ko,{mode:"wait",children:l.jsx(H.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},children:l.jsxs(he,{className:"border-2 shadow-lg",children:[l.jsxs(we,{className:"pb-4",children:[l.jsxs(be,{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:["Behavior ",s+1]}),l.jsx(ge,{className:"text-base font-sans font-medium text-foreground/80 mt-1",children:"How often does this come up in the way you lead?"})]}),l.jsxs(fe,{className:"space-y-8",children:[l.jsxs("p",{className:"text-lg font-medium text-foreground leading-relaxed",children:['"',d,'"']}),l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"px-2",children:l.jsx(Og,{value:[u],onValueChange:h,min:1,max:5,step:1,className:"w-full"})}),l.jsx("div",{className:"flex justify-between px-1",children:w.map(y=>l.jsx("button",{onClick:()=>h([y.value]),className:Z("text-xs px-2 py-1 rounded transition-colors",u===y.value?"bg-primary text-primary-foreground font-medium":"text-muted-foreground hover:text-foreground"),children:y.label},y.value))})]}),l.jsx("div",{className:"bg-muted/50 rounded-lg p-4",children:l.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Answer based on what you actually do under pressure — not what you wish you did. Your Mask profile is revealed at the end."})})]})]})},s)}),l.jsxs("div",{className:"flex justify-between mt-6",children:[l.jsxs(te,{variant:"outline",onClick:m,disabled:s===0,children:[l.jsx(NP,{className:"w-4 h-4 mr-2"}),"Previous"]}),l.jsx(te,{onClick:f,className:"gradient-hero text-primary-foreground",children:s===rr.length-1?l.jsxs(l.Fragment,{children:[l.jsx(oi,{className:"w-4 h-4 mr-2"}),"Complete Assessment"]}):l.jsxs(l.Fragment,{children:["Next",l.jsx(_P,{className:"w-4 h-4 ml-2"})]})})]}),l.jsx("div",{className:"flex justify-center gap-2 mt-6",children:rr.map((y,b)=>l.jsx("button",{onClick:()=>i(b),className:Z("w-2 h-2 rounded-full transition-all",b===s?"bg-primary w-6":o[rr[b].maskId]?"bg-stage-complete":"bg-muted hover:bg-muted-foreground
346/30")},b))})]})}function E4({scores:e}){const n=[...e].sort((o,a)=>a.score-o.score).slice(0,3),r=e.filter(o=>{var a;return((a=Dt.find(c=>c.id===o.maskId))==null?void 0:a.category)==="protective"}).reduce((o,a)=>o+a.score,0),s=e.filter(o=>{var a;return((a=Dt.find(c=>c.id===o.maskId))==null?void 0:a.category)==="control"}).reduce((o,a)=>o+a.score,0),i=o=>Dt.find(a=>a.id===o);return l.jsxs("div",{className:"space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:"Your Experimentation Bias Profile"}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"These Masks show the hidden patterns that may block your experiments. Knowing them is the first step to change."})]}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{className:"pb-2",children:[l.jsx(ge,{className:"text-lg font-sans",children:"Pattern Balance"}),l.jsx(be,{children:"Protective vs. Control Patterns"})]}),l.jsx(fe,{children:l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[l.jsx("span",{children:"Protective"}),l.jsxs("span",{className:"font-medium",children:[r,"/25"]})]}),l.jsx("div",{className:"h-3 bg-muted rounded-full overflow-hidden",children:l.jsx(H.div,{className:"h-full bg-accent",initial:{width:0},animate:{width:`${r/25*100}%`},transition:{duration:.5,delay:.3}})})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[l.jsx("span",{children:"Control"}),l.jsxs("span",{className:"font-medium",children:[s,"/25"]})]}),l.jsx("div",{className:"h-3 bg-muted rounded-full overflow-hidden",children:l.jsx(H.div,{className:"h-full bg-secondary",initial:{width:0},animate:{width:`${s/25*100}%`},transition:{duration:.5,delay:.4}})})]})]})})]})}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[l.jsx($m,{className:"w-5 h-5 text-primary"}),"Your Primary Masks"]}),l.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:n.map((o,a)=>{const c=i(o.maskId);return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2+a*.1},children:l.jsxs(he,{className:Z("h-full border-2 transition-shadow hover:shadow-lg",a===0&&"border-primary shadow-glow"),children:[l.jsxs(we,{className:"pb-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-3xl",children:c.icon}),l.jsxs("span",{className:Z("text-2xl font-bold",o.score>=4?"text-destructive":"text-primary"),children:[o.score,"/5"]})]}),l.jsx(ge,{className:"text-lg font-sans",children:c.name}),l.jsxs(be,{className:"italic",children:['"',c.statement,'"']})]}),l.jsxs(fe,{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-1",children:"Experimentation Bias"}),l.jsx("p",{className:"text-sm text-foreground",children:c.experimentationBias})]}),l.jsx("div",{className:"pt-3 border-t",children:l.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Your personalized steps for this Mask will show up in your final BRAVER Strategy Report. Finish the remaining stages to see them."})})]})]})},c.id)})})]})]})}const qn=[{id:"confirmation",name:"Confirmation Bias",shortDescription:"Looking for information that backs up what you already believe.",fullDescription:"You search for, remember, and favor information that supports your existing beliefs. You give less attention to ideas that challenge them.",innovationImpact:"You will design research to prove your idea instead of test it — and ignore data that says you are wrong.",diagnosticQuestion:"Are you mostly gathering evidence that supports a decision you have already made?",interrogationPrompts:["What evidence would make me change my mind on this?","Who in my organization disagrees with me, and have I really listened to them?","If I had to argue the opposite side, what is the strongest case I could make?"],example:'A CEO who thinks their team is underperforming only meets with managers who agree — then concludes, "Everyone sees the problem."'}
346,{id:"sunk-cost",name:"Sunk Cost Fallacy",shortDescription:"Staying the course because of what you already spent, not what lies ahead.",fullDescription:"You keep going with a plan because of the money, time, or effort already put in — even when stopping is the smarter choice.",innovationImpact:'You will keep funding a failing project because stopping "would waste everything we put in" — making the loss bigger instead of cutting it.',diagnosticQuestion:"Am I choosing this path partly because of the money, time, or effort already spent on it?",interrogationPrompts:["If I were starting fresh today with what I know now, would I still choose this path?","What does it cost to keep going for another quarter vs. stopping right now?","Whose reputation is tied to this project, and is that affecting my judgment?"],example:'A leadership team keeps pushing a $2M software rollout that users hate because "we have already spent 18 months on it."'},{id:"availability",name:"Availability Heuristic",shortDescription:"Treating recent or dramatic examples as if they happen all the time.",fullDescription:"You judge how likely something is based on how easily examples come to mind — usually because they were recent, dramatic, or emotional.",innovationImpact:"You will build your change plan around the loudest recent crisis instead of what the data actually shows over time.",diagnosticQuestion:"Is one recent or dramatic event shaping how I see this challenge more than the actual trend data?",interrogationPrompts:["What does 12 months of data show — not just the last 2 weeks?","How many people are actually affected by what I am treating as urgent?","Am I solving for the loudest complaint or for the real systemic issue?"],example:"After one high-profile customer complaint, a CEO restructures the entire support team — even though NPS has been steady for a year."},{id:"anchoring",name:"Anchoring Bias",shortDescription:"Letting the first number or idea shape every decision that follows.",fullDescription:"You rely too heavily on the first piece of information you hear — whether it is a number, a framing, or someone else's opinion — when making later judgments.",innovationImpact:"Your success criteria will be set by the first benchmark someone mentioned, not by what actually counts as a win.",diagnosticQuestion:"Did the first number or framing I heard quietly become the reference point for everything that followed?",interrogationPrompts:["Where did this target come from, and is it actually the right benchmark?","If I had heard a different number first, would I be aiming somewhere else right now?",'What does "success" look like if I ignore every number that has been mentioned so far?'],example:`A board hears "competitors grow 30%" once, and that becomes the company's target — even though their unit economics make 12% the healthier goal.`},{id:"optimism",name:"Optimism / Pessimism Bias",shortDescription:"Seeing a change as either too easy (optimism) or too doomed (pessimism) instead of using real evidence to forecast.",fullDescription:"Both biases distort your forecast. Optimism Bias makes you believe your plan will go faster, cheaper, and smoother than it will. You also think bad outcomes are less likely to happen to you. Pessimism Bias is the flip side — you assume the change will fail, that resistance will be too strong, or that the downside is worse than the evidence shows. Both replace honest forecasting with emotion.",innovationImpact:"Optimism makes your timeline, budget, and adoption plan too rosy — and blinds you to the ways things actually break. Pessimism makes you under-invest, shrink the idea, or kill it before you test it — losing the upside before you ever find it.",diagnosticQuestion:"Am I forecasting this change from evidence — or does it just feel like it will go much better or much worse than past changes of the same size?",interrogationPrompts:["What was the actual timeline, cost, and adoption curve of the last three changes like this one? Am I planning for that reality — or for a rosy or nightmare version?","What are the top three ways this could fail, and what is my realistic plan for each? What are the top three ways it could succeed, and am I ready to scale them?","If I doubled my timeline and budget, would I still do this? If I cut my fears about resistance in half, would I move faster?"],example:'Optimism: A leader plans an 8-week rollout because "it should be simple" — when similar projects have all taken 6+ months. Pessimism: Another leader cancels a promising pilot before it starts because "our people will never accept it" — without ever testing that belief.'}
346,{id:"groupthink",name:"Groupthink",shortDescription:"Giving up honest debate to keep the peace in the room where decisions are made.",fullDescription:"Tight-knit groups tend to silence disagreement in favor of agreement. This leads to decisions that no single member would have made alone — but everyone goes along with.",innovationImpact:'Your experiment will be designed by the people most motivated to see it succeed, with the loudest voices deciding what "success" means.',diagnosticQuestion:"In the meeting where this direction was set, did anyone push back hard — or did everyone agree quickly?",interrogationPrompts:["Who was not in the room when we made this call, and what would they say?",'Have I formally brought in a dissenting view — a "red team" — before committing?',"If the most senior person in the room were not there, would the conversation go differently?"],example:"A leadership offsite ends with a unanimous strategic pivot — but the frontline managers who were not invited could have predicted exactly why it would fail."}],Je=x.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:Z("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
346ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Je.displayName="Textarea";const C4=Wu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Kn({className:e,variant:t,...n}){return l.jsx("div",{className:Z(C4({variant:t}),e),...n})}function j4({challengeContext:e,initialEntries:t=[],onComplete:n}){const[r,s]=x.useState(()=>{const u={};return qn.forEach(d=>{const f=t.find(m=>m.biasId===d.id)??{biasId:d.id,presence:"unsure",interrogation:"",patternChallenge:""};u[d.id]={patternChallenge:"",...f}}),u}),i=(u,d)=>{s(h=>({...h,[u]:{...h[u],presence:d}}))},o=(u,d)=>{s(h=>({...h,[u]:{...h[u],interrogation:d}}))},a=(u,d)=>{s(h=>({...h,[u]:{...h[u],patternChallenge:d}}))},c=Object.values(r).filter(u=>u.presence==="yes").length;return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 text-primary text-xs font-bold uppercase tracking-wider mb-4",children:[l.jsx(yk,{className:"w-3.5 h-3.5"}),"Cognitive Bias Interrogation"]}),l.jsx("h2",{className:"text-2xl md:text-3xl font-serif font-bold mb-4",children:"Beyond the Mask: The Biases Skewing Your Decisions"}),l.jsxs("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:["The Mask Assessment revealed your ",l.jsx("strong",{children:"leadership patterns and beliefs"}),". Cognitive biases are different — they are universal mental shortcuts that distort your judgment during change, no matter your leadership style. You cannot always avoid them. You can ",l.jsx("em",{children:"interrogate"})," them."]})]}),e&&l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"p-4 bg-primary/5 rounded-lg border border-primary/20 flex items-start gap-3",children:[l.jsx(Hu,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"Examining this through the lens of:"}),l.jsx("p",{className:"text-sm text-foreground",children:e})]})]}),qn.map((u,d)=>{const h=r[u.id];return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15+d*.05},children:l.jsxs(he,{className:Z("border-2 transition-colors",h.presence==="yes"&&"border-destructive/40 bg-destructive/5",h.presence==="no"&&"border-stage-complete/40",h.presence==="unsure"&&"border-border"),children:[l.jsx(we,{children:l.jsx("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsxs("span",{className:"text-xs font-bold text-muted-foreground bg-muted rounded px-2 py-0.5",children:["Bias ",d+1," / ",qn.length]}),u.name]}),l.jsx(be,{className:"mt-1.5",children:u.shortDescription})]})})}),l.jsxs(fe,{className:"space-y-5",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:u.fullDescription}),l.jsxs("div",{className:"rounded-lg bg-background border-l-4 border-destructive/60 p-3",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-1",children:"How it can hurt innovation"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:u.innovationImpact})]}),l.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mb-1",children:"Example"}),l.jsx("p",{className:"text-sm italic text-muted-foreground leading-relaxed",children:u.example})]})]}),l.jsxs("div",{className:"pt-2 border-t space-y-3",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:u.diagnosticQuestion}),l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[l.jsxs(te,{variant:h.presence==="yes"?"default":"outline",size:"sm",onClick:()=>i(u.id,"yes"),className:Z("gap-1.5",h.presence==="yes"&&"bg-destructive hover:bg-destructive/90 text-destructive-foreground"),children:[l.jsx(Cv,{className:"w-4 h-4"}),"Yes, I see it"]}),l.jsxs(te,{variant:h.presence==="unsure"?"default":"outline",size:"sm",onClick:()=>i(u.id,"unsure"),className:"gap-1.5",children:[l.jsx(RP,{className:"w-4 h-4"}),"Unsure"]}),l.jsxs(te,{variant:h.presence==="no"?"default":"outline",size:"sm",onClick:()=>i(u.id,"no"),className:Z("gap-1.5",h.presence==="no"&&"bg-stage-complete hover:bg-stage-complete/90 text-white"),children:[l.jsx(oi,{className:"w-4 h-4"}),"No, not here"]})]})]}),(h.presence==="yes"||h.presence==="unsure")&&l.jsxs(H.div,{initial:{opacity:0,height:0}
346,animate:{opacity:1,height:"auto"},className:"space-y-3 pt-2 border-t",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground mb-2",children:h.presence==="yes"?"How will you dig into this Bias?":"How could you check whether this Bias is affecting you?"}),l.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Pick one or more prompts below to challenge your current thinking:"}),l.jsx("ul",{className:"space-y-1.5 mb-3",children:u.interrogationPrompts.map((f,m)=>l.jsxs("li",{className:"text-sm text-foreground flex items-start gap-2 pl-2 border-l-2 border-primary/30",children:[l.jsx("span",{className:"text-primary font-bold flex-shrink-0",children:"→"}),l.jsx("span",{className:"italic",children:f})]},m))})]}),l.jsx(Je,{value:h.interrogation,onChange:f=>o(u.id,f.target.value),placeholder:h.presence==="yes"?"Describe what you will do to dig into this Bias before moving forward. Who will you talk to? What data will you look at? What assumption will you test?":"(Optional) Note how you might check whether this Bias is shaping your thinking...",className:"min-h-[80px]"}),h.presence==="yes"&&h.interrogation.trim().length>0&&h.interrogation.trim().length<=10&&l.jsx("p",{className:"text-xs text-destructive",children:"Add at least one sentence about your plan to dig into this Bias."}),l.jsxs("div",{className:"pt-3 mt-1 border-t border-dashed",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground mb-1",children:h.presence==="yes"?"Name one thing you will do differently to challenge this pattern:":"(Optional) One thing you could do differently to challenge this pattern:"}),l.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Be specific and concrete. This goes into your final BRAVER plan."}),l.jsx(Je,{value:h.patternChallenge,onChange:f=>a(u.id,f.target.value),placeholder:h.presence==="yes"?'e.g., "Before my next exec review, I will ask the VP who disagrees to present the other side for 15 minutes — and I will not interrupt."':"(Optional) A small behavior change you could try with this problem...",className:"min-h-[70px]"}),h.presence==="yes"&&h.patternChallenge.trim().length>0&&h.patternChallenge.trim().length<=5&&l.jsx("p",{className:"text-xs text-destructive mt-1",children:"Please describe a concrete action you will take."})]})]})]})]})},u.id)}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"p-5 bg-gradient-to-br from-primary/5 to-accent/5 rounded-lg border space-y-3",children:l.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[l.jsxs(Kn,{variant:"secondary",className:"gap-1.5",children:[l.jsx(Cv,{className:"w-3.5 h-3.5 text-destructive"}),c," ",c===1?"bias":"biases"," flagged"]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:c===0?"No Biases flagged yet — be honest with yourself. An unexamined Bias can cost your whole organization.":"Your flagged Biases are the starting point for your research. You do not need to fix them right now — your full plan comes at the end."})]})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 pt-2",children:[l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:()=>n(Object.values(r)),children:["Continue to Assumptions Check",l.jsx(St,{className:"w-5 h-5 ml-2"})]}),l.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-md",children:"All answers are optional — skip any you are unsure about. Your plan summary will remind you to revisit them."})]})]})}const zt=x.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:Z("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));zt.displayName="Input";const OC="criticalOpportunityForm.draft.v1";
346function T4(){try{const e=localStorage.getItem(OC);return e?JSON.parse(e):null}catch{return null}}function N4(e){try{localStorage.setItem(OC,JSON.stringify(e))}catch{}}const _4=[{id:"1:1 Interviews",label:"1:1 Interviews",blurb:"Deep, candid stories from a few key people."},{id:"Anonymous Survey",label:"Anonymous Survey",blurb:"Wider reach, lower-risk truth from many."},{id:"Focus Group",label:"Focus Group",blurb:"Group dynamics surface shared beliefs fast."},{id:"Direct Observation",label:"Direct Observation",blurb:"Watch the work — see what people don't say."},{id:"Listening Post",label:"Listening Post",blurb:"Open channel for ongoing input over time."}],R4=[{id:"Internal Data",label:"Internal Data",blurb:"HR, exit interviews, performance, ops dashboards."},{id:"Industry Report",label:"Industry Report",blurb:"Gartner, McKinsey, Deloitte, sector benchmarks."},{id:"Peer / Competitor",label:"Peer / Competitor",blurb:"What comparable orgs have already learned."},{id:"Academic Research",label:"Academic Research",blurb:"Peer-reviewed studies on the underlying behavior."},{id:"Case Study",label:"Case Study",blurb:"Documented playbooks from similar situations."}];function P4(e,t){const n=e>=7,r=e>=4&&e<7,s=t>=3;return{"1:1 Interviews":3+(s?2:0)+(r?1:0),"Anonymous Survey":2+(n?2:0)+(s?1:0),"Focus Group":2+(s?1:0),"Direct Observation":2+(n?1:0),"Listening Post":1+(n?0:1)}}function A4(e){const t=e>=7;return{"Internal Data":4+(t?2:0),"Industry Report":3,"Peer / Competitor":3+(t?1:0),"Academic Research":2,"Case Study":2+(t?1:0)}}const ec={method:"",who:"",questions:""};function O4({onComplete:e,initialData:t}){var A,z,T,F,W,V,N,R,$,O,L,q,Q;const{data:n,updateCognitiveBiases:r,updateCriticalOpportunity:s}=Io(),i=(n.cognitiveBiases||[]).filter(U=>U.presence==="yes"),o=x.useMemo(()=>[...n.maskScores||[]].sort((U,K)=>K.score-U.score).slice(0,3).map(U=>Dt.find(K=>K.id===U.maskId)).filter(U=>!!U),[n.maskScores]),a=(U,K)=>{const J=(n.cognitiveBiases||[]).map(ee=>ee.biasId===U?{...ee,researchPromptResponse:K}:ee);r(J)},c=(t==null?void 0:t.situation)||((A=n.criticalOpportunity)==null?void 0:A.situation)||"",u=T4(),[d,h]=x.useState((t==null?void 0:t.painLevel)??((z=n.criticalOpportunity)==null?void 0:z.painLevel)??(u==null?void 0:u.painLevel)??5),[f,m]=x.useState((t==null?void 0:t.whatsAtStake)||((T=n.criticalOpportunity)==null?void 0:T.whatsAtStake)||(u==null?void 0:u.whatsAtStake)||""),w=Pg[d],y=(U,K)=>{var J,ee,ie,me,Pe;s({situation:c,whatsAtStake:U,painLevel:K,whatMakesItFall:((J=n.criticalOpportunity)==null?void 0:J.whatMakesItFall)||[],roadblocks:((ee=n.criticalOpportunity)==null?void 0:ee.roadblocks)||[],possibilities:((ie=n.criticalOpportunity)==null?void 0:ie.possibilities)||[],primaryResearch:((me=n.criticalOpportunity)==null?void 0:me.primaryResearch)||[],secondaryResearch:((Pe=n.criticalOpportunity)==null?void 0:Pe.secondaryResearch)||[]})},[b,v]=x.useState((F=t==null?void 0:t.primaryResearch)!=null&&F.length?t.primaryResearch.map(U=>({method:U.method||"",who:U.who||"",questions:U.questions||""})):(W=u==null?void 0:u.primaryResearch)!=null&&W.length?u.primaryResearch:[{...ec}]),[g,p]=x.useState((V=t==null?void 0:t.secondaryResearch)!=null&&V.length?t.secondaryResearch.map(U=>({method:U.method||"",who:U.who||"",questions:U.questions||""})):(N=u==null?void 0:u.secondaryResearch)!=null&&N.length?u.secondaryResearch:[{...ec}]);x.useEffect(()=>{N4({painLevel:d,whatsAtStake:f,primaryResearch:b,secondaryResearch:g})},[d,f,b,g]);const S=(U,K,J,ee)=>{U(ie=>ie.map((me,Pe)=>Pe===K?{...me,[J]:ee}:me))},k=()=>{var U,K,J;e({situation:c,painLevel:d,whatsAtStake:f.trim(),whatMakesItFall:(t==null?void 0:t.whatMakesItFall)||((U=n.criticalOpportunity)==null?void 0:U.whatMakesItFall)||[],roadblocks:(t==null?void 0:t.roadblocks)||((K=n.criticalOpportunity)==null?void 0:K.roadblocks)||[],possibilities:(t==null?void 0:t.possibilities)||((J=n.criticalOpportunity)==null?void 0:J.possibilities)||[],primaryResearch:b.filter(ee=>ee.method.trim()||ee.who.trim()||ee.questions.trim()),secondaryResearch:g.filter(ee=>ee.method.trim()||ee.who.trim()||ee.questions.trim())})},C=b.some(U=>U.method.trim()),j=x.useMemo(()=>P4(d,i.length),[d,i.length]),_=x.useMemo(()=>A4(d),[d]),P=x.useMemo(()=>{var U;return(U=Object.entries(j).sort((K,J)=>J[1]-K[1])[0])==null?void 0:U[0]},[j]),M=x.useMemo(()=>{var U;return(U=Object.entries(_).sort((K,J)=>J[1]-K[1])[0])==null?void 0:U[0]},[_]);
346return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:[l.jsx("span",{className:"text-primary",children:"R"})," — Research Strategy"]}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Build the research plan that will challenge — or confirm — what you believe about your Critical Opportunity. Start with the biases you flagged. Then plan Primary and Secondary research to gather real data, not just opinions."})]}),c&&l.jsxs(H.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.02},className:"p-4 bg-muted/40 rounded-lg border-l-4 border-primary",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1 flex items-center gap-1.5",children:[l.jsx(Hu,{className:"w-3 h-3"})," Researching this critical situation"]}),l.jsx("p",{className:"text-sm text-foreground",children:c})]}),c&&l.jsxs(H.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.04},className:"rounded-xl p-5 border-2 border-primary/30 bg-background/80 space-y-5",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-bold text-foreground flex items-center gap-2",children:[l.jsx(su,{className:"w-4 h-4 text-destructive"})," What happens if nothing changes?"]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-2",children:"One or two lines. The cost of doing nothing for the next 6 months."}),l.jsx(Je,{value:f,onChange:U=>m(U.target.value),onBlur:()=>y(f.trim(),d),placeholder:"e.g., We lose another quarter of frontline talent and miss our Q4 retention target.",className:"min-h-[70px] resize-none",maxLength:400}),l.jsxs("p",{className:"text-[11px] text-muted-foreground text-right mt-1",children:[f.length,"/400"]})]}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-bold text-foreground flex items-center gap-2",children:[l.jsx($m,{className:"w-4 h-4 text-destructive"})," How urgent is this?"]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-3",children:"0 = no issues · 10 = emergency"}),l.jsx(Og,{value:[d],onValueChange:([U])=>{h(U),y(f.trim(),U)},min:0,max:10,step:1}),l.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mt-2 px-1",children:[l.jsx("span",{children:"No issues"}),l.jsx("span",{className:"font-bold text-base text-foreground",children:d}),l.jsx("span",{children:"Emergency"})]}),w&&l.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:w.description})]})]}),c&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.03},children:l.jsxs(he,{className:"border-2 border-primary/40 bg-gradient-to-br from-primary/5 via-background to-accent/5",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(cs,{className:"w-5 h-5 text-primary"}),"Your Critical Opportunity"]}),l.jsx(be,{children:"A summary of what you've found so far — the situation, the stakes, the leadership patterns and biases that may cloud your view, and the assumption you're testing. Let this guide your research plan."})]}),l.jsxs(fe,{className:"space-y-4 text-sm leading-relaxed",children:[l.jsxs("div",{className:"p-4 rounded-md bg-background/80 border border-primary/20 space-y-2",children:[l.jsxs("p",{className:"text-foreground",children:["You are tackling a"," ",l.jsxs("span",{className:"font-semibold text-primary",children:["pain-",d,"/10",w?` (${w.description.toLowerCase()})`:""]})," ","situation: ",l.jsxs("span",{className:"italic",children:['"',c,'"']})]}),(($=(R=n.criticalOpportunity)==null?void 0:R.whatsAtStake)==null?void 0:$.trim())&&l.jsxs("p",{className:"text-foreground",children:[l.jsx("span",{className:"font-semibold",children:"If nothing changes,"})," ",n.criticalOpportunity.whatsAtStake]}),o.length>0&&l.jsxs("p",{className:"text-foreground",children:[l.jsx("span",{className:"font-semibold",children:"The leadership patterns most likely shaping how you see this"})," ","are"," ",o.map((U,K)=>l.jsxs("span",{children:[l.jsx("span",{className:"font-semibold text-primary",children:U.name}),K<o.length-2?", ":K===o.length-2?" and ":""]},U.id))," ","— each carrying its own bias about which experiments feel safe to run."]}),i.length>0&&l.jsxs("p",{className:"text-foreground",children:[l.jsxs("span",{className:"font-semibold",children:["You've flagged ",i.length," cognitive bias",i.length>1?"es":""]})," ","likely distorting your judgment:"," ",i.map(U=>{var K;return(K=qn.find(J=>J.id===U.biasId))==null?void 0:K.name}
346).filter(Boolean).join(", "),"."]}),((L=(O=n.assumptions)==null?void 0:O.beliefStatement)==null?void 0:L.trim())&&l.jsxs("p",{className:"text-foreground",children:[l.jsx("span",{className:"font-semibold",children:"The core belief you're putting on trial:"})," ",l.jsxs("span",{className:"italic",children:['"',n.assumptions.beliefStatement,'"']})]})]}),l.jsxs("div",{className:"p-4 rounded-md bg-primary/10 border-l-4 border-primary",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"The opportunity"}),l.jsxs("p",{className:"text-foreground",children:["If your research disproves what you currently believe about","",l.jsxs("span",{className:"italic",children:['"',c,'"']}),", you unlock a different path forward — one that fixes the real cause instead of the assumed one",(Q=(q=n.criticalOpportunity)==null?void 0:q.whatsAtStake)!=null&&Q.trim()?", and avoids the cost of doing nothing you named above.":".","",l.jsx("span",{className:"font-semibold",children:"Your research plan below is how you find out if you're right."})]})]})]})]})}),i.length>0?l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.04},children:l.jsxs(he,{className:"border-2 border-destructive/30 bg-destructive/5",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(yk,{className:"w-5 h-5 text-destructive"}),"Flagged Biases — Start Here"]}),l.jsxs(be,{children:["These are the cognitive biases you said may be distorting your view. Use them as the ",l.jsx("strong",{children:"starting point"})," for what to investigate. Your full plan will appear in your final BRAVER plan."]})]}),l.jsx(fe,{className:"space-y-3",children:i.map(U=>{const K=qn.find(J=>J.id===U.biasId);return K?l.jsxs("div",{className:"p-3 rounded-md bg-background border border-destructive/20",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground mb-1",children:K.name}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed mb-2",children:K.shortDescription}),l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"Research prompt"}),l.jsxs("p",{className:"text-xs italic text-foreground leading-relaxed mb-2",children:["What data would tell me whether"," ",l.jsx("span",{className:"font-semibold not-italic",children:K.name.toLowerCase()})," is shaping how I see this situation — and what would I see if it weren't?"]}),l.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-foreground/70 block mb-1",children:"Your answer (will appear in your final BRAVER plan)"}),l.jsx(Je,{value:U.researchPromptResponse||"",onChange:J=>a(U.biasId,J.target.value),placeholder:"What evidence would confirm or disprove this bias is shaping your view? What will you go look for?",className:"min-h-[70px] text-sm bg-background"})]},U.biasId):null})})]})}):l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.04},children:l.jsx(he,{className:"border-dashed border-muted-foreground/40 bg-muted/20",children:l.jsx(fe,{className:"p-4 text-sm text-muted-foreground",children:"You didn't flag any cognitive biases as likely distorting your judgment. If that changes, go back to the Bias step. Otherwise, design your research below."})})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:l.jsxs(he,{className:"border-2 border-primary/30",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(zP,{className:"w-5 h-5 text-primary"}),"Primary Research Plan"]}),l.jsx(be,{children:"Original data you gather yourself. Pick a method below — we suggest the best fit for your situation. Then add who you'll talk to and what you want to learn."})]}),l.jsxs(fe,{className:"space-y-4",children:[b.map((U,K)=>{const J=P;return l.jsxs("div",{className:"p-4 border rounded-lg bg-primary/5 space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-sm font-semibold text-primary",children:["Method ",K+1]}),b.length>1&&l.jsx(te,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>v(ee=>ee.filter((ie,me)=>me!==K)),children:l.jsx(Un,{className:"w-3 h-3"})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:"Pick a method"}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:_4.map(ee=>
346{const ie=U.method===ee.id,me=ee.id===J;return l.jsxs("button",{type:"button",onClick:()=>S(v,K,"method",ee.id),className:Z("text-left p-3 rounded-md border-2 transition-all",ie?"border-primary bg-primary/10 shadow-sm":"border-border bg-background hover:border-primary/50"),children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[l.jsx("span",{className:"text-sm font-semibold text-foreground",children:ee.label}),me&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:[l.jsx(Nv,{className:"w-2.5 h-2.5 fill-current"}),"Best fit"]})]}),l.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:ee.blurb})]},ee.id)})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("label",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:["Who you'll engage ",l.jsx("span",{className:"text-muted-foreground font-normal normal-case",children:"(optional)"})]}),l.jsx(zt,{value:U.who,onChange:ee=>S(v,K,"who",ee.target.value),placeholder:"e.g., 8 frontline managers, all Q2 new hires, 5 senior reps..."})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:"What you want to learn"}),l.jsx(Je,{value:U.questions,onChange:ee=>S(v,K,"questions",ee.target.value),placeholder:"One or two questions in plain language. e.g., What's preventing the team from raising risks earlier?",className:"min-h-[80px]"})]})]},K)}),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>v(U=>[...U,{...ec}]),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add another primary method"]})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},children:l.jsxs(he,{className:"border-2 border-accent/30",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(gk,{className:"w-5 h-5 text-accent"}),"Secondary Research Plan"]}),l.jsx(be,{children:"Data others have already gathered. Pick a source — we suggest the best fit. Then add what you want to find out from it."})]}),l.jsxs(fe,{className:"space-y-4",children:[g.map((U,K)=>{const J=M;return l.jsxs("div",{className:"p-4 border rounded-lg bg-accent/5 space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-sm font-semibold text-accent",children:["Source ",K+1]}),g.length>1&&l.jsx(te,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>p(ee=>ee.filter((ie,me)=>me!==K)),children:l.jsx(Un,{className:"w-3 h-3"})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"text-[11px] font-bold uppercase tracking-wider text-accent",children:"Pick a source"}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:R4.map(ee=>{const ie=U.method===ee.id,me=ee.id===J;return l.jsxs("button",{type:"button",onClick:()=>S(p,K,"method",ee.id),className:Z("text-left p-3 rounded-md border-2 transition-all",ie?"border-accent bg-accent/10 shadow-sm":"border-border bg-background hover:border-accent/50"),children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[l.jsx("span",{className:"text-sm font-semibold text-foreground",children:ee.label}),me&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider text-accent bg-accent/15 px-1.5 py-0.5 rounded",children:[l.jsx(Nv,{className:"w-2.5 h-2.5 fill-current"}),"Best fit"]})]}),l.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:ee.blurb})]},ee.id)})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[11px] font-bold uppercase tracking-wider text-accent",children:"What you want to find out"}),l.jsx(Je,{value:U.questions,onChange:ee=>S(p,K,"questions",ee.target.value),placeholder:"One or two questions. e.g., What attrition patterns show up in similar orgs in the first 90 days?",className:"min-h-[80px]"})]})]},K)}),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>p(U=>[...U,{...ec}]),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add another source"]})]})]})}),l.jsxs(H.div,{initial:{opacity:0}
346,animate:{opacity:1},transition:{delay:.3},className:"flex flex-col items-end gap-2",children:[!C&&l.jsx("p",{className:"text-xs text-muted-foreground",children:"Pick at least one primary research method to continue."}),l.jsx(te,{onClick:k,disabled:!C,size:"lg",className:"gradient-hero text-primary-foreground",children:"Save Research Plan"})]})]})}const Xa={"lean-startup":{intro:"Build–Measure–Learn turns your hypothesis into a minimum viable experiment. Fill in each section so anyone can run the experiment without asking you to explain it.",fields:[{key:"riskiestAssumption",label:"Riskiest assumption",helper:"The one belief that, if wrong, would sink the rest of the plan. Write it as a claim you can prove true or false.",placeholder:'e.g., "Frontline managers will adopt the new check-in ritual if it takes less than 10 minutes per week."',type:"textarea",required:!0},{key:"mvpDescription",label:"Minimum Viable Product / Process",helper:"Describe the smallest, cheapest version that still tests your riskiest assumption. No polish — just enough to learn.",placeholder:'e.g., "A 1-page Notion check-in template tested by 4 managers in Region East — no software build, no formal training."',type:"textarea",required:!0},{key:"buildSteps",label:"Build — concrete steps & owners",helper:"List the exact steps to get the experiment running. Name an owner and a deadline for each step.",placeholder:`1) Maria drafts the template (by Mon)
3472) HR Ops sends invites to 4 managers (by Wed)
3483) Pilot kicks off Mon next week`,type:"textarea",required:!0},{key:"measureMetrics",label:"Measure — actionable metrics",helper:"Name 1–3 metrics that should move within the timeframe. Skip vanity metrics — pick numbers that help you decide.",placeholder:'e.g., "Weekly check-in completion rate ≥ 80%; manager-reported time ≤ 10 min; blockers surfaced per week ≥ 2."',type:"textarea",required:!0},{key:"learnDecision",label:"Learn — pivot / persevere / kill rules",helper:"Decide in advance: what result means you scale, what means you adjust, and what means you stop.",placeholder:"Persevere if completion ≥ 80% AND ≥ 2 blockers/wk surfaced. Pivot if completion 40–79%. Kill if < 40% or managers refuse.",type:"textarea",required:!0}]},"five-x-five":{intro:"The 5×5 Method is a one-week leadership sprint. Fill in what you will produce each day so the week runs without re-planning.",fields:[{key:"day1Assess",label:"Day 1 — Assess & Define (Pain Scale + critical question)",helper:"Describe the situation, the pain level, and the one question Day 5 must answer.",placeholder:'Critical question: "Should we move the 90-day onboarding into a buddy-led model by Q4?" Pain: 8/10.',type:"textarea",required:!0},{key:"day2Diagnose",label:"Day 2 — Diagnose People & Process Risk (RACI)",helper:"Who is Responsible, Accountable, Consulted, Informed? Where is the biggest people or process risk?",placeholder:"R: HRBP. A: VP People. C: 3 frontline managers. I: Exec team. Biggest risk: middle managers feel bypassed.",type:"textarea",required:!0},{key:"day3Options",label:"Day 3 — Design Options & Tradeoffs (3 options)",helper:"List three real options. For each one, note the upside, the downside, and how hard it is to reverse.",placeholder:`A) Buddy-led pilot in 1 region — low cost, low blast radius.
349B) Full re-design — high cost, hard to reverse.
350C) Status quo + listening — cheap, slowest.`,type:"textarea",required:!0},{key:"day4Decide",label:"Day 4 — Decide & Sequence (30 / 60 / 90 plan)",helper:"State the chosen option and the first 30/60/90-day moves with named owners.",placeholder:`30: Stand up buddy pilot in Region East (Maria).
35160: Add 2 regions if completion ≥ 80% (Jordan).
35290: Decide enterprise rollout (CEO).`,type:"textarea",required:!0},{key:"day5Commit",label:"Day 5 — Commit & Signal (stakeholder message)",helper:"Write the exact message you will send to stakeholders to make the decision public.",placeholder:"Email/Slack draft to exec team + frontline managers naming the decision, the owner, the timeframe, and the kill criteria.",type:"textarea",required:!0}]},"design-sprint":{intro:"A 5-day Design Sprint ends with a tested prototype on Friday. Fill in each day so the sprint runs without extra planning.",fields:[{key:"sprintQuestion",label:"Sprint question & long-term goal",helper:"The one question the prototype must answer, and the long-term goal it serves.",placeholder:'Question: "Will frontline managers actually use a 10-min weekly check-in?" Goal: cut 90-day attrition by 30%.',type:"textarea",required:!0},{key:"mondayMap",label:"Monday — Map & target",helper:"Map the user journey and pick the one slice the sprint will focus on.",placeholder:"Map: New-hire week 1 → week 4 → week 12. Target slice: week 1 manager check-in.",type:"textarea",required:!0},{key:"tuesdaySketch",label:"Tuesday — Sketch competing solutions",helper:"Who sketches what? Name the participants and the solutions they will explore.",placeholder:"Maria sketches Slack-based check-in. Jordan sketches paper template. Devon sketches an in-person ritual.",type:"textarea",required:!0},{key:"wednesdayDecide",label:"Wednesday — Decide on best solution + storyboard",helper:"The chosen direction and the storyboard the prototype will follow.",placeholder:"Chosen: Slack-based check-in. Storyboard: Mon 9am bot prompt → 3 questions → Wed manager review.",type:"textarea",required:!0},{key:"thursdayPrototype",label:"Thursday — Realistic prototype (owner + scope)",helper:"What gets built, by whom, and what is intentionally faked vs. real?",placeholder:"Owner: Devon. Real: Slack workflow + 3 questions. Faked: manager dashboard (use a mock screenshot).",type:"textarea",required:!0},{key:"fridayTest",label:"Friday — Test with real users (who, where, what we listen for)",helper:"Who you test with, the script, and the signals that count as a yes, no, or maybe.",placeholder:'5 frontline managers, 30-min sessions. Yes if 4/5 say "I would use this weekly." Kill if 3+ say it feels like surveillance.',type:"textarea",required:!0}]},"hypothesis-driven":{intro:"Hypothesis-Driven Development turns your experiment into one falsifiable claim with a measurable signal and a stop rule.",fields:[{key:"capability",label:'Capability — "We believe [this capability]…"',helper:"The specific change in capability, behavior, or process you are putt
352ing in place.",placeholder:'e.g., "We believe giving frontline managers a 10-min weekly buddy check-in capability…"',type:"textarea",required:!0},{key:"outcome",label:'Outcome — "…will result in [this outcome]…"',helper:"The behavior change or business result you expect to see.",placeholder:'e.g., "…will result in new hires reporting clearer expectations and fewer silent quits in their first 90 days…"',type:"textarea",required:!0},{key:"signal",label:'Signal — "…we will know this when we see [measurable signal]"',helper:"The exact metric, threshold, and timeframe that proves the hypothesis right or wrong.",placeholder:'e.g., "…90-day attrition drops from 22% to ≤ 16% over the next two cohorts (≈ 90 days)."',type:"textarea",required:!0},{key:"timebox",label:"Time-box & operating cadence",helper:"Total duration plus how often you will check the data and make a call.",placeholder:"e.g., 8-week test, weekly Friday review of completion rate, mid-point go/no-go at week 4.",type:"textarea",required:!0},{key:"stopRule",label:"Stop / pivot / scale rules",helper:"Set the rules in advance that tell you to scale, adjust, or kill the experiment.",placeholder:"Scale if signal hit by week 6. Pivot if 50–80% of signal. Kill if < 50% by week 4.",type:"textarea",required:!0}]},"safe-to-fail":{intro:"Safe-to-Fail Probes are multiple small, reversible experiments run at the same time — not one big bet. Define each probe so it can run without causing serious damage.",fields:[{key:"complexChallenge",label:"The complex challenge being probed",helper:"Describe the messy, unclear challenge that does not have one right answer.",placeholder:'e.g., "Why are high performers in Region East quietly disengaging from the new comp model?"',type:"textarea",required:!0},{key:"probe1",label:"Probe 1 — what, who, scope, reversibility",helper:"A small probe with a named owner, limited scope, and a clear way to reverse it if things go sideways.",placeholder:"Probe: Open-mic listening sessions with 6 high performers (Maria). Reversible: yes — just stop scheduling them.",type:"textarea",required:!0},{key:"probe2",label:"Probe 2 — what, who, scope, reversibility",placeholder:"Probe: Anonymous pulse on comp clarity in Region East only (Jordan). Reversible: yes.",type:"textarea",required:!0},{key:"probe3",label:"Probe 3 — what, who, scope, reversibility",placeholder:"Probe: Pair 3 high performers with a skip-level mentor for 30 days (Devon). Reversible: yes — end the pairing.",type:"textarea",required:!0},{key:"amplifyDampen",label:"Amplify / dampen rules",helper:"For each probe, what signals would make you do more of it (amplify) or pull back (dampen)?",placeholder:"Amplify probe if engagement signal rises within 4 weeks. Dampen if it creates new conflict without producing insight.",type:"textarea",required:!0}]},"a-b-testing":{intro:"A/B Testing isolates one variable. Define the test so it gives you a clean, trustworthy comparison you can act on.",fields:[{key:"singleVariable",label:"The single variable being tested",helper:"Exactly one thing changes between A and B. Everything else stays the same.",placeholder:'e.g., "Manager check-in cadence: weekly (B) vs. monthly (A). Everything else identical."',type:"textarea",required:!0},{key:"controlGroup",label:"Control (A) — who, how many, how it runs",placeholder:'e.g., "Region West frontline managers (n ≈ 40) keep the current monthly cadence for 6 weeks."',type:"textarea",required:!0},{key:"variantGroup",label:"Variant (B) — who, how many, how it runs",placeholder:'e.g., "Region East frontline managers (n ≈ 40) switch to weekly cadence using the same template, for 6 weeks."',type:"textarea",required:!0},{key:"sampleAndDuration",label:"Sample size & duration (rationale)",helper:"How large does each group need to be, and for how long, before you can trust the result?",placeholder:'e.g., "≥ 35 per group, 6 weeks — long enough to cover two onboarding cohorts."',type:"textarea",required:!0},{key:"primaryMetric",label:"Primary metric & winning threshold",helper:"The one metric that decides A vs. B, plus the threshold that counts as a win.",placeholder:'e.g., "30-day new-hire engagement score. B wins if ≥ 8 points higher than A."',type:"textarea",required:!0},{key:"rolloutDecision",label:"Rollout decision rule",helper:"Set the rule in advance: which result triggers which rollout decision?",placeholder:'e.g., "If B wins by ≥ 8 pts → roll weekly cadence to all regions in Q4. If tie → keep monthly. If B loses → kill."',type:"textarea",required:!0}]}};var I4="Label",IC=x.forwardRef((e,t)=>
352l.jsx(pe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));IC.displayName=I4;var DC=IC;const D4=Wu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ns=x.forwardRef(({className:e,...t},n)=>l.jsx(DC,{ref:n,className:Z(D4(),e),...t}));Ns.displayName=DC.displayName;const MC="experimentBuilder.draft.v1";function M4(){try{const e=localStorage.getItem(MC);return e?JSON.parse(e):null}catch{return null}}function L4(e){try{localStorage.setItem(MC,JSON.stringify(e))}catch{}}function $4({onComplete:e,initialData:t,criticalSituation:n}){const r=M4(),[s,i]=x.useState((t==null?void 0:t.strategyId)||(r==null?void 0:r.selectedStrategy)||""),[o,a]=x.useState((t==null?void 0:t.hypothesis)||(r==null?void 0:r.hypothesis)||""),[c,u]=x.useState((t==null?void 0:t.stopCondition)||(r==null?void 0:r.stopCondition)||""),[d,h]=x.useState((t==null?void 0:t.successCriteria)||(r==null?void 0:r.successCriteria)||""),[f,m]=x.useState((t==null?void 0:t.timeframe)||(r==null?void 0:r.timeframe)||""),[w,y]=x.useState((t==null?void 0:t.stakeholders)||(r==null?void 0:r.stakeholders)||[""]),[b,v]=x.useState((t==null?void 0:t.resources)||(r==null?void 0:r.resources)||[""]),[g,p]=x.useState((t==null?void 0:t.strategyPlan)||(r==null?void 0:r.strategyPlan)||{});x.useEffect(()=>{L4({selectedStrategy:s,hypothesis:o,stopCondition:c,successCriteria:d,timeframe:f,stakeholders:w,resources:b,strategyPlan:g})},[s,o,c,d,f,w,b,g]);const S=ti.find(T=>T.id===s),k=s?Xa[s]:void 0,E=T=>{T(F=>[...F,""])},C=(T,F)=>{T(W=>W.filter((V,N)=>N!==F))},j=(T,F,W)=>{T(V=>V.map((N,R)=>R===F?W:N))},_=(T,F)=>{p(W=>({...W,[T]:F}))},P=()=>{e({strategyId:s,hypothesis:o.trim(),successCriteria:d.trim(),stopCondition:c.trim(),timeframe:f.trim(),stakeholders:w.filter(T=>T.trim()),resources:b.filter(T=>T.trim()),strategyPlan:g})},M=k?k.fields.filter(T=>T.required).every(T=>(g[T.key]||"").trim().length>0):!0,A=!!s&&!k,z=!!s&&(!A||o.trim().length>0&&d.trim().length>0)&&M;return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:[l.jsx("span",{className:"text-primary",children:"E"})," — Experimentation Strategy"]}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Design your experiment. Pick a proven strategy and write your hypothesis. What are you testing? At what scale? What conditions let you learn without extra risk?"})]}),n&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-muted/50 p-4 rounded-lg border",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.jsx("span",{className:"font-medium text-foreground",children:"Your Critical Opportunity:"})," ",n]})}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:[l.jsx(Ns,{className:"text-lg font-semibold mb-4 block",children:"Select an Experimentation Strategy"}),l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:ti.map(T=>l.jsxs(he,{className:Z("cursor-pointer transition-all hover:shadow-md border-2",s===T.id?"border-primary shadow-glow":"border-transparent hover:border-primary/30"),onClick:()=>{i(T.id),m(T.timeframe)},children:[l.jsxs(we,{className:"pb-2",children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsx($f,{className:"w-5 h-5 text-primary"}),s===T.id&&l.jsx(oi,{className:"w-5 h-5 text-stage-complete"})]}),l.jsx(ge,{className:"text-base font-sans",children:T.name})]}),l.jsxs(fe,{children:[l.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:T.description}),T.citedInsight&&l.jsx("p",{className:"text-xs text-accent italic border-l-2 border-accent/30 pl-2 leading-relaxed",children:(()=>{const F=T.citedInsight.match(/^(.*?)\s+—\s+[A-Z][^—]*$/);return(F?F[1]:T.citedInsight).trim()})()})]})]},T.id))})]}),l.jsx(ko,{children:S&&l.jsx(H.div,{initial:{opacity:0,height:0}
352,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:l.jsxs(he,{className:"border-2 border-primary/30 bg-primary/5",children:[l.jsxs(we,{children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ge,{className:"text-lg font-sans",children:S.name}),S.sourceUrl&&l.jsxs("a",{href:S.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary flex items-center gap-1 hover:underline",children:["Learn More ",l.jsx(Mm,{className:"w-3 h-3"})]})]}),l.jsxs(be,{children:["Source: ",S.source]})]}),l.jsxs(fe,{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2",children:"Best For:"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:S.bestFor.map(T=>l.jsx(Kn,{variant:"secondary",children:T},T))})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2",children:"Process Steps:"}),l.jsx("ol",{className:"space-y-2",children:S.steps.map((T,F)=>l.jsxs("li",{className:"flex gap-3 text-sm",children:[l.jsx("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary text-primary-foreground flex items-center justify-center text-xs font-medium",children:F+1}),l.jsx("span",{className:"text-muted-foreground",children:T})]},F))})]})]})]})})}),l.jsx(ko,{children:S&&k&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.25},children:l.jsxs(he,{className:"border-2 border-primary/40 bg-gradient-to-br from-primary/5 via-background to-accent/5",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(OP,{className:"w-5 h-5 text-primary"}),"Build your ",S.name," plan"]}),l.jsx(be,{children:k.intro})]}),l.jsxs(fe,{className:"space-y-5",children:[k.fields.map(T=>l.jsxs("div",{className:"space-y-1",children:[l.jsxs(Ns,{htmlFor:`plan-${T.key}`,className:"text-sm font-semibold",children:[T.label,T.required&&l.jsx("span",{className:"text-destructive",children:" *"})]}),T.helper&&l.jsx("p",{className:"text-xs text-muted-foreground",children:T.helper}),T.type==="textarea"?l.jsx(Je,{id:`plan-${T.key}`,value:g[T.key]||"",onChange:F=>_(T.key,F.target.value),placeholder:T.placeholder,className:"min-h-[90px] bg-background"}):l.jsx(zt,{id:`plan-${T.key}`,value:g[T.key]||"",onChange:F=>_(T.key,F.target.value),placeholder:T.placeholder,className:"bg-background"})]},T.key)),l.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Fill in every required field above so this experiment is ready to run in your final BRAVER plan."})]})]})},`plan-${S.id}`)}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.25},children:l.jsxs(he,{className:"border-2 border-accent/40 bg-accent/5",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx($f,{className:"w-5 h-5 text-accent"}),'"Trying things" vs. Experimentation']}),l.jsx(be,{children:"Experimentation is structured learning under pressure — not guessing and hoping."})]}),l.jsxs(fe,{className:"space-y-4",children:[l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"p-4 rounded-lg bg-destructive/5 border border-destructive/20",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-destructive mb-2",children:"Trying things"}),l.jsx("p",{className:"text-sm italic text-foreground",children:`"Let's roll out the new software to the sales team and see how they like it."`})]}),l.jsxs("div",{className:"p-4 rounded-lg bg-primary/5 border border-primary/20",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-primary mb-2",children:"Experimentation"}),l.jsx("p",{className:"text-sm italic text-foreground",children:`"If we train 5 reps on the new software, we expect them to log 20% more calls in week one. If they don't, we pause the rollout."`})]})]}),l.jsxs("div",{className:"rounded-lg bg-background/60 border p-3",children:[l.jsx("p",{className:"text-xs font-semibold text-foreground mb-2",children:"A real hypothesis has three parts:"}),l.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc list-inside",children:[l.jsxs("li",{children:[l.jsx("strong",{className:"text-foreground",children:"A specific action"})," (who, doing what, at what scale)"]}),l.jsxs("li",{children:[l.jsx("strong",{className:"text-foreground",children:"A measurable prediction"})," (a number, a percentage, a timeframe)"]}),l.jsxs("li",{children:[l.jsx("strong",{className:"text-foreground",children:"A stop condition"})," (what result tells you to pause, pivot, or stop)"]}
352)]})]})]})]})}),A&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(LP,{className:"w-5 h-5 text-primary"}),"Hypothesis Builder"]}),l.jsx(be,{children:"Build your hypothesis in three parts — a specific action, a measurable prediction, and a stop condition. Then set how long you'll run it."})]}),l.jsxs(fe,{className:"space-y-5",children:[l.jsxs("div",{children:[l.jsxs(Ns,{htmlFor:"hypothesis",className:"flex items-baseline gap-2",children:[l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:"Part 1"}),l.jsx("span",{children:"Specific action"})]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-2",children:"Who, doing what, at what scale."}),l.jsx(Je,{id:"hypothesis",value:o,onChange:T=>a(T.target.value),placeholder:"e.g., Train 5 sales reps on the new software and have them use it as their primary CRM for one week.",className:"min-h-[80px]"})]}),l.jsxs("div",{children:[l.jsxs(Ns,{htmlFor:"success",className:"flex items-baseline gap-2",children:[l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-primary",children:"Part 2"}),l.jsx("span",{children:"Measurable prediction"})]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-2",children:"A number, a percentage, a timeframe — something you can actually count."}),l.jsx(Je,{id:"success",value:d,onChange:T=>h(T.target.value),placeholder:"e.g., We expect those 5 reps to log 20% more calls in week one compared to the prior week.",className:"min-h-[80px]"})]}),l.jsxs("div",{children:[l.jsxs(Ns,{htmlFor:"stopCondition",className:"flex items-baseline gap-2",children:[l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-destructive",children:"Part 3"}),l.jsx("span",{children:"Stop condition"})]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-2",children:"What result tells you to pause, pivot, or stop?"}),l.jsx(Je,{id:"stopCondition",value:c,onChange:T=>u(T.target.value),placeholder:"e.g., If call volume drops or stays flat for the 5 reps after one week, we pause the rollout and re-train.",className:"min-h-[80px]"})]}),l.jsxs("div",{className:"pt-2 border-t",children:[l.jsx(Ns,{htmlFor:"timeframe",className:"flex items-baseline gap-2",children:l.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-accent",children:"Duration"})}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-2",children:"The total time before you check results and decide to pause, pivot, or keep going."}),l.jsx(zt,{id:"timeframe",value:f,onChange:T=>m(T.target.value),placeholder:"e.g., 2 weeks, 30 days, one quarter",className:"mt-1"})]})]})]})}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:l.jsxs(he,{children:[l.jsxs(we,{children:[l.jsx(ge,{className:"text-lg font-sans",children:"Key Stakeholders"}),l.jsx(be,{children:"Who needs to be involved or kept informed?"})]}),l.jsxs(fe,{className:"space-y-3",children:[w.map((T,F)=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zt,{value:T,onChange:W=>j(y,F,W.target.value),placeholder:`Stakeholder ${F+1}...`,className:"flex-1"}),w.length>1&&l.jsx(te,{variant:"ghost",size:"icon",onClick:()=>C(y,F),children:l.jsx(Un,{className:"w-4 h-4"})})]},F)),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>E(y),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Stakeholder"]})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},children:l.jsxs(he,{className:"border-2 h-full",children:[l.jsxs(we,{children:[l.jsx(ge,{className:"text-lg font-sans",children:"Resources Needed"}),l.jsx(be,{children:"What do you need to run this experiment?"})]}),l.jsxs(fe,{className:"space-y-3",children:[b.map((T,F)=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zt,{value:T,onChange:W=>j(v,F,W.target.value),placeholder:`Resource ${F+1}...`,className:"flex-1"}),b.length>1&&l.jsx(te,{variant:"ghost",size:"icon",onClick:()=>C(v,F),children:l.jsx(Un,{className:"w-4 h-4"})})]},F)),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>E(v),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Resource"]})]})]})})]}),l.jsx(H.div,{initial:{opacity:0}
352,animate:{opacity:1},transition:{delay:.6},className:"flex justify-end",children:l.jsx(te,{onClick:P,disabled:!z,size:"lg",className:"gradient-hero text-primary-foreground",children:"Save Experiment Design"})})]})}function Ew({onComplete:e,initialData:t,hypothesis:n}){const[r,s]=x.useState((t==null?void 0:t.leadingIndicators)||[""]),[i,o]=x.useState((t==null?void 0:t.laggingIndicators)||[""]),[a,c]=x.useState((t==null?void 0:t.checkpoints)||[{date:"",action:""}]),[u,d]=x.useState((t==null?void 0:t.whyTakeAction)||""),h=p=>{p(S=>[...S,""])},f=(p,S)=>{p(k=>k.filter((E,C)=>C!==S))},m=(p,S,k)=>{p(E=>E.map((C,j)=>j===S?k:C))},w=()=>{c(p=>[...p,{date:"",action:""}])},y=p=>{c(S=>S.filter((k,E)=>E!==p))},b=(p,S,k)=>{c(E=>E.map((C,j)=>j===p?{...C,[S]:k}:C))},v=()=>{e({leadingIndicators:r.filter(p=>p.trim()),laggingIndicators:i.filter(p=>p.trim()),checkpoints:a.filter(p=>p.date.trim()||p.action.trim()),whyTakeAction:u.trim()})},g=r.some(p=>p.trim())&&u.trim();return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:[l.jsx("span",{className:"text-primary",children:"R"})," — Results Measurement"]}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Decide what success looks like before you start the experiment. Set your metrics, track results, and make decisions based on evidence."})]}),n&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-muted/50 p-4 rounded-lg border",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.jsx("span",{className:"font-medium text-foreground",children:"Your Hypothesis:"})," ",n]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(jk,{className:"w-5 h-5 text-stage-complete"}),"Leading Indicators"]}),l.jsx(be,{children:"Early signs that point to success. What will you notice first if the experiment is working?"})]}),l.jsxs(fe,{className:"space-y-3",children:[r.map((p,S)=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zt,{value:p,onChange:k=>m(s,S,k.target.value),placeholder:"e.g., Increased team engagement in first week...",className:"flex-1"}),r.length>1&&l.jsx(te,{variant:"ghost",size:"icon",onClick:()=>f(s,S),children:l.jsx(Un,{className:"w-4 h-4"})})]},S)),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>h(s),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Leading Indicator"]})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(HP,{className:"w-5 h-5 text-primary"}),"Lagging Indicators"]}),l.jsx(be,{children:"Final results that confirm success. What will look different when it is done?"})]}),l.jsxs(fe,{className:"space-y-3",children:[i.map((p,S)=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zt,{value:p,onChange:k=>m(o,S,k.target.value),placeholder:"e.g., 50% reduction in my decision bottleneck time...",className:"flex-1"}),i.length>1&&l.jsx(te,{variant:"ghost",size:"icon",onClick:()=>f(o,S),children:l.jsx(Un,{className:"w-4 h-4"})})]},S)),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>h(o),className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Lagging Indicator"]})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(vk,{className:"w-5 h-5 text-accent"}),"Review Checkpoints"]}),l.jsx(be,{children:"Set clear deadlines. Experiments without deadlines easily become distractions."})]}),l.jsxs(fe,{className:"space-y-3",children:[a.map((p,S)=>l.jsxs("div",{className:"flex gap-2",children:[l.jsx(zt,{type:"text",value:p.date,onChange:k=>b(S,"date",k.target.value),placeholder:"When (e.g., Day 7)",className:"w-32"}),l.jsx(zt,{value:p.action,onChange:k=>b(S,"action",k.target.value),placeholder:"What to check or action to take...",className:"flex-1"}),a.length>1&&l.jsx(te,{variant:"ghost",size:"icon",onClick:()=>y(S),children:l.jsx(Un,{className:"w-4 h-4"})})]},S)),l.jsxs(te,{variant:"outline",size:"sm",onClick:w,className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Checkpoint"]})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20}
352,animate:{opacity:1,y:0},transition:{delay:.5},children:l.jsxs(he,{className:"border-2 border-primary/30",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(su,{className:"w-5 h-5 text-primary"}),"Why Action Must Be Taken"]}),l.jsx(be,{children:"Doing nothing always has a cost. What will you lose if you do not experiment?"})]}),l.jsx(fe,{children:l.jsx(Je,{value:u,onChange:p=>d(p.target.value),placeholder:"Every day you wear the Mask, hidden costs grow: stalled progress, lost trust, missed chances to innovate...",className:"min-h-[120px]"})})]})}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"flex items-start gap-3 p-4 bg-secondary/10 rounded-lg",children:[l.jsx(Zs,{className:"w-5 h-5 text-secondary flex-shrink-0 mt-0.5"}),l.jsxs("div",{className:"text-sm",children:[l.jsx("p",{className:"font-medium text-secondary",children:"Innovation without focus leads to burnout."}),l.jsx("p",{className:"text-muted-foreground",children:"Innovation with clarity creates momentum."})]})]}),l.jsx(H.div,{initial:{opacity:0}
352,animate:{opacity:1},transition:{delay:.7},className:"flex justify-end",children:l.jsx(te,{onClick:v,disabled:!g,size:"lg",className:"gradient-hero text-primary-foreground",children:"Complete Experiment Design"})})]})}var B4="Separator",Cw="horizontal",F4=["horizontal","vertical"],LC=x.forwardRef((e,t)=>{const{decorative:n,orientation:r=Cw,...s}=e,i=V4(r)?r:Cw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(pe.div,{"data-orientation":i,...a,...s,ref:t})});LC.displayName=B4;function V4(e){return F4.includes(e)}var $C=LC;const Br=x.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx($C,{ref:s,decorative:n,orientation:t,className:Z("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Br.displayName=$C.displayName;function U4(e){return e?e>=9?"critical":e>=7?"high":e>=4?"moderate":"low":"low"}function z4(e){var K,J,ee,ie,me,Pe,gt,nt,Mt,oe,yt,Zn,Sr,er,Lo,Er,$o,Pn,kl,Sl,vt;const t=e.challengeType==="personal",n=[...e.maskScores].sort((ue,Ze)=>Ze.score-ue.score)[0],r=n?Dt.find(ue=>ue.id===n.maskId):null,s=[...e.maskScores].sort((ue,Ze)=>Ze.score-ue.score)[1],i=s?Dt.find(ue=>ue.id===s.maskId):null,o=(e.cognitiveBiases||[]).filter(ue=>ue.presence==="yes"),a=o.map(ue=>{var Ze;return(Ze=qn.find(Bo=>Bo.id===ue.biasId))==null?void 0:Ze.name}).filter(Boolean),c=e.criticalOpportunity,u=U4(c==null?void 0:c.painLevel);c&&Pg[c.painLevel];const d=e.experiment?ti.find(ue=>ue.id===e.experiment.strategyId):null,h=e.experiment?Xa[e.experiment.strategyId]:null;h&&e.experiment&&h.fields.filter(ue=>{var Ze;return(((Ze=e.experiment.strategyPlan)==null?void 0:Ze[ue.key])||"").trim().length>0}).length,h&&h.fields.length,(K=e.validationStakeholders)!=null&&K.length;const f=e.actionAnalysis,m=f?[f.people,f.processes,f.systems,f.policies,f.environment].filter(ue=>ue==null?void 0:ue.trim()).length:0,w=((J=c==null?void 0:c.situation)==null?void 0:J.trim())||"",y=((ee=c==null?void 0:c.whatsAtStake)==null?void 0:ee.trim())||"",b=((me=(ie=e.experiment)==null?void 0:ie.hypothesis)==null?void 0:me.trim())||"",v=((gt=(Pe=e.experiment)==null?void 0:Pe.successCriteria)==null?void 0:gt.trim())||"",g=((Mt=(nt=e.experiment)==null?void 0:nt.stopCondition)==null?void 0:Mt.trim())||"",p=((yt=(oe=e.experiment)==null?void 0:oe.timeframe)==null?void 0:yt.trim())||"",S=((Sr=(Zn=e.metrics)==null?void 0:Zn.leadingIndicators)==null?void 0:Sr.filter(ue=>ue==null?void 0:ue.trim()))||[],k=(e.validationStakeholders||[]).map(ue=>{var Ze;return(Ze=ue.who)==null?void 0:Ze.trim()}).filter(Boolean),E=k[0],C=w.length>120?`${w.slice(0,117)}…`:w,j=[];w?j.push(`The problem you chose: "${C}". You rated the pain ${c.painLevel}/10, which means ${u} urgency.`):j.push("You have not picked one clear problem yet. Pick one before doing anything else."),y&&j.push(`What's on the line if nothing changes: ${y}`),r&&j.push(`Your strongest mask is "${r.name}." Under stress you tend to ${r.experimentationBias.toLowerCase()} Watch for that as you run this test.`),b&&j.push(`Your test: ${b}`),v&&j.push(`You'll call it a win when: ${v}`),u==="critical"||u==="high"?j.push("The pain is high enough that waiting costs more than testing. Start the smallest version of this test in the next 14 days."):u==="moderate"&&j.push("The pain is real but not on fire. Use the time to design carefully — and set a hard launch date so it does not drift.");const _=j.join(" ");let P="";if(r&&w){const ue=((er=r.recommendations[0])==null?void 0:er.actionStep)||"do the opposite of your usual move, on purpose, for one cycle.";P=`Your biggest single move: when you work on "${C}", do the opposite of your "${r.name}" habit. Concretely — ${ue.toLowerCase()} That one swap will unblock more than any new tool or meeting.`}else w?P=`Pick one small piece of "${C}" and test it this week. Don't try to solve the whole thing. Proof first, plan second.`:P="Lock in one clear problem first. Without that, every next step is guesswork.";const M=[];if(r){const ue=((Lo=r.recommendations[0])==null?void 0:Lo.actionStep)||"name one specific behavior you will replace it with.";M.push({title:`Your "${r.name}
352" habit will show up under pressure`,detail:`When this test gets hard, you'll want to ${r.experimentationBias.toLowerCase()} Decide now what you'll do instead: ${ue}`})}i&&s.score>=3&&M.push({title:`Backup pattern: "${i.name}"`,detail:`When the first habit fails, this one fills in. Watch for: ${i.consequence.toLowerCase()}`}),o.slice(0,3).forEach(ue=>{var xs;const Ze=qn.find(md=>md.id===ue.biasId);if(!Ze)return;const Bo=t?"an accountability partner":"the team";M.push({title:`${Ze.name} is shaping how you see this`,detail:(xs=ue.patternChallenge)!=null&&xs.trim()?`You said you'd push back with: "${ue.patternChallenge.trim()}". Write that on your test page so ${Bo} can hold you to it.`:`${Ze.shortDescription} Write one short rule to push back, and keep it visible while you run the test.`})}),(u==="critical"||u==="high")&&b&&M.push({title:"High pain can push you to skip the test",detail:'When it hurts, you want to "just fix it." That usually means picking the first idea that sounds right. Wait 48 hours between finishing the design and launching, so you can poke holes in it.'}),k.length===0&&M.push({title:"You have not named real people to talk to",detail:"Without specific names, this becomes a thought exercise. List 3 actual people (not job titles) you will talk to in week one."}),m<3&&M.push({title:"You have not thought through the ripple effects",detail:"You only mapped a few of the 5 ripple areas (people, processes, systems, policies, environment). Expect surprises from the ones you skipped — go finish them before launch."});const A=[];A.push({title:"Week 1 — Check the problem is real",detail:k.length>0?`Talk to ${k.slice(0,3).join(", ")}${k.length>3?`, and ${k.length-3} more`:""}. Ask them to describe the problem in their own words. Do not pitch your idea. You're checking if "${C||"this problem"}" is the same problem they live with.`:`Find 3-5 people closest to "${C||"this problem"}". Ask them to describe it in their own words. Do not pitch a fix yet.`}),A.push({title:"Week 2 — Design the smallest version of the test",detail:d?`Using the ${d.name}, shrink the test until it could run in 2 weeks or less. ${b?`Your current test is: "${b}". Cut anything that isn't needed to learn whether that's true.`:"Cut anything that isn't needed to learn the one thing."}`:"Pick one test method and shrink it so it can run in 2 weeks or less. Cut scope, not quality."}),A.push({title:"Week 3-4 — Run it and decide",detail:S.length>0?`Watch your leading signals (${S.slice(0,2).join(", ")}${S.length>2?"…":""}) every week. ${v?`When you hit the checkpoint, compare to your win condition — "${v}" — and choose: keep going, change direction, or stop. `:"At the checkpoint, choose: keep going, change direction, or stop. "}No fourth option.`:`Pick 2-3 signals to watch each week before launch. ${v?`At the checkpoint, compare results to your win condition: "${v}".`:"At the checkpoint, choose: keep going, change direction, or stop."}`}),A.push({title:"Week 5 — Write down what you learned",detail:`Win or lose, write one page: what you tested${b?` ("${b.slice(0,80)}${b.length>80?"…":""}")`:""}, what you found, and what you'll do next. Share it. The learning is the real product.`});const z=[],T=[],F=[];w&&z.push(k.length>0?`Confirm "${C}" is real by talking to ${k.slice(0,3).join(", ")}${k.length>3?` and ${k.length-3} more`:""}.`:`Confirm "${C}" is real with 3-5 people who live with it.`),r&&z.push(`Catch yourself doing the "${r.name}" move in one specific decision this week. Name it out loud and pick a different move.`),b?z.push(`Launch the smallest version of this test: "${b}".`):d&&z.push(`Launch the smallest version of your ${d.name} test.`),z.push(v||g?`Write your test, win signal${v?` ("${v}")`:""}${g?`, and stop rule ("${g}")`:""} in one shared doc.`:"Write your test, win signal, and stop rule in one shared doc."),T.push(S.length>0?`Hold a checkpoint review against your signals (${S.slice(0,2).join(", ")}${S.length>2?"…":""}). Choose: keep going, change direction, or stop.`:"Hold a 30-day review against the signals you set. Choose: keep going, change direction, or stop."),T.push("Publish a one-page learning note from the first cycle — even if the test failed."),a.length>0&&T.push(`Re-check your flagged biases (${a.slice(0,2).join(", ")}${a.length>2?"…":""}). Has new evidence changed your mind?`),m<5&&T.push("Finish the ripple-effect areas you skipped (people, processes, systems, policies, environment)."),F.push(b?`Run a second cycle of the test, shaped by what you learned about "${C||"the problem"}".`:"Run a second cycle, shaped by what the first one taught you."),F.push("Set a simple review rhythm: who reads results, how often, and what the one-page note must include."),r&&F.push(`Ask one trusted peer: am I still defaulting to the "${r.name}" move as much as I was 90 days ago?`),F.push(w?`Decide on "${C}": scale it, retire it, or redesign it from scratch.`:"Decide whether to scale, retire, or redesign the original problem.");const W=[];W.push(w?`Make a clear yes/no call on "${C}", backed by 2 full test cycles of real evidence.`:"Make a clear yes/no call on the problem you picked, backed by 2 full test cycles."),W.push("Set a monthly meeting where every running test gets a call: keep going, change direction, or stop. Nothing rolls over without a decision."),W.push("Move at least one tested idea into a funded next step, with one named owner, a budget, and a 90-day plan."),r&&W.push(`Re-take the mask check. Goal: "${r.name}" is no longer your #1 default.`),W.push('Share a short scorecard of "decisions made vs. decisions stuck" so everyone can see how fast calls are getting made.');const V=[];V.push(w?`Turn "${C}" into a real number — revenue, cost saved, time back, or a strategy goal. Name the number now and hold yourself to it.`:"Turn the tested work into a real number — revenue, cost saved, or a strategy goal. Name it now."),V.push("Run every major bet through the six BRAVER stages before funding it, no matter who is asking."),V.push("Do a year-end look-back: which calls paid off, which did not, and which masks or biases kept twisting your view?"),V.push("Pick the next big problem and start a fresh BRAVER cycle. The engine only works if it keeps running."),V.push("Teach at least one person on your side to run their own BRAVER cycle end-to-e
352nd. Scaling innovation means scaling decision-makers.");const N=[{title:"The test quietly stalls",detail:`Fix: put a hard checkpoint date on the calendar now${p?` (you said ${p})`:""}. If you have no real data by that date, the test failed. Name it and decide the next move.`},{title:'You confuse "being busy" with progress',detail:'Fix: at each checkpoint, separate "we did things" from "we learned things." Only the second one counts.'}];r&&N.push({title:`You slip back into the "${r.name}" habit under pressure`,detail:"Fix: pick one peer or coach now and give them permission to call it out. Tell them the exact behavior to watch for."}),(u==="critical"||u==="high")&&w&&N.push({title:"The urgency pushes you to skip the test",detail:`Fix: the more you want to "just fix ${C}", the smaller the test should be — not bigger. If you catch yourself growing scope to "solve it now," stop.`}),k.length<3&&N.push({title:"You build for the user you imagine, not a real one",detail:"Fix: no design decision moves forward without at least one real person, named, who confirmed the need in the last 14 days."}),g&&N.push({title:"You ignore your own stop rule",detail:`You wrote: "${g}". If that hits, stop — even if you don't want to. Sunk effort is not a reason to keep going.`});const R=[{title:"You decide",detail:"You make the call at each checkpoint: keep going, change direction, or stop. Don't turn it into a group vote — that's how tests die slowly."},{title:"You consult",detail:k.length>0?`Your named people: ${k.slice(0,5).join(", ")}${k.length>5?`, plus ${k.length-5} more`:""}. They shape the design. They don't make the call.`:"Pick 2-3 trusted advisors whose input shapes the design — but does not control the decision. Without this you'll either over-ask (stuck) or under-ask (blind spots)."},{title:"You inform",detail:t?`A small circle of trusted peers${E?` (starting with ${E})`:""}. They get the one-page note at each checkpoint — no surprises, no rumors.`:"Your team and nearby leaders. They get the one-page note at each checkpoint — no surprises, no fear of missing out, no rumors."}],$=((Er=c==null?void 0:c.situation)==null?void 0:Er.trim())||"your critical opportunity",O=(Pn=($o=e.metrics)==null?void 0:$o.leadingIndicators)==null?void 0:Pn[0],L=r?`Your dominant pattern is ${r.name} ("${r.statement}"). This ${r.consequence.toLowerCase()}. In experiments, that means you ${r.experimentationBias.toLowerCase()}. Today: ${((kl=r.recommendations[0])==null?void 0:kl.actionStep)||"Pick one behavior to hand off or do differently."}`:c?`Write a single sentence that names "${$}" as your #1 priority for the next 30 days. Send it to one person who will hold you to it.`:"Lock in your critical opportunity in one sentence and send it to one trusted peer.",q=O?`Next Friday, check: "${O}". If it moved, you have signal. If it did not, ask why before you change anything.`:(vt=(Sl=e.experiment)==null?void 0:Sl.successCriteria)!=null&&vt.trim()?`Next Friday, check against your success criteria: "${e.experiment.successCriteria.trim()}". Persevere, pivot, or kill — pick one.`:"Next Friday, ask: did we generate any new evidence this week? If no — that IS the signal.",Q=r?`Stop doing this: ${r.experimentationBias}. Catch yourself once this week and name it out loud in the moment.`:"Stop confusing activity with progress. If a meeting did not produce a decision or new evidence, it did not move the experiment.";return{executionPlan:{doToday:L,successSignal:q,stopDoing:Q},executiveSummary:_,leveragePoint:P,watchOuts:M,sequencing:A,thirtySixtyNinety:{thirty:z,sixty:T,ninety:F},sixMonths:W,oneYear:V,preMortem:N,decisionRights:R}}const W4=()=>new Date().toISOString().slice(0,10),H4=()=>{const e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),s=Math.random().toString(36).slice(2,6).toUpperCase();return`BRAVER-${t}${n}${r}-${s}`};function q4(e){var y,b,v,g,p,S,k,E;if(!e.experiment||!e.criticalOpportunity)return null;const t=ti.find(C=>C.id===e.experiment.strategyId),n=(t==null?void 0:t.name)??"Experiment",r=[...e.maskScores].sort((C,j)=>j.score-C.score)[0],s=r?(y=Dt.find(C=>C.id===r.maskId))==null?void 0:y.name:null,i=(e.cognitiveBiases||[]).filter(C=>C.presence==="yes").length,o=e.criticalOpportunity,a=`Test whether ${n.toLowerCase()} can shift the situation: "${o.situation.trim()}"`,c=[];c.push(`Strategy: ${n}`),e.experiment.timeframe&&c.push(`Timeframe: ${e.experiment.timeframe}`),(b=e.experiment.stakeholders)!=null&&b.length&&c.push(`Stakeholders engaged: ${e.experiment.stakeholders.join(", ")}`);const u=Xa[e.experiment.strategyId],d=e.experiment.strategyPlan||{};u&&u.fields.filter(C=>(d[C.key]||"").trim().length>0).slice(0,4).forEach(C=>c.push(C.label));const h=["Permanent policy or org-structure changes (require separate decision after charter review)","Anything outside the stated t
352imeframe and stakeholder group","Scaling the experiment before success criteria are met"],f=[];s&&f.push(`Dominant mask "${s}" may pull you back to old patterns under pressure`),i>0&&f.push(`${i} cognitive bias${i>1?"es":""} flagged — revisit interrogation notes mid-experiment`),o.painLevel>=8&&f.push("High pain level (8+) increases pressure to abandon experiment for a quick fix"),(v=o.roadblocks)!=null&&v.length&&o.roadblocks.filter(C=>C.trim()).slice(0,2).forEach(C=>f.push(`Known roadblock: ${C.trim()}`)),f.length===0&&f.push("No major risks flagged — schedule a mid-point review to surface emerging risks");const m=e.challengeType==="team"?"Team / Executive Sponsor (assign before kickoff)":"Self (Executive Innovator)",w=e.challengeType==="team"?"Sponsor approves go/no-go at each checkpoint. Charter owner runs the experiment day-to-day and escalates blockers within 48 hours.":"Charter owner (you) makes day-to-day decisions. Pre-commit to a named accountability partner who reviews progress at each checkpoint.";return{charterId:H4(),issuedOn:W4(),sponsor:m,purpose:a,problemStatement:o.situation.trim()+((g=o.whatsAtStake)!=null&&g.trim()?` — At stake: ${o.whatsAtStake.trim()}`:""),hypothesis:e.experiment.hypothesis,strategyName:n,inScope:c,outOfScope:h,successCriteria:e.experiment.successCriteria,stopCondition:e.experiment.stopCondition,leadingIndicators:((p=e.metrics)==null?void 0:p.leadingIndicators)??[],laggingIndicators:((S=e.metrics)==null?void 0:S.laggingIndicators)??[],timeframe:e.experiment.timeframe,milestones:((k=e.metrics)==null?void 0:k.checkpoints)??[],stakeholders:e.experiment.stakeholders??[],resources:e.experiment.resources??[],risks:f,governance:w,rationale:((E=e.metrics)==null?void 0:E.whyTakeAction)??"The cost of inaction exceeds the cost of running this experiment."}}function K4(e){var n;const t=[];return t.push("═══════════════════════════════════════════════════════════════"),t.push("                    EXPERIMENT CHARTER"),t.push("═══════════════════════════════════════════════════════════════"),t.push(`Charter ID: ${e.charterId}
352`),t.push(`Issued: ${e.issuedOn}`),t.push(`Sponsor: ${e.sponsor}`),t.push(""),t.push("PURPOSE"),t.push(`  ${e.purpose}`),t.push(""),t.push("PROBLEM STATEMENT"),t.push(`  ${e.problemStatement}`),t.push(""),t.push("HYPOTHESIS"),t.push("  Part 1 — Specific action:"),t.push(`    ${e.hypothesis}`),t.push("  Part 2 — Measurable prediction:"),t.push(`    ${e.successCriteria}`),(n=e.stopCondition)!=null&&n.trim()&&(t.push("  Part 3 — Stop condition:"),t.push(`    ${e.stopCondition}`)),t.push(""),t.push("STRATEGY"),t.push(`  ${e.strategyName}`),t.push(""),t.push("SCOPE — IN"),e.inScope.forEach(r=>t.push(`  • ${r}`)),t.push(""),t.push("SCOPE — OUT"),e.outOfScope.forEach(r=>t.push(`  • ${r}`)),t.push(""),e.leadingIndicators.length&&(t.push("LEADING INDICATORS"),e.leadingIndicators.forEach(r=>t.push(`  • ${r}`)),t.push("")),e.laggingIndicators.length&&(t.push("LAGGING INDICATORS"),e.laggingIndicators.forEach(r=>t.push(`  • ${r}`)),t.push("")),t.push("TIMEFRAME"),t.push(`  ${e.timeframe}`),t.push(""),e.milestones.length&&(t.push("MILESTONES & CHECKPOINTS"),e.milestones.forEach(r=>t.push(`  ${r.date}: ${r.action}`)),t.push("")),e.stakeholders.length&&(t.push("STAKEHOLDERS"),e.stakeholders.forEach(r=>t.push(`  • ${r}`)),t.push("")),e.resources.length&&(t.push("RESOURCES REQUIRED"),e.resources.forEach(r=>t.push(`  • ${r}`)),t.push("")),t.push("RISKS & MITIGATIONS TO MONITOR"),e.risks.forEach(r=>t.push(`  • ${r}
352`)),t.push(""),t.push("GOVERNANCE & DECISION RIGHTS"),t.push(`  ${e.governance}`),t.push(""),t.push("RATIONALE — WHY ACTION MUST BE TAKEN"),t.push(`  ${e.rationale}`),t.push(""),t.push("SIGN-OFF"),t.push("  Charter Owner: __________________________   Date: __________"),t.push("  Sponsor:       __________________________   Date: __________"),t.push("═══════════════════════════════════════════════════════════════"),t.join(`
353`)}function G4({charter:e}){var t;return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.55},children:l.jsxs(he,{className:"border-2 border-primary/40 bg-gradient-to-br from-card via-card to-primary/5 print:break-before-page",children:[l.jsx(we,{className:"border-b border-primary/20",children:l.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[l.jsxs("div",{children:[l.jsxs(ge,{className:"text-xl font-serif flex items-center gap-2",children:[l.jsx(UP,{className:"w-5 h-5 text-primary"}),"Experiment Charter"]}),l.jsx(be,{children:"A ready-to-sign Experiment Charter. Use it to approve and guide your experiment."})]}),l.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Charter ID:"})," ",e.charterId]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Issued:"})," ",e.issuedOn]}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-foreground",children:"Sponsor:"})," ",e.sponsor]})]})]})}),l.jsxs(fe,{className:"space-y-6 pt-6",children:[l.jsx(xt,{icon:l.jsx(Hu,{className:"w-4 h-4"}),title:"Purpose",children:l.jsx("p",{className:"text-sm text-muted-foreground italic",children:e.purpose})}),l.jsx(xt,{title:"Problem Statement",children:l.jsx("p",{className:"text-sm text-foreground",children:e.problemStatement})}),l.jsx(xt,{title:"Hypothesis",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-primary mb-1",children:"Part 1 — Specific action"}),l.jsx("p",{className:"text-sm text-foreground",children:e.hypothesis})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-primary mb-1",children:"Part 2 — Measurable prediction"}),l.jsx("p",{className:"text-sm text-foreground",children:e.successCriteria})]}),((t=e.stopCondition)==null?void 0:t.trim())&&l.jsxs("div",{children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-destructive mb-1",children:"Part 3 — Stop condition"}),l.jsx("p",{className:"text-sm text-foreground",children:e.stopCondition})]})]})}),l.jsx(xt,{title:"Strategy",children:l.jsx(Kn,{variant:"secondary",children:e.strategyName})}),l.jsx(Br,{}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(xt,{title:"In Scope",children:l.jsx("ul",{className:"space-y-1.5",children:e.inScope.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground flex gap-2",children:[l.jsx("span",{className:"text-stage-complete",children:"✓"}),l.jsx("span",{children:n})]},r))})}),l.jsx(xt,{title:"Out of Scope",children:l.jsx("ul",{className:"space-y-1.5",children:e.outOfScope.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground flex gap-2",children:[l.jsx("span",{className:"text-destructive",children:"✕"}),l.jsx("span",{children:n})]},r))})})]}),l.jsx(Br,{}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.leadingIndicators.length>0&&l.jsx(xt,{title:"Leading Indicators",children:l.jsx("ul",{className:"space-y-1",children:e.leadingIndicators.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground",children:["• ",n]},r))})}),e.laggingIndicators.length>0&&l.jsx(xt,{title:"Lagging Indicators",children:l.jsx("ul",{className:"space-y-1",children:e.laggingIndicators.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground",children:["• ",n]},r))})})]}),l.jsx(Br,{}),l.jsx(xt,{icon:l.jsx(vk,{className:"w-4 h-4"}),title:"Timeframe",children:l.jsx("p",{className:"text-sm text-foreground",children:e.timeframe})}),e.milestones.length>0&&l.jsx(xt,{title:"Milestones & Checkpoints",children:l.jsx("div",{className:"space-y-2",children:e.milestones.map((n,r)=>l.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[l.jsx(Kn,{variant:"outline",children:n.date}),l.jsx("span",{className:"text-muted-foreground",children:n.action})]},r))})}),e.stakeholders.length>0&&l.jsx(xt,{icon:l.jsx(qu,{className:"w-4 h-4"}),title:"Stakeholders",children:l.jsx("div",{className:"flex flex-wrap gap-2",children:e.stakeholders.map((n,r)=>l.jsx(Kn,{variant:"secondary",children:n},r))})}),e.resources.length>0&&l.jsx(xt,{title:"Resources Required",children:l.jsx("ul",{className:"space-y-1",children:e.resources.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground",children:["• ",n]},r))})}),l.jsx(Br,{}),l.jsx(xt,{icon:l.jsx(Ck,{className:"w-4 h-4 text-destructive"}),title:"Risks to Monitor",children:l.jsx("ul",{className:"space-y-1.5",children:e.risks.map((n,r)=>l.jsxs("li",{className:"text-sm text-muted-foreground flex gap-2",children:[l.jsx("span",{className:"text-destructive mt-0.5",children:"▲"}),l.jsx("span",{children:n})]},r))})}),l.jsx(xt,{icon:l.jsx($P,{className:"w-4 h-4"}),title:"Governance & Decision Rights",children:l.jsx("p",{className:"text-sm text-foreground",children:e.governance})}),l.jsx(xt,{title:"Rationale — Why You Must Act Now",children:l.jsx("p",{className:"text-sm text-foreground italic",children:e.rationale})}),l.jsx(Br,{}),l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm font-semibold mb-4 flex items-center gap-2",children:[l.jsx(WP,{className:"w-4 h-4 text-primary"}),"Sign-Off"]}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx(jw,{role:"Charter Owner"}),l.jsx(jw,{role:"Sponsor"})]})]})]})]})})}function xt({title:e,icon:t,children:n}){return l.jsxs("div",{children:[l.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-primary mb-2 flex items-center gap-1.5",children:[t,e]}),n]})}function jw({role:e}){return l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:e}
vendor: 4,180 bytes, line 353
353),l.jsx("div",{className:"border-b-2 border-foreground/40 h-10"}),l.jsxs("div",{className:"flex justify-between mt-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"Signature"}),l.jsx("span",{children:"Date"})]})]})}function Y4({plan:e,variant:t="top"}){const n=t==="bottom";return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:n?.62:.15},children:l.jsxs(he,{className:"border-2 border-primary bg-gradient-to-br from-primary/10 via-background to-accent/5 shadow-lg",children:[l.jsxs(we,{children:[l.jsx("div",{className:"flex items-center gap-2",children:l.jsx(Kn,{variant:"default",className:"uppercase tracking-wider text-[10px]",children:n?"Your Final Action Plan":"Start Here"})}),l.jsxs(ge,{className:"text-2xl font-serif font-bold flex items-center gap-2 mt-2",children:[l.jsx(Ek,{className:"w-6 h-6 text-primary"}),"Your Next 7 Days"]}),l.jsx(be,{className:"text-base",children:n?"You have the full plan. Now take action. The rest of the report is background — this part is what to do.":"Stop planning and start doing. Here's what to do this week to get moving."})]}),l.jsxs(fe,{className:"space-y-5",children:[l.jsxs("div",{className:"p-5 rounded-lg bg-primary text-primary-foreground border-2 border-primary shadow-md",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx(bk,{className:"w-5 h-5"}),l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-widest",children:"Do Today (≤30 min)"})]}),l.jsx("p",{className:"text-base font-medium leading-relaxed",children:e.doToday})]}),l.jsxs("div",{className:"grid gap-3 md:grid-cols-2 pt-2",children:[l.jsxs("div",{className:"p-4 rounded-lg bg-stage-complete/10 border-l-4 border-stage-complete",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(oi,{className:"w-4 h-4 text-stage-complete"}),l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-stage-complete",children:"Success Signal"})]}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:e.successSignal})]}),l.jsxs("div",{className:"p-4 rounded-lg bg-destructive/10 border-l-4 border-destructive",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(jP,{className:"w-4 h-4 text-destructive"}),l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-destructive",children:"Stop Doing"})]}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:e.stopDoing})]})]})]})]})})}function Q4({plan:e}){return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.62},children:l.jsxs(he,{className:"border-2 border-primary bg-primary text-primary-foreground shadow-lg",children:[l.jsxs(we,{className:"pb-3",children:[l.jsx(Kn,{variant:"secondary",className:"self-start uppercase tracking-wider text-[10px] bg-primary-foreground/15 text-primary-foreground border-0",children:"Before You Close This Tab"}),l.jsxs(ge,{className:"text-2xl font-serif font-bold flex items-center gap-2 mt-1",children:[l.jsx(bk,{className:"w-6 h-6"}),"Do This Now"]})]}),l.jsxs(fe,{children:[l.jsx("p",{className:"text-base md:text-lg font-medium leading-relaxed",children:e.doToday}),l.jsx("p",{className:"text-xs uppercase tracking-widest mt-3 opacity-80",children:"≤ 30 minutes • One step • No more planning"})]})]})})}var ad="Collapsible",[J4,BC]=br(ad),[X4,Ig]=J4(ad),FC=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=e,[c,u]=ii({prop:r,defaultProp:s??!1,onChange:o,caller:ad});return l.jsx(X4,{scope:n,disabled:i,contentId:ga(),open:c,onOpenToggle:x.useCallback(()=>u(d=>!d),[u]),children:l.jsx(pe.div,{"data-state":Mg(c),"data-disabled":i?"":void 0,...a,ref:t})})});FC.displayName=ad;var VC="CollapsibleTrigger",UC=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=Ig(VC,n);return l.jsx(pe.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Mg(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ye(e.onClick,s.onOpenToggle)})});UC.displayName=VC;var Dg="CollapsibleContent",zC=x.forwardRef((e,t)=>
vendor: 4,400 bytes, line 353
353{const{forceMount:n,...r}=e,s=Ig(Dg,e.__scopeCollapsible);return l.jsx(ys,{present:n||s.open,children:({present:i})=>l.jsx(Z4,{...r,ref:t,present:i})})});zC.displayName=Dg;var Z4=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=e,o=Ig(Dg,n),[a,c]=x.useState(r),u=x.useRef(null),d=Re(t,u),h=x.useRef(0),f=h.current,m=x.useRef(0),w=m.current,y=o.open||a,b=x.useRef(y),v=x.useRef(void 0);return x.useEffect(()=>{const g=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(g)},[]),Yn(()=>{const g=u.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const p=g.getBoundingClientRect();h.current=p.height,m.current=p.width,b.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),c(r)}},[o.open,r]),l.jsx(pe.div,{"data-state":Mg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:y&&s})});function Mg(e){return e?"open":"closed"}var e3=FC,t3=UC,n3=zC,_n="Accordion",r3=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Lg,s3,i3]=Pm(_n),[ld,WU]=br(_n,[i3,BC]),$g=BC(),WC=I.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,i=r;return l.jsx(Lg.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(c3,{...i,ref:t}):l.jsx(l3,{...s,ref:t})})});WC.displayName=_n;var[HC,o3]=ld(_n),[qC,a3]=ld(_n,{collapsible:!1}),l3=I.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[a,c]=ii({prop:n,defaultProp:r??"",onChange:s,caller:_n});return l.jsx(HC,{scope:e.__scopeAccordion,value:I.useMemo(()=>a?[a]:[],[a]),onItemOpen:c,onItemClose:I.useCallback(()=>i&&c(""),[i,c]),children:l.jsx(qC,{scope:e.__scopeAccordion,collapsible:i,children:l.jsx(KC,{...o,ref:t})})})}),c3=I.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=e,[o,a]=ii({prop:n,defaultProp:r??[],onChange:s,caller:_n}),c=I.useCallback(d=>a((h=[])=>[...h,d]),[a]),u=I.useCallback(d=>a((h=[])=>h.filter(f=>f!==d)),[a]);return l.jsx(HC,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(qC,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(KC,{...i,ref:t})})})}),[u3,cd]=ld(_n),KC=I.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=e,a=I.useRef(null),c=Re(a,t),u=s3(n),h=gC(s)==="ltr",f=ye(e.onKeyDown,m=>{var j;if(!r3.includes(m.key))return;const w=m.target,y=u().filter(_=>{var P;return!((P=_.ref.current)!=null&&P.disabled)}),b=y.findIndex(_=>_.ref.current===w),v=y.length;if(b===-1)return;m.preventDefault();let g=b;const p=0,S=v-1,k=()=>{g=b+1,g>S&&(g=p)},E=()=>{g=b-1,g<p&&(g=S)};switch(m.key){case"Home":g=p;break;case"End":g=S;break;case"ArrowRight":i==="horizontal"&&(h?k():E());break;case"ArrowDown":i==="vertical"&&k();break;case"ArrowLeft":i==="horizontal"&&(h?E():k());break;case"ArrowUp":i==="vertical"&&E();break}const C=g%v;(j=y[C].ref.current)==null||j.focus()});return l.jsx(u3,{scope:n,disabled:r,direction:s,orientation:i,children:l.jsx(Lg.Slot,{scope:n,children:l.jsx(pe.div,{...o,"data-orientation":i,ref:c,onKeyDown:r?void 0:f})})})}),xu="AccordionItem",[d3,Bg]=ld(xu),GC=I.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...s}=e,i=cd(xu,n),o=o3(xu,n),a=$g(n),c=ga(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return l.jsx(d3,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(e3,{"data-orientation":i.orientation,"data-state":ej(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:h=>{h?o.onItemOpen(r):o.onItemClose(r)}})})});GC.displayName=xu;var YC="AccordionHeader",QC=I.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=cd(_n,n),i=Bg(YC,n);return l.jsx(pe.h3,{"data-orientation":s.orientation,"data-state":ej(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});QC.displayName=YC;var bp="AccordionTrigger",JC=I.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=cd(_n,n),i=Bg(bp,n),o=a3(bp,n),a=$g(n);return l.jsx(Lg.ItemSlot,{scope:n,children:l.jsx(t3,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:t})})});JC.displayName=bp;var XC="AccordionContent",ZC=I.forwardRef((e,t)=>
353{const{__scopeAccordion:n,...r}=e,s=cd(_n,n),i=Bg(XC,n),o=$g(n);return l.jsx(n3,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ZC.displayName=XC;function ej(e){return e?"open":"closed"}var h3=WC,f3=GC,p3=QC,tj=JC,nj=ZC;const m3=h3,rj=x.forwardRef(({className:e,...t},n)=>l.jsx(f3,{ref:n,className:Z("border-b",e),...t}));rj.displayName="AccordionItem";const sj=x.forwardRef(({className:e,children:t,...n},r)=>l.jsx(p3,{className:"flex",children:l.jsxs(tj,{ref:r,className:Z("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(wk,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));sj.displayName=tj.displayName;const ij=x.forwardRef(({className:e,children:t,...n},r)=>l.jsx(nj,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:Z("pb-4 pt-0",e),children:t})}));ij.displayName=nj.displayName;function sr({title:e,description:t,icon:n,defaultOpen:r=!1,delay:s=0,className:i,contentClassName:o,bare:a=!1,children:c}){const u=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Z("hidden print:block space-y-3",!a&&"px-6 py-4"),children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[n,e]}),t&&l.jsx(be,{children:t}),l.jsx("div",{className:Z("pt-2",o),children:c})]}),l.jsx("div",{className:"print:hidden",children:l.jsx(m3,{type:"single",collapsible:!0,defaultValue:r?"section":void 0,children:l.jsxs(rj,{value:"section",className:"border-b-0",children:[l.jsx(sj,{className:Z("py-4 hover:no-underline",a?"px-4 sm:px-6":"px-6"),children:l.jsxs("div",{className:"flex flex-col items-start text-left gap-1 pr-2",children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[n,e]}),t&&l.jsx(be,{className:"font-normal",children:t})]})}),l.jsx(ij,{className:Z("pb-6",a?"px-0 pt-2":"px-6",o),children:c})]})})})]});return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:s},children:a?l.jsx("div",{className:Z("rounded-lg border bg-card",i),children:u}):l.jsx(he,{className:Z("overflow-hidden",i),children:u})})}var $n=function(){return $n=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$n.apply(this,arguments)};function Mo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function g3(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function y3(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}const v3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Fg extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class x3 extends Fg{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Tw extends Fg{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Nw extends Fg{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var kp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(kp||(kp={}));class w3{constructor(t,{headers:n={},customFetch:r,region:s=kp.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=v3(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return g3(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:c,body:u,signal:d,timeout:h}=r;let f={},{region:m}=r;m||(m=this.region);const w=new URL(`${this.url}/${n}`);m&&m!=="any"&&(f["x-region"]=m,w.searchParams.set("forceFunctionRegion",m));let y;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(f["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(f["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let b=d;h&&(o=new AbortController,i=setTimeout(()=>
353o.abort(),h),d?(b=o.signal,d.addEventListener("abort",()=>o.abort())):b=o.signal);const v=yield this.fetch(w.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:y,signal:b}).catch(k=>{throw new x3(k)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new Tw(v);if(!v.ok)throw new Nw(v);let p=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return p==="application/json"?S=yield v.json():p==="application/octet-stream"||p==="application/pdf"?S=yield v.blob():p==="text/event-stream"?S=v:p==="multipart/form-data"?S=yield v.formData():S=yield v.text(),{data:S,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Nw||a instanceof Tw?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var b3=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},k3=class{constructor(e){var t,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,c=null,u=i.status,d=i.statusText;if(i.ok){var h,f;if(n.method!=="HEAD"){var m;const v=await i.text();v===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((m=n.headers.get("Accept"))===null||m===void 0)&&m.includes("application/vnd.pgrst.plan+text"))?a=v:a=JSON.parse(v))}const y=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),b=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&b&&b.length>1&&(c=parseInt(b[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,c=null,u=406,d="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var w;const y=await i.text();try{o=JSON.parse(y),Array.isArray(o)&&i.status===404&&(a=[],o=null,u=200,d="OK")}catch{i.status===404&&y===""?(u=204,d="No Content"):o={message:y}}if(o&&n.isMaybeSingle&&(!(o==null||(w=o.details)===null||w===void 0)&&w.includes("0 rows"))&&(o=null,u=200,d="OK"),o&&n.shouldThrowOnError)throw new b3(o)}return{error:o,data:a,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="";const c=i==null?void 0:i.cause;if(c){var u,d,h,f;const w=(u=c==null?void 0:c.message)!==null&&u!==void 0?u:"",y=(d=c==null?void 0:c.code)!==null&&d!==void 0?d:"";a=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,a+=`
354
355Caused by: ${(f=c==null?void 0:c.name)!==null&&f!==void 0?f:"Error"}: ${w}`,y&&(a+=` (${y})`),c!=null&&c.stack&&(a+=`
356${c.stack}`)}else{var m;a=(m=i==null?void 0:i.stack)!==null&&m!==void 0?m:""}return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},S3=class extends k3{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
356explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const _w=new RegExp("[,()]");var ki=class extends S3{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&_w.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&_w.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},E3=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:c}=this.cloneRequestState();return a.searchParams.set("select",o),r&&c.append("Prefer",`count=${r}`),new ki({method:s,url:a,headers:c,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(a.length>
3560){const c=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new ki({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);a.searchParams.set("columns",d.join(","))}}return new ki({method:o,url:a,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ki({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ki({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},C3=class oj{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new E3(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new oj(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(d)),h=r&&Object.values(n).some(d);h?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([m,w])=>w!==void 0).map(([m,w])=>[m,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([m,w])=>{c.searchParams.append(m,w)})):(a="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}
356`),new ki({method:a,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};class j3{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
357import ws from "ws"
358new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
359
360Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const T3="2.90.1",N3=`realtime-js/${T3}`,aj="1.0.0",_3="2.0.0",Rw=aj,Sp=1e4,R3=1e3,P3=100;var Mr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Mr||(Mr={}));var Ge;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ge||(Ge={}));var bn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(bn||(bn={}));var Ep;(function(e){e.websocket="websocket"})(Ep||(Ep={}));var Rs;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Rs||(Rs={}));class A3{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",c=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+a.length+o.length+u.length+h.length,m=new ArrayBuffer(this.HEADER_LENGTH+f);let w=new DataView(m),y=0;w.setUint8(y++,this.KINDS.userBroadcastPush),w.setUint8(y++,c.length),w.setUint8(y++,a.length),w.setUint8(y++,o.length),w.setUint8(y++,u.length),w.setUint8(y++,h.length),w.setUint8(y++,n),Array.from(c,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(a,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(o,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(u,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(h,v=>w.setUint8(y++,v.charCodeAt(0)));var b=new Uint8Array(m.byteLength+r.byteLength);return b.set(new Uint8Array(m),0),b.set(new Uint8Array(r),m.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,c]=r;
360return n({join_ref:s,ref:i,topic:o,event:a,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+i));c=c+i;const h=r.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),m=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,w={type:this.BROADCAST_EVENT,event:d,payload:m};return o>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class lj{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ee;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ee||(Ee={}));const Pw=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=O3(o,e,t,s),i),{}):{}},O3=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?cj(i,o):Cp(o)},cj=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return L3(t,n)}switch(e){case Ee.bool:return I3(t);case Ee.float4:case Ee.float8:case Ee.int2:case Ee.int4:case Ee.int8:case Ee.numeric:case Ee.oid:return D3(t);case Ee.json:case Ee.jsonb:return M3(t);case Ee.timestamp:return $3(t);case Ee.abstime:case Ee.date:case Ee.daterange:case Ee.int4range:case Ee.int8range:case Ee.money:case Ee.reltime:case Ee.text:case Ee.time:case Ee.timestamptz:case Ee.timetz:case Ee.tsrange:case Ee.tstzrange:return Cp(t);default:return Cp(t)}},Cp=e=>e,I3=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},D3=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},M3=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},L3=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>cj(t,a))}return e},$3=e=>typeof e=="string"?e.replace(" ","T"):e,uj=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class xh{constructor(t,n,r={},s=Sp){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHo
360oks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Aw;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Aw||(Aw={}));class ba{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ba.syncState(this.state,s,i,o),this.pendingDiffs.forEach(c=>{this.state=ba.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ba.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),a={},c={};return this.map(i,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const h=i[u];if(h){const f=d.map(b=>b.presence_ref),m=h.map(b=>b.presence_ref),w=d.filter(b=>m.indexOf(b.presence_ref)<0),y=h.filter(b=>f.indexOf(b.presence_ref)<0);w.length>0&&(a[u]=w),y.length>0&&(c[u]=y)}else a[u]=d}),this.syncDiff(i,{joins:a,leaves:c},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,c)=>{var u;const d=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(c),d.length>0){const h=t[a].map(m=>m.presence_ref),f=d.filter(m=>h.indexOf(m.presence_ref)<0);t[a].unshift(...f)}r(a,d,c)}),this.map(o,(a,c)=>{let u=t[a];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[a]=u,s(a,u,c),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Ow;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Ow||(Ow={}));var ka;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ka||(ka={}));var ar;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ar||(ar={}));class Ui{constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Ge.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new xh(this,bn.join,this.params,this.timeout),this.rejoinTimer=new lj(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ge.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ge.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this._on(bn.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new ba(this),this.broadcastEndpointURL=uj(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Ge.closed){const{config:{broadcast:o,presence:a,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(m=>m.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ka.PRESENCE]&&this.bindings[ka.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(m=>t==null?void 0:t(ar.CHANNEL_ERROR,m)),this._onClose(()=>t==null?void 0:t(ar.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:m})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){t==null||t(ar.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,b=(w=y==null?void 0:y.length)!==null&&w!==void 0?w:0,v=[];for(let g=0;g<b;g++){const p=y[g],{filter:{event:S,schema:k,table:E,filter:C}}=p,j=m&&m[g];if(j&&j.event===S&&Ui.isFilterValueEqual(j.schema,k)&&Ui.isFilterValueEqual(j.table,E)&&Ui.isFilterValueEqual(j.filter,C))v.push(Object.assign(Object.assign({},p),{id:j.id}));else{this.unsubscribe(),this.state=Ge.errored,t==null||t(ar.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(ar.SUBSCRIBED);return}}).receive("error",m=>{this.state=Ge.errored,t==null||t(ar.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ar.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Ge.joined&&t===ka.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let c=a.statusText;
360try{const u=await a.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ge.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(bn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new xh(this,bn.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ge.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new xh(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>P3){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:c,leave:u,join:d}=bn;if(r&&[a,c,u,d].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(m=>{var w,y,b;return((w=m.filter)===null||w===void 0?void 0:w.event)==="*"||((b=(y=m.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(m=>m.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(m=>{var w,y,b,v,g,p,S,k;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const E=m.id,C=(w=m.filter)===null||w===void 0?void 0:w.event;return E&&((y=n.ids)===null||y===void 0?void 0:y.includes(E))&&(C==="*"||(C==null?void 0:C.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))&&(!(!((v=m.filter)===null||v===void 0)&&v.table)||m.filter.table===((g=n.data)===null||g===void 0?void 0:g.table))}else{const E=(S=(p=m==null?void 0:m.filter)===null||p===void 0?void 0:p.event)===null||S===void 0?void 0:S.toLocaleLowerCase();return E==="*"||E===((k=n==null?void 0:n.event)===null||k===void 0?void 0:k.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof f=="object"&&"ids"in f){const w=f.data,{schema:y,table:b,commit_timestamp:v,type:g,errors:p}=w;f=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:v,eventType:g,new:{},old:{},errors:p}),this._getPayloadRecords(w))}m.callback(f,r)}
360)}_isClosed(){return this.state===Ge.closed}_isJoined(){return this.state===Ge.joined}_isJoining(){return this.state===Ge.joining}_isLeaving(){return this.state===Ge.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&Ui.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(bn.close,{},t)}_onError(t){this._on(bn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ge.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Pw(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Pw(t.columns,t.old_record)),n}}const wh=()=>{},tc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},B3=[1e3,2e3,5e3,1e4],F3=1e4,V3=`
361  addEventListener("message", (e) => {
362    if (e.data.event === "start") {
363      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
364    }
365  });`;class U3{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Sp,this.transport=null,this.heartbeatIntervalMs=tc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=wh,this.ref=0,this.reconnectTimer=null,this.vsn=Rw,this.logger=wh,this.conn=null,this.sendBuffer=[],this.serializer=new A3,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Ep.websocket}`,this.httpEndpoint=uj(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=j3.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
366
367To use Realtime in Node.js, you need to provide a WebSocket implementation:
368
369Option 1: Use Node.js 22+ which has native WebSocket support
370Option 2: Install and provide the "ws" package:
371
372  npm install ws
373
374  import ws from "ws"
375  const client = new RealtimeClient(url, {
376    ...options,
377    transport: ws
378  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Mr.connecting:return Rs.Connecting;case Mr.open:return Rs.Open;case Mr.closing:return Rs.Closing;default:return Rs.Closed}}isConnected(){return this.connectionState()===Rs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
378channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Ui(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var c;(c=this.conn)===null||c===void 0||c.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(R3,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},tc.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",c=i.status||"";this.log("receive",`${c} ${r} ${s} ${a}`.trim(),i),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Mr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Mr.open||this.conn.readyState===Mr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}
378_triggerChanError(){this.channels.forEach(t=>t._trigger(bn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([V3],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:N3};n&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(bn.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new lj(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},tc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,i,o,a,c,u,d,h,f,m;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Sp,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:tc.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:wh,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:Rw,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:w=>B3[w-1]||F3,this.vsn){case aj:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(w,y)=>y(JSON.stringify(w)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(w,y)=>y(JSON.parse(w));break;case _3:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(m=t==null?void 0:t.decode)!==null&&m!==void 0?m:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Za=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function z3(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function W3(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function H3(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=z3(e.baseUrl,r,s),c=await W3(e.auth),u=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...c,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const m=h?f:void 0,w=m==null?void 0:m.error;throw new Za((w==null?void 0:w.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:m})}return{status:u.status,headers:u.headers,data:f}}}}function nc(e){return e.join("�")}var q3=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:nc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${nc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${nc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${nc(e.namespace)}`}),!0}catch(t){if(t instanceof Za&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Za&&n.status===409)return;throw n}}};function fi(e){return e.join("�")}var K3=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${fi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Za&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Za&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},G3=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=H3({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new q3(this.client,t),this.tableOps=new K3(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
378async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ud=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function Ie(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Y3=class extends ud{constructor(e,t,n){super(e),this.name="StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},jp=class extends ud{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const Vg=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Q3=()=>Response,Tp=e=>{if(Array.isArray(e))return e.map(n=>Tp(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Tp(r)}),t},J3=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},X3=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function el(e){"@babel/helpers - typeof";return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function Z3(e,t){if(el(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(el(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eB(e){var t=Z3(e,"string");return el(t)=="symbol"?t:t+""}function tB(e,t,n){return(t=eB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Iw(Object(n),!0).forEach(function(r){tB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const bh=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},nB=async(e,t,n)=>{e instanceof await Q3()&&!(n!=null&&n.noResolveJson)?e.json().then(r=>{const s=e.status||500,i=(r==null?void 0:r.statusCode)||s+"";t(new Y3(bh(r),s,i))}).catch(r=>{t(new jp(bh(r),r))}):t(new jp(bh(e),e))},rB=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?s:(J3(r)?(s.headers=re({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),re(re({},s),n))};async function bl(e,t,n,r,s,i){return new Promise((o,a)=>{e(n,rB(t,r,s,i)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>nB(c,a,r))})}async function tl(e,t,n,r){return bl(e,"GET",t,n,r)}async function yn(e,t,n,r,s){return bl(e,"POST",t,r,s,n)}async function Np(e,t,n,r,s){return bl(e,"PUT",t,r,s,n)}async function sB(e,t,n,r){return bl(e,"HEAD",t,re(re({},n),{},{noResolveJson:!0}),r)}async function Ug(e,t,n,r,s){return bl(e,"DELETE",t,r,s,n)}var iB=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ie(t))return{data:null,error:t};throw t}}};let dj;dj=Symbol.toStringTag;var oB=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[dj]="BlobDownloadBuilder",this.promise=null}asStream(){return new iB(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Ie(t))return{data:null,error:t};throw t}}};const aB={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Dw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var lB=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=n,this.fetch=Vg(r)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,n,r){var s=this;try{let i;const o=re(re({},Dw),r);let a=re(re({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,c&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(a=re(re({},a),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Np:yn)(s.fetch,`${s.url}/object/${d}`,i,re({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(s.shouldThrowOnError)throw i;if(Ie(i))return{data:null,error:i};throw i}}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let c;const u=re({upsert:Dw.upsert},r),d=re(re({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{data:{path:i,fullPath:(await Np(s.fetch,a.toString(),c,{headers:d})).Key},error:null}}catch(c){if(s.shouldThrowOnError)throw c;if(Ie(c))return{data:null,error:c};throw c}}async createSignedUploadUrl(e,t){var n=this;try{let r=n._getFinalPath(e);const s=re({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await yn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new ud("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ie(r))return{data:null,error:r};throw r}}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;try{return{data:await yn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
378stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ie(s))return{data:null,error:s};throw s}}async copy(e,t,n){var r=this;try{return{data:{path:(await yn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key},error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ie(s))return{data:null,error:s};throw s}}async createSignedUrl(e,t,n){var r=this;try{let s=r._getFinalPath(e),i=await yn(r.fetch,`${r.url}/object/sign/${s}`,re({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i={signedUrl:encodeURI(`${r.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ie(s))return{data:null,error:s};throw s}}async createSignedUrls(e,t,n){var r=this;try{const s=await yn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:s.map(o=>re(re({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ie(s))return{data:null,error:s};throw s}}download(e,t){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",r=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),s=r?`?${r}`:"",i=this._getFinalPath(e),o=()=>tl(this.fetch,`${this.url}/${n}/${i}${s}`,{headers:this.headers,noResolveJson:!0});return new oB(o,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);try{return{data:Tp(await tl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ie(r))return{data:null,error:r};throw r}}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await sB(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Ie(r)&&r instanceof jp){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${a}`)}}}async remove(e){var t=this;try{return{data:await Ug(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async list(e,t,n){var r=this;try{const s=re(re(re({},aB),t),{},{prefix:e||""});return{data:await yn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n),error:null}}catch(s){if(r.shouldThrowOnError)throw s;if(Ie(s))return{data:null,error:s};throw s}}async listV2(e,t){var n=this;try{const r=re({},e);return{data:await yn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ie(r))return{data:null,error:r};throw r}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const hj="2.90.1",fj={"X-Client-Info":`storage-js/${hj}`};var cB=class{constructor(e,t={},n,r){this.shouldThrowOnError=!1;const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=re(re({},fj),t),this.fetch=Vg(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const n=t.listBucketOptionsToQueryString(e);return{data:await tl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await tl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async createBucket(e,t={public:!1}){var n=this;try{return{data:await yn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ie(r))return{data:null,error:r};throw r}}async updateBucket(e,t){var n=this;try{return{data:await Np(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ie(r))return{data:null,error:r};throw r}}async emptyBucket(e){var t=this;try{return{data:await yn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Ug(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},uB=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=re(re({},fj),t),this.fetch=Vg(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await yn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async listBuckets(e){var t=this;try{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return{data:await tl(t.fetch,s,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Ug(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ie(n))return{data:null,error:n};throw n}}from(e){var t=this;if(!X3(e))throw new ud("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new G3({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
378),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}};const zg={"X-Client-Info":`storage-js/${hj}`,"Content-Type":"application/json"};var pj=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Ft(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var kh=class extends pj{constructor(e,t,n){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},dB=class extends pj{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const Wg=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hB=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mw=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),fB=async(e,t,n)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const r=e.status||500,s=e;if(typeof s.json=="function")s.json().then(i=>{const o=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||r+"";t(new kh(Mw(i),r,o))}).catch(()=>{const i=r+"";t(new kh(s.statusText||`HTTP ${r} error`,r,i))});else{const i=r+"";t(new kh(s.statusText||`HTTP ${r} error`,r,i))}}else t(new dB(Mw(e),e))},pB=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return r?(hB(r)?(s.headers=re({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,re(re({},s),n)):s};async function mB(e,t,n,r,s,i){return new Promise((o,a)=>{e(n,pB(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>o(c)).catch(c=>fB(c,a,r))})}async function Vt(e,t,n,r,s){return mB(e,"POST",t,r,s,n)}var gB=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=re(re({},zg),t),this.fetch=Wg(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async getIndex(e,t){var n=this;try{return{data:await Vt(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}),error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ft(r))return{data:null,error:r};throw r}}async listIndexes(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async deleteIndex(e,t){var n=this;try{return{data:await Vt(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{},error:null}}catch(r){if(n.shouldThrowOnError)throw r;if(Ft(r))return{data:null,error:r};throw r}}},yB=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=re(re({},zg),t),this.fetch=Wg(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await Vt(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async getVectors(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
378if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await Vt(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async queryVectors(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await Vt(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}},vB=class{constructor(e,t={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=re(re({},zg),t),this.fetch=Wg(n)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async getBucket(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async listBuckets(e={}){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}async deleteBucket(e){var t=this;try{return{data:await Vt(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Ft(n))return{data:null,error:n};throw n}}},xB=class extends vB{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new wB(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},wB=class extends gB{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new bB(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},bB=class extends yB{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,re(re({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},kB=class extends cB{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new lB(this.url,this.headers,e,this.fetch)}get vectors(){return new xB(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new uB(this.url+"/iceberg",this.headers,this.fetch)}};const mj="2.90.1",Si=30*1e3,_p=3,Sh=_p*Si,SB="http://localhost:9999",EB="supabase.auth.token",CB={"X-Client-Info":`gotrue-js/${mj}`},Rp="X-Supabase-Api-Version",gj={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},jB=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,TB=10*60*1e3;
378class nl extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function X(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class NB extends nl{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function _B(e){return X(e)&&e.name==="AuthApiError"}class Ps extends nl{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class kr extends nl{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Lt extends kr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function RB(e){return X(e)&&e.name==="AuthSessionMissingError"}class pi extends kr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class rc extends kr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class sc extends kr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function PB(e){return X(e)&&e.name==="AuthImplicitGrantRedirectError"}class Lw extends kr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class AB extends kr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Pp extends kr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Eh(e){return X(e)&&e.name==="AuthRetryableFetchError"}class $w extends kr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Ap extends kr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Bw=` 	
379\r=`.split(""),OB=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Bw.length;t+=1)e[Bw[t].charCodeAt(0)]=-2;for(let t=0;t<wu.length;t+=1)e[wu[t].charCodeAt(0)]=t;return e})();function Fw(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(wu[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(wu[r]),t.queuedBits-=6}}function yj(e,t,n){const r=OB[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Vw(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{MB(o,r,n)};for(let o=0;o<e.length;o+=1)yj(e.charCodeAt(o),s,i);return t.join("")}function IB(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function DB(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}IB(r,t)}}function MB(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function eo(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)yj(e.charCodeAt(s),n,r);return new Uint8Array(t)}function LB(e){const t=[];return DB(e,n=>t.push(n)),new Uint8Array(t)}function Ls(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Fw(s,n,r)),Fw(null,n,r),t.join("")}function $B(e){return Math.round(Date.now()/1e3)+e}function BB(){return Symbol("auth-callback")}const st=()=>typeof window<"u"&&typeof document<"u",Ss={tested:!1,writable:!1},vj=()=>
379{if(!st())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ss.tested)return Ss.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ss.tested=!0,Ss.writable=!0}catch{Ss.tested=!0,Ss.writable=!1}return Ss.writable};function FB(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const xj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),VB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ei=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Es=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},rt=async(e,t)=>{await e.removeItem(t)};class dd{constructor(){this.promise=new dd.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}dd.promiseConstructor=Promise;function Ch(e){const t=e.split(".");if(t.length!==3)throw new Ap("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!jB.test(t[r]))throw new Ap("JWT not in base64url format");return{header:JSON.parse(Vw(t[0])),payload:JSON.parse(Vw(t[1])),signature:eo(t[2]),raw:{header:t[0],payload:t[1]}}}async function UB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function zB(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function WB(e){return("0"+e.toString(16)).substr(-2)}function HB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,WB).join("")}async function qB(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function KB(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await qB(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function mi(e,t,n=!1){const r=HB();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Ei(e,`${t}-code-verifier`,s);const i=await KB(r);return[i,r===i?"plain":"s256"]}const GB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function YB(e){const t=e.headers.get(Rp);if(!t||!t.match(GB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function QB(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function JB(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const XB=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function gi(e){if(!XB.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function jh(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function ZB(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
379if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function Uw(e){return JSON.parse(JSON.stringify(e))}const _s=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),eF=[502,503,504];async function zw(e){var t;if(!VB(e))throw new Pp(_s(e),0);if(eF.includes(e.status))throw new Pp(_s(e),e.status);let n;try{n=await e.json()}catch(i){throw new Ps(_s(i),i)}let r;const s=YB(e);if(s&&s.getTime()>=gj["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new $w(_s(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Lt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new $w(_s(n),e.status,n.weak_password.reasons);throw new NB(_s(n),e.status||500,r)}const tF=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function ne(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Rp]||(i[Rp]=gj["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await nF(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function nF(e,t,n,r,s,i){const o=tF(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new Pp(_s(c),0)}if(a.ok||await zw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(c){await zw(c)}}function fn(e){var t;let n=null;iF(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=$B(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Ww(e){const t=fn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Fr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function rF(e){return{data:e,error:null}}function sF(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Mo(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},c=Object.assign({},o);return{data:{properties:a,user:c},error:null}}function Hw(e){return e}function iF(e){return e.access_token&&e.refresh_token&&e.expires_in}const Th=["global","local","others"];class oF{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=xj(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=Th[0]){if(Th.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Th.join(", ")}`);try{return await ne(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(X(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ne(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Fr})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Mo(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await ne(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:sF,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(X(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ne(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Fr})}catch(n){if(X(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ne(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Hw});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(X(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){gi(t);try{return await ne(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Fr})}catch(n){if(X(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){gi(t);try{return await ne(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Fr})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){gi(t);
379try{return await ne(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Fr})}catch(r){if(X(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){gi(t.userId);try{const{data:n,error:r}=await ne(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _deleteFactor(t){gi(t.userId),gi(t.id);try{return{data:await ne(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Hw});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(X(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await ne(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await ne(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(X(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await ne(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(X(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await ne(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(X(n))return{data:null,error:n};throw n}}}function qw(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const yi={debug:!!(globalThis&&vj()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
379class wj extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class aF extends wj{}async function lF(e,t,n){yi.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),yi.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){yi.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{yi.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw yi.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new aF(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(yi.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}function cF(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function bj(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function uF(e){return parseInt(e,16)}function dF(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function hF(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
380`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=bj(e.address),w=d?`${d}://${r}`:r,y=e.statement?`${e.statement}
381`:"",b=`${w} wants you to sign in with your Ethereum account:
382${m}
383
384${y}`;let v=`URI: ${h}
385Version: ${f}
386Chain ID: ${n}${o?`
387Nonce: ${o}`:""}
388Issued At: ${i.toISOString()}`;if(s&&(v+=`
389Expiration Time: ${s.toISOString()}`),a&&(v+=`
390Not Before: ${a.toISOString()}`),c&&(v+=`
391Request ID: ${c}`),u){let g=`
392Resources:`;for(const p of u){if(!p||typeof p!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${p}`);g+=`
393- ${p}`}v+=g}return`${b}
394${v}`}class We extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class bu extends We{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function fF({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new We({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new We({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new We({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new We({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new We({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new We({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new We({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(kj(o)){if(i.rp.id!==o)return new We({message:`The RP ID "${i.rp.id}
394" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new We({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new We({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function pF({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new We({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new We({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(kj(r)){if(n.rpId!==r)return new We({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new We({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new We({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new We({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class mF{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const gF=new mF;function yF(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Mo(e,["challenge","user","excludeCredentials"]),i=eo(t).buffer,o=Object.assign(Object.assign({},n),{id:eo(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];a.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:eo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function vF(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Mo(e,["challenge","allowCredentials"]),s=eo(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:eo(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function xF(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ls(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ls(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function wF(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ls(new Uint8Array(s.authenticatorData)),clientDataJSON:Ls(new Uint8Array(s.clientDataJSON)),signature:Ls(new Uint8Array(s.signature)),userHandle:s.userHandle?Ls(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function kj(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Kw(){var e,t;return!!(st()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function bF(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new bu("Browser returned unexpected credential type",t)}:{data:null,error:new bu("Empty credential response",t)}}
394catch(t){return{data:null,error:fF({error:t,options:e})}}}async function kF(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new bu("Browser returned unexpected credential type",t)}:{data:null,error:new bu("Empty credential response",t)}}catch(t){return{data:null,error:pF({error:t,options:e})}}}const SF={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},EF={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function ku(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=ku(a,o):r[i]=ku(o)}else r[i]=o}return r}function CF(e,t){return ku(SF,e,t||{})}function jF(e,t){return ku(EF,e,t||{})}class TF{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){try{const{data:o,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:a};const c=s??gF.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${r}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=CF(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:h}=await bF({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const u=jF(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:h}=await kF(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(o){return X(o)?{data:null,error:o}:{data:null,error:new Ps("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new nl("rpId is required for WebAuthn authentication")};try{if(!Kw())return{data:null,error:new Ps("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return X(o)?{data:null,error:o}:{data:null,error:new Ps("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new nl("rpId is required for WebAuthn registration")};try{if(!Kw())return{data:null,error:new Ps("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:a};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return X(o)?{data:null,error:o}:{data:null,error:new Ps("Unexpected error in register",o)}}}}cF();const NF={url:SB,storageKey:EB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:CB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function Gw(e,t,n){return await n()}const vi={};class rl{get jwks(){var t,n;return(n=(t=vi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){vi[this.storageKey]=Object.assign(Object.assign({},vi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=vi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){vi[this.storageKey]=Object.assign(Object.assign({},vi[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},NF),t);if(this.storageKey=i.storageKey,this.instanceID=(n=rl.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,rl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&st()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new oF({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=xj(i.fetch),this.lock=i.lock||Gw,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&st()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=lF:this.lock=Gw,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new TF(this)}
394,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:vj()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=qw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=qw(this.memoryStorage)),st()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${mj}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(st()&&(n=FB(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),st()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),PB(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return X(n)?this._returnResult({error:n}):this._returnResult({error:new Ps("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:fn}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let m=null,w=null;this.flowType==="pkce"&&([m,w]=await mi(this.storage,this.storageKey)),i=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:m,code_challenge_method:w},xform:fn})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await ne(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:fn})}else throw new rc("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await rt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Ww})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await ne(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Ww})}else throw new rc("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new pi;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,c,u,d,h,f;let m,w;if("message"in t)m=t.message,w=t.signature;else{const{chain:y,wallet:b,statement:v,options:g}=t;let p;if(st())if(typeof b=="object")p=b;else{const _=window;if("ethereum"in _&&typeof _.ethereum=="object"&&"request"in _.ethereum&&typeof _.ethereum.request=="function")p=_.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");p=b}const S=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),k=await p.request({method:"eth_requestAccounts"}).then(_=>_).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=bj(k[0]);let C=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const _=await p.request({method:"eth_chainId"});C=uF(_)}const j={domain:S.host,address:E,statement:v,uri:S.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=hF(j),w=await p.request({method:"personal_sign",params:[dF(m),E]})}try{const{data:y,error:b}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:w}
394,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:fn});if(b)throw b;if(!y||!y.session||!y.user){const v=new pi;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(X(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var n,r,s,i,o,a,c,u,d,h,f,m;let w,y;if("message"in t)w=t.message,y=t.signature;else{const{chain:b,wallet:v,statement:g,options:p}=t;let S;if(st())if(typeof v=="object")S=v;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))S=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(p!=null&&p.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=v}const k=new URL((n=p==null?void 0:p.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const E=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},p==null?void 0:p.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),g?{statement:g}:null));let C;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")C=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)C=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)w=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),y=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${k.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=p==null?void 0:p.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=p==null?void 0:p.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${p.signInWithSolana.notBefore}`]:[],...!((o=p==null?void 0:p.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${p.signInWithSolana.expirationTime}`]:[],...!((a=p==null?void 0:p.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${p.signInWithSolana.chainId}`]:[],...!((c=p==null?void 0:p.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${p.signInWithSolana.nonce}`]:[],...!((u=p==null?void 0:p.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${p.signInWithSolana.requestId}`]:[],...!((h=(d=p==null?void 0:p.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...p.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
395`);const E=await S.signMessage(new TextEncoder().encode(w),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=E}}try{const{data:b,error:v}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Ls(y)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:fn});if(v)throw v;if(!b||!b.session||!b.user){const g=new pi;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:v})}catch(b){if(X(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await Es(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new AB;const{data:i,error:o}=await ne(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:fn});if(await rt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new pi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:fn}),{data:c,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new pi;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await mi(this.storage,this.storageKey));const{error:h}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:c}=t,{data:u,error:d}=await ne(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new rc("You must provide either an email or phone number.")}catch(a){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await ne(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:fn});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(X(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,c=null;this.flowType==="pkce"&&([a,c]=await mi(this.storage,this.storageKey));const u=await ne(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:c}),headers:this.headers,xform:rF}
395);return!((i=u.data)===null||i===void 0)&&i.url&&st()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Lt;const{error:s}=await ne(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(X(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await ne(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await ne(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new rc("You must provide either an email or phone number and a type")}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Es(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Sh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Es(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=jh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=ZB(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Fr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;
395if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Lt}:await ne(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Fr})})}catch(n){if(X(n))return RB(n)&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Lt;const o=s.session;let a=null,c=null;this.flowType==="pkce"&&t.email!=null&&([a,c]=await mi(this.storage,this.storageKey));const{data:u,error:d}=await ne(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:c}),jwt:o.access_token,xform:Fr});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Lt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Ch(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:c}=await this._getUser(t.access_token);if(c)throw c;i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(X(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Lt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(X(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!st())throw new sc("No browser detected.");if(t.error||t.error_description||t.error_code)throw new sc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Lw("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new sc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Lw("No code detected.");const{data:g,error:p}=await this._exchangeCodeForSession(t.code);if(p)throw p;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:c,token_type:u}=t;if(!i||!a||!o||!u)throw new sc("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let f=d+h;c&&(f=parseInt(c));const m=f-d;
395m*1e3<=Si&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const w=f-h;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,f,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,f,d);const{data:y,error:b}=await this._getUser(i);if(b)throw b;const v={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(X(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Es(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(_B(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=BB(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await mi(this.storage,this.storageKey,!0));try{return await ne(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,c,u,d;const{data:h,error:f}=i;if(f)throw f;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ne(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return st()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(X(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
395if(s)throw s;const{options:o,provider:a,token:c,access_token:u,nonce:d}=t,h=await ne(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:fn}),{data:f,error:m}=h;return m?this._returnResult({data:{user:null,session:null},error:m}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new pi}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:m}))}catch(s){if(await rt(this.storage,`${this.storageKey}-code-verifier`),X(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await ne(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await zB(async s=>(s>
3950&&await UB(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await ne(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:fn})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Eh(i)&&Date.now()+o-r<Si})}catch(r){if(this._debug(n,"error",r),X(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),st()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Es(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Es(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ei(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:jh()}else if(s&&!s.user&&!s.user){const o=await Es(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await rt(this.storage,this.storageKey+"-user"),await Ei(this.storage,this.storageKey,s)):s.user=jh()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Sh;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Sh}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Eh(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Lt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new dd;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Lt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),X(i)){const o={data:null,error:i};return Eh(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await rt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ei(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=Uw(s);await Ei(this.storage,this.storageKey,i)}else{const s=Uw(n);await Ei(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await rt(this.storage,this.storageKey),await rt(this.storage,this.storageKey+"-code-verifier"),await rt(this.storage,this.storageKey+"-user"),this.userStorage&&await rt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
395try{t&&st()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Si);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/Si);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Si}ms, refresh threshold is ${_p} ticks`),s<=_p&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof wj)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!st()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await mi(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await ne(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;
395if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ne(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?xF(t.webauthn.credential_response):wF(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:c}=await ne(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:c}))})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await ne(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:yF(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:vF(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,n;const{data:{session:r},error:s}
395=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Ch(r.access_token);let o=null;i.aal&&(o=i.aal);let a=o;((n=(t=r.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(a="aal2");const u=i.amr||[];return{data:{currentLevel:o,nextLevel:a,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await ne(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Lt})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Lt});const o=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&st()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Lt});const o=await ne(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&st()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await ne(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Lt})})}catch(t){if(X(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await ne(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Lt})})}catch(n){if(X(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+TB>s)return r;const{data:i,error:o}=await ne(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:m,error:w}
395=await this.getSession();if(w||!m.session)return this._returnResult({data:null,error:w});r=m.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:c}}=Ch(r);n!=null&&n.allowExpired||QB(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:m}=await this.getUser(r);if(m)throw m;return{data:{claims:i,header:s,signature:o},error:null}}const d=JB(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,LB(`${a}.${c}`)))throw new Ap("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(X(r))return this._returnResult({data:null,error:r});throw r}}}rl.nextInstanceID={};const _F=rl,RF="2.90.1";let ia="";typeof Deno<"u"?ia="deno":typeof document<"u"?ia="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ia="react-native":ia="node";const PF={"X-Client-Info":`supabase-js-${ia}/${RF}`},AF={headers:PF},OF={schema:"public"},IF={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},DF={};function sl(e){"@babel/helpers - typeof";return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function MF(e,t){if(sl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LF(e){var t=MF(e,"string");return sl(t)=="symbol"?t:t+""}function $F(e,t,n){return(t=LF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(n),!0).forEach(function(r){$F(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const BF=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),FF=()=>Headers,VF=(e,t,n)=>{const r=BF(n),s=FF();return async(i,o)=>{var a;const c=(a=await t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,Ve(Ve({},o),{},{headers:u}))}};function UF(e){return e.endsWith("/")?e:e+"/"}function zF(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:Ve(Ve({},c),s),auth:Ve(Ve({},u),i),realtime:Ve(Ve({},d),o),storage:{},global:Ve(Ve(Ve({},h),a),{},{headers:Ve(Ve({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function WF(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(UF(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var HF=class extends _F{constructor(e){super(e)}},qF=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=WF(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:OF,realtime:DF,auth:Ve(Ve({},IF),{},{storageKey:o}),global:AF},c=zF(n??{},a);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=VF(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Ve({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new C3(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new kB(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new w3(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
395channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:c,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new HF({url:this.authUrl.href,headers:Ve(Ve({},f),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new U3(this.realtimeUrl.href,Ve(Ve({},e),{},{params:Ve(Ve({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const KF=(e,t,n)=>new qF(e,t,n);function GF(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}GF()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const YF="https://imrimteieqporsgscnai.supabase.co",QF="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImltcmltdGVpZXFwb3JzZ3NjbmFpIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Njg1NzI4MDgsImV4cCI6MjA4NDE0ODgwOH0.hf_z6CbaicVbKqYyztYGwAv0WU73IsnGKRyi681TogA",Hg=KF(YF,QF,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Sj="maskInsight.cache.";function Qw(e){try{const t=localStorage.getItem(Sj+e);return t?JSON.parse(t):null}catch{return null}}function JF(e,t){try{localStorage.setItem(Sj+e,JSON.stringify(t))}catch{}}function Ej({stageLabel:e,variant:t="inline"}){var v,g,p,S;const{data:n}=Io(),[r,s]=x.useState(!1),[i,o]=x.useState(null),[a,c]=x.useState(null),[u,d]=x.useState(0),h=x.useRef(null),f=x.useMemo(()=>[...n.maskScores].sort((k,E)=>E.score-k.score).slice(0,3).map(k=>{const E=Dt.find(C=>C.id===k.maskId);return{name:E.name,statement:E.statement,experimentationBias:E.experimentationBias,score:k.score}}),[n.maskScores]),m=x.useMemo(()=>{var j,_,P,M,A,z;const k=n.criticalOpportunity,E=n.actionAnalysis,C=n.experiment;return{situation:k==null?void 0:k.situation,whatsAtStake:k==null?void 0:k.whatsAtStake,painLevel:k==null?void 0:k.painLevel,roadblocks:(j=k==null?void 0:k.roadblocks)==null?void 0:j.filter(
395Boolean),possibilities:(_=k==null?void 0:k.possibilities)==null?void 0:_.filter(Boolean),cognitiveBiasesFlagged:(P=n.cognitiveBiases)==null?void 0:P.filter(T=>T.presence==="yes").map(T=>T.biasId),assumptionsBelief:(M=n.assumptions)==null?void 0:M.beliefStatement,assumptionsChange:(A=n.assumptions)==null?void 0:A.changeStatement,peoplePattern:E==null?void 0:E.people,processPattern:E==null?void 0:E.processes,rippleEffects:E==null?void 0:E.rippleEffects,validationPlan:(z=n.validationStakeholders)==null?void 0:z.map(T=>`${T.method} → ${T.who}`),hypothesis:C==null?void 0:C.hypothesis,successCriteria:C==null?void 0:C.successCriteria,stopCondition:C==null?void 0:C.stopCondition}},[n]),w=((v=n.challengeContext)==null?void 0:v.trim())||((p=(g=n.criticalOpportunity)==null?void 0:g.situation)==null?void 0:p.trim())||"",y=x.useMemo(()=>JSON.stringify({stageLabel:e,decision:w,topMasks:f,signals:m}),[e,w,f,m]);if(x.useEffect(()=>{var E;const k=Qw(y);k&&(c(k),d(((E=k.sections)==null?void 0:E.length)??0),h.current=y)},[y]),x.useEffect(()=>{if(!w||f.length===0||h.current===y||Qw(y))return;h.current=y;let k=!1;return s(!0),o(null),c(null),d(0),(async()=>{try{const{data:E,error:C}=await Hg.functions.invoke("mask-insight",{body:{decision:w,challengeType:n.challengeType,stageLabel:e,topMasks:f,signals:m}});if(k)return;if(C)throw C;const j=E;if(j!=null&&j.error)throw new Error(j.error);c(j),JF(y,j)}catch(E){if(k)return;o(E instanceof Error?E.message:"Could not generate insight.")}finally{k||s(!1)}})(),()=>{k=!0}},[y,w,f,m,e,n.challengeType]),x.useEffect(()=>{var C;if(!((C=a==null?void 0:a.sections)!=null&&C.length)||u>=a.sections.length)return;d(1);const k=a.sections.length,E=setInterval(()=>{d(j=>j>=k?(clearInterval(E),j):j+1)},1100);return()=>clearInterval(E)},[a]),!w||f.length===0)return null;const b=t==="full";return l.jsx(he,{className:"border-2 "+(b?"border-primary/40 bg-gradient-to-br from-primary/5 via-background to-accent/5":"border-primary/20 bg-primary/5"),children:l.jsxs(fe,{className:b?"p-6 space-y-4":"p-5 space-y-3",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(cs,{className:"w-4 h-4 text-primary mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:["Mask insight · ",e]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["With a decision like"," ",l.jsxs("span",{className:"italic text-foreground",children:['"',w,'"']}),", here's how your mask could be creating limiting beliefs for you."]})]})]}),r&&l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground py-2",children:[l.jsx(Lm,{className:"w-3.5 h-3.5 animate-spin"}),"Synthesizing your pattern…"]}),i&&l.jsx("p",{className:"text-xs text-destructive",children:i.includes("402")?"Out of AI credits — add credits in your workspace to continue.":i.includes("429")?"Too many requests right now. Try again in a moment.":"We could not generate this synthesis. You can continue without it."}),!b&&(a==null?void 0:a.headline)&&l.jsxs(H.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},className:"text-sm text-foreground italic leading-snug",children:['"',a.headline,'"']}),!b&&(a==null?void 0:a.headline)&&l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Keep going — your full synthesis unlocks on the final plan."}),b&&(a==null?void 0:a.headline)&&l.jsx(H.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},className:"font-serif text-lg md:text-xl text-foreground",children:a.headline}),b&&l.jsx("div",{className:"space-y-3",children:l.jsx(ko,{initial:!1,children:(S=a==null?void 0:a.sections)==null?void 0:S.slice(0,u).map(k=>l.jsxs(H.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4},className:"border-l-2 border-primary/40 pl-3",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-primary mb-1",children:k.title}),l.jsx("p",{className:"text-sm md:text-base text-foreground",children:k.body})]},k.title))})})]})})}const Cj="strategySynthesis.cache.";function Jw(e){try{const t=localStorage.getItem(Cj+e);return t?JSON.parse(t):null}catch{return null}}function XF(e,t){try{localStorage.setItem(Cj+e,JSON.stringify(t)),localStorage.setItem("strategySynthesis.latest",JSON.stringify(t))}catch{}}function ZF(){var d;const{data:e}=Io(),[t,n]=x.useState(!1),[r,s]=x.useState(null),[i,o]=x.useState(null),a=x.useRef(null),c=x.useMemo(()=>{var w,y,b,v,g,p,S,k,E,C,j,_,P,M,A,z,T,F,W,V,N;const h=[...e.maskScores].sort((R,$)=>$.score-R.score).slice(0,3).map(R=>{const $=Dt.find(O=>O.id===R.maskId);return $?{name:$.name,statement:$.statement,experimentationBias:$.experimentationBias,score:R.score}:null}
395).filter(Boolean),f=(e.cognitiveBiases||[]).filter(R=>R.presence==="yes").map(R=>{var O,L,q;const $=qn.find(Q=>Q.id===R.biasId);return{name:($==null?void 0:$.name)||R.biasId,interrogation:((O=R.interrogation)==null?void 0:O.trim())||void 0,patternChallenge:((L=R.patternChallenge)==null?void 0:L.trim())||void 0,researchPromptResponse:((q=R.researchPromptResponse)==null?void 0:q.trim())||void 0}}),m=e.experiment?ti.find(R=>R.id===e.experiment.strategyId):null;return{challengeContext:((w=e.challengeContext)==null?void 0:w.trim())||void 0,challengeType:e.challengeType,criticalOpportunity:e.criticalOpportunity?{situation:((y=e.criticalOpportunity.situation)==null?void 0:y.trim())||void 0,whatsAtStake:((b=e.criticalOpportunity.whatsAtStake)==null?void 0:b.trim())||void 0,painLevel:e.criticalOpportunity.painLevel,whatMakesItFall:(v=e.criticalOpportunity.whatMakesItFall)==null?void 0:v.filter(Boolean),roadblocks:(g=e.criticalOpportunity.roadblocks)==null?void 0:g.filter(Boolean),possibilities:(p=e.criticalOpportunity.possibilities)==null?void 0:p.filter(Boolean),primaryResearch:(S=e.criticalOpportunity.primaryResearch)==null?void 0:S.filter(R=>{var $;return($=R.method)==null?void 0:$.trim()}),secondaryResearch:(k=e.criticalOpportunity.secondaryResearch)==null?void 0:k.filter(R=>{var $;return($=R.method)==null?void 0:$.trim()})}:null,topMasks:h,flaggedBiases:f,assumptions:e.assumptions?{belief:((E=e.assumptions.beliefStatement)==null?void 0:E.trim())||void 0,change:((C=e.assumptions.changeStatement)==null?void 0:C.trim())||void 0}:null,actionAnalysis:e.actionAnalysis?{people:((j=e.actionAnalysis.people)==null?void 0:j.trim())||void 0,processes:((_=e.actionAnalysis.processes)==null?void 0:_.trim())||void 0,systems:((P=e.actionAnalysis.systems)==null?void 0:P.trim())||void 0,policies:((M=e.actionAnalysis.policies)==null?void 0:M.trim())||void 0,environment:((A=e.actionAnalysis.environment)==null?void 0:A.trim())||void 0,rippleEffects:((z=e.actionAnalysis.rippleEffects)==null?void 0:z.trim())||void 0}:null,validationStakeholders:(T=e.validationStakeholders)==null?void 0:T.map(R=>{var $,O;return{method:R.method,who:R.who,purpose:(($=R.purpose)==null?void 0:$.trim())||void 0,assumption:((O=R.assumption)==null?void 0:O.trim())||void 0}}),experiment:e.experiment?{strategyName:m==null?void 0:m.name,hypothesis:((F=e.experiment.hypothesis)==null?void 0:F.trim())||void 0,successCriteria:((W=e.experiment.successCriteria)==null?void 0:W.trim())||void 0,stopCondition:((V=e.experiment.stopCondition)==null?void 0:V.trim())||void 0,timeframe:((N=e.experiment.timeframe)==null?void 0:N.trim())||void 0,strategyPlan:e.experiment.strategyPlan}:null,metrics:e.metrics}},[e]),u=x.useMemo(()=>JSON.stringify(c),[c]);return x.useEffect(()=>{const h=Jw(u);if(h){o(h),a.current=u;try{localStorage.setItem("strategySynthesis.latest",JSON.stringify(h))}catch{}}},[u]),x.useEffect(()=>{var f;if(a.current===u||Jw(u)||!((f=c.criticalOpportunity)!=null&&f.situation)&&!c.challengeContext)return;a.current=u;let h=!1;return n(!0),s(null),o(null),(async()=>{try{const{data:m,error:w}=await Hg.functions.invoke("strategy-synthesis",{body:c});if(h)return;if(w)throw w;const y=m;if(y!=null&&y.error)throw new Error(y.error);o(y),XF(u,y)}catch(m){if(h)return;s(m instanceof Error?m.message:"Could not generate synthesis.")}finally{h||n(!1)}})(),()=>{h=!0}},[u,c]),!((d=c.criticalOpportunity)!=null&&d.situation)&&!c.challengeContext?null:l.jsx(H.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},children:l.jsxs(he,{className:"border-2 border-primary/40 bg-gradient-to-br from-primary/5 via-background to-accent/5",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-xl font-serif flex items-center gap-2",children:[l.jsx(cs,{className:"w-5 h-5 text-primary"}),"Your Plan to Move Forward"]}),l.jsx(be,{children:"A synthesis of YOUR BRAVER inputs — your situation, your masks, your assumptions, your experiment — turned into a simple plan. Nothing fabricated."})]}),l.jsxs(fe,{className:"space-y-5",children:[t&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-2",children:[l.jsx(Lm,{className:"w-4 h-4 animate-spin"}),"Synthesizing your BRAVER inputs into a plan…"]}),r&&l.jsx("p",{className:"text-sm text-destructive",children:r.includes("402")?"Out of AI credits — add credits in your workspace to continue."
395:r.includes("429")?"Too many requests right now. Try again in a moment.":"We could not generate this synthesis. The rest of your plan is still available below."}),(i==null?void 0:i.headline)&&l.jsx("p",{className:"font-serif text-lg md:text-xl text-foreground leading-snug",children:i.headline}),(i==null?void 0:i.executiveSummary)&&l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:i.executiveSummary}),(i==null?void 0:i.planToMoveForward)&&i.planToMoveForward.length>0&&l.jsxs("section",{children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-2 flex items-center gap-1.5",children:[l.jsx(kk,{className:"w-3 h-3"})," Plan to move forward"]}),l.jsx("ol",{className:"space-y-2",children:i.planToMoveForward.map((h,f)=>l.jsxs("li",{className:"p-3 rounded-md bg-primary/5 border-l-4 border-primary",children:[l.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[f+1,". ",h.step]}),h.why&&l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mt-1",children:h.why})]},f))})]}),(i==null?void 0:i.watchOuts)&&i.watchOuts.length>0&&l.jsxs("section",{children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-2 flex items-center gap-1.5",children:[l.jsx($m,{className:"w-3 h-3"})," Watch-outs from what you flagged"]}),l.jsx("ul",{className:"space-y-2",children:i.watchOuts.map((h,f)=>l.jsxs("li",{className:"p-3 rounded-md bg-destructive/5 border border-destructive/20",children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:h.title}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mt-1",children:h.detail})]},f))})]}),(i==null?void 0:i.gaps)&&i.gaps.length>0&&l.jsxs("section",{children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-accent mb-2 flex items-center gap-1.5",children:[l.jsx(DP,{className:"w-3 h-3"})," Gaps to fill before you act"]}),l.jsx("ul",{className:"space-y-1.5",children:i.gaps.map((h,f)=>l.jsxs("li",{className:"text-sm text-muted-foreground leading-relaxed",children:["• ",h]},f))})]})]})]})})}const jj="actionSequence.cache.",Tj="actionSequence.latest";function Xw(e){try{const t=localStorage.getItem(jj+e);return t?JSON.parse(t):null}catch{return null}}function eV(e,t){try{localStorage.setItem(jj+e,JSON.stringify(t)),localStorage.setItem(Tj,JSON.stringify(t))}catch{}}function tV(){var h;const{data:e}=Io(),[t,n]=x.useState(!1),[r,s]=x.useState(null),[i,o]=x.useState(null),a=x.useRef(null),c=x.useMemo(()=>{var b,v,g,p,S,k,E,C,j,_,P,M;const f=[...e.maskScores].sort((A,z)=>z.score-A.score).slice(0,3).map(A=>{const z=Dt.find(T=>T.id===A.maskId);return z?{name:z.name,statement:z.statement,experimentationBias:z.experimentationBias,score:A.score}:null}).filter(Boolean),m=(e.cognitiveBiases||[]).filter(A=>A.presence==="yes").map(A=>{var T;const z=qn.find(F=>F.id===A.biasId);return{name:(z==null?void 0:z.name)||A.biasId,patternChallenge:((T=A.patternChallenge)==null?void 0:T.trim())||void 0}}),w=e.experiment?ti.find(A=>A.id===e.experiment.strategyId):null;let y=null;try{const A=localStorage.getItem("strategySynthesis.latest");A&&(y=JSON.parse(A))}catch{}return{challengeContext:((b=e.challengeContext)==null?void 0:b.trim())||void 0,challengeType:e.challengeType,criticalOpportunity:e.criticalOpportunity?{situation:((v=e.criticalOpportunity.situation)==null?void 0:v.trim())||void 0,whatsAtStake:((g=e.criticalOpportunity.whatsAtStake)==null?void 0:g.trim())||void 0,painLevel:e.criticalOpportunity.painLevel,roadblocks:(p=e.criticalOpportunity.roadblocks)==null?void 0:p.filter(Boolean),possibilities:(S=e.criticalOpportunity.possibilities)==null?void 0:S.filter(Boolean)}:null,topMasks:f,flaggedBiases:m,assumptions:e.assumptions?{belief:((k=e.assumptions.beliefStatement)==null?void 0:k.trim())||void 0,change:((E=e.assumptions.changeStatement)==null?void 0:E.trim())||void 0}:null,actionAnalysis:e.actionAnalysis||null,validationStakeholders:(C=e.validationStakeholders)==null?void 0:C.map(A=>{var z;return{method:A.method,who:A.who,purpose:((z=A.purpose)==null?void 0:z.trim())||void 0}}),experiment:e.experiment?{strategyName:w==null?void 0:w.name,hypothesis:((j=e.experiment.hypothesis)==null?void 0:j.trim())||void 0,successCriteria:((_=e.experiment.successCriteria)==null?void 0:_.trim())||void 0,stopCondition:((P=e.experiment.stopCondition)==null?void 0:P.trim())||void 0,timeframe:((M=e.experiment.timeframe)==null?void 0:M.trim())||void 0,strategyPlan:e.experiment.strategyPlan}:null,metrics:e.metrics,priorSynthesis:y}},[e]),u=x.useMemo(()=>JSON.stringify(c),[c]);if(x.useEffect(()=>{const f=Xw(u);if(f){o(f),a.current=u;try{localStorage.setItem(Tj,JSON.stringify(f))}catch{}}},[u]),x.useEffect(()=>{var m;if(a.current===u||Xw(u)||!((m=c.criticalOpportunity)!=null&&m.situation)&&!c.challengeContext)return;a.current=u;let f=!1;return n(!0),s(null),o(null),(async()=>{try{const{data:w,error:y}=await Hg.functions.invoke("action-sequence-synthesis",{body:c});if(f)return;if(y)throw y;const b=w;if(b!=null&&b.error)throw new Error(b.error);o(b),eV(u,b)}catch(w){if(f)return;s(w instanceof Error?w.message:"Could not generate action sequence.")}finally{f||n(!1)}})(),()=>{f=!0}},[u,c]),!((h=c.criticalOpportunity)!=null&&h.situation)&&!c.challengeContext)return null;const d=({label:f,items:m})=>!m||m.length===0?null:l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-2",children:f}),l.jsx("ul",{className:"space-y-1.5",children:m.map((w,y)=>l.jsxs("li",{className:"text-sm text-foreground leading-relaxed pl-4 relative",children:[l.jsx("span",{className:"absolute left-0 top-0 text-primary",children:"•"}),w]},y))})]});return l.jsx(H.div,{initial:{opacity:0,y:12}
395,animate:{opacity:1,y:0},children:l.jsxs(he,{className:"border-2 border-accent/40 bg-gradient-to-br from-accent/5 via-background to-primary/5",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-xl font-serif flex items-center gap-2",children:[l.jsx(TP,{className:"w-5 h-5 text-accent"}),"What To Do Next — Sequenced Action Plan"]}),l.jsx(be,{children:"A clean, sequenced plan built from YOUR BRAVER inputs. Today → This Week → This Month → Next Month, plus the one thing to resist."})]}),l.jsxs(fe,{className:"space-y-5",children:[t&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground py-2",children:[l.jsx(Lm,{className:"w-4 h-4 animate-spin"}),"Building your sequenced action plan…"]}),r&&l.jsx("p",{className:"text-sm text-destructive",children:r.includes("402")?"Out of AI credits — add credits in your workspace to continue.":r.includes("429")?"Too many requests right now. Try again in a moment.":"We could not generate this sequence. Your full plan is still available above."}),(i==null?void 0:i.intro)&&l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:i.intro}),l.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[l.jsx(d,{label:"Today",items:i==null?void 0:i.today}),l.jsx(d,{label:"This Week",items:i==null?void 0:i.thisWeek}),l.jsx(d,{label:"This Month",items:i==null?void 0:i.thisMonth}),l.jsx(d,{label:"Next Month",items:i==null?void 0:i.nextMonth})]}),(i==null?void 0:i.oneThingToResist)&&l.jsxs("div",{className:"p-4 rounded-md bg-destructive/5 border border-destructive/20",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-1.5 flex items-center gap-1.5",children:[l.jsx(Ck,{className:"w-3 h-3"})," The one thing to resist"]}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:i.oneThingToResist})]}),!t&&!r&&!i&&l.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[l.jsx(kk,{className:"w-4 h-4"})," Preparing your sequenced plan…"]})]})]})})}function nV({onReset:e}){var f,m,w,y,b,v,g;const{data:t,getTopMasks:n}=Io(),r=n(3),s=ti.find(p=>{var S;return p.id===((S=t.experiment)==null?void 0:S.strategyId)}),i=t.criticalOpportunity?Pg[t.criticalOpportunity.painLevel]:null,o=z4(t),a=q4(t);x.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]);const c=()=>{var k,E,C,j,_,P,M,A,z,T,F,W,V,N,R,$;const p=[];p.push("═══════════════════════════════════════════════════════════════"),p.push("           BRAVER INNOVATION STRATEGY PLAN"),p.push("      The BRAVER Innovation (BI) Model — By Dr. Diane Dye"),p.push("═══════════════════════════════════════════════════════════════"),p.push(`Generated: ${new Date().toLocaleDateString()}`),p.push("");try{const O=localStorage.getItem("strategySynthesis.latest");if(O){const L=JSON.parse(O);(L.headline||L.executiveSummary||(((k=L.planToMoveForward)==null?void 0:k.length)??0)>0)&&(p.push("─── YOUR PLAN TO MOVE FORWARD (SYNTHESIS) ───"),L.headline&&(p.push(L.headline),p.push("")),L.executiveSummary&&(p.push(L.executiveSummary),p.push("")),(E=L.planToMoveForward)!=null&&E.length&&(p.push("Plan to move forward:"),L.planToMoveForward.forEach((q,Q)=>{p.push(`  ${Q+1}. ${q.step}`),q.why&&p.push(`     Why: ${q.why}`)}),p.push("")),(C=L.watchOuts)!=null&&C.length&&(p.push("Watch-outs:"),L.watchOuts.forEach(q=>{p.push(`  • ${q.title} — ${q.detail}`)}),p.push("")),(j=L.gaps)!=null&&j.length&&(p.push("Gaps to fill before you act:"),L.gaps.forEach(q=>p.push(`  • ${q}`)),p.push("")))}}catch{}p.push("─── YOUR EXPERIMENTATION BIASES ───"),r.forEach((O,L)=>{const q=Dt.find(Q=>Q.id===O.maskId);q&&(p.push(`${L+1}. ${q.name} (${O.score}/5)`),p.push(`   Bias: ${q.experimentationBias}`),q.recommendations.length>0&&(p.push(`   📖 Insight: ${q.recommendations[0].insight}`),p.push(`   Source: ${q.recommendations[0].source}
395`),p.push(`   → Action: ${q.recommendations[0].actionStep}`)))}),p.push("");const S=(t.cognitiveBiases||[]).filter(O=>O.presence==="yes");if(S.length>0&&(p.push("─── COGNITIVE BIASES FLAGGED & PATTERN CHALLENGES ───"),S.forEach((O,L)=>{var q;p.push(`${L+1}. Bias ID: ${O.biasId}`),O.interrogation.trim()&&p.push(`   Interrogation plan: ${O.interrogation.trim()}`),(q=O.researchPromptResponse)!=null&&q.trim()&&p.push(`   Research prompt response: ${O.researchPromptResponse.trim()}`),O.patternChallenge.trim()&&p.push(`   → Pattern challenge (do differently): ${O.patternChallenge.trim()}`)}),p.push("")),t.criticalOpportunity&&(p.push("─── THE DOMINO: YOUR CRITICAL OPPORTUNITY ───"),p.push(`Situation: ${t.criticalOpportunity.situation}`),p.push(`Pain Level: ${t.criticalOpportunity.painLevel}/10`),(_=t.criticalOpportunity.whatsAtStake)!=null&&_.trim()&&(p.push(""),p.push("What's at stake if this doesn't change:"),p.push(`  ${t.criticalOpportunity.whatsAtStake.trim()}`)),p.push(""),((P=t.criticalOpportunity.primaryResearch)==null?void 0:P.length)>0&&(p.push("Primary Research Plan:"),t.criticalOpportunity.primaryResearch.forEach((O,L)=>{p.push(`  ${L+1}. Method: ${O.method}`),O.who&&p.push(`     Who: ${O.who}`),O.questions&&p.push(`     Questions: ${O.questions}`)}),p.push("")),((M=t.criticalOpportunity.secondaryResearch)==null?void 0:M.length)>0&&(p.push("Secondary Research Plan:"),t.criticalOpportunity.secondaryResearch.forEach((O,L)=>{p.push(`  ${L+1}. Source: ${O.method}`),O.who&&p.push(`     Who: ${O.who}`),O.questions&&p.push(`     Questions: ${O.questions}`)}),p.push(""))),((z=(A=t.criticalOpportunity)==null?void 0:A.whatsAtStake)!=null&&z.trim()||t.actionAnalysis)&&(p.push("─── RIPPLE EFFECTS SUMMARY ───"),(F=(T=t.criticalOpportunity)==null?void 0:T.whatsAtStake)!=null&&F.trim()&&(p.push("If nothing changes, here is what is at stake:"),p.push(`  ${t.criticalOpportunity.whatsAtStake.trim()}`),p.push("")),t.actionAnalysis)){const O=t.actionAnalysis,L=[{label:"People",value:O.people},{label:"Processes",value:O.processes},{label:"Systems",value:O.systems},{label:"Policies",value:O.policies},{label:"Environment",value:O.environment}].filter(q=>{var Q;return(Q=q.value)==null?void 0:Q.trim()});L.length>0&&(p.push("Who & what may be impacted (inside and outside the organization):"),L.forEach(q=>{p.push(`  • ${q.label}: ${q.value.trim()}`)}),p.push("")),(W=O.rippleEffects)!=null&&W.trim()&&(p.push("Cross-dimension patterns and interdependencies you identified:"),p.push(`  ${O.rippleEffects.trim()}`),p.push(""))}if(t.validationStakeholders&&t.validationStakeholders.length>0&&(p.push("─── VALIDATION STAKEHOLDERS ───"),p.push("Who you will interview, survey, or otherwise engage to validate the action plan:"),t.validationStakeholders.forEach((O,L)=>{var q;p.push(`${L+1}. ${O.method.trim()} — ${O.who.trim()}`),(q=O.purpose)!=null&&q.trim()&&p.push(`   Purpose / Topics: ${O.purpose.trim()}`)}),p.push("")),t.experiment&&s){const O=Xa[t.experiment.strategyId],L=t.experiment.strategyPlan||{},q=O?O.fields.filter(Q=>(L[Q.key]||"").trim().length>0):[];O&&q.length>0&&(p.push(`─── EXECUTABLE ${s.name.toUpperCase()} PLAN ───`),q.forEach(Q=>{p.push(`▸ ${Q.label}`),(L[Q.key]||"").trim().split(`
396`).forEach(U=>p.push(`  ${U}`)),p.push("")}))}t.metrics&&(p.push("─── SUCCESS METRICS ───"),p.push("Leading Indicators:"),t.metrics.leadingIndicators.forEach(O=>p.push(`  • ${O}`)),p.push(""),p.push("Lagging Indicators:"),t.metrics.laggingIndicators.forEach(O=>p.push(`  • ${O}`)),p.push(""),t.metrics.checkpoints.length>0&&(p.push("Checkpoints:"),t.metrics.checkpoints.forEach(O=>p.push(`  ${O.date}: ${O.action}`)),p.push("")),p.push(`Why Action Must Be Taken: ${t.metrics.whyTakeAction}`),p.push("")),a&&(p.push(""),p.push(K4(a)),p.push(""));try{const O=localStorage.getItem("actionSequence.latest");if(O){const L=JSON.parse(O);if(L.intro||L.oneThingToResist||((V=L.today)==null?void 0:V.length)||((N=L.thisWeek)==null?void 0:N.length)||((R=L.thisMonth)==null?void 0:R.length)||(($=L.nextMonth)==null?void 0:$.length)){p.push("─── WHAT TO DO NEXT — SEQUENCED ACTION PLAN ───"),L.intro&&(p.push(L.intro),p.push(""));const Q=(U,K)=>
396{!K||K.length===0||(p.push(U.toUpperCase()),K.forEach(J=>p.push(`  • ${J}`)),p.push(""))};Q("Today",L.today),Q("This Week",L.thisWeek),Q("This Month",L.thisMonth),Q("Next Month",L.nextMonth),L.oneThingToResist&&(p.push("THE ONE THING TO RESIST"),p.push(`  ${L.oneThingToResist}`),p.push(""))}}}catch{}return p.push("═══════════════════════════════════════════════════════════════"),p.push("For cohort feedback, email this plan to:"),p.push("[email protected]"),p.push(""),p.push("© People Risk Consulting - Executive Innovators Community"),p.push("═══════════════════════════════════════════════════════════════"),p.join(`
397`)},u=()=>{window.print()},d=async()=>{const p=c();try{await navigator.clipboard.writeText(p),Av.success("Plan copied! Paste it in an email, Slack, or document to share with others.")}catch{Av.error("Failed to copy. Please try again.")}},h=()=>{const p="https://www.linkedin.com/in/drdianedye";try{(window.top??window).open(p,"_blank","noopener,noreferrer")||window.location.assign(p)}catch{window.location.assign(p)}};return l.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 print:space-y-4 print:max-w-none",children:[l.jsx("style",{children:`
398        @media print {
399          body * { visibility: hidden; }
400          .print-area, .print-area * { visibility: visible; }
401          .print-area { position: absolute; left: 0; top: 0; width: 100%; }
402          .no-print { display: none !important; }
403          header, footer, .stage-progress { display: none !important; }
404        }
405      `}),l.jsxs("div",{className:"print-area",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-stage-complete/20 mb-4 print:hidden",children:l.jsx(Ek,{className:"w-8 h-8 text-stage-complete"})}),l.jsx("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:"Your BRAVER Innovation Plan"}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto print:text-foreground",children:"You finished all six stages of the BRAVER Innovation Model. Print or copy your plan. Share it with Dr. Diane Dye on LinkedIn to get personal feedback."})]}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"flex flex-wrap gap-3 justify-center no-print",children:[l.jsxs(te,{onClick:u,variant:"outline",children:[l.jsx(Tv,{className:"w-4 h-4 mr-2"}),"Print Plan"]}),l.jsxs(te,{onClick:d,variant:"outline",children:[l.jsx(jv,{className:"w-4 h-4 mr-2"}),"Copy & Share Plan"]}),l.jsxs(te,{onClick:h,className:"gradient-hero text-primary-foreground",children:[l.jsx(Hl,{className:"w-4 h-4 mr-2"}),"Send Plan to Dr. Diane Dye on LinkedIn"]})]}),l.jsx(ZF,{}),l.jsx(Y4,{plan:o.executionPlan,variant:"top"}),l.jsxs("div",{className:"space-y-6",children:[l.jsx(Ej,{stageLabel:"Final Strategy Plan",variant:"full"}),l.jsx(sr,{delay:.2,title:"Your Mask Profile",icon:l.jsx(Zs,{className:"w-5 h-5 text-primary"}),description:"The Masks you wear that may slow down your experiments",className:"border-2",children:l.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:r.map((p,S)=>{const k=Dt.find(E=>E.id===p.maskId);return l.jsxs("div",{className:Z("p-4 rounded-lg border",S===0?"bg-primary/10 border-primary":"bg-muted/50"),children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-2xl",children:k.icon}),l.jsx("span",{className:"font-medium",children:k.name}),l.jsxs(Kn,{variant:"secondary",className:"ml-auto",children:[p.score,"/5"]})]}),l.jsxs("p",{className:"text-xs italic text-foreground/80 mb-1",children:['"',k.statement,'"']}),l.jsxs("p",{className:"text-[11px] text-muted-foreground mb-2",children:[l.jsx("span",{className:"font-semibold text-foreground/70",children:"Consequence:"})," ",k.consequence]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[l.jsx("span",{className:"font-semibold text-foreground
405/70",children:"Experimentation bias:"})," ",k.experimentationBias]}),k.recommendations.length>0&&l.jsxs("div",{className:"mt-3 pt-3 border-t border-primary/10",children:[l.jsxs("p",{className:"text-xs font-medium text-primary flex items-center gap-1 mb-1",children:[l.jsx(gk,{className:"w-3 h-3"}),"From ",k.recommendations[0].source]}),l.jsxs("p",{className:"text-xs text-muted-foreground italic leading-relaxed",children:['"',k.recommendations[0].insight,'"']}),l.jsxs("p",{className:"text-xs text-accent font-medium mt-1 flex items-start gap-1",children:[l.jsx(St,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),k.recommendations[0].actionStep]})]})]},k.id)})})}),t.maskScores.length>0&&l.jsx(sr,{delay:.25,icon:l.jsx(Zs,{className:"w-5 h-5 text-accent"}),title:"Full Mask Report — All 10 Results",description:"Tap to see all 10 results. Your top 3 are shown above.",children:l.jsx("div",{className:"space-y-3",children:[...t.maskScores].sort((p,S)=>S.score-p.score).map(p=>{const S=Dt.find(k=>k.id===p.maskId);return S?l.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-card border",children:[l.jsx("span",{className:"text-2xl",children:S.icon}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:"font-medium",children:S.name}),l.jsx("span",{className:Z("text-xs px-2 py-0.5 rounded-full",S.category==="protective"?"bg-accent/20 text-accent":"bg-secondary/20 text-secondary-foreground"),children:S.category})]}),l.jsxs("p",{className:"text-[11px] italic text-foreground/70 mt-0.5",children:['"',S.statement,'" — ',S.consequence]}),l.jsx("p",{className:"text-xs text-muted-foreground truncate",children:S.experimentationBias})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[l.jsx("div",{className:"w-24 h-2 bg-muted rounded-full overflow-hidden",children:l.jsx("div",{className:Z("h-full rounded-full",p.score>=4?"bg-destructive":p.score>=3?"bg-primary":"bg-accent"),style:{width:`${p.score/5*100}%`}})}),l.jsxs("span",{className:"text-sm font-semibold w-8 text-right",children:[p.score,"/5"]})]})]},S.id):null})})}),t.cognitiveBiases&&t.cognitiveBiases.filter(p=>p.presence==="yes").length>0&&l.jsx(sr,{delay:.28,icon:l.jsx(cs,{className:"w-5 h-5 text-destructive"}),title:"Biases Interrogated & Pattern Challenges",description:"The Biases you flagged and the behavior changes you promised to make",className:"border-2 border-destructive/30",contentClassName:"space-y-4",children:t.cognitiveBiases.filter(p=>p.presence==="yes").map(p=>{var k;const S=qn.find(E=>E.id===p.biasId);return S?l.jsxs("div",{className:"p-4 rounded-lg bg-muted/40 border border-destructive/20",children:[l.jsx("p",{className:"font-semibold text-foreground mb-1",children:S.name}),l.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:S.shortDescription}),p.interrogation.trim()&&l.jsxs("div",{className:"mb-2",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"Interrogation plan"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:p.interrogation})]}),((k=p.researchPromptResponse)==null?void 0:k.trim())&&l.jsxs("div",{className:"mb-2",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"Research prompt response"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:p.researchPromptResponse})]}),p.patternChallenge.trim()&&l.jsxs("div",{className:"mt-2 p-3 rounded-md bg-accent/10 border-l-4 border-accent",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-accent mb-1",children:"One thing I will do differently"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:p.patternChallenge})]})]},p.biasId):null})}),t.criticalOpportunity&&l.jsxs(sr,{delay:.3,icon:l.jsx(Hu,{className:"w-5 h-5 text-destructive"}),title:"The Domino: Your Critical Opportunity",className:"border-2",contentClassName:"space-y-4",children:[l.jsxs("div",{className:"p-4 bg-muted/50 rounded-lg",children:[l.jsx("p",{className:"font-medium text-foreground",children:t.criticalOpportunity.situation}),l.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[l.jsxs(Kn,{variant:t.criticalOpportunity.painLevel>=7?"destructive":"secondary",children:["Pain Level: ",t.criticalOpportunity.painLevel,"/10"]}),l.jsx("span",{className:"text-xs text-muted-foreground",children:i==null?void 0:i.response})]})]}),((f=t.criticalOpportunity.whatsAtStake)==null?void 0:f.trim())&&l.jsxs("div",{className:"p-4 rounded-lg bg-destructive/5 border border-destructive/20",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-1 flex items-center gap-1.5",children:[l.jsx(su,{className:"w-3 h-3"})," What's at stake if this doesn't change"]}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:t.criticalOpportunity.whatsAtStake})]}),(((m=t.criticalOpportunity.primaryResearch)==null?void 0:m.length)>0||((w=t.criticalOpportunity.secondaryResearch)==null?void 0:w.length)>0)&&l.jsxs("div",{className:"grid gap-4 md:grid-cols-2 pt-2 border-t",children:[((y=t.criticalOpportunity.primaryResearch)==null?void 0:y.length)>0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2 text-primary",children:"Primary Research Plan:"}),l.jsx("ul",{className:"space-y-3",children:t.criticalOpportunity.primaryResearch.map((p,S)=>l.jsxs("li",{className:"text-xs text-muted-foreground border-l-2 border-primary/40 pl-3",children:[l.jsxs("p",{className:"text-foreground",children:[l.jsx("span",{className:"font-semibold",children:"Method:"})," ",p.method]}),p.who&&l.jsxs("p",{children:[l.jsx("span",{className:"font-semibold text-foreground",children:"Who:"})," ",p.who]}),p.questions&&l.jsxs("p",{className:"whitespace-pre-line",children:[l.jsx("span",{className:"font-semibold text-foreground",children:"Questions:"})," ",p.questions]})]},S))})]}),((b=t.criticalOpportunity.secondaryResearch)==null?void 0:b.length)>0&&l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2 text-accent",children:"Secondary Research Plan:"}),l.jsx("ul",{className:"space-y-3",children:t.criticalOpportunity.secondaryResearch.map((p,S)=>l.jsxs("li",{className:"text-xs text-muted-foreground border-l-2 border-accent/40 pl-3",children:[l.jsxs("p",{className:"text-foreground",children:[l.jsx("span",{className:"font-semibold",children:"Source:"})," ",p.method]}),p.who&&l.jsxs("p",{children:[l.jsx("span",{className:"font-semibold text-foreground",children:"Who:"})," ",p.who]}),p.questions&&l.jsxs("p",{className:"whitespace-pre-line",children:[l.jsx("span",{className:"font-semibold text-foreground",children:"Questions:"})," ",p.questions]})]},S))})]})]})]}),t.validationStakeholders&&t.validationStakeholders.length>0&&l.jsx(sr,{delay:.35,icon:l.jsx(qu,{className:"w-5 h-5 text-primary"}),title:"Validation Stakeholders",description:"These are the people you plan to talk to or survey. You will use them to check your action plan.",contentClassName:"space-y-3",children:t.validationStakeholders.map((p,S)=>{var k;return l.jsxs("div",{className:"p-4 rounded-lg bg-primary/5 border border-primary/20 space-y-1",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:p.method}),l.jsx("p",{className:"text-sm font-semibold text-foreground",children:p.who}),((k=p.purpose)==null?void 0:k.trim())&&l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-line",children:p.purpose})]},S)})}),t.experiment&&s&&(()=>{const p=Xa[t.experiment.strategyId],S=t.experiment.strategyPlan||{},k=p?p.fields.filter(E=>(S[E.key]||"").trim().length>0):[];return!p||k.length===0?null:l.jsx(sr,{delay:.45,icon:l.jsx($f,{className:"w-5 h-5 text-primary"}),title:`Executable ${s.name} Plan`,description:"The plan you built. It is ready to run or share with your team.",className:"border-2 border-primary/40 bg-gradient-to-br from-primary/5 via-background to-accent/5",contentClassName:"space-y-3",children:k.map(E=>l.jsxs("div",{className:"p-4 rounded-lg bg-background border border-primary/20",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:E.label}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:S[E.key].trim()})]},E.key))})})(),t.metrics&&l.jsxs(sr,{delay:.5,icon:l.jsx(jk,{className:"w-5 h-5 text-stage-complete"}),title:"Success Metrics & Action Plan",className:"border-2",contentClassName:"space-y-4",children:[l.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2 text-stage-complete",children:"Leading Indicators:"}),l.jsx("ul",{className:"space-y-1",children:t.metrics.leadingIndicators.map((p,S)=>l.jsxs("li",{className:"text-sm text-muted-foreground",children:["• ",p]},S))})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2 text-primary",children:"Lagging Indicators:"}),l.jsx("ul",{className:"space-y-1",children:t.metrics.laggingIndicators.map((p,S)=>l.jsxs("li",{className:"text-sm text-muted-foreground",children:["• ",p]},S))})]})]}),t.metrics.checkpoints.length>0&&l.jsxs(l.Fragment,{children:[l.jsx(Br,{}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium mb-2",children:"Review Checkpoints:"}),l.jsx("div",{className:"space-y-2",children:t.metrics.checkpoints.map((p,S)=>l.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[l.jsx(Kn,{variant:"outline",children:p.date}),l.jsx("span",{className:"text-muted-foreground",children:p.action})]},S))})]})]}),l.jsx(Br,{}),l.jsxs("div",{className:"p-4 bg-secondary/10 rounded-lg",children:[l.jsx("p",{className:"text-sm font-medium text-secondary mb-1",children:"Why Action Must Be Taken:"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t.metrics.whyTakeAction})]})]}),(((g=(v=t.criticalOpportunity)==null?void 0:v.whatsAtStake)==null?void 0:g.trim())||t.actionAnalysis)&&(()=>{var k,E,C,j,_,P;const p=t.actionAnalysis,S=p?[{label:"People",value:p.people},{label:"Processes",value:p.processes},{label:"Systems",value:p.systems},{label:"Policies",value:p.policies},{label:"Environment",value:p.environment}].filter(M=>{var A;return(A=M.value)==null?void 0:A.trim()}):[];return l.jsxs(sr,{delay:.52,icon:l.jsx(su,{className:"w-5 h-5 text-destructive"}),title:"Ripple Effects Summary",description:"This shows who or what your change may affect. It can reach far beyond your team — to other departments, customers, partners, and more.",contentClassName:"space-y-4",children:[((E=(k=t.criticalOpportunity)==null?void 0:k.whatsAtStake)==null?void 0:E.trim())&&l.jsxs("div",{className:"p-4 rounded-lg bg-background border border-destructive/20",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-1",children:"If nothing changes"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:t.criticalOpportunity.whatsAtStake})]}),S.length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-foreground
405/70 flex items-center gap-1.5",children:[l.jsx(Tk,{className:"w-3 h-3"})," Who and what may be affected — inside and outside your organization"]}),l.jsx("ul",{className:"space-y-2",children:S.map(M=>l.jsxs("li",{className:"text-sm text-foreground bg-background border-l-4 border-destructive/40 pl-3 py-2 rounded-r",children:[l.jsxs("span",{className:"font-semibold",children:[M.label,": "]}),l.jsx("span",{className:"text-muted-foreground whitespace-pre-line",children:M.value.trim()})]},M.label))})]}),((C=p==null?void 0:p.rippleEffects)==null?void 0:C.trim())&&l.jsxs("div",{className:"p-4 rounded-lg bg-background border border-destructive/20",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-destructive mb-1",children:"Patterns you spotted across areas"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed whitespace-pre-line",children:p.rippleEffects})]}),!((_=(j=t.criticalOpportunity)==null?void 0:j.whatsAtStake)!=null&&_.trim())&&S.length===0&&!((P=p==null?void 0:p.rippleEffects)!=null&&P.trim())&&l.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Finish Stage 1 and the Action Analysis to fill in this section."})]})})(),a&&l.jsx(sr,{delay:.54,icon:l.jsx(oi,{className:"w-5 h-5 text-primary"}),title:"Experiment Charter",description:"The formal sign-off document for this experiment.",bare:!0,contentClassName:"space-y-4",children:l.jsx(G4,{charter:a})}),l.jsx(Q4,{plan:o.executionPlan}),l.jsx(tV,{})]}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.55},className:"flex flex-wrap gap-3 justify-center no-print pt-2",children:[l.jsxs(te,{onClick:u,variant:"outline",children:[l.jsx(Tv,{className:"w-4 h-4 mr-2"}),"Print Plan"]}),l.jsxs(te,{onClick:d,variant:"outline",children:[l.jsx(jv,{className:"w-4 h-4 mr-2"}),"Copy & Share Plan"]}),l.jsxs(te,{onClick:h,className:"gradient-hero text-primary-foreground",children:[l.jsx(Hl,{className:"w-4 h-4 mr-2"}),"Send Plan to Dr. Diane Dye on LinkedIn"]})]}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"text-center p-8 bg-gradient-to-br from-primary/10 via-accent/5 to-secondary/10 rounded-2xl border-2 border-primary/20 no-print",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/20 mb-4",children:l.jsx(Hl,{className:"w-6 h-6 text-primary"})}),l.jsx("h3",{className:"text-xl font-serif font-bold mb-2",children:"Share Your Plan and Get Feedback"}),l.jsxs("p",{className:"text-muted-foreground mb-4 max-w-xl mx-auto",children:["Copy your plan and send it to ",l.jsx("strong",{children:"Dr. Diane Dye"})," on LinkedIn. Get personal feedback on your strategy. Join a community of executive innovators."]}),l.jsxs(te,{onClick:()=>{const p="https://www.linkedin.com/in/drdianedye";try{(window.top??window).open(p,"_blank","noopener,noreferrer")||window.location.assign(p)}catch{window.location.assign(p)}},className:"gradient-hero text-primary-foreground",size:"lg",children:[l.jsx(Hl,{className:"w-4 h-4 mr-2"}),"Connect with Dr. Diane Dye on LinkedIn"]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:"linkedin.com/in/drdianedye"})]}),l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.65},className:"text-center p-8 bg-gradient-to-br from-accent/20 via-primary/10 to-secondary/20 rounded-2xl border-2 border-primary/30 no-print",children:[l.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-accent/20 mb-4",children:l.jsx(cs,{className:"w-6 h-6 text-accent"})}),l.jsx("h3",{className:"text-xl font-serif font-bold mb-2",children:"Keep Going on Your Innovation Journey"}),l.jsxs("p",{className:"text-muted-foreground mb-4 max-w-xl mx-auto",children:["Want to learn more about experiments and innovation?"," ",l.jsx("strong",{children:"People Risk Consulting"})," can help."]}),l.jsx(te,{asChild:!0,className:"gradient-hero text-primary-foreground",size:"lg",children:l.jsxs("a",{href:"https://www.peopleriskconsulting.com",target:"_blank",rel:"noopener noreferrer",children:[l.jsx(Mm,{className:"w-4 h-4 mr-2"}),"Contact Us"]})}),l.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:"www.peopleriskconsulting.com"})]}),l.jsxs(H.div,{initial:{opacity:0,y:20}
405,animate:{opacity:1,y:0},transition:{delay:.7},className:"text-center p-6 print:p-4",children:[l.jsx("p",{className:"text-lg italic text-muted-foreground mb-2 print:text-foreground",children:'"Your breakthrough is one decision away. The cost of inaction is always greater than the cost of action."'}),l.jsx("p",{className:"text-sm font-medium text-primary",children:"— Dr. Diane Dye, People Risk Consulting"})]}),l.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"flex justify-center no-print",children:l.jsxs(te,{onClick:e,variant:"ghost",className:"text-muted-foreground",children:[l.jsx(Sk,{className:"w-4 h-4 mr-2"}),"Start a New Experiment"]})})]})]})}function Zw({title:e="Why this matters",children:t,variant:n="card",className:r}){return n==="inline"?l.jsxs("div",{className:Z("flex gap-2 items-start rounded-md border border-learn/30 bg-learn/5 p-3 text-sm text-foreground",r),children:[l.jsx(Zs,{className:"w-4 h-4 mt-0.5 text-learn flex-shrink-0","aria-hidden":"true"}),l.jsxs("div",{className:"leading-relaxed",children:[e&&l.jsxs("span",{className:"font-semibold text-learn mr-1",children:[e,":"]}),l.jsx("span",{className:"text-muted-foreground",children:t})]})]}):l.jsx("div",{className:Z("rounded-lg border-2 border-learn/30 bg-learn/5 p-4 sm:p-5",r),role:"note","aria-label":"Educational content",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-learn/15 flex items-center justify-center",children:l.jsx(Zs,{className:"w-4 h-4 text-learn","aria-hidden":"true"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[e&&l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-learn mb-1.5",children:e}),l.jsx("div",{className:"text-sm text-foreground leading-relaxed space-y-2",children:t})]})]})})}const e0=["","","","",""];function rV({initialData:e,onComplete:t}){var y,b,v;const[n,r]=x.useState((e==null?void 0:e.changeStatement)||""),[s,i]=x.useState((e==null?void 0:e.beliefStatement)||""),[o,a]=x.useState(((y=e==null?void 0:e.trueReasons)==null?void 0:y.length)===5?e.trueReasons:[...e0]),[c,u]=x.useState(((b=e==null?void 0:e.notTrueReasons)==null?void 0:b.length)===5?e.notTrueReasons:[...e0]),[d,h]=x.useState((v=e==null?void 0:e.possibilities)!=null&&v.length?e.possibilities:[""]);x.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]);const f=(g,p,S)=>{g(k=>{const E=[...k];return E[p]=S,E})},m=()=>{h(g=>[...g,""])},w=()=>{t({changeStatement:n.trim(),beliefStatement:s.trim(),trueReasons:o.map(g=>g.trim()).filter(Boolean),notTrueReasons:c.map(g=>g.trim()).filter(Boolean),possibilities:d.map(g=>g.trim()).filter(Boolean)})};return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-serif font-bold mb-4",children:"Check Your Assumptions"}),l.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Before you move forward, question the assumptions behind your main point of change. This step helps you find blind spots your Bias might be hiding."})]}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:l.jsxs(Zw,{title:"How to think about this",children:["Check your Assumptions before you design a test. Ask yourself:"," ",l.jsx("em",{children:"Why do I believe this is true? Why might it not be? And what else is possible?"})," ","Your answers show you the real experiment to run."]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},children:l.jsxs(he,{className:"border-2",children:[l.jsxs(we,{className:"pb-3",children:[l.jsx(ge,{className:"text-lg font-sans",children:"Your Main Point of Change"}),l.jsx(be,{children:"Write the main change or belief you want to test."})]}),l.jsx(fe,{children:l.jsx(Je,{value:n,onChange:g=>r(g.target.value),placeholder:"e.g., 'We need to restructure our sales team to hit Q3 targets' or 'Our onboarding process is causing high turnover'",className:"min-h-[80px]"})})]})}),l.jsx(H.div,{initial:{opacity:0,y:20}
405,animate:{opacity:1,y:0},transition:{delay:.18},children:l.jsxs(he,{className:"border-2 border-accent/40 bg-accent/5",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Zs,{className:"w-5 h-5 text-accent"}),l.jsx(ge,{className:"text-lg font-sans",children:"My belief about this change"})]}),l.jsxs(be,{children:["Write the belief behind your point of change. Keep it to one sentence:"," ",l.jsx("em",{children:'"I believe that…"'}),". Naming it is what makes it testable."]})]}),l.jsx(fe,{children:l.jsx(Je,{value:s,onChange:g=>i(g.target.value),placeholder:"e.g., 'I believe that restructuring the sales team is the fastest path to hitting Q3 targets.'",className:"min-h-[80px]"})})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:l.jsxs(he,{className:"border-2 border-stage-complete/30",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(oi,{className:"w-5 h-5 text-stage-complete"}),l.jsx(ge,{className:"text-lg font-sans",children:"This is true because..."})]}),l.jsx(be,{children:"List 5 reasons that support your belief. What evidence or experience tells you this change is needed?"})]}),l.jsx(fe,{className:"space-y-3",children:o.map((g,p)=>l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("span",{className:"text-sm font-semibold text-stage-complete mt-2 w-5 text-right",children:[p+1,"."]}),l.jsx(Je,{value:g,onChange:S=>f(a,p,S.target.value),placeholder:["What data backs this up?","What have you seen yourself?","What are stakeholders saying?","What trends support this?","What happens if you do nothing?"][p],className:"min-h-[50px] flex-1",rows:1})]},p))})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:l.jsxs(he,{className:"border-2 border-destructive/30",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(AP,{className:"w-5 h-5 text-destructive"}),l.jsx(ge,{className:"text-lg font-sans",children:"This is NOT true because..."})]}),l.jsx(be,{children:"Push back on your own belief. List 5 reasons this change might be wrong or unnecessary. This is where your Bias gets exposed."})]}),l.jsx(fe,{className:"space-y-3",children:c.map((g,p)=>l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("span",{className:"text-sm font-semibold text-destructive mt-2 w-5 text-right",children:[p+1,"."]}),l.jsx(Je,{value:g,onChange:S=>f(u,p,S.target.value),placeholder:["What evidence contradicts this?","Who disagrees — and why might they be right?","What am I assuming without proof?","What is working well right now?","What might I be misreading or oversimplifying?"][p],className:"min-h-[50px] flex-1",rows:1})]},p))})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},children:l.jsxs(he,{className:"border-2 border-primary/30",children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Zs,{className:"w-5 h-5 text-primary"}),l.jsx(ge,{className:"text-lg font-sans",children:"It's possible that..."})]}),l.jsx(be,{children:"Open your mind to other explanations. What else could be going on that you have not fully considered?"})]}),l.jsxs(fe,{className:"space-y-3",children:[d.map((g,p)=>l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("span",{className:"text-sm font-semibold text-primary mt-2 w-5 text-right",children:[p+1,"."]}),l.jsx(Je,{value:g,onChange:S=>f(h,p,S.target.value),placeholder:"What else could be going on? What have you not considered yet?",className:"min-h-[50px] flex-1",rows:1})]},p)),l.jsx(te,{variant:"outline",size:"sm",onClick:m,className:"ml-8",children:"+ Add another possibility"})]})]})}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},children:l.jsx(Zw,{children:'Your Bias (the Mask you identified) shapes which column feels easiest to fill. If "true because" flowed easily but "not true" was painful — that is your Bias at work. The best experiments come from looking at all three columns together.'})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 pt-4",children:[l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:w,children:["Continue",l.jsx(St,{className:"w-5 h-5 ml-2"})]}),l.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-md",children:"All fields are optional. You can explore anything you skip in your plan summary."})]})]})}const t0=[{key:"people",icon:qu,title:"People",description:"Who does this change affect? Think about employees, managers, customers, and partners. How will their jobs or daily work look different?",placeholder:"e.g., The sales team will learn new workflows. Middle managers may feel less in control. Customer-facing staff will need retraining...",color:"text-primary",bgColor:"bg-primary/5",borderColor:"border-primary/20"}
405,{key:"processes",icon:Tk,title:"Processes",description:"What steps or routines will this change disrupt or improve? Look at your current process and find where things get easier or harder.",placeholder:"e.g., The current approval chain has 5 steps — this would cut it to 2. Onboarding will need a new checklist. Monthly reporting may need to change...",color:"text-accent",bgColor:"bg-accent/5",borderColor:"border-accent/20"},{key:"systems",icon:VP,title:"Systems",description:"What tools or technology support or block this change? Think about software, data systems, and communication tools.",placeholder:"e.g., Our CRM does not support this workflow yet. We would need to connect two platforms. The data we need is not tracked anywhere today...",color:"text-stage-complete",bgColor:"bg-stage-complete/5",borderColor:"border-stage-complete/20"},{key:"policies",icon:MP,title:"Policies",description:"What company rules or requirements touch this change? Think about approval steps, legal rules, and formal guidelines. Do any of them help or block it?",placeholder:"e.g., Policy requires VP approval for budget changes over $5K. HR remote-work rules may conflict. Industry regulations need specific documentation...",color:"text-destructive",bgColor:"bg-destructive/5",borderColor:"border-destructive/20"},{key:"environment",icon:BP,title:"Environment",description:"What is happening around this change? Think about team morale, recent events, culture, market conditions, and timing.",placeholder:"e.g., The team went through a restructuring 3 months ago — change fatigue is real. Market pressure is growing. Leadership is supportive but very busy...",color:"text-secondary-foreground",bgColor:"bg-secondary/30",borderColor:"border-secondary"}];function sV({onComplete:e,initialData:t,criticalSituation:n}){const[r,s]=x.useState((t==null?void 0:t.people)||""),[i,o]=x.useState((t==null?void 0:t.processes)||""),[a,c]=x.useState((t==null?void 0:t.systems)||""),[u,d]=x.useState((t==null?void 0:t.policies)||""),[h,f]=x.useState((t==null?void 0:t.environment)||""),m={people:s,processes:o,systems:c,policies:d,environment:f},w={people:r,processes:i,systems:a,policies:u,environment:h},y=t0.filter(g=>w[g.key].trim().length>0).length,b=y>=3,v=()=>{e({people:r,processes:i,systems:a,policies:u,environment:h,rippleEffects:(t==null?void 0:t.rippleEffects)||""})};return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:[l.jsx("span",{className:"text-primary",children:"A"})," — Action Analysis"]}),l.jsxs("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:["Before you experiment, understand what surrounds your change. Look at the five areas that shape whether change works or falls apart:",l.jsx("strong",{children:" People, Processes, Systems, Policies, and Environment"}),"."]})]}),n&&l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},className:"bg-muted/50 p-4 rounded-lg border",children:l.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.jsx("span",{className:"font-medium text-foreground",children:"Your Critical Opportunity:"})," ",n]})}),t0.map((g,p)=>{const S=g.icon;return l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2+p*.1},children:l.jsxs(he,{className:`border-2 ${g.borderColor}`,children:[l.jsxs(we,{className:"pb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(S,{className:`w-5 h-5 ${g.color}`}),l.jsx(ge,{className:"text-lg font-sans",children:g.title})]}),l.jsx(be,{children:g.description})]}),l.jsx(fe,{children:l.jsx(Je,{value:w[g.key],onChange:k=>m[g.key](k.target.value),placeholder:g.placeholder,className:`min-h-[100px] ${g.bgColor}`})})]})},g.key)}),l.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:[l.jsxs("span",{className:"font-medium",children:[y,"/5"]})," dimensions analyzed",!b&&l.jsx("span",{className:"text-xs block mt-1",children:"(Fill in at least 3 to keep going)"})]}),l.jsx("div",{className:"flex justify-center pt-4",children:l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:v,disabled:!b,children:["Complete Action Analysis",l.jsx(St,{className:"w-5 h-5 ml-2"})]})})]})}var hd="Checkbox",[iV,HU]=br(hd),[oV,qg]=iV(hd);function aV(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,m]=ii({prop:n,defaultProp:s??!1,onChange:c,caller:hd}),[w,y]=x.useState(null),[b,v]=x.useState(null),g=x.useRef(!1),p=w?!!o||!!w.closest("form"):!0,S={checked:f,disabled:i,setChecked:m,control:w,setControl:y,name:a,form:o,value:d,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:os(s)?!1:s,isFormControl:p,bubbleInput:b,setBubbleInput:v};return l.jsx(oV,{scope:t,...S,children:lV(h)?h(S):r})}var Nj="CheckboxTrigger",_j=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:w}=qg(Nj,e),y=Re(s,d),b=x.useRef(c);return x.useEffect(()=>{const v=i==null?void 0:i.form;if(v){const g=()=>h(b.current);return v.addEventListener("reset",g),()=>v.removeEventListener("reset",g)}},[i,h]),l.jsx(pe.button,{type:"button",role:"checkbox","aria-checked":os(c)?"mixed":c,"aria-required":u,"data-state":Ij(c),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:y,onKeyDown:ye(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:ye(n,v=>{h(g=>os(g)?!0:!g),w&&m&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});_j.displayName=Nj;var Kg=x.forwardRef((e,t)=>
405{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:c,onCheckedChange:u,form:d,...h}=e;return l.jsx(aV,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>l.jsxs(l.Fragment,{children:[l.jsx(_j,{...h,ref:t,__scopeCheckbox:n}),f&&l.jsx(Oj,{__scopeCheckbox:n})]})})});Kg.displayName=hd;var Rj="CheckboxIndicator",Pj=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=qg(Rj,n);return l.jsx(ys,{present:r||os(i.checked)||i.checked===!0,children:l.jsx(pe.span,{"data-state":Ij(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Pj.displayName=Rj;var Aj="CheckboxBubbleInput",Oj=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:c,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:m}=qg(Aj,e),w=Re(n,m),y=yC(i),b=Km(r);x.useEffect(()=>{const g=f;if(!g)return;const p=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(p,"checked").set,E=!s.current;if(y!==i&&k){const C=new Event("click",{bubbles:E});g.indeterminate=os(i),k.call(g,os(i)?!1:i),g.dispatchEvent(C)}},[f,y,i,s]);const v=x.useRef(os(i)?!1:i);return l.jsx(pe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??v.current,required:a,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Oj.displayName=Aj;function lV(e){return typeof e=="function"}function os(e){return e==="indeterminate"}function Ij(e){return os(e)?"indeterminate":e?"checked":"unchecked"}const Dj=x.forwardRef(({className:e,...t},n)=>l.jsx(Kg,{ref:n,className:Z("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(Pj,{className:Z("flex items-center justify-center text-current"),children:l.jsx(xk,{className:"h-4 w-4"})})}));Dj.displayName=Kg.displayName;const Mj="validationStakeholdersForm.draft.v1";function n0(){try{const e=localStorage.getItem(Mj);return e?JSON.parse(e):null}catch{return null}}function cV(e){try{localStorage.setItem(Mj,JSON.stringify(e))}catch{}}const uV={assumption:"Assumption",primary:"Primary research",secondary:"Secondary research",custom:"Custom"},dV={assumption:"bg-primary/10 text-primary",primary:"bg-amber-500/10 text-amber-700 dark:text-amber-400",secondary:"bg-sky-500/10 text-sky-700 dark:text-sky-400",custom:"bg-muted text-muted-foreground"};function hV(e,t,n){var s;const r=[];return(s=e==null?void 0:e.beliefStatement)!=null&&s.trim()&&r.push({id:"a-belief",source:"assumption",label:`Belief: ${e.beliefStatement.trim()}`}),((e==null?void 0:e.trueReasons)||[]).forEach((i,o)=>{i!=null&&i.trim()&&r.push({id:`a-true-${o}`,source:"assumption",label:`Why we think it's true: ${i.trim()}`})}),((e==null?void 0:e.notTrueReasons)||[]).forEach((i,o)=>{i!=null&&i.trim()&&r.push({id:`a-not-${o}`,source:"assumption",label:`Why it might NOT be true: ${i.trim()}`})}),(t||[]).forEach((i,o)=>{const a=[i.method,i.who,i.questions].filter(c=>c==null?void 0:c.trim());a.length!==0&&r.push({id:`p-${o}`,source:"primary",label:a.join(" · "),methodHint:i.method,whoHint:i.who})}),(n||[]).forEach((i,o)=>{const a=[i.method,i.who,i.questions].filter(c=>c==null?void 0:c.trim());a.length!==0&&r.push({id:`s-${o}`,source:"secondary",label:a.join(" · "),methodHint:i.method,whoHint:i.who})}),r}
405function fV({initial:e,criticalSituation:t,assumptions:n,primaryResearch:r,secondaryResearch:s,onComplete:i}){const o=x.useMemo(()=>hV(n,r,s),[n,r,s]),[a,c]=x.useState(()=>{const k=n0();return(k==null?void 0:k.customTasks)||[]}),u=x.useMemo(()=>[...o,...a],[o,a]),[d,h]=x.useState(()=>{const k=n0(),E={};return o.forEach(C=>{var _;const j=(e||[]).find(P=>(P.assumption||"").trim()===C.label);E[C.id]=((_=k==null?void 0:k.plans)==null?void 0:_[C.id])||{checked:!!j,method:(j==null?void 0:j.method)||C.methodHint||"",who:(j==null?void 0:j.who)||C.whoHint||"",purpose:(j==null?void 0:j.purpose)||""}}),k!=null&&k.plans&&Object.keys(k.plans).forEach(C=>{E[C]||(E[C]=k.plans[C])}),E});x.useEffect(()=>{cV({plans:d,customTasks:a})},[d,a]);const f=(k,E)=>{h(C=>{var j,_,P,M;return{...C,[k]:{checked:((j=C[k])==null?void 0:j.checked)||!1,method:((_=C[k])==null?void 0:_.method)||"",who:((P=C[k])==null?void 0:P.who)||"",purpose:((M=C[k])==null?void 0:M.purpose)||"",...E}}})},m=(k,E)=>{var C,j;f(k.id,{checked:E,...E&&!((C=d[k.id])!=null&&C.method)&&k.methodHint?{method:k.methodHint}:{},...E&&!((j=d[k.id])!=null&&j.who)&&k.whoHint?{who:k.whoHint}:{}})},w=()=>{const k=`c-${Date.now()}`;c(E=>[...E,{id:k,source:"custom",label:""}]),f(k,{checked:!0})},y=k=>{c(E=>E.filter(C=>C.id!==k)),h(E=>{const C={...E};return delete C[k],C})},b=(k,E)=>{c(C=>C.map(j=>j.id===k?{...j,label:E}:j))},v=u.filter(k=>{var E;return(E=d[k.id])==null?void 0:E.checked}).map(k=>{var E,C,j,_,P,M;return{assumption:k.source==="custom"?k.label.trim():k.label,method:((C=(E=d[k.id])==null?void 0:E.method)==null?void 0:C.trim())||"",who:((_=(j=d[k.id])==null?void 0:j.who)==null?void 0:_.trim())||"",purpose:((M=(P=d[k.id])==null?void 0:P.purpose)==null?void 0:M.trim())||""}}).filter(k=>k.assumption&&k.method&&k.who&&k.purpose),g=u.filter(k=>{var E;return(E=d[k.id])==null?void 0:E.checked}).length,p=v.length>=1&&v.length===g,S=()=>i(v);return l.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:[l.jsxs("h2",{className:"text-2xl md:text-3xl font-serif font-bold text-foreground mb-4",children:[l.jsx("span",{className:"text-primary",children:"V"})," — Validation"]}),l.jsxs("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:["Research surfaced assumptions and a research plan. Check the items you'll actually validate, then expand each to say ",l.jsx("strong",{children:"how"})," — the method, the person, and the specific question that will confirm or kill it."]})]}),t&&l.jsxs(H.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05},className:"p-4 bg-muted/40 rounded-lg border-l-4 border-primary",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-1",children:"Validating this Critical Opportunity"}),l.jsx("p",{className:"text-sm text-foreground",children:t})]}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"grid gap-4 md:grid-cols-3",children:[{icon:"🎙️",title:"Interviews",desc:"In-depth conversations with key people"},{icon:"📋",title:"Surveys",desc:"Gather broad feedback from across the org"},{icon:"👂",title:"Listening Posts",desc:"Informal ways to hear honest, unfiltered feedback"}].map(k=>l.jsxs("div",{className:"p-4 bg-card rounded-lg border-2 text-center space-y-1",children:[l.jsx("span",{className:"text-2xl",children:k.icon}),l.jsx("h4",{className:"font-semibold text-sm",children:k.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:k.desc})]},k.title))}),l.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.15},children:l.jsxs(he,{className:"border-2 border-primary/30",children:[l.jsxs(we,{children:[l.jsxs(ge,{className:"text-lg font-sans flex items-center gap-2",children:[l.jsx(qu,{className:"w-5 h-5 text-primary"}),"Your Research Plan — pick what to validate"]}),l.jsx(be,{children:`Each item below was carried forward from your Research stage. Check the ones you'll actively validate. The "How" section drops down so you can specify the method, who, and the question.`})]}),l.jsxs(fe,{className:"space-y-3",children:[u.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No assumptions or research items were carried forward. Add a custom validation below."}),u.map(k=>{const E=d[k.id]||{checked:!1,method:"",who:"",purpose:""},C=k.source==="custom";return l.jsxs("div",{className:`border rounded-lg overflow-hidden transition-colors ${E.checked?"border-primary/50 bg-primary/5":"bg-card"}`,children:[l.jsxs("div",{className:"p-3 flex items-start gap-3",children:[l.jsx(Dj,{id:`chk-${k.id}`,checked:E.checked,onCheckedChange:j=>m(k,!!j),className:"mt-1"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("span",{className:`text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded ${dV[k.source]}`,children:uV[k.source]}),C&&l.jsx(te,{variant:"ghost",size:"icon",className:"h-6 w-6 ml-auto",onClick:()=>y(k.id),children:l.jsx(Un,{className:"w-3 h-3"})})]}),C?l.jsx(zt,{value:k.label,onChange:j=>b(k.id,j.target.value),placeholder:"What specifically will you validate?",className:"text-sm"}):l.jsx("label",{htmlFor:`chk-${k.id}`,className:"text-sm text-foreground cursor-pointer",children:k.label})]}),l.jsx(wk,{className:`w-4 h-4 text-muted-foreground transition-transform mt-2 ${E.checked?"rotate-180":""}`})]}),l.jsx(ko,{initial:!1,children:E.checked&&l.jsx(H.div,{initial:{height:0,opacity:0}
405,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsxs("div",{className:"p-4 pt-0 space-y-3 border-t border-primary/20 bg-background/60",children:[l.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-primary pt-3",children:"How will you validate this?"}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground",children:"Method"}),l.jsx(zt,{value:E.method,onChange:j=>f(k.id,{method:j.target.value}),placeholder:"1:1 interview, anonymous survey, listening post, focus group, town hall…"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground",children:"Who (name, role, team, or group)"}),l.jsx(zt,{value:E.who,onChange:j=>f(k.id,{who:j.target.value}),placeholder:"e.g., Maria T. (VP Ops), all Region East frontline managers…"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[11px] font-semibold text-muted-foreground",children:"Question(s) that will confirm or kill it"}),l.jsx(Je,{value:E.purpose,onChange:j=>f(k.id,{purpose:j.target.value}),placeholder:"What exactly will you ask? What answer would tell you the assumption is wrong?",className:"min-h-[80px]"})]})]})})})]},k.id)}),l.jsxs(te,{variant:"outline",size:"sm",onClick:w,className:"w-full",children:[l.jsx(ss,{className:"w-4 h-4 mr-2"}),"Add Custom Validation"]})]})]})}),l.jsxs("div",{className:"flex flex-col items-center gap-2 pt-2",children:[!p&&l.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-md",children:"Check at least one item and fill in Method, Who, and Question for every checked item to continue."}),l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",disabled:!p,onClick:S,children:["Continue to Experimentation Strategy",l.jsx(St,{className:"w-5 h-5 ml-2"})]})]})]})}const pV={1:6,2:8,3:7,4:6,5:8,6:5},mV={1:"Bias Recognition",2:"Research Strategy",3:"Action Analysis",4:"Validation",5:"Experimentation",6:"Results"};function gV(e,t){let n=0;for(let r=1;r<=6;r++)t.includes(r)||r<e||(n+=pV[r]??0);return n}function yV(e){var n;const t=Math.max(...e.completedStages,0);if(t===0)return null;switch(t){case 1:{const r=[...e.maskScores].sort((i,o)=>o.score-i.score)[0],s=r?Dt.find(i=>i.id===r.maskId):null;return s?{headline:`You named your dominant mask: ${s.name}`,detail:`"${s.statement}" — scoring ${r.score}
405/5. That's the lens we'll watch as you move through the rest.`,tease:"Next: turn this awareness into a clearer view of the opportunity."}:null}case 2:{const r=e.criticalOpportunity;return r?{headline:"You framed your critical opportunity",detail:`Pain level ${r.painLevel}/10 on "${r.situation.slice(0,90)}${r.situation.length>90?"…":""}".`,tease:"Next: map who and what this decision actually moves."}:null}case 3:{const r=e.actionAnalysis;return r?{headline:"You mapped the ripple of this decision",detail:`${[r.people,r.processes,r.systems,r.policies,r.environment].filter(i=>i&&i.trim()).length}/5 impact dimensions captured. The system is now visible — not just the symptom.`,tease:"Next: pick who to validate this with before you spend a dime."}:null}case 4:{const r=((n=e.validationStakeholders)==null?void 0:n.length)??0;return{headline:"You built your validation plan",detail:`${r} stakeholder ${r===1?"conversation":"conversations"} queued to pressure-test the idea.`,tease:"Next: design the smallest experiment that proves or kills the idea."}}case 5:{const r=e.experiment;return r?{headline:"You designed your experiment",detail:`Hypothesis locked: "${r.hypothesis.slice(0,110)}${r.hypothesis.length>110?"…":""}"`,tease:"Next: define how you will know it worked — and when to stop."}:null}case 6:return{headline:"You set the metrics and stop conditions",detail:"Your full BRAVER Innovation Strategy Plan is ready to read, share, and execute.",tease:"Scroll for your synthesis, charter, and action plan."};default:return null}}function vV({data:e}){const t=yV(e);if(!t)return null;const n=Math.max(...e.completedStages,0),r=mV[n];return l.jsx(H.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.4},children:l.jsx(he,{className:"border-2 border-accent/40 bg-gradient-to-r from-accent/10 via-background to-primary/5",children:l.jsx(fe,{className:"p-4 md:p-5",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"w-9 h-9 rounded-full bg-accent/20 flex items-center justify-center flex-shrink-0",children:l.jsx(oi,{className:"w-5 h-5 text-accent"})}),l.jsxs("div",{className:"flex-1 min-w-0 space-y-1.5",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-accent",children:["Unlocked · ",r]}),l.jsxs("span",{className:"text-[10px] text-muted-foreground flex items-center gap-1",children:[l.jsx(cs,{className:"w-3 h-3"})," Added to your final plan"]})]}),l.jsx("p",{className:"font-serif text-base md:text-lg text-foreground leading-tight",children:t.headline}),l.jsx("p",{className:"text-sm text-muted-foreground",children:t.detail}),l.jsxs("p",{className:"text-xs text-primary flex items-center gap-1 pt-0.5",children:[l.jsx(St,{className:"w-3 h-3"}),t.tease]})]})]})})})},n)}const xV=["B","R","A","V","E","R"];function wV({currentStage:e,completedStages:t,onStageClick:n}){const r=gV(e,t),s=Math.round(t.length/6*100);return l.jsx("div",{className:"sticky top-[72px] z-40 bg-background/95 backdrop-blur-sm border-b",children:l.jsx("div",{className:"container mx-auto px-4 py-2.5",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:xV.map((i,o)=>{const a=o+1,c=t.includes(a),u=a===e,d=a<=Math.max(...t,0)+1;return l.jsx("button",{type:"button",disabled:!d,onClick:()=>d&&n(a),className:Z("w-6 h-6 rounded-full text-[10px] font-bold flex items-center justify-center transition-all",c&&"bg-stage-complete text-white",u&&!c&&"bg-primary text-primary-foreground ring-2 ring-primary/30",!u&&!c&&d&&"bg-muted text-muted-foreground hover:bg-primary/20",!d&&"bg-muted/50 text-muted-foreground/40 cursor-not-allowed"),title:`Stage ${a}`,children:i},a)})}),l.jsx("div",{className:"flex-1 min-w-0 hidden sm:block",children:l.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:l.jsx(H.div,{className:"h-full bg-gradient-to-r from-primary to-accent",initial:!1,animate:{width:`${s}%`},transition:{duration:.5,ease:"easeInOut"}})})}),l.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground flex-shrink-0",children:[l.jsx(IP,{className:"w-3.5 h-3.5"}),l.jsx("span",{className:"font-medium tabular-nums",children:r>0?`~${r} min left`:"Almost done"})]})]})})})}var Nh="focusScope.autoFocusOnMount",_h="focusScope.autoFocusOnUnmount",r0={bubbles:!1,cancelable:!0},bV="FocusScope",Lj=x.forwardRef((e,t)=>
vendor: 4,257 bytes, line 405
405{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,c]=x.useState(null),u=Gn(s),d=Gn(i),h=x.useRef(null),f=Re(t,y=>c(y)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let y=function(p){if(m.paused||!a)return;const S=p.target;a.contains(S)?h.current=S:Or(h.current,{select:!0})},b=function(p){if(m.paused||!a)return;const S=p.relatedTarget;S!==null&&(a.contains(S)||Or(h.current,{select:!0}))},v=function(p){if(document.activeElement===document.body)for(const k of p)k.removedNodes.length>0&&Or(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[r,a,m.paused]),x.useEffect(()=>{if(a){i0.add(m);const y=document.activeElement;if(!a.contains(y)){const v=new CustomEvent(Nh,r0);a.addEventListener(Nh,u),a.dispatchEvent(v),v.defaultPrevented||(kV(TV($j(a)),{select:!0}),document.activeElement===y&&Or(a))}return()=>{a.removeEventListener(Nh,u),setTimeout(()=>{const v=new CustomEvent(_h,r0);a.addEventListener(_h,d),a.dispatchEvent(v),v.defaultPrevented||Or(y??document.body,{select:!0}),a.removeEventListener(_h,d),i0.remove(m)},0)}}},[a,u,d,m]);const w=x.useCallback(y=>{if(!n&&!r||m.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(b&&v){const g=y.currentTarget,[p,S]=SV(g);p&&S?!y.shiftKey&&v===S?(y.preventDefault(),n&&Or(p,{select:!0})):y.shiftKey&&v===p&&(y.preventDefault(),n&&Or(S,{select:!0})):v===g&&y.preventDefault()}},[n,r,m.paused]);return l.jsx(pe.div,{tabIndex:-1,...o,ref:f,onKeyDown:w})});Lj.displayName=bV;function kV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Or(r,{select:t}),document.activeElement!==n)return}function SV(e){const t=$j(e),n=s0(t,e),r=s0(t.reverse(),e);return[n,r]}function $j(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function s0(e,t){for(const n of e)if(!EV(n,{upTo:t}))return n}function EV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function CV(e){return e instanceof HTMLInputElement&&"select"in e}function Or(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&CV(e)&&t&&e.select()}}var i0=jV();function jV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=o0(e,t),e.unshift(t)},remove(t){var n;e=o0(e,t),(n=e[0])==null||n.resume()}}}function o0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function TV(e){return e.filter(t=>t.tagName!=="A")}var Rh=0;function NV(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??a0()),document.body.insertAdjacentElement("beforeend",e[1]??a0()),Rh++,()=>{Rh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Rh--}},[])}function a0(){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 Ac="right-scroll-bar-position",Oc="width-before-scroll-bar",_V="with-scroll-bars-hidden",RV="--removed-body-scroll-bar-size";function Ph(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PV(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var AV=typeof window<"u"?x.useLayoutEffect:x.useEffect,l0=new WeakMap;function OV(e,t){var n=PV(null,function(r){return e.forEach(function(s){return Ph(s,r)})});return AV(function(){var r=l0.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;
vendor: 4,196 bytes, lines 405-420
405s.forEach(function(a){i.has(a)||Ph(a,null)}),i.forEach(function(a){s.has(a)||Ph(a,o)})}l0.set(n,e)},[e]),n}function IV(e){return e}function DV(e,t){t===void 0&&(t=IV);var n=[],r=!1,s={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(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function MV(e){e===void 0&&(e={});var t=DV(null);return t.options=$n({async:!0,ssr:!1},e),t}var Bj=function(e){var t=e.sideCar,n=Mo(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 x.createElement(r,$n({},n))};Bj.isSideCarExport=!0;function LV(e,t){return e.useMedium(t),Bj}var Fj=MV(),Ah=function(){},fd=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Ah,onWheelCapture:Ah,onTouchMoveCapture:Ah}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,w=e.noIsolation,y=e.inert,b=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,p=e.gapMode,S=Mo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,E=OV([n,t]),C=$n($n({},S),s);return x.createElement(x.Fragment,null,d&&x.createElement(k,{sideCar:Fj,removeScrollBar:u,shards:h,noRelative:m,noIsolation:w,inert:y,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:p}),o?x.cloneElement(x.Children.only(a),$n($n({},C),{ref:E})):x.createElement(g,$n({},C,{className:c,ref:E}),a))});fd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fd.classNames={fullWidth:Oc,zeroRight:Ac};var $V=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$V();return t&&e.setAttribute("nonce",t),e}function FV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function VV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var UV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=BV())&&(FV(t,n),VV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zV=function(){var e=UV();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vj=function(){var e=zV(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},WV={left:0,top:0,right:0,gap:0},Oh=function(e){return parseInt(e||"",10)||0},HV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Oh(n),Oh(r),Oh(s)]},qV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return WV;var t=HV(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])}},KV=Vj(),to="data-scroll-locked",GV=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
406  .`.concat(_V,` {
407   overflow: hidden `).concat(r,`;
408   padding-right: `).concat(a,"px ").concat(r,`;
409  }
410  body[`).concat(to,`] {
411    overflow: hidden `).concat(r,`;
412    overscroll-behavior: contain;
413    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
414    padding-left: `.concat(s,`px;
415    padding-top: `).concat(i,`px;
416    padding-right: `).concat(o,`px;
417    margin-left:0;
418    margin-top:0;
419    margin-right: `).concat(a,"px ").concat(r,`;
420    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
420")].filter(Boolean).join(""),`
421  }
422  
423  .`).concat(Ac,` {
424    right: `).concat(a,"px ").concat(r,`;
425  }
426  
427  .`).concat(Oc,` {
428    margin-right: `).concat(a,"px ").concat(r,`;
429  }
430  
431  .`).concat(Ac," .").concat(Ac,` {
432    right: 0 `).concat(r,`;
433  }
434  
435  .`).concat(Oc," .").concat(Oc,` {
436    margin-right: 0 `).concat(r,`;
437  }
438  
439  body[`).concat(to,`] {
440    `).concat(RV,": ").concat(a,`px;
441  }
442`)},c0=function(){var e=parseInt(document.body.getAttribute(to)||"0",10);return isFinite(e)?e:0},YV=function(){x.useEffect(function(){return document.body.setAttribute(to,(c0()+1).toString()),function(){var e=c0()-1;e<=0?document.body.removeAttribute(to):document.body.setAttribute(to,e.toString())}},[])},QV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;YV();var i=x.useMemo(function(){return qV(s)},[s]);return x.createElement(KV,{styles:GV(i,!t,s,n?"":"!important")})},Op=!1;if(typeof window<"u")try{var ic=Object.defineProperty({},"passive",{get:function(){return Op=!0,!0}});window.addEventListener("test",ic,ic),window.removeEventListener("test",ic,ic)}catch{Op=!1}var xi=Op?{passive:!1}:!1,JV=function(e){return e.tagName==="TEXTAREA"},Uj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!JV(e)&&n[t]==="visible")},XV=function(e){return Uj(e,"overflowY")},ZV=function(e){return Uj(e,"overflowX")},u0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=zj(e,r);if(s){var i=Wj(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zj=function(e,t){return e==="v"?XV(t):ZV(t)},Wj=function(e,t){return e==="v"?eU(t):tU(t)},nU=function(e,t){return e==="h"&&t==="rtl"?-1:1},rU=function(e,t,n,r,s){var i=nU(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,c=t.contains(a),u=!1,d=o>0,h=0,f=0;do{if(!a)break;var m=Wj(e,a),w=m[0],y=m[1],b=m[2],v=y-b-i*w;(w||v)&&zj(e,a)&&(h+=v,f+=w);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},oc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},d0=function(e){return[e.deltaX,e.deltaY]},h0=function(e){return e&&"current"in e?e.current:e},sU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iU=function(e){return`
443  .block-interactivity-`.concat(e,` {pointer-events: none;}
444  .allow-interactivity-`).concat(e,` {pointer-events: all;}
445`)},oU=0,wi=[];function aU(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),s=x.useState(oU++)[0],i=x.useState(Vj)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=y3([e.lockRef.current],(e.shards||[]).map(h0),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var v=oc(y),g=n.current,p="deltaX"in y?y.deltaX:g[0]-v[0],S="deltaY"in y?y.deltaY:g[1]-v[1],k,E=y.target,C=Math.abs(p)>Math.abs(S)?"h":"v";if("touches"in y&&C==="h"&&E.type==="range")return!1;var j=u0(C,E);if(!j)return!0;if(j?k=C:(k=C==="v"?"h":"v",j=u0(C,E)),!j)return!1;if(!r.current&&"changedTouches"in y&&(p||S)&&(r.current=k),!k)return!0;var _=r.current||k;return rU(_,b,y,_==="h"?p:S,!0)},[]),c=x.useCallback(function(y){var b=y;if(!(!wi.length||wi[wi.length-1]!==i)){var v="deltaY"in b?d0(b):oc(b),g=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&sU(k.delta,v)}
vendor: 4,137 bytes, line 445
445)[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var p=(o.current.shards||[]).map(h0).filter(Boolean).filter(function(k){return k.contains(b.target)}),S=p.length>0?a(b,p[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=x.useCallback(function(y,b,v,g){var p={name:y,delta:b,target:v,should:g,shadowParent:lU(v)};t.current.push(p),setTimeout(function(){t.current=t.current.filter(function(S){return S!==p})},1)},[]),d=x.useCallback(function(y){n.current=oc(y),r.current=void 0},[]),h=x.useCallback(function(y){u(y.type,d0(y),y.target,a(y,e.lockRef.current))},[]),f=x.useCallback(function(y){u(y.type,oc(y),y.target,a(y,e.lockRef.current))},[]);x.useEffect(function(){return wi.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,xi),document.addEventListener("touchmove",c,xi),document.addEventListener("touchstart",d,xi),function(){wi=wi.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,xi),document.removeEventListener("touchmove",c,xi),document.removeEventListener("touchstart",d,xi)}},[]);var m=e.removeScrollBar,w=e.inert;return x.createElement(x.Fragment,null,w?x.createElement(i,{styles:iU(s)}):null,m?x.createElement(QV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cU=LV(Fj,aU);var Hj=x.forwardRef(function(e,t){return x.createElement(fd,$n({},e,{ref:t,sideCar:cU}))});Hj.classNames=fd.classNames;var uU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bi=new WeakMap,ac=new WeakMap,lc={},Ih=0,qj=function(e){return e&&(e.host||qj(e.parentNode))},dU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qj(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hU=function(e,t,n,r){var s=dU(t,Array.isArray(e)?e:[e]);lc[n]||(lc[n]=new WeakMap);var i=lc[n],o=[],a=new Set,c=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(a.has(f))d(f);else try{var m=f.getAttribute(r),w=m!==null&&m!=="false",y=(bi.get(f)||0)+1,b=(i.get(f)||0)+1;bi.set(f,y),i.set(f,b),o.push(f),y===1&&w&&ac.set(f,!0),b===1&&f.setAttribute(n,"true"),w||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return d(t),a.clear(),Ih++,function(){o.forEach(function(h){var f=bi.get(h)-1,m=i.get(h)-1;bi.set(h,f),i.set(h,m),f||(ac.has(h)||h.removeAttribute(r),ac.delete(h)),m||h.removeAttribute(n)}),Ih--,Ih||(bi=new WeakMap,bi=new WeakMap,ac=new WeakMap,lc={})}},fU=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=uU(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),hU(r,s,n,"aria-hidden")):function(){return null}},pd="Dialog",[Kj,qU]=br(pd),[pU,Rn]=Kj(pd),Gj=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=x.useRef(null),c=x.useRef(null),[u,d]=ii({prop:r,defaultProp:s??!1,onChange:i,caller:pd});return l.jsx(pU,{scope:t,triggerRef:a,contentRef:c,contentId:ga(),titleId:ga(),descriptionId:ga(),open:u,onOpenChange:d,onOpenToggle:x.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};Gj.displayName=pd;var Yj="DialogTrigger",mU=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rn(Yj,n),i=Re(t,s.triggerRef);return l.jsx(pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Qg(s.open),...r,ref:i,onClick:ye(e.onClick,s.onOpenToggle)})});mU.displayName=Yj;var Gg="DialogPortal",[gU,Qj]=Kj(Gg,{forceMount:void 0}),Jj=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Rn(Gg,t);return l.jsx(gU,{scope:t,forceMount:n,children:x.Children.map(r,o=>l.jsx(ys,{present:n||i.open,children:l.jsx(Am,{asChild:!0,container:s,children:o})}))})};Jj.displayName=Gg;var Su="DialogOverlay",Xj=x.forwardRef((e,t)=>
vendor: 4,883 bytes, lines 445-449
445{const n=Qj(Su,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Rn(Su,e.__scopeDialog);return i.modal?l.jsx(ys,{present:r||i.open,children:l.jsx(vU,{...s,ref:t})}):null});Xj.displayName=Su;var yU=Fa("DialogOverlay.RemoveScroll"),vU=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rn(Su,n);return l.jsx(Hj,{as:yU,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(pe.div,{"data-state":Qg(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ni="DialogContent",Zj=x.forwardRef((e,t)=>{const n=Qj(ni,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Rn(ni,e.__scopeDialog);return l.jsx(ys,{present:r||i.open,children:i.modal?l.jsx(xU,{...s,ref:t}):l.jsx(wU,{...s,ref:t})})});Zj.displayName=ni;var xU=x.forwardRef((e,t)=>{const n=Rn(ni,e.__scopeDialog),r=x.useRef(null),s=Re(t,n.contentRef,r);return x.useEffect(()=>{const i=r.current;if(i)return fU(i)},[]),l.jsx(eT,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ye(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ye(e.onFocusOutside,i=>i.preventDefault())})}),wU=x.forwardRef((e,t)=>{const n=Rn(ni,e.__scopeDialog),r=x.useRef(!1),s=x.useRef(!1);return l.jsx(eT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),eT=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Rn(ni,n),c=x.useRef(null),u=Re(t,c);return NV(),l.jsxs(l.Fragment,{children:[l.jsx(Lj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:l.jsx(Vu,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Qg(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(bU,{titleId:a.titleId}),l.jsx(SU,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Yg="DialogTitle",tT=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rn(Yg,n);return l.jsx(pe.h2,{id:s.titleId,...r,ref:t})});tT.displayName=Yg;var nT="DialogDescription",rT=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rn(nT,n);return l.jsx(pe.p,{id:s.descriptionId,...r,ref:t})});rT.displayName=nT;var sT="DialogClose",iT=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rn(sT,n);return l.jsx(pe.button,{type:"button",...r,ref:t,onClick:ye(e.onClick,()=>s.onOpenChange(!1))})});iT.displayName=sT;function Qg(e){return e?"open":"closed"}var oT="DialogTitleWarning",[KU,aT]=PR(oT,{contentName:ni,titleName:Yg,docsSlug:"dialog"}),bU=({titleId:e})=>{const t=aT(oT),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
446
447If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
448
449For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},kU="DialogDescriptionWarning",SU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aT(kU).contentName}}.`;return x.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},EU=Gj,CU=Jj,lT=Xj,cT=Zj,uT=tT,dT=rT,jU=iT;const TU=EU,NU=CU,hT=x.forwardRef(({className:e,...t},n)=>l.jsx(lT,{ref:n,className:Z("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),...t}));hT.displayName=lT.displayName;const fT=x.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(NU,{children:[l.jsx(hT,{}),l.jsxs(cT,{ref:r,className:Z("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:rou
449nded-lg",e),...n,children:[t,l.jsxs(jU,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(Un,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fT.displayName=cT.displayName;const pT=({className:e,...t})=>l.jsx("div",{className:Z("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pT.displayName="DialogHeader";const mT=({className:e,...t})=>l.jsx("div",{className:Z("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mT.displayName="DialogFooter";const gT=x.forwardRef(({className:e,...t},n)=>l.jsx(uT,{ref:n,className:Z("text-lg font-semibold leading-none tracking-tight",e),...t}));gT.displayName=uT.displayName;const yT=x.forwardRef(({className:e,...t},n)=>l.jsx(dT,{ref:n,className:Z("text-sm text-muted-foreground",e),...t}));yT.displayName=dT.displayName;const _U=()=>{var K,J,ee;const{data:e,updateChallengeContext:t,updateChallengeType:n,updateMaskScores:r,updateCognitiveBiases:s,updateAssumptions:i,updateCriticalOpportunity:o,updateActionAnalysis:a,updateValidationStakeholders:c,updateExperiment:u,updateMetrics:d,completeStage:h,goToStage:f,resetData:m}=Io(),w=(ie,me)=>{try{const Pe=localStorage.getItem(ie);return Pe===null?me:Pe==="1"}catch{return me}},y=(ie,me)=>{try{localStorage.setItem(ie,me?"1":"0")}catch{}},[b,v]=x.useState(()=>w("ui.showQuiz",!1)),[g,p]=x.useState(()=>w("ui.showResults",e.maskScores.length>0)),[S,k]=x.useState(()=>w("ui.showAssumptions",!1)),[E,C]=x.useState(()=>w("ui.showBiasCheck",!1)),j=ie=>{y("ui.showQuiz",ie),v(ie)},_=ie=>{y("ui.showResults",ie),p(ie)},P=ie=>{y("ui.showAssumptions",ie),k(ie)},M=ie=>{y("ui.showBiasCheck",ie),C(ie)},[A,z]=x.useState(e.challengeContext||""),[T,F]=x.useState(((K=e.criticalOpportunity)==null?void 0:K.situation)||""),[W,V]=x.useState(((J=e.criticalOpportunity)==null?void 0:J.whatsAtStake)||""),[N,R]=x.useState(((ee=e.criticalOpportunity)==null?void 0:ee.painLevel)??5),[$,O]=x.useState(!1),[L,q]=x.useState(""),Q=(ie,me,Pe=W)=>{var gt,nt,Mt,oe,yt;o({situation:ie,whatsAtStake:Pe,painLevel:me,whatMakesItFall:((gt=e.criticalOpportunity)==null?void 0:gt.whatMakesItFall)||[],roadblocks:((nt=e.criticalOpportunity)==null?void 0:nt.roadblocks)||[],possibilities:((Mt=e.criticalOpportunity)==null?void 0:Mt.possibilities)||[],primaryResearch:((oe=e.criticalOpportunity)==null?void 0:oe.primaryResearch)||[],secondaryResearch:((yt=e.criticalOpportunity)==null?void 0:yt.secondaryResearch)||[]})};x.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[e.currentStage]);const U=()=>{var ie,me,Pe,gt,nt,Mt;switch(e.currentStage){case 1:return!b&&e.maskScores.length===0?l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-2xl mx-auto py-8 space-y-6",children:[l.jsxs("div",{className:"text-left space-y-2",children:[l.jsx("p",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Step 1 of 6 · Takes ~2 minutes"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-serif font-bold text-foreground",children:"Spot what's blocking you"}),l.jsx("p",{className:"text-base text-muted-foreground",children:"We'll find the habits that quietly slow your best ideas. Then we'll turn them into an action plan you can use this week."})]}),l.jsxs("div",{className:"bg-background/80 rounded-xl p-5 border-2 border-primary/30 space-y-4 text-left",children:[l.jsxs("label",{className:"block",children:[l.jsx("span",{className:"text-sm font-bold text-foreground",children:"What are you working on?"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 mb-2",children:"One line. The decision, change, or problem on your plate right now."}),l.jsx("textarea",{value:A,onChange:oe=>{z(oe.target.value),T.trim()||F(oe.target.value)},onBlur:()=>{var yt,Zn;const oe=A.trim();t(oe),(Zn=(yt=e.criticalOpportunity)==null?void 0:yt.situation)!=null&&Zn.trim()||Q(oe||T.trim(),N)},placeholder:"e.g., Rolling out a new sales comp model in Q3",className:"w-full min-h-[64px] rounded-md border border-input bg-background px-3 py-2 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary",maxLength:300}),l.jsxs("p",{className:"text-[11px] text-muted-foreground text-right mt-1",children:[A.length,"/300"]})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-bold text-foreground",children:"Is this on you, or on your team?"}),l.jsx("div",{className:"grid grid-cols-2 gap-2 mt-2",children:[{value:"personal",title:"Just me",desc:"I'm navigating this alone."},{value:"team",title:"My team",desc:"I'm leading others through it."}].map(oe=>{const yt=e.challengeType===oe.value;return l.jsxs("button",{type:"button",onClick:()=>n(oe.value),className:"text-left rounded-lg border-2 p-3 transition-all "+(yt?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-border hover:border-primary/50 bg-background"),children:[l.jsx("p",{className:"font-semibold text-sm text-foreground",children:oe.title}),l.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:oe.desc})]},oe.value)})})]})]}),l.jsxs("div",{className:"text-center pt-1",children:[l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",disabled:A.trim().length<10||!e.challengeType,onClick:()=>{const oe=A.trim();t(oe),Q(oe,N,W.trim()),F(oe),j(!0)},children:["Take the 2-minute quiz",l.jsx(St,{className:"w-5 h-5 ml-2"})]}),(A.trim().length<10||!e.challengeType)&&l.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:A.trim().length<10?"Tell us what you’re working on (one line) to begin.":"Pick whether this is on you or on your team."}),l.jsx("p",{className:"text-[11px] text-muted-foreground mt-3",children:"12 quick questions · Slider answers · No typing"})]})]}):b&&!g&&e.maskScores.length===0?l.jsx(S4,{initialScores:e.maskScores,challengeType:e.challengeType,challengeContext:e.challengeContext,onComplete:oe=>{r(oe),j(!1),_(!0)}}):E?l.jsx(j4,{challengeContext:e.challengeContext,initialEntries:e.cognitiveBiases,onComplete:oe=>{s(oe),M(!1),P(!0)}}):S?l.jsx(rV,{initialData:e.assumptions,onComplete:oe=>{i(oe),P(!1),_(!1),h(1)}}):l.jsxs("div",{className:"space-y-8",children:[l.jsx(E4,{scores:e.maskScores}),l.jsx("div",{className:"flex justify-center",children:e.cognitiveBiases.length===0?l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:()=>{_(!1),M(!0)},children:["Check your thinking",l.jsx(St,{className:"w-5 h-5 ml-2"})]}):e.assumptions?l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:()=>h(1),children:["Next: pick what to test",l.jsx(St,{className:"w-5 h-5 ml-2"})]}):l.jsxs(te,{size:"lg",className:"gradient-hero text-primary-foreground",onClick:()=>{_(!1),P(!0)},children:["Check your assumptions",l.jsx(St,{className:"w-5 h-5 ml-2"})]})})]});case 2:return l.jsx(O4,{initialData:e.criticalOpportunity,onComplete:oe=>{o(oe),h(2)}});case 3:return e.criticalOpportunity?l.jsx(sV,{initialData:e.actionAnalysis,critical
449Situation:e.criticalOpportunity.situation,onComplete:oe=>{a(oe),h(3)}}):l.jsx("div",{children:"Please finish the Research Strategy stage first."});case 4:return l.jsx(fV,{initial:e.validationStakeholders||[],criticalSituation:(ie=e.criticalOpportunity)==null?void 0:ie.situation,assumptions:e.assumptions,primaryResearch:((me=e.criticalOpportunity)==null?void 0:me.primaryResearch)||[],secondaryResearch:((Pe=e.criticalOpportunity)==null?void 0:Pe.secondaryResearch)||[],onComplete:oe=>{c(oe),h(4)}});case 5:return l.jsx($4,{initialData:e.experiment,criticalSituation:(gt=e.criticalOpportunity)==null?void 0:gt.situation,onComplete:oe=>{u(oe),h(5)}});case 6:return e.metrics?e.metrics?l.jsx(nV,{onReset:m}):l.jsx(Ew,{initialData:e.metrics,hypothesis:(Mt=e.experiment)==null?void 0:Mt.hypothesis,onComplete:oe=>{d(oe),h(6)}}):l.jsx(Ew,{initialData:e.metrics,hypothesis:(nt=e.experiment)==null?void 0:nt.hypothesis,onComplete:oe=>{d(oe)}});default:return null}};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsxs(Rm,{children:[l.jsx("title",{children:"Start the BRAVER Innovation Strategy Generator | Dr. Diane Dye"}),l.jsx("meta",{name:"description",content:"Walk through the six-stage BRAVER Innovation Model interactively — name your bias-creating masks, define a critical opportunity, design an experiment, and build a printable strategy plan."}),l.jsx("link",{rel:"canonical",href:"https://prcexperimentationstrategygenerator.lovable.app/generator"}),l.jsx("meta",{property:"og:title",content:"Start the BRAVER Innovation Strategy Generator | Dr. Diane Dye"}),l.jsx("meta",{property:"og:description",content:"An interactive six-stage workflow that turns the BRAVER Innovation Model into a personal experimentation plan."}),l.jsx("meta",{property:"og:url",content:"https://prcexperimentationstrategygenerator.lovable.app/generator"})]}),l.jsx("header",{className:"border-b bg-card/80 backdrop-blur-sm sticky top-0 z-50",children:l.jsx("div",{className:"container mx-auto px-4 py-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full gradient-hero flex items-center justify-center",children:l.jsx(cs,{className:"w-5 h-5 text-primary-foreground"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"font-serif font-bold text-lg",children:"BRAVER Innovation Strategy Generator"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"The BRAVER Innovation (BI) Model — By Dr. Diane Dye"})]})]}),l.jsxs("div",{className:"text-right hidden sm:block",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Powered by"}),l.jsx("p",{className:"text-sm font-semibold text-primary",children:"People Risk Consulting"})]})]})})}),e.currentStage===1&&!b&&e.maskScores.length===0&&l.jsx("div",{className:"bg-gradient-to-r from-primary/10 via-accent/10 to-secondary/10 border-b",children:l.jsx("div",{className:"container mx-auto px-4 py-3 text-center",children:l.jsx(Li,{to:"/",className:"text-xs text-primary hover:underline font-medium",children:"← Return to the BRAVER Innovation Model home page"})})}),(e.maskScores.length>0||e.completedStages.length>0)&&l.jsx("div",{className:"bg-primary/5 border-b",children:l.jsxs("div",{className:"container mx-auto px-4 py-3 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[e.challengeContext&&l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-primary mb-0.5",children:e.challengeType==="personal"?"Personal lens — examining yourself in:":e.challengeType==="team"?"Team lens — examining yourself as a leader of:":"Examining through the lens of:"}),l.jsx("p",{className:"text-sm text-foreground truncate",title:e.challengeContext,children:e.challengeContext})]}),l.jsxs(te,{variant:"outline",size:"sm",onClick:()=>{q(""),O(!0)},className:"border-primary/30 text-primary hover:bg-primary/10 font-semibold gap-2 flex-shrink-0",children:[l.jsx(Sk,{className:"w-4 h-4"}),"Try a Different Challenge"]})]})}),l.jsx(TU,{open:$,onOpenChange:O,children:l.jsxs(fT,{className:"sm:max-w-lg",children:[l.jsxs(pT,{children:[l.jsx(gT,{className:"font-serif",children:"Examine a different challenge"}),l.jsx(yT,{children:"Your Mask can change based on what you're looking at. Type the new challenge you want to run through the BRAVER Innovation method. This will clear your current results and restart from Stage B."})]}),l.jsxs("div",{className:"space-y-2 py-2",children:[l.jsx("label",{className:"text-sm font-semibold",children:"New challenge you're working on"}),l.jsx("textarea",{value:L,onChange:ie=>q(ie.target.value),placeholder:"e.g., Deciding whether to bring our customer support function in-house...",className:"w-full min-h-[100px] rounded-md border border-input bg-background px-3 py-2 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary",maxLength:400,autoFocus:!0}),l.jsxs("p",{className:"text-[11px] text-muted-foreground text-right",children:[L.length,"/400"]})]}),l.jsxs(mT,{className:"gap-2 sm:gap-2",children:[l.jsx(te,{variant:"outline",onClick:()=>O(!1),children:"Cancel"}),l.jsx(te,{className:"gradient-hero text-primary-foreground",disabled:L.trim().length<10,onClick:()=>{const ie=L.trim();m(),j(!1),_(!1),P(!1),z(ie),F(""),V(""),R(5),t(ie),O(!1)},children:"Clear & Start Over with New Challenge"})]})]})}),l.jsx(wV,{currentStage:e.currentStage,completedStages:e.completedStages,onStageClick:f}),l.jsx("div",{className:"container mx-auto px-4 py-4 border-b",children:l.jsx(t4,{currentStage:e.currentStage,completedStages:e.completedStages,onStageClick:f})}),l.jsxs("main",{className:"container mx-auto px-4 py-8 space-y-6",children:[e.completedStages.length>0&&e.currentStage<=6&&!e.completedStages.includes(6)&&l.jsx(vV,{data:e}),e.maskScores.length>0&&e.currentStage>1&&!e.completedStages.includes(6)&&l.jsx(Ej,{stageLabel:`Stage ${e.currentStage} of 6`,variant:"inline"}),l.jsx(ko,{mode:"wait",children:l.jsx(H.div,{initial:{opacity:0,x:20}
449,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},children:U()},e.currentStage)})]}),l.jsx("footer",{className:"border-t py-6 mt-12",children:l.jsxs("div",{className:"container mx-auto px-4 text-center text-sm text-muted-foreground",children:[l.jsxs("p",{children:["© ",new Date().getFullYear()," People Risk Consulting. The BRAVER Innovation (BI) Model."]}),l.jsx("p",{className:"text-xs mt-1",children:"Bias Recognition · Research · Action Analysis · Validation · Experimentation · Results"})]})})]})},RU="/assets/dr-diane-dye-B0rUDVv0.png",PU=()=>{const e=()=>{const t=document.getElementById("start-the-generator");t&&t.scrollIntoView({behavior:"smooth",block:"start"})};return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsxs(Rm,{children:[l.jsx("title",{children:"BRAVER Innovation Strategy Generator | Dr. Diane Dye"}),l.jsx("meta",{name:"description",content:"Learn the BRAVER Innovation (BI) Model by Dr. Diane Dye — a six-stage framework that helps executives test ideas, reduce bias, and lead disciplined innovation experiments."}),l.jsx("link",{rel:"canonical",href:"https://prcexperimentationstrategygenerator.lovable.app/"}),l.jsx("meta",{property:"og:title",content:"BRAVER Innovation Strategy Generator | Dr. Diane Dye"}),l.jsx("meta",{property:"og:description",content:"Learn the six-stage BRAVER Innovation Model by Dr. Diane Dye — disciplined experimentation for executives and CEO cohorts."}),l.jsx("meta",{property:"og:url",content:"https://prcexperimentationstrategygenerator.lovable.app/"})]}),l.jsx("header",{className:"border-b bg-card/80 backdrop-blur-sm sticky top-0 z-50",children:l.jsx("div",{className:"container mx-auto px-4 py-4",children:l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-full gradient-hero flex items-center justify-center",children:l.jsx(cs,{className:"w-5 h-5 text-primary-foreground"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"font-serif font-bold text-lg leading-tight",children:"BRAVER Innovation Strategy Generator"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"The BRAVER Innovation (BI) Model — By Dr. Diane Dye"})]})]}),l.jsx(te,{asChild:!0,size:"sm",className:"gradient-hero text-primary-foreground hidden sm:inline-flex",children:l.jsxs(Li,{to:"/generator",children:["Start the Generator",l.jsx(St,{className:"w-4 h-4 ml-2"})]})})]})})}),l.jsx("div",{className:"bg-gradient-to-r from-primary/10 via-accent/10 to-secondary/10 border-b",children:l.jsxs("div",{className:"container mx-auto px-4 py-6 text-center",children:[l.jsxs("p",{className:"text-sm text-muted-foreground max-w-3xl mx-auto",children:["Powered by the ",l.jsx("strong",{children:"BRAVER Innovation (BI) Model"})," — a six-stage plan for smart, structured experimentation, created by ",l.jsx("strong",{children:"Dr. Diane Dye"}),", Experimentation & Innovation Strategist and Doctor of Education in Organizational Change & Leadership."]}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2 max-w-2xl mx-auto font-medium",children:[l.jsx("strong",{children:"B"}),"ias Recognition · ",l.jsx("strong",{children:"R"}),"esearch Strategy · ",l.jsx("strong",{children:"A"}),"ction Analysis ·"," ",l.jsx("strong",{children:"V"}),"alidation · ",l.jsx("strong",{children:"E"}),"xperimentation · ",l.jsx("strong",{children:"R"}),"esults Measurement"]})]})}),l.jsx("main",{className:"container mx-auto px-4 py-12",children:l.jsxs(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-4xl mx-auto space-y-12",children:[l.jsxs("div",{className:"text-left bg-gradient-to-br from-primary/5 via-accent/5 to-secondary/5 rounded-2xl p-8 md:p-10 border border-primary/10 space-y-6",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-serif font-bold text-foreground text-center",children:"The BRAVER Innovation Model"}),l.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed text-center",children:["Most organizations don't fail because of bad ideas. They fail because they can't test ideas fast enough. The ",l.jsx("strong",{children:"BRAVER Innovation (BI) Model"}),", created by Dr. Diane Dye, gives leaders a clear six-stage plan to go from insight to real action."]}),l.jsxs("div",{className:"text-center pt-2",children:[l.jsx(te,{asChild:!0,size:"lg",className:"bg-orange-600 hover:bg-orange-700 text-white text-lg px-8 py-6 h-auto 
449shadow-lg hover:shadow-xl transition-shadow",children:l.jsxs(Li,{to:"/generator",children:["Start the Generator",l.jsx(St,{className:"w-6 h-6 ml-2"})]})}),l.jsx("p",{className:"text-xs text-muted-foreground mt-3",children:"Takes about 30–45 minutes · Your answers are not retained"})]}),l.jsxs("div",{className:"bg-background/90 rounded-xl p-5 border border-primary/20 text-left max-w-2xl mx-auto space-y-2",children:[l.jsx("p",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Before you start — plan for about 30–45 minutes"}),l.jsxs("p",{className:"text-sm text-foreground leading-relaxed",children:["Set aside ",l.jsx("strong",{children:"30 to 45 minutes"})," of focused time to complete the generator end-to-end. Your answers are not retained."]}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:[l.jsx("strong",{children:"Your privacy:"})," Nothing you enter is stored on our servers or sent to anyone. It stays in your browser. At the end, you'll have the option to email or share your strategy plan — only if you choose to."]})]}),l.jsxs("div",{className:"bg-background/80 rounded-xl p-5 border border-primary/20 text-left max-w-2xl mx-auto space-y-3",children:[l.jsx("p",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Help validate the model"}),l.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:"The BRAVER Innovation Model is being validated by collecting, from volunteer participants, real scenarios of change. Your data is not retained in this app. To participate in the study, connect with Dr. Diane Dye on LinkedIn and send her your results alongside what was decided as a result of the BRAVER Innovation Model."}),l.jsxs("a",{href:"https://www.linkedin.com/in/drdianedye/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Connect with Dr. Diane Dye on LinkedIn",l.jsx(Mm,{className:"w-3.5 h-3.5"})]}),l.jsx("blockquote",{className:"border-l-4 border-accent pl-4 py-1 mt-2",children:l.jsx("p",{className:"text-sm text-foreground italic leading-relaxed",children:'"I saved $6,000 on a technology purchase." — Buck'})})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 pt-2",children:[{letter:"B",title:"Bias Recognition",desc:"Find the Mask hiding your blind spots before you build anything."},{letter:"R",title:"Research Strategy",desc:"Name your Critical Opportunity — the high-stakes situation worth testing. Then plan how to learn more about it."},{letter:"A",title:"Action Analysis",desc:"Look at the people, processes, systems, and policies around your change."},{letter:"V",title:"Validation",desc:"Collect real input from your team through surveys, interviews, and data."},{letter:"E",title:"Experimentation",desc:"Build a structured experiment with a clear goal and success criteria."},{letter:"R",title:"Results Measurement",desc:"Measure results to see if your experiment worked."}].map((t,n)=>l.jsxs("div",{className:"bg-background/80 rounded-xl p-4 border border-border/50 text-left",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("span",{className:"text-xl font-bold text-primary font-serif",children:t.letter}),l.jsx("span",{className:"font-semibold text-sm text-foreground",children:t.title})]}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:t.desc})]},n))}),l.jsxs("div",{className:"bg-background/80 rounded-xl p-5 border-l-4 border-primary text-left max-w-2xl mx-auto",children:[l.jsx("p",{className:"text-xs font-bold uppercase tracking-wider text-primary mb-2",children:"Before you begin: Define winning"}),l.jsxs("p",{className:"text-sm text-foreground leading-relaxed mb-3",children:["When success looks like ",l.jsx("em",{children:'"improve culture"'})," or ",l.jsx("em",{children:'"increase efficiency,"'})," teams do what feels comfortable instead of what the org needs. Clear goals keep you on track when change gets hard."]}),l.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["As you move through BRAVER, hold this question:"," ",l.jsx("strong",{className:"text-foreground",children:'"What would have to be true at the end for this to be worth doing?"'})]})]}),l.jsx("div",{className:"pt-2 text-center",children:l.jsxs(te,{variant:"outline",size:"sm",onClick:e,className:"border-primary/40 text-primary hover:bg-primary/10",children:["Ready to start? Jump to the generator",l.jsx(St,{className:"w-4 h-4 ml-2"})]})})]}),l.jsxs(H.section,{id:"start-the-generator",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.4},className:"relative overflow-hidden rounded-3xl border-2 border-primary/30 bg-gradient-to-br from-primary/10 via-accent/10 to-secondary/10 p-10 md:p-14 text-center scroll-mt-24",children:[l.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-primary/15 px-4 py-1.5 text-xs font-bold uppercase tracking-wider text-primary mb-4",children:[l.jsx(PP,{className:"w-4 h-4"}),"Start here"]}),l.jsx("h2",{className:"text-3xl md:text-5xl font-serif font-bold text-foreground mb-4",children:"Build your BRAVER Innovation Strategy"}),l.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto mb-8 leading-relaxed",children:"Go through all six stages of the BRAVER Innovation Model — from naming your Mask to designing a measurable experiment. The generator opens in a focused workspace so you can stay on track."}),l.jsx(te,{asChild:!0,size:"lg",className:"gradient-hero text-primary-foreground text-lg px-8 py-6 h-auto 
449shadow-lg hover:shadow-xl transition-shadow",children:l.jsxs(Li,{to:"/generator",children:["Start the Generator",l.jsx(St,{className:"w-6 h-6 ml-2"})]})}),l.jsx("p",{className:"text-xs text-muted-foreground mt-4",children:"Takes about 30–45 minutes · Your answers are not retained · Nothing is sent anywhere unless you choose to share it at the end"})]}),l.jsx(H.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{delay:.1},className:"pt-8 border-t",children:l.jsxs("div",{className:"flex flex-col items-center gap-8",children:[l.jsx("img",{src:RU,alt:"Dr. Diane Dye - Experimentation Strategist",className:"w-full max-w-2xl rounded-lg shadow-lg"}),l.jsxs("div",{className:"text-left space-y-4 max-w-2xl",children:[l.jsx("h3",{className:"text-2xl font-serif font-bold text-foreground text-center",children:"Meet Dr. Diane Dye"}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Dr. Diane Dye is the strategist founders, CEOs, and executives call when they're ready to grow without burning people out. She is a bold, authentic leader who inspires bravery in others."}),l.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["She helps leaders use experimentation to quickly test and drive real change. She is the author of the ",l.jsx("em",{children:"Creating Critical Opportunity"})," ","workbook and the host of the ",l.jsx("strong",{children:"Brave Business Mastercast"}),"."]}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Dr. Dye is the Founder and CEO of People Risk Consulting. She and her team advise executives and guide leaders through experimentation together in her CEO Innovation Cohort and Executive Innovators Community."}),l.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["She grew up in San Antonio, Texas, lives in Austin, and is a two-time USC graduate with strong ties to Carson City, Nevada. Her clients call her ",l.jsx("strong",{children:"3D"})," for the depth, dimension, and energy she brings to every conversation about experimentation, innovation, and change."]})]})]})}),l.jsx("div",{className:"text-center pt-4",children:l.jsx(te,{asChild:!0,size:"lg",className:"gradient-hero text-primary-foreground",children:l.jsxs(Li,{to:"/generator",children:["Start the Generator",l.jsx(St,{className:"w-5 h-5 ml-2"})]})})})]})}),l.jsx("footer",{className:"border-t py-6 mt-12",children:l.jsxs("div",{className:"container mx-auto px-4 text-center text-sm text-muted-foreground",children:[l.jsxs("p",{children:["© ",new Date().getFullYear()," People Risk Consulting. The BRAVER Innovation (BI) Model."]}),l.jsx("p",{className:"text-xs mt-1",children:"Bias Recognition · Research · Action Analysis · Validation · Experimentation · Results"})]})})]})},AU=()=>{const e=Ro();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),l.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[l.jsxs(Rm,{children:[l.jsx("title",{children:"Page not found | BRAVER Innovation Strategy Generator"}),l.jsx("meta",{name:"description",content:"The page you were looking for doesn't exist. Return to the BRAVER Innovation Strategy Generator home page to start the six-stage experimentation workflow."}),l.jsx("meta",{name:"robots",content:"noindex"})]}),l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),l.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Sorry! We can't find that page."}),l.jsx(Li,{to:"/","aria-label":"Return to the BRAVER Innovation Strategy Generator home page",className:"text-primary underline hover:text-primary/90",children:"Return to the BRAVER Innovation Strategy Generator home page"})]})]})},OU=new mI,IU=()=>l.jsx(yI,{client:OU,children:l.jsxs(HO,{children:[l.jsx(TA,{}),l.jsx(i2,{}),l.jsxs(pD,{children:[l.jsx(vD,{}),l.jsxs(aD,{children:[l.jsx(Tc,{path:"/",element:l.jsx(PU,{})}),l.jsx(Tc,{path:"/generator",element:l.jsx(_U,{})}),l.jsx(Tc,{path:"*",element:l.jsx(AU,{})})]})]})]})});I1(document.getElementById("root")).render(l.jsx(V1,{children:l.jsx(IU,{})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.