PageSourceSearch

https://diagnostiquejoaillerie.lovable.app/assets/index-CDhxuqGN.js

js diagnostiquejoaillerie.lovable.app collected 2026-10-03 03:25:56 UTC 816,198 bytes, 199 lines download raw bytes

vendor: 6,236 bytes, lines 1-9
1var sg=e=>{throw TypeError(e)};var pd=(e,t,n)=>t.has(e)||sg("Cannot "+n);var D=(e,t,n)=>(pd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ce=(e,t,n)=>t.has(e)?sg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),de=(e,t,n,r)=>(pd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),gt=(e,t,n)=>(pd(e,t,"access private method"),n);var yl=(e,t,n,r)=>({set _(i){de(e,t,i,n)},get _(){return D(e,t,r)}});function O1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Tu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n0={exports:{}},xc={},r0={exports:{}},xe={};/**
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 tl=Symbol.for("react.element"),I1=Symbol.for("react.portal"),j1=Symbol.for("react.fragment"),L1=Symbol.for("react.strict_mode"),D1=Symbol.for("react.profiler"),M1=Symbol.for("react.provider"),$1=Symbol.for("react.context"),F1=Symbol.for("react.forward_ref"),z1=Symbol.for("react.suspense"),U1=Symbol.for("react.memo"),B1=Symbol.for("react.lazy"),og=Symbol.iterator;function H1(e){return e===null||typeof e!="object"?null:(e=og&&e[og]||e["@@iterator"],typeof e=="function"?e:null)}var i0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s0=Object.assign,o0={};function bo(e,t,n){this.props=e,this.context=t,this.refs=o0,this.updater=n||i0}bo.prototype.isReactComponent={};bo.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")};bo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a0(){}a0.prototype=bo.prototype;function gp(e,t,n){this.props=e,this.context=t,this.refs=o0,this.updater=n||i0}var yp=gp.prototype=new a0;yp.constructor=gp;s0(yp,bo.prototype);yp.isPureReactComponent=!0;var ag=Array.isArray,l0=Object.prototype.hasOwnProperty,vp={current:null},u0={key:!0,ref:!0,__self:!0,__source:!0};function c0(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)l0.call(t,r)&&!u0.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:tl,type:e,key:s,ref:o,props:i,_owner:vp.current}}function V1(e,t){return{$$typeof:tl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wp(e){return typeof e=="object"&&e!==null&&e.$$typeof===tl}function q1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lg=/\/+/g;function md(e,t){return typeof e=="object"&&e!==null&&e.key!=null?q1(""+e.key):t.toString(36)}function ru(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case tl:case I1:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+md(o,0):r,ag(i)?(n="",e!=null&&(n=e.replace(lg,"$&/")+"/"),ru(i,t,n,"",function(u){return u})):i!=null&&(wp(i)&&(i=V1(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(lg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",ag(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+md(s,a);o+=ru(s,t,n,l,i)}else if(l=H1(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+md(s,a++),o+=ru(s,t,n,l,i);else if(s==="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 vl(e,t,n){if(e==null)return e;var r=[],i=0;return ru(e,r,"","",function(s){return t.call(n,s,i++)}),r}function W1(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},iu={transition:null},K1={ReactCurrentDispatcher:Tt,ReactCurrentBatchConfig:iu,ReactCurrentOwner:vp};function d0(){throw Error("act(...) is not supported in production builds of React.")}xe.Children={map:vl,forEach:function(e,t,n){vl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vl(e,function(){t++}),t},toArray:function(e){return vl(e,function(t){return t})||[]},only:function(e){if(!wp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};xe.Component=bo;xe.Fragment=j1;xe.Profiler=D1;xe.PureComponent=gp;xe.StrictMode=L1;xe.Suspense=z1;
vendor: 5,052 bytes, lines 9-25
9xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K1;xe.act=d0;xe.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=s0({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=vp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)l0.call(t,l)&&!u0.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:tl,type:e.type,key:i,ref:s,props:r,_owner:o}};xe.createContext=function(e){return e={$$typeof:$1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:M1,_context:e},e.Consumer=e};xe.createElement=c0;xe.createFactory=function(e){var t=c0.bind(null,e);return t.type=e,t};xe.createRef=function(){return{current:null}};xe.forwardRef=function(e){return{$$typeof:F1,render:e}};xe.isValidElement=wp;xe.lazy=function(e){return{$$typeof:B1,_payload:{_status:-1,_result:e},_init:W1}};xe.memo=function(e,t){return{$$typeof:U1,type:e,compare:t===void 0?null:t}};xe.startTransition=function(e){var t=iu.transition;iu.transition={};try{e()}finally{iu.transition=t}};xe.unstable_act=d0;xe.useCallback=function(e,t){return Tt.current.useCallback(e,t)};xe.useContext=function(e){return Tt.current.useContext(e)};xe.useDebugValue=function(){};xe.useDeferredValue=function(e){return Tt.current.useDeferredValue(e)};xe.useEffect=function(e,t){return Tt.current.useEffect(e,t)};xe.useId=function(){return Tt.current.useId()};xe.useImperativeHandle=function(e,t,n){return Tt.current.useImperativeHandle(e,t,n)};xe.useInsertionEffect=function(e,t){return Tt.current.useInsertionEffect(e,t)};xe.useLayoutEffect=function(e,t){return Tt.current.useLayoutEffect(e,t)};xe.useMemo=function(e,t){return Tt.current.useMemo(e,t)};xe.useReducer=function(e,t,n){return Tt.current.useReducer(e,t,n)};xe.useRef=function(e){return Tt.current.useRef(e)};xe.useState=function(e){return Tt.current.useState(e)};xe.useSyncExternalStore=function(e,t,n){return Tt.current.useSyncExternalStore(e,t,n)};xe.useTransition=function(){return Tt.current.useTransition()};xe.version="18.3.1";r0.exports=xe;var x=r0.exports;const K=wc(x),h0=O1({__proto__:null,default:K},[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 G1=x,J1=Symbol.for("react.element"),Q1=Symbol.for("react.fragment"),Y1=Object.prototype.hasOwnProperty,Z1=G1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,X1={key:!0,ref:!0,__self:!0,__source:!0};function f0(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Y1.call(t,r)&&!X1.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:J1,type:e,key:s,ref:o,props:i,_owner:Z1.current}}xc.Fragment=Q1;xc.jsx=f0;xc.jsxs=f0;n0.exports=xc;var g=n0.exports,p0={exports:{}},Zt={},m0={exports:{}},g0={};/**
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,j){var _=N.length;N.push(j);e:for(;0<_;){var F=_-1>>>1,q=N[F];if(0<i(q,j))N[F]=j,N[_]=q,_=F;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var j=N[0],_=N.pop();if(_!==j){N[0]=_;e:for(var F=0,q=N.length,E=q>>>1;F<E;){var Z=2*(F+1)-1,ae=N[Z],he=Z+1,G=N[he];if(0>i(ae,_))he<q&&0>i(G,ae)?(N[F]=G,N[he]=_,F=he):(N[F]=ae,N[Z]=_,F=Z);else if(he<q&&0>i(G,_))N[F]=G,N[he]=_,F=he;else break e}}return j}function i(N,j){var _=N.sortIndex-j.sortIndex;return _!==0?_:N.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,v=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(N){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=N)r(u),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(u)}}function S(N){if(p=!1,w(N),!v)if(n(l)!==null)v=!0,U(C);else{var j=n(u);j!==null&&Q(S,j.startTime-N)}}function C(N,j){v=!1,p&&(p=!1,m(R),R=-1),h=!0;var _=f;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||N&&!L());){var F=d.callback;
vendor: 9,152 bytes, lines 25-34
25if(typeof F=="function"){d.callback=null,f=d.priorityLevel;var q=F(d.expirationTime<=j);j=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var E=!0;else{var Z=n(u);Z!==null&&Q(S,Z.startTime-j),E=!1}return E}finally{d=null,f=_,h=!1}}var k=!1,T=null,R=-1,P=5,O=-1;function L(){return!(e.unstable_now()-O<P)}function A(){if(T!==null){var N=e.unstable_now();O=N;var j=!0;try{j=T(!0,N)}finally{j?V():(k=!1,T=null)}}else k=!1}var V;if(typeof y=="function")V=function(){y(A)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,$=M.port2;M.port1.onmessage=A,V=function(){$.postMessage(null)}}else V=function(){b(A,0)};function U(N){T=N,k||(k=!0,V())}function Q(N,j){R=b(function(){N(e.unstable_now())},j)}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(){v||h||(v=!0,U(C))},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"):P=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var j=3;break;default:j=f}var _=f;f=j;try{return N()}finally{f=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,j){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var _=f;f=N;try{return j()}finally{f=_}},e.unstable_scheduleCallback=function(N,j,_){var F=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?F+_:F):_=F,N){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=_+q,N={id:c++,callback:j,priorityLevel:N,startTime:_,expirationTime:q,sortIndex:-1},_>F?(N.sortIndex=_,t(u,N),n(l)===null&&N===n(u)&&(p?(m(R),R=-1):p=!0,Q(S,_-F))):(N.sortIndex=q,t(l,N),v||h||(v=!0,U(C))),N},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(N){var j=f;return function(){var _=f;f=j;try{return N.apply(this,arguments)}finally{f=_}}}})(g0);m0.exports=g0;var eE=m0.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 tE=x,Qt=eE;function z(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 y0=new Set,wa={};function ss(e,t){oo(e,t),oo(e+"Capture",t)}function oo(e,t){for(wa[e]=t,e=0;e<t.length;e++)y0.add(t[e])}var br=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eh=Object.prototype.hasOwnProperty,nE=/^[: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]*$/,ug={},cg={};function rE(e){return Eh.call(cg,e)?!0:Eh.call(ug,e)?!1:nE.test(e)?cg[e]=!0:(ug[e]=!0,!1)}function iE(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 sE(e,t,n,r){if(t===null||typeof t>"u"||iE(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 Rt(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Rt(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){pt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var xp=/[\-:]([a-z])/g;function bp(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(xp,bp);pt[t]=new Rt(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(xp,bp);pt[t]=new Rt(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(xp,bp);pt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function _p(e,t,n,r){var i=pt.hasOwnProperty(t)?pt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(sE(t,n,i,r)&&(n=null),r||i===null?rE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Pr=tE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wl=Symbol.for("react.element"),Cs=Symbol.for("react.portal"),Ts=Symbol.for("react.fragment"),Sp=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),v0=Symbol.for("react.provider"),w0=Symbol.for("react.context"),kp=Symbol.for("react.forward_ref"),Th=Symbol.for("react.suspense"),Rh=Symbol.for("react.suspense_list"),Ep=Symbol.for("react.memo"),Hr=Symbol.for("react.lazy"),x0=Symbol.for("react.offscreen"),dg=Symbol.iterator;function jo(e){return e===null||typeof e!="object"?null:(e=dg&&e[dg]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,gd;function Go(e){if(gd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gd=t&&t[1]||""}return`
34`+gd+e}var yd=!1;function vd(e,t){if(!e||yd)return"";yd=!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: 16,752 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),s=r.stack.split(`
36`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{yd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Go(e):""}function oE(e){switch(e.tag){case 5:return Go(e.type);case 16:return Go("Lazy");case 13:return Go("Suspense");case 19:return Go("SuspenseList");case 0:case 2:case 15:return e=vd(e.type,!1),e;case 11:return e=vd(e.type.render,!1),e;case 1:return e=vd(e.type,!0),e;default:return""}}function Ph(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 Ts:return"Fragment";case Cs:return"Portal";case Ch:return"Profiler";case Sp:return"StrictMode";case Th:return"Suspense";case Rh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w0:return(e.displayName||"Context")+".Consumer";case v0:return(e._context.displayName||"Context")+".Provider";case kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ep:return t=e.displayName||null,t!==null?t:Ph(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return Ph(e(t))}catch{}}return null}function aE(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 Ph(t);case 8:return t===Sp?"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 fi(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 lE(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 i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.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 xl(e){e._valueTracker||(e._valueTracker=lE(e))}function _0(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 Ru(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 Ah(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(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 S0(e,t){t=t.checked,t!=null&&_p(e,"checked",t,!1)}function Nh(e,t){S0(e,t);var n=fi(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")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fg(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 Oh(e,t,n){(t!=="number"||Ru(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jo=Array.isArray;function Fs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fi(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ih(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(z(92));if(Jo(n)){if(1<n.length)throw Error(z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fi(n)}}function k0(e,t){var n=fi(t.value),r=fi(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 mg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function E0(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 jh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?E0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bl,C0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(bl=bl||document.createElement("div"),bl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ra={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},uE=["Webkit","ms","Moz","O"];Object.keys(ra).forEach(function(e){uE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ra[t]=ra[e]})});function T0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ra.hasOwnProperty(e)&&ra[e]?(""+t).trim():t+"px"}function R0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=T0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var cE=qe({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 Lh(e,t){if(t){if(cE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function Dh(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 Mh=null;function Cp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $h=null,zs=null,Us=null;function gg(e){if(e=il(e)){if(typeof $h!="function")throw Error(z(280));var t=e.stateNode;t&&(t=Ec(t),$h(e.stateNode,e.type,t))}}function P0(e){zs?Us?Us.push(e):Us=[e]:zs=e}function A0(){if(zs){var e=zs,t=Us;if(Us=zs=null,gg(e),t)for(e=0;e<t.length;e++)gg(t[e])}}function N0(e,t){return e(t)}function O0(){}var wd=!1;function I0(e,t,n){if(wd)return e(t,n);wd=!0;try{return N0(e,t,n)}finally{wd=!1,(zs!==null||Us!==null)&&(O0(),A0())}}function ba(e,t){var n=e.stateNode;if(n===null)return null;var r=Ec(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(z(231,t,typeof n));return n}var Fh=!1;if(br)try{var Lo={};Object.defineProperty(Lo,"passive",{get:function(){Fh=!0}}),window.addEventListener("test",Lo,Lo),window.removeEventListener("test",Lo,Lo)}catch{Fh=!1}function dE(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ia=!1,Pu=null,Au=!1,zh=null,hE={onError:function(e){ia=!0,Pu=e}};function fE(e,t,n,r,i,s,o,a,l){ia=!1,Pu=null,dE.apply(hE,arguments)}function pE(e,t,n,r,i,s,o,a,l){if(fE.apply(this,arguments),ia){if(ia){var u=Pu;ia=!1,Pu=null}else throw Error(z(198));Au||(Au=!0,zh=u)}}function os(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 j0(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 yg(e){if(os(e)!==e)throw Error(z(188))}function mE(e){var t=e.alternate;if(!t){if(t=os(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return yg(i),e;if(s===r)return yg(i),t;s=s.sibling}throw Error(z(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,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){for(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)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function L0(e){return e=mE(e),e!==null?D0(e):null}function D0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=D0(e);if(t!==null)return t;e=e.sibling}return null}var M0=Qt.unstable_scheduleCallback,vg=Qt.unstable_cancelCallback,gE=Qt.unstable_shouldYield,yE=Qt.unstable_requestPaint,Ye=Qt.unstable_now,vE=Qt.unstable_getCurrentPriorityLevel,Tp=Qt.unstable_ImmediatePriority,$0=Qt.unstable_UserBlockingPriority,Nu=Qt.unstable_NormalPriority,wE=Qt.unstable_LowPriority,F0=Qt.unstable_IdlePriority,bc=null,Xn=null;function xE(e){if(Xn&&typeof Xn.onCommitFiberRoot=="function")try{Xn.onCommitFiberRoot(bc,e,void 0,(e.current.flags&128)===128)}catch{}}var On=Math.clz32?Math.clz32:SE,bE=Math.log,_E=Math.LN2;function SE(e){return e>>>=0,e===0?32:31-(bE(e)/_E|0)|0}var _l=64,Sl=4194304;function Qo(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 Ou(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Qo(a):(s&=o,s!==0&&(r=Qo(s)))}else o=n&~i,o!==0?r=Qo(o):s!==0&&(r=Qo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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-On(t),i=1<<n,r|=e[n],t&=~i;return r}function kE(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 EE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-On(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=kE(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Uh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function z0(){var e=_l;return _l<<=1,!(_l&4194240)&&(_l=64),e}function xd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-On(t),e[t]=n}function CE(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 i=31-On(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Rp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-On(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ne=0;function U0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var B0,Pp,H0,V0,q0,Bh=!1,kl=[],ii=null,si=null,oi=null,_a=new Map,Sa=new Map,Wr=[],TE="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 wg(e,t){switch(e){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":si=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":_a.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sa.delete(t.pointerId)}}function Do(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=il(t),t!==null&&Pp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function RE(e,t,n,r,i){switch(t){case"focusin":return ii=Do(ii,e,t,n,r,i),!0;case"dragenter":return si=Do(si,e,t,n,r,i),!0;case"mouseover":return oi=Do(oi,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return _a.set(s,Do(_a.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Sa.set(s,Do(Sa.get(s)||null,e,t,n,r,i)),!0}return!1}function W0(e){var t=Mi(e.target);if(t!==null){var n=os(t);if(n!==null){if(t=n.tag,t===13){if(t=j0(n),t!==null){e.blockedOn=t,q0(e.priority,function(){H0(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 su(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Mh=r,n.target.dispatchEvent(r),Mh=null}else return t=il(n),t!==null&&Pp(t),e.blockedOn=n,!1;t.shift()}return!0}function xg(e,t,n){su(e)&&n.delete(t)}function PE(){Bh=!1,ii!==null&&su(ii)&&(ii=null),si!==null&&su(si)&&(si=null),oi!==null&&su(oi)&&(oi=null),_a.forEach(xg),Sa.forEac
vendor: 11,826 bytes, line 37
37h(xg)}function Mo(e,t){e.blockedOn===t&&(e.blockedOn=null,Bh||(Bh=!0,Qt.unstable_scheduleCallback(Qt.unstable_NormalPriority,PE)))}function ka(e){function t(i){return Mo(i,e)}if(0<kl.length){Mo(kl[0],e);for(var n=1;n<kl.length;n++){var r=kl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ii!==null&&Mo(ii,e),si!==null&&Mo(si,e),oi!==null&&Mo(oi,e),_a.forEach(t),Sa.forEach(t),n=0;n<Wr.length;n++)r=Wr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wr.length&&(n=Wr[0],n.blockedOn===null);)W0(n),n.blockedOn===null&&Wr.shift()}var Bs=Pr.ReactCurrentBatchConfig,Iu=!0;function AE(e,t,n,r){var i=Ne,s=Bs.transition;Bs.transition=null;try{Ne=1,Ap(e,t,n,r)}finally{Ne=i,Bs.transition=s}}function NE(e,t,n,r){var i=Ne,s=Bs.transition;Bs.transition=null;try{Ne=4,Ap(e,t,n,r)}finally{Ne=i,Bs.transition=s}}function Ap(e,t,n,r){if(Iu){var i=Hh(e,t,n,r);if(i===null)Ad(e,t,r,ju,n),wg(e,r);else if(RE(i,e,t,n,r))r.stopPropagation();else if(wg(e,r),t&4&&-1<TE.indexOf(e)){for(;i!==null;){var s=il(i);if(s!==null&&B0(s),s=Hh(e,t,n,r),s===null&&Ad(e,t,r,ju,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ad(e,t,r,null,n)}}var ju=null;function Hh(e,t,n,r){if(ju=null,e=Cp(r),e=Mi(e),e!==null)if(t=os(e),t===null)e=null;else if(n=t.tag,n===13){if(e=j0(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 ju=e,null}function K0(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(vE()){case Tp:return 1;case $0:return 4;case Nu:case wE:return 16;case F0:return 536870912;default:return 16}default:return 16}}var ti=null,Np=null,ou=null;function G0(){if(ou)return ou;var e,t=Np,n=t.length,r,i="value"in ti?ti.value:ti.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return ou=i.slice(e,1<r?1-r:void 0)}function au(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 El(){return!0}function bg(){return!1}function Xt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?El:bg,this.isPropagationStopped=bg,this}return qe(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=El)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),t}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Op=Xt(_o),rl=qe({},_o,{view:0,detail:0}),OE=Xt(rl),bd,_d,$o,_c=qe({},rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ip,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!==$o&&($o&&e.type==="mousemove"?(bd=e.screenX-$o.screenX,_d=e.screenY-$o.screenY):_d=bd=0,$o=e),bd)},movementY:function(e){return"movementY"in e?e.movementY:_d}}),_g=Xt(_c),IE=qe({},_c,{dataTransfer:0}),jE=Xt(IE),LE=qe({},rl,{relatedTarget:0}),Sd=Xt(LE),DE=qe({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),ME=Xt(DE),$E=qe({},_o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),FE=Xt($E),zE=qe({},_o,{data:0}),Sg=Xt(zE),UE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BE={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"},HE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function VE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HE[e])?!!t[e]:!1}function Ip(){return VE}var qE=qe({},rl,{key:function(e){if(e.key){var t=UE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ip,charCode:function(e){return e.type==="keypress"?au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),WE=Xt(qE),KE=qe({},_c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kg=Xt(KE),GE=qe({},rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ip}),JE=Xt(GE),QE=qe({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),YE=Xt(QE),ZE=qe({},_c,{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}),XE=Xt(ZE),eC=[9,13,27,32],jp=br&&"CompositionEvent"in window,sa=null;br&&"documentMode"in document&&(sa=document.documentMode);var tC=br&&"TextEvent"in window&&!sa,J0=br&&(!jp||sa&&8<sa&&11>=sa),Eg=" ",Cg=!1;function Q0(e,t){switch(e){case"keyup":return eC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rs=!1;function nC(e,t){switch(e){case"compositionend":return Y0(t);case"keypress":return t.which!==32?null:(Cg=!0,Eg);case"textInput":return e=t.data,e===Eg&&Cg?null:e;default:return null}}function rC(e,t){if(Rs)return e==="compositionend"||!jp&&Q0(e,t)?(e=G0(),ou=Np=ti=null,Rs=!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 J0&&t.locale!=="ko"?null:t.data;default:return null}}var iC={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 Tg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!iC[e.type]:t==="textarea"}function Z0(e,t,n,r){P0(r),t=Lu(t,"onChange"),0<t.length&&(n=new Op("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var oa=null,Ea=null;function sC(e){ux(e,0)}function Sc(e){var t=Ns(e);if(_0(t))return e}function oC(e,t){if(e==="change")return t}var X0=!1;if(br){var kd;if(br){var Ed="oninput"in document;if(!Ed){var Rg=document.createElement("div");Rg.setAttribute("oninput","return;"),Ed=typeof Rg.oninput=="function"}kd=Ed}else kd=!1;X0=kd&&(!document.documentMode||9<document.documentMode)}function Pg(){oa&&(oa.detachEvent("onpropertychange",ex),Ea=oa=null)}function ex(e){if(e.propertyName==="value"&&Sc(Ea)){var t=[];Z0(t,Ea,e,Cp(e)),I0(sC,t)}}function aC(e,t,n){e==="focusin"?(Pg(),oa=t,Ea=n,oa.attachEvent("onpropertychange",ex)):e==="focusout"&&Pg()}function lC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sc(Ea)}function uC(e,t){if(e==="click")return Sc(t)}function cC(e,t){if(e==="input"||e==="change")return Sc(t)}function dC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ln=typeof Object.is=="function"?Object.is:dC;function Ca(e,t){if(Ln(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 i=n[r];if(!Eh.call(t,i)||!Ln(e[i],t[i]))return!1}return!0}function Ag(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ng(e,t){var n=Ag(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=Ag(n)}}function tx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nx(){for(var e=window,t=Ru();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ru(e.document)}return t}function Lp(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 hC(e){var t=nx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tx(n.ownerDocument.documentElement,n)){if(r!==null&&Lp(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Ng(n,s);var o=Ng(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>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 fC=br&&"documentMode"in document&&11>=document.documentMode,Ps=null,Vh=null,aa=null,qh=!1;function Og(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qh||Ps==null||Ps!==Ru(r)||(r=Ps,"selectionStart"in r&&Lp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),aa&&Ca(aa,r)||(aa=r,r=Lu(Vh,"onSelect"),0<r.length&&(t=new Op("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ps)))}function Cl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var As={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionend:Cl("Transition","TransitionEnd")},Cd={},rx={};br&&(rx=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function kc(e){if(Cd[e])return Cd[e];if(!As[e])return e;var t=As[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rx)return Cd[e]=t[n];return e}var ix=kc("animationend"),sx=kc("animationiteration"),ox=kc("animationstart"),ax=kc("transitionend"),lx=new Map,Ig="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 bi(e,t){lx.set(e,t),ss(t,[e])}for(var Td=0;Td<Ig.length;Td++){var Rd=Ig[Td],pC=Rd.toLowerCase(),mC=Rd[0].toUpperCase()+Rd.slice(1);bi(pC,"on"+mC)}bi(ix,"onAnimationEnd");bi(sx,"onAnimationIteration");bi(ox,"onAnimationStart");bi("dblclick","onDoubleClick");bi("focusin","onFocus");bi("focusout","onBlur");bi(ax,"onTransitionEnd");oo("onMouseEnter",["mouseout","mouseover"]);oo("onMouseLeave",["mouseout","mouseover"]);oo("onPointerEnter",["pointerout","pointerover"]);oo("onPointerLeave",["pointerout","pointerover"]);ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yo="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(" "),gC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yo));function jg(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pE(r,t,void 0,e),e.currentTarget=null}function ux(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;jg(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;jg(i,a,u),s=l}}}if(Au)throw e=zh,Au=!1,zh=null,e}function $e(e,t){var n=t[Qh];n===void 0&&(n=t[Qh]=new Set);var r=e+"__bubble";n.has(r)||(cx(t,e,2,!1),n.add(r))}function Pd(e,t,n){var r=0;t&&(r|=4),cx(n,e,r,t)}var Tl="_reactListening"+Math.random().toString(36).slice(2);function Ta(e){if(!e[Tl]){e[Tl]=!0,y0.forEach(function(n){n!=="selectionchange"&&(gC.has(n)||Pd(n,!1,e),Pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tl]||(t[Tl]=!0,Pd("selectionchange",!1,t))}}function cx(e,t,n,r){switch(K0(t)){case 1:var i=AE;break;case 4:i=NE;break;default:i=Ap}n=i.bind(null,t,n,e),i=void 0,!Fh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ad(e,t,n,r,i){var s=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;
vendor: 4,093 bytes, line 37
37if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Mi(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}I0(function(){var u=s,c=Cp(n),d=[];e:{var f=lx.get(e);if(f!==void 0){var h=Op,v=e;switch(e){case"keypress":if(au(n)===0)break e;case"keydown":case"keyup":h=WE;break;case"focusin":v="focus",h=Sd;break;case"focusout":v="blur",h=Sd;break;case"beforeblur":case"afterblur":h=Sd;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":h=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=jE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=JE;break;case ix:case sx:case ox:h=ME;break;case ax:h=YE;break;case"scroll":h=OE;break;case"wheel":h=XE;break;case"copy":case"cut":case"paste":h=FE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=kg}var p=(t&4)!==0,b=!p&&e==="scroll",m=p?f!==null?f+"Capture":null:f;p=[];for(var y=u,w;y!==null;){w=y;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,m!==null&&(S=ba(y,m),S!=null&&p.push(Ra(y,S,w)))),b)break;y=y.return}0<p.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:p}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Mh&&(v=n.relatedTarget||n.fromElement)&&(Mi(v)||v[_r]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Mi(v):null,v!==null&&(b=os(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(p=_g,S="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(p=kg,S="onPointerLeave",m="onPointerEnter",y="pointer"),b=h==null?f:Ns(h),w=v==null?f:Ns(v),f=new p(S,y+"leave",h,n,c),f.target=b,f.relatedTarget=w,S=null,Mi(c)===u&&(p=new p(m,y+"enter",v,n,c),p.target=w,p.relatedTarget=b,S=p),b=S,h&&v)t:{for(p=h,m=v,y=0,w=p;w;w=cs(w))y++;for(w=0,S=m;S;S=cs(S))w++;for(;0<y-w;)p=cs(p),y--;for(;0<w-y;)m=cs(m),w--;for(;y--;){if(p===m||m!==null&&p===m.alternate)break t;p=cs(p),m=cs(m)}p=null}else p=null;h!==null&&Lg(d,f,h,p,!1),v!==null&&b!==null&&Lg(d,b,v,p,!0)}}e:{if(f=u?Ns(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var C=oC;else if(Tg(f))if(X0)C=cC;else{C=lC;var k=aC}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=uC);if(C&&(C=C(e,u))){Z0(d,C,n,c);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Oh(f,"number",f.value)}switch(k=u?Ns(u):window,e){case"focusin":(Tg(k)||k.contentEditable==="true")&&(Ps=k,Vh=u,aa=null);break;case"focusout":aa=Vh=Ps=null;break;case"mousedown":qh=!0;break;case"contextmenu":case"mouseup":case"dragend":qh=!1,Og(d,n,c);break;case"selectionchange":if(fC)break;case"keydown":case"keyup":Og(d,n,c)}var T;if(jp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Rs?Q0(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(J0&&n.locale!=="ko"&&(Rs||R!=="onCompositionStart"?R==="onCompositionEnd"&&Rs&&(T=G0()):(ti=c,Np="value"in ti?ti.value:ti.textContent,Rs=!0)),k=Lu(u,R),0<k.length&&(R=new Sg(R,e,null,n,c),d.push({event:R,listeners:k}),T?R.data=T:(T=Y0(n),T!==null&&(R.data=T)))),(T=tC?nC(e,n):rC(e,n))&&(u=Lu(u,"onBeforeInput"),0<u.length&&(c=new Sg("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}ux(d,t)})}function Ra(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;
vendor: 6,411 bytes, lines 37-38
37i.tag===5&&s!==null&&(i=s,s=ba(e,n),s!=null&&r.unshift(Ra(e,s,i)),s=ba(e,t),s!=null&&r.push(Ra(e,s,i))),e=e.return}return r}function cs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Lg(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=ba(n,s),l!=null&&o.unshift(Ra(n,l,a))):i||(l=ba(n,s),l!=null&&o.push(Ra(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var yC=/\r\n?/g,vC=/\u0000|\uFFFD/g;function Dg(e){return(typeof e=="string"?e:""+e).replace(yC,`
38`).replace(vC,"")}function Rl(e,t,n){if(t=Dg(t),Dg(e)!==t&&n)throw Error(z(425))}function Du(){}var Wh=null,Kh=null;function Gh(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 Jh=typeof setTimeout=="function"?setTimeout:void 0,wC=typeof clearTimeout=="function"?clearTimeout:void 0,Mg=typeof Promise=="function"?Promise:void 0,xC=typeof queueMicrotask=="function"?queueMicrotask:typeof Mg<"u"?function(e){return Mg.resolve(null).then(e).catch(bC)}:Jh;function bC(e){setTimeout(function(){throw e})}function Nd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ka(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ka(t)}function ai(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 $g(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 So=Math.random().toString(36).slice(2),Qn="__reactFiber$"+So,Pa="__reactProps$"+So,_r="__reactContainer$"+So,Qh="__reactEvents$"+So,_C="__reactListeners$"+So,SC="__reactHandles$"+So;function Mi(e){var t=e[Qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_r]||n[Qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$g(e);e!==null;){if(n=e[Qn])return n;e=$g(e)}return t}e=n,n=e.parentNode}return null}function il(e){return e=e[Qn]||e[_r],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ns(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function Ec(e){return e[Pa]||null}var Yh=[],Os=-1;function _i(e){return{current:e}}function Fe(e){0>Os||(e.current=Yh[Os],Yh[Os]=null,Os--)}function Le(e,t){Os++,Yh[Os]=e.current,e.current=t}var pi={},bt=_i(pi),Lt=_i(!1),Qi=pi;function ao(e,t){var n=e.type.contextTypes;if(!n)return pi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Dt(e){return e=e.childContextTypes,e!=null}function Mu(){Fe(Lt),Fe(bt)}function Fg(e,t,n){if(bt.current!==pi)throw Error(z(168));Le(bt,t),Le(Lt,n)}function dx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(z(108,aE(e)||"Unknown",i));return qe({},n,r)}function $u(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,Qi=bt.current,Le(bt,e),Le(Lt,Lt.current),!0}function zg(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=dx(e,t,Qi),r.__reactInternalMemoizedMergedChildContext=e,Fe(Lt),Fe(bt),Le(bt,e)):Fe(Lt),Le(Lt,n)}var gr=null,Cc=!1,Od=!1;function hx(e){gr===null?gr=[e]:gr.push(e)}function kC(e){Cc=!0,hx(e)}function Si(){if(!Od&&gr!==null){Od=!0;var e=0,t=Ne;try{var n=gr;for(Ne=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}gr=null,Cc=!1}catch(i){throw gr!==null&&(gr=gr.slice(e+1)),M0(Tp,Si),i}finally{Ne=t,Od=!1}}return null}var Is=[],js=0,Fu=null,zu=0,rn=[],sn=0,Yi=null,vr=1,wr="";function Oi(e,t){Is[js++]=zu,Is[js++]=Fu,Fu=e,zu=t}function fx(e,t,n){rn[sn++]=vr,rn[sn++]=wr,rn[sn++]=Yi,Yi=e;var r=vr;e=wr;var i=32-On(r)-1;r&=~(1<<i),n+=1;var s=32-On(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vr=1<<32-On(t)+i|n<<i|r,wr=s+e}else vr=1<<s|n<<i|r,wr=e}function Dp(e){e.return!==null&&(Oi(e,1),fx(e,1,0))}function Mp(e){for(;e===Fu;)Fu=Is[--js],Is[js]=null,zu=Is[--js],Is[js]=null;for(;e===Yi;)Yi=rn[--sn],rn[sn]=null,wr=rn[--sn],rn[sn]=null,vr=rn[--sn],rn[sn]=null}var Gt=null,Wt=null,Ue=!1,An=null;function px(e,t){var n=an(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 Ug(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,Gt=e,Wt=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gt=e,Wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Yi!==null?{id:vr,overflow:wr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=an(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Gt=e,Wt=null,!0):!1;default:return!1}}function Zh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xh(e){if(Ue){var t=Wt;if(t){var n=t;if(!Ug(e,t)){if(Zh(e))throw Error(z(418));t=ai(n.nextSibling);var r=Gt;t&&Ug(e,t)?px(r,n):(e.flags=e.flags&-4097|2,Ue=!1,Gt=e)}}else{if(Zh(e))throw Error(z(418));e.flags=e.flags&-4097|2,Ue=!1,Gt=e}}}function Bg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function Pl(e){if(e!==Gt)return!1;if(!Ue)return Bg(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gh(e.type,e.memoizedProps)),t&&(t=Wt)){if(Zh(e))throw mx(),Error(z(418));for(;t;)px(e,t),t=ai(t.nextSibling)}if(Bg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Wt=ai(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Wt=null}}else Wt=Gt?ai(e.stateNode.nextSibling):null;return!0}function mx(){for(var e=Wt;e;)e=ai(e.nextSibling)}function lo(){Wt=Gt=null,Ue=!1}function $p(e){An===null?An=[e]:An.push(e)}var EC=Pr.ReactCurrentBatchConfig;
vendor: 12,187 bytes, line 38
38function Fo(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(z(309));var r=n.stateNode}if(!r)throw Error(z(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(z(284));if(!n._owner)throw Error(z(290,e))}return e}function Al(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hg(e){var t=e._init;return t(e._payload)}function gx(e){function t(m,y){if(e){var w=m.deletions;w===null?(m.deletions=[y],m.flags|=16):w.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m,y){for(m=new Map;y!==null;)y.key!==null?m.set(y.key,y):m.set(y.index,y),y=y.sibling;return m}function i(m,y){return m=di(m,y),m.index=0,m.sibling=null,m}function s(m,y,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<y?(m.flags|=2,y):w):(m.flags|=2,y)):(m.flags|=1048576,y)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,y,w,S){return y===null||y.tag!==6?(y=Fd(w,m.mode,S),y.return=m,y):(y=i(y,w),y.return=m,y)}function l(m,y,w,S){var C=w.type;return C===Ts?c(m,y,w.props.children,S,w.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Hr&&Hg(C)===y.type)?(S=i(y,w.props),S.ref=Fo(m,y,w),S.return=m,S):(S=pu(w.type,w.key,w.props,null,m.mode,S),S.ref=Fo(m,y,w),S.return=m,S)}function u(m,y,w,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=zd(w,m.mode,S),y.return=m,y):(y=i(y,w.children||[]),y.return=m,y)}function c(m,y,w,S,C){return y===null||y.tag!==7?(y=Gi(w,m.mode,S,C),y.return=m,y):(y=i(y,w),y.return=m,y)}function d(m,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Fd(""+y,m.mode,w),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case wl:return w=pu(y.type,y.key,y.props,null,m.mode,w),w.ref=Fo(m,null,y),w.return=m,w;case Cs:return y=zd(y,m.mode,w),y.return=m,y;case Hr:var S=y._init;return d(m,S(y._payload),w)}if(Jo(y)||jo(y))return y=Gi(y,m.mode,w,null),y.return=m,y;Al(m,y)}return null}function f(m,y,w,S){var C=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:a(m,y,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case wl:return w.key===C?l(m,y,w,S):null;case Cs:return w.key===C?u(m,y,w,S):null;case Hr:return C=w._init,f(m,y,C(w._payload),S)}if(Jo(w)||jo(w))return C!==null?null:c(m,y,w,S,null);Al(m,w)}return null}function h(m,y,w,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(w)||null,a(y,m,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case wl:return m=m.get(S.key===null?w:S.key)||null,l(y,m,S,C);case Cs:return m=m.get(S.key===null?w:S.key)||null,u(y,m,S,C);case Hr:var k=S._init;return h(m,y,w,k(S._payload),C)}if(Jo(S)||jo(S))return m=m.get(w)||null,c(y,m,S,C,null);Al(y,S)}return null}function v(m,y,w,S){for(var C=null,k=null,T=y,R=y=0,P=null;T!==null&&R<w.length;R++){T.index>R?(P=T,T=null):P=T.sibling;var O=f(m,T,w[R],S);if(O===null){T===null&&(T=P);break}e&&T&&O.alternate===null&&t(m,T),y=s(O,y,R),k===null?C=O:k.sibling=O,k=O,T=P}if(R===w.length)return n(m,T),Ue&&Oi(m,R),C;if(T===null){for(;R<w.length;R++)T=d(m,w[R],S),T!==null&&(y=s(T,y,R),k===null?C=T:k.sibling=T,k=T);return Ue&&Oi(m,R),C}for(T=r(m,T);R<w.length;R++)P=h(T,m,R,w[R],S),P!==null&&(e&&P.alternate!==null&&T.delete(P.key===null?R:P.key),y=s(P,y,R),k===null?C=P:k.sibling=P,k=P);return e&&T.forEach(function(L){return t(m,L)}),Ue&&Oi(m,R),C}function p(m,y,w,S){var C=jo(w);if(typeof C!="function")throw Error(z(150));if(w=C.call(w),w==null)throw Error(z(151));for(var k=C=null,T=y,R=y=0,P=null,O=w.next();T!==null&&!O.done;R++,O=w.next()){T.index>R?(P=T,T=null):P=T.sibling;var L=f(m,T,O.value,S);if(L===null){T===null&&(T=P);break}e&&T&&L.alternate===null&&t(m,T),y=s(L,y,R),k===null?C=L:k.sibling=L,k=L,T=P}if(O.done)return n(m,T),Ue&&Oi(m,R),C;if(T===null){for(;!O.done;R++,O=w.next())O=d(m,O.value,S),O!==null&&(y=s(O,y,R),k===null?C=O:k.sibling=O,k=O);return Ue&&Oi(m,R),C}for(T=r(m,T);!O.done;R++,O=w.next())O=h(T,m,R,O.value,S),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?R:O.key),y=s(O,y,R),k===null?C=O:k.sibling=O,k=O);return e&&T.forEach(function(A){return t(m,A)}),Ue&&Oi(m,R),C}function b(m,y,w,S){if(typeof w=="object"&&w!==null&&w.type===Ts&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case wl:e:{for(var C=w.key,k=y;k!==null;){if(k.key===C){if(C=w.type,C===Ts){if(k.tag===7){n(m,k.sibling),y=i(k,w.props.children),y.return=m,m=y;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Hr&&Hg(C)===k.type){n(m,k.sibling),y=i(k,w.props),y.ref=Fo(m,k,w),y.return=m,m=y;break e}n(m,k);break}else t(m,k);k=k.sibling}w.type===Ts?(y=Gi(w.props.children,m.mode,S,w.key),y.return=m,m=y):(S=pu(w.type,w.key,w.props,null,m.mode,S),S.ref=Fo(m,y,w),S.return=m,m=S)}return o(m);case Cs:e:{for(k=w.key;y!==null;){if(y.key===k)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(m,y.sibling),y=i(y,w.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=zd(w,m.mode,S),y.return=m,m=y}return o(m);case Hr:return k=w._init,b(m,y,k(w._payload),S)}if(Jo(w))return v(m,y,w,S);if(jo(w))return p(m,y,w,S);Al(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(m,y.sibling),y=i(y,w),y.return=m,m=y):(n(m,y),y=Fd(w,m.mode,S),y.return=m,m=y),o(m)):n(m,y)}return b}var uo=gx(!0),yx=gx(!1),Uu=_i(null),Bu=null,Ls=null,Fp=null;function zp(){Fp=Ls=Bu=null}function Up(e){var t=Uu.current;Fe(Uu),e._currentValue=t}function ef(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 Hs(e,t){Bu=e,Fp=Ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function un(e){var t=e._currentValue;if(Fp!==e)if(e={context:e,memoizedValue:t,next:null},Ls===null){if(Bu===null)throw Error(z(308));Ls=e,Bu.dependencies={lanes:0,firstContext:e}}else Ls=Ls.next=e;return t}var $i=null;function Bp(e){$i===null?$i=[e]:$i.push(e)}function vx(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Bp(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sr(e,r)}function Sr(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 Vr=!1;function Hp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wx(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 xr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function li(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Se&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Bp(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sr(e,n)}function lu(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,Rp(e,n)}}function Vg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=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};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 Hu(e,t,n,r){var i=e.updateQueue;Vr=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,p=a;switch(f=t,h=n,p.tag){case 1:if(v=p.payload,typeof v=="function"){d=v.call(h,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=p.payload,f=typeof v=="function"?v.call(h,d,f):v,f==null)break e;d=qe({},d,f);break e;case 2:Vr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Xi|=o,e.lanes=o,e.memoizedState=d}}function qg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(z(191,i));i.call(r)}}}var sl={},er=_i(sl),Aa=_i(sl),Na=_i(sl);function Fi(e){if(e===sl)throw Error(z(174));return e}function Vp(e,t){switch(Le(Na,t),Le(Aa,e),Le(er,sl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jh(t,e)}Fe(er),Le(er,t)}function co(){Fe(er),Fe(Aa),Fe(Na)}function xx(e){Fi(Na.current);var t=Fi(er.current),n=jh(t,e.type);t!==n&&(Le(Aa,e),Le(er,n))}function qp(e){Aa.current===e&&(Fe(er),Fe(Aa))}var Be=_i(0);function Vu(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 Id=[];function Wp(){for(var e=0;e<Id.length;e++)Id[e]._workInProgressVersionPrimary=null;Id.length=0}var uu=Pr.ReactCurrentDispatcher,jd=Pr.ReactCurrentBatchConfig,Zi=0,He=null,rt=null,lt=null,qu=!1,la=!1,Oa=0,CC=0;function yt(){throw Error(z(321))}function Kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ln(e[n],t[n]))return!1;return!0}function Gp(e,t,n,r,i,s){if(Zi=s,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,uu.current=e===null||e.memoizedState===null?AC:NC,e=n(r,i),la){s=0;do{if(la=!1,Oa=0,25<=s)throw Error(z(301));s+=1,lt=rt=null,t.updateQueue=null,uu.current=OC,e=n(r,i)}while(la)}if(uu.current=Wu,t=rt!==null&&rt.next!==null,Zi=0,lt=rt=He=null,qu=!1,t)throw Error(z(300));return e}function Jp(){var e=Oa!==0;return Oa=0,e}function Hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?He.memoizedState=lt=e:lt=lt.next=e,lt}function cn(){if(rt===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=lt===null?He.memoizedState:lt.next;if(t!==null)lt=t,rt=e;else{if(e===null)throw Error(z(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},lt===null?He.memoizedState=lt=e:lt=lt.next=e}return lt}function Ia(e,t){return typeof t=="function"?t(e):t}function Ld(e){var t=cn(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=rt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;
vendor: 3,904 bytes, line 38
38i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Zi&c)===c)l!==null&&(l=l.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 d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,He.lanes|=c,Xi|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Ln(r,t.memoizedState)||(jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,He.lanes|=s,Xi|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dd(e){var t=cn(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Ln(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function bx(){}function _x(e,t){var n=He,r=cn(),i=t(),s=!Ln(r.memoizedState,i);if(s&&(r.memoizedState=i,jt=!0),r=r.queue,Qp(Ex.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||lt!==null&&lt.memoizedState.tag&1){if(n.flags|=2048,ja(9,kx.bind(null,n,r,i,t),void 0,null),ut===null)throw Error(z(349));Zi&30||Sx(n,t,i)}return i}function Sx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=He.updateQueue,t===null?(t={lastEffect:null,stores:null},He.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kx(e,t,n,r){t.value=n,t.getSnapshot=r,Cx(t)&&Tx(e)}function Ex(e,t,n){return n(function(){Cx(t)&&Tx(e)})}function Cx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ln(e,n)}catch{return!0}}function Tx(e){var t=Sr(e,1);t!==null&&In(t,e,1,-1)}function Wg(e){var t=Hn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:e},t.queue=e,e=e.dispatch=PC.bind(null,He,e),[t.memoizedState,e]}function ja(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=He.updateQueue,t===null?(t={lastEffect:null,stores:null},He.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 Rx(){return cn().memoizedState}function cu(e,t,n,r){var i=Hn();He.flags|=e,i.memoizedState=ja(1|t,n,void 0,r===void 0?null:r)}function Tc(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(rt!==null){var o=rt.memoizedState;if(s=o.destroy,r!==null&&Kp(r,o.deps)){i.memoizedState=ja(t,n,s,r);return}}He.flags|=e,i.memoizedState=ja(1|t,n,s,r)}function Kg(e,t){return cu(8390656,8,e,t)}function Qp(e,t){return Tc(2048,8,e,t)}function Px(e,t){return Tc(4,2,e,t)}function Ax(e,t){return Tc(4,4,e,t)}function Nx(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 Ox(e,t,n){return n=n!=null?n.concat([e]):null,Tc(4,4,Nx.bind(null,t,e),n)}function Yp(){}function Ix(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jx(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lx(e,t,n){return Zi&21?(Ln(n,t)||(n=z0(),He.lanes|=n,Xi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function TC(e,t){var n=Ne;Ne=n!==0&&4>n?n:4,e(!0);var r=jd.transition;jd.transition={};try{e(!1),t()}finally{Ne=n,jd.transition=r}}function Dx(){return cn().memoizedState}function RC(e,t,n){var r=ci(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Mx(e))$x(t,n);else if(n=vx(e,t,n,r),n!==null){var i=Ct();In(n,e,r,i),Fx(n,t,r)}}
vendor: 7,788 bytes, lines 38-40
38function PC(e,t,n){var r=ci(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mx(e))$x(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ln(a,o)){var l=t.interleaved;l===null?(i.next=i,Bp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=vx(e,t,i,r),n!==null&&(i=Ct(),In(n,e,r,i),Fx(n,t,r))}}function Mx(e){var t=e.alternate;return e===He||t!==null&&t===He}function $x(e,t){la=qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rp(e,n)}}var Wu={readContext:un,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},AC={readContext:un,useCallback:function(e,t){return Hn().memoizedState=[e,t===void 0?null:t],e},useContext:un,useEffect:Kg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cu(4194308,4,Nx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cu(4194308,4,e,t)},useInsertionEffect:function(e,t){return cu(4,2,e,t)},useMemo:function(e,t){var n=Hn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hn();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=RC.bind(null,He,e),[r.memoizedState,e]},useRef:function(e){var t=Hn();return e={current:e},t.memoizedState=e},useState:Wg,useDebugValue:Yp,useDeferredValue:function(e){return Hn().memoizedState=e},useTransition:function(){var e=Wg(!1),t=e[0];return e=TC.bind(null,e[1]),Hn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=He,i=Hn();if(Ue){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),ut===null)throw Error(z(349));Zi&30||Sx(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Kg(Ex.bind(null,r,s,e),[e]),r.flags|=2048,ja(9,kx.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Hn(),t=ut.identifierPrefix;if(Ue){var n=wr,r=vr;n=(r&~(1<<32-On(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Oa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=CC++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},NC={readContext:un,useCallback:Ix,useContext:un,useEffect:Qp,useImperativeHandle:Ox,useInsertionEffect:Px,useLayoutEffect:Ax,useMemo:jx,useReducer:Ld,useRef:Rx,useState:function(){return Ld(Ia)},useDebugValue:Yp,useDeferredValue:function(e){var t=cn();return Lx(t,rt.memoizedState,e)},useTransition:function(){var e=Ld(Ia)[0],t=cn().memoizedState;return[e,t]},useMutableSource:bx,useSyncExternalStore:_x,useId:Dx,unstable_isNewReconciler:!1},OC={readContext:un,useCallback:Ix,useContext:un,useEffect:Qp,useImperativeHandle:Ox,useInsertionEffect:Px,useLayoutEffect:Ax,useMemo:jx,useReducer:Dd,useRef:Rx,useState:function(){return Dd(Ia)},useDebugValue:Yp,useDeferredValue:function(e){var t=cn();return rt===null?t.memoizedState=e:Lx(t,rt.memoizedState,e)},useTransition:function(){var e=Dd(Ia)[0],t=cn().memoizedState;return[e,t]},useMutableSource:bx,useSyncExternalStore:_x,useId:Dx,unstable_isNewReconciler:!1};function Sn(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function tf(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rc={isMounted:function(e){return(e=e._reactInternals)?os(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ct(),i=ci(e),s=xr(r,i);s.payload=t,n!=null&&(s.callback=n),t=li(e,s,i),t!==null&&(In(t,e,i,r),lu(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ct(),i=ci(e),s=xr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=li(e,s,i),t!==null&&(In(t,e,i,r),lu(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ct(),r=ci(e),i=xr(n,r);i.tag=2,t!=null&&(i.callback=t),t=li(e,i,r),t!==null&&(In(t,e,r,n),lu(t,e,r))}};function Gg(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ca(n,r)||!Ca(i,s):!0}function zx(e,t,n){var r=!1,i=pi,s=t.contextType;return typeof s=="object"&&s!==null?s=un(s):(i=Dt(t)?Qi:bt.current,r=t.contextTypes,s=(r=r!=null)?ao(e,i):pi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Jg(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&&Rc.enqueueReplaceState(t,t.state,null)}function nf(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Hp(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=un(s):(s=Dt(t)?Qi:bt.current,i.context=ao(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(tf(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Rc.enqueueReplaceState(i,i.state,null),Hu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ho(e,t){try{var n="",r=t;do n+=oE(r),r=r.return;while(r);var i=n}catch(s){i=`
39Error generating stack: `+s.message+`
40`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Md(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var IC=typeof WeakMap=="function"?WeakMap:Map;function Ux(e,t,n){n=xr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gu||(Gu=!0,pf=r),rf(e,t)},n}function Bx(e,t,n){n=xr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){rf(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){rf(e,t),typeof r!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Qg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new IC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=KC.bind(null,e,t,n),t.then(e,e))}function Yg(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 Zg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=xr(-1,1),t.tag=2,li(n,t,1))),n.lanes|=1),e)}var jC=Pr.ReactCurrentOwner,jt=!1;function kt(e,t,n,r){t.child=e===null?yx(t,null,n,r):uo(t,e.child,n,r)}function Xg(e,t,n,r,i){n=n.render;var s=t.ref;return Hs(t,i),r=Gp(e,t,n,r,s,i),n=Jp(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kr(e,t,i)):(Ue&&n&&Dp(t),t.flags|=1,kt(e,t,r,i
vendor: 9,788 bytes, line 40
40),t.child)}function ey(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!sm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Hx(e,t,s,r,i)):(e=pu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ca,n(o,r)&&e.ref===t.ref)return kr(e,t,i)}return t.flags|=1,e=di(s,r),e.ref=t.ref,e.return=t,t.child=e}function Hx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ca(s,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,kr(e,t,i)}return sf(e,t,n,r,i)}function Vx(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(Ms,Ht),Ht|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(Ms,Ht),Ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Le(Ms,Ht),Ht|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Le(Ms,Ht),Ht|=r;return kt(e,t,i,n),t.child}function qx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sf(e,t,n,r,i){var s=Dt(n)?Qi:bt.current;return s=ao(t,s),Hs(t,i),n=Gp(e,t,n,r,s,i),r=Jp(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kr(e,t,i)):(Ue&&r&&Dp(t),t.flags|=1,kt(e,t,n,i),t.child)}function ty(e,t,n,r,i){if(Dt(n)){var s=!0;$u(t)}else s=!1;if(Hs(t,i),t.stateNode===null)du(e,t),zx(t,n,r),nf(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=un(u):(u=Dt(n)?Qi:bt.current,u=ao(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Jg(t,o,r,u),Vr=!1;var f=t.memoizedState;o.state=f,Hu(t,r,o,i),l=t.memoizedState,a!==r||f!==l||Lt.current||Vr?(typeof c=="function"&&(tf(t,n,c,r),l=t.memoizedState),(a=Vr||Gg(t,n,a,r,f,l,u))?(d||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=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,wx(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Sn(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=un(l):(l=Dt(n)?Qi:bt.current,l=ao(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Jg(t,o,r,l),Vr=!1,f=t.memoizedState,o.state=f,Hu(t,r,o,i);var v=t.memoizedState;a!==d||f!==v||Lt.current||Vr?(typeof h=="function"&&(tf(t,n,h,r),v=t.memoizedState),(u=Vr||Gg(t,n,u,r,f,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),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=v),o.props=r,o.state=v,o.context=l,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 of(e,t,n,r,s,i)}function of(e,t,n,r,i,s){qx(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&zg(t,n,!1),kr(e,t,s);r=t.stateNode,jC.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=uo(t,e.child,null,s),t.child=uo(t,null,a,s)):kt(e,t,a,s),t.memoizedState=r.state,i&&zg(t,n,!0),t.child}function Wx(e){var t=e.stateNode;t.pendingContext?Fg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fg(e,t.context,!1),Vp(e,t.containerInfo)}function ny(e,t,n,r,i){return lo(),$p(i),t.flags|=256,kt(e,t,n,r),t.child}var af={dehydrated:null,treeContext:null,retryLane:0};function lf(e){return{baseLanes:e,cachePool:null,transitions:null}}function Kx(e,t,n){var r=t.pendingProps,i=Be.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Le(Be,i&1),e===null)return Xh(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,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Nc(o,r,0,null),e=Gi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=lf(n),t.memoizedState=af,e):Zp(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return LC(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=di(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=di(a,s):(s=Gi(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?lf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=af,r}return s=e.child,e=s.sibling,r=di(s,{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 Zp(e,t){return t=Nc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Nl(e,t,n,r){return r!==null&&$p(r),uo(t,e.child,null,n),e=Zp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function LC(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Md(Error(z(422))),Nl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Nc({mode:"visible",children:r.children},i,0,null),s=Gi(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&uo(t,e.child,null,o),t.child.memoizedState=lf(o),t.memoizedState=af,s);if(!(t.mode&1))return Nl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(z(419)),r=Md(s,r,void 0),Nl(e,t,o,r)}if(a=(o&e.childLanes)!==0,jt||a){if(r=ut,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Sr(e,i),In(r,e,i,-1))}return im(),r=Md(Error(z(421))),Nl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=GC.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Wt=ai(i.nextSibling),Gt=t,Ue=!0,An=null,e!==null&&(rn[sn++]=vr,rn[sn++]=wr,rn[sn++]=Yi,vr=e.id,wr=e.overflow,Yi=t),t=Zp(t,r.children),t.flags|=4096,t)}function ry(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ef(e.return,t,n)}function $d(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Gx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(kt(e,t,r.children,n),r=Be.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&&ry(e,n,t);else if(e.tag===19)ry(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(Le(Be,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Vu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$d(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Vu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$d(t,!0,n,null,s);break;case"together":$d(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function du(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function DC(e,t,n){switch(t.tag){case 3:Wx(t),lo();break;case 5:xx(t);break;
vendor: 4,489 bytes, line 40
40case 1:Dt(t.type)&&$u(t);break;case 4:Vp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Le(Uu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(Be,Be.current&1),t.flags|=128,null):n&t.child.childLanes?Kx(e,t,n):(Le(Be,Be.current&1),e=kr(e,t,n),e!==null?e.sibling:null);Le(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Gx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Le(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,Vx(e,t,n)}return kr(e,t,n)}var Jx,uf,Qx,Yx;Jx=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}};uf=function(){};Qx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Fi(er.current);var s=null;switch(n){case"input":i=Ah(e,i),r=Ah(e,r),s=[];break;case"select":i=qe({},i,{value:void 0}),r=qe({},r,{value:void 0}),s=[];break;case"textarea":i=Ih(e,i),r=Ih(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Du)}Lh(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(wa.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(wa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&$e("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Yx=function(e,t,n,r){n!==r&&(t.flags|=4)};function zo(e,t){if(!Ue)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 vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function MC(e,t,n){var r=t.pendingProps;switch(Mp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return Dt(t.type)&&Mu(),vt(t),null;case 3:return r=t.stateNode,co(),Fe(Lt),Fe(bt),Wp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Pl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,An!==null&&(yf(An),An=null))),uf(e,t),vt(t),null;case 5:qp(t);var i=Fi(Na.current);if(n=t.type,e!==null&&t.stateNode!=null)Qx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(z(166));return vt(t),null}if(e=Fi(er.current),Pl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Qn]=t,r[Pa]=s,e=(t.mode&1)!==0,n){case"dialog":$e("cancel",r),$e("close",r);break;case"iframe":case"object":case"embed":$e("load",r);break;case"video":case"audio":for(i=0;i<Yo.length;i++)$e(Yo[i],r);break;case"source":$e("error",r);break;case"img":case"image":case"link":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"input":hg(r,s),$e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},$e("invalid",r);break;case"textarea":pg(r,s),$e("invalid",r)}Lh(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];
vendor: 32,436 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Rl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Rl(r.textContent,a,e),i=["children",""+a]):wa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&$e("scroll",r)}switch(n){case"input":xl(r),fg(r,s,!0);break;case"textarea":xl(r),mg(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Du)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=E0(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[Qn]=t,e[Pa]=r,Jx(e,t,!1,!1),t.stateNode=e;e:{switch(o=Dh(n,r),n){case"dialog":$e("cancel",e),$e("close",e),i=r;break;case"iframe":case"object":case"embed":$e("load",e),i=r;break;case"video":case"audio":for(i=0;i<Yo.length;i++)$e(Yo[i],e);i=r;break;case"source":$e("error",e),i=r;break;case"img":case"image":case"link":$e("error",e),$e("load",e),i=r;break;case"details":$e("toggle",e),i=r;break;case"input":hg(e,r),i=Ah(e,r),$e("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=qe({},r,{value:void 0}),$e("invalid",e);break;case"textarea":pg(e,r),i=Ih(e,r),$e("invalid",e);break;default:i=r}Lh(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?R0(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&C0(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&xa(e,l):typeof l=="number"&&xa(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&$e("scroll",e):l!=null&&_p(e,s,l,o))}switch(n){case"input":xl(e),fg(e,r,!1);break;case"textarea":xl(e),mg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fi(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Fs(e,!!r.multiple,s,!1):r.defaultValue!=null&&Fs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Du)}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 vt(t),null;case 6:if(e&&t.stateNode!=null)Yx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(z(166));if(n=Fi(Na.current),Fi(er.current),Pl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Qn]=t,(s=r.nodeValue!==n)&&(e=Gt,e!==null))switch(e.tag){case 3:Rl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Rl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Qn]=t,t.stateNode=r}return vt(t),null;case 13:if(Fe(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&Wt!==null&&t.mode&1&&!(t.flags&128))mx(),lo(),t.flags|=98560,s=!1;else if(s=Pl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(z(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(z(317));s[Qn]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vt(t),s=!1}else An!==null&&(yf(An),An=null),s=!0;if(!s)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||Be.current&1?it===0&&(it=3):im())),t.updateQueue!==null&&(t.flags|=4),vt(t),null);case 4:return co(),uf(e,t),e===null&&Ta(t.stateNode.containerInfo),vt(t),null;case 10:return Up(t.type._context),vt(t),null;case 17:return Dt(t.type)&&Mu(),vt(t),null;case 19:if(Fe(Be),s=t.memoizedState,s===null)return vt(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)zo(s,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Vu(e),o!==null){for(t.flags|=128,zo(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Le(Be,Be.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ye()>fo&&(t.flags|=128,r=!0,zo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Vu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ue)return vt(t),null}else 2*Ye()-s.renderingStartTime>fo&&n!==1073741824&&(t.flags|=128,r=!0,zo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,n=Be.current,Le(Be,r?n&1|2:n&1),t):(vt(t),null);case 22:case 23:return rm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ht&1073741824&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function $C(e,t){switch(Mp(t),t.tag){case 1:return Dt(t.type)&&Mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return co(),Fe(Lt),Fe(bt),Wp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qp(t),null;case 13:if(Fe(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(Be),null;case 4:return co(),null;case 10:return Up(t.type._context),null;case 22:case 23:return rm(),null;case 24:return null;default:return null}}var Ol=!1,xt=!1,FC=typeof WeakSet=="function"?WeakSet:Set,X=null;function Ds(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function cf(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var iy=!1;function zC(e,t){if(Wh=Iu,e=nx(),Lp(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=o),f===s&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kh={focusedElem:e,selectionRange:n},Iu=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,b=v.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?p:Sn(t.type,p),b);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(S){Qe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return v=iy,iy=!1,v}function ua(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&cf(t,n,s)}i=i.next}while(i!==r)}}function Pc(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 df(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 Zx(e){var t=e.alternate;t!==null&&(e.alternate=null,Zx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qn],delete t[Pa],delete t[Qh],delete t[_C],delete t[SC])),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 Xx(e){return e.tag===5||e.tag===3||e.tag===4}function sy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xx(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 hf(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=Du));else if(r!==4&&(e=e.child,e!==null))for(hf(e,t,n),e=e.sibling;e!==null;)hf(e,t,n),e=e.sibling}function ff(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(ff(e,t,n),e=e.sibling;e!==null;)ff(e,t,n),e=e.sibling}var ht=null,Pn=!1;function Mr(e,t,n){for(n=n.child;n!==null;)eb(e,t,n),n=n.sibling}function eb(e,t,n){if(Xn&&typeof Xn.onCommitFiberUnmount=="function")try{Xn.onCommitFiberUnmount(bc,n)}catch{}switch(n.tag){case 5:xt||Ds(n,t);case 6:var r=ht,i=Pn;ht=null,Mr(e,t,n),ht=r,Pn=i,ht!==null&&(Pn?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(Pn?(e=ht,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),ka(e)):Nd(ht,n.stateNode));break;case 4:r=ht,i=Pn,ht=n.stateNode.containerInfo,Pn=!0,Mr(e,t,n),ht=r,Pn=i;break;case 0:case 11:case 14:case 15:if(!xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&cf(n,t,o),i=i.next}while(i!==r)}Mr(e,t,n);break;case 1:if(!xt&&(Ds(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}Mr(e,t,n);break;case 21:Mr(e,t,n);break;case 22:n.mode&1?(xt=(r=xt)||n.memoizedState!==null,Mr(e,t,n),xt=r):Mr(e,t,n);break;default:Mr(e,t,n)}}function oy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new FC),t.forEach(function(r){var i=JC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:ht=a.stateNode,Pn=!1;break e;case 3:ht=a.stateNode.containerInfo,Pn=!0;break e;case 4:ht=a.stateNode.containerInfo,Pn=!0;break e}a=a.return}if(ht===null)throw Error(z(160));eb(s,o,i),ht=null,Pn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Qe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)tb(t,e),t=t.sibling}function tb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wn(t,e),Un(e),r&4){try{ua(3,e,e.return),Pc(3,e)}catch(p){Qe(e,e.return,p)}try{ua(5,e,e.return)}catch(p){Qe(e,e.return,p)}}break;case 1:wn(t,e),Un(e),r&512&&n!==null&&Ds(n,n.return);break;case 5:if(wn(t,e),Un(e),r&512&&n!==null&&Ds(n,n.return),e.flags&32){var i=e.stateNode;try{xa(i,"")}catch(p){Qe(e,e.return,p)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&S0(i,s),Dh(a,o);var u=Dh(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?R0(i,d):c==="dangerouslySetInnerHTML"?C0(i,d):c==="children"?xa(i,d):_p(i,c,d,u)}switch(a){case"input":Nh(i,s);break;case"textarea":k0(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Fs(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Fs(i,!!s.multiple,s.defaultValue,!0):Fs(i,!!s.multiple,s.multiple?[]:"",!1))}i[Pa]=s}catch(p){Qe(e,e.return,p)}}break;case 6:if(wn(t,e),Un(e),r&4){if(e.stateNode===null)throw Error(z(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(p){Qe(e,e.return,p)}}break;case 3:if(wn(t,e),Un(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch(p){Qe(e,e.return,p)}break;case 4:wn(t,e),Un(e);break;case 13:wn(t,e),Un(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(tm=Ye())),r&4&&oy(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(xt=(u=xt)||c,wn(t,e),xt=u):wn(t,e),Un(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(X=e,c=e.child;c!==null;){for(d=X=c;X!==null;){switch(f=X,h=f.child,f.tag){case 0:case 11:case 14:case 15:ua(4,f,f.return);break;case 1:Ds(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(p){Qe(r,n,p)}}break;case 5:Ds(f,f.return);break;case 22:if(f.memoizedState!==null){ly(d);continue}}h!==null?(h.return=f,X=h):ly(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=T0("display",o))}catch(p){Qe(e,e.return,p)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(p){Qe(e,e.return,p)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:wn(t,e),Un(e),r&4&&oy(e);break;case 21:break;default:wn(t,e),Un(e)}}function Un(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Xx(n)){var r=n;break e}n=n.return}throw Error(z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(xa(i,""),r.flags&=-33);var s=sy(e);ff(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=sy(e);hf(e,a,o);break;default:throw Error(z(161))}}catch(l){Qe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function UC(e,t,n){X=e,nb(e)}function nb(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var i=X,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ol;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||xt;a=Ol;var u=xt;if(Ol=o,(xt=l)&&!u)for(X=i;X!==null;)o=X,l=o.child,o.tag===22&&o.memoizedState!==null?uy(i):l!==null?(l.return=o,X=l):uy(i);for(;s!==null;)X=s,nb(s),s=s.sibling;X=i,Ol=a,xt=u}ay(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,X=s):ay(e)}}function ay(e){for(;X!==null;){var t=X;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xt||Pc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!xt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&qg(t,s,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}qg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.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 c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ka(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}xt||t.flags&512&&df(t)}catch(f){Qe(t,t.return,f)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function ly(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function uy(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Pc(4,t)}catch(l){Qe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Qe(t,i,l)}}var s=t.return;try{df(t)}catch(l){Qe(t,s,l)}break;case 5:var o=t.return;try{df(t)}catch(l){Qe(t,o,l)}}}catch(l){Qe(t,t.return,l)}if(t===e){X=null;break}var a=t.sibling;if(a!==null){a.return=t.return,X=a;break}X=t.return}}var BC=Math.ceil,Ku=Pr.ReactCurrentDispatcher,Xp=Pr.ReactCurrentOwner,ln=Pr.ReactCurrentBatchConfig,Se=0,ut=null,tt=null,ft=0,Ht=0,Ms=_i(0),it=0,La=null,Xi=0,Ac=0,em=0,ca=null,It=null,tm=0,fo=1/0,fr=null,Gu=!1,pf=null,ui=null,Il=!1,ni=null,Ju=0,da=0,mf=null,hu=-1,fu=0;function Ct(){return Se&6?Ye():hu!==-1?hu:hu=Ye()}function ci(e){return e.mode&1?Se&2&&ft!==0?ft&-ft:EC.transition!==null?(fu===0&&(fu=z0()),fu):(e=Ne,e!==0||(e=window.event,e=e===void 0?16:K0(e.type)),e):1}function In(e,t,n,r){if(50<da)throw da=0,mf=null,Error(z(185));nl(e,n,r),(!(Se&2)||e!==ut)&&(e===ut&&(!(Se&2)&&(Ac|=n),it===4&&Kr(e,ft)),Mt(e,r),n===1&&Se===0&&!(t.mode&1)&&(fo=Ye()+500,Cc&&Si()))}function Mt(e,t){var n=e.callbackNode;EE(e,t);var r=Ou(e,e===ut?ft:0);if(r===0)n!==null&&vg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vg(n),t===1)e.tag===0?kC(cy.bind(null,e)):hx(cy.bind(null,e)),xC(function(){!(Se&6)&&Si()}),n=null;else{switch(U0(r)){case 1:n=Tp;break;case 4:n=$0;break;case 16:n=Nu;break;case 536870912:n=F0;break;default:n=Nu}n=cb(n,rb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rb(e,t){if(hu=-1,fu=0,Se&6)throw Error(z(327));var n=e.callbackNode;if(Vs()&&e.callbackNode!==n)return null;var r=Ou(e,e===ut?ft:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Qu(e,r);else{t=r;var i=Se;Se|=2;var s=sb();(ut!==e||ft!==t)&&(fr=null,fo=Ye()+500,Ki(e,t));do try{qC();break}catch(a){ib(e,a)}while(!0);zp(),Ku.current=s,Se=i,tt!==null?t=0:(ut=null,ft=0,t=it)}if(t!==0){if(t===2&&(i=Uh(e),i!==0&&(r=i,t=gf(e,i))),t===1)throw n=La,Ki(e,0),Kr(e,r),Mt(e,Ye()),n;if(t===6)Kr(e,r);else{if(i=e.current.alternate,!(r&30)&&!HC(i)&&(t=Qu(e,r),t===2&&(s=Uh(e),s!==0&&(r=s,t=gf(e,s))),t===1))throw n=La,Ki(e,0),Kr(e,r),Mt(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(z(345));case 2:Ii(e,It,fr);break;case 3:if(Kr(e,r),(r&130023424)===r&&(t=tm+500-Ye(),10<t)){if(Ou(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ct(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jh(Ii.bind(null,e,It,fr),t);break}Ii(e,It,fr);break;case 4:if(Kr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-On(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*BC(r/1960))-r,10<r){e.timeoutHandle=Jh(Ii.bind(null,e,It,fr),r);break}Ii(e,It,fr);break;case 5:Ii(e,It,fr);break;default:throw Error(z(329))}}}return Mt(e,Ye()),e.callbackNode===n?rb.bind(null,e):null}function gf(e,t){var n=ca;return e.current.memoizedState.isDehydrated&&(Ki(e,t).flags|=256),e=Qu(e,t),e!==2&&(t=It,It=n,t!==null&&yf(t)),e}function yf(e){It===null?It=e:It.push.apply(It,e)}function HC(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!Ln(s(),i))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 Kr(e,t){for(t&=~em,t&=~Ac,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-On(t),r=1<<n;e[n]=-1,t&=~r}}function cy(e){if(Se&6)throw Error(z(327));Vs();var t=Ou(e,0);if(!(t&1))return Mt(e,Ye()),null;var n=Qu(e,t);if(e.tag!==0&&n===2){var r=Uh(e);r!==0&&(t=r,n=gf(e,r))}if(n===1)throw n=La,Ki(e,0),Kr(e,t),Mt(e,Ye()),n;if(n===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ii(e,It,fr),Mt(e,Ye()),null}function nm(e,t){var n=Se;Se|=1;try{return e(t)}finally{Se=n,Se===0&&(fo=Ye()+500,Cc&&Si())}}function es(e){ni!==null&&ni.tag===0&&!(Se&6)&&Vs();var t=Se;Se|=1;var n=ln.transition,r=Ne;try{if(ln.transition=null,Ne=1,e)return e()}finally{Ne=r,ln.transition=n,Se=t,!(Se&6)&&Si()}}function rm(){Ht=Ms.current,Fe(Ms)}function Ki(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,wC(n)),tt!==null)for(n=tt.return;n!==null;){var r=n;switch(Mp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Mu();break;case 3:co(),Fe(Lt),Fe(bt),Wp();break;case 5:qp(r);break;case 4:co();break;case 13:Fe(Be);break;case 19:Fe(Be);break;case 10:Up(r.type._context);break;case 22:case 23:rm()}n=n.return}if(ut=e,tt=e=di(e.current,null),ft=Ht=t,it=0,La=null,em=Ac=Xi=0,It=ca=null,$i!==null){for(t=0;t<$i.length;t++)if(n=$i[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}$i=null}return e}function ib(e,t){do{var n=tt;try{if(zp(),uu.current=Wu,qu){for(var r=He.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}qu=!1}if(Zi=0,lt=rt=He=null,la=!1,Oa=0,Xp.current=null,n===null||n.return===null){it=1,La=t,tt=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=ft,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Yg(o);if(h!==null){h.flags&=-257,Zg(h,o,a,s,t),h.mode&1&&Qg(s,u,t),t=h,l=u;var v=t.updateQueue;if(v===null){var p=new Set;p.add(l),t.updateQueue=p}else v.add(l);break e}else{if(!(t&1)){Qg(s,u,t),im();break e}l=Error(z(426))}}else if(Ue&&a.mode&1){var b=Yg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Zg(b,o,a,s,t),$p(ho(l,a));break e}}s=l=ho(l,a),it!==4&&(it=2),ca===null?ca=[s]:ca.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Ux(s,l,t);Vg(s,m);break e;case 1:a=l;var y=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ui===null||!ui.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Bx(s,a,t);Vg(s,S);break e}}s=s.return}while(s!==null)}ab(n)}catch(C){t=C,tt===n&&n!==null&&(tt=n=n.return);continue}break}while(!0)}function sb(){var e=Ku.current;return Ku.current=Wu,e===null?Wu:e}function im(){(it===0||it===3||it===2)&&(it=4),ut===null||!(Xi&268435455)&&!(Ac&268435455)||Kr(ut,ft)}function Qu(e,t){var n=Se;Se|=2;var r=sb();(ut!==e||ft!==t)&&(fr=null,Ki(e,t));do try{VC();break}catch(i){ib(e,i)}while(!0);if(zp(),Se=n,Ku.current=r,tt!==null)throw Error(z(261));return ut=null,ft=0,it}function VC(){for(;tt!==null;)ob(tt)}function qC(){for(;tt!==null&&!gE();)ob(tt)}function ob(e){var t=ub(e.alternate,e,Ht);e.memoizedProps=e.pendingProps,t===null?ab(e):tt=t,Xp.current=null}function ab(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$C(n,t),n!==null){n.flags&=32767,tt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,tt=null;return}}else if(n=MC(n,t,Ht),n!==null){tt=n;return}if(t=t.sibling,t!==null){tt=t;return}tt=t=e}while(t!==null);it===0&&(it=5)}function Ii(e,t,n){var r=Ne,i=ln.transition;try{ln.transition=null,Ne=1,WC(e,t,n,r)}finally{ln.transition=i,Ne=r}return null}function WC(e,t,n,r){do Vs();while(ni!==null);if(Se&6)throw Error(z(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(CE(e,s),e===ut&&(tt=ut=null,ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Il||(Il=!0,cb(Nu,function(){return Vs(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ln.transition,ln.transition=null;var o=Ne;Ne=1;var a=Se;Se|=4,Xp.current=null,zC(e,n),tb(n,e),hC(Kh),Iu=!!Wh,Kh=Wh=null,e.current=n,UC(n),yE(),Se=a,Ne=o,ln.transition=s}else e.current=n;if(Il&&(Il=!1,ni=e,Ju=i),s=e.pendingLanes,s===0&&(ui=null),xE(n.stateNode),Mt(e,Ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Gu)throw Gu=!1,e=pf,pf=null,e;return Ju&1&&e.tag!==0&&Vs(),s=e.pendingLanes,s&1?e===mf?da++:(da=0,mf=e):da=0,Si(),null}function Vs(){if(ni!==null){var e=U0(Ju),t=ln.transition,n=Ne;try{if(ln.transition=null,Ne=16>e?16:e,ni===null)var r=!1;else{if(e=ni,ni=null,Ju=0,Se&6)throw Error(z(331));var i=Se;for(Se|=4,X=e.current;X!==null;){var s=X,o=s.child;if(X.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(X=u;X!==null;){var c=X;switch(c.tag){case 0:case 11:case 15:ua(8,c,s)}var d=c.child;if(d!==null)d.return=c,X=d;else for(;X!==null;){c=X;var f=c.sibling,h=c.return;if(Zx(c),c===u){X=null;break}if(f!==null){f.return=h,X=f;break}X=h}}}var v=s.alternate;if(v!==null){var p=v.child;if(p!==null){v.child=null;do{var b=p.sibling;p.sibling=null,p=b}while(p!==null)}}X=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,X=o;else e:for(;X!==null;){if(s=X,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ua(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,X=m;break e}X=s.return}}var y=e.current;for(X=y;X!==null;){o=X;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,X=w;else e:for(o=y;X!==null;){if(a=X,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pc(9,a)}}catch(C){Qe(a,a.return,C)}if(a===o){X=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,X=S;break e}X=a.return}}if(Se=i,Si(),Xn&&typeof Xn.onPostCommitFiberRoot=="function")try{Xn.onPostCommitFiberRoot(bc,e)}catch{}r=!0}return r}finally{Ne=n,ln.transition=t}}return!1}function dy(e,t,n){t=ho(n,t),t=Ux(e,t,1),e=li(e,t,1),t=Ct(),e!==null&&(nl(e,1,t),Mt(e,t))}function Qe(e,t,n){if(e.tag===3)dy(e,e,n);else for(;t!==null;){if(t.tag===3){dy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ui===null||!ui.has(r))){e=ho(n,e),e=Bx(t,e,1),t=li(t,e,1),e=Ct(),t!==null&&(nl(t,1,e),Mt(t,e));break}}t=t.return}}function KC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ct(),e.pingedLanes|=e.suspendedLanes&n,ut===e&&(ft&n)===n&&(it===4||it===3&&(ft&130023424)===ft&&500>Ye()-tm?Ki(e,0):em|=n),Mt(e,t)}function lb(e,t){t===0&&(e.mode&1?(t=Sl,Sl<<=1,!(Sl&130023424)&&(Sl=4194304)):t=1);var n=Ct();e=Sr(e,t),e!==null&&(nl(e,t,n),Mt(e,n))}function GC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lb(e,n)}function JC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),lb(e,n)}var ub;ub=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,DC(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Ue&&t.flags&1048576&&fx(t,zu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;du(e,t),e=t.pendingProps;var i=ao(t,bt.current);Hs(t,n),i=Gp(null,t,r,e,i,n);var s=Jp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(r)?(s=!0,$u(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Hp(t),i.updater=Rc,t.stateNode=i,i._reactInternals=t,nf(t,r,e,n),t=of(null,t,r,!0,s,n)):(t.tag=0,Ue&&s&&Dp(t),kt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(du(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=YC(r),e=Sn(r,e),i){case 0:t=sf(null,t,r,e,n);break e;case 1:t=ty(null,t,r,e,n);break e;case 11:t=Xg(null,t,r,e,n);break e;case 14:t=ey(null,t,r,Sn(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),sf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),ty(e,t,r,i,n);case 3:e:{if(Wx(t),e===null)throw Error(z(387));r=t.pendingProps,s=t.memoizedState,i=s.element,wx(e,t),Hu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=ho(Error(z(423)),t),t=ny(e,t,r,n,i);break e}else if(r!==i){i=ho(Error(z(424)),t),t=ny(e,t,r,n,i);break e}else for(Wt=ai(t.stateNode.containerInfo.firstChild),Gt=t,Ue=!0,An=null,n=yx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lo(),r===i){t=kr(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 5:return xx(t),e===null&&Xh(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Gh(r,i)?o=null:s!==null&&Gh(r,s)&&(t.flags|=32),qx(e,t),kt(e,t,o,n),t.child;case 6:return e===null&&Xh(t),null;case 13:return Kx(e,t,n);case 4:return Vp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):kt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Xg(e,t,r,i,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Le(Uu,r._currentValue),r._currentValue=o,s!==null)if(Ln(s.value,o)){if(s.children===i.children&&!Lt.current){t=kr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=xr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ef(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(z(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ef(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}kt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hs(t,n),i=un(i),r=r(i),t.flags|=1,kt(e,t,r,n),t.child;case 14:return r=t.type,i=Sn(r,t.pendingProps),i=Sn(r.type,i),ey(e,t,r,i,n);case 15:return Hx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),du(e,t),t.tag=1,Dt(r)?(e=!0,$u(t)):e=!1,Hs(t,n),zx(t,r,i),nf(t,r,i,n),of(null,t,r,!0,e,n);case 19:return Gx(e,t,n);case 22:return Vx(e,t,n)}throw Error(z(156,t.tag))};function cb(e,t){return M0(e,t)}function QC(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 an(e,t,n,r){return new QC(e,t,n,r)}function sm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YC(e){if(typeof e=="function")return sm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kp)return 11;if(e===Ep)return 14}return 2}function di(e,t){var n=e.alternate;return n===null?(n=an(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: 5,820 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 pu(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")sm(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ts:return Gi(n.children,i,s,t);case Sp:o=8,i|=8;break;case Ch:return e=an(12,n,t,i|2),e.elementType=Ch,e.lanes=s,e;case Th:return e=an(13,n,t,i),e.elementType=Th,e.lanes=s,e;case Rh:return e=an(19,n,t,i),e.elementType=Rh,e.lanes=s,e;case x0:return Nc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v0:o=10;break e;case w0:o=9;break e;case kp:o=11;break e;case Ep:o=14;break e;case Hr:o=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=an(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Gi(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Nc(e,t,n,r){return e=an(22,e,r,t),e.elementType=x0,e.lanes=n,e.stateNode={isHidden:!1},e}function Fd(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function zd(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ZC(e,t,n,r,i){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=xd(0),this.expirationTimes=xd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function om(e,t,n,r,i,s,o,a,l){return e=new ZC(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=an(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Hp(s),e}function XC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function db(e){if(!e)return pi;e=e._reactInternals;e:{if(os(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var n=e.type;if(Dt(n))return dx(e,n,t)}return t}function hb(e,t,n,r,i,s,o,a,l){return e=om(n,r,!0,e,i,s,o,a,l),e.context=db(null),n=e.current,r=Ct(),i=ci(n),s=xr(r,i),s.callback=t??null,li(n,s,i),e.current.lanes=i,nl(e,i,r),Mt(e,r),e}function Oc(e,t,n,r){var i=t.current,s=Ct(),o=ci(i);return n=db(n),t.context===null?t.context=n:t.pendingContext=n,t=xr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=li(i,t,o),e!==null&&(In(e,i,o,s),lu(e,i,o)),o}function Yu(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 hy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function am(e,t){hy(e,t),(e=e.alternate)&&hy(e,t)}function eT(){return null}var fb=typeof reportError=="function"?reportError:function(e){console.error(e)};function lm(e){this._internalRoot=e}Ic.prototype.render=lm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));Oc(e,t,null,null)};Ic.prototype.unmount=lm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;es(function(){Oc(null,e,null,null)}),t[_r]=null}};function Ic(e){this._internalRoot=e}Ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=V0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wr.length&&t!==0&&t<Wr[n].priority;n++);Wr.splice(n,0,e),n===0&&W0(e)}};function um(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fy(){}function tT(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Yu(o);s.call(u)}}var o=hb(t,r,e,0,null,!1,!1,"",fy);return e._reactRootContainer=o,e[_r]=o.current,Ta(e.nodeType===8?e.parentNode:e),es(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Yu(l);a.call(u)}}var l=om(e,0,!1,null,null,!1,!1,"",fy);return e._reactRootContainer=l,e[_r]=l.current,Ta(e.nodeType===8?e.parentNode:e),es(function(){Oc(t,l,n,r)}),l}function Lc(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=Yu(o);a.call(l)}}Oc(t,o,e,i)}else o=tT(n,t,e,i,r);return Yu(o)}B0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qo(t.pendingLanes);n!==0&&(Rp(t,n|1),Mt(t,Ye()),!(Se&6)&&(fo=Ye()+500,Si()))}break;case 13:es(function(){var r=Sr(e,1);if(r!==null){var i=Ct();In(r,e,1,i)}}),am(e,1)}};Pp=function(e){if(e.tag===13){var t=Sr(e,134217728);if(t!==null){var n=Ct();In(t,e,134217728,n)}am(e,134217728)}};H0=function(e){if(e.tag===13){var t=ci(e),n=Sr(e,t);if(n!==null){var r=Ct();In(n,e,t,r)}am(e,t)}};V0=function(){return Ne};q0=function(e,t){var n=Ne;try{return Ne=e,t()}finally{Ne=n}};$h=function(e,t,n){switch(t){case"input":if(Nh(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 i=Ec(r);
40if(!i)throw Error(z(90));_0(r),Nh(r,i)}}}break;case"textarea":k0(e,n);break;case"select":t=n.value,t!=null&&Fs(e,!!n.multiple,t,!1)}};N0=nm;O0=es;var nT={usingClientEntryPoint:!1,Events:[il,Ns,Ec,P0,A0,nm]},Uo={findFiberByHostInstance:Mi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rT={bundleType:Uo.bundleType,version:Uo.version,rendererPackageName:Uo.rendererPackageName,rendererConfig:Uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=L0(e),e===null?null:e.stateNode},findFiberByHostInstance:Uo.findFiberByHostInstance||eT,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 jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jl.isDisabled&&jl.supportsFiber)try{bc=jl.inject(rT),Xn=jl}catch{}}Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nT;Zt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!um(t))throw Error(z(200));return XC(e,t,null,n)};Zt.createRoot=function(e,t){if(!um(e))throw Error(z(299));var n=!1,r="",i=fb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=om(e,1,!1,null,null,n,!1,r,i),e[_r]=t.current,Ta(e.nodeType===8?e.parentNode:e),new lm(t)};Zt.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(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=L0(t),e=e===null?null:e.stateNode,e};Zt.flushSync=function(e){return es(e)};Zt.hydrate=function(e,t,n){if(!jc(t))throw Error(z(200));return Lc(null,e,t,!0,n)};Zt.hydrateRoot=function(e,t,n){if(!um(e))throw Error(z(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=fb;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=hb(t,null,e,1,n??null,i,!1,s,o),e[_r]=t.current,Ta(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ic(t)};Zt.render=function(e,t,n){if(!jc(t))throw Error(z(200));return Lc(null,e,t,!1,n)};Zt.unmountComponentAtNode=function(e){if(!jc(e))throw Error(z(40));return e._reactRootContainer?(es(function(){Lc(null,null,e,!1,function(){e._reactRootContainer=null,e[_r]=null})}),!0):!1};Zt.unstable_batchedUpdates=nm;Zt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!jc(n))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return Lc(e,t,n,!1,r)};Zt.version="18.3.1-next-f1338f8080-20240426";function pb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pb)}catch(e){console.error(e)}}pb(),p0.exports=Zt;var as=p0.exports;const mb=wc(as);var gb,py=as;gb=py.createRoot,py.hydrateRoot;const iT=1,sT=1e6;let Ud=0;function oT(){return Ud=(Ud+1)%Number.MAX_SAFE_INTEGER,Ud.toString()}const Bd=new Map,my=e=>{if(Bd.has(e))return;const t=setTimeout(()=>{Bd.delete(e),ha({type:"REMOVE_TOAST",toastId:e})},sT);Bd.set(e,t)},aT=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,iT)};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?my(n):e.toasts.forEach(r=>{my(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)}}},mu=[];let gu={toasts:[]};function ha(e){gu=aT(gu,e),mu.forEach(t=>{t(gu)})}function lT({...e}){const t=oT(),n=i=>ha({type:"UPDATE_TOAST",toast:{...i,id:t}}
vendor: 13,266 bytes, line 40
40),r=()=>ha({type:"DISMISS_TOAST",toastId:t});return ha({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function yb(){const[e,t]=x.useState(gu);return x.useEffect(()=>(mu.push(t),()=>{const n=mu.indexOf(t);n>-1&&mu.splice(n,1)}),[e]),{...e,toast:lT,dismiss:n=>ha({type:"DISMISS_TOAST",toastId:n})}}function oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function gy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vb(...e){return t=>{let n=!1;const r=e.map(i=>{const s=gy(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():gy(e[i],null)}}}}function We(...e){return x.useCallback(vb(...e),e)}function ls(e,t=[]){let n=[];function r(s,o){const a=x.createContext(o),l=n.length;n=[...n,o];const u=d=>{var m;const{scope:f,children:h,...v}=d,p=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=x.useMemo(()=>v,Object.values(v));return g.jsx(p.Provider,{value:b,children:h})};u.displayName=s+"Provider";function c(d,f){var p;const h=((p=f==null?void 0:f[e])==null?void 0:p[l])||a,v=x.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,uT(i,...t)]}function uT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Da(e){const t=dT(e),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(fT);if(l){const u=l.props.children,c=a.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return g.jsx(t,{...o,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,c):null})}return g.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var cT=Da("Slot");function dT(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=mT(i),a=pT(s,i.props);return i.type!==x.Fragment&&(a.ref=r?vb(r,o):o),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wb=Symbol("radix.slottable");function hT(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=wb,t}function fT(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wb}function pT(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function mT(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function cm(e){const t=e+"CollectionProvider",[n,r]=ls(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:b,children:m}=p,y=K.useRef(null),w=K.useRef(new Map).current;return g.jsx(i,{scope:b,itemMap:w,collectionRef:y,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=Da(a),u=K.forwardRef((p,b)=>{const{scope:m,children:y}=p,w=s(a,m),S=We(b,w.collectionRef);return g.jsx(l,{ref:S,children:y})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Da(c),h=K.forwardRef((p,b)=>{const{scope:m,children:y,...w}=p,S=K.useRef(null),C=We(b,S),k=s(c,m);return K.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),g.jsx(f,{[d]:"",ref:C,children:y})});h.displayName=c;function v(p){const b=s(e+"CollectionConsumer",p);return K.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((k,T)=>w.indexOf(k.ref.current)-w.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},v,r]}var gT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=gT.reduce((e,t)=>{const n=Da(`Primitive.${t}`),r=x.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xb(e,t){e&&as.flushSync(()=>e.dispatchEvent(t))}function dn(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 yT(e,t=globalThis==null?void 0:globalThis.document){const n=dn(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vT="DismissableLayer",vf="dismissableLayer.update",wT="dismissableLayer.pointerDownOutside",xT="dismissableLayer.focusOutside",yy,bb=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dc=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=x.useContext(bb),[c,d]=x.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),v=We(t,T=>d(T)),p=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=p.indexOf(b),y=c?p.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=m,C=_T(T=>{const R=T.target,P=[...u.branches].some(O=>O.contains(R));!S||P||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},f),k=ST(T=>{const R=T.target;[...u.branches].some(O=>O.contains(R))||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},f);return yT(T=>{y===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},f),x.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(yy=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),vy(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=yy)}},[c,f,n,u]),x.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),vy())},[c,u]),x.useEffect(()=>{const T=()=>h({});return document.addEventListener(vf,T),()=>document.removeEventListener(vf,T)},[]),g.jsx(be.div,{...l,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,k.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,C.onPointerDownCapture)})});Dc.displayName=vT;var bT="DismissableLayerBranch",_b=x.forwardRef((e,t)=>{const n=x.useContext(bb),r=x.useRef(null),i=We(t,r);return x.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(be.div,{...e,ref:i})});_b.displayName=bT;function _T(e,t=globalThis==null?void 0:globalThis.document){const n=dn(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Sb(wT,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ST(e,t=globalThis==null?void 0:globalThis.document){const n=dn(e),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&Sb(xT,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vy(){const e=new CustomEvent(vf);document.dispatchEvent(e)}function Sb(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xb(i,s):i.dispatchEvent(s)}var kT=Dc,ET=_b,mt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},CT="Portal",dm=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,s]=x.useState(!1);mt(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?mb.createPortal(g.jsx(be.div,{...r,ref:t}),o):null});dm.displayName=CT;function TT(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Mc=e=>{const{present:t,children:n}=e,r=RT(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),s=We(r.ref,PT(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};Mc.displayName="Presence";function RT(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),o=e?"mounted":"unmounted",[a,l]=TT(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=Ll(r.current);s.current=a==="mounted"?u:"none"},[a]),mt(()=>{const u=r.current,c=i.current;if(c!==e){const f=s.current,h=Ll(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mt(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const p=Ll(r.current).includes(h.animationName);if(h.target===t&&p&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=h=>{h.target===t&&(s.current=Ll(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ll(e){return(e==null?void 0:e.animationName)||"none"}function PT(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var AT=h0[" useInsertionEffect ".trim().toString()]||mt;function Ma({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,o]=NT({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const c=x.useRef(e!==void 0);x.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"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.`),c.current=a},[a,r])}const u=x.useCallback(c=>{var d;if(a){const f=OT(c)?c(e):c;f!==e&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,e,s,o]);return[l,u]}function NT({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),s=x.useRef(t);return AT(()=>{s.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function OT(e){return typeof e=="function"}var kb=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"}),IT="VisuallyHidden",$c=x.forwardRef((e,t)=>g.jsx(be.span,{...e,ref:t,style:{...kb,...e.style}}));$c.displayName=IT;var jT=$c,hm="ToastProvider",[fm,LT,DT]=cm("Toast"),[Eb,IU]=ls("Toast",[DT]),[MT,Fc]=Eb(hm),Cb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=x.useState(null),[u,c]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),g.jsx(fm.Provider,{scope:t,children:g.jsx(MT,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>c(h=>h+1),[]),onToastRemove:x.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Cb.displayName=hm;var Tb="ToastViewport",$T=["F8"],wf="toast.viewportPause",xf="toast.viewportResume",Rb=x.forwardRef((e,t)=>
40{const{__scopeToast:n,hotkey:r=$T,label:i="Notifications ({hotkey})",...s}=e,o=Fc(Tb,n),a=LT(n),l=x.useRef(null),u=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=We(t,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;x.useEffect(()=>{const b=m=>{var w;r.length!==0&&r.every(S=>m[S]||m.code===S)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),x.useEffect(()=>{const b=l.current,m=d.current;if(v&&b&&m){const y=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(wf);m.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(xf);m.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&w()},C=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",y),b.addEventListener("focusout",S),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",w)}}},[v,o.isClosePausedRef]);const p=x.useCallback(({tabbingDirection:b})=>{const y=a().map(w=>{const S=w.ref.current,C=[S,...YT(S)];return b==="forwards"?C:C.reverse()});return(b==="forwards"?y.reverse():y).flat()},[a]);return x.useEffect(()=>{const b=d.current;if(b){const m=y=>{var C,k,T;const w=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!w){const R=document.activeElement,P=y.shiftKey;if(y.target===b&&P){(C=u.current)==null||C.focus();return}const A=p({tabbingDirection:P?"backwards":"forwards"}),V=A.findIndex(M=>M===R);Hd(A.slice(V+1))?y.preventDefault():P?(k=u.current)==null||k.focus():(T=c.current)==null||T.focus()}};return b.addEventListener("keydown",m),()=>b.removeEventListener("keydown",m)}},[a,p]),g.jsxs(ET,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&g.jsx(bf,{ref:u,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"forwards"});Hd(b)}}),g.jsx(fm.Slot,{scope:n,children:g.jsx(be.ol,{tabIndex:-1,...s,ref:f})}),v&&g.jsx(bf,{ref:c,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"backwards"});Hd(b)}})]})});Rb.displayName=Tb;var Pb="ToastFocusProxy",bf=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Fc(Pb,n);return g.jsx($c,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});bf.displayName=Pb;var ol="Toast",FT="toast.swipeStart",zT="toast.swipeMove",UT="toast.swipeCancel",BT="toast.swipeEnd",Ab=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=Ma({prop:r,defaultProp:i??!0,onChange:s,caller:ol});return g.jsx(Mc,{present:n||a,children:g.jsx(qT,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:dn(e.onPause),onResume:dn(e.onResume),onSwipeStart:oe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:oe(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:oe(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:oe(e.onSwipeEnd,u=>{const{x:c,y:d}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Ab.displayName=ol;
40var[HT,VT]=Eb(ol,{onClose(){}}),qT=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...v}=e,p=Fc(ol,n),[b,m]=x.useState(null),y=We(t,M=>m(M)),w=x.useRef(null),S=x.useRef(null),C=i||p.duration,k=x.useRef(0),T=x.useRef(C),R=x.useRef(0),{onToastAdd:P,onToastRemove:O}=p,L=dn(()=>{var $;(b==null?void 0:b.contains(document.activeElement))&&(($=p.viewport)==null||$.focus()),o()}),A=x.useCallback(M=>{!M||M===1/0||(window.clearTimeout(R.current),k.current=new Date().getTime(),R.current=window.setTimeout(L,M))},[L]);x.useEffect(()=>{const M=p.viewport;if(M){const $=()=>{A(T.current),u==null||u()},U=()=>{const Q=new Date().getTime()-k.current;T.current=T.current-Q,window.clearTimeout(R.current),l==null||l()};return M.addEventListener(wf,U),M.addEventListener(xf,$),()=>{M.removeEventListener(wf,U),M.removeEventListener(xf,$)}}},[p.viewport,C,l,u,A]),x.useEffect(()=>{s&&!p.isClosePausedRef.current&&A(C)},[s,C,p.isClosePausedRef,A]),x.useEffect(()=>(P(),()=>O()),[P,O]);const V=x.useMemo(()=>b?Mb(b):null,[b]);return p.viewport?g.jsxs(g.Fragment,{children:[V&&g.jsx(WT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),g.jsx(HT,{scope:n,onClose:L,children:as.createPortal(g.jsx(fm.ItemSlot,{scope:n,children:g.jsx(kT,{asChild:!0,onEscapeKeyDown:oe(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(be.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:oe(e.onKeyDown,M=>{M.key==="Escape"&&(a==null||a(M.nativeEvent),M.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:oe(e.onPointerDown,M=>{M.button===0&&(w.current={x:M.clientX,y:M.clientY})}),onPointerMove:oe(e.onPointerMove,M=>{if(!w.current)return;const $=M.clientX-w.current.x,U=M.clientY-w.current.y,Q=!!S.current,N=["left","right"].includes(p.swipeDirection),j=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,_=N?j(0,$):0,F=N?0:j(0,U),q=M.pointerType==="touch"?10:2,E={x:_,y:F},Z={originalEvent:M,delta:E};Q?(S.current=E,Dl(zT,d,Z,{discrete:!1})):wy(E,p.swipeDirection,q)?(S.current=E,Dl(FT,c,Z,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs($)>q||Math.abs(U)>q)&&(w.current=null)}),onPointerUp:oe(e.onPointerUp,M=>{const $=S.current,U=M.target;if(U.hasPointerCapture(M.pointerId)&&U.releasePointerCapture(M.pointerId),S.current=null,w.current=null,$){const Q=M.currentTarget,N={originalEvent:M,delta:$};wy($,p.swipeDirection,p.swipeThreshold)?Dl(BT,h,N,{discrete:!0}):Dl(UT,f,N,{discrete:!0}),Q.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),WT=e=>{const{__scopeToast:t,children:n,...r}=e,i=Fc(ol,t),[s,o]=x.useState(!1),[a,l]=x.useState(!1);return JT(()=>o(!0)),x.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:g.jsx(dm,{asChild:!0,children:g.jsx($c,{...r,children:s&&g.jsxs(g.Fragment,{children:[i.label," ",n]})})})},KT="ToastTitle",Nb=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(be.div,{...r,ref:t})});Nb.displayName=KT;var GT="ToastDescription",Ob=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return g.jsx(be.div,{...r,ref:t})});Ob.displayName=GT;var Ib="ToastAction",jb=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?g.jsx(Db,{altText:n,asChild:!0,children:g.jsx(pm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ib}\`. Expected non-empty \`string\`.`),null)});jb.displayName=Ib;var Lb="ToastClose",pm=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=VT(Lb,n);return g.jsx(Db,{asChild:!0,children:g.jsx(be.button,{type:"button",...r,ref:t,onClick:oe(e.onClick,i.onClose)})})});pm.displayName=Lb;var Db=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return g.jsx(be.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Mb(e){const t=[];
vendor: 4,928 bytes, lines 40-80
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),QT(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Mb(r))}}),t}function Dl(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xb(i,s):i.dispatchEvent(s)}var wy=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function JT(e=()=>{}){const t=dn(e);mt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function QT(e){return e.nodeType===e.ELEMENT_NODE}function YT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ZT=Cb,$b=Rb,Fb=Ab,zb=Nb,Ub=Ob,Bb=jb,Hb=pm;function Vb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Vb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qb(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vb(e))&&(r&&(r+=" "),r+=t);return r}const xy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,by=qb,mm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return by(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=xy(c)||xy(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(v=>{let[p,b]=v;return Array.isArray(b)?b.includes({...s,...a}[p]):{...s,...a}[p]===b})?[...u,d,f]:u},[]);return by(e,o,l,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 XT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wb=(...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 eR={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 tR=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...eR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wb("lucide",i),...a},[...o.map(([u,c])=>x.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
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 zc=(e,t)=>{const n=x.forwardRef(({className:r,...i},s)=>x.createElement(tR,{ref:s,iconNode:t,className:Wb(`lucide-${XT(e)}`,r),...i}));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 nR=zc("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 Kb=zc("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 rR=zc("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 iR=zc("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,256 bytes, line 80
80],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gm="-",sR=e=>{const t=aR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(gm);return a[0]===""&&a.length!==1&&a.shift(),Gb(a,t)||oR(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Gb=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Gb(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(gm);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},_y=/^\[(.+)\]$/,oR=e=>{if(_y.test(e)){const t=_y.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aR=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return uR(Object.entries(e.classGroups),n).forEach(([s,o])=>{_f(o,r,s,t)}),r},_f=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Sy(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(lR(i)){_f(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{_f(o,Sy(t,s),n,r)})})},Sy=(e,t)=>{let n=e;return t.split(gm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lR=e=>e.isThemeGetter,uR=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,cR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},Jb="!",dR=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let b=0;b<a.length;b++){let m=a[b];if(u===0){if(m===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(c,b)),c=b+s;continue}if(m==="/"){d=b;continue}}m==="["?u++:m==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(Jb),v=h?f.substring(1):f,p=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:p}};return n?a=>n({className:a,parseClassName:o}):o},hR=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},fR=e=>({cache:cR(e.cacheSize),parseClassName:dR(e),...sR(e)}),pR=/\s+/,mR=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(pR);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let v=!!h,p=r(v?f.substring(0,h):f);if(!p){if(!v){a=u+(a.length>0?" "+a:a);continue}if(p=r(f),!p){a=u+(a.length>0?" "+a:a);continue}v=!1}const b=hR(c).join(":"),m=d?b+Jb:b,y=m+p;if(s.includes(y))continue;s.push(y);const w=i(p,v);for(let S=0;S<w.length;++S){const C=w[S];s.push(m+C)}a=u+(a.length>0?" "+a:a)}return a};function gR(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qb(t))&&(r&&(r+=" "),r+=n);return r}const Qb=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qb(e[r]))&&(n&&(n+=" "),n+=t);return n};function yR(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=fR(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=mR(l,n);return i(l,c),c}return function(){return s(gR.apply(null,arguments))}}const Me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yb=/^\[(?:([a-z-]+):)?(.+)\]$/i,vR=/^\d+\/\d+$/,wR=new Set(["px","full","screen"]),xR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bR=/\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$/,_R=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=e=>qs(e)||wR.has(e)||vR.test(e),$r=e=>ko(e,"length",OR),qs=e=>!!e&&!Number.isNaN(Number(e)),Vd=e=>ko(e,"number",qs),Bo=e=>!!e&&Number.isInteger(Number(e)),ER=e=>e.endsWith("%")&&qs(e.slice(0,-1)),fe=e=>Yb.test(e),Fr=e=>xR.test(e),CR=new Set(["length","size","percentage"]),TR=e=>ko(e,CR,Zb),RR=e=>ko(e,"position",Zb),PR=new Set(["image","url"]),AR=e=>ko(e,PR,jR),NR=e=>ko(e,"",IR),Ho=()=>!0,ko=(e,t,n)=>{const r=Yb.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},OR=e=>bR.test(e)&&!_R.test(e),Zb=()=>!1,IR=e=>SR.test(e),jR=e=>kR.test(e),LR=()=>{const e=Me("colors"),t=Me("spacing"),n=Me("blur"),r=Me("brightness"),i=Me("borderColor"),s=Me("borderRadius"),o=Me("borderSpacing"),a=Me("borderWidth"),l=Me("contrast"),u=Me("grayscale"),c=Me("hueRotate"),d=Me("invert"),f=Me("gap"),h=Me("gradientColorStops"),v=Me("gradientColorStopPositions"),p=Me("inset"),b=Me("margin"),m=Me("opacity"),y=Me("padding"),w=Me("saturate"),S=Me("scale"),C=Me("sepia"),k=Me("skew"),T=Me("space"),R=Me("translate"),P=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",fe,t],A=()=>[fe,t],V=()=>["",ur,$r],M=()=>["auto",qs,fe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],Q=()=>["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"],j=()=>["","0",fe],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[qs,fe];return{cacheSize:500,separator:":",theme:{colors:[Ho],spacing:[ur,$r],blur:["none","",Fr,fe],brightness:F(),borderColor:[e],borderRadius:["none","","full",Fr,fe],borderSpacing:A(),borderWidth:V(),contrast:F(),grayscale:j(),hueRotate:F(),invert:j(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ER,$r],inset:L(),margin:L(),opacity:F(),padding:A(),saturate:F(),scale:F(),sepia:j(),skew:F(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Fr]}],"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:[...$(),fe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bo,fe]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Bo,fe]}],"grid-cols":[{"grid-cols":[Ho]}],"col-start-end":[{col:["auto",{span:["full",Bo,fe]},fe]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Ho]}],"row-start-end":[{row:["auto",{span:[Bo,fe]},fe]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],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:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Fr]},Fr]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fr,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Vd]}],"font-family":[{font:[Ho]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",qs,Vd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,$r]}],"underline-offset":[{"underline-offset":["auto",ur,fe]}],"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",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),RR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 5,180 bytes, line 80
80],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:U()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[ur,fe]}],"outline-w":[{outline:[ur,$r]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ur,$r]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fr,NR]}],"shadow-color":[{shadow:[Ho]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Fr,fe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"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",fe]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Bo,fe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],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",fe]}],"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,647 bytes, line 80
80],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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ur,$r,Vd]}],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"]}}},DR=yR(LR);function Re(...e){return DR(qb(e))}const MR=ZT,Xb=x.forwardRef(({className:e,...t},n)=>g.jsx($b,{ref:n,className:Re("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}));Xb.displayName=$b.displayName;const $R=mm("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"}}),e_=x.forwardRef(({className:e,variant:t,...n},r)=>g.jsx(Fb,{ref:r,className:Re($R({variant:t}),e),...n}));e_.displayName=Fb.displayName;const FR=x.forwardRef(({className:e,...t},n)=>g.jsx(Bb,{ref:n,className:Re("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}));FR.displayName=Bb.displayName;const t_=x.forwardRef(({className:e,...t},n)=>g.jsx(Hb,{ref:n,className:Re("absolute right-2 top-2 rounded-md p-1 text-foreground
80/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:g.jsx(iR,{className:"h-4 w-4"})}));t_.displayName=Hb.displayName;const n_=x.forwardRef(({className:e,...t},n)=>g.jsx(zb,{ref:n,className:Re("text-sm font-semibold",e),...t}));n_.displayName=zb.displayName;const r_=x.forwardRef(({className:e,...t},n)=>g.jsx(Ub,{ref:n,className:Re("text-sm opacity-90",e),...t}));r_.displayName=Ub.displayName;function zR(){const{toasts:e}=yb();return g.jsxs(MR,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return g.jsxs(e_,{...s,children:[g.jsxs("div",{className:"grid gap-1",children:[n&&g.jsx(n_,{children:n}),r&&g.jsx(r_,{children:r})]}),i,g.jsx(t_,{})]},t)}),g.jsx(Xb,{})]})}var ky=["light","dark"],UR="(prefers-color-scheme: dark)",BR=x.createContext(void 0),HR={setTheme:e=>{},themes:[]},VR=()=>{var e;return(e=x.useContext(BR))!=null?e:HR};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:o,attrs:a,nonce:l})=>{let u=s==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;
80${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?ky.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,p=!1,b=!0)=>{let m=o?o[v]:v,y=p?v+"|| ''":`'${m}'`,w="";return i&&b&&!p&&ky.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),n==="class"?p||m?w+=`c.add(${y})`:w+="null":m&&(w+=`d[s](n,${y})`),w},h=e?`!function(){${c}${f(e)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${UR}',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(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(s,!1,!1)};}${d}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var qR=e=>{switch(e){case"success":return GR;case"info":return QR;case"warning":return JR;case"error":return YR;default:return null}},WR=Array(12).fill(0),KR=({visible:e,className:t})=>K.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},K.createElement("div",{className:"sonner-spinner"},WR.map((n,r)=>K.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),GR=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),JR=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},K.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"})),QR=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),YR=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),ZR=K.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"},K.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),K.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),XR=()=>{let[e,t]=K.useState(document.hidden);return K.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Sf=1,eP=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,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Sf++,s=this.toasts.find(a=>a.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...e,id:i,title:n}),{...a,...e,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>
80(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)=>this.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(),i=n!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],K.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(nP(l)&&!l.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:c})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>o.then(()=>s[0]==="reject"?u(s[1]):l(s[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)||Sf++;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}},Ot=new eP,tP=(e,t)=>{let n=(t==null?void 0:t.id)||Sf++;return Ot.addToast({title:e,...t,id:n}),n},nP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",rP=tP,iP=()=>Ot.toasts,sP=()=>Ot.getActiveToasts(),xs=Object.assign(rP,{success:Ot.success,info:Ot.info,warning:Ot.warning,error:Ot.error,custom:Ot.custom,message:Ot.message,promise:Ot.promise,dismiss:Ot.dismiss,loading:Ot.loading},{getHistory:iP,getToasts:sP});function oP(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))}oP(`: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;
80left: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}
80: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%);
80--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%)}
81`);function Ml(e){return e.label!==void 0}var aP=3,lP="32px",uP="16px",Ey=4e3,cP=356,dP=14,hP=20,fP=200;function xn(...e){return e.filter(Boolean).join(" ")}function pP(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var mP=e=>{var t,n,r,i,s,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:v,interacting:p,setHeights:b,visibleToasts:m,heights:y,index:w,toasts:S,expanded:C,removeToast:k,defaultRichColors:T,closeButton:R,style:P,cancelButtonStyle:O,actionButtonStyle:L,className:A="",descriptionClassName:V="",duration:M,position:$,gap:U,loadingIcon:Q,expandByDefault:N,classNames:j,icons:_,closeButtonAriaLabel:F="Close toast",pauseWhenPageIsHidden:q}=e,[E,Z]=K.useState(null),[ae,he]=K.useState(null),[G,ge]=K.useState(!1),[Ae,ye]=K.useState(!1),[me,_e]=K.useState(!1),[st,Pt]=K.useState(!1),[$n,pn]=K.useState(!1),[Fn,Ti]=K.useState(0),[ar,Io]=K.useState(0),Ri=K.useRef(h.duration||M||Ey),gl=K.useRef(null),lr=K.useRef(null),dd=w===0,hd=w+1<=m,I=h.type,W=h.dismissible!==!1,se=h.className||"",we=h.descriptionClassName||"",Ee=K.useMemo(()=>y.findIndex(ce=>ce.toastId===h.id)||0,[y,h.id]),zt=K.useMemo(()=>{var ce;return(ce=h.closeButton)!=null?ce:R},[h.closeButton,R]),zn=K.useMemo(()=>h.duration||M||Ey,[h.duration,M]),Ut=K.useRef(0),en=K.useRef(0),Or=K.useRef(0),Ze=K.useRef(null),[Ir,mn]=$.split("-"),rg=K.useMemo(()=>y.reduce((ce,Oe,ze)=>ze>=Ee?ce:ce+Oe.height,0),[y,Ee]),ig=XR(),A1=h.invert||f,fd=I==="loading";en.current=K.useMemo(()=>Ee*U+rg,[Ee,rg]),K.useEffect(()=>{Ri.current=zn},[zn]),K.useEffect(()=>{ge(!0)},[]),K.useEffect(()=>{let ce=lr.current;if(ce){let Oe=ce.getBoundingClientRect().height;return Io(Oe),b(ze=>[{toastId:h.id,height:Oe,position:h.position},...ze]),()=>b(ze=>ze.filter(gn=>gn.toastId!==h.id))}},[b,h.id]),K.useLayoutEffect(()=>{if(!G)return;let ce=lr.current,Oe=ce.style.height;ce.style.height="auto";let ze=ce.getBoundingClientRect().height;ce.style.height=Oe,Io(ze),b(gn=>gn.find(yn=>yn.toastId===h.id)?gn.map(yn=>yn.toastId===h.id?{...yn,height:ze}:yn):[{toastId:h.id,height:ze,position:h.position},...gn])},[G,h.title,h.description,b,h.id]);let jr=K.useCallback(()=>{ye(!0),Ti(en.current),b(ce=>ce.filter(Oe=>Oe.toastId!==h.id)),setTimeout(()=>{k(h)},fP)},[h,k,b,en]);K.useEffect(()=>{if(h.promise&&I==="loading"||h.duration===1/0||h.type==="loading")return;let ce;return C||p||q&&ig?(()=>
81{if(Or.current<Ut.current){let Oe=new Date().getTime()-Ut.current;Ri.current=Ri.current-Oe}Or.current=new Date().getTime()})():Ri.current!==1/0&&(Ut.current=new Date().getTime(),ce=setTimeout(()=>{var Oe;(Oe=h.onAutoClose)==null||Oe.call(h,h),jr()},Ri.current)),()=>clearTimeout(ce)},[C,p,h,I,q,ig,jr]),K.useEffect(()=>{h.delete&&jr()},[jr,h.delete]);function N1(){var ce,Oe,ze;return _!=null&&_.loading?K.createElement("div",{className:xn(j==null?void 0:j.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":I==="loading"},_.loading):Q?K.createElement("div",{className:xn(j==null?void 0:j.loader,(Oe=h==null?void 0:h.classNames)==null?void 0:Oe.loader,"sonner-loader"),"data-visible":I==="loading"},Q):K.createElement(KR,{className:xn(j==null?void 0:j.loader,(ze=h==null?void 0:h.classNames)==null?void 0:ze.loader),visible:I==="loading"})}return K.createElement("li",{tabIndex:0,ref:lr,className:xn(A,se,j==null?void 0:j.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[I],(n=h==null?void 0:h.classNames)==null?void 0:n[I]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:T,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":G,"data-promise":!!h.promise,"data-swiped":$n,"data-removed":Ae,"data-visible":hd,"data-y-position":Ir,"data-x-position":mn,"data-index":w,"data-front":dd,"data-swiping":me,"data-dismissible":W,"data-type":I,"data-invert":A1,"data-swipe-out":st,"data-swipe-direction":ae,"data-expanded":!!(C||N&&G),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${Ae?Fn:en.current}px`,"--initial-height":N?"auto":`${ar}px`,...P,...h.style},onDragEnd:()=>{_e(!1),Z(null),Ze.current=null},onPointerDown:ce=>{fd||!W||(gl.current=new Date,Ti(en.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(_e(!0),Ze.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,Oe,ze,gn;if(st||!W)return;Ze.current=null;let yn=Number(((ce=lr.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lr=Number(((Oe=lr.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Pi=new Date().getTime()-((ze=gl.current)==null?void 0:ze.getTime()),vn=E==="x"?yn:Lr,Dr=Math.abs(vn)/Pi;if(Math.abs(vn)>=hP||Dr>.11){Ti(en.current),(gn=h.onDismiss)==null||gn.call(h,h),he(E==="x"?yn>0?"right":"left":Lr>0?"down":"up"),jr(),Pt(!0),pn(!1);return}_e(!1),Z(null)},onPointerMove:ce=>{var Oe,ze,gn,yn;if(!Ze.current||!W||((Oe=window.getSelection())==null?void 0:Oe.toString().length)>0)return;let Lr=ce.clientY-Ze.current.y,Pi=ce.clientX-Ze.current.x,vn=(ze=e.swipeDirections)!=null?ze:pP($);!E&&(Math.abs(Pi)>1||Math.abs(Lr)>1)&&Z(Math.abs(Pi)>Math.abs(Lr)?"x":"y");let Dr={x:0,y:0};E==="y"?(vn.includes("top")||vn.includes("bottom"))&&(vn.includes("top")&&Lr<0||vn.includes("bottom")&&Lr>0)&&(Dr.y=Lr):E==="x"&&(vn.includes("left")||vn.includes("right"))&&(vn.includes("left")&&Pi<0||vn.includes("right")&&Pi>0)&&(Dr.x=Pi),(Math.abs(Dr.x)>0||Math.abs(Dr.y)>0)&&pn(!0),(gn=lr.current)==null||gn.style.setProperty("--swipe-amount-x",`${Dr.x}px`),(yn=lr.current)==null||yn.style.setProperty("--swipe-amount-y",`${Dr.y}px`)}},zt&&!h.jsx?K.createElement("button",{"aria-label":F,"data-disabled":fd,"data-close-button":!0,onClick:fd||!W?()=>{}:()=>{var ce;jr(),(ce=h.onDismiss)==null||ce.call(h,h)},className:xn(j==null?void 0:j.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=_==null?void 0:_.close)!=null?s:ZR):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:K.createElement(K.Fragment,null,I||h.icon||h.promise?K.createElement("div",{"data-icon":"",className:xn(j==null?void 0:j.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||N1():null,h.type!=="loading"?h.icon||(_==null?void 0:_[I])||qR(I):null):null,K.createElement("div",{"data-content":"",className:xn(j==null?void 0:j.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},K.createElement("div",{"data-title":"",className:xn(j==null?void 0:j.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?K.createElement("div",{"data-description":"",className:xn(V,we,j==null?void 0:j.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&Ml(h.cancel)?K.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:ce=>{var Oe,ze;Ml(h.cancel)&&W&&((ze=(Oe=h.cancel).onClick)==null||ze.call(Oe,ce),jr())},className:xn(j==null?void 0:j.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&Ml(h.action)?K.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:ce=>{var Oe,ze;Ml(h.action)&&((ze=(Oe=h.action).onClick)==null||ze.call(Oe,ce),!ce.defaultPrevented&&jr())},className:xn(j==null?void 0:j.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Cy(){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 gP(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?uP:lP;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(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]}):l(a)}),n}var yP=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:v=aP,toastOptions:p,dir:b=Cy(),gap:m=dP,loadingIcon:y,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:C}=e,[k,T]=K.useState([]),R=K.useMemo(()=>Array.from(new Set([r].concat(k.filter(q=>q.position).map(q=>q.position)))),[k,r]),[P,O]=K.useState([]),[L,A]=K.useState(!1),[V,M]=K.useState(!1),[$,U]=K.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
81k":"light"),Q=K.useRef(null),N=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=K.useRef(null),_=K.useRef(!1),F=K.useCallback(q=>{T(E=>{var Z;return(Z=E.find(ae=>ae.id===q.id))!=null&&Z.delete||Ot.dismiss(q.id),E.filter(({id:ae})=>ae!==q.id)})},[]);return K.useEffect(()=>Ot.subscribe(q=>{if(q.dismiss){T(E=>E.map(Z=>Z.id===q.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{mb.flushSync(()=>{T(E=>{let Z=E.findIndex(ae=>ae.id===q.id);return Z!==-1?[...E.slice(0,Z),{...E[Z],...q},...E.slice(Z+1)]:[q,...E]})})})}),[]),K.useEffect(()=>{if(c!=="system"){U(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:E})=>{U(E?"dark":"light")})}catch{q.addListener(({matches:Z})=>{try{U(Z?"dark":"light")}catch(ae){console.error(ae)}})}},[c]),K.useEffect(()=>{k.length<=1&&A(!1)},[k]),K.useEffect(()=>{let q=E=>{var Z,ae;i.every(he=>E[he]||E.code===he)&&(A(!0),(Z=Q.current)==null||Z.focus()),E.code==="Escape"&&(document.activeElement===Q.current||(ae=Q.current)!=null&&ae.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[i]),K.useEffect(()=>{if(Q.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,_.current=!1)}},[Q.current]),K.createElement("section",{ref:t,"aria-label":`${S} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((q,E)=>{var Z;let[ae,he]=q.split("-");return k.length?K.createElement("ol",{key:q,dir:b==="auto"?Cy():b,tabIndex:-1,ref:Q,className:a,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ae,"data-lifted":L&&k.length>1&&!s,"data-x-position":he,style:{"--front-toast-height":`${((Z=P[0])==null?void 0:Z.height)||0}px`,"--width":`${cP}px`,"--gap":`${m}px`,...h,...gP(l,u)},onBlur:G=>{_.current&&!G.currentTarget.contains(G.relatedTarget)&&(_.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||_.current||(_.current=!0,j.current=G.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{V||A(!1)},onDragEnd:()=>A(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},k.filter(G=>!G.position&&E===0||G.position===q).map((G,ge)=>{var Ae,ye;return K.createElement(mP,{key:G.id,icons:w,index:ge,toast:G,defaultRichColors:d,duration:(Ae=p==null?void 0:p.duration)!=null?Ae:f,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:v,closeButton:(ye
vendor: 4,210 bytes, line 81
81=p==null?void 0:p.closeButton)!=null?ye:o,interacting:V,position:q,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:F,toasts:k.filter(me=>me.position==G.position),heights:P.filter(me=>me.position==G.position),setHeights:O,expandByDefault:s,gap:m,loadingIcon:y,expanded:L,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const vP=({...e})=>{const{theme:t="system"}=VR();return g.jsx(yP,{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 wP=h0[" useId ".trim().toString()]||(()=>{}),xP=0;function al(e){const[t,n]=x.useState(wP());return mt(()=>{e||n(r=>r??String(xP++))},[e]),e||(t?`radix-${t}`:"")}const bP=["top","right","bottom","left"],mi=Math.min,Vt=Math.max,Zu=Math.round,$l=Math.floor,gi=e=>({x:e,y:e}),_P={left:"right",right:"left",bottom:"top",top:"bottom"},SP={start:"end",end:"start"};function kf(e,t,n){return Vt(e,mi(t,n))}function Er(e,t){return typeof e=="function"?e(t):e}function Cr(e){return e.split("-")[0]}function Eo(e){return e.split("-")[1]}function ym(e){return e==="x"?"y":"x"}function vm(e){return e==="y"?"height":"width"}function yi(e){return["top","bottom"].includes(Cr(e))?"y":"x"}function wm(e){return ym(yi(e))}function kP(e,t,n){n===void 0&&(n=!1);const r=Eo(e),i=wm(e),s=vm(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Xu(o)),[o,Xu(o)]}function EP(e){const t=Xu(e);return[Ef(e),t,Ef(t)]}function Ef(e){return e.replace(/start|end/g,t=>SP[t])}function CP(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function TP(e,t,n,r){const i=Eo(e);let s=CP(Cr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ef)))),s}function Xu(e){return e.replace(/left|right|bottom|top/g,t=>_P[t])}function RP(e){return{top:0,right:0,bottom:0,left:0,...e}}function i_(e){return typeof e!="number"?RP(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ty(e,t,n){let{reference:r,floating:i}=e;const s=yi(t),o=wm(t),a=vm(o),l=Cr(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Eo(t)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}const PP=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Ty(u,r,l),f=r,h={},v=0;for(let p=0;p<a.length;p++){const{name:b,fn:m}=a[p],{x:y,y:w,data:S,reset:C}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=y??c,d=w??d,h={...h,[b]:{...h[b],...S}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:c,y:d}=Ty(u,f,l)),p=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function $a(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Er(t,e),v=i_(h),b=a[f?d==="floating"?"reference":"floating":d],m=ec(await s.getClippingRect
vendor: 7,262 bytes, line 81
81({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),y=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=ec(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(m.top-C.top+v.top)/S.y,bottom:(C.bottom-m.bottom+v.bottom)/S.y,left:(m.left-C.left+v.left)/S.x,right:(C.right-m.right+v.right)/S.x}}const AP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Er(e,t)||{};if(u==null)return{};const d=i_(c),f={x:n,y:r},h=wm(i),v=vm(h),p=await o.getDimensions(u),b=h==="y",m=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[h]-f[h]-s.floating[v],C=f[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=k?k[w]:0;(!T||!await(o.isElement==null?void 0:o.isElement(k)))&&(T=a.floating[w]||s.floating[v]);const R=S/2-C/2,P=T/2-p[v]/2-1,O=mi(d[m],P),L=mi(d[y],P),A=O,V=T-p[v]-L,M=T/2-p[v]/2+R,$=kf(A,M,V),U=!l.arrow&&Eo(i)!=null&&M!==$&&s.reference[v]/2-(M<A?O:L)-p[v]/2<0,Q=U?M<A?M-A:M-V:0;return{[h]:f[h]+Q,data:{[h]:$,centerOffset:M-$-Q,...U&&{alignmentOffset:Q}},reset:U}}}),NP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...b}=Er(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Cr(i),y=yi(a),w=Cr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(w||!p?[Xu(a)]:EP(a)),k=v!=="none";!f&&k&&C.push(...TP(a,p,v,S));const T=[a,...C],R=await $a(t,b),P=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&P.push(R[m]),d){const M=kP(i,o,S);P.push(R[M[0]],R[M[1]])}if(O=[...O,{placement:i,overflows:P}],!P.every(M=>M<=0)){var L,A;const M=(((L=s.flip)==null?void 0:L.index)||0)+1,$=T[M];if($)return{data:{index:M,overflows:O},reset:{placement:$}};let U=(A=O.filter(Q=>Q.overflows[0]<=0).sort((Q,N)=>Q.overflows[1]-N.overflows[1])[0])==null?void 0:A.placement;if(!U)switch(h){case"bestFit":{var V;const Q=(V=O.filter(N=>{if(k){const j=yi(N.placement);return j===y||j==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(j=>j>0).reduce((j,_)=>j+_,0)]).sort((N,j)=>N[1]-j[1])[0])==null?void 0:V[0];Q&&(U=Q);break}case"initialPlacement":U=a;break}if(i!==U)return{reset:{placement:U}}}return{}}}};function Ry(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Py(e){return bP.some(t=>e[t]>=0)}const OP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Er(e,t);switch(r){case"referenceHidden":{const s=await $a(t,{...i,elementContext:"reference"}),o=Ry(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Py(o)}}}case"escaped":{const s=await $a(t,{...i,altBoundary:!0}),o=Ry(s,n.floating);return{data:{escapedOffsets:o,escaped:Py(o)}}}default:return{}}}}};async function IP(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Cr(n),a=Eo(n),l=yi(n)==="y",u=["left","top"].includes(o)?-1:1,c=s&&l?-1:1,d=Er(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const jP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await IP(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},LP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:m,y}=b;return{x:m,y}}},...l}=Er(e,t),u={x:n,y:r},c=await $a(t,l),d=yi(Cr(i)),f=ym(d);let h=u[f],v=u[d];if(s){const b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=h+c[b],w=h-c[m];h=kf(y,h,w)}if(o){const b=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=v+c[b],w=v-c[m];v=kf(y,v,w)}const p=a.fn({...t,[f]:h,[d]:v});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:s,[d]:o}}}}}},DP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Er(e,t),c={x:n,y:r},d=yi(i),f=ym(d);let h=c[f],v=c[d];const p=Er(a,t),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=f==="y"?"height":"width",S=s.reference[f]-s.floating[w]+b.mainAxis,C=s.reference[f]+s.reference[w]-b.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var m,y;const w=f==="y"?"width":"height",S=["top","left"].includes(Cr(i)),C=s.reference[d]-s.floating[w]+(S&&((m=o.offset)==null?void 0:m[d])||0)+(S?0:b.crossAxis),k=s.reference[d]+s.reference[w]+(S?0:((y=o.offset)==null?void 0:y[d])||0)-(S?b.crossAxis:0);v<C?v=C:v>k&&(v=k)}return{[f]:h,[d]:v}}}},MP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=Er(e,t),c=await $a(t,u),d=Cr(i),f=Eo(i),h=yi(i)==="y",{width:v,height:p}=s.floating;let b,m;d==="top"||d==="bottom"?(b=d,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,b=f==="end"?"top":"bottom");const y=p-c.top-c.bottom,w=v-c.left-c.right,S=mi(p-c[b],y),C=mi(v-c[m],w),k=!t.middlewareData.shift;let T=S,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),k&&!f){const O=Vt(c.left,0),L=Vt(c.right,0),A=Vt(c.top,0),V=Vt(c.bottom,0);h?R=v-2*(O!==0||L!==0?O+L:Vt(c.left,c.right)):T=p-2*(A!==0||V!==0?A+V:Vt(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:T});const P=await o.getDimensions(a.floating);return v!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Uc(){return typeof window<"u"}function Co(e){return s_(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(s_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s_(e){return Uc()?e instanceof Node||e instanceof Jt(e).Node:!1}function Dn(e){return Uc()?e instanceof Element||e instanceof Jt(e).Element:!1}function nr(e){return Uc()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function Ay(e){return!Uc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function ll(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Mn(e);
vendor: 4,141 bytes, line 81
81return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function $P(e){return["table","td","th"].includes(Co(e))}function Bc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function xm(e){const t=bm(),n=Dn(e)?Mn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function FP(e){let t=vi(e);for(;nr(t)&&!po(t);){if(xm(t))return t;if(Bc(t))return null;t=vi(t)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function po(e){return["html","body","#document"].includes(Co(e))}function Mn(e){return Jt(e).getComputedStyle(e)}function Hc(e){return Dn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vi(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ay(e)&&e.host||sr(e);return Ay(t)?t.host:t}function o_(e){const t=vi(e);return po(t)?e.ownerDocument?e.ownerDocument.body:e.body:nr(t)&&ll(t)?t:o_(t)}function Fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=o_(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Jt(i);if(s){const a=Cf(o);return t.concat(o,o.visualViewport||[],ll(i)?i:[],a&&n?Fa(a):[])}return t.concat(i,Fa(i,[],n))}function Cf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function a_(e){const t=Mn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=nr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Zu(n)!==s||Zu(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function _m(e){return Dn(e)?e:e.contextElement}function Ws(e){const t=_m(e);if(!nr(t))return gi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=a_(t);let o=(s?Zu(n.width):n.width)/r,a=(s?Zu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const zP=gi(0);function l_(e){const t=Jt(e);return!bm()||!t.visualViewport?zP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=_m(e);let o=gi(1);t&&(r?Dn(r)&&(o=Ws(r)):o=Ws(e));const a=UP(s,n,r)?l_(s):gi(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=Jt(s),h=r&&Dn(r)?Jt(r):r;let v=f,p=Cf(v);for(;p&&r&&h!==v;){const b=Ws(p),m=p.getBoundingClientRect(),y=Mn(p),w=m.left+(p.clientLeft+parseFloat(y.paddingLeft))*b.x,S=m.top+(p.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=w,u+=S,v=Jt(p),p=Cf(v)}}return ec({width:c,height:d,x:l,y:u})}function BP(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=sr(r),a=t?Bc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=gi(1);const c=gi(0),d=nr(r);if((d||!d&&!s)&&((Co(r)!=="body"||ll(o))&&(l=Hc(r)),nr(r))){const f=ts(r);u=Ws(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function HP(e){return Array.from(e.getClientRects())}function Tf(e,t){const n=Hc(e).scrollLeft;return t?t.left+n:ts(sr(e)).left+n}function VP(e){const t=sr(e),n=Hc(e),r=e.ownerDocument.body,i=Vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Tf(e);const a=-n.scrollTop;return Mn(r).direction==="rtl"&&(o+=Vt(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function qP(e,t){const n=Jt(e),r=sr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=bm();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function WP(e,t){const n=ts(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=nr(e)?W
vendor: 4,193 bytes, line 81
81s(e):gi(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function Ny(e,t,n){let r;if(t==="viewport")r=qP(e,n);else if(t==="document")r=VP(sr(e));else if(Dn(t))r=WP(t,n);else{const i=l_(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return ec(r)}function u_(e,t){const n=vi(e);return n===t||!Dn(n)||po(n)?!1:Mn(n).position==="fixed"||u_(n,t)}function KP(e,t){const n=t.get(e);if(n)return n;let r=Fa(e,[],!1).filter(a=>Dn(a)&&Co(a)!=="body"),i=null;const s=Mn(e).position==="fixed";let o=s?vi(e):e;for(;Dn(o)&&!po(o);){const a=Mn(o),l=xm(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ll(o)&&!l&&u_(e,o))?r=r.filter(c=>c!==o):i=a,o=vi(o)}return t.set(e,r),r}function GP(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Bc(t)?[]:KP(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=Ny(t,c,i);return u.top=Vt(d.top,u.top),u.right=mi(d.right,u.right),u.bottom=mi(d.bottom,u.bottom),u.left=Vt(d.left,u.left),u},Ny(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JP(e){const{width:t,height:n}=a_(e);return{width:t,height:n}}function QP(e,t,n){const r=nr(t),i=sr(t),s=n==="fixed",o=ts(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=gi(0);if(r||!r&&!s)if((Co(t)!=="body"||ll(i))&&(a=Hc(t)),r){const h=ts(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=Tf(i));let u=0,c=0;if(i&&!r&&!s){const h=i.getBoundingClientRect();c=h.top+a.scrollTop,u=h.left+a.scrollLeft-Tf(i,h)}const d=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-c;return{x:d,y:f,width:o.width,height:o.height}}function qd(e){return Mn(e).position==="static"}function Oy(e,t){if(!nr(e)||Mn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function c_(e,t){const n=Jt(e);if(Bc(e))return n;if(!nr(e)){let i=vi(e);for(;i&&!po(i);){if(Dn(i)&&!qd(i))return i;i=vi(i)}return n}let r=Oy(e,t);for(;r&&$P(r)&&qd(r);)r=Oy(r,t);return r&&po(r)&&qd(r)&&!xm(r)?n:r||FP(e)||n}const YP=async function(e){const t=this.getOffsetParent||c_,n=this.getDimensions,r=await n(e.floating);return{reference:QP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZP(e){return Mn(e).direction==="rtl"}const XP={convertOffsetParentRelativeRectToViewportRelativeRect:BP,getDocumentElement:sr,getClippingRect:GP,getOffsetParent:c_,getElementRects:YP,getClientRects:HP,getDimensions:JP,getScale:Ws,isElement:Dn,isRTL:ZP};function eA(e,t){let n=null,r;const i=sr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=$l(c),v=$l(i.clientWidth-(u+d)),p=$l(i.clientHeight-(c+f)),b=$l(u),y={rootMargin:-h+"px "+-v+"px "+-p+"px "+-b+"px",threshold:Vt(0,mi(1,l))||1};let w=!0;function S(C){const k=C[0].intersectionRatio;if(k!==l){if(!w)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return o(!0),s}function tA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=_m(e),c=i||s?[...u?Fa(u):[],...Fa(t)]:[];c.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const d=u&&a?eA(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,p=l?ts(e):null;l&&b();function b(){const m=ts(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,v=requestAnimationFrame(b)}return n(),()=>{var m;c.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(v)}}
vendor: 4,111 bytes, line 81
81const nA=jP,rA=LP,iA=NP,sA=MP,oA=OP,Iy=AP,aA=DP,lA=(e,t,n)=>{const r=new Map,i={platform:XP,...n},s={...i.platform,_c:r};return PP(e,t,{...i,platform:s})};var yu=typeof document<"u"?x.useLayoutEffect:x.useEffect;function tc(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,i;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(!tc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!tc(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function d_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jy(e,t){const n=d_(e);return Math.round(t*n)/n}function Wd(e){const t=x.useRef(e);return yu(()=>{t.current=e}),t}function uA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=x.useState(r);tc(f,r)||h(r);const[v,p]=x.useState(null),[b,m]=x.useState(null),y=x.useCallback(N=>{N!==k.current&&(k.current=N,p(N))},[]),w=x.useCallback(N=>{N!==T.current&&(T.current=N,m(N))},[]),S=s||v,C=o||b,k=x.useRef(null),T=x.useRef(null),R=x.useRef(c),P=l!=null,O=Wd(l),L=Wd(i),A=Wd(u),V=x.useCallback(()=>{if(!k.current||!T.current)return;const N={placement:t,strategy:n,middleware:f};L.current&&(N.platform=L.current),lA(k.current,T.current,N).then(j=>{const _={...j,isPositioned:A.current!==!1};M.current&&!tc(R.current,_)&&(R.current=_,as.flushSync(()=>{d(_)}))})},[f,t,n,L,A]);yu(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);const M=x.useRef(!1);yu(()=>(M.current=!0,()=>{M.current=!1}),[]),yu(()=>{if(S&&(k.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,V);V()}},[S,C,V,O,P]);const $=x.useMemo(()=>({reference:k,floating:T,setReference:y,setFloating:w}),[y,w]),U=x.useMemo(()=>({reference:S,floating:C}),[S,C]),Q=x.useMemo(()=>{const N={position:n,left:0,top:0};if(!U.floating)return N;const j=jy(U.floating,c.x),_=jy(U.floating,c.y);return a?{...N,transform:"translate("+j+"px, "+_+"px)",...d_(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:_}},[n,a,U.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:V,refs:$,elements:U,floatingStyles:Q}),[c,V,$,U,Q])}const cA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Iy({element:r.current,padding:i}).fn(n):{}:r?Iy({element:r,padding:i}).fn(n):{}}}},dA=(e,t)=>({...nA(e),options:[e,t]}),hA=(e,t)=>({...rA(e),options:[e,t]}),fA=(e,t)=>({...aA(e),options:[e,t]}),pA=(e,t)=>({...iA(e),options:[e,t]}),mA=(e,t)=>({...sA(e),options:[e,t]}),gA=(e,t)=>({...oA(e),options:[e,t]}),yA=(e,t)=>({...cA(e),options:[e,t]});var vA="Arrow",h_=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return g.jsx(be.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});h_.displayName=vA;var wA=h_;function xA(e){const[t,n]=x.useState(void 0);return mt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;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 Sm="Popper",[f_,Vc]=ls(Sm),[bA,p_]=f_(Sm),m_=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return g.jsx(bA,{scope:t,anchor:r,onAnchorChange:i,children:n})};m_.displayName=Sm;var g_="PopperAnchor",y_=x.forwardRef((e,t)=>
vendor: 4,490 bytes, line 81
81{const{__scopePopper:n,virtualRef:r,...i}=e,s=p_(g_,n),o=x.useRef(null),a=We(t,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:g.jsx(be.div,{...i,ref:a})});y_.displayName=g_;var km="PopperContent",[_A,SA]=f_(km),v_=x.forwardRef((e,t)=>{var G,ge,Ae,ye,me,_e;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:v,...p}=e,b=p_(km,n),[m,y]=x.useState(null),w=We(t,st=>y(st)),[S,C]=x.useState(null),k=xA(S),T=(k==null?void 0:k.width)??0,R=(k==null?void 0:k.height)??0,P=r+(s!=="center"?"-"+s:""),O=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},L=Array.isArray(u)?u:[u],A=L.length>0,V={padding:O,boundary:L.filter(EA),altBoundary:A},{refs:M,floatingStyles:$,placement:U,isPositioned:Q,middlewareData:N}=uA({strategy:"fixed",placement:P,whileElementsMounted:(...st)=>tA(...st,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[dA({mainAxis:i+R,alignmentAxis:o}),l&&hA({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?fA():void 0,...V}),l&&pA({...V}),mA({...V,apply:({elements:st,rects:Pt,availableWidth:$n,availableHeight:pn})=>{const{width:Fn,height:Ti}=Pt.reference,ar=st.floating.style;ar.setProperty("--radix-popper-available-width",`${$n}px`),ar.setProperty("--radix-popper-available-height",`${pn}px`),ar.setProperty("--radix-popper-anchor-width",`${Fn}px`),ar.setProperty("--radix-popper-anchor-height",`${Ti}px`)}}),S&&yA({element:S,padding:a}),CA({arrowWidth:T,arrowHeight:R}),f&&gA({strategy:"referenceHidden",...V})]}),[j,_]=b_(U),F=dn(v);mt(()=>{Q&&(F==null||F())},[Q,F]);const q=(G=N.arrow)==null?void 0:G.x,E=(ge=N.arrow)==null?void 0:ge.y,Z=((Ae=N.arrow)==null?void 0:Ae.centerOffset)!==0,[ae,he]=x.useState();return mt(()=>{m&&he(window.getComputedStyle(m).zIndex)},[m]),g.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:Q?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(ye=N.transformOrigin)==null?void 0:ye.x,(me=N.transformOrigin)==null?void 0:me.y].join(" "),...((_e=N.hide)==null?void 0:_e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(_A,{scope:n,placedSide:j,onArrowChange:C,arrowX:q,arrowY:E,shouldHideArrow:Z,children:g.jsx(be.div,{"data-side":j,"data-align":_,...p,ref:w,style:{...p.style,animation:Q?void 0:"none"}})})})});v_.displayName=km;var w_="PopperArrow",kA={top:"bottom",right:"left",bottom:"top",left:"right"},x_=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=SA(w_,r),o=kA[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(wA,{...i,ref:n,style:{...i.style,display:"block"}})})});x_.displayName=w_;function EA(e){return e!==null}var CA=e=>({name:"transformOrigin",options:e,fn(t){var b,m,y;const{placement:n,rects:r,middlewareData:i}=t,o=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,c]=b_(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((m=i.arrow)==null?void 0:m.x)??0)+a/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let v="",p="";return u==="bottom"?(v=o?d:`${f}px`,p=`${-l}px`):u==="top"?(v=o?d:`${f}px`,p=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,p=o?d:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,p=o?d:`${h}px`),{data:{x:v,y:p}}}});function b_(e){const[t,n="center"]=e.split("-");return[t,n]}var TA=m_,__=y_,S_=v_,k_=x_,[qc,jU]=ls("Tooltip",[Vc]),Em=Vc(),E_="TooltipProvider",RA=700,Ly="tooltip.open",[PA,C_]=qc(E_),T_=e=>{const{__scopeTooltip:t,delayDuration:n=RA,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,o=x.useRef(!0),a=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),g.jsx(PA,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 5,465 bytes, line 81
81o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(u=>{a.current=u},[]),disableHoverableContent:i,children:s})};T_.displayName=E_;var R_="Tooltip",[LU,Wc]=qc(R_),Rf="TooltipTrigger",AA=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Wc(Rf,n),s=C_(Rf,n),o=Em(n),a=x.useRef(null),l=We(t,a,i.onTriggerChange),u=x.useRef(!1),c=x.useRef(!1),d=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(__,{asChild:!0,...o,children:g.jsx(be.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:oe(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:oe(e.onBlur,i.onClose),onClick:oe(e.onClick,i.onClose)})})});AA.displayName=Rf;var NA="TooltipPortal",[DU,OA]=qc(NA,{forceMount:void 0}),mo="TooltipContent",P_=x.forwardRef((e,t)=>{const n=OA(mo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=Wc(mo,e.__scopeTooltip);return g.jsx(Mc,{present:r||o.open,children:o.disableHoverableContent?g.jsx(A_,{side:i,...s,ref:t}):g.jsx(IA,{side:i,...s,ref:t})})}),IA=x.forwardRef((e,t)=>{const n=Wc(mo,e.__scopeTooltip),r=C_(mo,e.__scopeTooltip),i=x.useRef(null),s=We(t,i),[o,a]=x.useState(null),{trigger:l,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{a(null),d(!1)},[d]),h=x.useCallback((v,p)=>{const b=v.currentTarget,m={x:v.clientX,y:v.clientY},y=$A(m,b.getBoundingClientRect()),w=FA(m,y),S=zA(p.getBoundingClientRect()),C=BA([...w,...S]);a(C),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&c){const v=b=>h(b,c),p=b=>h(b,l);return l.addEventListener("pointerleave",v),c.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",p)}}},[l,c,h,f]),x.useEffect(()=>{if(o){const v=p=>{const b=p.target,m={x:p.clientX,y:p.clientY},y=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),w=!UA(m,o);y?f():w&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,c,o,u,f]),g.jsx(A_,{...e,ref:s})}),[jA,LA]=qc(R_,{isInside:!1}),DA=hT("TooltipContent"),A_=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=Wc(mo,n),u=Em(n),{onClose:c}=l;return x.useEffect(()=>(document.addEventListener(Ly,c),()=>document.removeEventListener(Ly,c)),[c]),x.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),g.jsx(Dc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:g.jsxs(S_,{"data-state":l.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:[g.jsx(DA,{children:r}),g.jsx(jA,{scope:n,isInside:!0,children:g.jsx(jT,{id:l.contentId,role:"tooltip",children:i||r})})]})})});P_.displayName=mo;var N_="TooltipArrow",MA=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Em(n);return LA(N_,n).isInside?null:g.jsx(k_,{...i,...r,ref:t})});MA.displayName=N_;function $A(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function FA(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 zA(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function UA(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s],l=t[o],u=a.x,c=a.y,d=l.x,f=l.y;c>r!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function BA(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),HA(t)}function HA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}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 VA=T_,O_=P_;const qA=VA,WA=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
vendor: 8,841 bytes, line 81
81g.jsx(O_,{ref:r,sideOffset:t,className:Re("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}));WA.displayName=O_.displayName;var Kc=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(){}},Gc=typeof window>"u"||"Deno"in globalThis;function kn(){}function KA(e,t){return typeof e=="function"?e(t):e}function GA(e){return typeof e=="number"&&e>=0&&e!==1/0}function JA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pf(e,t){return typeof e=="function"?e(t):e}function QA(e,t){return typeof e=="function"?e(t):e}function Dy(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Cm(o,t.options))return!1}else if(!Ua(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function My(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(za(t.options.mutationKey)!==za(s))return!1}else if(!Ua(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Cm(e,t){return((t==null?void 0:t.queryKeyHashFn)||za)(e)}function za(e){return JSON.stringify(e,(t,n)=>Af(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ua(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ua(e[n],t[n])):!1}function I_(e,t){if(e===t)return e;const n=$y(e)&&$y(t);if(n||Af(e)&&Af(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let u=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=I_(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return i===o&&u===i?e:a}return t}function $y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Af(e){if(!Fy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Fy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fy(e){return Object.prototype.toString.call(e)==="[object Object]"}function YA(e){return new Promise(t=>{setTimeout(t,e)})}function ZA(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?I_(e,t):t}function XA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function eN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tm=Symbol();function j_(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ui,Qr,Zs,Gw,tN=(Gw=class extends Kc{constructor(){super();Ce(this,Ui);Ce(this,Qr);Ce(this,Zs);de(this,Zs,t=>{if(!Gc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){D(this,Qr)||this.setEventListener(D(this,Zs))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Qr))==null||t.call(this),de(this,Qr,void 0))}setEventListener(t){var n;de(this,Zs,t),(n=D(this,Qr))==null||n.call(this),de(this,Qr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,Ui)!==t&&(de(this,Ui,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,Ui)=="boolean"?D(this,Ui):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ui=new WeakMap,Qr=new WeakMap,Zs=new WeakMap,Gw),L_=new tN,Xs,Yr,eo,Jw,nN=(Jw=class extends Kc{constructor(){super();Ce(this,Xs,!0);Ce(this,Yr);Ce(this,eo);de(this,eo,t=>{if(!Gc&&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,Yr)||this.setEventListener(D(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Yr))==null||t.call(this),de(this,Yr,void 0))}setEventListener(t){var n;de(this,eo,t),(n=D(this,Yr))==null||n.call(this),de(this,Yr,t(this.setOnline.bind(this)))}setOnline(t){D(this,Xs)!==t&&(de(this,Xs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,Xs)}},Xs=new WeakMap,Yr=new WeakMap,eo=new WeakMap,Jw),nc=new nN;function rN(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function iN(e){return Math.min(1e3*2**e,3e4)}function D_(e){return(e??"online")==="online"?nc.isOnline():!0}var M_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Kd(e){return e instanceof M_}function $_(e){let t=!1,n=0,r=!1,i;const s=rN(),o=p=>{var b;r||(f(new M_(p)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>L_.isFocused()&&(e.networkMode==="always"||nc.isOnline())&&e.canRun(),c=()=>D_(e.networkMode)&&e.canRun(),d=p=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,p),i==null||i(),s.resolve(p))},f=p=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,p),i==null||i(),s.reject(p))},h=()=>new Promise(p=>{var b;i=m=>{(r||u())&&p(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;i=void 0,r||(p=e.onContinue)==null||p.call(e)}),v=()=>{if(r)return;let p;const b=n===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(d).catch(m=>{var k;if(r)return;const y=e.retry??(Gc?0:3),w=e.retryDelay??iN,S=typeof w=="function"?w(n,m):w,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,m);if(t||!C){f(m);return}n++,(k=e.onFail)==null||k.call(e,n,m),YA(S).then(()=>u()?void 0:h()).then(()=>{t?f(m):v()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?v():h().then(v),s)}}var sN=e=>setTimeout(e,0);function oN(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=sN;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Et=oN(),Bi,Qw,F_=(Qw=class{constructor(){Ce(this,Bi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GA(this.gcTime)&&de(this,Bi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gc?1/0:5*60*1e3))}clearGcTimeout(){D(this,Bi)&&(clearTimeout(D(this,Bi)),de(this,Bi,void 0))}},Bi=new WeakMap,Qw),to,Hi,nn,Vi,wt,Xa,qi,Tn,dr,Yw,aN=(Yw=class extends F_{constructor(t){super();Ce(this,Tn);Ce(this,to);Ce(this,Hi);Ce(this,nn);Ce(this,Vi);Ce(this,wt);Ce(this,Xa);Ce(this,qi);de(this,qi,!1),de(this,Xa,t.defaultOptions),this.setOptions(t.options),this.observers=[],de(this,Vi,t.client),de(this,nn,D(this,Vi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,de(this,to,uN(this.options)),this.state=t.state??D(this,to),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,wt))==null?void 0:t.promise}setOptions(t){this.options={...D(this,Xa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,nn).remove(this)}setData(t,n){const r=ZA(this.state.data,t,this.options);return gt(this,Tn,dr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){gt(this,Tn,dr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=D(this,wt))==null?void 0:r.promise;return(i=D(this,wt))==null||i.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,to))}isActive(){return this.observers.some(t=>QA(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tm||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 81
81Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Pf(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:!JA(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,wt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,wt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,nn).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,wt)&&(D(this,qi)?D(this,wt).cancel({revert:!0}):D(this,wt).cancelRetry()),this.scheduleGc()),D(this,nn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||gt(this,Tn,dr).call(this,{type:"invalidate"})}
vendor: 13,738 bytes, line 81
81fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,wt))return D(this,wt).continueRetry(),D(this,wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(de(this,qi,!0),r.signal)})},s=()=>{const f=j_(this.options,n),v=(()=>{const p={client:D(this,Vi),queryKey:this.queryKey,meta:this.meta};return i(p),p})();return de(this,qi,!1),this.options.persister?this.options.persister(f,v,this):f(v)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Vi),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),de(this,Hi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&gt(this,Tn,dr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,v,p,b;Kd(f)&&f.silent||gt(this,Tn,dr).call(this,{type:"error",error:f}),Kd(f)||((v=(h=D(this,nn).config).onError)==null||v.call(h,f,this),(b=(p=D(this,nn).config).onSettled)==null||b.call(p,this.state.data,f,this)),this.scheduleGc()};return de(this,wt,$_({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,v,p,b;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){l(m);return}(v=(h=D(this,nn).config).onSuccess)==null||v.call(h,f,this),(b=(p=D(this,nn).config).onSettled)==null||b.call(p,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{gt(this,Tn,dr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{gt(this,Tn,dr).call(this,{type:"pause"})},onContinue:()=>{gt(this,Tn,dr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),D(this,wt).start()}},to=new WeakMap,Hi=new WeakMap,nn=new WeakMap,Vi=new WeakMap,wt=new WeakMap,Xa=new WeakMap,qi=new WeakMap,Tn=new WeakSet,dr=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,...lN(r.data,this.options),fetchMeta:t.meta??null};case"success":return de(this,Hi,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 i=t.error;return Kd(i)&&i.revert&&D(this,Hi)?{...D(this,Hi),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,nn).notify({query:this,type:"updated",action:t})})},Yw);function lN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:D_(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function uN(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 Wn,Zw,cN=(Zw=class extends Kc{constructor(t={}){super();Ce(this,Wn);this.config=t,de(this,Wn,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Cm(i,n);let o=this.get(s);return o||(o=new aN({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){D(this,Wn).has(t.queryHash)||(D(this,Wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,Wn).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,Wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,Wn).get(t)}getAll(){return[...D(this,Wn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Dy(t,r)):n}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wn=new WeakMap,Zw),Kn,St,Wi,Gn,Ur,Xw,dN=(Xw=class extends F_{constructor(t){super();Ce(this,Gn);Ce(this,Kn);Ce(this,St);Ce(this,Wi);this.mutationId=t.mutationId,de(this,St,t.mutationCache),de(this,Kn,[]),this.state=t.state||hN(),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,Kn).includes(t)||(D(this,Kn).push(t),this.clearGcTimeout(),D(this,St).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){de(this,Kn,D(this,Kn).filter(n=>n!==t)),this.scheduleGc(),D(this,St).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Kn).length||(this.state.status==="pending"?this.scheduleGc():D(this,St).remove(this))}continue(){var t;return((t=D(this,Wi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,c,d,f,h,v,p,b,m,y,w,S,C,k,T,R;const n=()=>{gt(this,Gn,Ur).call(this,{type:"continue"})};de(this,Wi,$_({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,O)=>{gt(this,Gn,Ur).call(this,{type:"failed",failureCount:P,error:O})},onPause:()=>{gt(this,Gn,Ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,St).canRun(this)}));const r=this.state.status==="pending",i=!D(this,Wi).canStart();try{if(r)n();else{gt(this,Gn,Ur).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(s=D(this,St).config).onMutate)==null?void 0:o.call(s,t,this));const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));O!==this.state.context&&gt(this,Gn,Ur).call(this,{type:"pending",context:O,variables:t,isPaused:i})}const P=await D(this,Wi).start();return await((c=(u=D(this,St).config).onSuccess)==null?void 0:c.call(u,P,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,P,t,this.state.context)),await((v=(h=D(this,St).config).onSettled)==null?void 0:v.call(h,P,null,this.state.variables,this.state.context,this)),await((b=(p=this.options).onSettled)==null?void 0:b.call(p,P,null,t,this.state.context)),gt(this,Gn,Ur).call(this,{type:"success",data:P}),P}catch(P){try{throw await((y=(m=D(this,St).config).onError)==null?void 0:y.call(m,P,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,P,t,this.state.context)),await((k=(C=D(this,St).config).onSettled)==null?void 0:k.call(C,void 0,P,this.state.variables,this.state.context,this)),await((R=(T=this.options).onSettled)==null?void 0:R.call(T,void 0,P,t,this.state.context)),P}finally{gt(this,Gn,Ur).call(this,{type:"error",error:P})}}finally{D(this,St).runNext(this)}}},Kn=new WeakMap,St=new WeakMap,Wi=new WeakMap,Gn=new WeakSet,Ur=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),Et.batch(()=>{D(this,Kn).forEach(r=>{r.onMutationUpdate(t)}),D(this,St).notify({mutation:this,type:"updated",action:t})})},Xw);function hN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yr,Rn,el,e0,fN=(e0=class extends Kc{constructor(t={}){super();Ce(this,yr);Ce(this,Rn);Ce(this,el);this.config=t,de(this,yr,new Set),de(this,Rn,new Map),de(this,el,0)}build(t,n,r){const i=new dN({mutationCache:this,mutationId:++yl(this,el)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){D(this,yr).add(t);const n=Fl(t);if(typeof n=="string"){const r=D(this,Rn).get(n);r?r.push(t):D(this,Rn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,yr).delete(t)){const n=Fl(t);if(typeof n=="string"){const r=D(this,Rn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&D(this,Rn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Fl(t);if(typeof n=="string"){const r=D(this,Rn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Fl(t);if(typeof n=="string"){const i=(r=D(this,Rn).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{D(this,yr).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,yr).clear(),D(this,Rn).clear()})}getAll(){return Array.from(D(this,yr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>My(n,r))}findAll(t={}){return this.getAll().filter(n=>My(t,n))}notify(t){Et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Et.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},yr=new WeakMap,Rn=new WeakMap,el=new WeakMap,e0);function Fl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function zy(e){return{onFetch:(t,n)=>{var c,d,f,h,v;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=j_(t.options,t.fetchOptions),y=async(w,S,C)=>{if(p)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const T=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return b(L),L})(),R=await m(T),{maxPages:P}=t.options,O=C?eN:XA;return{pages:O(w.pages,R,P),pageParams:O(w.pageParams,S,P)}};if(i&&s.length){const w=i==="backward",S=w?pN:Uy,C={pages:s,pageParams:o},k=S(r,C);a=await y(C,k,w)}else{const w=e??s.length;do{const S=l===0?o[0]??r.initialPageParam:Uy(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Uy(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 pN(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 Ke,Zr,Xr,no,ro,ei,io,so,t0,mN=(t0=class{constructor(e={}){Ce(this,Ke);Ce(this,Zr);Ce(this,Xr);Ce(this,no);Ce(this,ro);Ce(this,ei);Ce(this,io);Ce(this,so);de(this,Ke,e.queryCache||new cN),de(this,Zr,e.mutationCache||new fN),de(this,Xr,e.defaultOptions||{}),de(this,no,new Map),de(this,ro,new Map),de(this,ei,0)}mount(){yl(this,ei)._++,D(this,ei)===1&&(de(this,io,L_.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Ke).onFocus())})),de(this,so,nc.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Ke).onOnline())})))}unmount(){var e,t;yl(this,ei)._--,D(this,ei)===0&&((e=D(this,io))==null||e.call(this),de(this,io,void 0),(t=D(this,so))==null||t.call(this),de(this,so,void 0))}isFetching(e){return D(this,Ke).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,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=D(this,Ke).get(r.queryHash),s=i==null?void 0:i.state.data,o=KA(t,s);if(o!==void 0)return D(this,Ke).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Et.batch(()=>D(this,Ke).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,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,Ke);Et.batch(()=>
81{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,Ke);return Et.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Et.batch(()=>D(this,Ke).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return Et.batch(()=>(D(this,Ke).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=Et.batch(()=>D(this,Ke).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(kn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,Ke).build(this,t);return n.isStaleByTime(Pf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=zy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=zy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nc.isOnline()?D(this,Zr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Ke)}getMutationCache(){return D(this,Zr)}getDefaultOptions(){return D(this,Xr)}setDefaultOptions(e){de(this,Xr,e)}setQueryDefaults(e,t){D(this,no).set(za(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,no).values()],n={};return t.forEach(r=>{Ua(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,ro).set(za(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,ro).values()],n={};return t.forEach(r=>{Ua(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,Xr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cm(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===Tm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,Xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,Ke).clear(),D(this,Zr).clear()}},Ke=new WeakMap,Zr=new WeakMap,Xr=new WeakMap,no=new WeakMap,ro=new WeakMap,ei=new WeakMap,io=new WeakMap,so=new WeakMap,t0),gN=x.createContext(void 0),yN=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(gN.Provider,{value:e,children:t}));/**
82 * react-router v7.16.0
83 *
84 * Copyright (c) Remix Software Inc.
85 *
86 * This source code is licensed under the MIT license found in the
87 * LICENSE.md file in the root directory of this source tree.
88 *
89 * @license MIT
90 */var By="popstate";function Hy(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function vN(e={}){function t(r,i){var u;let s=(u=i.state)==null?void 0:u.masked,{pathname:o,search:a,hash:l}=s||r.location;return Nf("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:Ba(i)}return xN(t,n,null,e)}function Ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wN(){return Math.random().toString(36).substring(2,10)}function Vy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Nf(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?To(t):t,state:n,key:t&&t.key||r||wN(),mask:i}}function Ba({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function To(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function xN(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function d(){a="POP";let b=c(),m=b==null?null:b-u;u=b,l&&l({action:a,location:p.location,delta:m})}function f(b,m){a="PUSH";let y=Hy(b)?b:Nf(p.location,b,m);u=c()+1;let w=Vy(y,u),S=p.createHref(y.mask||y);try{o.pushState(w,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&l&&l({action:a,location:p.location,delta:1})}function h(b,m){a="REPLACE";let y=Hy(b)?b:Nf(p.location,b,m);u=c();let w=Vy(y,u),S=p.createHref(y.mask||y);o.replaceState(w,"",S),s&&l&&l({action:a,location:p.location,delta:0})}function v(b){return bN(i,b)}let p={get action(){return a},get location(){return e(i,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(By,d),l=b,()=>{i.removeEventListener(By,d),l=null}},createHref(b){return t(i,b)},createURL:v,encodeLocation(b){let m=v(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(b){return o.go(b)}};return p}function bN(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),Ve(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Ba(t);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function z_(e,t,n="/"){return _N(e,t,n,!1)}function _N(e,t,n,r,i){let s=typeof t=="string"?To(t):t,o=Tr(s.pathname||"/",n);if(o==null)return null;let a=SN(e),l=null,u=LN(o);for(let c=0;l==null&&c<a.length;++c)l=IN(a[c],u,r);return l}function SN(e){let t=U_(e);return kN(t),t}function U_(e,t=[],n=[],r="",i=!1){let s=(o,a,l=i,u)=>{let c={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&l)return;Ve(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}
90" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=jn([r,c.relativePath]),f=n.concat(c);o.children&&o.children.length>0&&(Ve(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),U_(o.children,t,f,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:NN(d,o.index),routesMeta:f})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let u of B_(o.path))s(o,a,!0,u)}),t}function B_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=B_(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function kN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ON(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var EN=/^:[\w-]+$/,CN=3,TN=2,RN=1,PN=10,AN=-2,qy=e=>e==="*";function NN(e,t){let n=e.split("/"),r=n.length;return n.some(qy)&&(r+=AN),t&&(r+=TN),n.filter(i=>!qy(i)).reduce((i,s)=>i+(EN.test(s)?CN:s===""?RN:PN),r)}function ON(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function IN(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=rc({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=rc({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
90Object.assign(i,d.params),o.push({params:i,pathname:jn([s,d.pathname]),pathnameBase:FN(jn([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=jn([s,d.pathnameBase]))}return o}function rc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=jN(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let v=a[f]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function jN(e,t=!1,n=!0){rr(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l,u,c)=>{if(r.push({paramName:a,isOptional:l!=null}),l){let d=c.charAt(u+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function LN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return rr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Tr(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)||"/"}var DN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function MN(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?To(e):e,s;return n?(n=V_(n),n.startsWith("/")?s=Wy(n.substring(1),"/"):s=Wy(n,t)):s=t,{pathname:s,search:zN(r),hash:UN(i)}}function Wy(e,t){let n=ic(t).split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Gd(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 $N(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function H_(e){let t=$N(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Rm(e,t,n,r=!1){let i;typeof e=="string"?i=To(e):(i={...e},Ve(!i.pathname||!i.pathname.includes("?"),Gd("?","pathname","search",i)),Ve(!i.pathname||!i.pathname.includes("#"),Gd("#","pathname","hash",i)),Ve(!i.search||!i.search.includes("#"),Gd("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=MN(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var V_=e=>e.replace(/\/\/+/g,"/"),jn=e=>V_(e.join("/")),ic=e=>e.replace(/\/+$/,""),FN=e=>ic(e).replace(/^\/*/,"/"),zN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,BN=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function HN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function VN(e){let t=e.map(n=>n.route.path).filter(Boolean);return jn(t)||"/"}var q_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function W_(e,t){let n=e;if(typeof n!="string"||!DN.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(q_)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=Tr(o.pathname,t);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{rr(!1,`<Link to="${n}">
90 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var K_=["POST","PUT","PATCH","DELETE"];new Set(K_);var qN=["GET",...K_];new Set(qN);var Ro=x.createContext(null);Ro.displayName="DataRouter";var Jc=x.createContext(null);Jc.displayName="DataRouterState";var G_=x.createContext(!1);function WN(){return x.useContext(G_)}var J_=x.createContext({isTransitioning:!1});J_.displayName="ViewTransition";var KN=x.createContext(new Map);KN.displayName="Fetchers";var GN=x.createContext(null);GN.displayName="Await";var hn=x.createContext(null);hn.displayName="Navigation";var ul=x.createContext(null);ul.displayName="Location";var Ar=x.createContext({outlet:null,matches:[],isDataRoute:!1});Ar.displayName="Route";var Pm=x.createContext(null);Pm.displayName="RouteError";var Q_="REACT_ROUTER_ERROR",JN="REDIRECT",QN="ROUTE_ERROR_RESPONSE";function YN(e){if(e.startsWith(`${Q_}:${JN}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ZN(e){if(e.startsWith(`${Q_}:${QN}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new BN(t.status,t.statusText,t.data)}catch{}}function XN(e,{relative:t}={}){Ve(cl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(hn),{hash:i,pathname:s,search:o}=dl(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:jn([n,s])),r.createHref({pathname:a,search:o,hash:i})}function cl(){return x.useContext(ul)!=null}function or(){return Ve(cl(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(ul).location}var Y_="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z_(e){x.useContext(hn).static||x.useLayoutEffect(e)}function eO(){let{isDataRoute:e}=x.useContext(Ar);return e?fO():tO()}function tO(){Ve(cl(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Ro),{basename:t,navigator:n}=x.useContext(hn),{matches:r}=x.useContext(Ar),{pathname:i}=or(),s=JSON.stringify(H_(r)),o=x.useRef(!1);return Z_(()=>{o.current=!0}),x.useCallback((l,u={})=>{if(rr(o.current,Y_),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=Rm(l,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:jn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}x.createContext(null);function dl(e,{relative:t}={}){let{matches:n}=x.useContext(Ar),{pathname:r}=or(),i=JSON.stringify(H_(n));return x.useMemo(()=>Rm(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function nO(e,t){return X_(e,t)}function X_(e,t,n){var b;Ve(cl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=x.useContext(hn),{matches:i}=x.useContext(Ar),s=i[i.length-1],o=s?s.params:{},a=s?s.pathname:"/",l=s?s.pathnameBase:"/",u=s&&s.route;{let m=u&&u.path||"";tS(a,!u||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
91
92Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let c=or(),d;if(t){let m=typeof t=="string"?To(t):t;Ve(l==="/"||((b=m.pathname)==null?void 0:b.startsWith(l)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),d=m}else d=c;let f=d.pathname||"/",h=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=n&&n.state.matches.length?n.state.matches.map(m=>Object.assign(m,{route:n.manifest[m.route.id]||m.route})):z_(e,{pathname:h});rr(u||v!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),rr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=aO(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},o,m.params),pathname:jn([l,r.encodeLocation?r.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:jn([l,r.encodeLocation?r.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),i,n);return t&&p?x.createElement(ul.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},p):p}function rO(){let e=hO(),t=HN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:s},"ErrorBoundary")," or"," ",x.createElement("code",{style:s},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application 
92Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,o)}var iO=x.createElement(rO,null),eS=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=ZN(e.digest);n&&(e=n)}let t=e!==void 0?x.createElement(Ar.Provider,{value:this.props.routeContext},x.createElement(Pm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(sO,{error:e},t):t}};eS.contextType=G_;var Jd=new WeakMap;function sO({children:e,error:t}){let{basename:n}=x.useContext(hn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=YN(t.digest);if(r){let i=Jd.get(t);if(i)throw i;let s=W_(r.location,n);if(q_&&!Jd.get(t))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Jd.set(t,o),o}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function oO({routeContext:e,match:t,children:n}){let r=x.useContext(Ro);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(Ar.Provider,{value:e},n)}function aO(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=r==null?void 0:r.errors;if(s!=null){let c=i.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);Ve(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let o=!1,a=-1;if(n&&r){o=r.renderFallback;for(let c=0;c<i.length;c++){let d=i[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(a=c),d.route.id){let{loaderData:f,errors:h}=r,v=d.route.loader&&!f.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||v){n.isStatic&&(o=!0),a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}}let l=n==null?void 0:n.onError,u=r&&l?(c,d)=>{var f,h;l(c,{location:r.location,params:((h=(f=r.matches)==null?void 0:f[0])==null?void 0:h.params)??{},pattern:VN(r.matches),errorInfo:d})}:void 0;return i.reduceRight((c,d,f)=>{let h,v=!1,p=null,b=null;r&&(h=s&&d.route.id?s[d.route.id]:void 0,p=d.route.errorElement||iO,o&&(a<0&&f===0?(tS("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,b=null):a===f&&(v=!0,b=d.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,f+1)),y=()=>{let w;return h?w=p:v?w=b:d.route.Component?w=x.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,x.createElement(oO,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:r!=null},children:w})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?x.createElement(eS,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:y(),routeC
92ontext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):y()},null)}function Am(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function lO(e){let t=x.useContext(Ro);return Ve(t,Am(e)),t}function uO(e){let t=x.useContext(Jc);return Ve(t,Am(e)),t}function cO(e){let t=x.useContext(Ar);return Ve(t,Am(e)),t}function Nm(e){let t=cO(e),n=t.matches[t.matches.length-1];return Ve(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function dO(){return Nm("useRouteId")}function hO(){var r;let e=x.useContext(Pm),t=uO("useRouteError"),n=Nm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function fO(){let{router:e}=lO("useNavigate"),t=Nm("useNavigate"),n=x.useRef(!1);return Z_(()=>{n.current=!0}),x.useCallback(async(i,s={})=>{rr(n.current,Y_),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Ky={};function tS(e,t,n){!t&&!Ky[e]&&(Ky[e]=!0,rr(!1,n))}x.memo(pO);function pO({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:s}){return X_(e,void 0,{manifest:t,state:r,isStatic:i,onError:s,future:n})}function hr(e){Ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function mO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,useTransitions:o}){Ve(!cl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:a,navigator:i,static:s,useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=To(n));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default",mask:v}=n,p=x.useMemo(()=>{let b=Tr(u,a);return b==null?null:{location:{pathname:b,search:c,hash:d,state:f,key:h,mask:v},navigationType:r}},[a,u,c,d,f,h,r,v]);return rr(p!=null,`<Router basename="${a}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:x.createElement(hn.Provider,{value:l},x.createElement(ul.Provider,{children:t,value:p}))}function gO({children:e,location:t}){return nO(Of(e),t)}function Of(e,t=[]){let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let s=[...t,i];if(r.type===x.Fragment){n.push.apply(n,Of(r.props.children,s));return}Ve(r.type===hr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ve(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||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=Of(r.props.children,s)),n.push(o)}),n}var vu="get",wu="application/x-www-form-urlencoded";function Qc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function yO(e){return Qc(e)&&e.tagName.toLowerCase()==="button"}function vO(e){return Qc(e)&&e.tagName.toLowerCase()==="form"}function wO(e){return Qc(e)&&e.tagName.toLowerCase()==="input"}function xO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bO(e,t){return e.button===0&&(!t||t==="_self")&&!xO(e)}var zl=null;function _O(){if(zl===null)try{new FormData(document.createElement("form"),0),zl=!1}catch{zl=!0}return zl}var SO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qd(e){return e!=null&&!SO.has(e)?(rr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wu}"`),null):e}function kO(e,t){let n,r,i,s,o;if(vO(e)){let a=e.getAttribute("action");r=a?Tr(a,t):null,n=e.getAttribute("method")||vu,i=Qd(e.getAttribute("enctype"))||wu,s=new FormData(e)}else if(yO(e)||wO(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?Tr(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||vu,i=Qd(e.getAttribute("formenctype"))||Qd(a.getAttribute("enctype"))||wu,s=new FormData(a,e),!_O()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}
92else u&&s.append(u,d)}}else{if(Qc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vu,r=null,i=wu,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Om(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nS(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&Tr(i.pathname,t)==="/"?i.pathname=`${ic(t)}/_root.${r}`:i.pathname=`${ic(i.pathname)}.${r}`,i}async function EO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function CO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function TO(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await EO(s,n);return o.links?o.links():[]}return[]}));return NO(r.flat(1).filter(CO).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Gy(e,t,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function RO(e,t,{includeHydrateFallback:n}={}){return PO(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function PO(e){return[...new Set(e)]}function AO(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function NO(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(AO(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function Im(){let e=x.useContext(Ro);return Om(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function OO(){let e=x.useContext(Jc);return Om(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jm=x.createContext(void 0);jm.displayName="FrameworkContext";function Lm(){let e=x.useContext(jm);return Om(e,"You must render this element inside a <HydratedRouter> element"),e}function IO(e,t){let n=x.useContext(jm),[r,i]=x.useState(!1),[s,o]=x.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=x.useRef(null);x.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let p=m=>{m.forEach(y=>{o(y.isIntersecting)})},b=new IntersectionObserver(p,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[e]),x.useEffect(()=>{if(r){let p=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(p)}}},[r]);let h=()=>{i(!0)},v=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:Vo(a,h),onBlur:Vo(l,v),onMouseEnter:Vo(u,h),onMouseLeave:Vo(c,v),onTouchStart:Vo(d,h)}]:[!1,f,{}]}function Vo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function jO({page:e,...t}){let n=WN(),{router:r}=Im(),i=x.useMemo(()=>z_(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?x.createElement(DO,{page:e,matches:i,...t}):x.createElement(MO,{page:e,matches:i,...t}):null}function LO(e){let{manifest:t,routeModules:n}=Lm(),[r,i]=x.useState([]);return x.useEffect(()=>{let s=!1;return TO(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function DO({page:e,matches:t,...n}){let r=or(),{future:i}=Lm(),{basename:s}=Im(),o=x.useMemo(()=>
92{if(e===r.pathname+r.search+r.hash)return[];let a=nS(e,s,i.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:u.push(c.route.id);return l&&u.length>0&&a.searchParams.set("_routes",u.join(",")),[a.pathname+a.search]},[s,i.v8_trailingSlashAwareDataRequests,e,r,t]);return x.createElement(x.Fragment,null,o.map(a=>x.createElement("link",{key:a,rel:"prefetch",as:"fetch",href:a,...n})))}function MO({page:e,matches:t,...n}){let r=or(),{future:i,manifest:s,routeModules:o}=Lm(),{basename:a}=Im(),{loaderData:l,matches:u}=OO(),c=x.useMemo(()=>Gy(e,t,u,s,r,"data"),[e,t,u,s,r]),d=x.useMemo(()=>Gy(e,t,u,s,r,"assets"),[e,t,u,s,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let p=new Set,b=!1;if(t.forEach(y=>{var S;let w=s.routes[y.route.id];!w||!w.hasLoader||(!c.some(C=>C.route.id===y.route.id)&&y.route.id in l&&((S=o[y.route.id])!=null&&S.shouldRevalidate)||w.hasClientLoader?b=!0:p.add(y.route.id))}),p.size===0)return[];let m=nS(e,a,i.v8_trailingSlashAwareDataRequests,"data");return b&&p.size>0&&m.searchParams.set("_routes",t.filter(y=>p.has(y.route.id)).map(y=>y.route.id).join(",")),[m.pathname+m.search]},[a,i.v8_trailingSlashAwareDataRequests,l,r,s,c,t,e,o]),h=x.useMemo(()=>RO(d,s),[d,s]),v=LO(d);return x.createElement(x.Fragment,null,f.map(p=>x.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),h.map(p=>x.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),v.map(({key:p,link:b})=>x.createElement("link",{key:p,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function $O(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var FO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{FO&&(window.__reactRouterVersion="7.16.0")}catch{}function zO({basename:e,children:t,useTransitions:n,window:r}){let i=x.useRef();i.current==null&&(i.current=vN({window:r,v5Compat:!0}));let s=i.current,[o,a]=x.useState({action:s.action,location:s.location}),l=x.useCallback(u=>{n===!1?a(u):x.startTransition(()=>a(u))},[n]);return x.useLayoutEffect(()=>s.listen(l),[s,l]),x.createElement(mO,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s,useTransitions:n})}var rS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yc=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,mask:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h,...v},p){let{basename:b,navigator:m,useTransitions:y}=x.useContext(hn),w=typeof c=="string"&&rS.test(c),S=W_(c,b);c=S.to;let C=XN(c,{relative:i}),k=or(),T=null;if(a){let $=Rm(a,[],k.mask?k.mask.pathname:"/",!0);b!=="/"&&($.pathname=$.pathname==="/"?b:jn([b,$.pathname])),T=m.createHref($)}let[R,P,O]=IO(r,v),L=VO(c,{replace:o,mask:a,state:l,target:u,preventScrollReset:d,relative:i,viewTransition:f,defaultShouldRevalidate:h,useTransitions:y});function A($){t&&t($),$.defaultPrevented||L($)}let V=!(S.isExternal||s),M=x.createElement("a",{...v,...O,href:(V?T:void 0)||S.absoluteURL||C,onClick:V?A:t,ref:$O(p,P),target:u,"data-discover":!w&&n==="render"?"true":void 0});return R&&!w?x.createElement(x.Fragment,null,M,x.createElement(jO,{page:C})):M});Yc.displayName="Link";var UO=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},c){let d=dl(o,{relative:u.relative}),f=or(),h=x.useContext(Jc),{navigator:v,basename:p}=x.useContext(hn),b=h!=null&&JO(d)&&a===!0,m=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,y=f.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(y=y.toLowerCase(),w=w?w.toLowerCase():null,m=m.toLowerCase()),w&&p&&(w=Tr(w,p)||w);const S=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=y===m||!i&&y.startsWith(m)&&y.charAt(S)==="/",k=w!=null&&(w===m||!i&&w.startsWith(m)&&w.charAt(m.length)==="/"),T={isActive:C,isPending:k,isTransitioning:b},R=C?t:void 0,P;typeof r=="function"?P=r(T):P=[r,C?"active":null,k?"pending":null,b?"transitioning":null].filter(
92Boolean).join(" ");let O=typeof s=="function"?s(T):s;return x.createElement(Yc,{...u,"aria-current":R,className:P,ref:c,style:O,to:o,viewTransition:a},typeof l=="function"?l(T):l)});UO.displayName="NavLink";var BO=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=vu,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:f,...h},v)=>{let{useTransitions:p}=x.useContext(hn),b=KO(),m=GO(a,{relative:u}),y=o.toLowerCase()==="get"?"get":"post",w=typeof a=="string"&&rS.test(a),S=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let k=C.nativeEvent.submitter,T=(k==null?void 0:k.getAttribute("formmethod"))||o,R=()=>b(k||C.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:f});p&&n!==!1?x.startTransition(()=>R()):R()};return x.createElement("form",{ref:v,method:y,action:m,onSubmit:r?l:S,...h,"data-discover":!w&&e==="render"?"true":void 0})});BO.displayName="Form";function HO(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function iS(e){let t=x.useContext(Ro);return Ve(t,HO(e)),t}function VO(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:a,defaultShouldRevalidate:l,useTransitions:u}={}){let c=eO(),d=or(),f=dl(e,{relative:o});return x.useCallback(h=>{if(bO(h,t)){h.preventDefault();let v=n!==void 0?n:Ba(d)===Ba(f),p=()=>c(e,{replace:v,mask:r,state:i,preventScrollReset:s,relative:o,viewTransition:a,defaultShouldRevalidate:l});u?x.startTransition(()=>p()):p()}},[d,c,f,n,r,i,t,e,s,o,a,l,u])}var qO=0,WO=()=>`__${String(++qO)}__`;function KO(){let{router:e}=iS("useSubmit"),{basename:t}=x.useContext(hn),n=dO(),r=e.fetch,i=e.navigate;return x.useCallback(async(s,o={})=>{let{action:a,method:l,encType:u,formData:c,body:d}=kO(s,t);if(o.navigate===!1){let f=o.fetcherKey||WO();await r(f,n,o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,flushSync:o.flushSync})}else await i(o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||l,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}function GO(e,{relative:t}={}){let{basename:n}=x.useContext(hn),r=x.useContext(Ar);Ve(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...dl(e||".",{relative:t})},o=or();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:jn([n,s.pathname])),Ba(s)}function JO(e,{relative:t}={}){let n=x.useContext(J_);Ve(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=iS("useViewTransitionState"),i=dl(e,{relative:t});if(!n.isTransitioning)return!1;let s=Tr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Tr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return rc(i.pathname,o)!=null||rc(i.pathname,s)!=null}const QO=mm("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"}}),at=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?cT:"button";return g.jsx(o,{className:Re(QO({variant:t,size:n,className:e})),ref:s,...i})});at.displayName="Button";const YO="/assets/jewelry-families-banner-c3LHV9QJ.png";function ZO({onStart:e,isRedirecting:t=!1}){return g.jsxs("div",{className:"min-h-screen flex flex-col items-center relative overflow-hidden",children:[g.jsxs("div",{className:"absolute inset-0 opacity-[0.03]",children:[g.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 rounded-full bg-gold blur-3xl"}),g.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-64 h-64 roun
92ded-full bg-gold-light blur-3xl"})]}),g.jsxs("section",{className:"w-full px-4 py-6 md:py-10 relative z-10",children:[g.jsx("div",{className:"w-full max-w-5xl mx-auto mb-6 md:mb-8",children:g.jsx("img",{src:YO,alt:"Les 5 familles de joaillerie : Les créateurs du geste, Les icônes identitaires, Les signatures du quotidien, Les singulières culturelles, Les graals secrets",className:"w-full h-auto rounded-xl shadow-sm"})}),g.jsxs("div",{className:"max-w-2xl mx-auto text-center stagger-children",children:[g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mb-6"}),g.jsx("p",{className:"text-sm md:text-base tracking-[0.3em] uppercase text-taupe mb-4 font-sans font-medium",children:"Votre diagnostic stratégique"}),g.jsx("p",{className:"text-lg md:text-xl text-muted-foreground font-light italic font-serif mb-6",children:"La stratégie précède toujours la visibilité."}),g.jsxs("h1",{className:"text-display text-foreground mb-8",children:["Où se situe réellement",g.jsx("br",{}),g.jsx("span",{className:"text-gold-gradient",children:"votre marque de joaillerie"})," ?"]}),g.jsx("p",{className:"text-base md:text-lg text-muted-foreground max-w-xl mx-auto mb-4 font-light leading-relaxed",children:"Un diagnostic stratégique pour révéler votre positionnement, vos tensions clés et votre potentiel de développement."}),g.jsx("p",{className:"text-sm text-taupe mb-10 tracking-wide",children:"Méthode développée par Sylvie Arkoun — consultante en stratégie et storytelling joaillier"}),g.jsx(at,{onClick:e,size:"lg",disabled:t,className:"bg-primary hover:bg-primary/90 text-primary-foreground px-10 py-6 text-base font-sans tracking-wide btn-shine gold-glow disabled:opacity-70",children:"Commencer le diagnostic"}),g.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"Restitution immédiate et détaillée par email"}),g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mt-6"})]})]}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("h2",{className:"text-headline text-foreground mb-6",children:"Pourquoi se poser cette question maintenant ?"}),g.jsx("p",{className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed",children:"Parce qu'avant de communiquer, avant de créer du contenu, avant de refaire un site ou d'investir en visibilité, il est essentiel de savoir où vous en êtes réellement, et où vous allez."}),g.jsx("p",{className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed mt-6",children:"Avec un diagnostic, on avance avec clarté, cohérence et intention."})]})}),g.jsx("div",{className:"w-16 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto"}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("h2",{className:"text-headline text-foreground mb-6",children:"À quoi ça sert concrètement ?"}),g.jsx("p",{className:"text-base text-muted-foreground font-light mb-8",children:"Ce diagnostic vous permet de :"}),g.jsxs("ul",{className:"space-y-5 text-left max-w-lg mx-auto",children:[g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gold mt-2.5 shrink-0"}),g.jsx("span",{className:"text-base text-foreground/90 font-light leading-relaxed",children:"Comprendre votre positionnement réel sur le marché de la joaillerie"})]}),g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gold mt-2.5 shrink-0"}),g.jsx("span",{className:"text-base text-foreground/90 font-light leading-relaxed",children:"Identifier vos zones de tension et de potentiel"})]}),g.jsxs("li",{className:"flex items-start gap-3",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gold mt-2.5 shrink-0"}),g.jsx("span",{className:"text-base text-foreground/90 font-light leading-relaxed",children:"Savoir quoi activer, et quoi arrêter, maintenant"})]})]})]})}),g.jsx("div",{className:"w-16 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto"}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("h2",{className:"text-headline text-foreground mb-6",children:"Comment ça se passe ?"}),g.jsx("p",{className:"text-base text-muted-foreground font-light mb-10",children:"Environ 8 à 10 minutes pour répondre au questionnaire"}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-xl md:max-w-none mx-auto",children:[g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"w-10 h-10 rounded-full border border-border flex items-center justify-center mx-auto mb-4",children:g.jsx("span",{className:"text-sm font-serif text-gold",children:"1"})}
92),g.jsx("p",{className:"text-sm text-foreground/80 font-light leading-relaxed",children:"Diagnostic stratégique dédié aux marques de joaillerie"})]}),g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"w-10 h-10 rounded-full border border-border flex items-center justify-center mx-auto mb-4",children:g.jsx("span",{className:"text-sm font-serif text-gold",children:"2"})}),g.jsx("p",{className:"text-sm text-foreground/80 font-light leading-relaxed",children:"Analyse automatique et structurée de vos réponses"})]}),g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"w-10 h-10 rounded-full border border-border flex items-center justify-center mx-auto mb-4",children:g.jsx("span",{className:"text-sm font-serif text-gold",children:"3"})}),g.jsx("p",{className:"text-sm text-foreground/80 font-light leading-relaxed",children:"Restitution immédiate et détaillée, envoyée par email dès la validation"})]})]})]})}),g.jsx("div",{className:"w-16 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto"}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("h2",{className:"text-headline text-foreground mb-6",children:"Et après ?"}),g.jsxs("p",{className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed mb-6",children:["Ce diagnostic constitue le point de départ de la méthode ",g.jsx("span",{className:"italic",children:"Diagnostic & Décisions"}),"."]}),g.jsx("p",{className:"text-base md:text-lg text-muted-foreground font-light leading-relaxed mb-4",children:"Il permet, si vous le souhaitez, d'ouvrir sur un accompagnement stratégique sur-mesure, adapté à la réalité, au rythme et à l'ambition de votre marque."}),g.jsx("p",{className:"text-sm text-taupe tracking-wide mb-6",children:"Aucune obligation."}),g.jsxs("p",{className:"text-base text-foreground/90 font-light leading-relaxed",children:["Le diagnostic vous donne d'abord de la clarté.",g.jsx("br",{}),"La suite peut se décider ensemble."]})]})}),g.jsx("div",{className:"w-16 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto"}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx("div",{className:"mb-6",children:g.jsx("span",{className:"text-4xl md:text-5xl font-serif font-light text-foreground",children:"Offert"})}),g.jsx("p",{className:"text-base text-muted-foreground font-light leading-relaxed max-w-lg mx-auto",children:"Il n'y a pas de bonne ou de mauvaise réponse. Prenez le temps de répondre avec sincérité — la restitution immédiate vous permet de poser, dès maintenant, des décisions plus justes pour votre marque."})]})}),g.jsx("div",{className:"w-16 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto"}),g.jsx("section",{className:"w-full px-4 py-10 md:py-14 pb-16 relative z-10",children:g.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[g.jsx(at,{onClick:e,size:"lg",disabled:t,className:"bg-primary hover:bg-primary/90 text-primary-foreground px-10 py-6 text-base font-sans tracking-wide btn-shine gold-glow disabled:opacity-70",children:"Commencer le diagnostic"}),g.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-xs text-muted-foreground mt-6",children:[g.jsx("span",{children:"Environ 10 minutes"}),g.jsx("span",{className:"hidden md:inline text-border",children:"•"}),g.jsx("span",{children:"Diagnostic & restitution immédiate par email"}),g.jsx("span",{className:"hidden md:inline text-border",children:"•"}),g.jsx("span",{children:"100 % confidentiel"})]})]})})]})}const Ji=x.forwardRef(({className:e,type:t,...n},r)=>g.jsx("input",{type:t,className:Re("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}));Ji.displayName="Input";const sS=x.forwardRef(({className:e,...t},n)=>g.jsx("textarea",{className:Re("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
92ing-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}));sS.displayName="Textarea";function oS({question:e,currentIndex:t,totalQuestions:n,value:r,onAnswer:i,onNext:s,onPrevious:o,canGoBack:a,bypassValidation:l=!1}){var v,p;const u=(t+1)/n*100,c=b=>{i(b)},d=b=>{i(b)},f=b=>{const m=Array.isArray(r)?r:[];m.includes(b)?i(m.filter(y=>y!==b)):i([...m,b])},h=()=>e.type==="text"?typeof r=="string"&&r.trim().length>0:e.type==="multi-select"?Array.isArray(r)&&r.length>0:r!==void 0&&r!=="";return g.jsxs("div",{className:"min-h-screen flex flex-col px-6 py-8 md:py-16",children:[g.jsxs("div",{className:"max-w-xl mx-auto w-full mb-8",children:[g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsxs("span",{className:"text-xs text-muted-foreground font-sans tracking-wide",children:["Question ",t+1," / ",n]}),g.jsxs("span",{className:"text-xs text-gold font-sans",children:[Math.round(u),"%"]})]}),g.jsx("div",{className:"progress-gold",children:g.jsx("div",{style:{width:`${u}%`}})})]}),g.jsx("div",{className:"flex-1 flex flex-col justify-center max-w-xl mx-auto w-full",children:g.jsxs("div",{className:"fade-in",children:[g.jsx("div",{className:"text-xs text-gold tracking-widest uppercase mb-4 font-sans",children:e.section.replace("-"," ")}),g.jsx("h2",{className:"text-headline text-foreground mb-4 leading-tight",children:e.question}),e.description&&g.jsx("p",{className:"text-sm text-muted-foreground font-sans mb-8 leading-relaxed",children:e.description}),g.jsxs("div",{className:"space-y-3",children:[e.type==="text"&&g.jsx("div",{children:e.id==="raison_etre"?g.jsx(sS,{value:typeof r=="string"?r:"",onChange:b=>i(b.target.value),placeholder:"Écrivez ici...",className:"min-h-[120px] text-base bg-card border-border focus:border-gold focus:ring-gold/20 resize-none font-sans"}):g.jsx(Ji,{type:"text",value:typeof r=="string"?r:"",onChange:b=>i(b.target.value),placeholder:"Votre réponse...",className:"text-base bg-card border-border focus:border-gold focus:ring-gold/20 font-sans"})}),e.type==="scale"&&g.jsxs("div",{className:"pt-4",children:[g.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-4 font-sans",children:[g.jsx("span",{children:(v=e.scaleLabels)==null?void 0:v.min}),g.jsx("span",{children:(p=e.scaleLabels)==null?void 0:p.max})]}),g.jsx("div",{className:"flex justify-center gap-3",children:[1,2,3].map(b=>g.jsx("button",{onClick:()=>c(b),className:Re("w-16 h-16 rounded-sm border-2 transition-all duration-200 font-serif text-xl",r===b?"border-gold bg-gold/10 text-gold":"border-border hover:border-gold/50 text-muted-foreground hover:text-foreground"),children:b},b))})]}),e.type==="select"&&e.options&&g.jsx("div",{className:"space-y-2",children:e.options.map(b=>g.jsxs("button",{onClick:()=>d(b.value),className:Re("w-full p-4 text-left rounded-sm border transition-all duration-200",r===b.value?"border-gold bg-gold/5 text-foreground":"border-border hover:border-gold/50 text-foreground/80 hover:text-foreground bg-card"),children:[g.jsx("span",{className:"font-sans text-sm",children:b.label}),b.description&&g.jsx("span",{className:"block text-xs text-muted-foreground mt-1",children:b.description})]},b.value))}),e.type==="multi-select"&&e.options&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-3 font-sans",children:"Plusieurs choix possibles"}),e.options.map(b=>{const m=Array.isArray(r)&&r.includes(b.value);return g.jsx("button",{onClick:()=>f(b.value),className:Re("w-full p-4 text-left rounded-sm border transition-all duration-200",m?"border-gold bg-gold/5 text-foreground":"border-border hover:border-gold/50 text-foreground/80 hover:text-foreground bg-card"),children:g.jsx("span",{className:"font-sans text-sm",children:b.label})},b.value)})]})]})]})}),g.jsxs("div",{className:"max-w-xl mx-auto w-full pt-8 flex gap-4",children:[a&&g.jsx(at,{variant:"outline",onClick:o,className:"flex-1 border-border hover:border-gold/50 hover:bg-card font-sans",children:"Précédent"}),g.jsx(at,{onClick:s,disabled:!l&&e.required&&!h(),className:Re("flex-1 bg-primary hover:bg-primary/90 text-primary-foreground font-sans btn-shine",!a&&"w-full"),children:t===n-1?"Terminer":"Suivant"})]})]})}var Te;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},e.find=(i,s)=>{for(const o of i)if(s(o))return o}
vendor: 5,833 bytes, line 92
92,e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Te||(Te={}));var Jy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Jy||(Jy={}));const te=Te.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qr=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return Number.isNaN(e)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},H=Te.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Rr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}static assert(t){if(!(t instanceof Rr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Te.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Rr.create=e=>new Rr(e);const If=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Te.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Te.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Te.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Te.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Te.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,Te.assertNever(e)}return{message:n}};let XO=If;function eI(){return XO}const tI=e=>
vendor: 17,801 bytes, line 92
92{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}};function Y(e,t){const n=eI(),r=tI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===If?void 0:If].filter(i=>!!i)});e.common.issues.push(r)}class Yt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,o=await i.value;r.push({key:s,value:o})}return Yt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return le;s.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:t.value,value:r}}}const le=Object.freeze({status:"aborted"}),Zo=e=>({status:"dirty",value:e}),fn=e=>({status:"valid",value:e}),Qy=e=>e.status==="aborted",Yy=e=>e.status==="dirty",go=e=>e.status==="valid",sc=e=>typeof Promise<"u"&&e instanceof Promise;var ne;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ne||(ne={}));class wi{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zy=(e,t)=>{if(go(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Rr(e.common.issues);return this._error=n,this._error}}};function ve(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,a)=>{const{message:l}=e;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:i}}class ke{get description(){return this._def.description}_getType(t){return qr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Yt,ctx:{common:t.parent.common,data:t.data,parsedType:qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(sc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Zy(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return go(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>go(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(sc(i)?i:Promise.resolve(i));return Zy(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const o=t(i),a=()=>s.addIssue({code:H.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new vo({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return hi.create(this,this._def)}nullable(){return wo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return tr.create(this)}promise(){return uc.create(this,this._def)}or(t){return ac.create([this,t],this._def)}and(t){return lc.create(this,t,this._def)}transform(t){return new vo({...ve(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Lf({...ve(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new kI({typeName:ue.ZodBranded,type:this,...ve(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Df({...ve(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Dm.create(this,t)}readonly(){return Mf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const nI=/^c[^\s-]{8,}$/i,rI=/^[0-9a-z]+$/,iI=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sI=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,oI=/^[a-z0-9_-]{21}$/i,aI=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,lI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uI=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Yd;const dI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hI=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,pI=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mI=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gI=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,aS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",yI=new RegExp(`^${aS}$`);function lS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function vI(e){return new RegExp(`^${lS(e)}$`)}function wI(e){let t=`${aS}T${lS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function xI(e,t){return!!((t==="v4"||!t)&&dI.test(e)||(t==="v6"||!t)&&fI.test(e))}function bI(e,t){if(!aI.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function _I(e,t){return!!((t==="v4"||!t)&&hI.test(e)||(t==="v6"||!t)&&pI.test(e))}class ri extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const s=this._getOrReturnCtx(t);return Y(s,{code:H.invalid_type,expected:te.string,received:s.parsedType}),le}const r=new Yt;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),Y(i,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),Y(i,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const o=t.data.length>s.value,a=t.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(t,i),o?Y(i,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&Y(i,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")uI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"email",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Yd||(Yd=new RegExp(cI,"u")),Yd.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"emoji",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")sI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"uuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")oI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"nanoid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")nI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"cuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")rI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"cuid2",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")iI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"ulid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Y(i,{validation:"url",code:H.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"regex",code:H.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wI(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?yI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?vI(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{code:H.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?lI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"duration",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?xI(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"ip",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?bI(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"jwt",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?_I(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"cidr",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?mI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"base64",code:H.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?gI.test(t.data)||(i=this._getOrReturnCtx(t,i),Y(i,{validation:"base64url",code:H.invalid_string,message:s.message}),r.dirty()):Te.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:H.invalid_string,...ne.errToObj(r)})}_addCheck(t){return new ri({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ne.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ne.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ne.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ne.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ne.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ne.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ne.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ne.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ne.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ne.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ne.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ne.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ne.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...ne.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ne.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ne.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ne.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ne.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ne.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ne.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ne.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ne.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ne.errToObj(n)})}nonempty(t){return this.min(1,ne.errToObj(t))}trim(){return new ri({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ri({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ri({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,658 bytes, line 92
92get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ri.create=e=>new ri({checks:[],typeName:ue.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...ve(e)});function SI(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}class Ha extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const s=this._getOrReturnCtx(t);return Y(s,{code:H.invalid_type,expected:te.number,received:s.parsedType}),le}let r;const i=new Yt;for(const s of this._def.checks)s.kind==="int"?Te.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Y(r,{code:H.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?SI(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Y(r,{code:H.not_finite,message:s.message}),i.dirty()):Te.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ne.toString(n))}setLimit(t,n,r,i){return new Ha({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ne.toString(i)}]})}_addCheck(t){return new Ha({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ne.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ne.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ne.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ne.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ne.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Te.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}
vendor: 4,588 bytes, line 92
92}Ha.create=e=>new Ha({checks:[],typeName:ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ve(e)});class Va extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==te.bigint)return this._getInvalidInput(t);let r;const i=new Yt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Y(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Te.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Y(n,{code:H.invalid_type,expected:te.bigint,received:n.parsedType}),le}gte(t,n){return this.setLimit("min",t,!0,ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ne.toString(n))}setLimit(t,n,r,i){return new Va({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ne.toString(i)}]})}_addCheck(t){return new Va({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ne.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Va.create=e=>new Va({checks:[],typeName:ue.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...ve(e)});class Xy extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.boolean,received:r.parsedType}),le}return fn(t.data)}}Xy.create=e=>new Xy({typeName:ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ve(e)});class oc extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const s=this._getOrReturnCtx(t);return Y(s,{code:H.invalid_type,expected:te.date,received:s.parsedType}),le}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Y(s,{code:H.invalid_date}),le}const r=new Yt;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),Y(i,{code:H.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),Y(i,{code:H.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Te.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new oc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ne.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ne.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}oc.create=e=>new oc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ue.ZodDate,...ve(e)});class ev extends ke{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.symbol,received:r.parsedType}),le}return fn(t.data)}}ev.create=e=>new ev({typeName:ue.ZodSymbol,...ve(e)});class tv extends ke{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.undefined,received:r.parsedType}),le}return fn(t.data)}}tv.create=e=>
vendor: 17,581 bytes, line 92
92new tv({typeName:ue.ZodUndefined,...ve(e)});class nv extends ke{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.null,received:r.parsedType}),le}return fn(t.data)}}nv.create=e=>new nv({typeName:ue.ZodNull,...ve(e)});class rv extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return fn(t.data)}}rv.create=e=>new rv({typeName:ue.ZodAny,...ve(e)});class iv extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return fn(t.data)}}iv.create=e=>new iv({typeName:ue.ZodUnknown,...ve(e)});class xi extends ke{_parse(t){const n=this._getOrReturnCtx(t);return Y(n,{code:H.invalid_type,expected:te.never,received:n.parsedType}),le}}xi.create=e=>new xi({typeName:ue.ZodNever,...ve(e)});class sv extends ke{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.void,received:r.parsedType}),le}return fn(t.data)}}sv.create=e=>new sv({typeName:ue.ZodVoid,...ve(e)});class tr extends ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==te.array)return Y(n,{code:H.invalid_type,expected:te.array,received:n.parsedType}),le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(Y(n,{code:o?H.too_big:H.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Y(n,{code:H.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Y(n,{code:H.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new wi(n,o,n.path,a)))).then(o=>Yt.mergeArray(r,o));const s=[...n.data].map((o,a)=>i.type._parseSync(new wi(n,o,n.path,a)));return Yt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new tr({...this._def,minLength:{value:t,message:ne.toString(n)}})}max(t,n){return new tr({...this._def,maxLength:{value:t,message:ne.toString(n)}})}length(t,n){return new tr({...this._def,exactLength:{value:t,message:ne.toString(n)}})}nonempty(t){return this.min(1,t)}}tr.create=(e,t)=>new tr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...ve(t)});function bs(e){if(e instanceof Je){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=hi.create(bs(r))}return new Je({...e._def,shape:()=>t})}else return e instanceof tr?new tr({...e._def,type:bs(e.element)}):e instanceof hi?hi.create(bs(e.unwrap())):e instanceof wo?wo.create(bs(e.unwrap())):e instanceof ns?ns.create(e.items.map(t=>bs(t))):e}class Je extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Te.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==te.object){const u=this._getOrReturnCtx(t);return Y(u,{code:H.invalid_type,expected:te.object,received:u.parsedType}),le}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xi&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=s[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new wi(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof xi){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(Y(i,{code:H.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new wi(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>Yt.mergeObjectSync(r,u)):Yt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ne.errToObj,new Je({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,o;const i=((o=(s=this._def).errorMap)==null?void 0:o.call(s,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ne.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Je({...this._def,unknownKeys:"strip"})}passthrough(){return new Je({...this._def,unknownKeys:"passthrough"})}extend(t){return new Je({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Je({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ue.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Je({...this._def,catchall:t})}pick(t){const n={};for(const r of Te.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Je({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Te.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Je({...this._def,shape:()=>n})}deepPartial(){return bs(this)}partial(t){const n={};for(const r of Te.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new Je({...this._def,shape:()=>n})}required(t){const n={};for(const r of Te.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof hi;)s=s._def.innerType;n[r]=s}return new Je({...this._def,shape:()=>n})}keyof(){return uS(Te.objectKeys(this.shape))}}Je.create=(e,t)=>new Je({shape:()=>e,unknownKeys:"strip",catchall:xi.create(),typeName:ue.ZodObject,...ve(t)});Je.strictCreate=(e,t)=>new Je({shape:()=>e,unknownKeys:"strict",catchall:xi.create(),typeName:ue.ZodObject,...ve(t)});Je.lazycreate=(e,t)=>new Je({shape:e,unknownKeys:"strip",catchall:xi.create(),typeName:ue.ZodObject,...ve(t)});class ac extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new Rr(a.ctx.common.issues));return Y(n,{code:H.invalid_union,unionErrors:o}),le}if(n.common.async)return Promise.all(r.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(l=>new Rr(l));return Y(n,{code:H.invalid_union,unionErrors:a}),le}}get options(){return this._def.options}}ac.create=(e,t)=>new ac({options:e,typeName:ue.ZodUnion,...ve(t)});function jf(e,t){const n=qr(e),r=qr(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const i=Te.objectKeys(t),s=Te.objectKeys(e).filter(a=>i.indexOf(a)!==-1),o={...e,...t};for(const a of s){const l=jf(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const o=e[s],a=t[s],l=jf(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class lc extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,o)=>{if(Qy(s)||Qy(o))return le;const a=jf(s.value,o.value);return a.valid?((Yy(s)||Yy(o))&&n.dirty(),{status:n.value,value:a.data}):(Y(r,{code:H.invalid_intersection_types}),le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}lc.create=(e,t,n)=>new lc({left:e,right:t,typeName:ue.ZodIntersection,...ve(n)});class ns extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return Y(r,{code:H.invalid_type,expected:te.array,received:r.parsedType}),le;if(r.data.length<this._def.items.length)return Y(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),le;!this._def.rest&&r.data.length>this._def.items.length&&(Y(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new wi(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>Yt.mergeArray(n,o)):Yt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ns({...this._def,rest:t})}}ns.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ns({items:e,typeName:ue.ZodTuple,rest:null,...ve(t)})};class ov extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return Y(r,{code:H.invalid_type,expected:te.map,received:r.parsedType}),le;const i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new wi(r,a,r.path,[u,"key"])),value:s._parse(new wi(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return le;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}ov.create=(e,t,n)=>new ov({valueType:t,keyType:e,typeName:ue.ZodMap,...ve(n)});class qa extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return Y(r,{code:H.invalid_type,expected:te.set,received:r.parsedType}),le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Y(r,{code:H.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Y(r,{code:H.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return le;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new wi(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new qa({...this._def,minSize:{value:t,message:ne.toString(n)}})}max(t,n){return new qa({...this._def,maxSize:{value:t,message:ne.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}qa.create=(e,t)=>new qa({valueType:e,minSize:null,maxSize:null,typeName:ue.ZodSet,...ve(t)});class av extends ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}av.create=(e,t)=>new av({getter:e,typeName:ue.ZodLazy,...ve(t)});class lv extends ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Y(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),le}return{status:"valid",value:t.data}}get value(){return this._def.value}}lv.create=(e,t)=>new lv({value:e,typeName:ue.ZodLiteral,...ve(t)});function uS(e,t){return new yo({values:e,typeName:ue.ZodEnum,...ve(t)})}class yo extends ke{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Y(n,{expected:Te.joinValues(r),received:n.parsedType,code:H.invalid_type}),le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Y(n,{received:n.data,code:H.invalid_enum_value,options:r}),le}return fn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return yo.create(t,{...this._def,...n})}exclude(t,n=this._def){return yo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}yo.create=uS;class uv extends ke{_parse(t){const n=Te.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const i=Te.objectValues(n);return Y(r,{expected:Te.joinValues(i),received:r.parsedType,code:H.invalid_type}),le}if(this._cache||(this._cache=new Set(Te.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Te.objectValues(n);return Y(r,{received:r.data,code:H.invalid_enum_value,options:i}),le}return fn(t.data)}get enum(){return this._def.values}}uv.create=(e,t)=>new uv({values:e,typeName:ue.ZodNativeEnum,...ve(t)});class uc extends ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return Y(n,{code:H.invalid_type,expected:te.promise,received:n.parsedType}),le;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return fn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}uc.create=(e,t)=>new uc({type:e,typeName:ue.ZodPromise,...ve(t)});class vo extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o=>{Y(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(r.data,s);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return le;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?le:l.status==="dirty"||n.value==="dirty"?Zo(l.value):l});{if(n.value==="aborted")return le;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?le:a.status==="dirty"||n.value==="dirty"?Zo(a.value):a}}if(i.type==="refinement"){const o=a=>{const l=i.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!go(o))return le;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>go(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):le);Te.assertNever(i)}}vo.create=(e,t,n)=>new vo({schema:e,typeName:ue.ZodEffects,effect:t,...ve(n)});vo.createWithPreprocess=(e,t,n)=>new vo({schema:t,effect:{type:"preprocess",transform:e},typeName:ue.ZodEffects,...ve(n)});class hi extends ke{_parse(t){return this._getType(t)===te.undefined?fn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}hi.create=(e,t)=>new hi({innerType:e,typeName:ue.ZodOptional,...ve(t)});class wo extends ke{_parse(t){return this._getType(t)===te.null?fn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wo.create=(e,t)=>new wo({innerType:e,typeName:ue.ZodNullable,...ve(t)});class Lf extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Lf.create=(e,t)=>new Lf({innerType:e,typeName:ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ve(t)});class Df extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sc(i)?i.then(s=>
92({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Rr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Rr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Df.create=(e,t)=>new Df({innerType:e,typeName:ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ve(t)});class cv extends ke{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return Y(r,{code:H.invalid_type,expected:te.nan,received:r.parsedType}),le}return{status:"valid",value:t.data}}}cv.create=e=>new cv({typeName:ue.ZodNaN,...ve(e)});class kI extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Dm extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?le:s.status==="dirty"?(n.dirty(),Zo(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Dm({in:t,out:n,typeName:ue.ZodPipeline})}}class Mf extends ke{_parse(t){const n=this._def.innerType._parse(t),r=i=>(go(i)&&(i.value=Object.freeze(i.value)),i);return sc(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Mf.create=(e,t)=>new Mf({innerType:e,typeName:ue.ZodReadonly,...ve(t)});Je.lazycreate;var ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ue||(ue={}));const dv=ri.create;xi.create;tr.create;const EI=Je.create;Je.strictCreate;ac.create;lc.create;ns.create;yo.create;uc.create;hi.create;wo.create;const CI=EI({email:dv().trim().email("Veuillez entrer un email valide").max(255),brandName:dv().trim().nonempty("Veuillez indiquer le nom de votre marque").max(120,"120 caractères maximum")});function TI({onSubmit:e,isLoading:t=!1}){const[n,r]=x.useState(""),[i,s]=x.useState(""),[o,a]=x.useState({}),l=u=>{u.preventDefault();const c=CI.safeParse({email:n,brandName:i});if(!c.success){const d={};for(const f of c.error.issues){const h=f.path[0];d[h]||(d[h]=f.message)}a(d);return}a({}),e({email:c.data.email,brandName:c.data.brandName})};return g.jsx("div",{className:"min-h-screen flex flex-col justify-center items-center px-6 py-16",children:g.jsxs("div",{className:"max-w-md mx-auto w-full text-center fade-in",children:[g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mb-10"}),g.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-border rounded-sm p-8 md:p-10",children:[g.jsx("div",{className:"w-16 h-16 mx-auto mb-6 rounded-full bg-gold/10 flex items-center justify-center",children:g.jsx("span",{className:"text-2xl",children:"✦"})}),g.jsx("h2",{className:"text-headline text-foreground mb-4",children:"Avant de commencer"}),g.jsx("p",{className:"text-muted-foreground font-sans text-sm mb-8 leading-relaxed",children:"Indiquez votre email et le nom de votre marque pour démarrer le diagnostic et recevoir votre analyse."}),g.jsxs("form",{onSubmit:l,className:"space-y-4 text-left",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs uppercase tracking-wider text-muted-foreground font-sans mb-2",children:"Nom de la marque"}),g.jsx(Ji,{type:"text",value:i,onChange:u=>{s(u.target.value),a(c=>({...c,brandName:void 0}))},placeholder:"Votre marque",maxLength:120,className:"bg-background border-border focus:border-gold focus:ring-gold/20 font-sans",disabled:t}),o.brandName&&g.jsx("p",{className:"text-destructive text-xs mt-2 font-sans",children:o.brandName})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs uppercase tracking-wider text-muted-foreground font-sans mb-2",children:"Email professionnel"}),g.jsx(Ji,{type:"email",value:n,onChange:u=>{r(u.target.value),a(c=>({...c,email:void 0}))},placeholder:"[email protected]",maxLength:255,className:"bg-background border-border focus:border-gold focus:ring-gold/20 font-sans",disabled:t}),o.email&&g.jsx("p",{className:"text-destructive text-xs mt-2 font-sans",children:o.email})]}),g.jsx("p",{className:"text-xs text-muted-foreground font-sans leading-relaxed",children:"En renseignant votre adresse email, vous acceptez d'être contacté(e) par Sylvie Arkoun pour recevoir des informations sur ses actualités et offres d'accompagnement. Vous pouvez vous désinscrire à tout moment."}),g.jsx(at,{type:"submit",disabled:t||!n.trim()||!i.trim(),className:"w-full bg-primary hover:bg-primary/90 text-primary-foreground font-sans btn-shine",children:"Commencer le diagnostic"})]}),g.jsx("p",{className:"text-xs text-muted-foreground mt-6 font-sans",children:"Aucun spam. Vos informations restent confidentielles."})]}),g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mt-10"})]})})}const Li=[{id:"brand_name",section:"positioning",question:"Quel est le nom de votre marque ?",type:"text",required:!0},{id:"creation_year",section:"positioning",question:"Depuis combien de temps avez-vous créé votre marque ?",type:"select",required:!0,options:[{value:1,label:"Moins de 1 an"},{value:2,label:"1 à 3 ans"},{value:3,label:"3 à 5 ans"},{value:4,label:"5 à 10 ans"},{value:5,label:"Plus de 10 ans"}
92]},{id:"revenue",section:"positioning",question:"Quel chiffre d'affaires sur les 12 derniers mois ?",type:"select",required:!0,options:[{value:1,label:"Moins de 50 K€"},{value:2,label:"50 à 299 K€"},{value:3,label:"300 à 699 K€"},{value:4,label:"700 à 999 K€"},{value:5,label:"Plus de 1 M€"}]},{id:"instagram_size",section:"positioning",question:"Quelle taille de communauté Instagram ?",type:"select",required:!0,options:[{value:1,label:"Moins de 500"},{value:2,label:"500 à 4 999"},{value:3,label:"5 000 à 9 999"},{value:4,label:"10 000 à 29 999"},{value:5,label:"Plus de 30 000"}]},{id:"eshop_share",section:"positioning",question:"Quelle est la part du CA réalisée sur votre Eshop ?",type:"select",required:!0,options:[{value:1,label:"Moins de 10%"},{value:2,label:"10% à 29%"},{value:3,label:"30% à 40%"},{value:4,label:"50% à 60%"},{value:5,label:"Plus de 60%"}]},{id:"sales_distribution",section:"positioning",question:"Quel est votre mode de distribution ?",type:"select",required:!0,options:[{value:1,label:"Uniquement en vente directe (Eshop, showroom ou boutique en propre)"},{value:2,label:"Majoritairement en direct (+70%)"},{value:3,label:"Équilibre vente directe / wholesale"},{value:4,label:"Majoritairement wholesale (+70%)"},{value:5,label:"Exclusivement wholesale"}]},{id:"own_sales",section:"positioning",question:"Disposez-vous d'une ou plusieurs boutiques en propre ?",type:"select",required:!0,options:[{value:1,label:"Non"},{value:2,label:"1 boutique en propre"},{value:3,label:"2 boutiques en propre"},{value:4,label:"3 boutiques en propre"},{value:5,label:"4 boutiques en propre ou plus"}]},{id:"international",section:"positioning",question:"Quelle est la répartition de vos ventes entre pays d'origine et international ?",type:"select",required:!0,options:[{value:1,label:"100% pays d'origine"},{value:2,label:"Pays d'origine majoritaire"},{value:3,label:"50% pays d'origine / 50% international"},{value:4,label:"International majoritaire"},{value:5,label:"Principalement international"}]},{id:"production",section:"positioning",question:"Quelle est l'organisation de votre production ?",type:"select",required:!0,options:[{value:1,label:"Totalement sous-traitée"},{value:2,label:"Essentiellement sous-traitée"},{value:3,label:"Moitié sous-traitée / moitié internalisée"},{value:4,label:"Essentiellement internalisée"},{value:5,label:"Totalement internalisée"}]},{id:"material_level",section:"positioning",question:"Quel type de matériau utilisez-vous en majorité ?",type:"select",required:!0,options:[{value:1,label:"Or 18 carats"},{value:2,label:"Or 14 carats"},{value:3,label:"Or 9 ou 10 carats"},{value:4,label:"Argent ou vermeil"},{value:5,label:"Plaqué or"}]},{id:"best_seller",section:"positioning",question:"Disposez-vous d'un ou plusieurs best-sellers identifiés ?",type:"select",required:!0,options:[{value:1,label:"Aucun"},{value:2,label:"Peu significatif"},{value:3,label:"Quelques pièces récurrentes"},{value:4,label:"Un best-seller identifié"},{value:5,label:"Un ou plusieurs best-sellers structurants"}]},{id:"assortment",section:"positioning",question:"Quel est votre type d'offre ?",type:"select",required:!0,options:[{value:1,label:"Uniquement pièces uniques"},{value:2,label:"Pièces uniques et petites séries"},{value:3,label:"Pièces uniques et collections"},{value:4,label:"Principalement collections"},{value:5,label:"Plusieurs collections structurées et cohérentes"}]},{id:"average_basket",section:"positioning",question:"Quel est votre panier d'achat moyen ?",type:"select",required:!0,options:[{value:1,label:"Moins de 999 €"},{value:2,label:"1 000 € à 3 999 €"},{value:3,label:"4 000 € à 9 999 €"},{value:4,label:"10 000 € à 19 999 €"},{value:5,label:"Plus de 20 000 €"}]},{id:"margin_coef",section:"positioning",question:"Quel coefficient pratiquez-vous entre coût de fabrication et prix retail TTC ?",type:"select",options:[{value:1,label:"x2"},{value:2,label:"x3"},{value:3,label:"x4"},{value:4,label:"x5"},{value:5,label:"x6 et plus"}]},{id:"training",section:"positioning",question:"Quel est votre parcours de formation ?",type:"select",options:[{value:1,label:"École de commerce"},{value:2,label:"Artisan joaillier"},{value:3,label:"Designer/Styliste/Architecte"},{value:4,label:"Autre"}]},{id:"raison_etre",section:"identity-vision",question:"Écrivez en une phrase la raison d'être de votre marque :",description:"La raison d'être est le « pourquoi » profond de votre marque : la conviction qui guide durablement vos choix créatifs, stratég
92iques et humains, au-delà de vos produits.",type:"text",required:!0},{id:"comfort_raison_etre",section:"identity-vision",question:"Je suis à l'aise pour formuler la raison d'être de ma marque",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_values",section:"identity-vision",question:"Je suis à l'aise pour formuler les valeurs qui définissent ma marque",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_differentiation",section:"identity-vision",question:"Je suis à l'aise pour expliquer ce qui distingue ma marque",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_perception",section:"identity-vision",question:"Mes clients perçoivent ma marque comme je souhaite qu'elle soit perçue",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_prices",section:"offer",question:"Je suis à l'aise pour défendre mes prix",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_margin",section:"offer",question:"Je suis à l'aise avec mon coefficient de marge coût-prix retail",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_design",section:"offer",question:"Je suis à l'aise avec la singularité de mon design",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_balance",section:"offer",question:"Je suis à l'aise avec l'équilibre de mon offre",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_branding",section:"image",question:"Je suis à l'aise avec ma charte graphique",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_packshots",section:"image",question:"Je suis à l'aise avec mes photos packshot",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_still_life",section:"image",question:"Je suis à l'aise avec mes photos natures mortes",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_worn_photos",section:"image",question:"Je suis à l'aise avec mes photos bijoux portés",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_videos",section:"image",question:"Je suis à l'aise avec mes vidéos",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_creative_process",section:"savoir-faire",question:"Je suis à l'aise pour montrer mon processus créatif",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_workshop",section:"savoir-faire",question:"Je suis à l'aise pour montrer les coulisses de ma fabrication",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_savoir_faire_perception",section:"savoir-faire",question:"Je suis à l'aise avec la perception que mes clients ont de mon savoir-faire",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_editorial",section:"editorial",question:"Je suis à l'aise avec ma ligne éditoriale Instagram",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_formats",section:"editorial",question:"Je suis à l'aise avec la diversité de mes formats",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_frequency",section:"editorial",question:"Je suis à l'aise avec ma fréquence de publication",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_performance",section:"editorial",question:"Je suis à l'aise avec la performance de mes contenus",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_ads",section:"activation",question:"Je suis à l'aise avec l'utilisation des Ads Meta",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_measurement",section:"activation",question:"Je suis à l'aise pour mesurer les résultats de mes actions Ads sur mes ventes en ligne",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_site_efficiency",section:"activation",question:"Je suis à l'aise avec l'efficacité commerciale de mon site",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_influence",section:"activation",question:"Je suis à l'aise avec l'efficacité commerciale de mes partenariats d'influence",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_embody",section:"incarnation",question:"Je suis à l'aise pour incarner ma marque",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_alignment",section:"incarnation",question:"Je suis à l'aise avec l'alignement entre mon histoire, mes valeurs et ma marque",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"comfort_signature_content",section:"incarnation",question:"Je suis à l'aise avec mon contenu signature",type:"scale",required:!0,scaleLabels:{min:"Pas du tout à l'aise",max:"Totalement à l'aise"}},{id:"distribution_strategy",section:"projection",question:"Quelle est votre stratég
92ie de distribution à 3 ans ?",type:"select",required:!0,options:[{value:1,label:"Showroom privé sur rendez-vous"},{value:2,label:"Shows B2C"},{value:3,label:"Boutique en propre"},{value:4,label:"Wholesale sélectif"},{value:5,label:"Wholesale large"}]},{id:"shows_strategy",section:"projection",question:"Comptez-vous renforcer la présence de votre marque sur des shows ?",type:"select",required:!0,options:[{value:1,label:"Aucun show envisagé"},{value:2,label:"Shows B2C en direct"},{value:3,label:"Show B2C avec agent"},{value:4,label:"Show B2B"},{value:5,label:"Show B2B avec agent"}]},{id:"selected_family",section:"projection",question:"Dans quelle famille joaillière voyez-vous votre marque ?",type:"select",required:!0,options:[{value:1,label:"Les Créateurs du Geste",description:"Kindred Lubeck, Castro Smith, Chloé Valorso..."},{value:2,label:"Les Icônes Identitaires",description:"Marie Lichtenberg, Selim Mouzannar, Bibi Van der Velden"},{value:3,label:"Les Signatures du Quotidien",description:"Ginette NY, Charlotte Chesnais, Pascale Monvoisin..."},{value:4,label:"Les Singulières Culturelles",description:"Marie-Hélène de Taillac, Jessica McCormack, Apriati"},{value:5,label:"Les Graals d'Exception",description:"Emmanuel Tarpin, Théodoros, Taffin"}]}],RI=[{id:1,name:"Les Créateurs du Geste",description:"Artisans joailliers & artistes-sculpteurs",spirit:"Transformation, main, matière, intimité, unicité",distribution:"Showroom privé, salons B2C, galeries",examples:["Kindred Lubeck","Castro Smith","Vanessa Fernandez","Chloé Valorso"]},{id:2,name:"Les Icônes Identitaires",description:"Signature reconnaissable, personnalité forte",spirit:"Incarnation assumée, langage identitaire cohérent",distribution:"Wholesale sélectif, boutiques en propre optionnelles, pop-ups curated",examples:["Marie Lichtenberg","Selim Mouzannar","Bibi van der Velden"]},{id:3,name:"Les Signatures du Quotidien",description:"Pièces essentielles, modernité, simplicité juste",spirit:"Désirabilité portée au quotidien",distribution:"Wholesale large, boutique en propre optionnelle, e-commerce premium",examples:["Charlotte Chesnais","Ginette NY","Pascale Monvoisin","Vanrycke"]},{id:4,name:"Les Singulières Culturelles",description:"Univers esthétique rare, couleur, culture, douceur",spirit:"Imaginaire visuel fort, création indissociable d'un monde narratif",distribution:"Boutiques en propre et e-commerce premium",examples:["Marie-Hélène de Taillac","Jessica McCormack","Apriati"]},{id:5,name:"Les Graals d'Exception",description:"Extrême rareté, haute technicité, pièces chef-d'œuvre",spirit:"Aura de collection, valeur patrimoniale et symbolique",distribution:"Collectionneurs, salons haute joaillerie, réseau privé",examples:["Emmanuel Tarpin","JAR","Théodoros","Taffin"]}];function PI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const AI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OI={};function hv(e,t){return(OI.jsx?NI:AI).test(e)}const II=/[ \t\n\f\r]/g;function jI(e){return typeof e=="object"?e.type==="text"?fv(e.value):!1:fv(e)}function fv(e){return e.replace(II,"")===""}class hl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}hl.prototype.normal={};hl.prototype.property={};hl.prototype.space=void 0;function cS(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new hl(n,r,t)}function $f(e){return e.toLowerCase()}class Ft{constructor(t,n){this.attribute=n,this.property=t}}Ft.prototype.attribute="";Ft.prototype.booleanish=!1;Ft.prototype.boolean=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.defined=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.number=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.property="";Ft.prototype.spaceSeparated=!1;Ft.prototype.space=void 0;let LI=0;const pe=us(),Xe=us(),Ff=us(),B=us(),je=us(),Ks=us(),Bt=us();function us(){return 2**++LI}const zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Xe,commaOrSpaceSeparated:Bt,commaSeparated:Ks,number:B,overloadedBoolean:Ff,spaceSeparated:je},Symbol.toStringTag,{value:"Module"})),Zd=Object.keys(zf);class Mm extends Ft{constructor(t,n,r,i){let s=-1;if(super(t,n),pv(this,"space",i),typeof r=="number")for(;++s<Zd.length;){const o=Zd[s];pv(this,Zd[s],(r&zf[o])===zf[o])}}}Mm.prototype.defined=!0;function pv(e,t,n){n&&(e[t]=n)}function Po(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Mm(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[$f(r)]=r,n[$f(s.attribute)]=r}return new hl(t,n,e.space)}const dS=Po({properties:{ariaActiveDescendant:null,ariaAtomic:Xe,ariaAutoComplete:null,ariaBusy:Xe,ariaChecked:Xe,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControl
vendor: 5,400 bytes, line 92
92s:je,ariaCurrent:null,ariaDescribedBy:je,ariaDetails:null,ariaDisabled:Xe,ariaDropEffect:je,ariaErrorMessage:null,ariaExpanded:Xe,ariaFlowTo:je,ariaGrabbed:Xe,ariaHasPopup:null,ariaHidden:Xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:je,ariaLevel:B,ariaLive:null,ariaModal:Xe,ariaMultiLine:Xe,ariaMultiSelectable:Xe,ariaOrientation:null,ariaOwns:je,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:Xe,ariaReadOnly:Xe,ariaRelevant:null,ariaRequired:Xe,ariaRoleDescription:je,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:Xe,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hS(e,t){return t in e?e[t]:t}function fS(e,t){return hS(e,t.toLowerCase())}const DI=Po({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ks,acceptCharset:je,accessKey:je,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:je,autoFocus:pe,autoPlay:pe,blocking:je,capture:null,charSet:null,checked:pe,cite:null,className:je,cols:B,colSpan:null,content:null,contentEditable:Xe,controls:pe,controlsList:je,coords:B|Ks,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Ff,draggable:Xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:je,height:B,hidden:Ff,high:B,href:null,hrefLang:null,htmlFor:je,httpEquiv:je,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:je,itemRef:je,itemScope:pe,itemType:je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:B,pattern:null,ping:je,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:je,required:pe,reversed:pe,rows:B,rowSpan:B,sandbox:je,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:Xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Xe,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:je,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:Xe,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:B,security:null,unselectable:null},space:"html",transform:fS}),MI=Po({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
92dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Bt,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:je,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
92dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ks,g2:Ks,glyphName:Ks,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hS}),pS=Po({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 2,187 bytes, lines 92-93
92,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),mS=Po({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fS}),gS=Po({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$I={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},FI=/[A-Z]/g,mv=/-[a-z]/g,zI=/^data[-\w.:]+$/i;function UI(e,t){const n=$f(t);let r=t,i=Ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zI.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(mv,HI);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!mv.test(s)){let o=s.replace(FI,BI);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Mm}return new i(r,t)}function BI(e){return"-"+e.toLowerCase()}function HI(e){return e.charAt(1).toUpperCase()}const VI=cS([dS,DI,pS,mS,gS],"html"),$m=cS([dS,MI,pS,mS,gS],"svg");function qI(e){return e.join(" ").trim()}var Fm={},gv=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,WI=/\n/g,KI=/^\s*/,GI=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,JI=/^:\s*/,QI=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,YI=/^[;\s]*/,ZI=/^\s+|\s+$/g,XI=`
93`,yv="/",vv="*",Di="",ej="comment",tj="declaration";function nj(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(v){var p=v.match(WI);p&&(n+=p.length);var b=v.lastIndexOf(XI);r=~b?v.length-b:r+v.length}function s(){var v={line:n,column:r};return function(p){return p.position=new o(v),u(),p}}function o(v){this.start=v,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(v){var p=new Error(t.source+":"+n+":"+r+": "+v);if(p.reason=v,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}
vendor: 4,483 bytes, line 93
93function l(v){var p=v.exec(e);if(p){var b=p[0];return i(b),e=e.slice(b.length),p}}function u(){l(KI)}function c(v){var p;for(v=v||[];p=d();)p!==!1&&v.push(p);return v}function d(){var v=s();if(!(yv!=e.charAt(0)||vv!=e.charAt(1))){for(var p=2;Di!=e.charAt(p)&&(vv!=e.charAt(p)||yv!=e.charAt(p+1));)++p;if(p+=2,Di===e.charAt(p-1))return a("End of comment missing");var b=e.slice(2,p-2);return r+=2,i(b),e=e.slice(p),r+=2,v({type:ej,comment:b})}}function f(){var v=s(),p=l(GI);if(p){if(d(),!l(JI))return a("property missing ':'");var b=l(QI),m=v({type:tj,property:wv(p[0].replace(gv,Di)),value:b?wv(b[0].replace(gv,Di)):Di});return l(YI),m}}function h(){var v=[];c(v);for(var p;p=f();)p!==!1&&(v.push(p),c(v));return v}return u(),h()}function wv(e){return e?e.replace(ZI,Di):Di}var rj=nj,ij=Tu&&Tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fm,"__esModule",{value:!0});Fm.default=oj;const sj=ij(rj);function oj(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,sj.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.camelCase=void 0;var aj=/^--[a-zA-Z0-9_-]+$/,lj=/-([a-z])/g,uj=/^[^-]+$/,cj=/^-(webkit|moz|ms|o|khtml)-/,dj=/^-(ms)-/,hj=function(e){return!e||uj.test(e)||aj.test(e)},fj=function(e,t){return t.toUpperCase()},xv=function(e,t){return"".concat(t,"-")},pj=function(e,t){return t===void 0&&(t={}),hj(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(dj,xv):e=e.replace(cj,xv),e.replace(lj,fj))};Zc.camelCase=pj;var mj=Tu&&Tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gj=mj(Fm),yj=Zc;function Uf(e,t){var n={};return!e||typeof e!="string"||(0,gj.default)(e,function(r,i){r&&i&&(n[(0,yj.camelCase)(r,t)]=i)}),n}Uf.default=Uf;var vj=Uf;const wj=wc(vj),yS=vS("end"),zm=vS("start");function vS(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xj(e){const t=zm(e),n=yS(e);if(t&&n)return{start:t,end:n}}function fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bv(e.position):"start"in e||"end"in e?bv(e):"line"in e||"column"in e?Bf(e):""}function Bf(e){return _v(e&&e.line)+":"+_v(e&&e.column)}function bv(e){return Bf(e&&e.start)+"-"+Bf(e&&e.end)}function _v(e){return e&&typeof e=="number"?e:1}class _t extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=fa(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_t.prototype.file="";_t.prototype.name="";_t.prototype.reason="";_t.prototype.message="";_t.prototype.stack="";_t.prototype.column=void 0;_t.prototype.line=void 0;_t.prototype.ancestors=void 0;_t.prototype.cause=void 0;_t.prototype.fatal=void 0;_t.prototype.place=void 0;_t.prototype.ruleId=void 0;_t.prototype.source=void 0;const Um={}.hasOwnProperty,bj=new Map,_j=/[A-Z]/g,Sj=new Set(["table","tbody","thead","tfoot","tr"]),kj=new Set(["td","th"]),wS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ej(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ij(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 10,529 bytes, line 93
93if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Oj(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$m:VI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=xS(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function xS(e,t,n){if(t.type==="element")return Cj(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Tj(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Pj(e,t,n);if(t.type==="mdxjsEsm")return Rj(e,t);if(t.type==="root")return Aj(e,t,n);if(t.type==="text")return Nj(e,t)}function Cj(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=$m,e.schema=i),e.ancestors.push(t);const s=_S(e,t.tagName,!1),o=jj(e,t);let a=Hm(e,t);return Sj.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!jI(l):!0})),bS(e,o,s,t),Bm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Tj(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wa(e,t.position)}function Rj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wa(e,t.position)}function Pj(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=$m,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:_S(e,t.name,!0),o=Lj(e,t),a=Hm(e,t);return bS(e,o,s,t),Bm(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Aj(e,t,n){const r={};return Bm(r,Hm(e,t)),e.create(t,e.Fragment,r,n)}function Nj(e,t){return t.value}function bS(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Oj(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function Ij(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=zm(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function jj(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Um.call(t.properties,i)){const s=Dj(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&kj.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lj(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Wa(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else Wa(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Hm(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:bj;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=xS(e,s,o);a!==void 0&&n.push(a)}return n}function Dj(e,t,n){const r=UI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?PI(n):qI(n)),r.property==="style"){let i=typeof n=="object"?n:Mj(e,String(n));return e.stylePropertyNameCase==="css"&&(i=$j(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?$I[r.property]||r.property:r.attribute,n]}}function Mj(e,t){try{return wj(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new _t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=wS+"#cannot-parse-style-attribute",i}}function _S(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=hv(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=hv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Um.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wa(e)}function Wa(e,t){const n=new _t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=wS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $j(e){const t={};let n;for(n in e)Um.call(e,n)&&(t[Fj(n)]=e[n]);return t}function Fj(e){let t=e.replace(_j,zj);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zj(e){return"-"+e.toLowerCase()}const Xd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Uj={};function Bj(e,t){const n=Uj,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return SS(e,r,i)}function SS(e,t,n){if(Hj(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sv(e.children,t,n)}return Array.isArray(e)?Sv(e,t,n):""}function Sv(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=SS(e[i],t,n);return r.join("")}function Hj(e){return!!(e&&typeof e=="object")}const kv=document.createElement("i");function Vm(e){const t="&"+e+";";kv.innerHTML=t;const n=kv.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ir(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function on(e,t){return e.length>0?(ir(e,e.length,0,t),e):t}const Ev={}.hasOwnProperty;function Vj(e){const t={};let n=-1;for(;++n<e.length;)qj(t,e[n]);return t}function qj(e,t){let n;for(n in t){const i=(Ev.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Ev.call(i,o)||(i[o]=[]);const a=s[o];Wj(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Wj(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ir(e,0,0,r)}function kS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Gs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yn=ki(/[A-Za-z]/),Kt=ki(/[\dA-Za-z]/),Kj=ki(/[#-'*+\--9=?A-Z^-~]/);function Hf(e){return e!==null&&(e<32||e===127)}const Vf=ki(/\d/),Gj=ki(/[\dA-Fa-f]/),Jj=ki(/[!-/:-@[-`{-~]/);function ie(e){return e!==null&&e<-2}function $t(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const Qj=ki(new RegExp("\\p{P}|\\p{S}","u")),Yj=ki(/\s/);function ki(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ao(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function De(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Pe(l)?(e.enter(n),a(l)):t(l)}function a(l){return Pe(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const Zj={tokenize:Xj};function Xj(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),De(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return ie(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const eL={tokenize:tL},Cv={tokenize:nL};function tL(e){const t=this,n=[];let r=0,i,s,o;return a;function a(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const S=t.events.length;let C=S,k;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){k=t.events[C][1].end;break}m(r);let T=S;for(;T<t.events.length;)t.events[T][1].end={...k},T++;return ir(t.events,C+1,0,t.events.slice(S)),t.events.length=T,u(w)}return a(w)}function u(w){if(r===n.length){if(!i)return f(w);if(i.currentConstruct&&i.currentConstruct.concrete)return v(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Cv,c,d)(w)}function c(w){return i&&y(),m(r),f(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,v(w)}function f(w){return t.containerState={},e.attempt(Cv,h,v)(w)}function h(w){return r++,n.push([t.currentConstruct,t.containerState]),f(w)}function v(w){if(w===null){i&&y(),m(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),p(w)}function p(w){if(w===null){b(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return ie(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(w),p)}function b(w,S){const C=t.sliceStream(w);
vendor: 8,775 bytes, line 93
93if(S&&C.push(null),w.previous=s,s&&(s.next=w),s=w,i.defineSkip(w.start),i.write(C),t.parser.lazy[w.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;const T=t.events.length;let R=T,P,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(P){O=t.events[R][1].end;break}P=!0}for(m(r),k=T;k<t.events.length;)t.events[k][1].end={...O},k++;ir(t.events,R+1,0,t.events.slice(T)),t.events.length=k}}function m(w){let S=n.length;for(;S-- >w;){const C=n[S];t.containerState=C[1],C[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function nL(e,t,n){return De(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tv(e){if(e===null||$t(e)||Yj(e))return 1;if(Qj(e))return 2}function qm(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const qf={name:"attention",resolveAll:rL,tokenize:iL};function rL(e,t){let n=-1,r,i,s,o,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Rv(d,-l),Rv(f,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=on(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=on(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=on(u,qm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=on(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=on(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,ir(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function iL(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Tv(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit("attentionSequence"),c=Tv(l),d=!c||c===2&&i||n.includes(l),f=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!f)),u._close=!!(s===42?f:f&&(c||!d)),t(l)}}function Rv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const sL={name:"autolink",tokenize:oL};function oL(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return Yn(h)?(e.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||Kt(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||Kt(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Hf(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),c):Kj(h)?(e.consume(h),u):n(h)}function c(h){return Kt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Kt(h))&&r++<63){const v=h===45?f:d;return e.consume(h),v}return n(h)}}const Xc={partial:!0,tokenize:aL};function aL(e,t,n){return r;function r(s){return Pe(s)?De(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||ie(s)?t(s):n(s)}}const ES={continuation:{tokenize:uL},exit:cL,name:"blockQuote",tokenize:lL};function lL(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Pe(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function uL(e,t,n){const r=this;return i;function i(o){return Pe(o)?De(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(ES,t,n)(o)}}function cL(e){e.exit("blockQuote")}const CS={name:"characterEscape",tokenize:dL};function dL(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Jj(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const TS={name:"characterReference",tokenize:hL};function hL(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=Kt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=Gj,c):(e.enter("characterReferenceValue"),s=7,o=Vf,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return o===Kt&&!Vm(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),c):n(d)}}const Pv={partial:!0,tokenize:pL},Av={concrete:!0,name:"codeFenced",tokenize:fL};function fL(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(k){return u(k)}function u(k){const T=r.events[r.events.length-1];return s=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(k)}function c(k){return k===a?(o++,e.consume(k),c):o<3?n(k):(e.exit("codeFencedFenceSequence"),Pe(k)?De(e,d,"whitespace")(k):d(k))}function d(k){return k===null||ie(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Pv,p,S)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||ie(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):Pe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),De(e,h,"whitespace")(k)):k===96&&k===a?n(k):(e.consume(k),f)}function h(k){return k===null||ie(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||ie(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===a?n(k):(e.consume(k),v)}function p(k){return e.attempt(i,S,b)(k)}function b(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return s>0&&Pe(k)?De(e,y,"linePrefix",s+1)(k):y(k)}function y(k){return k===null||ie(k)?e.check(Pv,p,S)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||ie(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),w)}function S(k){return e.exit("codeFenced"),t(k)}function C(k,T,R){let P=0;return O;function O($){return k.enter("lineEnding"),k.consume($),k.exit("lineEnding"),L}function L($){return k.enter("codeFencedFence"),Pe($)?De(k,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):A($)}function A($){return $===a?(k.enter("codeFencedFenceSequence"),V($)):R($)}function V($){return $===a?(P++,k.consume($),V):P>=o?(k.exit("codeFencedFenceSequence"),Pe($)?De(k,M,"whitespace")($):M($)):R($)}function M($){return $===null||ie($)?(k.exit("codeFencedFence"),T($)):R($)}}}function pL(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const eh={name:"codeIndented",tokenize:gL},mL={partial:!0,tokenize:yL};function gL(e,t,n){const r=this;return i;
vendor: 5,057 bytes, line 93
93function i(u){return e.enter("codeIndented"),De(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):ie(u)?e.attempt(mL,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||ie(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function yL(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):De(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):ie(o)?i(o):n(o)}}const vL={name:"codeText",previous:xL,resolve:wL,tokenize:bL};function wL(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function xL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bL(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ie(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class _L{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&qo(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),qo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);qo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qo(this.left,n.reverse())}}}function qo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function RS(e){const t={};let n=-1,r,i,s,o,a,l,u;const c=new _L(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,SL(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return ir(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function SL(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,d,f=-1,h=n,v=0,p=0;const b=[p];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&o.defineSki
vendor: 18,552 bytes, line 93
93p(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(p=f+1,b.push(p),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),f=b.length;f--;){const m=a.slice(b[f],b[f+1]),y=s.pop();l.push([y,y+m.length-1]),e.splice(y,2,m)}for(l.reverse(),f=-1;++f<l.length;)u[v+l[f][0]]=v+l[f][1],v+=l[f][1]-l[f][0]-1;return u}const kL={resolve:CL,tokenize:TL},EL={partial:!0,tokenize:RL};function CL(e){return RS(e),e}function TL(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):ie(a)?e.check(EL,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function RL(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),De(e,s,"linePrefix")}function s(o){if(o===null||ie(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function PS(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),f):m===null||m===32||m===41||Hf(m)?n(m):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(m))}function f(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(a),f(m)):m===null||m===60||ie(m)?n(m):(e.consume(m),m===92?v:h)}function v(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function p(m){return!c&&(m===null||m===41||$t(m))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(m)):c<u&&m===40?(e.consume(m),c++,p):m===41?(e.consume(m),c--,p):m===null||m===32||m===40||Hf(m)?n(m):(e.consume(m),m===92?b:p)}function b(m){return m===40||m===41||m===92?(e.consume(m),p):p(m)}}function AS(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),c}function c(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ie(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ie(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),l||(l=!Pe(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function NS(e,t,n,r,i,s){let o;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),o=f===40?41:f,l):n(f)}function l(f){return f===o?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===o?(e.exit(s),l(o)):f===null?n(f):ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),De(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===o||f===null||ie(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===o||f===92?(e.consume(f),c):c(f)}}function pa(e,t){let n;return r;function r(i){return ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Pe(i)?De(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const PL={name:"definition",tokenize:NL},AL={partial:!0,tokenize:OL};function NL(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),o(h)}function o(h){return AS.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Gs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return $t(h)?pa(e,u)(h):u(h)}function u(h){return PS(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(AL,d,d)(h)}function d(h){return Pe(h)?De(e,f,"whitespace")(h):f(h)}function f(h){return h===null||ie(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function OL(e,t,n){return r;function r(a){return $t(a)?pa(e,i)(a):n(a)}function i(a){return NS(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Pe(a)?De(e,o,"whitespace")(a):o(a)}function o(a){return a===null||ie(a)?t(a):n(a)}}const IL={name:"hardBreakEscape",tokenize:jL};function jL(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return ie(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const LL={name:"headingAtx",resolve:DL,tokenize:ML};function DL(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ir(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function ML(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||$t(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||ie(c)?(e.exit("atxHeading"),t(c)):Pe(c)?De(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||$t(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const $L=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nv=["pre","script","style","textarea"],FL={concrete:!0,name:"htmlFlow",resolveTo:BL,tokenize:HL},zL={partial:!0,tokenize:qL},UL={partial:!0,tokenize:VL};function BL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function HL(e,t,n){const r=this;let i,s,o,a,l;return u;function u(E){return c(E)}function c(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),d}function d(E){return E===33?(e.consume(E),f):E===47?(e.consume(E),s=!0,p):E===63?(e.consume(E),i=3,r.interrupt?t:_):Yn(E)?(e.consume(E),o=String.fromCharCode(E),b):n(E)}function f(E){return E===45?(e.consume(E),i=2,h):E===91?(e.consume(E),i=5,a=0,v):Yn(E)?(e.consume(E),i=4,r.interrupt?t:_):n(E)}function h(E){return E===45?(e.consume(E),r.interrupt?t:_):n(E)}function v(E){const Z="CDATA[";return E===Z.charCodeAt(a++)?(e.consume(E),a===Z.length?r.interrupt?t:A:v):n(E)}function p(E){return Yn(E)?(e.consume(E),o=String.fromCharCode(E),b):n(E)}function b(E){if(E===null||E===47||E===62||$t(E)){const Z=E===47,ae=o.toLowerCase();return!Z&&!s&&Nv.includes(ae)?(i=1,r.interrupt?t(E):A(E)):$L.includes(o.toLowerCase())?(i=6,Z?(e.consume(E),m):r.interrupt?t(E):A(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):s?y(E):w(E))}return E===45||Kt(E)?(e.consume(E),o+=String.fromCharCode(E),b):n(E)}function m(E){return E===62?(e.consume(E),r.interrupt?t:A):n(E)}function y(E){return Pe(E)?(e.consume(E),y):O(E)}function w(E){return E===47?(e.consume(E),O):E===58||E===95||Yn(E)?(e.consume(E),S):Pe(E)?(e.consume(E),w):O(E)}function S(E){return E===45||E===46||E===58||E===95||Kt(E)?(e.consume(E),S):C(E)}function C(E){return E===61?(e.consume(E),k):Pe(E)?(e.consume(E),C):w(E)}function k(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),l=E,T):Pe(E)?(e.consume(E),k):R(E)}function T(E){return E===l?(e.consume(E),l=null,P):E===null||ie(E)?n(E):(e.consume(E),T)}function R(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||$t(E)?C(E):(e.consume(E),R)}function P(E){return E===47||E===62||Pe(E)?w(E):n(E)}function O(E){return E===62?(e.consume(E),L):n(E)}function L(E){return E===null||ie(E)?A(E):Pe(E)?(e.consume(E),L):n(E)}function A(E){return E===45&&i===2?(e.consume(E),U):E===60&&i===1?(e.consume(E),Q):E===62&&i===4?(e.consume(E),F):E===63&&i===3?(e.consume(E),_):E===93&&i===5?(e.consume(E),j):ie(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(zL,q,V)(E)):E===null||ie(E)?(e.exit("htmlFlowData"),V(E)):(e.consume(E),A)}function V(E){return e.check(UL,M,q)(E)}function M(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),$}function $(E){return E===null||ie(E)?V(E):(e.enter("htmlFlowData"),A(E))}function U(E){return E===45?(e.consume(E),_):A(E)}function Q(E){return E===47?(e.consume(E),o="",N):A(E)}function N(E){if(E===62){const Z=o.toLowerCase();return Nv.includes(Z)?(e.consume(E),F):A(E)}return Yn(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),N):A(E)}function j(E){return E===93?(e.consume(E),_):A(E)}function _(E){return E===62?(e.consume(E),F):E===45&&i===2?(e.consume(E),_):A(E)}function F(E){return E===null||ie(E)?(e.exit("htmlFlowData"),q(E)):(e.consume(E),F)}function q(E){return e.exit("htmlFlow"),t(E)}}function VL(e,t,n){const r=this;return i;function i(o){return ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function qL(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Xc,t,n)}}const WL={name:"htmlText",tokenize:KL};function KL(e,t,n){const r=this;let i,s,o;return a;function a(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),u):_===47?(e.consume(_),C):_===63?(e.consume(_),w):Yn(_)?(e.consume(_),R):n(_)}function u(_){return _===45?(e.consume(_),c):_===91?(e.consume(_),s=0,v):Yn(_)?(e.consume(_),y):n(_)}function c(_){return _===45?(e.consume(_),h):n(_)}function d(_){return _===null?n(_):_===45?(e.consume(_),f):ie(_)?(o=d,Q(_)):(e.consume(_),d)}function f(_){return _===45?(e.consume(_),h):d(_)}function h(_){return _===62?U(_):_===45?f(_):d(_)}function v(_){const F="CDATA[";return _===F.charCodeAt(s++)?(e.consume(_),s===F.length?p:v):n(_)}function p(_){return _===null?n(_):_===93?(e.consume(_),b):ie(_)?(o=p,Q(_)):(e.consume(_),p)}function b(_){return _===93?(e.consume(_),m):p(_)}function m(_){return _===62?U(_):_===93?(e.consume(_),m):p(_)}function y(_){return _===null||_===62?U(_):ie(_)?(o=y,Q(_)):(e.consume(_),y)}function w(_){return _===null?n(_):_===63?(e.consume(_),S):ie(_)?(o=w,Q(_)):(e.consume(_),w)}function S(_){return _===62?U(_):w(_)}function C(_){return Yn(_)?(e.consume(_),k):n(_)}function k(_){return _===45||Kt(_)?(e.consume(_),k):T(_)}function T(_){return ie(_)?(o=T,Q(_)):Pe(_)?(e.consume(_),T):U(_)}function R(_){return _===45||Kt(_)?(e.consume(_),R):_===47||_===62||$t(_)?P(_):n(_)}function P(_){return _===47?(e.consume(_),U):_===58||_===95||Yn(_)?(e.consume(_),O):ie(_)?(o=P,Q(_)):Pe(_)?(e.consume(_),P):U(_)}function O(_){return _===45||_===46||_===58||_===95||Kt(_)?(e.consume(_),O):L(_)}function L(_){return _===61?(e.consume(_),A):ie(_)?(o=L,Q(_)):Pe(_)?(e.consume(_),L):P(_)}function A(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,V):ie(_)?(o=A,Q(_)):Pe(_)?(e.consume(_),A):(e.consume(_),M)}function V(_){return _===i?(e.consume(_),i=void 0,$):_===null?n(_):ie(_)?(o=V,Q(_)):(e.consume(_),V)}function M(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||$t(_)?P(_):(e.consume(_),M)}function $(_){return _===47||_===62||$t(_)?P(_):n(_)}function U(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function Q(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return Pe(_)?De(e,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):j(_)}function j(_){return e.enter("htmlTextData"),o(_)}}const Wm={name:"labelEnd",resolveAll:YL,resolveTo:ZL,tokenize:XL},GL={tokenize:e2},JL={tokenize:t2},QL={tokenize:n2};function YL(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ir(e,0,e.length,n),e}function ZL(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=on(a,e.slice(s+1,s+r+3)),a=on(a,[["enter",c,t]]),a=on(a,qm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=on(a,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),a=on(a,e.slice(o+1)),a=on(a,[["exit",l,t]]),ir(e,s,e.length,a),e}function XL(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(f){return s?s._inactive?d(f):(o=r.parser.defined.includes(Gs(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(GL,c,o?c:d)(f):f===91?e.attempt(JL,c,o?u:d)(f):o?c(f):d(f)}function u(f){return e.attempt(QL,c,d)(f)}function c(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function e2(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return $t(d)?pa(e,s)(d):s(d)}function s(d){return d===41?c(d):PS(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return $t(d)?pa(e,l)(d):c(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?NS(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return $t(d)?pa(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function t2(e,t,n){const r=this;return i;function i(a){return AS.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Gs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function n2(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const r2={name:"labelStartImage",resolveAll:Wm.resolveAll,tokenize:i2};function i2(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const s2={name:"labelStartLink",resolveAll:Wm.resolveAll,tokenize:o2};function o2(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const th={name:"lineEnding",tokenize:a2};function a2(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),De(e,t,"linePrefix")}}const xu={name:"thematicBreak",tokenize:l2};function l2(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||ie(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Pe(u)?De(e,a,"whitespace")(u):a(u))}}const Nt={continuation:{tokenize:h2},exit:p2,name:"list",tokenize:d2},u2={partial:!0,tokenize:m2},c2={partial:!0,tokenize:f2};function d2(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const v=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Vf(h)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(xu,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return Vf(h)&&++o<10?(e.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Xc,r.interrupt?n:c,e.attempt(u2,f,d))}
vendor: 5,359 bytes, line 93
93function c(h){return r.containerState.initialBlankLine=!0,s++,f(h)}function d(h){return Pe(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function h2(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Xc,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,De(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Pe(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(c2,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,De(e,e.attempt(Nt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function f2(e,t,n){const r=this;return De(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function p2(e){e.exit(this.containerState.type)}function m2(e,t,n){const r=this;return De(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Pe(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Ov={name:"setextUnderline",resolveTo:g2,tokenize:y2};function g2(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function y2(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Pe(u)?De(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||ie(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const v2={tokenize:w2};function w2(e){const t=this,n=e.attempt(Xc,r,e.attempt(this.parser.constructs.flowInitial,i,De(e,e.attempt(this.parser.constructs.flow,i,e.attempt(kL,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const x2={resolveAll:IS()},b2=OS("string"),_2=OS("text");function OS(e){return{resolveAll:IS(e==="text"?S2:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function IS(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function S2(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const k2={42:Nt,43:Nt,45:Nt,48:Nt,49:Nt,50:Nt,51:Nt,52:Nt,53:Nt,54:Nt,55:Nt,56:Nt,57:Nt,62:ES},E2={91:PL},C2={[-2]:eh,[-1]:eh,32:eh},T2={35:LL,42:xu,45:[Ov,xu],60:FL,61:Ov,95:xu,96:Av,126:Av},R2={38:TS,92:CS},P2={[-5]:th,[-4]:th,[-3]:th,33:r2,38:TS,42:qf,60:[sL,WL],91:s2,92:[IL,CS],93:Wm,95:qf,96:vL},A2={null:[qf,x2]},N2={null:[42,95]},O2={null:[]},I2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:N2,contentInitial:E2,disable:O2,document:k2,flow:T2,flowInitial:C2,insideSpan:A2,string:R2,text:P2},Symbol.toStringTag,{value:"Module"}));function j2(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 14,605 bytes, lines 93-95
93olumn:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:T(C),check:T(k),consume:y,enter:w,exit:S,interrupt:T(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:p,events:[],now:v,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function d(L){return o=on(o,L),b(),o[o.length-1]!==null?[]:(R(t,0),u.events=qm(s,u.events,u),u.events)}function f(L,A){return D2(h(L),A)}function h(L){return L2(o,L)}function v(){const{_bufferIndex:L,_index:A,line:V,column:M,offset:$}=r;return{_bufferIndex:L,_index:A,line:V,column:M,offset:$}}function p(L){i[L.line]=L.column,O()}function b(){let L;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<A.length;)m(A.charCodeAt(r._bufferIndex));else m(A)}}function m(L){c=c(L)}function y(L){ie(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,O()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function w(L,A){const V=A||{};return V.type=L,V.start=v(),u.events.push(["enter",V,u]),a.push(V),V}function S(L){const A=a.pop();return A.end=v(),u.events.push(["exit",A,u]),A}function C(L,A){R(L,A.from)}function k(L,A){A.restore()}function T(L,A){return V;function V(M,$,U){let Q,N,j,_;return Array.isArray(M)?q(M):"tokenize"in M?q([M]):F(M);function F(he){return G;function G(ge){const Ae=ge!==null&&he[ge],ye=ge!==null&&he.null,me=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return q(me)(ge)}}function q(he){return Q=he,N=0,he.length===0?U:E(he[N])}function E(he){return G;function G(ge){return _=P(),j=he,he.partial||(u.currentConstruct=he),he.name&&u.parser.constructs.disable.null.includes(he.name)?ae():he.tokenize.call(A?Object.assign(Object.create(u),A):u,l,Z,ae)(ge)}}function Z(he){return L(j,_),$}function ae(he){return _.restore(),++N<Q.length?E(Q[N]):U}}}function R(L,A){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&ir(u.events,A,u.events.length-A,L.resolve(u.events.slice(A),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function P(){const L=v(),A=u.previous,V=u.currentConstruct,M=u.events.length,$=Array.from(a);return{from:M,restore:U};function U(){r=L,u.previous=A,u.currentConstruct=V,u.events.length=M,a=$,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function L2(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function D2(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
94`;break}case-3:{o=`\r
95`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function M2(e){const r={constructs:Vj([I2,...(e||{}).extensions||[]]),content:i(Zj),defined:[],document:i(eL),flow:i(v2),lazy:{},string:i(b2),text:i(_2)};return r;function i(s){return o;function o(a){return j2(r,s,a)}}}function $2(e){for(;!RS(e););return e}const Iv=/[\0\t\n\r]/g;function F2(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,d,f,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Iv.lastIndex=d,u=Iv.exec(s),f=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(f),!u){t=s.slice(d);break}if(h===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(s.slice(d,f)),e+=f-d),h){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const z2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function U2(e){return e.replace(z2,B2)}function B2(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return kS(n.slice(s?2:1),s?16:10)}return Vm(n)||e}const jS={}.hasOwnProperty;function H2(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),V2(n)($2(M2(n).document().write(F2()(e,t,!0))))}function V2(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ar),autolinkProtocol:P,autolinkEmail:P,atxHeading:s($n),blockQuote:s(ye),characterEscape:P,characterReference:P,codeFenced:s(me),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(me,o),codeText:s(_e,o),codeTextData:P,data:P,codeFlowValue:P,definition:s(st),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Pt),hardBreakEscape:s(pn),hardBreakTrailing:s(pn),htmlFlow:s(Fn,o),htmlFlowData:P,htmlText:s(Fn,o),htmlTextData:P,image:s(Ti),label:o,link:s(ar),listItem:s(Ri),listItemValue:f,listOrdered:s(Io,d),listUnordered:s(Io),paragraph:s(gl),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s($n),strong:s(lr),thematicBreak:s(hd)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Ae,autolinkProtocol:ge,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:he,characterReference:G,codeFenced:l(b),codeFencedFence:p,codeFencedFenceInfo:h,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:l(m),codeText:l($),codeTextData:O,data:O,definition:l(),definitionDestinationString:S,definitionLabelString:y,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(V),htmlFlowData:O,htmlText:l(M),htmlTextData:O,image:l(Q),label:j,labelText:N,lineEnding:L,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Z,resourceDestinationString:_,resourceTitleString:F,resource:q,setextHeading:l(R),setextHeadingLineSequence:T,setextHeadingText:k,strong:l(),thematicBreak:l()}};LS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(I){let W={type:"root",children:[]};const se={stack:[W],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:c,data:n},we=[];let Ee=-1;for(;++Ee<I.length;)if(I[Ee][1].type==="listOrdered"||I[Ee][1].type==="listUnordered")if(I[Ee][0]==="enter")we.push(Ee);else{const zt=we.pop();Ee=i(I,zt,Ee)}for(Ee=-1;++Ee<I.length;){const zt=t[I[Ee][0]];jS.call(zt,I[Ee][1].type)&&zt[I[Ee][1].type].call(Object.assign({sliceSerialize:I[Ee][2].sliceSerialize},se),I[Ee][1])}if(se.tokenStack.length>0){const zt=se.tokenStack[se.tokenStack.length-1];(zt[1]||jv).call(se,void 0,zt[0])}for(W.position={start:zr(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:zr(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<t.transforms.length;)W=t.transforms[Ee](W)||W;return W}function i(I,W,se){let we=W-1,Ee=-1,zt=!1,zn,Ut,en,Or;for(;++we<=se;){const Ze=I[we];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ee++:Ee--,Or=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(zn&&!Or&&!Ee&&!en&&(en=we),Or=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Or=void 0}if(!Ee&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ee===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(zn){let Ir=we;for(Ut=void 0;Ir--;){const mn=I[Ir];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;Ut&&(I[Ut][1].type="lineEndingBlank",zt=!0),mn[1].type="lineEnding",Ut=Ir}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}en&&(!Ut||en<Ut)&&(zn._spread=!0),zn.end=Object.assign({},Ut?I[Ut][1].start:Ze[1].end),I.splice(Ut||we,0,["exit",zn,Ze[2]]),we++,se++}if(Ze[1].type==="listItemPrefix"){const Ir={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};zn=Ir,I.splice(we,0,["enter",Ir,Ze[2]]),we++,se++,en=void 0,Or=!0}}}return I[W][1]._spread=zt,se}function s(I,W){return se;function se(we){a.call(this,I(we),we),W&&W.call(this,we)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(I,W,se){this.stack[this.stack.length-1].children.push(I),this.stack.push(I),this.tokenStack.push([W,se||void 0]),I.position={start:zr(W.start),end:void 0}}function l(I){return W;function W(se){I&&I.call(this,se),u.call(this,se)}}function u(I,W){const se=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==I.type&&(W?W.call(this,I,we[0]):(we[1]||jv).call(this,I,we[0]));else throw new Error("Cannot close `"+I.type+"` ("+fa({start:I.start,end:I.end})+"): it’s not open");se.position.end=zr(I.end)}function c(){return Bj(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(I){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(I),10),this.data.expectingFirstListItemValue=void 0}}function h(){const I=this.resume(),W=this.stack[this.stack.length-1];W.lang=I}function v(){const I=this.resume(),W=this.stack[this.stack.length-1];W.meta=I}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const I=this.resume(),W=this.stack[this.stack.length-1];W.value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const I=this.resume(),W=this.stack[this.stack.length-1];W.value=I.replace(/(\r?\n|\r)$/g,"")}function y(I){const W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=Gs(this.sliceSerialize(I)).toLowerCase()}function w(){const I=this.resume(),W=this.stack[this.stack.length-1];W.title=I}function S(){const I=this.resume(),W=this.stack[this.stack.length-1];W.url=I}function C(I){const W=this.stack[this.stack.length-1];if(!W.depth){const se=this.sliceSerialize(I).length;W.depth=se}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function T(I){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(I).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function P(I){const se=this.stack[this.stack.length-1].children;let we=se[se.length-1];(!we||we.type!=="text")&&(we=dd(),we.position={start:zr(I.start),end:void 0},se.push(we)),this.stack.push(we)}function O(I){const W=this.stack.pop();W.value+=this.sliceSerialize(I),W.position.end=zr(I.end)}function L(I){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=W.children[W.children.length-1];se.position.end=zr(I.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(W.type)&&(P.call(this,I),O.call(this,I))}function A(){this.data.atHardBreak=!0}function V(){const I=this.resume(),W=this.stack[this.stack.length-1];W.value=I}function M(){const I=this.resume(),W=this.stack[this.stack.length-1];W.value=I}function $(){const I=this.resume(),W=this.stack[this.stack.length-1];W.value=I}function U(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=W,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function Q(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=W,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function N(I){const W=this.sliceSerialize(I),se=this.stack[this.stack.length-2];se.label=U2(W),se.identifier=Gs(W).toLowerCase()}function j(){const I=this.stack[this.stack.length-1],W=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const we=I.children;se.children=we}else se.alt=W}function _(){const I=this.resume(),W=this.stack[this.stack.length-1];W.url=I}function F(){const I=this.resume(),W=this.stack[this.stack.length-1];W.title=I}function q(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Z(I){const W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=Gs(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function ae(I){this.data.characterReferenceType=I.type}function he(I){const W=this.sliceSerialize(I),se=this.data.characterReferenceType;let we;se?(we=kS(W,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=Vm(W);const Ee=this.stack[this.stack.length-1];Ee.value+=we}function G(I){const W=this.stack.pop();W.position.end=zr(I.end)}function ge(I){O.call(this,I);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(I)}function Ae(I){O.call(this,I);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(I)}function ye(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function _e(){return{type:"inlineCode",value:""}}function st(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function pn(){return{type:"break"}}function Fn(){return{type:"html",value:""}}function Ti(){return{type:"image",title:null,url:"",alt:null}}function ar(){return{type:"link",title:null,url:"",children:[]}}function Io(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[]}}function Ri(I){return{type:"listItem",spread:I._spread,checked:null,children:[]}}function gl(){return{type:"paragraph",children:[]}}function lr(){return{type:"strong",children:[]}}function dd(){return{type:"text",value:""}}function hd(){return{type:"thematicBreak"}}}function zr(e){return{line:e.line,column:e.column,offset:e.offset}}function LS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?LS(e,r):q2(e,r)}}function q2(e,t){let n;for(n in t)if(jS.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function jv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fa({start:t.start,end:t.end}
vendor: 4,516 bytes, lines 95-99
95)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is still open")}function W2(e){const t=this;t.parser=n;function n(r){return H2(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function K2(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function G2(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
96`}]}function J2(e,t){const n=t.value?t.value+`
97`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Q2(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Y2(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z2(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ao(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function X2(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function DS(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function tD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DS(e,t);const i={src:Ao(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function nD(e,t){const n={src:Ao(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rD(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DS(e,t);const i={href:Ao(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function sD(e,t){const n={href:Ao(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oD(e,t,n){const r=e.all(t),i=n?aD(n):MS(t),s={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
98`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
99`});const u={type:"element",tagName:"li",properties:s,children:o};
vendor: 3,230 bytes, line 99
99return e.patch(t,u),e.applyData(t,u)}function aD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=MS(n[r])}return t}function MS(e){const t=e.spread;return t??e.children.length>1}function lD(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function uD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cD(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dD(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hD(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=zm(t.children[1]),l=yS(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function fD(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const d=t.children[l],f={},h=o?o[l]:void 0;h&&(f.align=h);let v={type:"element",tagName:s,properties:f,children:[]};d&&(v.children=e.all(d),e.patch(d,v),v=e.applyData(d,v)),u.push(v)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function pD(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Lv=9,Dv=32;function mD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Mv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Mv(t.slice(i),i>0,!1)),s.join("")}function Mv(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Lv||s===Dv;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Lv||s===Dv;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gD(e,t){const n={type:"text",value:mD(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yD(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const vD={blockquote:K2,break:G2,code:J2,delete:Q2,emphasis:Y2,footnoteReference:Z2,heading:X2,html:eD,imageReference:tD,image:nD,inlineCode:rD,linkReference:iD,link:sD,listItem:oD,list:lD,paragraph:uD,root:cD,strong:dD,table:hD,tableCell:pD,tableRow:fD,text:gD,thematicBreak:yD,toml:Ul,yaml:Ul,definition:Ul,footnoteDefinition:Ul};function Ul(){}const $S=-1,ed=0,ma=1,cc=2,Km=3,Gm=4,Jm=5,Qm=6,FS=7,zS=8,wD=typeof self=="object"?self:globalThis,$v=(e,t)=>
vendor: 4,583 bytes, lines 99-100
99{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new wD[e](t)},xD=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case ed:case $S:return n(o,i);case ma:{const a=n([],i);for(const l of o)a.push(r(l));return a}case cc:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Km:return n(new Date(o),i);case Gm:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Jm:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case Qm:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case FS:{const{name:a,message:l}=o;return n($v(a,l),i)}case zS:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n($v(s,o),i)};return r},Fv=e=>xD(new Map,e)(0),ds="",{toString:bD}={},{keys:_D}=Object,Wo=e=>{const t=typeof e;if(t!=="object"||!e)return[ed,t];const n=bD.call(e).slice(8,-1);switch(n){case"Array":return[ma,ds];case"Object":return[cc,ds];case"Date":return[Km,ds];case"RegExp":return[Gm,ds];case"Map":return[Jm,ds];case"Set":return[Qm,ds];case"DataView":return[ma,n]}return n.includes("Array")?[ma,n]:n.includes("Error")?[FS,n]:[cc,n]},Bl=([e,t])=>e===ed&&(t==="function"||t==="symbol"),SD=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=Wo(o);switch(a){case ed:{let c=o;switch(l){case"bigint":a=zS,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([$S],o)}return i([a,c],o)}case ma:{if(l){let f=o;return l==="DataView"?f=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(o)),i([l,[...f]],o)}const c=[],d=i([a,c],o);for(const f of o)c.push(s(f));return d}case cc:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const c=[],d=i([a,c],o);for(const f of _D(o))(e||!Bl(Wo(o[f])))&&c.push([s(f),s(o[f])]);return d}case Km:return i([a,o.toISOString()],o);case Gm:{const{source:c,flags:d}=o;return i([a,{source:c,flags:d}],o)}case Jm:{const c=[],d=i([a,c],o);for(const[f,h]of o)(e||!(Bl(Wo(f))||Bl(Wo(h))))&&c.push([s(f),s(h)]);return d}case Qm:{const c=[],d=i([a,c],o);for(const f of o)(e||!Bl(Wo(f)))&&c.push(s(f));return d}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},zv=(e,{json:t,lossy:n}={})=>{const r=[];return SD(!(t||n),!!t,new Map,r)(e),r},dc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Fv(zv(e,t)):structuredClone(e):(e,t)=>Fv(zv(e,t));function kD(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ED(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function CD(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kD,r=e.options.footnoteBackLabel||ED,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),f=Ao(d.toLowerCase());let h=0;const v=[],p=e.footnoteCounts.get(d);for(;p!==void 0&&++h<=p;){v.length>0&&v.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,h);typeof y=="string"&&(y={type:"text",value:y}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const b=c[c.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const y=b.children[b.children.length-1];y&&y.type==="text"?y.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...v)}else c.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...dc(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
100`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)}
vendor: 18,128 bytes, lines 100-105
100,{type:"text",value:`
101`}]}}const US=function(e){if(e==null)return AD;if(typeof e=="function")return td(e);if(typeof e=="object")return Array.isArray(e)?TD(e):RD(e);if(typeof e=="string")return PD(e);throw new Error("Expected function, string, or object as test")};function TD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=US(e[n]);return td(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function RD(e){const t=e;return td(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function PD(e){return td(t);function t(n){return n&&n.type===e}}function td(e){return t;function t(n,r,i){return!!(ND(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function AD(){return!0}function ND(e){return e!==null&&typeof e=="object"&&"type"in e}const BS=[],OD=!0,Uv=!1,ID="skip";function jD(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=US(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,c){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=BS,v,p,b;if((!t||s(l,u,c[c.length-1]||void 0))&&(h=LD(n(l,c)),h[0]===Uv))return h;if("children"in l&&l.children){const m=l;if(m.children&&h[0]!==ID)for(p=(r?m.children.length:-1)+o,b=c.concat(m);p>-1&&p<m.children.length;){const y=m.children[p];if(v=a(y,p,b)(),v[0]===Uv)return v;p=typeof v[1]=="number"?v[1]:p+o}}return h}}}function LD(e){return Array.isArray(e)?e:typeof e=="number"?[OD,e]:e==null?BS:[e]}function HS(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),jD(e,s,a,i);function a(l,u){const c=u[u.length-1],d=c?c.children.indexOf(l):void 0;return o(l,d,c)}}const Wf={}.hasOwnProperty,DD={};function MD(e,t){const n=t||DD,r=new Map,i=new Map,s=new Map,o={...vD,...n.handlers},a={all:u,applyData:FD,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:$D,wrap:UD};return HS(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),a;function l(c,d){const f=c.type,h=a.handlers[f];if(Wf.call(a.handlers,f)&&h)return h(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(f)){if("children"in c){const{children:p,...b}=c,m=dc(b);return m.children=a.all(c),m}return dc(c)}return(a.options.unknownHandler||zD)(a,c,d)}function u(c){const d=[];if("children"in c){const f=c.children;let h=-1;for(;++h<f.length;){const v=a.one(f[h],c);if(v){if(h&&f[h-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=Bv(v.value)),!Array.isArray(v)&&v.type==="element")){const p=v.children[0];p&&p.type==="text"&&(p.value=Bv(p.value))}Array.isArray(v)?d.push(...v):d.push(v)}}}return d}}function $D(e,t){e.position&&(t.position=xj(e))}function FD(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,dc(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function zD(e,t){const n=t.data||{},r="value"in t&&!(Wf.call(n,"hProperties")||Wf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UD(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
102`});++r<e.length;)r&&n.push({type:"text",value:`
103`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
104`}),n}function Bv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Hv(e,t){const n=MD(e,t),r=n.one(e,void 0),i=CD(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
105`},i),s}function BD(e,t){return e&&"run"in e?async function(n,r){const i=Hv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Hv(n,{file:r,...e||t})}}function Vv(e){if(e)throw e}var bu=Object.prototype.hasOwnProperty,VS=Object.prototype.toString,qv=Object.defineProperty,Wv=Object.getOwnPropertyDescriptor,Kv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):VS.call(t)==="[object Array]"},Gv=function(t){if(!t||VS.call(t)!=="[object Object]")return!1;var n=bu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&bu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||bu.call(t,i)},Jv=function(t,n){qv&&n.name==="__proto__"?qv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Qv=function(t,n){if(n==="__proto__")if(bu.call(t,n)){if(Wv)return Wv(t,n).value}else return;return t[n]},HD=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=Qv(a,n),i=Qv(t,n),a!==i&&(c&&i&&(Gv(i)||(s=Kv(i)))?(s?(s=!1,o=r&&Kv(r)?r:[]):o=r&&Gv(r)?r:{},Jv(a,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Jv(a,{name:n,newValue:i}));return a};const nh=wc(HD);function Kf(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)}function VD(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...u){const c=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?qD(c,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function qD(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const Vn={basename:WD,dirname:KD,extname:GD,join:JD,sep:"/"};function WD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');fl(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function KD(e){if(fl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function GD(e){fl(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function JD(...e){let t=-1,n;for(;++t<e.length;)fl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QD(n)}function QD(e){fl(e);const t=e.codePointAt(0)===47;let n=YD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function YD(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function fl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ZD={cwd:XD};function XD(){return"/"}function Gf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eM(e){if(typeof e=="string")e=new URL(e);else if(!Gf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tM(e)}function tM(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const rh=["history","path","basename","stem","extname","dirname"];class qS{constructor(t){let n;t?Gf(t)?n={path:t}:typeof t=="string"||nM(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ZD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rh.length;){const s=rh[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)rh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Vn.basename(this.path):void 0}set basename(t){sh(t,"basename"),ih(t,"basename"),this.path=Vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vn.dirname(this.path):void 0}set dirname(t){Yv(this.basename,"dirname"),this.path=Vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vn.extname(this.path):void 0}set extname(t){if(ih(t,"extname"),Yv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Gf(t)&&(t=eM(t)),sh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vn.basename(this.path,this.extname):void 0}set stem(t){sh(t,"stem"),ih(t,"stem"),this.path=Vn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new _t(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ih(e,t){if(e&&e.includes(Vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vn.sep+"`")}function sh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Yv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rM=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},iM={}.hasOwnProperty;class Ym extends rM{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=VD()}copy(){const t=new Ym;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(nh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(lh("data",this.frozen),this.namespace[t]=n,this):iM.call(this.namespace,t)&&this.namespace[t]||void 0:t?(lh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Hl(t),r=this.parser||this.Parser;return oh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oh("process",this.parser||this.Parser),ah("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Hl(t),l=r.parse(a);r.run(l,a,function(c,d,f){if(c||!d||!f)return u(c);const h=d,v=r.stringify(h,f);aM(v)?f.value=v:f.result=v,u(c,f)});function u(c,d){c||!d?o(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),oh("processSync",this.parser||this.Parser),ah("processSync",this.compiler||this.Compiler),this.process(t,i),Xv("processSync","process",n),r;function i(s,o){n=!0,Vv(s),r=o}}run(t,n,r){Zv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=Hl(n);i.run(t,l,u);function u(c,d,f){const h=d||t;c?a(c):o?o(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Xv("runSync","run",r),i;function s(o,a){Vv(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=Hl(n),i=this.compiler||this.Compiler;return ah("stringify",i),Zv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(lh("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;l(c,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=nh(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...c]);else if(c.length>0){let[h,...v]=c;const p=r[f][1];Kf(p)&&Kf(h)&&(h=nh(!0,p,h)),r[f]=[u,h,...v]}}}}const sM=new Ym().freeze();function oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function lh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zv(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hl(e){return oM(e)?e:new qS(e)}function oM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aM(e){return typeof e=="string"||lM(e)}function lM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ew=[],tw={allowDangerousHtml:!0},cM=/^(https?|ircs?|mailto|xmpp)$/i,dM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hM(e){const t=fM(e),n=pM(e);return mM(t.runSync(t.parse(n),n),e)}function fM(e){const t=e.rehypePlugins||ew,n=e.remarkPlugins||ew,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tw}:tw;return sM().use(W2).use(n).use(BD,r).use(t)}function pM(e){const t=e.children||"",n=new qS;return typeof t=="string"&&(n.value=t),n}function mM(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||gM;for(const c of dM)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+uM+c.id,void 0);return HS(e,u),Ej(e,{Fragment:g.Fragment,components:i,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function u(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return o?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Xd)if(Object.hasOwn(Xd,h)&&Object.hasOwn(c.properties,h)){const v=c.properties[h],p=Xd[h];(p===null||p.includes(c.tagName))&&(c.properties[h]=l(String(v||""),h,c))}}
105if(c.type==="element"){let h=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,f)),h&&f&&typeof d=="number")return a&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function gM(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||cM.test(e.slice(0,t))?e:""}const yM="/assets/sylvie-portrait-qDezrUI6.jpg",vM="/assets/family-createurs-geste-DPQL1W6i.jpg",wM="/assets/family-icones-identitaires-C1qOA_6u.jpg",xM="/assets/family-signatures-quotidien-MTx7vi6B.jpg",bM="/assets/family-singulieres-culturelles-kMgvRs-C.jpg",_M="/assets/family-graals-exception-Dhk-wLKu.jpg",SM={1:vM,2:wM,3:xM,4:bM,5:_M};function kM(e){if(!e)return e;const t=/\n?^#{1,6}\s*Et\s+maintenant\s*\??\s*$[\s\S]*/gim;return e.replace(t,"").trim()}function EM({diagnostic:e,selectedFamily:t,brandName:n}){const r=RI.find(a=>a.id===t),i=SM[t],s="https://meet.brevo.com/sylvie-arkoun-1/seance-de-coaching-1",o=kM(e);return g.jsx("div",{className:"min-h-screen py-16 px-6",children:g.jsxs("div",{className:"max-w-3xl mx-auto",children:[g.jsxs("div",{className:"text-center mb-12 fade-in",children:[g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mb-8"}),g.jsx("h1",{className:"text-display text-foreground mb-4",children:"Votre diagnostic stratégique"}),n&&g.jsxs("p",{className:"text-lg text-muted-foreground font-sans mb-6",children:["Marque analysée : ",n]}),r&&g.jsxs("div",{className:"mt-4 bg-card/50 border border-border rounded-sm overflow-hidden",children:[i&&g.jsx("div",{className:"w-full h-48 md:h-64 overflow-hidden",children:g.jsx("img",{src:i,alt:`Illustration de la famille ${r.name}`,className:"w-full h-full object-cover"})}),g.jsxs("div",{className:"p-4 md:p-6",children:[g.jsx("span",{className:"text-xs text-gold font-sans tracking-wide uppercase block mb-2",children:"Famille visée"}),g.jsx("span",{className:"text-lg md:text-xl text-foreground font-serif",children:r.name})]})]}),g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mt-8"})]}),g.jsx("div",{className:"bg-card/30 border border-border rounded-sm p-8 md:p-12 mb-12 fade-in",style:{animationDelay:"0.2s"},children:g.jsx("div",{className:`prose prose-stone max-w-none 
106            prose-headings:font-serif prose-headings:text-foreground prose-headings:font-semibold
107            prose-h1:text-3xl prose-h1:mt-10 prose-h1:mb-6 prose-h1:text-primary prose-h1:border-b prose-h1:border-border prose-h1:pb-4
108            prose-h2:text-2xl prose-h2:mt-12 prose-h2:mb-5 prose-h2:text-primary
109            prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-4 prose-h3:text-foreground
110            prose-p:text-foreground/90 prose-p:leading-relaxed prose-p:font-sans prose-p:text-[15px] prose-p:mb-4
111            prose-li:text-foreground/90 prose-li:font-sans prose-li:text-[15px]
112            prose-strong:text-foreground prose-strong:font-semibold
113            prose-ul:my-5 prose-li:my-2
114            [&>*+h2]:mt-14 [&>*+h3]:mt-10
115          `,children:g.jsx(hM,{children:o})})}),g.jsxs("div",{className:"bg-secondary/50 border border-border rounded-sm p-8 md:p-12 fade-in",style:{animationDelay:"0.4s"},children:[g.jsx("h2",{className:"text-headline text-foreground mb-6 text-center",children:"Et maintenant ?"}),g.jsxs("div",{className:"text-muted-foreground font-sans leading-relaxed mb-8 max-w-2xl mx-auto space-y-4",children:[g.jsx("p",{children:"Ce diagnostic vous offre une première lecture de votre marque et de ses enjeux structurants. Il dessine plusieurs chemins possibles, mais leur pertinence dépendra des décisions que vous souhaiterez réellement poser pour la suite."}),g.jsx("p",{children:"Je vous propose un temps de restitution stratégique en visio pour :"}),g.jsxs("ul",{className:"list-disc list-inside space-y-1 pl-2",children:[g.jsx("li",{children:"lire ce diagnostic ensemble,"}),g.jsx("li",{children:"approfondir les tensions et les leviers identifiés,"}),g.jsx("li",{children:"et vous présenter les formes de partenariat stratég
115ique sur mesure que je propose, en cohérence avec votre situation."})]})]}),g.jsxs("div",{className:"bg-card/60 border border-gold/20 rounded-sm p-6 md:p-8 mb-8 max-w-xl mx-auto",children:[g.jsx("h3",{className:"text-lg font-serif text-foreground mb-4 text-center",children:"Restitution stratégique & proposition de partenariat"}),g.jsxs("ul",{className:"text-muted-foreground font-sans text-sm space-y-2 mb-6",children:[g.jsx("li",{children:"– 1h30 en visio"}),g.jsx("li",{children:"– Lecture détaillée du diagnostic"}),g.jsx("li",{children:"– Recommandations hiérarchisées"}),g.jsx("li",{children:"– Présentation de mes offres de partenariat stratégique personnalisées"})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("p",{className:"text-muted-foreground font-sans text-sm",children:["Investissement : ",g.jsx("span",{className:"line-through",children:"500 €"})]}),g.jsx("p",{className:"text-gold font-serif text-xl mt-1",children:"Tarif préférentiel en cours : 300 €"})]})]}),g.jsx("div",{className:"text-center mb-10",children:g.jsx(at,{asChild:!0,size:"lg",className:"bg-primary hover:bg-primary/90 text-primary-foreground px-8 py-6 text-base font-sans tracking-wide btn-shine gold-glow",children:g.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:"Réserver ma restitution stratégique"})})}),g.jsxs("div",{className:"flex items-center justify-start gap-6 pt-8 border-t border-border/50",children:[g.jsx("div",{className:"w-20 h-20 rounded-full overflow-hidden flex-shrink-0 ring-2 ring-gold/30",children:g.jsx("img",{src:yM,alt:"Portrait de Sylvie Arkoun",loading:"lazy",decoding:"async",className:"w-full h-full object-cover object-top",onError:a=>{a.currentTarget.src="/images/sylvie-portrait.jpg"}})}),g.jsxs("div",{className:"text-left",children:[g.jsx("p",{className:"text-foreground font-serif text-lg",children:"Sylvie Arkoun"}),g.jsx("p",{className:"text-muted-foreground font-sans text-sm",children:"Stratégie & Storytelling Joaillier"})]})]})]}),g.jsxs("div",{className:"text-center mt-16",children:[g.jsx("div",{className:"w-12 h-px bg-gradient-to-r from-transparent via-gold to-transparent mx-auto mb-6"}),g.jsxs("p",{className:"text-xs text-muted-foreground font-sans",children:["© ",new Date().getFullYear()," Sylvie Arkoun — Stratégie & Storytelling Joaillier"]})]})]})})}function CM(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})}const TM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Zm extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class RM extends Zm{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class nw extends Zm{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class rw extends Zm{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Jf;(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"})(Jf||(Jf={}));class PM{constructor(t,{headers:n={},customFetch:r,region:i=Jf.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=TM(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return CM(this,arguments,void 0,function*(n,r={}){var i;let s,o;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=r;let f={},{region:h}=r;h||(h=this.region);const v=new URL(`${this.url}/${n}`);h&&h!=="any"&&(f["x-region"]=h,v.searchParams.set("forceFunctionRegion",h));let p;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",p=u):typeof u=="string"?(f["Content-Type"]="text/plain",p=u):typeof FormData<"u"&&u instanceof FormData?p=u:(f["Content-Type"]="application/json",p=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?p=JSON.stringify(u):p=u;let b=c;d&&(o=new AbortController,s=setTimeout(()=>
115o.abort(),d),c?(b=o.signal,c.addEventListener("abort",()=>o.abort())):b=o.signal);const m=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:p,signal:b}).catch(C=>{throw new RM(C)}),y=m.headers.get("x-relay-error");if(y&&y==="true")throw new nw(m);if(!m.ok)throw new rw(m);let w=((i=m.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield m.json():w==="application/octet-stream"||w==="application/pdf"?S=yield m.blob():w==="text/event-stream"?S=m:w==="multipart/form-data"?S=yield m.formData():S=yield m.text(),{data:S,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof rw||a instanceof nw?a.context:void 0}}finally{s&&clearTimeout(s)}})}}const WS=3,iw=e=>Math.min(1e3*2**e,3e4),AM=[520,503],KS=["GET","HEAD","OPTIONS"];var NM=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function sw(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",i),n()},e);function i(){clearTimeout(r),n()}t==null||t.addEventListener("abort",i)})}function OM(e,t,n,r){return!(!r||n>=WS||!KS.includes(e)||!AM.includes(t))}var IM=class{constructor(e){var t,n,r,i,s;this.shouldThrowOnError=!1,this.retryEnabled=!0,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,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(s=e.retry)!==null&&s!==void 0?s:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(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"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let s=(async()=>{let o=0;for(;;){const u=new Headers(n.headers);o>0&&u.set("X-Retry-Count",String(o));let c;try{c=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!KS.includes(n.method))throw d;if(n.retryEnabled&&o<WS){const f=iw(o);o++,await sw(f,n.signal);continue}throw d}if(OM(n.method,c.status,o,n.retryEnabled)){var a,l;const d=(a=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:iw(o);await c.text(),o++,await sw(f,n.signal);continue}return await n.processResponse(c)}})();return this.shouldThrowOnError||(s=s.catch(o=>{var a;let l="",u="",c="";const d=o==null?void 0:o.cause;if(d){var f,h,v,p;const y=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",w=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(v=o==null?void 0:o.name)!==null&&v!==void 0?v:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
116
117Caused by: ${(p=d==null?void 0:d.name)!==null&&p!==void 0?p:"Error"}: ${y}`,w&&(l+=` (${w})`),d!=null&&d.stack&&(l+=`
118${d.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const m=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",m>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${m} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",m>this.urlLengthLimit&&(u+=`. Your request URL is ${m} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}}
118)),s.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,s=e.status,o=e.statusText;if(e.ok){var a,l;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const c=(a=t.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");c&&d&&d.length>1&&(i=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,i=null,s=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const c=await e.text();try{n=JSON.parse(c),Array.isArray(n)&&e.status===404&&(r=[],n=null,s=200,o="OK")}catch{e.status===404&&c===""?(s=204,o="No Content"):n={message:c}}if(n&&t.shouldThrowOnError)throw new NM(n)}return{success:n===null,error:n,data:r,count:i,status:s,statusText:o}}returns(){return this}overrideTypes(){return this}},jM=class extends IM{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:i=r}={}){const s=i?`${i}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${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 i=typeof r>"u"?"offset":`${r}.offset`,s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(s,`${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.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:s="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${l}"; options=${a};`),s==="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 ow=new RegExp("[,()]");var _s=class extends jM{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"&&ow.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"&&ow.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 i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const s=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${s}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
118n!==void 0).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}},LM=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:s}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},i=n?"HEAD":"GET";let s=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!s?"":(u==='"'&&(s=!s),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new _s({method:i,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const i="POST",{url:s,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1180){const l=[...new Set(a)].map(u=>`"${u}"`);s.searchParams.set("columns",l.join(","))}}return new _s({method:i,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var s;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),i||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new _s({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:i,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new _s({method:r,url:i,headers:s,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new _s({method:n,url:r,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ka(e){"@babel/helpers - typeof";return Ka=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},Ka(e)}function DM(e,t){if(Ka(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ka(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MM(e){var t=DM(e,"string");return Ka(t)=="symbol"?t:t+""}function $M(e,t,n){return(t=MM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aw(Object(n),!0).forEach(function(r){$M(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var FM=class GS{constructor(t,{headers:n={},schema:r,fetch:i,timeout:s,urlLengthLimit:o=8e3,retry:a}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=i??globalThis.fetch;s!==void 0&&s>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),s),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const v=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",v,{once:!0}),l(u,Vl(Vl({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",v)})}return l(u,Vl(Vl({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new LM(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new GS(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=r&&Object.values(n).some(c);d?(a="POST",u=n):r||i?(a=r?"HEAD":"GET",Object.entries(n).filter(([h,v])=>v!==void 0).map(([h,v])=>[h,Array.isArray(v)?`{${v.join(",")}}`:`${v}
118`]).forEach(([h,v])=>{l.searchParams.append(h,v)})):(a="POST",u=n);const f=new Headers(this.headers);return d?f.set("Prefer",s?`count=${s},return=minimal`:"return=minimal"):s&&f.set("Prefer",`count=${s}`),new _s({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class zM{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.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"&&n.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 i=globalThis.process;if(i){const s=i.versions;if(s&&s.node){const o=s.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
119import ws from "ws"
120new 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.wsConstructor)return t.wsConstructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
121
122Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const UM="2.106.2",BM=`realtime-js/${UM}`,HM="1.0.0",JS="2.0.0",VM=JS,qM=1e4,WM=100,Gr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},QS={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Qf={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class KM{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 i=(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,i)}_encodeJsonUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var i,s;const o=t.topic,a=(i=t.ref)!==null&&i!==void 0?i:"",l=(s=t.join_ref)!==null&&s!==void 0?s:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.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(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
122let v=new DataView(h),p=0;v.setUint8(p++,this.KINDS.userBroadcastPush),v.setUint8(p++,l.length),v.setUint8(p++,a.length),v.setUint8(p++,o.length),v.setUint8(p++,u.length),v.setUint8(p++,d.length),v.setUint8(p++,n),Array.from(l,m=>v.setUint8(p++,m.charCodeAt(0))),Array.from(a,m=>v.setUint8(p++,m.charCodeAt(0))),Array.from(o,m=>v.setUint8(p++,m.charCodeAt(0))),Array.from(u,m=>v.setUint8(p++,m.charCodeAt(0))),Array.from(d,m=>v.setUint8(p++,m.charCodeAt(0)));var b=new Uint8Array(h.byteLength+r.byteLength);return b.set(new Uint8Array(h),0),b.set(new Uint8Array(r),h.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),[i,s,o,a,l]=r;return n({join_ref:i,ref:s,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,i)}}_decodeUserBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(t.slice(l,l+i));l=l+i;const c=r.decode(t.slice(l,l+s));l=l+s;const d=r.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,v={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(v.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:v}}_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)))}}var Ie;(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"})(Ie||(Ie={}));const lw=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((s,o)=>(s[o]=GM(o,e,t,i),s),{}):{}},GM=(e,t,n,r)=>{const i=t.find(a=>a.name===e),s=i==null?void 0:i.type,o=n[e];return s&&!r.includes(s)?YS(s,o):Yf(o)},YS=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return ZM(t,n)}switch(e){case Ie.bool:return JM(t);case Ie.float4:case Ie.float8:case Ie.int2:case Ie.int4:case Ie.int8:case Ie.numeric:case Ie.oid:return QM(t);case Ie.json:case Ie.jsonb:return YM(t);case Ie.timestamp:return XM(t);case Ie.abstime:case Ie.date:case Ie.daterange:case Ie.int4range:case Ie.int8range:case Ie.money:case Ie.reltime:case Ie.text:case Ie.time:case Ie.timestamptz:case Ie.timetz:case Ie.tsrange:case Ie.tstzrange:return Yf(t);default:return Yf(t)}},Yf=e=>e,JM=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},QM=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},YM=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},ZM=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const o=e.slice(1,n);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(a=>YS(t,a))}return e},XM=e=>typeof e=="string"?e.replace(" ","T"):e,ZS=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};var ga=e=>typeof e=="function"?e:function(){return e},e$=typeof self<"u"?self:null,Ss=typeof window<"u"?window:null,qn=e$||Ss||globalThis,t$="2.0.0",n$=1e4,r$=1e3,Jn={connecting:0,open:1,closing:2,closed:3},At={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},pr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Zf={longpoll:"longpoll",websocket:"websocket"},i$={complete:4},Xf="base64url.bearer.phx.",ql=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHo
vendor: 8,700 bytes, line 122
122oks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),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()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},XS=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},s$=class{constructor(e,t,n){this.state=At.closed,this.topic=e,this.params=ga(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ql(this,pr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new XS(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=At.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=At.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=At.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=At.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new ql(this,pr.leave,ga({}),this.timeout).send(),this.state=At.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(pr.reply,(r,i)=>{this.trigger(this.replyEventName(i),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=At.closed,this.bindings=[]}onClose(e){this.on(pr.close,e)}onError(e){return this.on(pr.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new ql(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=At.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(pr.close,"leave")},n=new ql(this,pr.leave,ga({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=At.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let s=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<s.length;o++)s[o].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===At.closed}isErrored(){return this.state===At.errored}isJoined(){return this.state===At.joined}isJoining(){return this.state===At.joining}isLeaving(){return this.state===At.leaving}},hc=class{static request(e,t,n,r,i,s,o){if(qn.XDomainRequest){let a=new qn.XDomainRequest;return this.xdomainRequest(a,e,t,r,i,s,o)}else if(qn.XMLHttpRequest){let a=new qn.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,i,s,o)}else{if(qn.fetch&&qn.AbortController)return this.fetchRequest(e,t,n,r,i,s,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,i,s,o){let a={method:e,headers:n,body:r},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),a.signal=l.signal),qn.fetch(t,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&s?s():o&&o(null)}),l}static xdomainRequest(e,t,n,r,i,s,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},s&&(e.ontimeout=s),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,s,o,a){e.open(t,n,!0),e.timeout=s;for(let[l,u]of Object.entries(r))e.setRequestHeader(l,u);return e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===i$.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,s=e[r];typeof s=="object"?n.push(this.serialize(s,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(s))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},o$=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let i=0;i<r;i++)t+=String.fromCharCode(n[i]);return btoa(t)},hs=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Xf)&&(this.authToken=atob(t[1].slice(Xf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Jn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Zf.websocket),"$1/"+Zf.longpoll)}endpointURL(){return hc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Jn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Jn.open||this.readyState===Jn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:i}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:i.forEach(s=>{setTimeout(()=>this.onmessage({data:s}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Jn.open,this.onopen({}),this.poll();break;
122case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=o$(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
123`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let i of this.reqs)i.abort();this.readyState=Jn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,i){let s,o=()=>{this.reqs.delete(s),r()};s=hc.request(e,this.endpointURL(),t,n,this.timeout,o,a=>{this.reqs.delete(s),this.isActive()&&i(a)}),this.reqs.add(s)}},a$=class Xo{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,i=>{let{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Xo.syncState(this.state,i,s,o),this.pendingDiffs.forEach(l=>{this.state=Xo.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,i=>{let{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Xo.syncDiff(this.state,i,s,o),a())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Xo.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,i){let s=this.clone(t),o={},a={};return this.map(s,(l,u)=>{n[l]||(a[l]=u)}),this.map(n,(l,u)=>{let c=s[l];if(c){let d=u.metas.map(p=>p.phx_ref),f=c.metas.map(p=>p.phx_ref),h=u.metas.filter(p=>f.indexOf(p.phx_ref)<0),v=c.metas.filter(p=>d.indexOf(p.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),v.length>0&&(a[l]=this.clone(c),a[l].metas=v)}else o[l]=u}),this.syncDiff(s,{joins:o,leaves:a},r,i)}static syncDiff(t,n,r,i){let{joins:s,leaves:o}=this.clone(n);return r||(r=function(){}),i||(i=function(){}),this.map(s,(a,l)=>{let u=t[a];if(t[a]=this.clone(l),u){let c=t[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);t[a].metas.unshift(...d)}r(a,u,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),i(a,u,l),u.metas.length===0&&delete t[a]}),t}static list(t,n){return n||(n=function(r,i){return i}),this.map(t,(r,i)=>n(r,i))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Wl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,s,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:s,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:s}=e,o=this.META_LENGTH+t.length+n.length+i.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),u=0;l.setUint8(u++,this.KINDS.push),l.setUint8(u++,t.length),l.setUint8(u++,n.length),l.setUint8(u++,i.length),l.setUint8(u++,r.length),Array.from(t,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(i,d=>l.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(u++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+s.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(s),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,485 bytes, line 123
123,decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(o,o+r));o=o+r;let l=n.decode(e.slice(o,o+i));o=o+i;let u=n.decode(e.slice(o,o+s));o=o+s;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(a,a+r));a=a+r;let u=n.decode(e.slice(a,a+i));a=a+i;let c=n.decode(e.slice(a,a+s));a=a+s;let d=n.decode(e.slice(a,a+o));a=a+o;let f=e.slice(a,e.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:pr.reply,payload:h}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=this.HEADER_LENGTH+2,o=n.decode(e.slice(s,s+r));s=s+r;let a=n.decode(e.slice(s,s+i));s=s+i;let l=e.slice(s,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},l$=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||n$,this.transport=t.transport||qn.WebSocket||hs,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=qn&&qn.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Wl.encode.bind(Wl),this.defaultDecoder=Wl.decode.bind(Wl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==hs?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Ss&&Ss.addEventListener&&(Ss.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Ss.addEventListener("pageshow",i=>{r===this.connectClock&&(r=null,this.connect())}),Ss.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>t.rejoinAfterMs?t.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>t.reconnectAfterMs?t.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(i,s,o)=>{console.log(`${i}: ${s}`,o)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ga(t.params||{}),this.endPoint=`${e}/${Zf.websocket}`,this.vsn=t.vsn||t$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new XS(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return hs}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=hc.appendParams(hc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ga(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==hs?this.connectWithFallback(hs,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case hs:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${Xf}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,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)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,s,o=this.transportName(e),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([i,s]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,t),s=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,t),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),r$,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Jn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 4,126 bytes, line 123
123triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(pr.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Jn.connecting:return"connecting";case Jn.open:return"open";case Jn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new s$(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:s}=e;this.log("push",`${t} ${n} (${s}, ${i})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:i,ref:s,join_ref:o}=t;if(s&&s===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${n} ${r} ${s&&"("+s+")"||""}`.trim(),i);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,i,o)&&l.trigger(r,i,s,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class ya{constructor(t,n){const r=c$(n);this.presence=new a$(t.getChannel(),r),this.presence.onJoin((i,s,o)=>{const a=ya.onJoinPayload(i,s,o);t.getChannel().trigger("presence",a)}),this.presence.onLeave((i,s,o)=>{const a=ya.onLeavePayload(i,s,o);t.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ya.transformState(this.presence.state)}static transformState(t){return t=u$(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return n[r]=_u(i),n},{})}static onJoinPayload(t,n,r){const i=uw(n),s=_u(r);return{event:"join",key:t,currentPresences:i,newPresences:s}}static onLeavePayload(t,n,r){const i=uw(n),s=_u(r);return{event:"leave",key:t,currentPresences:i,leftPresences:s}}}function _u(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function u$(e){return JSON.parse(JSON.stringify(e))}function c$(e){return(e==null?void 0:e.events)&&{events:e.events}}function uw(e){return e!=null&&e.metas?_u(e):[]}var cw;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(cw||(cw={}));class d${get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new ya(this.channel.channelAdapter,n)}}function h$(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
123if(e&&typeof e=="object"){const t=e;if(typeof t.code=="number"){const n=typeof t.reason=="string"&&t.reason?` (${t.reason})`:"";return new Error(`socket closed: ${t.code}${n}`,{cause:e})}return new Error("channel error: transport failure",{cause:e})}return new Error("channel error: connection lost")}class f${constructor(t,n,r){const i=p$(r);this.channel=t.getSocket().channel(n,i),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let i;try{i=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>WM){const s=this.channel.pushBuffer.shift();s.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${s.event}`,s.payload())}return i}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Gr.joined}isJoined(){return this.state===Gr.joined}isJoining(){return this.state===Gr.joining}isClosed(){return this.state===Gr.closed}isLeaving(){return this.state===Gr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function p$(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var dw;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(dw||(dw={}));var $s;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})($s||($s={}));var mr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(mr||(mr={}));class va{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var i,s;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},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.channelAdapter=new f$(this.socket.socketAdapter,t,this.params),this.presence=new d$(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=ZS(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((s=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||s===void 0)&&s.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&i!==void 0?i:[],c=!!this.bindings[$s.PRESENCE]&&this.bindings[$s.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{t==null||t(mr.CHANNEL_ERROR,h$(h))}),this._onClose(()=>t==null?void 0:t(mr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(mr.SUBSCRIBED);return}this._updatePostgresBindings(h,t)}
123).receive("error",h=>{this.state=Gr.errored;const v=Object.values(h).join(", ")||"error";t==null||t(mr.CHANNEL_ERROR,new Error(v,{cause:h}))}).receive("timeout",()=>{t==null||t(mr.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const i=this.bindings.postgres_changes,s=(r=i==null?void 0:i.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<s;a++){const l=i[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=t&&t[a];if(h&&h.event===u&&va.isFilterValueEqual(h.schema,c)&&va.isFilterValueEqual(h.table,d)&&va.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Gr.errored,n==null||n(mr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Gr.errored&&n&&n(mr.SUBSCRIBED)}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){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),s=t===$s.PRESENCE||t===$s.POSTGRES_CHANGES;if(i&&s)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var i;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,i;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
123in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,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 l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,a,l;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),o}_on(t,n,r){const i=t.toLocaleLowerCase(),s=this.channelAdapter.on(t,r),o={type:i,filter:n,callback:r,ref:s};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var i,s,o,a,l,u,c;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(i=this.bindings[d])===null||i===void 0?void 0:i.find(h=>h.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,v=(s=f.filter)===null||s===void 0?void 0:s.event;return h&&((o=n.ids)===null||o===void 0?void 0:o.includes(h))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=n==null?void 0:n.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:i,leave:s,join:o}=QS;return n&&[r,i,s,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const i=n.data,{schema:s,table:o,commit_timestamp:a,type:l,errors:u}=i;return Object.assign(Object.assign({},{schema:s,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(i))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=lw(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=lw(t.columns,t.old_record)),n}}class m${constructor(t,n){this.socket=new l$(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,i=1e4){return new Promise(s=>{setTimeout(()=>s("timeout"),i),this.socket.disconnect(()=>{t(),s("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Qf.connecting}isDisconnecting(){return this.socket.connectionState()==Qf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const hw={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},g$=[1e3,2e3,5e3,1e4],y$=1e4;function v$(){const e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){var n;return(n=Array.from(e.keys())[t])!==null&&n!==void 0?n:null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function w$(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return v$()}const x$=`
124  addEventListener("message", (e) => {
125    if (e.data.event === "start") {
126      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
127    }
128  });`;class b${get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
128,this.ref=0,this.serializer=new KM,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((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;const i=this._initializeOptions(n);this.socketAdapter=new m$(t,i),this.httpEndpoint=ZS(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n}
129
130To use Realtime in Node.js, you need to provide a WebSocket implementation:
131
132Option 1: Use Node.js 22+ which has native WebSocket support
133Option 2: Install and provide the "ws" package:
134
135  npm install ws
136
137  import ws from "ws"
138  const client = new RealtimeClient(url, {
139    ...options,
140    transport: ws
141  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const i=await r.unsubscribe();return r.teardown(),i}),n=await Promise.all(t);return await this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Qf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new va(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(s),s}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
141this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),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(i=>{const s={access_token:n,version:BM};n&&i.updateJoinPayload(s),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(QS.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)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_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.disconnect()},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)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([x$],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,i,s,o,a,l,u,c,d,f,h;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const v={};v.timeout=(i=t==null?void 0:t.timeout)!==null&&i!==void 0?i:qM,v.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:hw.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:hw.HEARTBEAT_INTERVAL),v.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:zM.getWebSocketConstructor(),v.params=t==null?void 0:t.params,v.logger=t==null?void 0:t.logger,v.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),v.sessionStorage=(u=t==null?void 0:t.sessionStorage)!==null&&u!==void 0?u:w$(),v.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:y=>g$[y-1]||y$;let p,b;const m=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:VM;switch(m){case HM:p=(y,w)=>w(JSON.stringify(y)),b=(y,w)=>w(JSON.parse(y));break;case JS:p=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${v.vsn}`)}if(v.vsn=m,v.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:p,v.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:b,v.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,v.params=Object.assign(Object.assign({},v.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,v.autoSendHeartbeat=!this.worker}return v}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
141var Ga=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 _$(e,t,n){const r=new URL(t,e);if(n)for(const[i,s]of Object.entries(n))s!==void 0&&r.searchParams.set(i,s);return r.toString()}async function S$(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 k$(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:s,headers:o}){const a=_$(e.baseUrl,r,i),l=await S$(e.auth),u=await t(a,{method:n,headers:{...s?{"Content-Type":"application/json"}:{},...l,...o},body:s?JSON.stringify(s):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,v=h==null?void 0:h.error;throw new Ga((v==null?void 0:v.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Kl(e){return e.join("�")}var E$=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Kl(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/${Kl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Kl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Kl(e.namespace)}`}),!0}catch(t){if(t instanceof Ga&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Ga&&n.status===409)return;throw n}}};function fs(e){return e.join("�")}var C$=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/${fs(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/${fs(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/${fs(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/${fs(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/${fs(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/${fs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Ga&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Ga&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},T$=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=k$({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new E$(this.client,t),this.tableOps=new C$
141(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)}async 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)}};function Ja(e){"@babel/helpers - typeof";return Ja=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},Ja(e)}function R$(e,t){if(Ja(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ja(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P$(e){var t=R$(e,"string");return Ja(t)=="symbol"?t:t+""}function A$(e,t,n){return(t=P$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?fw(Object(n),!0).forEach(function(r){A$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nd=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function rd(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var ep=class extends nd{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return re({},super.toJSON())}},ek=class extends nd{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function fc(e,t,n){const r=re({},e),i=t.toLowerCase();for(const s of Object.keys(r))s.toLowerCase()===i&&delete r[s];return r[i]=n,r}function N$(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const O$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),I$=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)},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 i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=tp(r)}),t},j$=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),pw=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error;if(typeof t.error=="object"&&t.error!==null){const n=t.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(e)},L$=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const i=e;let s=parseInt(String(i.status),10);Number.isFinite(s)||(s=500),i.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||s+"";t(new ep(pw(o),s,a,r))}).catch(()=>{const o=s+"";t(new ep(i.statusText||`HTTP ${s} error`,s,o,r))})}else t(new ek(pw(e),e,r))},D$=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return re(re({},i),n);if(I$(r)){var s;const o=(t==null?void 0:t.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);i.headers=fc(o,"Content-Type",(s=a)!==null&&s!==void 0?s:"application/json"),i.body=JSON.stringify(r)}else i.body=r;return t!=null&&t.duplex&&(i.duplex=t.duplex),re(re({},i),n)};async function Ko(e,t,n,r,i,s,o){return new Promise((a,l)=>{e(n,D$(t,r,i,s)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>L$(u,l,r,o))})}function tk(e="storage"){return{get:async(t,n,r,i)=>Ko(t,"GET",n,r,i,void 0,e),post:async(t,n,r,i,s)=>Ko(t,"POST",n,i,s,r,e),put:async(t,n,r,i,s)=>Ko(t,"PUT",n,i,s,r,e),head:async(t,n,r,i)=>Ko(t,"HEAD",n,re(re({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,s)=>Ko(t,"DELETE",n,i,s,r,e)}}const M$=tk("storage"),{get:Qa,post:En,put:np,head:$$,remove:Xm}=M$,qt=tk("vectors");var No=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=N$(t),this.fetch=O$(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=fc(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(rd(n))return{data:null,error:n};throw n}}};let nk;nk=Symbol.toStringTag;var F$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[nk]="StreamDownloadBuilder",this.promise=null}
141then(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 e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(rd(t))return{data:null,error:t};throw t}}};let rk;rk=Symbol.toStringTag;var z$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[rk]="BlobDownloadBuilder",this.promise=null}asStream(){return new F$(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(rd(t))return{data:null,error:t};throw t}}};const U$={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},mw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var B$=class extends No{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let s;const o=re(re({},mw),r);let a=re(re({},i.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",i.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.has("cacheControl")||s.append("cacheControl",o.cacheControl),l&&!s.has("metadata")&&s.append("metadata",i.encodeMetadata(l))):(s=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&s instanceof ReadableStream||s&&typeof s=="object"&&"pipe"in s&&typeof s.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))a=fc(a,f,h);const u=i._removeEmptyFolders(t),c=i._getFinalPath(u),d=await(e=="PUT"?np:En)(i.fetch,`${i.url}/object/${c}`,s,re({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;const s=i._removeEmptyFolders(e),o=i._getFinalPath(s),a=new URL(i.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),i.handleOperation(async()=>{let l;const u=re(re({},mw),r);let c=re(re({},i.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),d&&l.append("metadata",i.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),d&&!l.has("metadata")&&l.append("metadata",i.encodeMetadata(d))):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType,d&&(c["x-metadata"]=i.toBase64(i.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))c=fc(c,f,h);return{path:s,fullPath:(await np(i.fetch,a.toString(),l,re({headers:c},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const i=re({},n.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const s=await En(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+s.url),a=o.searchParams.get("token");if(!a)throw new nd("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await En(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
141stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await En(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e);const s=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await En(r.fetch,`${r.url}/object/sign/${i}`,re({expiresIn:t},s?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const i=await En(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),s=new URLSearchParams;n!=null&&n.download&&s.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&s.set("cacheNonce",String(n.cacheNonce));const o=s.toString();return i.map(a=>re(re({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(i,t.transform),(t==null?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));const s=i.toString(),o=this._getFinalPath(e),a=()=>Qa(this.fetch,`${this.url}/${r}/${o}${s?`?${s}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new z$(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>tp(await Qa(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await $$(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(rd(i)){var r;const s=i instanceof ep?i.status:i instanceof ek?(r=i.originalError)===null||r===void 0?void 0:r.status:void 0;if(s!==void 0&&[400,404].includes(s))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const i=r.toString(),s=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}`)+(i?`?${i}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Xm(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const i=re(re(re({},U$),t),{},{prefix:e||""});return await En(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=re({},e);return await En(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}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,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const H$="2.106.2",pl={"X-Client-Info":`storage-js/${H$}`};var V$=class extends No{constructor(e,t={},n,r){const i=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const s=i.href.replace(/\/$/,""),o=re(re({},pl),t);super(s,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Qa(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qa(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await En(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}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>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}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await En(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Xm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}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():""}},q$=class extends No{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=re(re({},pl),t);super(r,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await En(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{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(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Qa(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Xm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!j$(e))throw new nd("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 T$({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
141),r=this.shouldThrowOnError;return new Proxy(n,{get(i,s){const o=i[s];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(i,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},W$=class extends No{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=re(re({},pl),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await qt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await qt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},K$=class extends No{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=re(re({},pl),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},G$=class extends No{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=re(re({},pl),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await qt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},J$=class extends G${constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Q$(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)}},Q$=class extends W${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 Y$(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Y$=class extends K${constructor(e,t,n,r,i){super(e,t,i),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}))}},Z$=class extends V${constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new B$(this.url,this.headers,e,this.fetch)}get vectors(){return new J$(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new q$(this.url+"/iceberg",this.headers,this.fetch)}};function id(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}const ik="2.106.2",ks=30*1e3,rp=3,uh=rp*ks,X$="http://localhost:9999",eF="supabase.auth.token",tF={"X-Client-Info":`gotrue-js/${ik}`},ip="X-Supabase-Api-Version",sk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},nF=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,rF=10*60*1e3;
141class xo extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function J(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class iF extends xo{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function sF(e){return J(e)&&e.name==="AuthApiError"}class Nn extends xo{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Nr extends xo{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class ot extends Nr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Gl(e){return J(e)&&e.name==="AuthSessionMissingError"}class ps extends Nr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Jl extends Nr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ql extends Nr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function oF(e){return J(e)&&e.name==="AuthImplicitGrantRedirectError"}class gw extends Nr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class aF extends Nr{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 sp extends Nr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function ch(e){return J(e)&&e.name==="AuthRetryableFetchError"}class yw extends Nr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class op extends Nr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const pc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),vw=` 	
142\r=`.split(""),lF=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<vw.length;t+=1)e[vw[t].charCodeAt(0)]=-2;for(let t=0;t<pc.length;t+=1)e[pc[t].charCodeAt(0)]=t;return e})();function ww(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(pc[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(pc[r]),t.queuedBits-=6}}function ok(e,t,n){const r=lF[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 xw(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=o=>{dF(o,r,n)};for(let o=0;o<e.length;o+=1)ok(e.charCodeAt(o),i,s);return t.join("")}function uF(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 cF(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}uF(r,t)}}function dF(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 Js(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)ok(e.charCodeAt(i),n,r);return new Uint8Array(t)}function hF(e){const t=[];return cF(e,n=>t.push(n)),new Uint8Array(t)}function zi(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>
142ww(i,n,r)),ww(null,n,r),t.join("")}function fF(e){return Math.round(Date.now()/1e3)+e}function pF(){return Symbol("auth-callback")}const dt=()=>typeof window<"u"&&typeof document<"u",Ai={tested:!1,writable:!1},ak=()=>{if(!dt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ai.tested)return Ai.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ai.tested=!0,Ai.writable=!0}catch{Ai.tested=!0,Ai.writable=!1}return Ai.writable};function mF(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const lk=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gF=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Es=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ni=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},ct=async(e,t)=>{await e.removeItem(t)};class sd{constructor(){this.promise=new sd.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}sd.promiseConstructor=Promise;function Yl(e){const t=e.split(".");if(t.length!==3)throw new op("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!nF.test(t[r]))throw new op("JWT not in base64url format");return{header:JSON.parse(xw(t[0])),payload:JSON.parse(xw(t[1])),signature:Js(t[2]),raw:{header:t[0],payload:t[1]}}}async function yF(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function vF(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await e(s);if(!t(s,null,o)){r(o);return}}catch(o){if(!t(s,o)){i(o);return}}})()})}function wF(e){return("0"+e.toString(16)).substr(-2)}function xF(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,wF).join("")}async function bF(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function _F(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 bF(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ms(e,t,n=!1){const r=xF();let i=r;n&&(i+="/recovery"),await Es(e,`${t}-code-verifier`,i);const s=await _F(r);return[s,r===s?"plain":"s256"]}const SF=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function kF(e){const t=e.headers.get(ip);if(!t||!t.match(SF))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function EF(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 CF(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 TF=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function cr(e){if(!TF.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function bn(e){if(!e.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function dh(){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 RF(e,t){return new Proxy(e,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;
142if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,i)}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,i)}})}function bw(e){return JSON.parse(JSON.stringify(e))}const ji=e=>{if(typeof e=="object"&&e!==null){const t=e;if(typeof t.msg=="string")return t.msg;if(typeof t.message=="string")return t.message;if(typeof t.error_description=="string")return t.error_description;if(typeof t.error=="string")return t.error}return JSON.stringify(e)},PF=[502,503,504,520,521,522,523,524,530];async function _w(e){var t;if(!gF(e))throw new sp(ji(e),0);if(PF.includes(e.status))throw new sp(ji(e),e.status);let n;try{n=await e.json()}catch(s){throw new Nn(ji(s),s)}let r;const i=kF(e);if(i&&i.getTime()>=sk["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 yw(ji(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new ot}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((s,o)=>s&&typeof o=="string",!0))throw new yw(ji(n),e.status,n.weak_password.reasons);throw new iF(ji(n),e.status||500,r)}const AF=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function ee(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[ip]||(s[ip]=sk["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const o=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await NF(e,t,n+a,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function NF(e,t,n,r,i,s){const o=AF(t,r,i,s);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new sp(ji(l),0)}if(a.ok||await _w(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await _w(l)}}function tn(e){var t;let n=null;jF(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=fF(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:typeof(e==null?void 0:e.id)=="string"?e:null;return{data:{session:n,user:r},error:null}}function Sw(e){const t=tn(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 Jr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function OF(e){return{data:e,error:null}}function IF(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,o=id(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function kw(e){return e}function jF(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const hh=["global","local","others"];class LF{_encodePathSegment(t){if(t==="."||t==="..")throw new xo("Invalid path segment");return encodeURIComponent(t)}constructor({url:t="",headers:n={},fetch:r,experimental:i}){this.url=t,this.headers=n,this.fetch=lk(r),this.experimental=i??{},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)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}
142async signOut(t,n=hh[0]){if(hh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${hh.join(", ")}`);try{return await ee(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(J(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await ee(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Jr})}catch(r){if(J(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=id(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await ee(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:IF,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(J(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Jr})}catch(n){if(J(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,s,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await ee(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:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:kw});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(v=>{const p=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(J(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){cr(t);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Jr})}catch(n){if(J(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){cr(t);try{return await ee(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Jr})}catch(r){if(J(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){cr(t);try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Jr})}catch(r){if(J(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){cr(t.userId);try{const{data:n,error:r}=await ee(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(J(n))return{data:null,error:n};throw n}}async _deleteFactor(t){cr(t.userId),cr(t.id);try{return{data:await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(J(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,i,s,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await ee(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:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:kw});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(v=>{const p=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=p}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(J(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{const n=this._encodePathSegment(t);return await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{const r=this._encodePathSegment(t);return await ee(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${r}`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(r){if(J(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{const n=this._encodePathSegment(t);
142return await ee(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(J(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{const n=this._encodePathSegment(t);return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients/${n}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await ee(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var i;return{data:{providers:(i=r==null?void 0:r.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(n){if(J(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{const n=this._encodePathSegment(t);return await ee(this.fetch,"GET",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{const r=this._encodePathSegment(t);return await ee(this.fetch,"PUT",`${this.url}/admin/custom-providers/${r}`,{body:n,headers:this.headers,xform:i=>({data:i,error:null})})}catch(r){if(J(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{const n=this._encodePathSegment(t);return await ee(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${n}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(J(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){bn(this.experimental),cr(t.userId);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(J(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){bn(this.experimental),cr(t.userId),cr(t.passkeyId);try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(J(n))return{data:null,error:n};throw n}}}function Ew(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Bn={debug:!!(globalThis&&ak()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class uk extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Cw extends uk{}async function DF(e,t,n){Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let i;t>0&&(i=setTimeout(()=>{r.abort(),Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){clearTimeout(i),Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Cw(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Bn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}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"),clearTimeout(i),await n()}})}catch(s){if(t>0&&clearTimeout(i),s!==null&&typeof s=="object"&&"name"in s&&s.name==="AbortError"&&t>0){if(r.signal.aborted)return Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@
142supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Bn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Cw(`Lock "${e}" was released because another request stole it`)}throw s}}function MF(){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 ck(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function $F(e){return parseInt(e,16)}function FF(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function zF(e){var t;const{chainId:n,domain:r,expirationTime:i,issuedAt:s=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,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(!d)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(`
143`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=ck(e.address),v=c?`${c}://${r}`:r,p=e.statement?`${e.statement}
144`:"",b=`${v} wants you to sign in with your Ethereum account:
145${h}
146
147${p}`;let m=`URI: ${d}
148Version: ${f}
149Chain ID: ${n}${o?`
150Nonce: ${o}`:""}
151Issued At: ${s.toISOString()}`;if(i&&(m+=`
152Expiration Time: ${i.toISOString()}`),a&&(m+=`
153Not Before: ${a.toISOString()}`),l&&(m+=`
154Request ID: ${l}`),u){let y=`
155Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);y+=`
156- ${w}`}m+=y}return`${b}
157${m}`}class et extends Error{constructor({message:t,code:n,cause:r,name:i}){var s;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(s=i??(r instanceof Error?r.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class mc extends et{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function UF({error:e,options:t}){var n,r,i;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new et({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=s.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new et({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=s.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new et({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=s.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new et({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 et({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new et({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return s.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new et({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new et({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(dk(o)){if(s.rp.id!==o)return new et({message:`The RP ID "${s.rp.id}
157" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new et({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new et({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 et({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 et({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function BF({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 et({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new et({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(dk(r)){if(n.rpId!==r)return new et({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new et({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new et({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 et({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class HF{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 ap=new HF;function Tw(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,i=id(e,["challenge","user","excludeCredentials"]),s=Js(t).buffer,o=Object.assign(Object.assign({},n),{id:Js(n.id).buffer}),a=Object.assign(Object.assign({},i),{challenge:s,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Js(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Rw(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=id(e,["challenge","allowCredentials"]),i=Js(t).buffer,s=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){s.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];s.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Js(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return s}function Pw(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:zi(new Uint8Array(e.response.attestationObject)),clientDataJSON:zi(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Aw(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:zi(new Uint8Array(i.authenticatorData)),clientDataJSON:zi(new Uint8Array(i.clientDataJSON)),signature:zi(new Uint8Array(i.signature)),userHandle:i.userHandle?zi(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function dk(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function gc(){var e,t;return!!(dt()&&"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 hk(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mc("Browser returned unexpected credential type",t)}:{data:null,error:new mc("Empty credential response",t)}}
157catch(t){return{data:null,error:UF({error:t,options:e})}}}async function fk(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mc("Browser returned unexpected credential type",t)}:{data:null,error:new mc("Empty credential response",t)}}catch(t){return{data:null,error:BF({error:t,options:e})}}}const VF={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},qF={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function yc(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of e)if(i)for(const s in i){const o=i[s];if(o!==void 0)if(Array.isArray(o))r[s]=o;else if(n(o))r[s]=o;else if(t(o)){const a=r[s];t(a)?r[s]=yc(a,o):r[s]=yc(o)}else r[s]=o}return r}function WF(e,t){return yc(VF,e,t||{})}function KF(e,t){return yc(qF,e,t||{})}class GF{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:i},s){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const u=i??ap.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=r;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,v=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${v}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=WF(a.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:d,error:f}=await hk({publicKey:c,signal:u});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=KF(a.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:d,error:f}=await fk(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return J(a)?{data:null,error:a}:{data:null,error:new Nn("Unexpected error in challenge",a)}}}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:i}={}},s){if(!n)return{data:null,error:new xo("rpId is required for WebAuthn authentication")};try{if(!gc())return{data:null,error:new Nn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:s});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return J(o)?{data:null,error:o}:{data:null,error:new Nn("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:i}={}},s){if(!n)return{data:null,error:new xo("rpId is required for WebAuthn registration")};try{if(!gc())return{data:null,error:new Nn("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(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:s});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return J(o)?{data:null,error:o}:{data:null,error:new Nn("Unexpected error in register",o)}}}}MF();const JF={url:X$,storageKey:eF,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:tF,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Nw(e,t,n){return await n()}const gs={};class Ya{get jwks(){var t,n;return(n=(t=gs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){gs[this.storageKey]=Object.assign(Object.assign({},gs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=gs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){gs[this.storageKey]=Object.assign(Object.assign({},gs[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,i,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 o=Object.assign(Object.assign({},JF),t);
157if(this.storageKey=o.storageKey,this.instanceID=(n=Ya.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ya.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&dt()){const a=`${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(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(r=o.experimental)!==null&&r!==void 0?r:{},this.admin=new LF({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=lk(o.fetch),this.lock=o.lock||Nw,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&dt()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=DF:this.lock=Nw,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 GF(this)},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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:ak()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ew(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Ew(this.memoryStorage)),dt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ik}) ${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(dt()&&(n=mF(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),dt()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),oF(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return{error:s}}const{session:o,redirectType:a}=i;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 J(n)?this._returnResult({error:n}):this._returnResult({error:new Nn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const s=await ee(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:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:tn}),{data:o,error:a}=s;
157if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signUp(t){var n,r,i;try{let s;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,v=null;this.flowType==="pkce"&&([h,v]=await ms(this.storage,this.storageKey)),s=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,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:h,code_challenge_method:v},xform:tn})}else if("phone"in t){const{phone:c,password:d,options:f}=t;s=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:tn})}else throw new Jl("You must provide either an email or phone number and a password");const{data:o,error:a}=s;
157if(a||!o)return await ct(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:o,options:a}=t;n=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Sw})}else if("phone"in t){const{phone:s,password:o,options:a}=t;n=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Sw})}else throw new Jl("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const s=new ps;return this._returnResult({data:{user:null,session:null},error:s})}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:i})}catch(n){if(J(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,i,s;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:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.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,i,s,o,a,l,u,c,d,f;let h,v;if("message"in t)h=t.message,v=t.signature;else{const{chain:p,wallet:b,statement:m,options:y}=t;let w;if(dt())if(typeof b=="object")w=b;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")w=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"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const S=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href),C=await w.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!C||C.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=ck(C[0]);let T=(r=y==null?void 0:y.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!T){const P=await w.request({method:"eth_chainId"});T=$F(P)}const R={domain:S.host,address:k,statement:m,uri:S.href,version:"1",chainId:T,nonce:(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=zF(R),v=await w.request({method:"personal_sign",params:[FF(h),k]})}try{const{data:p,error:b}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:v},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:tn});if(b)throw b;if(!p||!p.session||!p.user){const m=new ps;return this._returnResult({data:{user:null,session:null},error:m})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:b})}catch(p){if(J(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var n,r,i,s,o,a,l,u,c,d,f,h;let v,p;if("message"in t)v=t.message,p=t.signature;else{const{chain:b,wallet:m,statement:y,options:w}=t;let S;if(dt())if(typeof m=="object")S=m;
157else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.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 m!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=m}const C=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:C.host,uri:C.href}),y?{statement:y}:null));let T;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")T=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)T=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in T&&"signature"in T&&(typeof T.signedMessage=="string"||T.signedMessage instanceof Uint8Array)&&T.signature instanceof Uint8Array)v=typeof T.signedMessage=="string"?T.signedMessage:new TextDecoder().decode(T.signedMessage),p=T.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");v=[`${C.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${C.href}`,`Issued At: ${(i=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=w==null?void 0:w.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...w.signInWithSolana.resources.map(T=>`- ${T}`)]:[]].join(`
158`);const k=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=k}}try{const{data:b,error:m}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:zi(p)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:tn});if(m)throw m;if(!b||!b.session||!b.user){const y=new ps;return this._returnResult({data:{user:null,session:null},error:y})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:m})}catch(b){if(J(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await Ni(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new aF;const{data:s,error:o}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:tn});if(await ct(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!s||!s.session||!s.user){const a=new ps;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:o})}catch(s){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:s,nonce:o}=t,a=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:tn}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new ps;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(J(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,i,s,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await ms(this.storage,this.storageKey));const{error:d}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c})}throw new Jl("You must provide either an email or phone number.")}catch(a){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await ee(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:tn});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(J(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,r,i,s,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await ms(this.storage,this.storageKey));const u=await ee(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}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:OF});return!((s=u.data)===null||s===void 0)&&s.url&&dt()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(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 ot;const{error:i}=await ee(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(J(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:i,options:s}=t,{error:o}=await ee(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:o,error:a}=await ee(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new Jl("You must provide either an email or phone number and a type")}catch(n){if(J(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(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}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 i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.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 Ni(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 val
158id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<uh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Ni(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=dh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=RF(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{session:null},error:s}):this._returnResult({data:{session:i},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 ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Jr}):await this._useSession(async n=>{var r,i,s;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ot}:await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:Jr})})}catch(n){if(J(n))return Gl(n)&&(await this._removeSession(),await ct(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:i,error:s}=r;if(s)throw s;if(!i.session)throw new ot;const o=i.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ms(this.storage,this.storageKey));const{data:u,error:c}=await ee(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:l}),jwt:o.access_token,xform:Jr});if(c)throw c;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 ct(this.storage,`${this.storageKey}-code-verifier`),J(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 ot;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:o}=Yl(t.access_token);if(o.exp&&(r=o.exp,i=r<=n),i){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});s={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(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(n){if(J(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 ot;const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(J(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!dt())throw new Ql("No browser detected.");
158if(t.error||t.error_description||t.error_code)throw new Ql(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 gw("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ql("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 gw("No code detected.");const{data:w,error:S}=await this._exchangeCodeForSession(t.code);if(S)throw S;const C=new URL(window.location.href);return C.searchParams.delete("code"),window.history.replaceState(window.history.state,"",C.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:i,provider_refresh_token:s,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:c}=t;if(!o||!l||!a||!c)throw new Ql("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;u&&(h=parseInt(u));const v=h-d;v*1e3<=ks&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${f}s`);const p=h-f;d-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,h,d):d-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,h,d);const{data:b,error:m}=await this._getUser(o);if(m)throw m;const y={provider_token:i,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:c,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(i){if(J(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_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 Ni(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:i,error:s}=n;if(s&&!Gl(s))return this._returnResult({error:s});const o=(r=i.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(sF(a)&&(a.status===404||a.status===401||a.status===403)||Gl(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await ct(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=pF(),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,i;try{const{data:{session:s},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),Gl(s)?console.warn(s):console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await ms(this.storage,this.storageKey,!0));try{return await ee(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(s))return this._returnResult({data:null,error:s});throw s}}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(J(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:i}=await this._useSession(async s=>{var o,a,l,u,c;const{data:d,error:f}=s;if(f)throw f;const h=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:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await ee(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return dt()&&!(!((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(J(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:i,data:{session:s}}=n;
158if(i)throw i;const{options:o,provider:a,token:l,access_token:u,nonce:c}=t,d=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=s==null?void 0:s.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:tn}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new ps}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await ct(this.storage,`${this.storageKey}-code-verifier`),J(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)throw o;return await ee(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(J(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 vF(async i=>(i>0&&await yF(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await ee(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:tn})),(i,s)=>{const o=200*Math.pow(2,i);return s&&ch(s)&&Date.now()+o-r<ks})}catch(r){if(this._debug(n,"error",r),J(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),dt()&&!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 i=await Ni(this.storage,this.storageKey);if(i&&this.userStorage){let o=await Ni(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await Es(this.userStorage,this.storageKey+"-user",o)),i.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:dh()}else if(i&&!i.user&&!i.user){const o=await Ni(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await ct(this.storage,this.storageKey+"-user"),await Es(this.storage,this.storageKey,i)):i.user=dh()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const s=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<uh;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${uh}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),ch(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(i.access_token);!a&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):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",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new ot;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new sd;const{data:s,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!s.session)throw new ot;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const a={data:s.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(s){if(this._debug(i,"error",s),J(s)){const o={data:null,error:s};return ch(s)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(o),s.length>0){for(let a=0;a<s.length;a+=1)console.error(s[a]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await ct(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 Es(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const s=bw(i);await Es(this.storage,this.storageKey,s)}else{const i=bw(n);await Es(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ct(this.storage,this.storageKey),await ct(this.storage,this.storageKey+"-code-verifier"),await ct(this.storage,this.storageKey+"-user"),this.userStorage&&await ct(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&dt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
158catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),ks);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 i=Math.floor((r.expires_at*1e3-t)/ks);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ks}ms, refresh threshold is ${rp} ticks`),i<=rp&&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 instanceof uk)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!dt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},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 i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,o]=await ms(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(a.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?this._returnResult({data:null,error:s}):await ee(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(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:l,error:u}=await ee(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(J(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:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Pw(t.webauthn.credential_response):Aw(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await ee(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(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:l}))})}catch(n){if(J(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:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const o=await ee(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=i==null?void 0:i.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:Tw(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:Rw(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(J(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 i={all:[],phone:[],totp:[],webauthn:[]};for(const s of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])i.all.push(s),s.status==="verified"&&i[s.factor_type].push(s);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,i,s;if(t)try{const{payload:h}=Yl(t);let v=null;h.aal&&(v=h.aal);let p=v;const{data:{user:b},error:m}=await this.getUser(t);if(m)return this._returnResult({data:null,error:m});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(p="aal2");const w=h.amr||[];return{data:{currentLevel:v,nextLevel:p,currentAuthenticationMethods:w},error:null}}catch(h){if(J(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
158=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Yl(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((s=(i=o.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await ee(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ot})})}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ot});const o=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&dt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(J(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new ot});const o=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&dt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(J(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 ee(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ot})})}catch(t){if(J(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:i}=n;return i?this._returnResult({data:null,error:i}):r?(await ee(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 ot})})}catch(n){if(J(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 i=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+rF>i)return r;const{data:s,error:o}=await ee(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:h,error:v}
158=await this.getSession();if(v||!h.session)return this._returnResult({data:null,error:v});r=h.session.access_token}const{header:i,payload:s,signature:o,raw:{header:a,payload:l}}=Yl(r);n!=null&&n.allowExpired||EF(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:s,header:i,signature:o},error:null}}const c=CF(i.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,hF(`${a}.${l}`)))throw new op("Invalid JWT signature");return{data:{claims:s,header:i,signature:o},error:null}}catch(r){if(J(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,i;bn(this.experimental);try{if(!gc())return this._returnResult({data:null,error:new Nn("Browser does not support WebAuthn",null)});const{data:s,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!s)return this._returnResult({data:null,error:o});const a=Rw(s.options),l=(i=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&i!==void 0?i:ap.createNewAbortSignal(),{data:u,error:c}=await fk({publicKey:a,signal:l});if(c||!u)return this._returnResult({data:null,error:c??new Nn("WebAuthn ceremony failed",null)});const d=Aw(u);return this._verifyPasskeyAuthentication({challengeId:s.challenge_id,credential:d})}catch(s){if(J(s))return this._returnResult({data:null,error:s});throw s}}async registerPasskey(t){var n,r;bn(this.experimental);try{if(!gc())return this._returnResult({data:null,error:new Nn("Browser does not support WebAuthn",null)});const{data:i,error:s}=await this._startPasskeyRegistration();if(s||!i)return this._returnResult({data:null,error:s});const o=Tw(i.options),a=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:ap.createNewAbortSignal(),{data:l,error:u}=await hk({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new Nn("WebAuthn ceremony failed",null)});const c=Pw(l);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:c})}catch(i){if(J(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){bn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new ot});const{data:i,error:s}=await ee(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:i,error:null})})}catch(t){if(J(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){bn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new ot});const{data:s,error:o}=await ee(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;bn(this.experimental);try{const{data:r,error:i}=await ee(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})}catch(r){if(J(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){bn(this.experimental);try{const{data:n,error:r}=await ee(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:tn});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){bn(this.experimental);try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new ot});const{data:i,error:s}=await ee(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return s?this._returnResult({data:null,error:s}):this._returnResult({data:i,error:null})})}catch(t){if(J(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){bn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new ot});const{data:s,error:o}=await ee(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:s,error:null})})}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){bn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new ot});const{error:s}
158=await ee(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return s?this._returnResult({data:null,error:s}):this._returnResult({data:null,error:null})})}catch(n){if(J(n))return this._returnResult({data:null,error:n});throw n}}}Ya.nextInstanceID={};const QF=Ya,YF="2.106.2";let ea="";typeof Deno<"u"?ea="deno":typeof document<"u"?ea="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ea="react-native":ea="node";const ZF={"X-Client-Info":`supabase-js-${ea}/${YF}`},XF={headers:ZF},e4={schema:"public"},t4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},n4={},r4={enabled:!1,respectSamplingDecision:!0};function i4(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((r=r.apply(e,[])).next())})}let fh=null;const s4="@opentelemetry/api";function o4(){return fh===null&&(fh=import(s4).catch(()=>null)),fh}function a4(){return i4(this,void 0,void 0,function*(){try{const e=yield o4();if(!e||!e.propagation||!e.context)return null;const t={};e.propagation.inject(e.context.active(),t);const n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function l4(e){if(!e||typeof e!="string")return null;const t=e.split("-");if(t.length!==4)return null;const[n,r,i,s]=t;if(n.length!==2||r.length!==32||i.length!==16||s.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(s)||r==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:n,traceId:r,parentId:i,traceFlags:s,isSampled:(parseInt(s,16)&1)===1}}function u4(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(const r of t)try{if(typeof r=="string"){if(c4(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function c4(e,t){if(t===e)return!0;if(t.startsWith("*.")){const n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith("."+n)))return!0}return!1}function d4(e){const t=[];try{const n=new URL(e);t.push(n.hostname)}catch{}return t.push("*.supabase.co","*.supabase.in"),t.push("localhost","127.0.0.1","[::1]"),t}function Za(e){"@babel/helpers - typeof";return Za=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},Za(e)}function h4(e,t){if(Za(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Za(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f4(e){var t=h4(e,"string");return Za(t)=="symbol"?t:t+""}function p4(e,t,n){return(t=f4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ow(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(n),!0).forEach(function(r){p4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const m4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),g4=()=>Headers,y4=(e,t,n,r,i)=>{const s=m4(r),o=g4(),a=(i==null?void 0:i.enabled)===!0,l=(i==null?void 0:i.respectSamplingDecision)!==!1,u=a?d4(t):null;return async(c,d)=>{var f;const h=(f=await n())!==null&&f!==void 0?f:e;let v=new o(d==null?void 0:d.headers);if(v.has("apikey")||v.set("apikey",e),v.has("Authorization")||v.set("Authorization",`Bearer ${h}`),u){const p=await v4(c,u,l);p&&(p.traceparent&&!v.has("traceparent")&&v.set("traceparent",p.traceparent),p.tracestate&&!v.has("tracestate")&&v.set("tracestate",p.tracestate),p.baggage&&!v.has("baggage")&&v.set("baggage",p.baggage))}return s(c,Ge(Ge({},d),{},{headers:v}))}};async function v4(e,t,n){if(!u4(typeof e=="string"||e instanceof URL?e:e.url,t))return null;const r=await a4();if(!r||!r.traceparent)return null;if(n){const i=l4(r.traceparent);if(i&&!i.isSampled)return null}return r}function Iw(e){return typeof e=="boolean"?{enabled:e}:e}function w4(e){return e.endsWith("/")?e:e+"/"}function x4(e,t){var n,r,i,s,o,a;const{db:l,auth:u,realtime:c,global:d}=e,{db:f,auth:h,realtime:v,global:p}=t,b=Iw(e.tracePropagation),m=Iw(t.tracePropagation),y={db:Ge(Ge({},f),l),auth:Ge(Ge({},h),u),realtime:Ge(Ge({},v),c),storage:{},global:Ge(Ge(Ge({},p),d),{},{headers:Ge(Ge({},(n=p==null?void 0:p.headers)!==null&&n!==void 0?n:{}),(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(i=(s=b==null?void 0:b.enabled)!==null&&s!==void 0?s:m==null?void 0:m.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(o=(a=b==null?void 0:b.respectSamplingDecision)!==null&&a!==void 0?a:m==null?void 0:m.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return e.accessToken?y.accessToken=e.accessToken:delete y.accessToken,y}function b4(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
158if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(w4(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var _4=class extends QF{constructor(e){super(e)}},S4=class{constructor(e,t,n){var r,i;this.supabaseUrl=e,this.supabaseKey=t;const s=b4(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const o=`sb-${s.hostname.split(".")[0]}-auth-token`,a={db:e4,realtime:n4,auth:Ge(Ge({},t4),{},{storageKey:o}),global:XF,tracePropagation:r4},l=x4(n??{},a);if(this.settings=l,this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=y4(t,e,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(Ge({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new FM(new URL("rest/v1",s).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new Z$(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new PM(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)}channel(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:i,storageKey:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,lockAcquireTimeout:d,skipAutoInitialize:f},h,v){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _4({url:this.authUrl.href,headers:Ge(Ge({},p),h),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,fetch:v,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new b$(this.realtimeUrl.href,Ge(Ge({},e),{},{params:Ge(Ge({},{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 k4=(e,t,n)=>new S4(e,t,n);function E4(){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}E4()&&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 N
158ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function C4(){var b,m;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(y=>e===y||e.endsWith("."+y)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",i=n?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((m=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:m[1]):void 0,s=window.parent&&window.parent!==window;if(!i||!s)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(y,w,S)=>new Promise(C=>{const k=f();let T=!1,R;const P=A=>{T||(T=!0,clearTimeout(R),window.removeEventListener("message",O),C(A))},O=A=>{if(u.indexOf(A.origin)<0)return;const V=A.data;V&&V.type===c&&V.requestId===k&&P(V)};window.addEventListener("message",O);const L={type:y,requestId:k,projectId:i,key:w};S!==void 0&&(L.value=S);for(const A of u)window.parent.postMessage(L,A);R=setTimeout(()=>P(null),d)});let v=!0;const p=250;return{getItem:async y=>{let w=await h("lovable-preview-auth:get",y);return!w&&v&&(await new Promise(S=>setTimeout(S,p)),w=await h("lovable-preview-auth:get",y)),v=!1,w&&w.ok&&typeof w.value=="string"?w.value===""?(localStorage.removeItem(y),null):w.value:localStorage.getItem(y)},setItem:(y,w)=>(localStorage.setItem(y,w),h("lovable-preview-auth:set",y,w).then(()=>{})),removeItem:y=>(localStorage.removeItem(y),h("lovable-preview-auth:remove",y).then(()=>{}))}}const T4="https://hqgtzmzgpnkimcxzaxmn.supabase.co",R4="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImhxZ3R6bXpncG5raW1jeHpheG1uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY2NjU0OTQsImV4cCI6MjA4MjI0MTQ5NH0.kUhTwjwiA65T1L7xhh1QsQYgFxAOc0ndN8izqQ4rUmI",nt=k4(T4,R4,{auth:{storage:C4(),persistSession:!0,autoRefreshToken:!0}}),ph=({initialState:e="hero"})=>{const[t,n]=x.useState(e),[r,i]=x.useState(0),[s,o]=x.useState({}),[a,l]=x.useState(""),[u,c]=x.useState(""),[d,f]=x.useState(!1),[h,v]=x.useState(!1),{toast:p}=yb(),b=x.useMemo(()=>Li.filter(R=>R.id!=="brand_name"),[]),m=b[r];x.useEffect(()=>{n(e),i(0)},[e]);const y=()=>{n("gate")},w=({email:R,brandName:P})=>{l(R),o(O=>({...O,brand_name:P})),nt.functions.invoke("brevo-add-contact",{body:{email:R,listIds:[31]}}).then(({error:O})=>{O?console.error("Error adding contact to Brevo list 31:",O):console.log("Contact added to Brevo list 31")}),n("questionnaire")},S=x.useCallback(R=>{o(P=>({...P,[m.id]:R}))},[m==null?void 0:m.id]),C=()=>{const R=s[m.id];m.required&&!R||(r<b.length-1?i(P=>P+1):T())},k=()=>{r>0&&i(R=>R-1)},T=async()=>{f(!0),n("generating");try{const R=s.brand_name,P=s.raison_etre,O=s.selected_family,{data:L,error:A}=await nt.functions.invoke("generate-diagnostic",{body:{responses:s,selectedFamily:O,raisonEtre:P,brandName:R,email:a}});if(A)throw new Error(A.message||"Erreur lors de la génération du diagnostic");if(L!=null&&L.error)throw new Error(L.error);if(!(L!=null&&L.diagnostic))throw new Error("Aucun diagnostic généré");const V={1:"Créateurs du Geste",2:"Icônes Identitaires",3:"Signatures du Quotidien",4:"Singulières Culturelles",5:"Graals d'Exception"},M=F=>{const q=Li.find(Z=>Z.id===F),E=s[F];if(!q||E===void 0)return"";if(q.type==="select"&&q.options){const Z=q.options.find(ae=>ae.value===E);return Z?Z.label:String(E)}return String(E)},$=F=>{const q=F.map(E=>s[E]).filter(E=>typeof E=="number");return q.length===0?0:Math.round(q.reduce((E,Z)=>E+Z,0)/q.length*10)/10},U=new Date,Q=String(U.getDate()).padStart(2,"0"),N=String(U.getMonth()+1).padStart(2,"0"),j=U.getFullYear(),_={NOM_MARQUE:R,FAMILLE_JOAILLIERE:V[O]??"",DATE_DIAGNOSTIC:`${Q}/${N}/${j}`,CA_TRANCHE:M("revenue"),DISTRIBUTION:M("sales_distribution"),SCORE_IDENTITE:$(["comfort_raison_etre","comfort_values","comfort_differentiation","comfort_perception"]),SCORE_OFFRE:$(["comfort_prices","comfort_margin","comfort_design","comfort_balance"]),SCORE_IMAGE:$(["comfort_branding","comfort_packshots","comfort_still_life","comfort_worn_photos","comfort_videos"]),SCORE_SAVOIR_FAIRE:$(["comfort_creative_process","comfort_workshop","comfort_savoir_faire_perception"]),SCORE_EDITORIAL:$(["comfort_editorial","comfort_formats","comfort_frequency","comfort_performance"]),SCORE_ACTIVATION:$(["comfort_ads","comfort_measurement","comfort_site_efficiency","comfort_influence"]),SCORE_INCARNATION:$(["comfort_embody","comfort_alignment","comfort_signature_content"])};nt.functions.invoke("brevo-add-contact",{body:{email:a,listIds:[30],unlinkListIds:[31],attributes:_}}).then(({error:F})=>{F?console.error("Error syncing contact to Brevo list 30:",F):console.log("Contact synced to Brevo list 30 with attributes")}),nt.functions.invoke("send-diagnostic-email",{body:{email:a,brandName:R,selectedFamily:O,diagnostic:L.diagnostic}}).then(({error:F})=>{F?console.error("Error sending diagnostic email:",F):nt.functions.invoke("send-analysis-report",{body:{email:"[email protected]",leadEmail:a}}).then(({error:q})=>{q&&console.error("Error sending analysis report:",q)})}),c(L.diagnostic),n("result")}catch(R){console.error("Error generating diagnostic:",R),p({title:"Erreur",description:R instanceof Error?R.message:"Une erreur est survenue. Veuillez réessayer.",variant:"destructive"}),n("questionnaire")}finally{f(!1)}};return g.jsxs("main",{className:"min-h-screen bg-background",children:[t==="hero"&&g.jsx(ZO,{onStart:y,isRedirecting:h}),t==="gate"&&g.jsx(TI,{onSubmit:w,isLoading:d}),t==="questionnaire"&&m&&g.jsx(oS,{question:m,currentIndex:r,totalQuestions:b.length,value:s[m.id]||(m.type==="multi-select"?[]:""),onAnswer:S,onNext:C,onPrevious:k,canGoBack:r>0}),t==="generating"&&g.jsxs("div",{className:"min-h-screen flex flex-col justify-center items-center px-6 py-16 text-center",children:[g.jsx("div",{className:"w-12 h-12 border-2 border-gold/30 border-t-gold rounded-full animate-spin mb
158-6"}),g.jsx("h2",{className:"text-headline text-foreground mb-2",children:"Génération de votre diagnostic"}),g.jsx("p",{className:"text-muted-foreground font-sans text-sm",children:"Cela prend quelques instants…"})]}),t==="result"&&g.jsx(EM,{diagnostic:u,selectedFamily:s.selected_family,brandName:s.brand_name})]})};var P4="Label",pk=x.forwardRef((e,t)=>g.jsx(be.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));pk.displayName=P4;var mk=pk;const A4=mm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qs=x.forwardRef(({className:e,...t},n)=>g.jsx(mk,{ref:n,className:Re(A4(),e),...t}));Qs.displayName=mk.displayName;const Cn=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:Re("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Cn.displayName="Card";const N4=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:Re("flex flex-col space-y-1.5 p-6",e),...t}));N4.displayName="CardHeader";const O4=x.forwardRef(({className:e,...t},n)=>g.jsx("h3",{ref:n,className:Re("text-2xl font-semibold leading-none tracking-tight",e),...t}));O4.displayName="CardTitle";const I4=x.forwardRef(({className:e,...t},n)=>g.jsx("p",{ref:n,className:Re("text-sm text-muted-foreground",e),...t}));I4.displayName="CardDescription";const j4=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:Re("p-6 pt-0",e),...t}));j4.displayName="CardContent";const L4=x.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:Re("flex items-center p-6 pt-0",e),...t}));L4.displayName="CardFooter";var D4=x.createContext(void 0);function eg(e){const t=x.useContext(D4);return e||t||"ltr"}var mh="rovingFocusGroup.onEntryFocus",M4={bubbles:!1,cancelable:!0},ml="RovingFocusGroup",[lp,gk,$4]=cm(ml),[F4,yk]=ls(ml,[$4]),[z4,U4]=F4(ml),vk=x.forwardRef((e,t)=>g.jsx(lp.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(lp.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(B4,{...e,ref:t})})}));vk.displayName=ml;var B4=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=x.useRef(null),h=We(t,f),v=eg(s),[p,b]=Ma({prop:o,defaultProp:a??null,onChange:l,caller:ml}),[m,y]=x.useState(!1),w=dn(u),S=gk(n),C=x.useRef(!1),[k,T]=x.useState(0);return x.useEffect(()=>{const R=f.current;if(R)return R.addEventListener(mh,w),()=>R.removeEventListener(mh,w)},[w]),g.jsx(z4,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:p,onItemFocus:x.useCallback(R=>b(R),[b]),onItemShiftTab:x.useCallback(()=>y(!0),[]),onFocusableItemAdd:x.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:x.useCallback(()=>T(R=>R-1),[]),children:g.jsx(be.div,{tabIndex:m||k===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:oe(e.onMouseDown,()=>{C.current=!0}),onFocus:oe(e.onFocus,R=>{const P=!C.current;if(R.target===R.currentTarget&&P&&!m){const O=new CustomEvent(mh,M4);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const L=S().filter(U=>U.focusable),A=L.find(U=>U.active),V=L.find(U=>U.id===p),$=[A,V,...L].filter(Boolean).map(U=>U.ref.current);bk($,c)}}C.current=!1}),onBlur:oe(e.onBlur,()=>y(!1))})})}),wk="RovingFocusGroupItem",xk=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=e,l=al(),u=s||l,c=U4(wk,n),d=c.currentTabStopId===u,f=gk(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:p}=c;return x.useEffect(()=>{if(r)return h(),()=>v()}
vendor: 4,673 bytes, line 158
158,[r,h,v]),g.jsx(lp.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:g.jsx(be.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:oe(e.onMouseDown,b=>{r?c.onItemFocus(u):b.preventDefault()}),onFocus:oe(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){c.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const m=q4(b,c.orientation,c.dir);if(m!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(S=>S.focusable).map(S=>S.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const S=w.indexOf(b.currentTarget);w=c.loop?W4(w,S+1):w.slice(S+1)}setTimeout(()=>bk(w))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:p!=null}):o})})});xk.displayName=wk;var H4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function q4(e,t,n){const r=V4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return H4[r]}function bk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function W4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var K4=vk,G4=xk,od="Tabs",[J4,MU]=ls(od,[yk]),_k=yk(),[Q4,tg]=J4(od),Sk=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,c=eg(a),[d,f]=Ma({prop:r,onChange:i,defaultProp:s??"",caller:od});return g.jsx(Q4,{scope:n,baseId:al(),value:d,onValueChange:f,orientation:o,dir:c,activationMode:l,children:g.jsx(be.div,{dir:c,"data-orientation":o,...u,ref:t})})});Sk.displayName=od;var kk="TabsList",Ek=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=tg(kk,n),o=_k(n);return g.jsx(K4,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:g.jsx(be.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});Ek.displayName=kk;var Ck="TabsTrigger",Tk=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,o=tg(Ck,n),a=_k(n),l=Ak(o.baseId,r),u=Nk(o.baseId,r),c=r===o.value;return g.jsx(G4,{asChild:!0,...a,focusable:!i,active:c,children:g.jsx(be.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:t,onMouseDown:oe(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:oe(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:oe(e.onFocus,()=>{const d=o.activationMode!=="manual";!c&&!i&&d&&o.onValueChange(r)})})})});Tk.displayName=Ck;var Rk="TabsContent",Pk=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=e,a=tg(Rk,n),l=Ak(a.baseId,r),u=Nk(a.baseId,r),c=r===a.value,d=x.useRef(c);return x.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),g.jsx(Mc,{present:i||c,children:({present:f})=>g.jsx(be.div,{"data-state":c?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&s})})});Pk.displayName=Rk;function Ak(e,t){return`${e}-trigger-${t}`}function Nk(e,t){return`${e}-content-${t}`}var Y4=Sk,Ok=Ek,Ik=Tk,jk=Pk;const Z4=Y4,Lk=x.forwardRef(({className:e,...t},n)=>g.jsx(Ok,{ref:n,className:Re("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Lk.displayName=Ok.displayName;const up=x.forwardRef(({className:e,...t},n)=>g.jsx(Ik,{ref:n,className:Re("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));up.displayName=Ik.displayName;const X4=x.forwardRef(({className:e,...t},n)=>g.jsx(jk,{ref:n,className:Re("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));X4.displayName=jk.displayName;const Zl="[email protected]",jw={1:"Famille 1",2:"Famille 2",3:"Famille 3",4:"Famille 4",5:"Famille 5",6:"Famille 6"};
158function ez(){const[e,t]=x.useState(null),[n,r]=x.useState(!1),[i,s]=x.useState(!0),[o,a]=x.useState([]),[l,u]=x.useState(!1),[c,d]=x.useState(""),[f,h]=x.useState("all"),[v,p]=x.useState(null),[b,m]=x.useState([]),[y,w]=x.useState(null),[S,C]=x.useState("login"),[k,T]=x.useState(""),[R,P]=x.useState(""),[O,L]=x.useState(!1);x.useEffect(()=>{const{data:{subscription:_}}=nt.auth.onAuthStateChange((F,q)=>{t(q)});return nt.auth.getSession().then(({data:F})=>{t(F.session),s(!1)}),()=>_.unsubscribe()},[]),x.useEffect(()=>{if(!e){r(!1);return}(async()=>{const{data:_}=await nt.from("user_roles").select("role").eq("user_id",e.user.id).eq("role","admin").maybeSingle();r(!!_)})()},[e]),x.useEffect(()=>{n&&(M(),A())},[n]);const A=async()=>{const{data:_}=await nt.from("diagnostic_resend_log").select("*").order("created_at",{ascending:!1}).limit(100);_&&m(_)},V=async _=>{w(_.id);let F="sent",q=null;try{const{data:E,error:Z}=await nt.functions.invoke("send-diagnostic-email",{body:{leadId:_.id,toEmail:Zl}});if(Z)throw Z;if(E&&E.success===!1)throw new Error(E.error||"Échec de l'envoi");xs.success(`Diagnostic ${_.brand_name||_.email} renvoyé à ${Zl}`)}catch(E){F="error",q=(E==null?void 0:E.message)||"Erreur inconnue",xs.error(`Échec du renvoi : ${q}`)}await nt.from("diagnostic_resend_log").insert({lead_id:_.id,brand_name:_.brand_name,recipient_email:Zl,status:F,error_message:q,triggered_by:(e==null?void 0:e.user.id)??null}),await A(),w(null)},M=async()=>{u(!0);const{data:_,error:F}=await nt.from("diagnostic_leads").select("*").order("created_at",{ascending:!1});F?xs.error("Erreur de chargement"):a(_),u(!1)},$=async _=>{_.preventDefault(),L(!0);try{if(S==="signup"){const{error:F}=await nt.auth.signUp({email:k,password:R,options:{emailRedirectTo:`${window.location.origin}/admin`}});if(F)throw F;xs.success("Compte créé. Vérifiez vos emails si la confirmation est requise.")}else{const{error:F}=await nt.auth.signInWithPassword({email:k,password:R});if(F)throw F}}catch(F){xs.error(F.message||"Erreur d'authentification")}finally{L(!1)}},U=async()=>{await nt.auth.signOut(),p(null)},Q=()=>{const F=[["Date","Email","Marque","Raison d'être","Famille","Diagnostic"],...N.map(ae=>[new Date(ae.created_at).toLocaleString("fr-FR"),ae.email,ae.brand_name??"",(ae.raison_etre??"").replace(/\n/g," "),String(ae.selected_family),(ae.diagnostic_result??"").replace(/\n/g," ").slice(0,500)])].map(ae=>ae.map(he=>`"${String(he).replace(/"/g,'""')}"`).join(",")).join(`
159`),q=new Blob(["\uFEFF"+F],{type:"text/csv;charset=utf-8;"}),E=URL.createObjectURL(q),Z=document.createElement("a");Z.href=E,Z.download=`diagnostics_${new Date().toISOString().slice(0,10)}.csv`,Z.click(),URL.revokeObjectURL(E)},N=o.filter(_=>{if(f!=="all"&&_.selected_family!==f)return!1;if(!c)return!0;const F=c.toLowerCase();return _.email.toLowerCase().includes(F)||(_.brand_name??"").toLowerCase().includes(F)||(_.raison_etre??"").toLowerCase().includes(F)}),j={total:o.length,last7:o.filter(_=>Date.now()-new Date(_.created_at).getTime()<7*864e5).length,byFamily:o.reduce((_,F)=>(_[F.selected_family]=(_[F.selected_family]||0)+1,_),{})};return i?g.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Chargement…"}):e?n?g.jsx("div",{className:"min-h-screen bg-background p-4 md:p-8",children:g.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-serif",children:"Diagnostics reçus"}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Connecté en tant que ",e.user.email]})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(at,{variant:"outline",onClick:M,children:"Rafraîchir"}),g.jsx(at,{variant:"outline",onClick:Q,children:"Exporter CSV"}),g.jsx(at,{asChild:!0,variant:"outline",children:g.jsx(Yc,{to:"/admin/email-preview",children:"Aperçu email"})}),g.jsx(at,{variant:"ghost",onClick:U,children:"Déconnexion"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[g.jsxs(Cn,{className:"p-4",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:"Total"}),g.jsx("div",{className:"text-3xl font-serif",children:j.total})]}),g.jsxs(Cn,{className:"p-4",children:[g.jsx("div",{className:"text-sm text-muted-foreground",children:"7 derniers jours"}),g.jsx("div",{className:"text-3xl font-serif",children:j.last7})]}),g.jsxs(Cn,{className:"p-4",children:[g.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:"Par famille"}),g.jsx("div",{className:"flex flex-wrap gap-2 text-xs",children:Object.entries(j.byFamily).map(([_,F])=>g.jsxs("span",{className:"px-2 py-1 rounded bg-muted",children:["F",_,": ",F]},_))})]})]}),g.jsxs("div",{className:"flex gap-2 flex-wrap",children:[g.jsx(Ji,{placeholder:"Rechercher (email, marque…)",value:c,onChange:_=>d(_.target.value),className:"max-w-sm"}),g.jsx(Z4,{value:String(f),onValueChange:_=>h(_==="all"?"all":Number(_)),children:g.jsxs(Lk,{children:[g.jsx(up,{value:"all",children:"Toutes"}),[1,2,3,4,5,6].map(_=>g.jsxs(up,{value:String(_),children:["F",_]},_))]})})]}),g.jsx(Cn,{className:"overflow-hidden",children:l?g.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Chargement…"}):N.length===0?g.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Aucun diagnostic."}):g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-muted/50",children:g.jsxs("tr",{className:"text-left",children:[g.jsx("th",{className:"p-3",children:"Date"}),g.jsx("th",{className:"p-3",children:"Email"}),g.jsx("th",{className:"p-3",children:"Marque"}),g.jsx("th",{className:"p-3",children:"Famille"}),g.jsx("th",{className:"p-3"})]})}),g.jsx("tbody",{children:N.map(_=>g.jsxs("tr",{className:"border-t hover:bg-muted/30",children:[g.jsx("td",{className:"p-3 whitespace-nowrap",children:new Date(_.created_at).toLocaleStr
159ing("fr-FR")}),g.jsx("td",{className:"p-3",children:_.email}),g.jsx("td",{className:"p-3",children:_.brand_name??"—"}),g.jsx("td",{className:"p-3",children:jw[_.selected_family]??_.selected_family}),g.jsxs("td",{className:"p-3 text-right whitespace-nowrap space-x-2",children:[g.jsx(at,{size:"sm",variant:"secondary",disabled:y===_.id,onClick:()=>V(_),children:y===_.id?"Envoi…":"Renvoyer"}),g.jsx(at,{size:"sm",variant:"outline",onClick:()=>p(_),children:"Détails"})]})]},_.id))})]})})}),g.jsxs(Cn,{className:"overflow-hidden",children:[g.jsxs("div",{className:"p-4 border-b",children:[g.jsx("h2",{className:"font-serif text-xl",children:"Journal des renvois"}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Chaque tentative d'envoi vers ",Zl," (100 dernières)."]})]}),b.length===0?g.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Aucun renvoi pour le moment."}):g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-muted/50",children:g.jsxs("tr",{className:"text-left",children:[g.jsx("th",{className:"p-3",children:"Date"}),g.jsx("th",{className:"p-3",children:"Marque"}),g.jsx("th",{className:"p-3",children:"Destinataire"}),g.jsx("th",{className:"p-3",children:"Statut"}),g.jsx("th",{className:"p-3",children:"Erreur"})]})}),g.jsx("tbody",{children:b.map(_=>g.jsxs("tr",{className:"border-t",children:[g.jsx("td",{className:"p-3 whitespace-nowrap",children:new Date(_.created_at).toLocaleString("fr-FR")}),g.jsx("td",{className:"p-3",children:_.brand_name??"—"}),g.jsx("td",{className:"p-3",children:_.recipient_email}),g.jsx("td",{className:"p-3",children:g.jsx("span",{className:`px-2 py-1 rounded text-xs ${_.status==="sent"?"bg-primary/15 text-primary":"bg-destructive/15 text-destructive"}`,children:_.status==="sent"?"Envoyé":"Échec"})}),g.jsx("td",{className:"p-3 text-muted-foreground max-w-xs truncate",children:_.error_message??"—"})]},_.id))})]})})]}),v&&g.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:()=>p(null),children:g.jsxs(Cn,{className:"max-w-3xl w-full max-h-[85vh] overflow-y-auto p-6 space-y-4",onClick:_=>_.stopPropagation(),children:[g.jsxs("div",{className:"flex justify-between items-start",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-xl font-serif",children:v.brand_name||v.email}),g.jsx("p",{className:"text-sm text-muted-foreground",children:new Date(v.created_at).toLocaleString("fr-FR")})]}),g.jsx(at,{variant:"ghost",size:"sm",onClick:()=>p(null),children:"✕"})]}),g.jsxs("div",{className:"space-y-3 text-sm",children:[g.jsxs("div",{children:[g.jsx("strong",{children:"Email :"})," ",v.email]}),g.jsxs("div",{children:[g.jsx("strong",{children:"Famille choisie :"})," ",jw[v.selected_family]??v.selected_family]}),v.raison_etre&&g.jsxs("div",{children:[g.jsx("strong",{children:"Raison d'être :"}),g.jsx("p",{className:"mt-1 whitespace-pre-wrap",children:v.raison_etre})]}),g.jsxs("div",{children:[g.jsx("strong",{children:"Réponses au questionnaire :"}),g.jsx("pre",{className:"mt-1 p-3 bg-muted rounded text-xs overflow-x-auto",children:JSON.stringify(v.questionnaire_responses,null,2)})]}),v.diagnostic_result&&g.jsxs("div",{children:[g.jsx("strong",{children:"Diagnostic envoyé :"}),g.jsx("p",{className:"mt-1 whitespace-pre-wrap text-muted-foreground",children:v.diagnostic_result})]})]})]})})]})}):g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:g.jsxs(Cn,{className:"w-full max-w-md p-8 space-y-4 text-center",children:[g.jsx("h1",{className:"text-2xl font-serif",children:"Accès refusé"}),g.jsxs("p",{className:"text-muted-foreground",children:["Votre compte (",e.user.email,") n'a pas les droits administrateur."]}),g.jsx(at,{onClick:U,variant:"outline",children:"Se déconnecter"})]})}):g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:g.jsxs(Cn,{className:"w-full max-w-md p-8 space-y-6",children:[g.jsxs("div",{className:"space-y-2 text-center",children:[g.jsx("h1",{className:"text-2xl font-serif",children:"Espace administrateur"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:S==="login"?"Connectez-vous pour accéder aux diagnostics.":"Créez votre compte administrateur."})]}),g.jsxs("form",{onSubmit:$,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Qs,{htmlFor:"email",children:"Email"}),g.jsx(Ji,{id:"email",type:"email",value:k,onChange:_=>T(_.target.value),required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(Qs,{htmlFor:"password",children:"Mot de passe"}),g.jsx(Ji,{id:"password",type:"password",value:R,onChange:_=>P(_.target.value),required:!0,minLength:6})]}),g.jsx(at,{type:"submit",className:"w-full",disabled:O,children:O?"…":S==="login"?"Se 
159connecter":"Créer le compte"})]}),g.jsx("button",{onClick:()=>C(S==="login"?"signup":"login"),className:"w-full text-sm text-muted-foreground hover:text-foreground underline",children:S==="login"?"Pas de compte ? Créer un compte":"Déjà un compte ? Se connecter"})]})})}function Lw(e,[t,n]){return Math.min(n,Math.max(t,e))}var gh=0;function tz(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Dw()),document.body.insertAdjacentElement("beforeend",e[1]??Dw()),gh++,()=>{gh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),gh--}},[])}function Dw(){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 yh="focusScope.autoFocusOnMount",vh="focusScope.autoFocusOnUnmount",Mw={bubbles:!1,cancelable:!0},nz="FocusScope",Dk=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=x.useState(null),u=dn(i),c=dn(s),d=x.useRef(null),f=We(t,p=>l(p)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let p=function(w){if(h.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:Br(d.current,{select:!0})},b=function(w){if(h.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Br(d.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Br(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",b);const y=new MutationObserver(m);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,h.paused]),x.useEffect(()=>{if(a){Fw.add(h);const p=document.activeElement;if(!a.contains(p)){const m=new CustomEvent(yh,Mw);a.addEventListener(yh,u),a.dispatchEvent(m),m.defaultPrevented||(rz(lz(Mk(a)),{select:!0}),document.activeElement===p&&Br(a))}return()=>{a.removeEventListener(yh,u),setTimeout(()=>{const m=new CustomEvent(vh,Mw);a.addEventListener(vh,c),a.dispatchEvent(m),m.defaultPrevented||Br(p??document.body,{select:!0}),a.removeEventListener(vh,c),Fw.remove(h)},0)}}},[a,u,c,h]);const v=x.useCallback(p=>{if(!n&&!r||h.paused)return;const b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,m=document.activeElement;if(b&&m){const y=p.currentTarget,[w,S]=iz(y);w&&S?!p.shiftKey&&m===S?(p.preventDefault(),n&&Br(w,{select:!0})):p.shiftKey&&m===w&&(p.preventDefault(),n&&Br(S,{select:!0})):m===y&&p.preventDefault()}},[n,r,h.paused]);return g.jsx(be.div,{tabIndex:-1,...o,ref:f,onKeyDown:v})});Dk.displayName=nz;function rz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Br(r,{select:t}),document.activeElement!==n)return}function iz(e){const t=Mk(e),n=$w(t,e),r=$w(t.reverse(),e);return[n,r]}function Mk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $w(e,t){for(const n of e)if(!sz(n,{upTo:t}))return n}function sz(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 oz(e){return e instanceof HTMLInputElement&&"select"in e}function Br(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oz(e)&&t&&e.select()}}var Fw=az();function az(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=zw(e,t),e.unshift(t)},remove(t){var n;e=zw(e,t),(n=e[0])==null||n.resume()}}}function zw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lz(e){return e.filter(t=>t.tagName!=="A")}function uz(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 cz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ys=new WeakMap,Xl=new WeakMap,eu={},wh=0,$k=function(e){return e&&(e.host||$k(e.parentNode))},dz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$k(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})},hz=function(e,t,n,r){var i=dz(t,Array.isArray(e)?e:[e]);eu[n]||(eu[n]=new WeakMap);var s=eu[n],o=[],a=new Set,l=new Set(i),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};
vendor: 2,266 bytes, line 159
159i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(r),v=h!==null&&h!=="false",p=(ys.get(f)||0)+1,b=(s.get(f)||0)+1;ys.set(f,p),s.set(f,b),o.push(f),p===1&&v&&Xl.set(f,!0),b===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",f,m)}})};return c(t),a.clear(),wh++,function(){o.forEach(function(d){var f=ys.get(d)-1,h=s.get(d)-1;ys.set(d,f),s.set(d,h),f||(Xl.has(d)||d.removeAttribute(r),Xl.delete(d)),h||d.removeAttribute(n)}),wh--,wh||(ys=new WeakMap,ys=new WeakMap,Xl=new WeakMap,eu={})}},fz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=cz(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),hz(r,i,n,"aria-hidden")):function(){return null}},Zn=function(){return Zn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Zn.apply(this,arguments)};function Fk(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pz(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Su="right-scroll-bar-position",ku="width-before-scroll-bar",mz="with-scroll-bars-hidden",gz="--removed-body-scroll-bar-size";function xh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yz(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var vz=typeof window<"u"?x.useLayoutEffect:x.useEffect,Uw=new WeakMap;function wz(e,t){var n=yz(null,function(r){return e.forEach(function(i){return xh(i,r)})});return vz(function(){var r=Uw.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;
vendor: 1,418 bytes, line 159
159i.forEach(function(a){s.has(a)||xh(a,null)}),s.forEach(function(a){i.has(a)||xh(a,o)})}Uw.set(n,e)},[e]),n}function xz(e){return e}function bz(e,t){t===void 0&&(t=xz);var n=[],r=!1,i={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(s){var o=t(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var c=o;o=[],c.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){o.push(c),u()},filter:function(c){return o=o.filter(c),n}}}};return i}function _z(e){e===void 0&&(e={});var t=bz(null);return t.options=Zn({async:!0,ssr:!1},e),t}var zk=function(e){var t=e.sideCar,n=Fk(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,Zn({},n))};zk.isSideCarExport=!0;function Sz(e,t){return e.useMedium(t),zk}var Uk=_z(),bh=function(){},ad=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:bh,onWheelCapture:bh,onTouchMoveCapture:bh}
vendor: 5,799 bytes, lines 159-199
159),i=r[0],s=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,v=e.noIsolation,p=e.inert,b=e.allowPinchZoom,m=e.as,y=m===void 0?"div":m,w=e.gapMode,S=Fk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,k=wz([n,t]),T=Zn(Zn({},S),i);return x.createElement(x.Fragment,null,c&&x.createElement(C,{sideCar:Uk,removeScrollBar:u,shards:d,noRelative:h,noIsolation:v,inert:p,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),o?x.cloneElement(x.Children.only(a),Zn(Zn({},T),{ref:k})):x.createElement(y,Zn({},T,{className:l,ref:k}),a))});ad.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ad.classNames={fullWidth:ku,zeroRight:Su};var kz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ez(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kz();return t&&e.setAttribute("nonce",t),e}function Cz(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Tz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ez())&&(Cz(t,n),Tz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pz=function(){var e=Rz();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bk=function(){var e=Pz(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Az={left:0,top:0,right:0,gap:0},_h=function(e){return parseInt(e||"",10)||0},Nz=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_h(n),_h(r),_h(i)]},Oz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Az;var t=Nz(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])}},Iz=Bk(),Ys="data-scroll-locked",jz=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),`
160  .`.concat(mz,` {
161   overflow: hidden `).concat(r,`;
162   padding-right: `).concat(a,"px ").concat(r,`;
163  }
164  body[`).concat(Ys,`] {
165    overflow: hidden `).concat(r,`;
166    overscroll-behavior: contain;
167    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
168    padding-left: `.concat(i,`px;
169    padding-top: `).concat(s,`px;
170    padding-right: `).concat(o,`px;
171    margin-left:0;
172    margin-top:0;
173    margin-right: `).concat(a,"px ").concat(r,`;
174    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
175  }
176  
177  .`).concat(Su,` {
178    right: `).concat(a,"px ").concat(r,`;
179  }
180  
181  .`).concat(ku,` {
182    margin-right: `).concat(a,"px ").concat(r,`;
183  }
184  
185  .`).concat(Su," .").concat(Su,` {
186    right: 0 `).concat(r,`;
187  }
188  
189  .`).concat(ku," .").concat(ku,` {
190    margin-right: 0 `).concat(r,`;
191  }
192  
193  body[`).concat(Ys,`] {
194    `).concat(gz,": ").concat(a,`px;
195  }
196`)},Bw=function(){var e=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(e)?e:0},Lz=function(){x.useEffect(function(){return document.body.setAttribute(Ys,(Bw()+1).toString()),function(){var e=Bw()-1;e<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,e.toString())}},[])},Dz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Lz();var s=x.useMemo(function(){return Oz(i)},[i]);return x.createElement(Iz,{styles:jz(s,!t,i,n?"":"!important")})},cp=!1;if(typeof window<"u")try{var tu=Object.defineProperty({},"passive",{get:function(){return cp=!0,!0}});window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{cp=!1}var vs=cp?{passive:!1}:!1,Mz=function(e){return e.tagName==="TEXTAREA"},Hk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mz(e)&&n[t]==="visible")},$z=function(e){return Hk(e,"overflowY")},Fz=function(e){return Hk(e,"overflowX")},Hw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Vk(e,r);if(i){var s=qk(e,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Uz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vk=function(e,t){return e==="v"?$z(t):Fz(t)},qk=function(e,t){return e==="v"?zz(t):Uz(t)},Bz=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hz=function(e,t,n,r,i){var s=Bz(e,window.getComputedStyle(t).direction),o=s*r,a=n.target,l=t.contains(a),u=!1,c=o>0,d=0,f=0;do{if(!a)break;var h=qk(e,a),v=h[0],p=h[1],b=h[2],m=p-b-s*v;(v||m)&&Vk(e,a)&&(d+=m,f+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(u=!0),u},nu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vw=function(e){return[e.deltaX,e.deltaY]},qw=function(e){return e&&"current"in e?e.current:e},Vz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qz=function(e){return`
197  .block-interactivity-`.concat(e,` {pointer-events: none;}
198  .allow-interactivity-`).concat(e,` {pointer-events: all;}
199`)},Wz=0,ws=[];function Kz(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Wz++)[0],s=x.useState(Bk)[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(i));
vendor: 6,772 bytes, line 199
199var p=pz([e.lockRef.current],(e.shards||[]).map(qw),!0).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(p,b){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var m=nu(p),y=n.current,w="deltaX"in p?p.deltaX:y[0]-m[0],S="deltaY"in p?p.deltaY:y[1]-m[1],C,k=p.target,T=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in p&&T==="h"&&k.type==="range")return!1;var R=Hw(T,k);if(!R)return!0;if(R?C=T:(C=T==="v"?"h":"v",R=Hw(T,k)),!R)return!1;if(!r.current&&"changedTouches"in p&&(w||S)&&(r.current=C),!C)return!0;var P=r.current||C;return Hz(P,b,p,P==="h"?w:S,!0)},[]),l=x.useCallback(function(p){var b=p;if(!(!ws.length||ws[ws.length-1]!==s)){var m="deltaY"in b?Vw(b):nu(b),y=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Vz(C.delta,m)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(o.current.shards||[]).map(qw).filter(Boolean).filter(function(C){return C.contains(b.target)}),S=w.length>0?a(b,w[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=x.useCallback(function(p,b,m,y){var w={name:p,delta:b,target:m,should:y,shadowParent:Gz(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),c=x.useCallback(function(p){n.current=nu(p),r.current=void 0},[]),d=x.useCallback(function(p){u(p.type,Vw(p),p.target,a(p,e.lockRef.current))},[]),f=x.useCallback(function(p){u(p.type,nu(p),p.target,a(p,e.lockRef.current))},[]);x.useEffect(function(){return ws.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,vs),document.addEventListener("touchmove",l,vs),document.addEventListener("touchstart",c,vs),function(){ws=ws.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,vs),document.removeEventListener("touchmove",l,vs),document.removeEventListener("touchstart",c,vs)}},[]);var h=e.removeScrollBar,v=e.inert;return x.createElement(x.Fragment,null,v?x.createElement(s,{styles:qz(i)}):null,h?x.createElement(Dz,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jz=Sz(Uk,Kz);var Wk=x.forwardRef(function(e,t){return x.createElement(ad,Zn({},e,{ref:t,sideCar:Jz}))});Wk.classNames=ad.classNames;var Qz=[" ","Enter","ArrowUp","ArrowDown"],Yz=[" ","Enter"],rs="Select",[ld,ud,Zz]=cm(rs),[Oo,$U]=ls(rs,[Zz,Vc]),cd=Vc(),[Xz,Ei]=Oo(rs),[eU,tU]=Oo(rs),Kk=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:v}=e,p=cd(t),[b,m]=x.useState(null),[y,w]=x.useState(null),[S,C]=x.useState(!1),k=eg(u),[T,R]=Ma({prop:r,defaultProp:i??!1,onChange:s,caller:rs}),[P,O]=Ma({prop:o,defaultProp:a,onChange:l,caller:rs}),L=x.useRef(null),A=b?v||!!b.closest("form"):!0,[V,M]=x.useState(new Set),$=Array.from(V).map(U=>U.props.value).join(";");return g.jsx(TA,{...p,children:g.jsxs(Xz,{required:h,scope:t,trigger:b,onTriggerChange:m,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:al(),value:P,onValueChange:O,open:T,onOpenChange:R,dir:k,triggerPointerDownPosRef:L,disabled:f,children:[g.jsx(ld.Provider,{scope:t,children:g.jsx(eU,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(U=>{M(Q=>new Set(Q).add(U))},[]),onNativeOptionRemove:x.useCallback(U=>{M(Q=>{const N=new Set(Q);return N.delete(U),N})},[]),children:n})}),A?g.jsxs(y1,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:U=>O(U.target.value),disabled:f,form:v,children:[P===void 0?g.jsx("option",{value:""}):null,Array.from(V)]},$):null]})})};Kk.displayName=rs;var Gk="SelectTrigger",Jk=x.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=cd(n),o=Ei(Gk,n),a=o.disabled||r,l=We(t,o.onTriggerChange),u=ud(n),c=x.useRef("touch"),[d,f,h]=w1(p=>{const b=u().filter(w=>!w.disabled),m=b.find(w=>w.value===o.value),y=x1(b,p,m);y!==void 0&&o.onValueChange(y.value)}),v=p=>{a||(o.onOpenChange(!0),h()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return g.jsx(__,{asChild:!0,...s,children:g.jsx(be.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":v1(o.value)?"":void 0,...i,ref:l,onClick:oe(i.onClick,p=>{p.currentTarget.focus(),c.current!=="mouse"&&v(p)}),onPointerDown:oe(i.onPointerDown,p=>{c.current=p.pointerType;const b=p.target;b.hasPointerCapture(p.pointerId)&&b.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(v(p),p.preventDefault())}),onKeyDown:oe(i.onKeyDown,p=>{const b=d.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(b&&p.key===" ")&&Qz.includes(p.key)&&(v(),p.preventDefault())})})})});Jk.displayName=Gk;var Qk="SelectValue",Yk=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...a}=e,l=Ei(Qk,n),{onValueNodeHasChildrenChange:u}=l,c=s!==void 0,d=We(t,l.onValueNodeChange);return mt(()=>{u(c)},[u,c]),g.jsx(be.span,{...a,ref:d,style:{pointerEvents:"none"},children:v1(l.value)?g.jsx(g.Fragment,{children:o}):s})});Yk.displayName=Qk;var nU="SelectIcon",Zk=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return g.jsx(be.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Zk.displayName=nU;var rU="SelectPortal",Xk=e=>g.jsx(dm,{asChild:!0,...e});Xk.displayName=rU;var is="SelectContent",e1=x.forwardRef((e,t)=>{const n=Ei(is,e.__scopeSelect),[r,i]=x.useState();if(mt(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?as.createPortal(g.jsx(t1,{scope:e.__scopeSelect,children:g.jsx(ld.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(n1,{...e,ref:t})});e1.displayName=is;var _n=10,[t1,Ci]=Oo(is),iU="SelectContentImpl",sU=Da("SelectContent.RemoveScroll"),n1=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:p,avoidCollisions:b,...m}=e,y=Ei(is,n),[w,S]=x.useState(null),[C,k]=x.useState(null),T=We(t,G=>
vendor: 14,165 bytes, line 199
199S(G)),[R,P]=x.useState(null),[O,L]=x.useState(null),A=ud(n),[V,M]=x.useState(!1),$=x.useRef(!1);x.useEffect(()=>{if(w)return fz(w)},[w]),tz();const U=x.useCallback(G=>{const[ge,...Ae]=A().map(_e=>_e.ref.current),[ye]=Ae.slice(-1),me=document.activeElement;for(const _e of G)if(_e===me||(_e==null||_e.scrollIntoView({block:"nearest"}),_e===ge&&C&&(C.scrollTop=0),_e===ye&&C&&(C.scrollTop=C.scrollHeight),_e==null||_e.focus(),document.activeElement!==me))return},[A,C]),Q=x.useCallback(()=>U([R,w]),[U,R,w]);x.useEffect(()=>{V&&Q()},[V,Q]);const{onOpenChange:N,triggerPointerDownPosRef:j}=y;x.useEffect(()=>{if(w){let G={x:0,y:0};const ge=ye=>{var me,_e;G={x:Math.abs(Math.round(ye.pageX)-(((me=j.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((_e=j.current)==null?void 0:_e.y)??0))}},Ae=ye=>{G.x<=10&&G.y<=10?ye.preventDefault():w.contains(ye.target)||N(!1),document.removeEventListener("pointermove",ge),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[w,N,j]),x.useEffect(()=>{const G=()=>N(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[N]);const[_,F]=w1(G=>{const ge=A().filter(me=>!me.disabled),Ae=ge.find(me=>me.ref.current===document.activeElement),ye=x1(ge,G,Ae);ye&&setTimeout(()=>ye.ref.current.focus())}),q=x.useCallback((G,ge,Ae)=>{const ye=!$.current&&!Ae;(y.value!==void 0&&y.value===ge||ye)&&(P(G),ye&&($.current=!0))},[y.value]),E=x.useCallback(()=>w==null?void 0:w.focus(),[w]),Z=x.useCallback((G,ge,Ae)=>{const ye=!$.current&&!Ae;(y.value!==void 0&&y.value===ge||ye)&&L(G)},[y.value]),ae=r==="popper"?dp:r1,he=ae===dp?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:v,hideWhenDetached:p,avoidCollisions:b}:{};return g.jsx(t1,{scope:n,content:w,viewport:C,onViewportChange:k,itemRefCallback:q,selectedItem:R,onItemLeave:E,itemTextRefCallback:Z,focusSelectedItem:Q,selectedItemText:O,position:r,isPositioned:V,searchRef:_,children:g.jsx(Wk,{as:sU,allowPinchZoom:!0,children:g.jsx(Dk,{asChild:!0,trapped:y.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:oe(i,G=>{var ge;(ge=y.trigger)==null||ge.focus({preventScroll:!0}),G.preventDefault()}),children:g.jsx(Dc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:g.jsx(ae,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:G=>G.preventDefault(),...m,...he,onPlaced:()=>M(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:oe(m.onKeyDown,G=>{const ge=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!ge&&G.key.length===1&&F(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let ye=A().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(G.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const me=G.target,_e=ye.indexOf(me);ye=ye.slice(_e+1)}setTimeout(()=>U(ye)),G.preventDefault()}})})})})})})});n1.displayName=iU;var oU="SelectItemAlignedPosition",r1=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=Ei(is,n),o=Ci(is,n),[a,l]=x.useState(null),[u,c]=x.useState(null),d=We(t,T=>c(T)),f=ud(n),h=x.useRef(!1),v=x.useRef(!0),{viewport:p,selectedItem:b,selectedItemText:m,focusSelectedItem:y}=o,w=x.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&p&&b&&m){const T=s.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),O=m.getBoundingClientRect();if(s.dir!=="rtl"){const me=O.left-R.left,_e=P.left-me,st=T.left-_e,Pt=T.width+st,$n=Math.max(Pt,R.width),pn=window.innerWidth-_n,Fn=Lw(_e,[_n,Math.max(_n,pn-$n)]);a.style.minWidth=Pt+"px",a.style.left=Fn+"px"}else{const me=R.right-O.right,_e=window.innerWidth-P.right-me,st=window.innerWidth-T.right-_e,Pt=T.width+st,$n=Math.max(Pt,R.width),pn=window.innerWidth-_n,Fn=Lw(_e,[_n,Math.max(_n,pn-$n)]);a.style.minWidth=Pt+"px",a.style.right=Fn+"px"}const L=f(),A=window.innerHeight-_n*2,V=p.scrollHeight,M=window.getComputedStyle(u),$=parseInt(M.borderTopWidth,10),U=parseInt(M.paddingTop,10),Q=parseInt(M.borderBottomWidth,10),N=parseInt(M.paddingBottom,10),j=$+U+V+N+Q,_=Math.min(b.offsetHeight*5,j),F=window.getComputedStyle(p),q=parseInt(F.paddingTop,10),E=parseInt(F.paddingBottom,10),Z=T.top+T.height/2-_n,ae=A-Z,he=b.offsetHeight/2,G=b.offsetTop+he,ge=$+U+G,Ae=j-ge;if(ge<=Z){const me=L.length>0&&b===L[L.length-1].ref.current;a.style.bottom="0px";const _e=u.clientHeight-p.offsetTop-p.offsetHeight,st=Math.max(ae,he+(me?E:0)+_e+Q),Pt=ge+st;a.style.height=Pt+"px"}else{const me=L.length>0&&b===L[0].ref.current;a.style.top="0px";const st=Math.max(Z,$+p.offsetTop+(me?q:0)+he)+Ae;a.style.height=st+"px",p.scrollTop=ge-Z+p.offsetTop}a.style.margin=`${_n}px 0`,a.style.minHeight=_+"px",a.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,s.trigger,s.valueNode,a,u,p,b,m,s.dir,r]);mt(()=>w(),[w]);const[S,C]=x.useState();mt(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const k=x.useCallback(T=>{T&&v.current===!0&&(w(),y==null||y(),v.current=!1)},[w,y]);return g.jsx(lU,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:g.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(be.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});r1.displayName=oU;var aU="SelectPopperPosition",dp=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=_n,...s}=e,o=cd(n);return g.jsx(S_,{...o,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});dp.displayName=aU;var[lU,ng]=Oo(is,{}),hp="SelectViewport",i1=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Ci(hp,n),o=ng(hp,n),a=We(t,s.onViewportChange),l=x.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(ld.Slot,{scope:n,children:g.jsx(be.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:oe(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const h=Math.abs(l.current-c.scrollTop);if(h>0){const v=window.innerHeight-_n*2,p=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),m=Math.max(p,b);if(m<v){const y=m+h,w=Math.min(v,y),S=y-w;d.style.height=w+"px",d.style.bottom==="0px"&&(c.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});i1.displayName=hp;var s1="SelectGroup",[uU,cU]=Oo(s1),dU=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=al();return g.jsx(uU,{scope:n,id:i,children:g.jsx(be.div,{role:"group","aria-labelledby":i,...r,ref:t})})});dU.displayName=s1;var o1="SelectLabel",a1=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=cU(o1,n);return g.jsx(be.div,{id:i.id,...r,ref:t})});a1.displayName=o1;var vc="SelectItem",[hU,l1]=Oo(vc),u1=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=e,a=Ei(vc,n),l=Ci(vc,n),u=a.value===r,[c,d]=x.useState(s??""),[f,h]=x.useState(!1),v=We(t,y=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,y,r,i)}),p=al(),b=x.useRef("touch"),m=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(hU,{scope:n,value:r,disabled:i,textId:p,isSelected:u,onItemTextChange:x.useCallback(y=>{d(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:g.jsx(ld.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:g.jsx(be.div,{role:"option","aria-labelledby":p,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:v,onFocus:oe(o.onFocus,()=>h(!0)),onBlur:oe(o.onBlur,()=>h(!1)),onClick:oe(o.onClick,()=>{b.current!=="mouse"&&m()}),onPointerUp:oe(o.onPointerUp,()=>{b.current==="mouse"&&m()}),onPointerDown:oe(o.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:oe(o.onPointerMove,y=>{var w;b.current=y.pointerType,i?(w=l.onItemLeave)==null||w.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(o.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:oe(o.onKeyDown,y=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(Yz.includes(y.key)&&m(),y.key===" "&&y.preventDefault())})})})})});u1.displayName=vc;var ta="SelectItemText",c1=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,o=Ei(ta,n),a=Ci(ta,n),l=l1(ta,n),u=tU(ta,n),[c,d]=x.useState(null),f=We(t,m=>d(m),l.onItemTextChange,m=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,m,l.value,l.disabled)}),h=c==null?void 0:c.textContent,v=x.useMemo(()=>g.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:b}=u;return mt(()=>(p(v),()=>b(v)),[p,b,v]),g.jsxs(g.Fragment,{children:[g.jsx(be.span,{id:l.textId,...s,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?as.createPortal(s.children,o.valueNode):null]})});c1.displayName=ta;var d1="SelectItemIndicator",h1=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l1(d1,n).isSelected?g.jsx(be.span,{"aria-hidden":!0,...r,ref:t}):null});h1.displayName=d1;var fp="SelectScrollUpButton",f1=x.forwardRef((e,t)=>{const n=Ci(fp,e.__scopeSelect),r=ng(fp,e.__scopeSelect),[i,s]=x.useState(!1),o=We(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?g.jsx(m1,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});f1.displayName=fp;var pp="SelectScrollDownButton",p1=x.forwardRef((e,t)=>{const n=Ci(pp,e.__scopeSelect),r=ng(pp,e.__scopeSelect),[i,s]=x.useState(!1),o=We(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?g.jsx(m1,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});p1.displayName=pp;var m1=x.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Ci("SelectScrollButton",n),o=x.useRef(null),a=ud(n),l=x.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return x.useEffect(()=>()=>l(),[l]),mt(()=>{var c;const u=a().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),g.jsx(be.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:oe(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:oe(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:oe(i.onPointerLeave,()=>{l()})})}),fU="SelectSeparator",g1=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(be.div,{"aria-hidden":!0,...r,ref:t})});g1.displayName=fU;var mp="SelectArrow",pU=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=cd(n),s=Ei(mp,n),o=Ci(mp,n);return s.open&&o.position==="popper"?g.jsx(k_,{...i,...r,ref:t}):null});pU.displayName=mp;var mU="SelectBubbleInput",y1=x.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=x.useRef(null),s=We(r,i),o=uz(t);return x.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==t&&c){const d=new Event("change",{bubbles:!0});c.call(a,t),a.dispatchEvent(d)}},[o,t]),g.jsx(be.select,{...n,style:{...kb,...n.style},ref:s,defaultValue:t})});y1.displayName=mU;function v1(e){return e===""||e===void 0}function w1(e){const t=dn(e),n=x.useRef(""),r=x.useRef(0),i=x.useCallback(o=>{const a=n.current+o;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function x1(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let o=gU(e,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function gU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yU=Kk,b1=Jk,vU=Yk,wU=Zk,xU=Xk,_1=e1,bU=i1,S1=a1,k1=u1,_U=c1,SU=h1,E1=f1,C1=p1,T1=g1;const Sh=yU,kh=vU,Eu=x.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(b1,{ref:r,className:Re("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
199ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,g.jsx(wU,{asChild:!0,children:g.jsx(Kb,{className:"h-4 w-4 opacity-50"})})]}));Eu.displayName=b1.displayName;const R1=x.forwardRef(({className:e,...t},n)=>g.jsx(E1,{ref:n,className:Re("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(rR,{className:"h-4 w-4"})}));R1.displayName=E1.displayName;const P1=x.forwardRef(({className:e,...t},n)=>g.jsx(C1,{ref:n,className:Re("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(Kb,{className:"h-4 w-4"})}));P1.displayName=C1.displayName;const Cu=x.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>g.jsx(xU,{children:g.jsxs(_1,{ref:i,className:Re("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[g.jsx(R1,{}),g.jsx(bU,{className:Re("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),g.jsx(P1,{})]})}));Cu.displayName=_1.displayName;const kU=x.forwardRef(({className:e,...t},n)=>g.jsx(S1,{ref:n,className:Re("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));kU.displayName=S1.displayName;const na=x.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(k1,{ref:r,className:Re("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(SU,{children:g.jsx(nR,{className:"h-4 w-4"})})}),g.jsx(_U,{children:t})]}));na.displayName=k1.displayName;const EU=x.forwardRef(({className:e,...t},n)=>g.jsx(T1,{ref:n,className:Re("-mx-1 my-1 h-px bg-muted",e),...t}));EU.displayName=T1.displayName;const CU={1:"F1 — Les Créateurs du Geste",2:"F2 — Les Icônes Identitaires",3:"F3 — Les Signatures du Quotidien",4:"F4 — Les Singulières Culturelles",5:"F5 — Les Graals d'Exception"},TU="https://hqgtzmzgpnkimcxzaxmn.supabase.co",Ww="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImhxZ3R6bXpncG5raW1jeHpheG1uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjY2NjU0OTQsImV4cCI6MjA4MjI0MTQ5NH0.kUhTwjwiA65T1L7xhh1QsQYgFxAOc0ndN8izqQ4rUmI";function RU(){const[e,t]=x.useState(null),[n,r]=x.useState(!1),[i,s]=x.useState([]),[o,a]=x.useState("sample"),[l,u]=x.useState(3),[c,d]=x.useState(""),[f,h]=x.useState(""),[v,p]=x.useState(!1);x.useEffect(()=>{const{data:{subscription:m}}=nt.auth.onAuthStateChange((y,w)=>t(w));return nt.auth.getSession().then(({data:y})=>t(y.session)),()=>m.unsubscribe()},[]),x.useEffect(()=>{if(!e){r(!1);return}(async()=>{const{data:m}=await nt.from("user_roles").select("role").eq("user_id",e.user.id).eq("role","admin").maybeSingle();r(!!m)})()},[e]),x.useEffect(()=>{n&&(async()=>{const{data:m}=await nt.from("diagnostic_leads").select("id, email, brand_name, selected_family, created_at").order("created_at",{ascending:!1}).limit(100);s(m??[])})()},[n]);const b=async()=>{p(!0);try{const m=(e==null?void 0:e.access_token)??Ww,y=await fetch(`${TU}/functions/v1/preview-diagnostic-email`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`,apikey:Ww},body:JSON.stringify(o==="lead"&&c?{leadId:c}:{sampleFamily:l})});if(!y.ok)throw new Error(await y.text());h(await y.text())}catch(m){xs.error(m.message||"Erreur de prévisualisation")}finally{p(!1)}};return x.useEffect(()=>{b()},[o,l,c]),g.jsx("div",{className:"min-h-screen bg-background p-4 md:p-8",children:g.jsxs("div",{className:"max-w-6xl mx-auto 
199space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-serif",children:"Prévisualisation de l'email de restitution"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Rendu identique à l'email envoyé via Brevo."})]}),g.jsx(at,{asChild:!0,variant:"outline",children:g.jsx(Yc,{to:"/admin",children:"← Espace admin"})})]}),g.jsxs(Cn,{className:"p-4 grid grid-cols-1 md:grid-cols-3 gap-4 items-end",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(Qs,{children:"Source"}),g.jsxs(Sh,{value:o,onValueChange:m=>a(m),children:[g.jsx(Eu,{children:g.jsx(kh,{})}),g.jsxs(Cu,{children:[g.jsx(na,{value:"sample",children:"Exemple générique"}),g.jsx(na,{value:"lead",disabled:!n,children:"Diagnostic réel (admin)"})]})]})]}),o==="sample"?g.jsxs("div",{className:"space-y-2",children:[g.jsx(Qs,{children:"Famille d'exemple"}),g.jsxs(Sh,{value:String(l),onValueChange:m=>u(Number(m)),children:[g.jsx(Eu,{children:g.jsx(kh,{})}),g.jsx(Cu,{children:[1,2,3,4,5].map(m=>g.jsx(na,{value:String(m),children:CU[m]},m))})]})]}):g.jsxs("div",{className:"space-y-2 md:col-span-2",children:[g.jsx(Qs,{children:"Lead"}),g.jsxs(Sh,{value:c,onValueChange:d,children:[g.jsx(Eu,{children:g.jsx(kh,{placeholder:"Choisir un diagnostic…"})}),g.jsx(Cu,{children:i.map(m=>g.jsxs(na,{value:m.id,children:[new Date(m.created_at).toLocaleDateString("fr-FR")," — ",m.brand_name||m.email," (F",m.selected_family,")"]},m.id))})]})]}),g.jsx("div",{className:"flex gap-2",children:g.jsx(at,{onClick:b,disabled:v,className:"w-full",children:v?"Chargement…":"Rafraîchir l'aperçu"})})]}),g.jsx(Cn,{className:"overflow-hidden",children:f?g.jsx("iframe",{title:"Aperçu email",srcDoc:f,className:"w-full",style:{height:"80vh",border:"none",background:"#f5f5f5"}}):g.jsx("div",{className:"p-8 text-center text-muted-foreground",children:v?"Génération de l'aperçu…":"Aucun aperçu disponible."})})]})})}const Kw=()=>{const[e,t]=x.useState(0),[n,r]=x.useState({}),i=Li[e];return g.jsxs("main",{className:"min-h-screen bg-background",children:[g.jsxs("div",{className:"sticky top-0 z-50 bg-background/95 backdrop-blur border-b border-border px-4 py-3 flex flex-wrap items-center gap-3",children:[g.jsx("span",{className:"text-xs uppercase tracking-widest text-gold font-sans",children:"Aperçu questionnaire"}),g.jsx("select",{value:e,onChange:s=>t(Number(s.target.value)),className:"bg-card border border-border rounded-sm text-sm px-2 py-1 font-sans flex-1 min-w-[200px]",children:Li.map((s,o)=>g.jsxs("option",{value:o,children:[o+1,". ",s.question.slice(0,80)]},s.id))}),g.jsxs("span",{className:"text-xs text-muted-foreground font-sans",children:[e+1," / ",Li.length]})]}),g.jsx(oS,{question:i,currentIndex:e,totalQuestions:Li.length,value:n[i.id]??(i.type==="multi-select"?[]:""),onAnswer:s=>r(o=>({...o,[i.id]:s})),onNext:()=>t(s=>Math.min(s+1,Li.length-1)),onPrevious:()=>t(s=>Math.max(s-1,0)),canGoBack:e>0,bypassValidation:!0})]})},PU=()=>{const e=or();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:g.jsxs("div",{className:"text-center",children:[g.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),g.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),g.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},AU=new mN,NU=()=>g.jsx(yN,{client:AU,children:g.jsxs(qA,{children:[g.jsx(zR,{}),g.jsx(vP,{}),g.jsx(zO,{children:g.jsxs(gO,{children:[g.jsx(hr,{path:"/",element:g.jsx(ph,{})}),g.jsx(hr,{path:"/questionnaire",element:g.jsx(ph,{initialState:"gate"})}),g.jsx(hr,{path:"/diagnostic",element:g.jsx(ph,{initialState:"gate"})}),g.jsx(hr,{path:"/admin",element:g.jsx(ez,{})}),g.jsx(hr,{path:"/admin/email-preview",element:g.jsx(RU,{})}),g.jsx(hr,{path:"/admin/questionnaire-preview",element:g.jsx(Kw,{})}),g.jsx(hr,{path:"/questionnaire-preview",element:g.jsx(Kw,{})}),g.jsx(hr,{path:"*",element:g.jsx(PU,{})})]})})]})});gb(document.getElementById("root")).render(g.jsx(NU,{}));

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.