PageSourceSearch

https://healthserve.ae/assets/index-CzMEFmtw.js

js healthserve.ae collected 2026-10-04 02:39:15 UTC 1,208,447 bytes, 477 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DHALicensing-CaBOMkCB.js","assets/ServicePageTemplate-DpF8yMFv.js","assets/AdditionalLicensingServices-VYmgD2bv.js","assets/index-CYABEMSa.js","assets/circle-help-aQqez_dA.js","assets/trending-up-BfxTzfPQ.js","assets/plus-DZqQktxt.js","assets/serviceData-Bzv-OOOd.js","assets/MOHLicensing-DzVeWo-G.js","assets/DOHLicensing-Dc7qpUr6.js","assets/DataflowAssistance-_Kh1baK9.js","assets/PrometricAssistance-CNcejvsh.js","assets/FacilityLicensing-CDAp2zS8.js","assets/TrainingOverview-oxDyH3Vx.js","assets/courseData-42s9Mp91.js","assets/training-banner-1tKhMBg-.js","assets/BLSAha-xyAsCpnF.js","assets/CoursePageTemplate-Cltyjs1d.js","assets/BLSAshi-CQdaFCgx.js","assets/ACLS-BU5g9RIv.js","assets/PALS-BCGquWZR.js","assets/CNA-CAY1WR1s.js","assets/InfectionControl-BnTTR4Ax.js","assets/GermanNursing-TW8w4ng4.js","assets/About-Bux49dS_.js","assets/stethoscope-Blt77-jN.js","assets/FirstAid-CarNf2B1.js","assets/Blog-Cr1l_3kO.js","assets/GCCLicensing-CIzFiZsI.js","assets/Webinars-qESvNzsb.js","assets/AdminLayout-CabuPatR.js","assets/external-link-DRUqUc_B.js","assets/log-out-DqPt0kKm.js","assets/chart-column-CkOdDsNL.js","assets/image-DUijihr1.js","assets/video-CKMpWI1a.js","assets/inbox-DX1wze4V.js","assets/AdminDashboard-BJlSAiSd.js","assets/hero-video-3.mp4.asset-BmBy6Fx5.js","assets/loader-circle-B3V02kMX.js","assets/triangle-alert-BAXlYilG.js","assets/AdminAnalytics-B0o-a0LA.js","assets/ui-BklIU2Vp.js","assets/AdminUsers-DqxqiDuH.js","assets/AdminMedia-CaxhqkPF.js","assets/upload-C1EWCH4L.js","assets/file-video-DCRmgGhD.js","assets/copy-CpyZTpI_.js","assets/trash-2-gzkfqCHP.js","assets/AdminWebinars-Bs_vdYyb.js","assets/AdminWebinarEdit-DymvCFCu.js","assets/save-Bu384Y2v.js","assets/grip-vertical-BONnPuEz.js","assets/download-D1O7GOuA.js","assets/AdminContent-9uZpNh8j.js","assets/JsonEditor-BjmWdFkX.js","assets/MediaPicker-D2IJuFJa.js","assets/AdminSeo-CmDXE8Nw.js","assets/AdminForms-oRGc1CW3.js","assets/wrench-BM7oAc0k.js","assets/AdminSettings-Boge4IiO.js","assets/AdminSections-DAh6bIaD.js","assets/eye-off-B7JO2O_O.js","assets/AdminCareers-CqT2TiCy.js","assets/AdminApplications-gKO0UlYB.js","assets/AdminBlog-Dsp2YTZZ.js","assets/blog-DP5q8ac2.js","assets/AdminBlogEdit-7FZS4mxV.js","assets/AdminBlogAuthors-C3OwDQqS.js","assets/AdminBlogCategories-DHe-TixR.js","assets/Careers-Bn58S3yP.js","assets/CareerHubRoutes-eRJYupy8.js","assets/badges-DaqdU7p1.js","assets/AdminCareerHub-BXyWIaOp.js"])))=>i.map(i=>d[i]);
2var zI=Object.defineProperty;var Ww=e=>{throw TypeError(e)};var BI=(e,t,n)=>t in e?zI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Cs=(e,t,n)=>BI(e,typeof t!="symbol"?t+"":t,n),em=(e,t,n)=>t.has(e)||Ww("Cannot "+n);var H=(e,t,n)=>(em(e,t,"read from private field"),n?n.call(e):t.get(e)),Le=(e,t,n)=>t.has(e)?Ww("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Te=(e,t,n,r)=>(em(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Yt=(e,t,n)=>(em(e,t,"access private method"),n);var rd=(e,t,n,r)=>({set _(s){Te(e,t,s,n)},get _(){return H(e,t,r)}});function VI(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Ih=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};
vendor: 9,692 bytes, lines 2-26
2function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TC={exports:{}},Qf={},AC={exports:{}},Oe={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var Du=Symbol.for("react.element"),UI=Symbol.for("react.portal"),HI=Symbol.for("react.fragment"),WI=Symbol.for("react.strict_mode"),qI=Symbol.for("react.profiler"),ZI=Symbol.for("react.provider"),GI=Symbol.for("react.context"),KI=Symbol.for("react.forward_ref"),YI=Symbol.for("react.suspense"),JI=Symbol.for("react.memo"),QI=Symbol.for("react.lazy"),qw=Symbol.iterator;function XI(e){return e===null||typeof e!="object"?null:(e=qw&&e[qw]||e["@@iterator"],typeof e=="function"?e:null)}var PC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jC=Object.assign,NC={};function El(e,t,n){this.props=e,this.context=t,this.refs=NC,this.updater=n||PC}El.prototype.isReactComponent={};El.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")};El.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RC(){}RC.prototype=El.prototype;function g0(e,t,n){this.props=e,this.context=t,this.refs=NC,this.updater=n||PC}var y0=g0.prototype=new RC;y0.constructor=g0;jC(y0,El.prototype);y0.isPureReactComponent=!0;var Zw=Array.isArray,OC=Object.prototype.hasOwnProperty,v0={current:null},IC={key:!0,ref:!0,__self:!0,__source:!0};function DC(e,t,n){var r,s={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)OC.call(t,r)&&!IC.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:Du,type:e,key:i,ref:a,props:s,_owner:v0.current}}function eD(e,t){return{$$typeof:Du,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function x0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Du}function tD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Gw=/\/+/g;function tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tD(""+e.key):t.toString(36)}function Xd(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Du:case UI:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+tm(a,0):r,Zw(s)?(n="",e!=null&&(n=e.replace(Gw,"$&/")+"/"),Xd(s,t,n,"",function(c){return c})):s!=null&&(x0(s)&&(s=eD(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Gw,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Zw(e))for(var o=0;o<e.length;o++){i=e[o];var l=r+tm(i,o);a+=Xd(i,t,n,l,s)}else if(l=XI(e),typeof l=="function")for(e=l.call(e),o=0;!(i=e.next()).done;)i=i.value,l=r+tm(i,o++),a+=Xd(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function sd(e,t,n){if(e==null)return e;var r=[],s=0;return Xd(e,r,"","",function(i){return t.call(n,i,s++)}),r}function nD(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 gn={current:null},eh={transition:null},rD={ReactCurrentDispatcher:gn,ReactCurrentBatchConfig:eh,ReactCurrentOwner:v0};function LC(){throw Error("act(...) is not supported in production builds of React.")}Oe.Children={map:sd,forEach:function(e,t,n){sd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return sd(e,function(){t++}),t},toArray:function(e){return sd(e,function(t){return t})||[]},only:function(e){if(!x0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Oe.Component=El;Oe.Fragment=HI;Oe.Profiler=qI;Oe.PureComponent=g0;Oe.StrictMode=WI;Oe.Suspense=YI;Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rD;Oe.act=LC;Oe.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=jC({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=v0.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)OC.call(t,l)&&!IC.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:Du,type:e.type,key:s,ref:i,props:r,_owner:a}};Oe.createContext=function(e){return e={$$typeof:GI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ZI,_context:e},e.Consumer=e};Oe.createElement=DC;Oe.createFactory=function(e){var t=DC.bind(null,e);return t.type=e,t};Oe.createRef=function(){return{current:null}};Oe.forwardRef=function(e){return{$$typeof:KI,render:e}};Oe.isValidElement=x0;Oe.lazy=function(e){return{$$typeof:QI,_payload:{_status:-1,_result:e},_init:nD}};Oe.memo=function(e,t){return{$$typeof:JI,type:e,compare:t===void 0?null:t}};Oe.startTransition=function(e){var t=eh.transition;eh.transition={};try{e()}finally{eh.transition=t}};Oe.unstable_act=LC;Oe.useCallback=function(e,t){return gn.current.useCallback(e,t)};Oe.useContext=function(e){return gn.current.useContext(e)};Oe.useDebugValue=function(){};Oe.useDeferredValue=function(e){return gn.current.useDeferredValue(e)};Oe.useEffect=function(e,t){return gn.current.useEffect(e,t)};Oe.useId=function(){return gn.current.useId()};Oe.useImperativeHandle=function(e,t,n){return gn.current.useImperativeHandle(e,t,n)};Oe.useInsertionEffect=function(e,t){return gn.current.useInsertionEffect(e,t)};Oe.useLayoutEffect=function(e,t){return gn.current.useLayoutEffect(e,t)};Oe.useMemo=function(e,t){return gn.current.useMemo(e,t)};Oe.useReducer=function(e,t,n){return gn.current.useReducer(e,t,n)};Oe.useRef=function(e){return gn.current.useRef(e)};Oe.useState=function(e){return gn.current.useState(e)};Oe.useSyncExternalStore=function(e,t,n){return gn.current.useSyncExternalStore(e,t,n)};Oe.useTransition=function(){return gn.current.useTransition()};Oe.version="18.3.1";AC.exports=Oe;var b=AC.exports;const z=Qi(b),w0=VI({__proto__:null,default:z},[b]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var sD=b,iD=Symbol.for("react.element"),aD=Symbol.for("react.fragment"),oD=Object.prototype.hasOwnProperty,lD=sD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cD={key:!0,ref:!0,__self:!0,__source:!0};function MC(e,t,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)oD.call(t,r)&&!cD.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:iD,type:e,key:i,ref:a,props:s,_owner:lD.current}}Qf.Fragment=aD;Qf.jsx=MC;Qf.jsxs=MC;TC.exports=Qf;var h=TC.exports,$C={exports:{}},qn={},FC={exports:{}},zC={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(e){function t(D,$){var C=D.length;D.push($);e:for(;0<C;){var le=C-1>>>1,oe=D[le];if(0<s(oe,$))D[le]=$,D[C]=oe,C=le;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var $=D[0],C=D.pop();if(C!==$){D[0]=C;e:for(var le=0,oe=D.length,T=oe>>>1;le<T;){var L=2*(le+1)-1,_e=D[L],ie=L+1,ye=D[ie];if(0>s(_e,C))ie<oe&&0>s(ye,_e)?(D[le]=ye,D[ie]=C,le=ie):(D[le]=_e,D[L]=C,le=L);else if(ie<oe&&0>s(ye,C))D[le]=ye,D[ie]=C,le=ie;else break e}}return $}function s(D,$){var C=D.sortIndex-$.sortIndex;return C!==0?C:D.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],u=1,d=null,p=3,f=!1,v=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=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 m(D){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=D)r(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function _(D){if(x=!1,m(D),!v)if(n(l)!==null)v=!0,K(k);else{var $=n(c);$!==null&&re(_,$.startTime-D)}}function k(D,$){v=!1,x&&(x=!1,g(P),P=-1),f=!0;var C=p;try{for(m($),d=n(l);d!==null&&(!(d.expirationTime>$)||D&&!M());){var le=d.callback;
vendor: 9,175 bytes, lines 26-35
26if(typeof le=="function"){d.callback=null,p=d.priorityLevel;var oe=le(d.expirationTime<=$);$=e.unstable_now(),typeof oe=="function"?d.callback=oe:d===n(l)&&r(l),m($)}else r(l);d=n(l)}if(d!==null)var T=!0;else{var L=n(c);L!==null&&re(_,L.startTime-$),T=!1}return T}finally{d=null,p=C,f=!1}}var S=!1,E=null,P=-1,j=5,R=-1;function M(){return!(e.unstable_now()-R<j)}function O(){if(E!==null){var D=e.unstable_now();R=D;var $=!0;try{$=E(!0,D)}finally{$?W():(S=!1,E=null)}}else S=!1}var W;if(typeof y=="function")W=function(){y(O)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,q=F.port2;F.port1.onmessage=O,W=function(){q.postMessage(null)}}else W=function(){w(O,0)};function K(D){E=D,S||(S=!0,W())}function re(D,$){P=w(function(){D(e.unstable_now())},$)}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(D){D.callback=null},e.unstable_continueExecution=function(){v||f||(v=!0,K(k))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(D){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var C=p;p=$;try{return D()}finally{p=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,$){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var C=p;p=D;try{return $()}finally{p=C}},e.unstable_scheduleCallback=function(D,$,C){var le=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?le+C:le):C=le,D){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=C+oe,D={id:u++,callback:$,priorityLevel:D,startTime:C,expirationTime:oe,sortIndex:-1},C>le?(D.sortIndex=C,t(c,D),n(l)===null&&D===n(c)&&(x?(g(P),P=-1):x=!0,re(_,C-le))):(D.sortIndex=oe,t(l,D),v||f||(v=!0,K(k))),D},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(D){var $=p;return function(){var C=p;p=$;try{return D.apply(this,arguments)}finally{p=C}}}})(zC);FC.exports=zC;var uD=FC.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var dD=b,Vn=uD;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 BC=new Set,qc={};function Ka(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(qc[e]=t,e=0;e<t.length;e++)BC.add(t[e])}var zs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zg=Object.prototype.hasOwnProperty,hD=/^[: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]*$/,Kw={},Yw={};function fD(e){return zg.call(Yw,e)?!0:zg.call(Kw,e)?!1:hD.test(e)?Yw[e]=!0:(Kw[e]=!0,!1)}function pD(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 mD(e,t,n,r){if(t===null||typeof t>"u"||pD(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 yn(e,t,n,r,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gt[e]=new yn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gt[t]=new yn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gt[e]=new yn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gt[e]=new yn(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){Gt[e]=new yn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gt[e]=new yn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gt[e]=new yn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gt[e]=new yn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gt[e]=new yn(e,5,!1,e.toLowerCase(),null,!1,!1)});var b0=/[\-:]([a-z])/g;function _0(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(b0,_0);Gt[t]=new yn(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(b0,_0);Gt[t]=new yn(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(b0,_0);Gt[t]=new yn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gt[e]=new yn(e,1,!1,e.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new yn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gt[e]=new yn(e,1,!1,e.toLowerCase(),null,!0,!0)});function k0(e,t,n,r){var s=Gt.hasOwnProperty(t)?Gt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mD(t,n,s,r)&&(n=null),r||s===null?fD(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gs=dD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,id=Symbol.for("react.element"),_o=Symbol.for("react.portal"),ko=Symbol.for("react.fragment"),S0=Symbol.for("react.strict_mode"),Bg=Symbol.for("react.profiler"),VC=Symbol.for("react.provider"),UC=Symbol.for("react.context"),E0=Symbol.for("react.forward_ref"),Vg=Symbol.for("react.suspense"),Ug=Symbol.for("react.suspense_list"),C0=Symbol.for("react.memo"),di=Symbol.for("react.lazy"),HC=Symbol.for("react.offscreen"),Jw=Symbol.iterator;function Bl(e){return e===null||typeof e!="object"?null:(e=Jw&&e[Jw]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,nm;function oc(e){if(nm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nm=t&&t[1]||""}return`
35`+nm+e}var rm=!1;function sm(e,t){if(!e||rm)return"";rm=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}
vendor: 15,597 bytes, lines 35-38
35catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
36`),i=r.stack.split(`
37`),a=s.length-1,o=i.length-1;1<=a&&0<=o&&s[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==i[o]){var l=`
38`+s[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{rm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?oc(e):""}function gD(e){switch(e.tag){case 5:return oc(e.type);case 16:return oc("Lazy");case 13:return oc("Suspense");case 19:return oc("SuspenseList");case 0:case 2:case 15:return e=sm(e.type,!1),e;case 11:return e=sm(e.type.render,!1),e;case 1:return e=sm(e.type,!0),e;default:return""}}function Hg(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 ko:return"Fragment";case _o:return"Portal";case Bg:return"Profiler";case S0:return"StrictMode";case Vg:return"Suspense";case Ug:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UC:return(e.displayName||"Context")+".Consumer";case VC:return(e._context.displayName||"Context")+".Provider";case E0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C0:return t=e.displayName||null,t!==null?t:Hg(e.type)||"Memo";case di:t=e._payload,e=e._init;try{return Hg(e(t))}catch{}}return null}function yD(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 Hg(t);case 8:return t===S0?"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 zi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vD(e){var t=WC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ad(e){e._valueTracker||(e._valueTracker=vD(e))}function qC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=WC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dh(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 Wg(e,t){var n=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Qw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zi(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 ZC(e,t){t=t.checked,t!=null&&k0(e,"checked",t,!1)}function qg(e,t){ZC(e,t);var n=zi(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")?Zg(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zg(e,t.type,zi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xw(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 Zg(e,t,n){(t!=="number"||Dh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var lc=Array.isArray;function Fo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zi(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Gg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Z(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eb(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(lc(n)){if(1<n.length)throw Error(Z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zi(n)}}function GC(e,t){var n=zi(t.value),r=zi(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 tb(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function KC(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 Kg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?KC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var od,YC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(od=od||document.createElement("div"),od.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=od.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bc={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},xD=["Webkit","ms","Moz","O"];Object.keys(bc).forEach(function(e){xD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bc[t]=bc[e]})});function JC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bc.hasOwnProperty(e)&&bc[e]?(""+t).trim():t+"px"}function QC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=JC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var wD=pt({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 Yg(e,t){if(t){if(wD[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 Jg(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 Qg=null;function T0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xg=null,zo=null,Bo=null;function nb(e){if(e=$u(e)){if(typeof Xg!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=rp(t),Xg(e.stateNode,e.type,t))}}function XC(e){zo?Bo?Bo.push(e):Bo=[e]:zo=e}function eT(){if(zo){var e=zo,t=Bo;if(Bo=zo=null,nb(e),t)for(e=0;e<t.length;e++)nb(t[e])}}function tT(e,t){return e(t)}function nT(){}var im=!1;function rT(e,t,n){if(im)return e(t,n);im=!0;try{return tT(e,t,n)}finally{im=!1,(zo!==null||Bo!==null)&&(nT(),eT())}}function Gc(e,t){var n=e.stateNode;if(n===null)return null;var r=rp(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 ey=!1;if(zs)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){ey=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{ey=!1}function bD(e,t,n,r,s,i,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var _c=!1,Lh=null,Mh=!1,ty=null,_D={onError:function(e){_c=!0,Lh=e}};function kD(e,t,n,r,s,i,a,o,l){_c=!1,Lh=null,bD.apply(_D,arguments)}function SD(e,t,n,r,s,i,a,o,l){if(kD.apply(this,arguments),_c){if(_c){var c=Lh;_c=!1,Lh=null}else throw Error(Z(198));Mh||(Mh=!0,ty=c)}}function Ya(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 sT(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 rb(e){if(Ya(e)!==e)throw Error(Z(188))}function ED(e){var t=e.alternate;if(!t){if(t=Ya(e),t===null)throw Error(Z(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return rb(s),e;if(i===r)return rb(s),t;i=i.sibling}throw Error(Z(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a)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 iT(e){return e=ED(e),e!==null?aT(e):null}function aT(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=aT(e);if(t!==null)return t;e=e.sibling}return null}var oT=Vn.unstable_scheduleCallback,sb=Vn.unstable_cancelCallback,CD=Vn.unstable_shouldYield,TD=Vn.unstable_requestPaint,_t=Vn.unstable_now,AD=Vn.unstable_getCurrentPriorityLevel,A0=Vn.unstable_ImmediatePriority,lT=Vn.unstable_UserBlockingPriority,$h=Vn.unstable_NormalPriority,PD=Vn.unstable_LowPriority,cT=Vn.unstable_IdlePriority,Xf=null,fs=null;function jD(e){if(fs&&typeof fs.onCommitFiberRoot=="function")try{fs.onCommitFiberRoot(Xf,e,void 0,(e.current.flags&128)===128)}catch{}}var Mr=Math.clz32?Math.clz32:OD,ND=Math.log,RD=Math.LN2;function OD(e){return e>>>=0,e===0?32:31-(ND(e)/RD|0)|0}var ld=64,cd=4194304;function cc(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 Fh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=cc(o):(i&=a,i!==0&&(r=cc(i)))}else a=n&~s,a!==0?r=cc(a):i!==0&&(r=cc(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mr(t),s=1<<n,r|=e[n],t&=~s;return r}function ID(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 DD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Mr(i),o=1<<a,l=s[a];l===-1?(!(o&n)||o&r)&&(s[a]=ID(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}}function ny(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uT(){var e=ld;return ld<<=1,!(ld&4194240)&&(ld=64),e}function am(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mr(t),e[t]=n}function LD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Mr(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function P0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ve=0;function dT(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hT,j0,fT,pT,mT,ry=!1,ud=[],Pi=null,ji=null,Ni=null,Kc=new Map,Yc=new Map,mi=[],MD="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 ib(e,t){switch(e){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":Kc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yc.delete(t.pointerId)}}function Ul(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=$u(t),t!==null&&j0(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,981 bytes, line 38
38function $D(e,t,n,r,s){switch(t){case"focusin":return Pi=Ul(Pi,e,t,n,r,s),!0;case"dragenter":return ji=Ul(ji,e,t,n,r,s),!0;case"mouseover":return Ni=Ul(Ni,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Kc.set(i,Ul(Kc.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Yc.set(i,Ul(Yc.get(i)||null,e,t,n,r,s)),!0}return!1}function gT(e){var t=va(e.target);if(t!==null){var n=Ya(t);if(n!==null){if(t=n.tag,t===13){if(t=sT(n),t!==null){e.blockedOn=t,mT(e.priority,function(){fT(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 th(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=sy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qg=r,n.target.dispatchEvent(r),Qg=null}else return t=$u(n),t!==null&&j0(t),e.blockedOn=n,!1;t.shift()}return!0}function ab(e,t,n){th(e)&&n.delete(t)}function FD(){ry=!1,Pi!==null&&th(Pi)&&(Pi=null),ji!==null&&th(ji)&&(ji=null),Ni!==null&&th(Ni)&&(Ni=null),Kc.forEach(ab),Yc.forEach(ab)}function Hl(e,t){e.blockedOn===t&&(e.blockedOn=null,ry||(ry=!0,Vn.unstable_scheduleCallback(Vn.unstable_NormalPriority,FD)))}function Jc(e){function t(s){return Hl(s,e)}if(0<ud.length){Hl(ud[0],e);for(var n=1;n<ud.length;n++){var r=ud[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pi!==null&&Hl(Pi,e),ji!==null&&Hl(ji,e),Ni!==null&&Hl(Ni,e),Kc.forEach(t),Yc.forEach(t),n=0;n<mi.length;n++)r=mi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mi.length&&(n=mi[0],n.blockedOn===null);)gT(n),n.blockedOn===null&&mi.shift()}var Vo=Gs.ReactCurrentBatchConfig,zh=!0;function zD(e,t,n,r){var s=Ve,i=Vo.transition;Vo.transition=null;try{Ve=1,N0(e,t,n,r)}finally{Ve=s,Vo.transition=i}}function BD(e,t,n,r){var s=Ve,i=Vo.transition;Vo.transition=null;try{Ve=4,N0(e,t,n,r)}finally{Ve=s,Vo.transition=i}}function N0(e,t,n,r){if(zh){var s=sy(e,t,n,r);if(s===null)gm(e,t,r,Bh,n),ib(e,r);else if($D(s,e,t,n,r))r.stopPropagation();else if(ib(e,r),t&4&&-1<MD.indexOf(e)){for(;s!==null;){var i=$u(s);if(i!==null&&hT(i),i=sy(e,t,n,r),i===null&&gm(e,t,r,Bh,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else gm(e,t,r,null,n)}}var Bh=null;function sy(e,t,n,r){if(Bh=null,e=T0(r),e=va(e),e!==null)if(t=Ya(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sT(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 Bh=e,null}function yT(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(AD()){case A0:return 1;case lT:return 4;case $h:case PD:return 16;case cT:return 536870912;default:return 16}default:return 16}}var Ei=null,R0=null,nh=null;function vT(){if(nh)return nh;var e,t=R0,n=t.length,r,s="value"in Ei?Ei.value:Ei.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return nh=s.slice(e,1<r?1-r:void 0)}function rh(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 dd(){return!0}function ob(){return!1}function Zn(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?dd:ob,this.isPropagationStopped=ob,this}return pt(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=dd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=dd)},persist:function(){},isPersistent:dd}),t}var Cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},O0=Zn(Cl),Mu=pt({},Cl,{view:0,detail:0}),VD=Zn(Mu),om,lm,Wl,ep=pt({},Mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:I0,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!==Wl&&(Wl&&e.type==="mousemove"?(om=e.screenX-Wl.screenX,lm=e.screenY-Wl.screenY):lm=om=0,Wl=e),om)},movementY:function(e){return"movementY"in e?e.movementY:lm}}),lb=Zn(ep),UD=pt({},ep,{dataTransfer:0}),HD=Zn(UD),WD=pt({},Mu,{relatedTarget:0}),cm=Zn(WD),qD=pt({},Cl,{animationName:0,elapsedTime:0,pseudoElement:0}),ZD=Zn(qD),GD=pt({},Cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),KD=Zn(GD),YD=pt({},Cl,{data:0}),cb=Zn(YD),JD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QD={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"},XD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=XD[e])?!!t[e]:!1}function I0(){return eL}var tL=pt({},Mu,{key:function(e){if(e.key){var t=JD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?QD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:I0,charCode:function(e){return e.type==="keypress"?rh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nL=Zn(tL),rL=pt({},ep,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ub=Zn(rL),sL=pt({},Mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:I0}),iL=Zn(sL),aL=pt({},Cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),oL=Zn(aL),lL=pt({},ep,{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}),cL=Zn(lL),uL=[9,13,27,32],D0=zs&&"CompositionEvent"in window,kc=null;zs&&"documentMode"in document&&(kc=document.documentMode);var dL=zs&&"TextEvent"in window&&!kc,xT=zs&&(!D0||kc&&8<kc&&11>=kc),db=" ",hb=!1;function wT(e,t){switch(e){case"keyup":return uL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=!1;function hL(e,t){switch(e){case"compositionend":return bT(t);case"keypress":return t.which!==32?null:(hb=!0,db);case"textInput":return e=t.data,e===db&&hb?null:e;default:return null}}function fL(e,t){if(So)return e==="compositionend"||!D0&&wT(e,t)?(e=vT(),nh=R0=Ei=null,So=!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 xT&&t.locale!=="ko"?null:t.data;default:return null}}var pL={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 fb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pL[e.type]:t==="textarea"}function _T(e,t,n,r){XC(r),t=Vh(t,"onChange"),0<t.length&&(n=new O0("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Sc=null,Qc=null;function mL(e){OT(e,0)}function tp(e){var t=To(e);if(qC(t))return e}function gL(e,t){if(e==="change")return t}var kT=!1;if(zs){var um;if(zs){var dm="oninput"in document;if(!dm){var pb=document.createElement("div");pb.setAttribute("oninput","return;"),dm=typeof pb.oninput=="function"}um=dm}else um=!1;kT=um&&(!document.documentMode||9<document.documentMode)}function mb(){Sc&&(Sc.detachEvent("onpropertychange",ST),Qc=Sc=null)}function ST(e){if(e.propertyName==="value"&&tp(Qc)){var t=[];_T(t,Qc,e,T0(e)),rT(mL,t)}}function yL(e,t,n){e==="focusin"?(mb(),Sc=t,Qc=n,Sc.attachEvent("onpropertychange",ST)):e==="focusout"&&mb()}function vL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tp(Qc)}function xL(e,t){if(e==="click")return tp(t)}function wL(e,t){if(e==="input"||e==="change")return tp(t)}function bL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zr=typeof Object.is=="function"?Object.is:bL;function Xc(e,t){if(zr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!zg.call(t,s)||!zr(e[s],t[s]))return!1}return!0}function gb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yb(e,t){var n=gb(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=gb(n)}}function ET(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ET(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function CT(){for(var e=window,t=Dh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dh(e.document)}return t}function L0(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 _L(e){var t=CT(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ET(n.ownerDocument.documentElement,n)){if(r!==null&&L0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=yb(n,i);var a=yb(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 kL=zs&&"documentMode"in document&&11>=document.documentMode,Eo=null,iy=null,Ec=null,ay=!1;function vb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ay||Eo==null||Eo!==Dh(r)||(r=Eo,"selectionStart"in r&&L0(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,352 bytes, line 38
38sNode:r.focusNode,focusOffset:r.focusOffset}),Ec&&Xc(Ec,r)||(Ec=r,r=Vh(iy,"onSelect"),0<r.length&&(t=new O0("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Eo)))}function hd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Co={animationend:hd("Animation","AnimationEnd"),animationiteration:hd("Animation","AnimationIteration"),animationstart:hd("Animation","AnimationStart"),transitionend:hd("Transition","TransitionEnd")},hm={},TT={};zs&&(TT=document.createElement("div").style,"AnimationEvent"in window||(delete Co.animationend.animation,delete Co.animationiteration.animation,delete Co.animationstart.animation),"TransitionEvent"in window||delete Co.transitionend.transition);function np(e){if(hm[e])return hm[e];if(!Co[e])return e;var t=Co[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in TT)return hm[e]=t[n];return e}var AT=np("animationend"),PT=np("animationiteration"),jT=np("animationstart"),NT=np("transitionend"),RT=new Map,xb="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 Xi(e,t){RT.set(e,t),Ka(t,[e])}for(var fm=0;fm<xb.length;fm++){var pm=xb[fm],SL=pm.toLowerCase(),EL=pm[0].toUpperCase()+pm.slice(1);Xi(SL,"on"+EL)}Xi(AT,"onAnimationEnd");Xi(PT,"onAnimationIteration");Xi(jT,"onAnimationStart");Xi("dblclick","onDoubleClick");Xi("focusin","onFocus");Xi("focusout","onBlur");Xi(NT,"onTransitionEnd");ol("onMouseEnter",["mouseout","mouseover"]);ol("onMouseLeave",["mouseout","mouseover"]);ol("onPointerEnter",["pointerout","pointerover"]);ol("onPointerLeave",["pointerout","pointerover"]);Ka("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ka("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ka("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ka("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ka("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ka("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uc="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(" "),CL=new Set("cancel close invalid load scroll toggle".split(" ").concat(uc));function wb(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SD(r,t,void 0,e),e.currentTarget=null}function OT(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==i&&s.isPropagationStopped())break e;wb(s,o,c),i=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==i&&s.isPropagationStopped())break e;wb(s,o,c),i=l}}}if(Mh)throw e=ty,Mh=!1,ty=null,e}function et(e,t){var n=t[dy];n===void 0&&(n=t[dy]=new Set);var r=e+"__bubble";n.has(r)||(IT(t,e,2,!1),n.add(r))}function mm(e,t,n){var r=0;t&&(r|=4),IT(n,e,r,t)}var fd="_reactListening"+Math.random().toString(36).slice(2);function eu(e){if(!e[fd]){e[fd]=!0,BC.forEach(function(n){n!=="selectionchange"&&(CL.has(n)||mm(n,!1,e),mm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fd]||(t[fd]=!0,mm("selectionchange",!1,t))}}function IT(e,t,n,r){switch(yT(t)){case 1:var s=zD;break;case 4:s=BD;break;default:s=N0}n=s.bind(null,t,n,e),s=void 0,!ey||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 3,811 bytes, line 38
38function gm(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;a=a.return}for(;o!==null;){if(a=va(o),a===null)return;if(l=a.tag,l===5||l===6){r=i=a;continue e}o=o.parentNode}}r=r.return}rT(function(){var c=i,u=T0(n),d=[];e:{var p=RT.get(e);if(p!==void 0){var f=O0,v=e;switch(e){case"keypress":if(rh(n)===0)break e;case"keydown":case"keyup":f=nL;break;case"focusin":v="focus",f=cm;break;case"focusout":v="blur",f=cm;break;case"beforeblur":case"afterblur":f=cm;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":f=lb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=HD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=iL;break;case AT:case PT:case jT:f=ZD;break;case NT:f=oL;break;case"scroll":f=VD;break;case"wheel":f=cL;break;case"copy":case"cut":case"paste":f=KD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=ub}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?p!==null?p+"Capture":null:p;x=[];for(var y=c,m;y!==null;){m=y;var _=m.stateNode;if(m.tag===5&&_!==null&&(m=_,g!==null&&(_=Gc(y,g),_!=null&&x.push(tu(y,_,m)))),w)break;y=y.return}0<x.length&&(p=new f(p,v,null,n,u),d.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&n!==Qg&&(v=n.relatedTarget||n.fromElement)&&(va(v)||v[Bs]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=c,v=v?va(v):null,v!==null&&(w=Ya(v),v!==w||v.tag!==5&&v.tag!==6)&&(v=null)):(f=null,v=c),f!==v)){if(x=lb,_="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=ub,_="onPointerLeave",g="onPointerEnter",y="pointer"),w=f==null?p:To(f),m=v==null?p:To(v),p=new x(_,y+"leave",f,n,u),p.target=w,p.relatedTarget=m,_=null,va(u)===c&&(x=new x(g,y+"enter",v,n,u),x.target=m,x.relatedTarget=w,_=x),w=_,f&&v)t:{for(x=f,g=v,y=0,m=x;m;m=Xa(m))y++;for(m=0,_=g;_;_=Xa(_))m++;for(;0<y-m;)x=Xa(x),y--;for(;0<m-y;)g=Xa(g),m--;for(;y--;){if(x===g||g!==null&&x===g.alternate)break t;x=Xa(x),g=Xa(g)}x=null}else x=null;f!==null&&bb(d,p,f,x,!1),v!==null&&w!==null&&bb(d,w,v,x,!0)}}e:{if(p=c?To(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=gL;else if(fb(p))if(kT)k=wL;else{k=vL;var S=yL}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=xL);if(k&&(k=k(e,c))){_T(d,k,n,u);break e}S&&S(e,p,c),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&Zg(p,"number",p.value)}switch(S=c?To(c):window,e){case"focusin":(fb(S)||S.contentEditable==="true")&&(Eo=S,iy=c,Ec=null);break;case"focusout":Ec=iy=Eo=null;break;case"mousedown":ay=!0;break;case"contextmenu":case"mouseup":case"dragend":ay=!1,vb(d,n,u);break;case"selectionchange":if(kL)break;case"keydown":case"keyup":vb(d,n,u)}var E;if(D0)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else So?wT(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(xT&&n.locale!=="ko"&&(So||P!=="onCompositionStart"?P==="onCompositionEnd"&&So&&(E=vT()):(Ei=u,R0="value"in Ei?Ei.value:Ei.textContent,S
vendor: 4,926 bytes, lines 38-39
38o=!0)),S=Vh(c,P),0<S.length&&(P=new cb(P,e,null,n,u),d.push({event:P,listeners:S}),E?P.data=E:(E=bT(n),E!==null&&(P.data=E)))),(E=dL?hL(e,n):fL(e,n))&&(c=Vh(c,"onBeforeInput"),0<c.length&&(u=new cb("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}OT(d,t)})}function tu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vh(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Gc(e,n),i!=null&&r.unshift(tu(e,i,s)),i=Gc(e,t),i!=null&&r.push(tu(e,i,s))),e=e.return}return r}function Xa(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bb(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(l!==null&&l===r)break;o.tag===5&&c!==null&&(o=c,s?(l=Gc(n,i),l!=null&&a.unshift(tu(n,l,o))):s||(l=Gc(n,i),l!=null&&a.push(tu(n,l,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var TL=/\r\n?/g,AL=/\u0000|\uFFFD/g;function _b(e){return(typeof e=="string"?e:""+e).replace(TL,`
39`).replace(AL,"")}function pd(e,t,n){if(t=_b(t),_b(e)!==t&&n)throw Error(Z(425))}function Uh(){}var oy=null,ly=null;function cy(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 uy=typeof setTimeout=="function"?setTimeout:void 0,PL=typeof clearTimeout=="function"?clearTimeout:void 0,kb=typeof Promise=="function"?Promise:void 0,jL=typeof queueMicrotask=="function"?queueMicrotask:typeof kb<"u"?function(e){return kb.resolve(null).then(e).catch(NL)}:uy;function NL(e){setTimeout(function(){throw e})}function ym(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Jc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Jc(t)}function Ri(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 Sb(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 Tl=Math.random().toString(36).slice(2),ls="__reactFiber$"+Tl,nu="__reactProps$"+Tl,Bs="__reactContainer$"+Tl,dy="__reactEvents$"+Tl,RL="__reactListeners$"+Tl,OL="__reactHandles$"+Tl;function va(e){var t=e[ls];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bs]||n[ls]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sb(e);e!==null;){if(n=e[ls])return n;e=Sb(e)}return t}e=n,n=e.parentNode}return null}function $u(e){return e=e[ls]||e[Bs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Z(33))}function rp(e){return e[nu]||null}var hy=[],Ao=-1;function ea(e){return{current:e}}function rt(e){0>Ao||(e.current=hy[Ao],hy[Ao]=null,Ao--)}function Ke(e,t){Ao++,hy[Ao]=e.current,e.current=t}var Bi={},tn=ea(Bi),Tn=ea(!1),$a=Bi;function ll(e,t){var n=e.type.contextTypes;if(!n)return Bi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function An(e){return e=e.childContextTypes,e!=null}function Hh(){rt(Tn),rt(tn)}function Eb(e,t,n){if(tn.current!==Bi)throw Error(Z(168));Ke(tn,t),Ke(Tn,n)}function DT(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(Z(108,yD(e)||"Unknown",s));return pt({},n,r)}function Wh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bi,$a=tn.current,Ke(tn,e),Ke(Tn,Tn.current),!0}function Cb(e,t,n){var r=e.stateNode;if(!r)throw Error(Z(169));n?(e=DT(e,t,$a),r.__reactInternalMemoizedMergedChildContext=e,rt(Tn),rt(tn),Ke(tn,e)):rt(Tn),Ke(Tn,n)}var Is=null,sp=!1,vm=!1;function LT(e){Is===null?Is=[e]:Is.push(e)}function IL(e){sp=!0,LT(e)}function ta(){if(!vm&&Is!==null){vm=!0;var e=0,t=Ve;try{var n=Is;for(Ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Is=null,sp=!1}catch(s){throw Is!==null&&(Is=Is.slice(e+1)),oT(A0,ta),s}finally{Ve=t,vm=!1}}return null}var Po=[],jo=0,qh=null,Zh=0,nr=[],rr=0,Fa=null,Ls=1,Ms="";function fa(e,t){Po[jo++]=Zh,Po[jo++]=qh,qh=e,Zh=t}function MT(e,t,n){nr[rr++]=Ls,nr[rr++]=Ms,nr[rr++]=Fa,Fa=e;var r=Ls;e=Ms;var s=32-Mr(r)-1;r&=~(1<<s),n+=1;var i=32-Mr(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Ls=1<<32-Mr(t)+s|n<<s|r,Ms=i+e}else Ls=1<<i|n<<s|r,Ms=e}function M0(e){e.return!==null&&(fa(e,1),MT(e,1,0))}function $0(e){for(;e===qh;)qh=Po[--jo],Po[jo]=null,Zh=Po[--jo],Po[jo]=null;for(;e===Fa;
vendor: 13,604 bytes, line 39
39)Fa=nr[--rr],nr[rr]=null,Ms=nr[--rr],nr[rr]=null,Ls=nr[--rr],nr[rr]=null}var zn=null,$n=null,it=!1,Rr=null;function $T(e,t){var n=ar(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 Tb(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,zn=e,$n=Ri(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,zn=e,$n=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fa!==null?{id:Ls,overflow:Ms}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ar(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,zn=e,$n=null,!0):!1;default:return!1}}function fy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function py(e){if(it){var t=$n;if(t){var n=t;if(!Tb(e,t)){if(fy(e))throw Error(Z(418));t=Ri(n.nextSibling);var r=zn;t&&Tb(e,t)?$T(r,n):(e.flags=e.flags&-4097|2,it=!1,zn=e)}}else{if(fy(e))throw Error(Z(418));e.flags=e.flags&-4097|2,it=!1,zn=e}}}function Ab(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;zn=e}function md(e){if(e!==zn)return!1;if(!it)return Ab(e),it=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cy(e.type,e.memoizedProps)),t&&(t=$n)){if(fy(e))throw FT(),Error(Z(418));for(;t;)$T(e,t),t=Ri(t.nextSibling)}if(Ab(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){$n=Ri(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$n=null}}else $n=zn?Ri(e.stateNode.nextSibling):null;return!0}function FT(){for(var e=$n;e;)e=Ri(e.nextSibling)}function cl(){$n=zn=null,it=!1}function F0(e){Rr===null?Rr=[e]:Rr.push(e)}var DL=Gs.ReactCurrentBatchConfig;function ql(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 s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=s.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(Z(284));if(!n._owner)throw Error(Z(290,e))}return e}function gd(e,t){throw e=Object.prototype.toString.call(t),Error(Z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pb(e){var t=e._init;return t(e._payload)}function zT(e){function t(g,y){if(e){var m=g.deletions;m===null?(g.deletions=[y],g.flags|=16):m.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function s(g,y){return g=Li(g,y),g.index=0,g.sibling=null,g}function i(g,y,m){return g.index=m,e?(m=g.alternate,m!==null?(m=m.index,m<y?(g.flags|=2,y):m):(g.flags|=2,y)):(g.flags|=1048576,y)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function o(g,y,m,_){return y===null||y.tag!==6?(y=Em(m,g.mode,_),y.return=g,y):(y=s(y,m),y.return=g,y)}function l(g,y,m,_){var k=m.type;return k===ko?u(g,y,m.props.children,_,m.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===di&&Pb(k)===y.type)?(_=s(y,m.props),_.ref=ql(g,y,m),_.return=g,_):(_=uh(m.type,m.key,m.props,null,g.mode,_),_.ref=ql(g,y,m),_.return=g,_)}function c(g,y,m,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=Cm(m,g.mode,_),y.return=g,y):(y=s(y,m.children||[]),y.return=g,y)}function u(g,y,m,_,k){return y===null||y.tag!==7?(y=Da(m,g.mode,_,k),y.return=g,y):(y=s(y,m),y.return=g,y)}function d(g,y,m){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Em(""+y,g.mode,m),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case id:return m=uh(y.type,y.key,y.props,null,g.mode,m),m.ref=ql(g,null,y),m.return=g,m;case _o:return y=Cm(y,g.mode,m),y.return=g,y;case di:var _=y._init;return d(g,_(y._payload),m)}if(lc(y)||Bl(y))return y=Da(y,g.mode,m,null),y.return=g,y;gd(g,y)}return null}function p(g,y,m,_){var k=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return k!==null?null:o(g,y,""+m,_);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case id:return m.key===k?l(g,y,m,_):null;case _o:return m.key===k?c(g,y,m,_):null;case di:return k=m._init,p(g,y,k(m._payload),_)}if(lc(m)||Bl(m))return k!==null?null:u(g,y,m,_,null);gd(g,m)}return null}function f(g,y,m,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return g=g.get(m)||null,o(y,g,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case id:return g=g.get(_.key===null?m:_.key)||null,l(y,g,_,k);case _o:return g=g.get(_.key===null?m:_.key)||null,c(y,g,_,k);case di:var S=_._init;return f(g,y,m,S(_._payload),k)}if(lc(_)||Bl(_))return g=g.get(m)||null,u(y,g,_,k,null);gd(y,_)}return null}function v(g,y,m,_){for(var k=null,S=null,E=y,P=y=0,j=null;E!==null&&P<m.length;P++){E.index>P?(j=E,E=null):j=E.sibling;var R=p(g,E,m[P],_);if(R===null){E===null&&(E=j);break}e&&E&&R.alternate===null&&t(g,E),y=i(R,y,P),S===null?k=R:S.sibling=R,S=R,E=j}if(P===m.length)return n(g,E),it&&fa(g,P),k;if(E===null){for(;P<m.length;P++)E=d(g,m[P],_),E!==null&&(y=i(E,y,P),S===null?k=E:S.sibling=E,S=E);return it&&fa(g,P),k}for(E=r(g,E);P<m.length;P++)j=f(E,g,P,m[P],_),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?P:j.key),y=i(j,y,P),S===null?k=j:S.sibling=j,S=j);return e&&E.forEach(function(M){return t(g,M)}),it&&fa(g,P),k}function x(g,y,m,_){var k=Bl(m);if(typeof k!="function")throw Error(Z(150));if(m=k.call(m),m==null)throw Error(Z(151));for(var S=k=null,E=y,P=y=0,j=null,R=m.next();E!==null&&!R.done;P++,R=m.next()){E.index>P?(j=E,E=null):j=E.sibling;var M=p(g,E,R.value,_);if(M===null){E===null&&(E=j);break}e&&E&&M.alternate===null&&t(g,E),y=i(M,y,P),S===null?k=M:S.sibling=M,S=M,E=j}if(R.done)return n(g,E),it&&fa(g,P),k;if(E===null){for(;!R.done;P++,R=m.next())R=d(g,R.value,_),R!==null&&(y=i(R,y,P),S===null?k=R:S.sibling=R,S=R);return it&&fa(g,P),k}for(E=r(g,E);!R.done;P++,R=m.next())R=f(E,g,P,R.value,_),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?P:R.key),y=i(R,y,P),S===null?k=R:S.sibling=R,S=R);return e&&E.forEach(function(O){return t(g,O)}),it&&fa(g,P),k}function w(g,y,m,_){if(typeof m=="object"&&m!==null&&m.type===ko&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case id:e:{for(var k=m.key,S=y;S!==null;){if(S.key===k){if(k=m.type,k===ko){if(S.tag===7){n(g,S.sibling),y=s(S,m.props.children),y.return=g,g=y;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===di&&Pb(k)===S.type){n(g,S.sibling),y=s(S,m.props),y.ref=ql(g,S,m),y.return=g,g=y;break e}n(g,S);break}else t(g,S);S=S.sibling}m.type===ko?(y=Da(m.props.children,g.mode,_,m.key),y.return=g,g=y):(_=uh(m.type,m.key,m.props,null,g.mode,_),_.ref=ql(g,y,m),_.return=g,g=_)}return a(g);case _o:e:{for(S=m.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(g,y.sibling),y=s(y,m.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Cm(m,g.mode,_),y.return=g,g=y}return a(g);case di:return S=m._init,w(g,y,S(m._payload),_)}if(lc(m))return v(g,y,m,_);if(Bl(m))return x(g,y,m,_);gd(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,y!==null&&y.tag===6?(n(g,y.sibling),y=s(y,m),y.return=g,g=y):(n(g,y),y=Em(m,g.mode,_),y.return=g,g=y),a(g)):n(g,y)}return w}var ul=zT(!0),BT=zT(!1),Gh=ea(null),Kh=null,No=null,z0=null;function B0(){z0=No=Kh=null}function V0(e){var t=Gh.current;rt(Gh),e._currentValue=t}function my(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 Uo(e,t){Kh=e,z0=No=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Cn=!0),e.firstContext=null)}function ur(e){var t=e._currentValue;if(z0!==e)if(e={context:e,memoizedValue:t,next:null},No===null){if(Kh===null)throw Error(Z(308));No=e,Kh.dependencies={lanes:0,firstContext:e}}else No=No.next=e;return t}var xa=null;function U0(e){xa===null?xa=[e]:xa.push(e)}function VT(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,U0(t)):(n.next=s.next,s.next=n),t.interleaved=n,Vs(e,r)}function Vs(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 hi=!1;function H0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function UT(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 $s(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ie&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Vs(e,n)}return s=r.interleaved,s===null?(t.next=t,U0(r)):(t.next=s.next,s.next=t),r.interleaved=t,Vs(e,n)}function sh(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,P0(e,n)}}function jb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yh(e,t,n,r){var s=e.updateQueue;hi=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;a=0,u=c=l=null,o=i;do{var p=o.lane,f=o.eventTime;if((r&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,x=o;switch(p=t,f=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){d=v.call(f,d,p);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,p=typeof v=="function"?v.call(f,d,p):v,p==null)break e;d=pt({},d,p);break e;case 2:hi=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[o]:p.push(o))}else f={eventTime:f,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,a|=p;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;p=o,o=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ba|=a,e.lanes=a,e.memoizedState=d}}function Nb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(Z(191,s));s.call(r)}}}var Fu={},ps=ea(Fu),ru=ea(Fu),su=ea(Fu);function wa(e){if(e===Fu)throw Error(Z(174));return e}function W0(e,t){switch(Ke(su,t),Ke(ru,e),Ke(ps,Fu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kg(t,e)}rt(ps),Ke(ps,t)}function dl(){rt(ps),rt(ru),rt(su)}function HT(e){wa(su.current);var t=wa(ps.current),n=Kg(t,e.type);t!==n&&(Ke(ru,e),Ke(ps,n))}function q0(e){ru.current===e&&(rt(ps),rt(ru))}var dt=ea(0);function Jh(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 xm=[];function Z0(){for(var e=0;e<xm.length;e++)xm[e]._workInProgressVersionPrimary=null;xm.length=0}var ih=Gs.ReactCurrentDispatcher,wm=Gs.ReactCurrentBatchConfig,za=0,ht=null,It=null,Ft=null,Qh=!1,Cc=!1,iu=0,LL=0;function Jt(){throw Error(Z(321))}function G0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function K0(e,t,n,r,s,i){if(za=i,ht=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ih.current=e===null||e.memoizedState===null?zL:BL,e=n(r,s),Cc){i=0;do{if(Cc=!1,iu=0,25<=i)throw Error(Z(301));i+=1,Ft=It=null,t.updateQueue=null,ih.current=VL,e=n(r,s)}while(Cc)}if(ih.current=Xh,t=It!==null&&It.next!==null,za=0,Ft=It=ht=null,Qh=!1,t)throw Error(Z(300));return e}function Y0(){var e=iu!==0;return iu=0,e}function Jr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ft===null?ht.memoizedState=Ft=e:Ft=Ft.next=e,Ft}function dr(){if(It===null){var e=ht.alternate;e=e!==null?e.memoizedState:null}
vendor: 6,113 bytes, line 39
39else e=It.next;var t=Ft===null?ht.memoizedState:Ft.next;if(t!==null)Ft=t,It=e;else{if(e===null)throw Error(Z(310));It=e,e={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},Ft===null?ht.memoizedState=Ft=e:Ft=Ft.next=e}return Ft}function au(e,t){return typeof t=="function"?t(e):t}function bm(e){var t=dr(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=It,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var o=a=null,l=null,c=i;do{var u=c.lane;if((za&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=d,a=r):l=l.next=d,ht.lanes|=u,Ba|=u}c=c.next}while(c!==null&&c!==i);l===null?a=r:l.next=o,zr(r,t.memoizedState)||(Cn=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ht.lanes|=i,Ba|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _m(e){var t=dr(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);zr(i,t.memoizedState)||(Cn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function WT(){}function qT(e,t){var n=ht,r=dr(),s=t(),i=!zr(r.memoizedState,s);if(i&&(r.memoizedState=s,Cn=!0),r=r.queue,J0(KT.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ft!==null&&Ft.memoizedState.tag&1){if(n.flags|=2048,ou(9,GT.bind(null,n,r,s,t),void 0,null),zt===null)throw Error(Z(349));za&30||ZT(n,t,s)}return s}function ZT(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function GT(e,t,n,r){t.value=n,t.getSnapshot=r,YT(t)&&JT(e)}function KT(e,t,n){return n(function(){YT(t)&&JT(e)})}function YT(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function JT(e){var t=Vs(e,1);t!==null&&$r(t,e,1,-1)}function Rb(e){var t=Jr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:au,lastRenderedState:e},t.queue=e,e=e.dispatch=FL.bind(null,ht,e),[t.memoizedState,e]}function ou(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.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 QT(){return dr().memoizedState}function ah(e,t,n,r){var s=Jr();ht.flags|=e,s.memoizedState=ou(1|t,n,void 0,r===void 0?null:r)}function ip(e,t,n,r){var s=dr();r=r===void 0?null:r;var i=void 0;if(It!==null){var a=It.memoizedState;if(i=a.destroy,r!==null&&G0(r,a.deps)){s.memoizedState=ou(t,n,i,r);return}}ht.flags|=e,s.memoizedState=ou(1|t,n,i,r)}function Ob(e,t){return ah(8390656,8,e,t)}function J0(e,t){return ip(2048,8,e,t)}function XT(e,t){return ip(4,2,e,t)}function eA(e,t){return ip(4,4,e,t)}function tA(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 nA(e,t,n){return n=n!=null?n.concat([e]):null,ip(4,4,tA.bind(null,t,e),n)}function Q0(){}function rA(e,t){var n=dr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&G0(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sA(e,t){var n=dr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&G0(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function iA(e,t,n){return za&21?(zr(n,t)||(n=uT(),ht.lanes|=n,Ba|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Cn=!0),e.memoizedState=n)}function ML(e,t){var n=Ve;Ve=n!==0&&4>n?n:4,e(!0);var r=wm.transition;wm.transition={};try{e(!1),t()}finally{Ve=n,wm.transition=r}}function aA(){return dr().memoizedState}function $L(e,t,n){var r=Di(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},oA(e))lA(t,n);else if(n=VT(e,t,n,r),n!==null){var s=fn();$r(n,e,r,s),cA(n,t,r)}}function FL(e,t,n){var r=Di(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(oA(e))lA(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,n);if(s.hasEagerState=!0,s.eagerState=o,zr(o,a)){var l=t.interleaved;l===null?(s.next=s,U0(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=VT(e,t,s,r),n!==null&&(s=fn(),$r(n,e,r,s),cA(n,t,r))}}function oA(e){var t=e.alternate;return e===ht||t!==null&&t===ht}function lA(e,t){Cc=Qh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,P0(e,n)}}var Xh={readContext:ur,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useInsertionEffect:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useSyncExternalStore:Jt,useId:Jt,unstable_isNewReconciler:!1},zL={readContext:ur,useCallback:function(e,t){return Jr().memoizedState=[e,t===void 0?null:t],e},useContext:ur,useEffect:Ob,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ah(4194308,4,tA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ah(4194308,4,e,t)},useInsertionEffect:function(e,t){return ah(4,2,e,t)},useMemo:function(e,t){var n=Jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jr();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=$L.bind(null,ht,e),[r.memoizedState,e]}
vendor: 5,199 bytes, lines 39-41
39,useRef:function(e){var t=Jr();return e={current:e},t.memoizedState=e},useState:Rb,useDebugValue:Q0,useDeferredValue:function(e){return Jr().memoizedState=e},useTransition:function(){var e=Rb(!1),t=e[0];return e=ML.bind(null,e[1]),Jr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ht,s=Jr();if(it){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),zt===null)throw Error(Z(349));za&30||ZT(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Ob(KT.bind(null,r,i,e),[e]),r.flags|=2048,ou(9,GT.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jr(),t=zt.identifierPrefix;if(it){var n=Ms,r=Ls;n=(r&~(1<<32-Mr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=iu++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=LL++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BL={readContext:ur,useCallback:rA,useContext:ur,useEffect:J0,useImperativeHandle:nA,useInsertionEffect:XT,useLayoutEffect:eA,useMemo:sA,useReducer:bm,useRef:QT,useState:function(){return bm(au)},useDebugValue:Q0,useDeferredValue:function(e){var t=dr();return iA(t,It.memoizedState,e)},useTransition:function(){var e=bm(au)[0],t=dr().memoizedState;return[e,t]},useMutableSource:WT,useSyncExternalStore:qT,useId:aA,unstable_isNewReconciler:!1},VL={readContext:ur,useCallback:rA,useContext:ur,useEffect:J0,useImperativeHandle:nA,useInsertionEffect:XT,useLayoutEffect:eA,useMemo:sA,useReducer:_m,useRef:QT,useState:function(){return _m(au)},useDebugValue:Q0,useDeferredValue:function(e){var t=dr();return It===null?t.memoizedState=e:iA(t,It.memoizedState,e)},useTransition:function(){var e=_m(au)[0],t=dr().memoizedState;return[e,t]},useMutableSource:WT,useSyncExternalStore:qT,useId:aA,unstable_isNewReconciler:!1};function Cr(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function gy(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ap={isMounted:function(e){return(e=e._reactInternals)?Ya(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fn(),s=Di(e),i=$s(r,s);i.payload=t,n!=null&&(i.callback=n),t=Oi(e,i,s),t!==null&&($r(t,e,s,r),sh(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fn(),s=Di(e),i=$s(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Oi(e,i,s),t!==null&&($r(t,e,s,r),sh(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fn(),r=Di(e),s=$s(n,r);s.tag=2,t!=null&&(s.callback=t),t=Oi(e,s,r),t!==null&&($r(t,e,r,n),sh(t,e,r))}};function Ib(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Xc(n,r)||!Xc(s,i):!0}function uA(e,t,n){var r=!1,s=Bi,i=t.contextType;return typeof i=="object"&&i!==null?i=ur(i):(s=An(t)?$a:tn.current,r=t.contextTypes,i=(r=r!=null)?ll(e,s):Bi),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ap,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Db(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&&ap.enqueueReplaceState(t,t.state,null)}function yy(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},H0(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ur(i):(i=An(t)?$a:tn.current,s.context=ll(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(gy(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ap.enqueueReplaceState(s,s.state,null),Yh(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function hl(e,t){try{var n="",r=t;do n+=gD(r),r=r.return;while(r);var s=n}catch(i){s=`
40Error generating stack: `+i.message+`
41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function km(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function vy(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UL=typeof WeakMap=="function"?WeakMap:Map;function dA(e,t,n){n=$s(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){tf||(tf=!0,Ay=r),vy(e,t)},n}function hA(e,t,n){n=$s(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){vy(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){vy(e,t),typeof r!="function"&&(Ii===null?Ii=new Set([this]):Ii.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}
vendor: 8,958 bytes, line 41
41function Lb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UL;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=rM.bind(null,e,t,n),t.then(e,e))}function Mb(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 $b(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$s(-1,1),t.tag=2,Oi(n,t,1))),n.lanes|=1),e)}var HL=Gs.ReactCurrentOwner,Cn=!1;function ln(e,t,n,r){t.child=e===null?BT(t,null,n,r):ul(t,e.child,n,r)}function Fb(e,t,n,r,s){n=n.render;var i=t.ref;return Uo(t,s),r=K0(e,t,n,r,i,s),n=Y0(),e!==null&&!Cn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Us(e,t,s)):(it&&n&&M0(t),t.flags|=1,ln(e,t,r,s),t.child)}function zb(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!ax(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,fA(e,t,i,r,s)):(e=uh(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xc,n(a,r)&&e.ref===t.ref)return Us(e,t,s)}return t.flags|=1,e=Li(i,r),e.ref=t.ref,e.return=t,t.child=e}function fA(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Xc(i,r)&&e.ref===t.ref)if(Cn=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Cn=!0);else return t.lanes=e.lanes,Us(e,t,s)}return xy(e,t,n,r,s)}function pA(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(Oo,Dn),Dn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ke(Oo,Dn),Dn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ke(Oo,Dn),Dn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ke(Oo,Dn),Dn|=r;return ln(e,t,s,n),t.child}function mA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xy(e,t,n,r,s){var i=An(n)?$a:tn.current;return i=ll(t,i),Uo(t,s),n=K0(e,t,n,r,i,s),r=Y0(),e!==null&&!Cn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Us(e,t,s)):(it&&r&&M0(t),t.flags|=1,ln(e,t,n,s),t.child)}function Bb(e,t,n,r,s){if(An(n)){var i=!0;Wh(t)}else i=!1;if(Uo(t,s),t.stateNode===null)oh(e,t),uA(t,n,r),yy(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=ur(c):(c=An(n)?$a:tn.current,c=ll(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==c)&&Db(t,a,r,c),hi=!1;var p=t.memoizedState;a.state=p,Yh(t,r,a,s),l=t.memoizedState,o!==r||p!==l||Tn.current||hi?(typeof u=="function"&&(gy(t,n,u,r),l=t.memoizedState),(o=hi||Ib(t,n,o,r,p,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,UT(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:Cr(t.type,o),a.props=c,d=t.pendingProps,p=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=ur(l):(l=An(n)?$a:tn.current,l=ll(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||p!==l)&&Db(t,a,r,l),hi=!1,p=t.memoizedState,a.state=p,Yh(t,r,a,s);var v=t.memoizedState;o!==d||p!==v||Tn.current||hi?(typeof f=="function"&&(gy(t,n,f,r),v=t.memoizedState),(c=hi||Ib(t,n,c,r,p,v,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return wy(e,t,n,r,i,s)}function wy(e,t,n,r,s,i){mA(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Cb(t,n,!1),Us(e,t,i);r=t.stateNode,HL.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=ul(t,e.child,null,i),t.child=ul(t,null,o,i)):ln(e,t,o,i),t.memoizedState=r.state,s&&Cb(t,n,!0),t.child}function gA(e){var t=e.stateNode;t.pendingContext?Eb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Eb(e,t.context,!1),W0(e,t.containerInfo)}function Vb(e,t,n,r,s){return cl(),F0(s),t.flags|=256,ln(e,t,n,r),t.child}var by={dehydrated:null,treeContext:null,retryLane:0};function _y(e){return{baseLanes:e,cachePool:null,transitions:null}}function yA(e,t,n){var r=t.pendingProps,s=dt.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ke(dt,s&1),e===null)return py(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):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=cp(a,r,0,null),e=Da(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_y(n),t.memoizedState=by,e):X0(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return WL(e,t,a,r,o,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,o=s.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Li(s,l),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=Li(o,i):(i=Da(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?_y(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=by,r}return i=e.child,e=i.sibling,r=Li(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function X0(e,t){return t=cp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yd(e,t,n,r){return r!==null&&F0(r),ul(t,e.child,null,n),e=X0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WL(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=km(Error(Z(422))),yd(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=cp({mode:"visible",children:r.children},s,0,null),i=Da(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&ul(t,e.child,null,a),t.child.memoizedState=_y(a),t.memoizedState=by,i);if(!(t.mode&1))return yd(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(Z(419)),r=km(i,r,void 0),yd(e,t,a,r)}if(o=(a&e.childLanes)!==0,Cn||o){if(r=zt,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Vs(e,s),$r(r,e,s,-1))}return ix(),r=km(Error(Z(421))),yd(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sM.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,$n=Ri(s.nextSibling),zn=t,it=!0,Rr=null,e!==null&&(nr[rr++]=Ls,nr[rr++]=Ms,nr[rr++]=Fa,Ls=e.id,Ms=e.overflow,Fa=t),t=X0(t,r.children),t.flags|=4096,t)}function Ub(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),my(e.return,t,n)}
vendor: 5,381 bytes, line 41
41function Sm(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function vA(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ln(e,t,r.children,n),r=dt.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&&Ub(e,n,t);else if(e.tag===19)Ub(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(Ke(dt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Jh(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Sm(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Jh(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Sm(t,!0,n,null,i);break;case"together":Sm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Us(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ba|=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=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qL(e,t,n){switch(t.tag){case 3:gA(t),cl();break;case 5:HT(t);break;case 1:An(t.type)&&Wh(t);break;case 4:W0(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Ke(Gh,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ke(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?yA(e,t,n):(Ke(dt,dt.current&1),e=Us(e,t,n),e!==null?e.sibling:null);Ke(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return vA(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ke(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,pA(e,t,n)}return Us(e,t,n)}var xA,ky,wA,bA;xA=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}};ky=function(){};wA=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,wa(ps.current);var i=null;switch(n){case"input":s=Wg(e,s),r=Wg(e,r),i=[];break;case"select":s=pt({},s,{value:void 0}),r=pt({},r,{value:void 0}),i=[];break;case"textarea":s=Gg(e,s),r=Gg(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Uh)}Yg(n,r);var a;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var o=s[c];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(qc.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(o=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(qc.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&et("scroll",e),i||o===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};bA=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zl(e,t){if(!it)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 Qt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ZL(e,t,n){var r=t.pendingProps;switch($0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(t),null;case 1:return An(t.type)&&Hh(),Qt(t),null;case 3:return r=t.stateNode,dl(),rt(Tn),rt(tn),Z0(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(md(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rr!==null&&(Ny(Rr),Rr=null))),ky(e,t),Qt(t),null;case 5:q0(t);var s=wa(su.current);
vendor: 14,580 bytes, line 41
41if(n=t.type,e!==null&&t.stateNode!=null)wA(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Z(166));return Qt(t),null}if(e=wa(ps.current),md(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ls]=t,r[nu]=i,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(s=0;s<uc.length;s++)et(uc[s],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":Qw(r,i),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},et("invalid",r);break;case"textarea":eb(r,i),et("invalid",r)}Yg(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&pd(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&pd(r.textContent,o,e),s=["children",""+o]):qc.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&et("scroll",r)}switch(n){case"input":ad(r),Xw(r,i,!0);break;case"textarea":ad(r),tb(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Uh)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=KC(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ls]=t,e[nu]=r,xA(e,t,!1,!1),t.stateNode=e;e:{switch(a=Jg(n,r),n){case"dialog":et("cancel",e),et("close",e),s=r;break;case"iframe":case"object":case"embed":et("load",e),s=r;break;case"video":case"audio":for(s=0;s<uc.length;s++)et(uc[s],e);s=r;break;case"source":et("error",e),s=r;break;case"img":case"image":case"link":et("error",e),et("load",e),s=r;break;case"details":et("toggle",e),s=r;break;case"input":Qw(e,r),s=Wg(e,r),et("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=pt({},r,{value:void 0}),et("invalid",e);break;case"textarea":eb(e,r),s=Gg(e,r),et("invalid",e);break;default:s=r}Yg(n,s),o=s;for(i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="style"?QC(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&YC(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Zc(e,l):typeof l=="number"&&Zc(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(qc.hasOwnProperty(i)?l!=null&&i==="onScroll"&&et("scroll",e):l!=null&&k0(e,i,l,a))}switch(n){case"input":ad(e),Xw(e,r,!1);break;case"textarea":ad(e),tb(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zi(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Fo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Fo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Uh)}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 Qt(t),null;case 6:if(e&&t.stateNode!=null)bA(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Z(166));if(n=wa(su.current),wa(ps.current),md(t)){if(r=t.stateNode,n=t.memoizedProps,r[ls]=t,(i=r.nodeValue!==n)&&(e=zn,e!==null))switch(e.tag){case 3:pd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pd(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ls]=t,t.stateNode=r}return Qt(t),null;case 13:if(rt(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(it&&$n!==null&&t.mode&1&&!(t.flags&128))FT(),cl(),t.flags|=98560,i=!1;else if(i=md(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(Z(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Z(317));i[ls]=t}else cl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qt(t),i=!1}else Rr!==null&&(Ny(Rr),Rr=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?Dt===0&&(Dt=3):ix())),t.updateQueue!==null&&(t.flags|=4),Qt(t),null);case 4:return dl(),ky(e,t),e===null&&eu(t.stateNode.containerInfo),Qt(t),null;case 10:return V0(t.type._context),Qt(t),null;case 17:return An(t.type)&&Hh(),Qt(t),null;case 19:if(rt(dt),i=t.memoizedState,i===null)return Qt(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Zl(i,!1);else{if(Dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Jh(e),a!==null){for(t.flags|=128,Zl(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ke(dt,dt.current&1|2),t.child}e=e.sibling}i.tail!==null&&_t()>fl&&(t.flags|=128,r=!0,Zl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jh(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!it)return Qt(t),null}else 2*_t()-i.renderingStartTime>fl&&n!==1073741824&&(t.flags|=128,r=!0,Zl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_t(),t.sibling=null,n=dt.current,Ke(dt,r?n&1|2:n&1),t):(Qt(t),null);case 22:case 23:return sx(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dn&1073741824&&(Qt(t),t.subtreeFlags&6&&(t.flags|=8192)):Qt(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function GL(e,t){switch($0(t),t.tag){case 1:return An(t.type)&&Hh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dl(),rt(Tn),rt(tn),Z0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return q0(t),null;case 13:if(rt(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(dt),null;case 4:return dl(),null;case 10:return V0(t.type._context),null;case 22:case 23:return sx(),null;case 24:return null;default:return null}}var vd=!1,en=!1,KL=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Ro(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(e,t,r)}else n.current=null}function Sy(e,t,n){try{n()}catch(r){wt(e,t,r)}}var Hb=!1;function YL(e,t){if(oy=zh,e=CT(),L0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(o=a+s),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++c===s&&(o=a),p===i&&++u===r&&(l=a),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ly={focusedElem:e,selectionRange:n},zh=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;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 x=v.memoizedProps,w=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:Cr(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(_){wt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return v=Hb,Hb=!1,v}function Tc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Sy(t,n,i)}s=s.next}while(s!==r)}}function op(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 Ey(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 _A(e){var t=e.alternate;t!==null&&(e.alternate=null,_A(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ls],delete t[nu],delete t[dy],delete t[RL],delete t[OL])),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 kA(e){return e.tag===5||e.tag===3||e.tag===4}function Wb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kA(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 Cy(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=Uh));else if(r!==4&&(e=e.child,e!==null))for(Cy(e,t,n),e=e.sibling;e!==null;)Cy(e,t,n),e=e.sibling}function Ty(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(Ty(e,t,n),e=e.sibling;e!==null;)Ty(e,t,n),e=e.sibling}var Ht=null,Nr=!1;function ni(e,t,n){for(n=n.child;n!==null;)SA(e,t,n),n=n.sibling}function SA(e,t,n){if(fs&&typeof fs.onCommitFiberUnmount=="function")try{fs.onCommitFiberUnmount(Xf,n)}catch{}switch(n.tag){case 5:en||Ro(n,t);case 6:var r=Ht,s=Nr;Ht=null,ni(e,t,n),Ht=r,Nr=s,Ht!==null&&(Nr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(Nr?(e=Ht,n=n.stateNode,e.nodeType===8?ym(e.parentNode,n):e.nodeType===1&&ym(e,n),Jc(e)):ym(Ht,n.stateNode));break;case 4:r=Ht,s=Nr,Ht=n.stateNode.containerInfo,Nr=!0,ni(e,t,n),Ht=r,Nr=s;break;case 0:case 11:case 14:case 15:if(!en&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Sy(n,t,a),s=s.next}while(s!==r)}ni(e,t,n);break;case 1:if(!en&&(Ro(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){wt(n,t,o)}ni(e,t,n);break;case 21:ni(e,t,n);break;case 22:n.mode&1?(en=(r=en)||n.memoizedState!==null,ni(e,t,n),en=r):ni(e,t,n);break;default:ni(e,t,n)}}function qb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KL),t.forEach(function(r){var s=iM.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function vr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Ht=o.stateNode,Nr=!1;break e;case 3:Ht=o.stateNode.containerInfo,Nr=!0;break e;case 4:Ht=o.stateNode.containerInfo,Nr=!0;break e}o=o.return}if(Ht===null)throw Error(Z(160));SA(i,a,s),Ht=null,Nr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){wt(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)EA(t,e),t=t.sibling}function EA(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vr(t,e),Gr(e),r&4){try{Tc(3,e,e.return),op(3,e)}catch(x){wt(e,e.return,x)}try{Tc(5,e,e.return)}catch(x){wt(e,e.return,x)}}break;case 1:vr(t,e),Gr(e),r&512&&n!==null&&Ro(n,n.return);break;case 5:if(vr(t,e),Gr(e),r&512&&n!==null&&Ro(n,n.return),e.flags&32){var s=e.stateNode;try{Zc(s,"")}catch(x){wt(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&ZC(s,i),Jg(o,a);var c=Jg(o,i);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];u==="style"?QC(s,d):u==="dangerouslySetInnerHTML"?YC(s,d):u==="children"?Zc(s,d):k0(s,u,d,c)}switch(o){case"input":qg(s,i);break;case"textarea":GC(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Fo(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Fo(s,!!i.multiple,i.defaultValue,!0):Fo(s,!!i.multiple,i.multiple?[]:"",!1))}s[nu]=i}catch(x){wt(e,e.return,x)}}break;case 6:if(vr(t,e),Gr(e),r&4){if(e.stateNode===null)throw Error(Z(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(x){wt(e,e.return,x)}}break;case 3:if(vr(t,e),Gr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Jc(t.containerInfo)}catch(x){wt(e,e.return,x)}break;case 4:vr(t,e),Gr(e);break;case 13:vr(t,e),Gr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(nx=_t())),r&4&&qb(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(en=(c=en)||u,vr(t,e),en=c):vr(t,e),Gr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(ce=e,u=e.child;u!==null;){for(d=ce=u;ce!==null;){switch(p=ce,f=p.child,p.tag){case 0:case 11:case 14:case 15:Tc(4,p,p.return);break;case 1:Ro(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(x){wt(r,n,x)}}break;case 5:Ro(p,p.return);break;case 22:if(p.memoizedState!==null){Gb(d);continue}}
vendor: 1,655 bytes, line 41
41f!==null?(f.return=p,ce=f):Gb(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=JC("display",a))}catch(x){wt(e,e.return,x)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(x){wt(e,e.return,x)}}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;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vr(t,e),Gr(e),r&4&&qb(e);break;case 21:break;default:vr(t,e),Gr(e)}}function Gr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(kA(n)){var r=n;break e}n=n.return}throw Error(Z(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Zc(s,""),r.flags&=-33);var i=Wb(e);Ty(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=Wb(e);Cy(e,o,a);break;default:throw Error(Z(161))}}catch(l){wt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function JL(e,t,n){ce=e,CA(e)}function CA(e,t,n){for(var r=(e.mode&1)!==0;ce!==null;){var s=ce,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||vd;if(!a){var o=s.alternate,l=o!==null&&o.memoizedState!==null||en;o=vd;var c=en;if(vd=a,(en=l)&&!c)for(ce=s;ce!==null;)a=ce,l=a.child,a.tag===22&&a.memoizedState!==null?Kb(s):l!==null?(l.return=a,ce=l):Kb(s);for(;i!==null;)ce=i,CA(i),i=i.sibling;ce=s,vd=o,en=c}
vendor: 13,545 bytes, line 41
41Zb(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,ce=i):Zb(e)}}function Zb(e){for(;ce!==null;){var t=ce;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:en||op(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!en)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Cr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Nb(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Nb(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;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 c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Jc(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}en||t.flags&512&&Ey(t)}catch(p){wt(t,t.return,p)}}if(t===e){ce=null;break}if(n=t.sibling,n!==null){n.return=t.return,ce=n;break}ce=t.return}}function Gb(e){for(;ce!==null;){var t=ce;if(t===e){ce=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ce=n;break}ce=t.return}}function Kb(e){for(;ce!==null;){var t=ce;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{op(4,t)}catch(l){wt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){wt(t,s,l)}}var i=t.return;try{Ey(t)}catch(l){wt(t,i,l)}break;case 5:var a=t.return;try{Ey(t)}catch(l){wt(t,a,l)}}}catch(l){wt(t,t.return,l)}if(t===e){ce=null;break}var o=t.sibling;if(o!==null){o.return=t.return,ce=o;break}ce=t.return}}var QL=Math.ceil,ef=Gs.ReactCurrentDispatcher,ex=Gs.ReactCurrentOwner,lr=Gs.ReactCurrentBatchConfig,Ie=0,zt=null,jt=null,Zt=0,Dn=0,Oo=ea(0),Dt=0,lu=null,Ba=0,lp=0,tx=0,Ac=null,En=null,nx=0,fl=1/0,Ns=null,tf=!1,Ay=null,Ii=null,xd=!1,Ci=null,nf=0,Pc=0,Py=null,lh=-1,ch=0;function fn(){return Ie&6?_t():lh!==-1?lh:lh=_t()}function Di(e){return e.mode&1?Ie&2&&Zt!==0?Zt&-Zt:DL.transition!==null?(ch===0&&(ch=uT()),ch):(e=Ve,e!==0||(e=window.event,e=e===void 0?16:yT(e.type)),e):1}function $r(e,t,n,r){if(50<Pc)throw Pc=0,Py=null,Error(Z(185));Lu(e,n,r),(!(Ie&2)||e!==zt)&&(e===zt&&(!(Ie&2)&&(lp|=n),Dt===4&&gi(e,Zt)),Pn(e,r),n===1&&Ie===0&&!(t.mode&1)&&(fl=_t()+500,sp&&ta()))}function Pn(e,t){var n=e.callbackNode;DD(e,t);var r=Fh(e,e===zt?Zt:0);if(r===0)n!==null&&sb(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&sb(n),t===1)e.tag===0?IL(Yb.bind(null,e)):LT(Yb.bind(null,e)),jL(function(){!(Ie&6)&&ta()}),n=null;else{switch(dT(r)){case 1:n=A0;break;case 4:n=lT;break;case 16:n=$h;break;case 536870912:n=cT;break;default:n=$h}n=IA(n,TA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function TA(e,t){if(lh=-1,ch=0,Ie&6)throw Error(Z(327));var n=e.callbackNode;if(Ho()&&e.callbackNode!==n)return null;var r=Fh(e,e===zt?Zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=rf(e,r);else{t=r;var s=Ie;Ie|=2;var i=PA();(zt!==e||Zt!==t)&&(Ns=null,fl=_t()+500,Ia(e,t));do try{tM();break}catch(o){AA(e,o)}while(!0);B0(),ef.current=i,Ie=s,jt!==null?t=0:(zt=null,Zt=0,t=Dt)}if(t!==0){if(t===2&&(s=ny(e),s!==0&&(r=s,t=jy(e,s))),t===1)throw n=lu,Ia(e,0),gi(e,r),Pn(e,_t()),n;if(t===6)gi(e,r);else{if(s=e.current.alternate,!(r&30)&&!XL(s)&&(t=rf(e,r),t===2&&(i=ny(e),i!==0&&(r=i,t=jy(e,i))),t===1))throw n=lu,Ia(e,0),gi(e,r),Pn(e,_t()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(Z(345));case 2:pa(e,En,Ns);break;case 3:if(gi(e,r),(r&130023424)===r&&(t=nx+500-_t(),10<t)){if(Fh(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){fn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=uy(pa.bind(null,e,En,Ns),t);break}pa(e,En,Ns);break;case 4:if(gi(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Mr(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=_t()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QL(r/1960))-r,10<r){e.timeoutHandle=uy(pa.bind(null,e,En,Ns),r);break}pa(e,En,Ns);break;case 5:pa(e,En,Ns);break;default:throw Error(Z(329))}}}return Pn(e,_t()),e.callbackNode===n?TA.bind(null,e):null}function jy(e,t){var n=Ac;return e.current.memoizedState.isDehydrated&&(Ia(e,t).flags|=256),e=rf(e,t),e!==2&&(t=En,En=n,t!==null&&Ny(t)),e}function Ny(e){En===null?En=e:En.push.apply(En,e)}function XL(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!zr(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gi(e,t){for(t&=~tx,t&=~lp,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mr(t),r=1<<n;e[n]=-1,t&=~r}}function Yb(e){if(Ie&6)throw Error(Z(327));Ho();var t=Fh(e,0);if(!(t&1))return Pn(e,_t()),null;var n=rf(e,t);if(e.tag!==0&&n===2){var r=ny(e);r!==0&&(t=r,n=jy(e,r))}if(n===1)throw n=lu,Ia(e,0),gi(e,t),Pn(e,_t()),n;if(n===6)throw Error(Z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,pa(e,En,Ns),Pn(e,_t()),null}function rx(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(fl=_t()+500,sp&&ta())}}function Va(e){Ci!==null&&Ci.tag===0&&!(Ie&6)&&Ho();var t=Ie;Ie|=1;var n=lr.transition,r=Ve;try{if(lr.transition=null,Ve=1,e)return e()}finally{Ve=r,lr.transition=n,Ie=t,!(Ie&6)&&ta()}}function sx(){Dn=Oo.current,rt(Oo)}function Ia(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,PL(n)),jt!==null)for(n=jt.return;n!==null;){var r=n;switch($0(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hh();break;case 3:dl(),rt(Tn),rt(tn),Z0();break;case 5:q0(r);break;case 4:dl();break;case 13:rt(dt);break;case 19:rt(dt);break;case 10:V0(r.type._context);break;case 22:case 23:sx()}n=n.return}if(zt=e,jt=e=Li(e.current,null),Zt=Dn=t,Dt=0,lu=null,tx=lp=Ba=0,En=Ac=null,xa!==null){for(t=0;t<xa.length;t++)if(n=xa[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}xa=null}return e}function AA(e,t){do{var n=jt;try{if(B0(),ih.current=Xh,Qh){for(var r=ht.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Qh=!1}if(za=0,Ft=It=ht=null,Cc=!1,iu=0,ex.current=null,n===null||n.return===null){Dt=1,lu=t,jt=null;break}e:{var i=e,a=n.return,o=n,l=t;if(t=Zt,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=o,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=Mb(a);if(f!==null){f.flags&=-257,$b(f,a,o,i,t),f.mode&1&&Lb(i,c,t),t=f,l=c;var v=t.updateQueue;if(v===null){var x=new Set;x.add(l),t.updateQueue=x}else v.add(l);break e}else{if(!(t&1)){Lb(i,c,t),ix();break e}l=Error(Z(426))}}else if(it&&o.mode&1){var w=Mb(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),$b(w,a,o,i,t),F0(hl(l,o));break e}}i=l=hl(l,o),Dt!==4&&(Dt=2),Ac===null?Ac=[i]:Ac.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=dA(i,l,t);jb(i,g);break e;case 1:o=l;var y=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ii===null||!Ii.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=hA(i,o,t);jb(i,_);break e}}i=i.return}while(i!==null)}NA(n)}catch(k){t=k,jt===n&&n!==null&&(jt=n=n.return);continue}break}while(!0)}function PA(){var e=ef.current;return ef.current=Xh,e===null?Xh:e}function ix(){(Dt===0||Dt===3||Dt===2)&&(Dt=4),zt===null||!(Ba&268435455)&&!(lp&268435455)||gi(zt,Zt)}function rf(e,t){var n=Ie;Ie|=2;var r=PA();(zt!==e||Zt!==t)&&(Ns=null,Ia(e,t));do try{eM();break}catch(s){AA(e,s)}while(!0);if(B0(),Ie=n,ef.current=r,jt!==null)throw Error(Z(261));return zt=null,Zt=0,Dt}function eM(){for(;jt!==null;)jA(jt)}function tM(){for(;jt!==null&&!CD();)jA(jt)}function jA(e){var t=OA(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,t===null?NA(e):jt=t,ex.current=null}function NA(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=GL(n,t),n!==null){n.flags&=32767,jt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Dt=6,jt=null;return}}else if(n=ZL(n,t,Dn),n!==null){jt=n;return}if(t=t.sibling,t!==null){jt=t;return}jt=t=e}while(t!==null);Dt===0&&(Dt=5)}function pa(e,t,n){var r=Ve,s=lr.transition;try{lr.transition=null,Ve=1,nM(e,t,n,r)}finally{lr.transition=s,Ve=r}return null}function nM(e,t,n,r){do Ho();while(Ci!==null);if(Ie&6)throw Error(Z(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Z(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(LD(e,i),e===zt&&(jt=zt=null,Zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||xd||(xd=!0,IA($h,function(){return Ho(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=lr.transition,lr.transition=null;var a=Ve;Ve=1;var o=Ie;Ie|=4,ex.current=null,YL(e,n),EA(n,e),_L(ly),zh=!!oy,ly=oy=null,e.current=n,JL(n),TD(),Ie=o,Ve=a,lr.transition=i}else e.current=n;if(xd&&(xd=!1,Ci=e,nf=s),i=e.pendingLanes,i===0&&(Ii=null),jD(n.stateNode),Pn(e,_t()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(tf)throw tf=!1,e=Ay,Ay=null,e;return nf&1&&e.tag!==0&&Ho(),i=e.pendingLanes,i&1?e===Py?Pc++:(Pc=0,Py=e):Pc=0,ta(),null}function Ho(){if(Ci!==null){var e=dT(nf),t=lr.transition,n=Ve;try{if(lr.transition=null,Ve=16>e?16:e,Ci===null)var r=!1;else{if(e=Ci,Ci=null,nf=0,Ie&6)throw Error(Z(331));var s=Ie;for(Ie|=4,ce=e.current;ce!==null;){var i=ce,a=i.child;if(ce.flags&16){var o=i.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(ce=c;ce!==null;){var u=ce;switch(u.tag){case 0:case 11:case 15:Tc(8,u,i)}var d=u.child;if(d!==null)d.return=u,ce=d;else for(;ce!==null;){u=ce;var p=u.sibling,f=u.return;if(_A(u),u===c){ce=null;break}if(p!==null){p.return=f,ce=p;break}ce=f}}}var v=i.alternate;if(v!==null){var x=v.child;if(x!==null){v.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}ce=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,ce=a;else e:for(;ce!==null;){if(i=ce,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Tc(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,ce=g;break e}ce=i.return}}var y=e.current;for(ce=y;ce!==null;){a=ce;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,ce=m;else e:for(a=y;ce!==null;){if(o=ce,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:op(9,o)}}catch(k){wt(o,o.return,k)}if(o===a){ce=null;break e}var _=o.sibling;if(_!==null){_.return=o.return,ce=_;break e}ce=o.return}}if(Ie=s,ta(),fs&&typeof fs.onPostCommitFiberRoot=="function")try{fs.onPostCommitFiberRoot(Xf,e)}catch{}r=!0}return r}finally{Ve=n,lr.transition=t}}return!1}function Jb(e,t,n){t=hl(n,t),t=dA(e,t,1),e=Oi(e,t,1),t=fn(),e!==null&&(Lu(e,1,t),Pn(e,t))}function wt(e,t,n){if(e.tag===3)Jb(e,e,n);else for(;t!==null;){if(t.tag===3){Jb(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ii===null||!Ii.has(r))){e=hl(n,e),e=hA(t,e,1),t=Oi(t,e,1),e=fn(),t!==null&&(Lu(t,1,e),Pn(t,e));break}}t=t.return}}function rM(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fn(),e.pingedLanes|=e.suspendedLanes&n,zt===e&&(Zt&n)===n&&(Dt===4||Dt===3&&(Zt&130023424)===Zt&&500>_t()-nx?Ia(e,0):tx|=n),Pn(e,t)}function RA(e,t){t===0&&(e.mode&1?(t=cd,cd<<=1,!(cd&130023424)&&(cd=4194304)):t=1);var n=fn();e=Vs(e,t),e!==null&&(Lu(e,t,n),Pn(e,n))}function sM(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RA(e,n)}function iM(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(t),RA(e,n)}var OA;OA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tn.current)Cn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Cn=!1,qL(e,t,n);Cn=!!(e.flags&131072)}else Cn=!1,it&&t.flags&1048576&&MT(t,Zh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oh(e,t),e=t.pendingProps;var s=ll(t,tn.current);Uo(t,n),s=K0(null,t,r,e,s,n);var i=Y0();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,An(r)?(i=!0,Wh(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,H0(t),s.updater=ap,t.stateNode=s,s._reactInternals=t,yy(t,r,e,n),t=wy(null,t,r,!0,i,n)):(t.tag=0,it&&i&&M0(t),ln(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oh(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=oM(r),e=Cr(r,e),s){case 0:t=xy(null,t,r,e,n);break e;case 1:t=Bb(null,t,r,e,n);break e;case 11:t=Fb(null,t,r,e,n);break e;case 14:t=zb(null,t,r,Cr(r.type,e),n);break e}throw Error(Z(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Cr(r,s),xy(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Cr(r,s),Bb(e,t,r,s,n);case 3:e:{if(gA(t),e===null)throw Error(Z(387));
vendor: 4,912 bytes, line 41
41r=t.pendingProps,i=t.memoizedState,s=i.element,UT(e,t),Yh(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=hl(Error(Z(423)),t),t=Vb(e,t,r,n,s);break e}else if(r!==s){s=hl(Error(Z(424)),t),t=Vb(e,t,r,n,s);break e}else for($n=Ri(t.stateNode.containerInfo.firstChild),zn=t,it=!0,Rr=null,n=BT(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cl(),r===s){t=Us(e,t,n);break e}ln(e,t,r,n)}t=t.child}return t;case 5:return HT(t),e===null&&py(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,cy(r,s)?a=null:i!==null&&cy(r,i)&&(t.flags|=32),mA(e,t),ln(e,t,a,n),t.child;case 6:return e===null&&py(t),null;case 13:return yA(e,t,n);case 4:return W0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ul(t,null,r,n):ln(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Cr(r,s),Fb(e,t,r,s,n);case 7:return ln(e,t,t.pendingProps,n),t.child;case 8:return ln(e,t,t.pendingProps.children,n),t.child;case 12:return ln(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,Ke(Gh,r._currentValue),r._currentValue=a,i!==null)if(zr(i.value,a)){if(i.children===s.children&&!Tn.current){t=Us(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=$s(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),my(i.return,n,t),o.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Z(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),my(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}ln(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Uo(t,n),s=ur(s),r=r(s),t.flags|=1,ln(e,t,r,n),t.child;case 14:return r=t.type,s=Cr(r,t.pendingProps),s=Cr(r.type,s),zb(e,t,r,s,n);case 15:return fA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Cr(r,s),oh(e,t),t.tag=1,An(r)?(e=!0,Wh(t)):e=!1,Uo(t,n),uA(t,r,s),yy(t,r,s,n),wy(null,t,r,!0,e,n);case 19:return vA(e,t,n);case 22:return pA(e,t,n)}throw Error(Z(156,t.tag))};function IA(e,t){return oT(e,t)}function aM(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 ar(e,t,n,r){return new aM(e,t,n,r)}function ax(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oM(e){if(typeof e=="function")return ax(e)?1:0;if(e!=null){if(e=e.$$typeof,e===E0)return 11;if(e===C0)return 14}return 2}function Li(e,t){var n=e.alternate;return n===null?(n=ar(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.deletions=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 uh(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")ax(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ko:return Da(n.children,s,i,t);case S0:a=8,s|=8;break;case Bg:return e=ar(12,n,t,s|2),e.elementType=Bg,e.lanes=i,e;case Vg:return e=ar(13,n,t,s),e.elementType=Vg,e.lanes=i,e;case Ug:return e=ar(19,n,t,s),e.elementType=Ug,e.lanes=i,e;case HC:return cp(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VC:a=10;break e;case UC:a=9;break e;case E0:a=11;break e;case C0:a=14;break e;case di:a=16,r=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=ar(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Da(e,t,n,r){return e=ar(7,e,r,t),e.lanes=n,e}function cp(e,t,n,r){return e=ar(22,e,r,t),e.elementType=HC,e.lanes=n,e.stateNode={isHidden:!1},e}function Em(e,t,n){return e=ar(6,e,null,t),e.lanes=n,e}function Cm(e,t,n){return t=ar(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}
vendor: 5,453 bytes, line 41
41function lM(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=am(0),this.expirationTimes=am(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=am(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ox(e,t,n,r,s,i,a,o,l){return e=new lM(e,t,n,o,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ar(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},H0(i),e}function cM(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function DA(e){if(!e)return Bi;e=e._reactInternals;e:{if(Ya(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(An(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(An(n))return DT(e,n,t)}return t}function LA(e,t,n,r,s,i,a,o,l){return e=ox(n,r,!0,e,s,i,a,o,l),e.context=DA(null),n=e.current,r=fn(),s=Di(n),i=$s(r,s),i.callback=t??null,Oi(n,i,s),e.current.lanes=s,Lu(e,s,r),Pn(e,r),e}function up(e,t,n,r){var s=t.current,i=fn(),a=Di(s);return n=DA(n),t.context===null?t.context=n:t.pendingContext=n,t=$s(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Oi(s,t,a),e!==null&&($r(e,s,a,i),sh(e,s,a)),a}function sf(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 Qb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lx(e,t){Qb(e,t),(e=e.alternate)&&Qb(e,t)}function uM(){return null}var MA=typeof reportError=="function"?reportError:function(e){console.error(e)};function cx(e){this._internalRoot=e}dp.prototype.render=cx.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Z(409));up(e,t,null,null)};dp.prototype.unmount=cx.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Va(function(){up(null,e,null,null)}),t[Bs]=null}};function dp(e){this._internalRoot=e}dp.prototype.unstable_scheduleHydration=function(e){if(e){var t=pT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mi.length&&t!==0&&t<mi[n].priority;n++);mi.splice(n,0,e),n===0&&gT(e)}};function ux(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Xb(){}function dM(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=sf(a);i.call(c)}}var a=LA(t,r,e,0,null,!1,!1,"",Xb);return e._reactRootContainer=a,e[Bs]=a.current,eu(e.nodeType===8?e.parentNode:e),Va(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var c=sf(l);o.call(c)}}var l=ox(e,0,!1,null,null,!1,!1,"",Xb);return e._reactRootContainer=l,e[Bs]=l.current,eu(e.nodeType===8?e.parentNode:e),Va(function(){up(t,l,n,r)}),l}function fp(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var o=s;s=function(){var l=sf(a);o.call(l)}}up(t,a,e,s)}else a=dM(n,t,e,s,r);return sf(a)}hT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cc(t.pendingLanes);n!==0&&(P0(t,n|1),Pn(t,_t()),!(Ie&6)&&(fl=_t()+500,ta()))}break;case 13:Va(function(){var r=Vs(e,1);if(r!==null){var s=fn();$r(r,e,1,s)}}),lx(e,1)}};j0=function(e){if(e.tag===13){var t=Vs(e,134217728);if(t!==null){var n=fn();$r(t,e,134217728,n)}lx(e,134217728)}};fT=function(e){if(e.tag===13){var t=Di(e),n=Vs(e,t);if(n!==null){var r=fn();$r(n,e,t,r)}lx(e,t)}};pT=function(){return Ve};mT=function(e,t){var n=Ve;try{return Ve=e,t()}finally{Ve=n}};Xg=function(e,t,n){switch(t){case"input":if(qg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=rp(r);if(!s)throw Error(Z(90));qC(r),qg(r,s)}}}break;case"textarea":GC(e,n);break;case"select":t=n.value,t!=null&&Fo(e,!!n.multiple,t,!1)}};tT=rx;nT=Va;var hM={usingClientEntryPoint:!1,Events:[$u,To,rp,XC,eT,rx]},Gl={findFiberByHostInstance:va,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fM={bundleType:Gl.bundleType,version:Gl.version,rendererPackageName:Gl.rendererPackageName,rendererConfig:Gl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=iT(e),e===null?null:e.stateNode},findFiberByHostInstance:Gl.findFiberByHostInstance||uM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wd.isDisabled&&wd.supportsFiber)try{Xf=wd.inject(fM),fs=wd}catch{}}qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hM;qn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ux(t))throw Error(Z(200));return cM(e,t,null,n)};qn.createRoot=function(e,t){if(!ux(e))throw Error(Z(299));var n=!1,r="",s=MA;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ox(e,1,!1,null,null,n,!1,r,s),e[Bs]=t.current,eu(e.nodeType===8?e.parentNode:e),new cx(t)};qn.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=iT(t),e=e===null?null:e.stateNode,e};qn.flushSync=function(e){return Va(e)};qn.hydrate=function(e,t,n){if(!hp(t))throw Error(Z(200));return fp(null,e,t,!0,n)};qn.hydrateRoot=function(e,t,n){if(!ux(e))throw Error(Z(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=MA;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=LA(t,null,e,1,n??null,s,!1,i,a),e[Bs]=t.current,eu(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new dp(t)};qn.render=function(e,t,n){if(!hp(t))throw Error(Z(200));return fp(null,e,t,!1,n)};qn.unmountComponentAtNode=function(e){if(!hp(e))throw Error(Z(40));return e._reactRootContainer?(Va(function(){fp(null,null,e,!1,function(){e._reactRootContainer=null,e[Bs]=null})}),!0):!1};qn.unstable_batchedUpdates=rx;qn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!hp(n))throw Error(Z(200));if(e==null||e._reactInternals===void 0)throw Error(Z(38));return fp(e,t,n,!1,r)};qn.version="18.3.1-next-f1338f8080-20240426";function $A(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($A)}catch(e){console.error(e)}}$A(),$C.exports=qn;var zu=$C.exports;const FA=Qi(zu);var zA,e1=zu;zA=e1.createRoot,e1.hydrateRoot;var pM=typeof Element<"u",mM=typeof Map=="function",gM=typeof Set=="function",yM=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function dh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!dh(e[r],t[r]))return!1;return!0}var i;if(mM&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!dh(r.value[1],t.get(r.value[0])))return!1;return!0}if(gM&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(yM&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(pM&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!dh(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var vM=function(t,n){try{return dh(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const xM=Qi(vM);var wM=function(e,t,n,r,s,i,a,o){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,a,o],u=0;l=new Error(t.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},bM=wM;const t1=Qi(bM);var _M=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;
41if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<a.length;c++){var u=a[c];if(!l(u))return!1;var d=t[u],p=n[u];if(i=r?r.call(s,d,p,u):void 0,i===!1||i===void 0&&d!==p)return!1}return!0};const kM=Qi(_M);var BA=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(BA||{}),Tm={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},n1=Object.values(BA),pp={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},VA=Object.entries(pp).reduce((e,[t,n])=>(e[n]=t,e),{}),Lr="data-rh",Wo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},qo=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},SM=e=>{let t=qo(e,"title");const n=qo(e,Wo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=qo(e,Wo.DEFAULT_TITLE);return t||r||void 0},EM=e=>qo(e,Wo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Am=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),CM=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const o=s[i].toLowerCase();if(e.indexOf(o)!==-1&&r[o])return n.concat(r)}}return n},[]),TM=e=>console&&typeof console.warn=="function"&&console.warn(e),Kl=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&TM(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const a={};i.filter(l=>{let c;const u=Object.keys(l);for(let p=0;p<u.length;p+=1){const f=u[p],v=f.toLowerCase();t.indexOf(v)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(v==="rel"&&l[v].toLowerCase()==="stylesheet")&&(c=v),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(c=f)}if(!c||!l[c])return!1;const d=l[c].toLowerCase();return r[c]||(r[c]={}),a[c]||(a[c]={}),r[c][d]?!1:(a[c][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const o=Object.keys(a);for(let l=0;l<o.length;l+=1){const c=o[l],u={...r[c],...a[c]};r[c]=u}return s},[]).reverse()},AM=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},PM=e=>({baseTag:CM(["href"],e),bodyAttributes:Am("bodyAttributes",e),defer:qo(e,Wo.DEFER),encode:qo(e,Wo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Am("htmlAttributes",e),linkTags:Kl("link",["rel","href"],e),metaTags:Kl("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Kl("noscript",["innerHTML"],e),onChangeClientState:EM(e),scriptTags:Kl("script",["src","innerHTML"],e),styleTags:Kl("style",["cssText"],e),title:SM(e),titleAttributes:Am("titleAttributes",e),prioritizeSeoTags:AM(e,Wo.PRIORITIZE_SEO_TAGS)}),UA=e=>Array.isArray(e)?e.join(""):e,jM=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Pm=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(jM(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},r1=(e,t)=>({...e,[t]:void 0}),NM=["noscript","script","style"],Ry=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),HA=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),RM=(e,t,n,r)=>{const s=HA(n),i=UA(t);return s?`<${e} ${Lr}="true" ${s}>${Ry(i,r)}</${e}>`:`<${e} ${Lr}="true">${Ry(i,r)}</${e}>`},OM=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,a=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const d=typeof i[u]>"u"?u:`${u}="${Ry(i[u],n)}"`;return c?`${c} ${d}`:d},""),o=i.innerHTML||i.cssText||"",l=NM.indexOf(e)===-1;return`${r}<${e} ${Lr}="true" ${a}${l?"/>":`>${o}</${e}>`}`},""),WA=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=pp[r];return n[s||r]=e[r],n},t),IM=(e,t,n)=>{const r={key:t,[Lr]:!0},s=WA(n,r);return[z.createElement("title",s,t)]},hh=(e,t)=>t.map((n,r)=>{const s={key:r,[Lr]:!0};
41return Object.keys(n).forEach(i=>{const o=pp[i]||i;if(o==="innerHTML"||o==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[o]=n[i]}),z.createElement(e,s)}),er=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>IM(e,t.title,t.titleAttributes),toString:()=>RM(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>WA(t),toString:()=>HA(t)};default:return{toComponent:()=>hh(e,t),toString:()=>OM(e,t,n)}}},DM=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Pm(e,Tm.meta),i=Pm(t,Tm.link),a=Pm(n,Tm.script);return{priorityMethods:{toComponent:()=>[...hh("meta",s.priority),...hh("link",i.priority),...hh("script",a.priority)],toString:()=>`${er("meta",s.priority,r)} ${er("link",i.priority,r)} ${er("script",a.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:a.default}},LM=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:a,title:o="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:u,metaTags:d,scriptTags:p}=e,f={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:f,linkTags:u,metaTags:d,scriptTags:p}=DM(e)),{priority:f,base:er("base",t,r),bodyAttributes:er("bodyAttributes",n,r),htmlAttributes:er("htmlAttributes",s,r),link:er("link",u,r),meta:er("meta",d,r),noscript:er("noscript",i,r),script:er("script",p,r),style:er("style",a,r),title:er("title",{title:o,titleAttributes:l},r)}},Oy=LM,bd=[],dx=!!(typeof window<"u"&&window.document&&window.document.createElement),Iy=class{constructor(e,t){Cs(this,"instances",[]);Cs(this,"canUseDOM",dx);Cs(this,"context");Cs(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?bd:this.instances,add:e=>{(this.canUseDOM?bd:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?bd:this.instances).indexOf(e);(this.canUseDOM?bd:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Oy({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},MM=parseInt(z.version.split(".")[0],10),Dy=MM>=19,$M={},qA=z.createContext($M),Ta,ZA=(Ta=class extends b.Component{constructor(n){super(n);Cs(this,"helmetData");Dy?this.helmetData=null:this.helmetData=new Iy(this.props.context||{},Ta.canUseDOM)}render(){return Dy?z.createElement(z.Fragment,null,this.props.children):z.createElement(qA.Provider,{value:this.helmetData.value},this.props.children)}},Cs(Ta,"canUseDOM",dx),Ta),eo=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Lr}]`),s=[].slice.call(r),i=[];let a;return t&&t.length&&t.forEach(o=>{const l=document.createElement(e);for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c))if(c==="innerHTML")l.innerHTML=o.innerHTML;else if(c==="cssText"){const u=o.cssText;l.appendChild(document.createTextNode(u))}else{const u=c,d=typeof o[u]>"u"?"":o[u];l.setAttribute(c,d)}l.setAttribute(Lr,"true"),s.some((c,u)=>(a=u,l.isEqualNode(c)))?s.splice(a,1):i.push(l)}),s.forEach(o=>{var l;return(l=o.parentNode)==null?void 0:l.removeChild(o)}
41),i.forEach(o=>n.appendChild(o)),{oldTags:s,newTags:i}},Ly=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Lr),s=r?r.split(","):[],i=[...s],a=Object.keys(t);for(const o of a){const l=t[o]||"";n.getAttribute(o)!==l&&n.setAttribute(o,l),s.indexOf(o)===-1&&s.push(o);const c=i.indexOf(o);c!==-1&&i.splice(c,1)}for(let o=i.length-1;o>=0;o-=1)n.removeAttribute(i[o]);s.length===i.length?n.removeAttribute(Lr):n.getAttribute(Lr)!==a.join(",")&&n.setAttribute(Lr,a.join(","))},FM=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=UA(e)),Ly("title",t)},s1=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:a,noscriptTags:o,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:p}=e;Ly("body",r),Ly("html",s),FM(d,p);const f={baseTag:eo("base",n),linkTags:eo("link",i),metaTags:eo("meta",a),noscriptTags:eo("noscript",o),scriptTags:eo("script",c),styleTags:eo("style",u)},v={},x={};Object.keys(f).forEach(w=>{const{newTags:g,oldTags:y}=f[w];g.length&&(v[w]=g),y.length&&(x[w]=f[w].oldTags)}),t&&t(),l(e,v,x)},Yl=null,zM=e=>{Yl&&cancelAnimationFrame(Yl),e.defer?Yl=requestAnimationFrame(()=>{s1(e,()=>{Yl=null})}):(s1(e),Yl=null)},BM=zM,i1=class extends b.Component{constructor(){super(...arguments);Cs(this,"rendered",!1)}shouldComponentUpdate(t){return!kM(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=PM(t.get().map(i=>{const{context:a,...o}=i.props;return o}));ZA.canUseDOM?BM(s):Oy&&(r=Oy(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},fh=[],a1=e=>{const t={};for(const n of Object.keys(e))t[VA[n]||n]=e[n];return t},aa=e=>{const t={};for(const n of Object.keys(e)){const r=pp[n];t[r||n]=e[n]}return t},o1=(e,t)=>{if(!dx)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],a=Object.keys(t);for(const o of i)a.includes(o)||n.removeAttribute(o);for(const o of a){const l=t[o];l==null||l===!1?n.removeAttribute(o):l===!0?n.setAttribute(o,""):n.setAttribute(o,String(l))}a.length>0?n.setAttribute(r,a.join(",")):n.removeAttribute(r)},jm=()=>{const e={},t={};for(const n of fh){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,a1(r)),s&&Object.assign(t,a1(s))}o1("html",e),o1("body",t)},VM=class extends b.Component{componentDidMount(){fh.push(this),jm()}componentDidUpdate(){jm()}componentWillUnmount(){const e=fh.indexOf(this);e!==-1&&fh.splice(e,1),jm()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return z.createElement("title",aa(t),e)}renderBase(){const{base:e}=this.props;return e?z.createElement("base",aa(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>z.createElement("meta",{key:n,...aa(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>z.createElement("link",{key:n,...aa(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=aa(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),z.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=aa(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),z.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=aa(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),z.createElement("noscript",{key:n,...i})})}render(){return z.createElement(z.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Fg,GA=(Fg=class extends b.Component{shouldComponentUpdate(e){return!xM(r1(this.props,"helmetData"),r1(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
41warnOnInvalidChildren(e,t){return t1(n1.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${n1.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),t1(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return z.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,a=Object.keys(i).reduce((l,c)=>(l[VA[c]||c]=i[c],l),{});let{type:o}=r;switch(typeof o=="symbol"?o=o.toString():this.warnOnInvalidChildren(r,s),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,a,s);break;default:t=this.mapObjectTypeChildren(r,t,a,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Iy)){const s=r;r=new Iy(s.context,!0),delete n.helmetData}return Dy?z.createElement(VM,{...n}):r?z.createElement(i1,{...n,context:r.value}):z.createElement(qA.Consumer,null,s=>z.createElement(i1,{...n,context:s}))}},Cs(Fg,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Fg);const UM="modulepreload",HM=function(e){return"/"+e},l1={},ve=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=HM(l),l in l1)return;l1[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":UM,c||(d.as="script"),d.crossOrigin="",d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((p,f)=>{d.addEventListener("load",p),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};var mp=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(){}},gp=typeof window>"u"||"Deno"in globalThis;function Tr(){}function WM(e,t){return typeof e=="function"?e(t):e}function qM(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function My(e,t){return typeof e=="function"?e(t):e}function GM(e,t){return typeof e=="function"?e(t):e}function c1(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==hx(a,t.options))return!1}else if(!uu(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||i&&!i(t))}function u1(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(cu(t.options.mutationKey)!==cu(i))return!1}else if(!uu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function hx(e,t){return((t==null?void 0:t.queryKeyHashFn)||cu)(e)}function cu(e){return JSON.stringify(e,(t,n)=>$y(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function uu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>uu(e[n],t[n])):!1}function KA(e,t){if(e===t)return e;const n=d1(e)&&d1(t);
vendor: 4,310 bytes, line 41
41if(n||$y(e)&&$y(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),a=i.length,o=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<a;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,c++):(o[d]=KA(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&c++)}return s===a&&c===s?e:o}return t}function d1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $y(e){if(!h1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!h1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function h1(e){return Object.prototype.toString.call(e)==="[object Object]"}function KM(e){return new Promise(t=>{setTimeout(t,e)})}function YM(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?KA(e,t):t}function JM(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QM(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fx=Symbol();function YA(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Aa,wi,Xo,xC,XM=(xC=class extends mp{constructor(){super();Le(this,Aa);Le(this,wi);Le(this,Xo);Te(this,Xo,t=>{if(!gp&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){H(this,wi)||this.setEventListener(H(this,Xo))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,wi))==null||t.call(this),Te(this,wi,void 0))}setEventListener(t){var n;Te(this,Xo,t),(n=H(this,wi))==null||n.call(this),Te(this,wi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){H(this,Aa)!==t&&(Te(this,Aa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof H(this,Aa)=="boolean"?H(this,Aa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Aa=new WeakMap,wi=new WeakMap,Xo=new WeakMap,xC),JA=new XM,el,bi,tl,wC,e4=(wC=class extends mp{constructor(){super();Le(this,el,!0);Le(this,bi);Le(this,tl);Te(this,tl,t=>{if(!gp&&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(){H(this,bi)||this.setEventListener(H(this,tl))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,bi))==null||t.call(this),Te(this,bi,void 0))}setEventListener(t){var n;Te(this,tl,t),(n=H(this,bi))==null||n.call(this),Te(this,bi,t(this.setOnline.bind(this)))}setOnline(t){H(this,el)!==t&&(Te(this,el,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return H(this,el)}},el=new WeakMap,bi=new WeakMap,tl=new WeakMap,wC),af=new e4;function t4(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function n4(e){return Math.min(1e3*2**e,3e4)}function QA(e){return(e??"online")==="online"?af.isOnline():!0}var XA=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Nm(e){return e instanceof XA}function eP(e){let t=!1,n=0,r=!1,s;const i=t4(),a=x=>{var w;r||(p(new XA(x)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},l=()=>{t=!1},c=()=>JA.isFocused()&&(e.networkMode==="always"||af.isOnline())&&e.canRun(),u=()=>QA(e.networkMode)&&e.canRun(),d=x=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,x),s==null||s(),i.resolve(x))},p=x=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,x),s==null||s(),i.reject(x))},f=()=>new Promise(x=>{var w;s=g=>{(r||c())&&x(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;s=void 0,r||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(r)return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(d).catch(g=>{var S;if(r)return;const y=e.retry??(gp?0:3),m=e.retryDelay??n4,_=typeof m=="function"?m(n,g):m,k=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,g);
41if(t||!k){p(g);return}n++,(S=e.onFail)==null||S.call(e,n,g),KM(_).then(()=>c()?void 0:f()).then(()=>{t?p(g):v()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:o,continueRetry:l,canStart:u,start:()=>(u()?v():f().then(v),i)}}var r4=e=>setTimeout(e,0);function s4(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=r4;const i=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var un=s4(),Pa,bC,tP=(bC=class{constructor(){Le(this,Pa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qM(this.gcTime)&&Te(this,Pa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gp?1/0:5*60*1e3))}clearGcTimeout(){H(this,Pa)&&(clearTimeout(H(this,Pa)),Te(this,Pa,void 0))}},Pa=new WeakMap,bC),nl,ja,tr,Na,Xt,Ou,Ra,Pr,js,_C,i4=(_C=class extends tP{constructor(t){super();Le(this,Pr);Le(this,nl);Le(this,ja);Le(this,tr);Le(this,Na);Le(this,Xt);Le(this,Ou);Le(this,Ra);Te(this,Ra,!1),Te(this,Ou,t.defaultOptions),this.setOptions(t.options),this.observers=[],Te(this,Na,t.client),Te(this,tr,H(this,Na).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Te(this,nl,o4(this.options)),this.state=t.state??H(this,nl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=H(this,Xt))==null?void 0:t.promise}setOptions(t){this.options={...H(this,Ou),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&H(this,tr).remove(this)}setData(t,n){const r=YM(this.state.data,t,this.options);return Yt(this,Pr,js).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Yt(this,Pr,js).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=H(this,Xt))==null?void 0:r.promise;return(s=H(this,Xt))==null||s.cancel(t),n?n.then(Tr).catch(Tr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(H(this,nl))}isActive(){return this.observers.some(t=>GM(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>My(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:!ZM(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Xt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Xt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),H(this,tr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(H(this,Xt)&&(H(this,Ra)?H(this,Xt).cancel({revert:!0}):H(this,Xt).cancelRetry()),this.scheduleGc()),H(this,tr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Yt(this,Pr,js).call(this,{type:"invalidate"})}
vendor: 4,428 bytes, line 41
41fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(H(this,Xt))return H(this,Xt).continueRetry(),H(this,Xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Te(this,Ra,!0),r.signal)})},i=()=>{const p=YA(this.options,n),v=(()=>{const x={client:H(this,Na),queryKey:this.queryKey,meta:this.meta};return s(x),x})();return Te(this,Ra,!1),this.options.persister?this.options.persister(p,v,this):p(v)},o=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:H(this,Na),state:this.state,fetchFn:i};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(o,this),Te(this,ja,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Yt(this,Pr,js).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=p=>{var f,v,x,w;Nm(p)&&p.silent||Yt(this,Pr,js).call(this,{type:"error",error:p}),Nm(p)||((v=(f=H(this,tr).config).onError)==null||v.call(f,p,this),(w=(x=H(this,tr).config).onSettled)==null||w.call(x,this.state.data,p,this)),this.scheduleGc()};return Te(this,Xt,eP({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var f,v,x,w;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(g){l(g);return}(v=(f=H(this,tr).config).onSuccess)==null||v.call(f,p,this),(w=(x=H(this,tr).config).onSettled)==null||w.call(x,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,f)=>{Yt(this,Pr,js).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Yt(this,Pr,js).call(this,{type:"pause"})},onContinue:()=>{Yt(this,Pr,js).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),H(this,Xt).start()}},nl=new WeakMap,ja=new WeakMap,tr=new WeakMap,Na=new WeakMap,Xt=new WeakMap,Ou=new WeakMap,Ra=new WeakMap,Pr=new WeakSet,js=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,...a4(r.data,this.options),fetchMeta:t.meta??null};case"success":return Te(this,ja,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Nm(s)&&s.revert&&H(this,ja)?{...H(this,ja),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),un.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),H(this,tr).notify({query:this,type:"updated",action:t})})},_C);function a4(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function o4(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 rs,kC,l4=(kC=class extends mp{constructor(t={}){super();Le(this,rs);this.config=t,Te(this,rs,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??hx(s,n);let a=this.get(i);return a||(a=new i4({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){H(this,rs).has(t.queryHash)||(H(this,rs).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=H(this,rs).get(t.queryHash);n&&(t.destroy(),n===t&&H(this,rs).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){un.batch(()=>
41{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return H(this,rs).get(t)}getAll(){return[...H(this,rs).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>c1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>c1(t,r)):n}notify(t){un.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){un.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){un.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},rs=new WeakMap,kC),ss,on,Oa,is,ai,SC,c4=(SC=class extends tP{constructor(t){super();Le(this,is);Le(this,ss);Le(this,on);Le(this,Oa);this.mutationId=t.mutationId,Te(this,on,t.mutationCache),Te(this,ss,[]),this.state=t.state||u4(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){H(this,ss).includes(t)||(H(this,ss).push(t),this.clearGcTimeout(),H(this,on).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Te(this,ss,H(this,ss).filter(n=>n!==t)),this.scheduleGc(),H(this,on).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){H(this,ss).length||(this.state.status==="pending"?this.scheduleGc():H(this,on).remove(this))}continue(){var t;return((t=H(this,Oa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,l,c,u,d,p,f,v,x,w,g,y,m,_,k,S,E,P;const n=()=>{Yt(this,is,ai).call(this,{type:"continue"})};Te(this,Oa,eP({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,R)=>{Yt(this,is,ai).call(this,{type:"failed",failureCount:j,error:R})},onPause:()=>{Yt(this,is,ai).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>H(this,on).canRun(this)}));const r=this.state.status==="pending",s=!H(this,Oa).canStart();try{if(r)n();else{Yt(this,is,ai).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(i=H(this,on).config).onMutate)==null?void 0:a.call(i,t,this));const R=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));R!==this.state.context&&Yt(this,is,ai).call(this,{type:"pending",context:R,variables:t,isPaused:s})}const j=await H(this,Oa).start();return await((u=(c=H(this,on).config).onSuccess)==null?void 0:u.call(c,j,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,j,t,this.state.context)),await((v=(f=H(this,on).config).onSettled)==null?void 0:v.call(f,j,null,this.state.variables,this.state.context,this)),await((w=(x=this.options).onSettled)==null?void 0:w.call(x,j,null,t,this.state.context)),Yt(this,is,ai).call(this,{type:"success",data:j}),j}catch(j){try{throw await((y=(g=H(this,on).config).onError)==null?void 0:y.call(g,j,t,this.state.context,this)),await((_=(m=this.options).onError)==null?void 0:_.call(m,j,t,this.state.context)),await((S=(k=H(this,on).config).onSettled)==null?void 0:S.call(k,void 0,j,this.state.variables,this.state.context,this)),await((P=(E=this.options).onSettled)==null?void 0:P.call(E,void 0,j,t,this.state.context)),j}finally{Yt(this,is,ai).call(this,{type:"error",error:j})}}finally{H(this,on).runNext(this)}}},ss=new WeakMap,on=new WeakMap,Oa=new WeakMap,is=new WeakSet,ai=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),un.batch(()=>{H(this,ss).forEach(r=>{r.onMutationUpdate(t)}),H(this,on).notify({mutation:this,type:"updated",action:t})})},SC);function u4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ds,jr,Iu,EC,d4=(EC=class extends mp{constructor(t={}){super();Le(this,Ds);Le(this,jr);Le(this,Iu);this.config=t,Te(this,Ds,new Set),Te(this,jr,new Map),Te(this,Iu,0)}build(t,n,r){const s=new c4({mutationCache:this,mutationId:++rd(this,Iu)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){H(this,Ds).add(t);const n=_d(t);if(typeof n=="string"){const r=H(this,jr).get(n);r?r.push(t):H(this,jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(H(this,Ds).delete(t)){const n=_d(t);if(typeof n=="string"){const r=H(this,jr).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&H(this,jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_d(t);if(typeof n=="string"){const r=H(this,jr).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=_d(t);if(typeof n=="string"){const s=(r=H(this,jr).get(n))==null?void 0:r.find(i=>
vendor: 4,094 bytes, line 41
41i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){un.batch(()=>{H(this,Ds).forEach(t=>{this.notify({type:"removed",mutation:t})}),H(this,Ds).clear(),H(this,jr).clear()})}getAll(){return Array.from(H(this,Ds))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>u1(n,r))}findAll(t={}){return this.getAll().filter(n=>u1(t,n))}notify(t){un.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return un.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tr))))}},Ds=new WeakMap,jr=new WeakMap,Iu=new WeakMap,EC);function _d(e){var t;return(t=e.options.scope)==null?void 0:t.id}function f1(e){return{onFetch:(t,n)=>{var u,d,p,f,v;const r=t.options,s=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const w=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},g=YA(t.options,t.fetchOptions),y=async(m,_,k)=>{if(x)return Promise.reject();if(_==null&&m.pages.length)return Promise.resolve(m);const E=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return w(M),M})(),P=await g(E),{maxPages:j}=t.options,R=k?QM:JM;return{pages:R(m.pages,P,j),pageParams:R(m.pageParams,_,j)}};if(s&&i.length){const m=s==="backward",_=m?h4:p1,k={pages:i,pageParams:a},S=_(r,k);o=await y(k,S,m)}else{const m=e??i.length;do{const _=l===0?a[0]??r.initialPageParam:p1(r,o);if(l>0&&_==null)break;o=await y(o,_),l++}while(l<m)}return o};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function p1(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 h4(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 vt,_i,ki,rl,sl,Si,il,al,CC,f4=(CC=class{constructor(e={}){Le(this,vt);Le(this,_i);Le(this,ki);Le(this,rl);Le(this,sl);Le(this,Si);Le(this,il);Le(this,al);Te(this,vt,e.queryCache||new l4),Te(this,_i,e.mutationCache||new d4),Te(this,ki,e.defaultOptions||{}),Te(this,rl,new Map),Te(this,sl,new Map),Te(this,Si,0)}mount(){rd(this,Si)._++,H(this,Si)===1&&(Te(this,il,JA.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,vt).onFocus())})),Te(this,al,af.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,vt).onOnline())})))}unmount(){var e,t;rd(this,Si)._--,H(this,Si)===0&&((e=H(this,il))==null||e.call(this),Te(this,il,void 0),(t=H(this,al))==null||t.call(this),Te(this,al,void 0))}isFetching(e){return H(this,vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return H(this,_i).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,vt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=H(this,vt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(My(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return H(this,vt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=H(this,vt).get(r.queryHash),i=s==null?void 0:s.state.data,a=WM(t,i);if(a!==void 0)return H(this,vt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return un.batch(()=>H(this,vt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,vt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=H(this,vt);un.batch(()=>
41{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=H(this,vt);return un.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=un.batch(()=>H(this,vt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Tr).catch(Tr)}invalidateQueries(e,t={}){return un.batch(()=>(H(this,vt).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=un.batch(()=>H(this,vt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Tr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Tr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=H(this,vt).build(this,t);return n.isStaleByTime(My(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tr).catch(Tr)}fetchInfiniteQuery(e){return e.behavior=f1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tr).catch(Tr)}ensureInfiniteQueryData(e){return e.behavior=f1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return af.isOnline()?H(this,_i).resumePausedMutations():Promise.resolve()}getQueryCache(){return H(this,vt)}getMutationCache(){return H(this,_i)}getDefaultOptions(){return H(this,ki)}setDefaultOptions(e){Te(this,ki,e)}setQueryDefaults(e,t){H(this,rl).set(cu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...H(this,rl).values()],n={};return t.forEach(r=>{uu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){H(this,sl).set(cu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...H(this,sl).values()],n={};return t.forEach(r=>{uu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...H(this,ki).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hx(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===fx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...H(this,ki).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){H(this,vt).clear(),H(this,_i).clear()}},vt=new WeakMap,_i=new WeakMap,ki=new WeakMap,rl=new WeakMap,sl=new WeakMap,Si=new WeakMap,il=new WeakMap,al=new WeakMap,CC),p4=b.createContext(void 0),m4=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(p4.Provider,{value:e,children:t}));/**
42 * @remix-run/router v1.23.0
43 *
44 * Copyright (c) Remix Software Inc.
45 *
46 * This source code is licensed under the MIT license found in the
47 * LICENSE.md file in the root directory of this source tree.
48 *
49 * @license MIT
50 */function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},du.apply(this,arguments)}var Ti;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ti||(Ti={}));const m1="popstate";function g4(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:o}=r.location;return Fy("",{pathname:i,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:of(s)}return v4(t,n,null,e)}function ft(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nP(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function y4(){return Math.random().toString(36).substr(2,8)}function g1(e,t){return{usr:e.state,key:e.key,idx:t}}function Fy(e,t,n,r){return n===void 0&&(n=null),du({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Al(t):t,{state:n,key:t&&t.key||r||y4()})}function of(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Al(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function v4(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,o=Ti.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(du({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){o=Ti.Pop;let w=u(),g=w==null?null:w-c;c=w,l&&l({action:o,location:x.location,delta:g})}function p(w,g){o=Ti.Push;let y=Fy(x.location,w,g);c=u()+1;let m=g1(y,c),_=x.createHref(y);try{a.pushState(m,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(_)}i&&l&&l({action:o,location:x.location,delta:1})}function f(w,g){o=Ti.Replace;let y=Fy(x.location,w,g);c=u();let m=g1(y,c),_=x.createHref(y);a.replaceState(m,"",_),i&&l&&l({action:o,location:x.location,delta:0})}function v(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof w=="string"?w:of(w);return y=y.replace(/ $/,"%20"),ft(g,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,g)}let x={get action(){return o},get location(){return e(s,a)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(m1,d),l=w,()=>{s.removeEventListener(m1,d),l=null}},createHref(w){return t(s,w)},createURL:v,encodeLocation(w){let g=v(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:f,go(w){return a.go(w)}};return x}var y1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(y1||(y1={}));function x4(e,t,n){return n===void 0&&(n="/"),w4(e,t,n,!1)}function w4(e,t,n,r){let s=typeof t=="string"?Al(t):t,i=pl(s.pathname||"/",n);if(i==null)return null;let a=rP(e);b4(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let c=R4(i);o=j4(a[l],c,r)}return o}function rP(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,o)=>{let l={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(ft(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
50id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Mi([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(ft(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),rP(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:A4(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let l of sP(i.path))s(i,a,l)}),t}function sP(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=sP(r.join("/")),o=[];return o.push(...a.map(l=>l===""?i:[i,l].join("/"))),s&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function b4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:P4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _4=/^:[\w-]+$/,k4=3,S4=2,E4=1,C4=10,T4=-2,v1=e=>e==="*";function A4(e,t){let n=e.split("/"),r=n.length;return n.some(v1)&&(r+=T4),t&&(r+=S4),n.filter(s=>!v1(s)).reduce((s,i)=>s+(_4.test(i)?k4:i===""?E4:C4),r)}function P4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function j4(e,t,n){let{routesMeta:r}=e,s={},i="/",a=[];for(let o=0;o<r.length;++o){let l=r[o],c=o===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",d=lf({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=lf({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 5,850 bytes, lines 50-59
50Object.assign(s,d.params),a.push({params:s,pathname:Mi([i,d.pathname]),pathnameBase:L4(Mi([i,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(i=Mi([i,d.pathnameBase]))}return a}function lf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=N4(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:p,isOptional:f}=u;if(p==="*"){let x=o[d]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const v=o[d];return f&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function N4(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nP(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function R4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return nP(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function pl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function O4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Al(e):e;return{pathname:n?n.startsWith("/")?n:I4(n,t):t,search:M4(r),hash:$4(s)}}function I4(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Rm(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 D4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function px(e,t){let n=D4(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function mx(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Al(e):(s=du({},e),ft(!s.pathname||!s.pathname.includes("?"),Rm("?","pathname","search",s)),ft(!s.pathname||!s.pathname.includes("#"),Rm("#","pathname","hash",s)),ft(!s.search||!s.search.includes("#"),Rm("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;s.pathname=p.join("/")}o=d>=0?t[d]:"/"}let l=O4(s,o),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Mi=e=>e.join("/").replace(/\/\/+/g,"/"),L4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),M4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function F4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const iP=["post","put","patch","delete"];new Set(iP);const z4=["get",...iP];new Set(z4);/**
51 * React Router v6.30.1
52 *
53 * Copyright (c) Remix Software Inc.
54 *
55 * This source code is licensed under the MIT license found in the
56 * LICENSE.md file in the root directory of this source tree.
57 *
58 * @license MIT
59 */function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hu.apply(this,arguments)}const yp=b.createContext(null),aP=b.createContext(null),Ks=b.createContext(null),vp=b.createContext(null),bs=b.createContext({outlet:null,matches:[],isDataRoute:!1}),oP=b.createContext(null);function B4(e,t){let{relative:n}=t===void 0?{}:t;Pl()||ft(!1);let{basename:r,navigator:s}=b.useContext(Ks),{hash:i,pathname:a,search:o}=xp(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:Mi([r,a])),s.createHref({pathname:l,search:o,hash:i})}function Pl(){return b.useContext(vp)!=null}function hr(){return Pl()||ft(!1),b.useContext(vp).location}function lP(e){b.useContext(Ks).static||b.useLayoutEffect(e)}function cP(){let{isDataRoute:e}=b.useContext(bs);return e?n5():V4()}function V4(){Pl()||ft(!1);let e=b.useContext(yp),{basename:t,future:n,navigator:r}=b.useContext(Ks),{matches:s}=b.useContext(bs),{pathname:i}=hr(),a=JSON.stringify(px(s,n.v7_relativeSplatPath)),o=b.useRef(!1);return lP(()=>{o.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let d=mx(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Mi([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}const U4=b.createContext(null);function H4(e){let t=b.useContext(bs).outlet;return t&&b.createElement(U4.Provider,{value:e},t)}function Dae(){let{matches:e}=b.useContext(bs),t=e[e.length-1];return t?t.params:{}}function xp(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Ks),{matches:s}=b.useContext(bs),{pathname:i}=hr(),a=JSON.stringify(px(s,r.v7_relativeSplatPath));return b.useMemo(()=>mx(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function W4(e,t){return q4(e,t)}
vendor: 3,773 bytes, line 59
59function q4(e,t,n,r){Pl()||ft(!1);let{navigator:s}=b.useContext(Ks),{matches:i}=b.useContext(bs),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=hr(),u;if(t){var d;let w=typeof t=="string"?Al(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||ft(!1),u=w}else u=c;let p=u.pathname||"/",f=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let v=x4(e,{pathname:f}),x=J4(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Mi([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Mi([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&x?b.createElement(vp.Provider,{value:{location:hu({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ti.Pop}},x):x}function Z4(){let e=t5(),t=F4(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const G4=b.createElement(Z4,null);class K4 extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(bs.Provider,{value:this.props.routeContext},b.createElement(oP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Y4(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(yp);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(bs.Provider,{value:t},r)}function J4(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let u=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);u>=0||ft(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<a.length;u++){let d=a[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:p,errors:f}=n,v=d.route.loader&&p[d.route.id]===void 0&&(!f||f[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,p)=>{let f,v=!1,x=null,w=null;n&&(f=o&&d.route.id?o[d.route.id]:void 0,x=d.route.errorElement||G4,l&&(c<0&&p===0?(v=!0,w=null):c===p&&(v=!0,w=d.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,p+1)),y=()=>{let m;return f?m=x:v?m=w:d.route.Component?m=b.createElement(d.route.Component,null):d.route.element?m=d.route.element:m=u,b.createElement(Y4,{match:d,routeContext:{outlet:u,matches:g,isDataRoute:n!=null},children:m})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?b.createElement(K4,{location:n.location,revalidation:n.revalidation,component:x,error:f,children:y(),routeC
59ontext:{outlet:null,matches:g,isDataRoute:!0}}):y()},null)}var uP=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uP||{}),cf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(cf||{});function Q4(e){let t=b.useContext(yp);return t||ft(!1),t}function X4(e){let t=b.useContext(aP);return t||ft(!1),t}function e5(e){let t=b.useContext(bs);return t||ft(!1),t}function dP(e){let t=e5(),n=t.matches[t.matches.length-1];return n.route.id||ft(!1),n.route.id}function t5(){var e;let t=b.useContext(oP),n=X4(cf.UseRouteError),r=dP(cf.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function n5(){let{router:e}=Q4(uP.UseNavigateStable),t=dP(cf.UseNavigateStable),n=b.useRef(!1);return lP(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,hu({fromRouteId:t},i)))},[e,t])}function r5(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Lae(e){let{to:t,replace:n,state:r,relative:s}=e;Pl()||ft(!1);let{future:i,static:a}=b.useContext(Ks),{matches:o}=b.useContext(bs),{pathname:l}=hr(),c=cP(),u=mx(t,px(o,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(u);return b.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function Mae(e){return H4(e.context)}function ge(e){ft(!1)}function s5(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ti.Pop,navigator:i,static:a=!1,future:o}=e;Pl()&&ft(!1);let l=t.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:a,future:hu({v7_relativeSplatPath:!1},o)}),[l,o,i,a]);typeof r=="string"&&(r=Al(r));let{pathname:u="/",search:d="",hash:p="",state:f=null,key:v="default"}=r,x=b.useMemo(()=>{let w=pl(u,l);return w==null?null:{location:{pathname:w,search:d,hash:p,state:f,key:v},navigationType:s}},[l,u,d,p,f,v,s]);return x==null?null:b.createElement(Ks.Provider,{value:c},b.createElement(vp.Provider,{children:n,value:x}))}function i5(e){let{children:t,location:n}=e;return W4(zy(t),n)}new Promise(()=>{});function zy(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,s)=>{if(!b.isValidElement(r))return;let i=[...t,s];if(r.type===b.Fragment){n.push.apply(n,zy(r.props.children,i));return}r.type!==ge&&ft(!1),!r.props.index||!r.props.children||ft(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=zy(r.props.children,i)),n.push(a)}),n}/**
60 * React Router DOM v6.30.1
61 *
62 * Copyright (c) Remix Software Inc.
63 *
64 * This source code is licensed under the MIT license found in the
65 * LICENSE.md file in the root directory of this source tree.
66 *
67 * @license MIT
68 */function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uf.apply(this,arguments)}function hP(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function a5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function o5(e,t){return e.button===0&&(!t||t==="_self")&&!a5(e)}const l5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],c5=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],u5="6";try{window.__reactRouterVersion=u5}catch{}const d5=b.createContext({isTransitioning:!1}),h5="startTransition",x1=w0[h5];function f5(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=g4({window:s,v5Compat:!0}));let a=i.current,[o,l]=b.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=b.useCallback(d=>{c&&x1?x1(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>a.listen(u),[a,u]),b.useEffect(()=>r5(r),[r]),b.createElement(s5,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const p5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",m5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ze=b.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:o,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,p=hP(t,l5),{basename:f}=b.useContext(Ks),v,x=!1;if(typeof c=="string"&&m5.test(c)&&(v=c,p5))try{let m=new URL(window.location.href),_=c.startsWith("//")?new URL(m.protocol+c):new URL(c),k=pl(_.pathname,f);_.origin===m.origin&&k!=null?c=k+_.search+_.hash:x=!0}catch{}let w=B4(c,{relative:s}),g=y5(c,{replace:a,state:o,target:l,preventScrollReset:u,relative:s,viewTransition:d});function y(m){r&&r(m),m.defaultPrevented||g(m)}return b.createElement("a",uf({},p,{href:v||w,onClick:x||i?r:y,ref:n,target:l}))}),$ae=b.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:a=!1,style:o,to:l,viewTransition:c,children:u}=t,d=hP(t,c5),p=xp(l,{relative:d.relative}),f=hr(),v=b.useContext(aP),{navigator:x,basename:w}=b.useContext(Ks),g=v!=null&&v5(p)&&c===!0,y=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,m=f.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(m=m.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase()),_&&w&&(_=pl(_,w)||_);const k=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=m===y||!a&&m.startsWith(y)&&m.charAt(k)==="/",E=_!=null&&(_===y||!a&&_.startsWith(y)&&_.charAt(y.length)==="/"),P={isActive:S,isPending:E,isTransitioning:g},j=S?r:void 0,R;typeof i=="function"?R=i(P):R=[i,S?"active":null,E?"pending":null,g?"transitioning":null].filter(
68Boolean).join(" ");let M=typeof o=="function"?o(P):o;return b.createElement(ze,uf({},d,{"aria-current":j,className:R,ref:n,style:M,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});var By;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(By||(By={}));var w1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(w1||(w1={}));function g5(e){let t=b.useContext(yp);return t||ft(!1),t}function y5(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:o}=t===void 0?{}:t,l=cP(),c=hr(),u=xp(e,{relative:a});return b.useCallback(d=>{if(o5(d,n)){d.preventDefault();let p=r!==void 0?r:of(c)===of(u);l(e,{replace:p,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[c,l,u,r,s,n,e,i,a,o])}function v5(e,t){t===void 0&&(t={});let n=b.useContext(d5);n==null&&ft(!1);let{basename:r}=g5(By.useViewTransitionState),s=xp(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=pl(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=pl(n.nextLocation.pathname,r)||n.nextLocation.pathname;return lf(s.pathname,a)!=null||lf(s.pathname,i)!=null}var b1=["light","dark"],x5="(prefers-color-scheme: dark)",w5=b.createContext(void 0),b5={setTheme:e=>{},themes:[]},_5=()=>{var e;return(e=b.useContext(w5))!=null?e:b5};b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:a,attrs:o,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?b1.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(v,x=!1,w=!0)=>{let g=a?a[v]:v,y=x?v+"|| ''":`'${g}'`,m="";return s&&w&&!x&&b1.includes(v)&&(m+=`d.style.colorScheme = '${v}';`),n==="class"?x||g?m+=`c.add(${y})`:m+="null":g&&(m+=`d[s](n,${y})`),m},f=e?`!function(){${u}${p(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${x5}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}${c?"":"else{"+p(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${p(a?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:f}})});var k5=e=>{switch(e){case"success":return C5;case"info":return A5;case"warning":return T5;case"error":return P5;default:return null}},S5=Array(12).fill(0),E5=({visible:e,className:t})=>z.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},z.createElement("div",{className:"sonner-spinner"},S5.map((n,r)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),C5=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),T5=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.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"})),A5=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),P5=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.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"})),j5=z.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"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N5=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let n=()=>{t(document.hidden)};
68return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Vy=1,R5=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Vy++,i=this.toasts.find(o=>o.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(o=>o.id===s?(this.publish({...o,...e,id:s,title:n}),{...o,...e,id:s,dismissible:a,title:n}):o):this.addToast({title:n,...r,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
68this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,a=r.then(async l=>{if(i=["resolve",l],z.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(I5(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),o=()=>new Promise((l,c)=>a.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Vy++;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}},kn=new R5,O5=(e,t)=>{let n=(t==null?void 0:t.id)||Vy++;return kn.addToast({title:e,...t,id:n}),n},I5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",D5=O5,L5=()=>kn.toasts,M5=()=>kn.getActiveToasts(),jc=Object.assign(D5,{success:kn.success,info:kn.info,warning:kn.warning,error:kn.error,custom:kn.custom,message:kn.message,promise:kn.promise,dismiss:kn.dismiss,loading:kn.loading},{getHistory:L5,getToasts:M5});function $5(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))}$5(`: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;
68left: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}
68: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%);
68--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%)}
69`);function kd(e){return e.label!==void 0}var F5=3,z5="32px",B5="16px",_1=4e3,V5=356,U5=14,H5=20,W5=200;function xr(...e){return e.filter(Boolean).join(" ")}function q5(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Z5=e=>{var t,n,r,s,i,a,o,l,c,u,d;let{invert:p,toast:f,unstyled:v,interacting:x,setHeights:w,visibleToasts:g,heights:y,index:m,toasts:_,expanded:k,removeToast:S,defaultRichColors:E,closeButton:P,style:j,cancelButtonStyle:R,actionButtonStyle:M,className:O="",descriptionClassName:W="",duration:F,position:q,gap:K,loadingIcon:re,expandByDefault:D,classNames:$,icons:C,closeButtonAriaLabel:le="Close toast",pauseWhenPageIsHidden:oe}=e,[T,L]=z.useState(null),[_e,ie]=z.useState(null),[ye,gt]=z.useState(!1),[bt,Lt]=z.useState(!1),[rn,pr]=z.useState(!1),[Gn,ks]=z.useState(!1),[Ss,Es]=z.useState(!1),[Js,Qs]=z.useState(0),[Kn,A]=z.useState(0),I=z.useRef(f.duration||F||_1),B=z.useRef(null),te=z.useRef(null),ee=m===0,J=m+1<=g,N=f.type,U=f.dismissible!==!1,se=f.className||"",we=f.descriptionClassName||"",Ne=z.useMemo(()=>y.findIndex(Ce=>Ce.toastId===f.id)||0,[y,f.id]),yt=z.useMemo(()=>{var Ce;return(Ce=f.closeButton)!=null?Ce:P},[f.closeButton,P]),Yn=z.useMemo(()=>f.duration||F||_1,[f.duration,F]),Bt=z.useRef(0),Kt=z.useRef(0),qr=z.useRef(0),ct=z.useRef(null),[Zr,vn]=q.split("-"),Uw=z.useMemo(()=>y.reduce((Ce,Ue,st)=>st>=Ne?Ce:Ce+Ue.height,0),[y,Ne]),Hw=N5(),$I=f.invert||p,Xp=N==="loading";Kt.current=z.useMemo(()=>Ne*K+Uw,[Ne,Uw]),z.useEffect(()=>{I.current=Yn},[Yn]),z.useEffect(()=>{gt(!0)},[]),z.useEffect(()=>{let Ce=te.current;if(Ce){let Ue=Ce.getBoundingClientRect().height;return A(Ue),w(st=>[{toastId:f.id,height:Ue,position:f.position},...st]),()=>w(st=>st.filter(mr=>mr.toastId!==f.id))}},[w,f.id]),z.useLayoutEffect(()=>{if(!ye)return;let Ce=te.current,Ue=Ce.style.height;Ce.style.height="auto";let st=Ce.getBoundingClientRect().height;Ce.style.height=Ue,A(st),w(mr=>mr.find(gr=>gr.toastId===f.id)?mr.map(gr=>gr.toastId===f.id?{...gr,height:st}:gr):[{toastId:f.id,height:st,position:f.position},...mr])},[ye,f.title,f.description,w,f.id]);let Xs=z.useCallback(()=>{Lt(!0),Qs(Kt.current),w(Ce=>Ce.filter(Ue=>Ue.toastId!==f.id)),setTimeout(()=>{S(f)},W5)},[f,S,w,Kt]);z.useEffect(()=>{if(f.promise&&N==="loading"||f.duration===1/0||f.type==="loading")return;let Ce;return k||x||oe&&Hw?(()=>{if(qr.current<Bt.current){let Ue=new Date().getTime()-Bt.current;I.current=I.current-Ue}
69qr.current=new Date().getTime()})():I.current!==1/0&&(Bt.current=new Date().getTime(),Ce=setTimeout(()=>{var Ue;(Ue=f.onAutoClose)==null||Ue.call(f,f),Xs()},I.current)),()=>clearTimeout(Ce)},[k,x,f,N,oe,Hw,Xs]),z.useEffect(()=>{f.delete&&Xs()},[Xs,f.delete]);function FI(){var Ce,Ue,st;return C!=null&&C.loading?z.createElement("div",{className:xr($==null?void 0:$.loader,(Ce=f==null?void 0:f.classNames)==null?void 0:Ce.loader,"sonner-loader"),"data-visible":N==="loading"},C.loading):re?z.createElement("div",{className:xr($==null?void 0:$.loader,(Ue=f==null?void 0:f.classNames)==null?void 0:Ue.loader,"sonner-loader"),"data-visible":N==="loading"},re):z.createElement(E5,{className:xr($==null?void 0:$.loader,(st=f==null?void 0:f.classNames)==null?void 0:st.loader),visible:N==="loading"})}return z.createElement("li",{tabIndex:0,ref:te,className:xr(O,se,$==null?void 0:$.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[N],(n=f==null?void 0:f.classNames)==null?void 0:n[N]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:E,"data-styled":!(f.jsx||f.unstyled||v),"data-mounted":ye,"data-promise":!!f.promise,"data-swiped":Ss,"data-removed":bt,"data-visible":J,"data-y-position":Zr,"data-x-position":vn,"data-index":m,"data-front":ee,"data-swiping":rn,"data-dismissible":U,"data-type":N,"data-invert":$I,"data-swipe-out":Gn,"data-swipe-direction":_e,"data-expanded":!!(k||D&&ye),style:{"--index":m,"--toasts-before":m,"--z-index":_.length-m,"--offset":`${bt?Js:Kt.current}px`,"--initial-height":D?"auto":`${Kn}px`,...j,...f.style},onDragEnd:()=>{pr(!1),L(null),ct.current=null},onPointerDown:Ce=>{Xp||!U||(B.current=new Date,Qs(Kt.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(pr(!0),ct.current={x:Ce.clientX,y:Ce.clientY}))},onPointerUp:()=>{var Ce,Ue,st,mr;if(Gn||!U)return;ct.current=null;let gr=Number(((Ce=te.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ei=Number(((Ue=te.current)==null?void 0:Ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ia=new Date().getTime()-((st=B.current)==null?void 0:st.getTime()),yr=T==="x"?gr:ei,ti=Math.abs(yr)/ia;if(Math.abs(yr)>=H5||ti>.11){Qs(Kt.current),(mr=f.onDismiss)==null||mr.call(f,f),ie(T==="x"?gr>0?"right":"left":ei>0?"down":"up"),Xs(),ks(!0),Es(!1);return}pr(!1),L(null)},onPointerMove:Ce=>{var Ue,st,mr,gr;if(!ct.current||!U||((Ue=window.getSelection())==null?void 0:Ue.toString().length)>0)return;let ei=Ce.clientY-ct.current.y,ia=Ce.clientX-ct.current.x,yr=(st=e.swipeDirections)!=null?st:q5(q);!T&&(Math.abs(ia)>1||Math.abs(ei)>1)&&L(Math.abs(ia)>Math.abs(ei)?"x":"y");let ti={x:0,y:0};T==="y"?(yr.includes("top")||yr.includes("bottom"))&&(yr.includes("top")&&ei<0||yr.includes("bottom")&&ei>0)&&(ti.y=ei):T==="x"&&(yr.includes("left")||yr.includes("right"))&&(yr.includes("left")&&ia<0||yr.includes("right")&&ia>0)&&(ti.x=ia),(Math.abs(ti.x)>0||Math.abs(ti.y)>0)&&Es(!0),(mr=te.current)==null||mr.style.setProperty("--swipe-amount-x",`${ti.x}px`),(gr=te.current)==null||gr.style.setProperty("--swipe-amount-y",`${ti.y}px`)}},yt&&!f.jsx?z.createElement("button",{"aria-label":le,"data-disabled":Xp,"data-close-button":!0,onClick:Xp||!U?()=>{}:()=>{var Ce;Xs(),(Ce=f.onDismiss)==null||Ce.call(f,f)},className:xr($==null?void 0:$.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=C==null?void 0:C.close)!=null?i:j5):null,f.jsx||b.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:z.createElement(z.Fragment,null,N||f.icon||f.promise?z.createElement("div",{"data-icon":"",className:xr($==null?void 0:$.icon,(a=f==null?void 0:f.classNames)==null?void 0:a.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||FI():null,f.type!=="loading"?f.icon||(C==null?void 0:C[N])||k5(N):null):null,z.createElement("div",{"data-content":"",className:xr($==null?void 0:$.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},z.createElement("div",{"data-title":"",className:xr($==null?void 0:$.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?z.createElement("div",{"data-description":"",className:xr(W,we,$==null?void 0:$.description,(c=f==null?void 0:f.classNames)==null?void 0:c.description)},typeof f.description=="function"?f.description():f.description):null),b.isValidElement(f.cancel)?f.cancel:f.cancel&&kd(f.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:Ce=>{var Ue,st;kd(f.cancel)&&U&&((st=(Ue=f.cancel).onClick)==null||st.call(Ue,Ce),Xs())},className:xr($==null?void 0:$.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,b.isValidElement(f.action)?f.action:f.action&&kd(f.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:Ce=>{var Ue,st;kd(f.action)&&((st=(Ue=f.action).onClick)==null||st.call(Ue,Ce),!Ce.defaultPrevented&&Xs())},className:xr($==null?void 0:$.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function k1(){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 G5(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,a=i?"--mobile-offset":"--offset",o=i?B5:z5;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${a}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${a}-${c}`]=o:n[`${a}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(o)}),n}var K5=b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:p,style:f,visibleToasts:v=F5,toastOptions:x,dir:w=k1(),gap:g=U5,loadingIcon:y,icons:m,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=e,[S,E]=z.useState([]),P=z.useMemo(()=>Array.from(new Set([r].concat(S.filter(oe=>oe.position).map(oe=>oe.position)))),[S,r]),[j,R]=z.useState([]),[M,O]=z.useState(!1),[W,F]=z.useState(!1),[q,K]=z.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
69k":"light"),re=z.useRef(null),D=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=z.useRef(null),C=z.useRef(!1),le=z.useCallback(oe=>{E(T=>{var L;return(L=T.find(_e=>_e.id===oe.id))!=null&&L.delete||kn.dismiss(oe.id),T.filter(({id:_e})=>_e!==oe.id)})},[]);return z.useEffect(()=>kn.subscribe(oe=>{if(oe.dismiss){E(T=>T.map(L=>L.id===oe.id?{...L,delete:!0}:L));return}setTimeout(()=>{FA.flushSync(()=>{E(T=>{let L=T.findIndex(_e=>_e.id===oe.id);return L!==-1?[...T.slice(0,L),{...T[L],...oe},...T.slice(L+1)]:[oe,...T]})})})}),[]),z.useEffect(()=>{if(u!=="system"){K(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:T})=>{K(T?"dark":"light")})}catch{oe.addListener(({matches:L})=>{try{K(L?"dark":"light")}catch(_e){console.error(_e)}})}},[u]),z.useEffect(()=>{S.length<=1&&O(!1)},[S]),z.useEffect(()=>{let oe=T=>{var L,_e;s.every(ie=>T[ie]||T.code===ie)&&(O(!0),(L=re.current)==null||L.focus()),T.code==="Escape"&&(document.activeElement===re.current||(_e=re.current)!=null&&_e.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[s]),z.useEffect(()=>{if(re.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,C.current=!1)}},[re.current]),z.createElement("section",{ref:t,"aria-label":`${_} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((oe,T)=>{var L;let[_e,ie]=oe.split("-");return S.length?z.createElement("ol",{key:oe,dir:w==="auto"?k1():w,tabIndex:-1,ref:re,className:o,"data-sonner-toaster":!0,"data-theme":q,"data-y-position":_e,"data-lifted":M&&S.length>1&&!i,"data-x-position":ie,style:{"--front-toast-height":`${((L=j[0])==null?void 0:L.height)||0}px`,"--width":`${V5}px`,"--gap":`${g}px`,...f,...G5(l,c)},onBlur:ye=>{C.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(C.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||C.current||(C.current=!0,$.current=ye.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{W||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},S.filter(ye=>!ye.position&&T===0||ye.position===oe).map((ye,gt)=>{var bt,Lt;return z.createElement(Z5,{key:ye.id,icons:m,index:gt,toast:ye,defaultRichColors:d,duration:(bt=x==null?void 0:x.duration)!=null?bt:p,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Lt=x==null?void 0:x.closeButton)!=null?Lt:a,interacting:W,position:oe,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:le,toasts:S.filter(rn=>rn.position==ye.position),heights:j.filter(rn=>rn.position==ye.position),setHeights:R,expandByDefault:i,gap:g,loadingIcon:y,expanded:M,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const Y5=({...e})=>{const{theme:t="system"}=_5();return h.jsx(K5,{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})},J5=1,Q5=1e6;let Om=0;function X5(){return Om=(Om+1)%Number.MAX_SAFE_INTEGER,Om.toString()}const Im=new Map,S1=e=>{if(Im.has(e))return;const t=setTimeout(()=>{Im.delete(e),Nc({type:"REMOVE_TOAST",toastId:e})},Q5);Im.set(e,t)},e$=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,J5)};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;
69return n?S1(n):e.toasts.forEach(r=>{S1(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)}}},ph=[];let mh={toasts:[]};function Nc(e){mh=e$(mh,e),ph.forEach(t=>{t(mh)})}function t$({...e}){const t=X5(),n=s=>Nc({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Nc({type:"DISMISS_TOAST",toastId:t});return Nc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function n$(){const[e,t]=b.useState(mh);return b.useEffect(()=>(ph.push(t),()=>{const n=ph.indexOf(t);n>-1&&ph.splice(n,1)}),[e]),{...e,toast:t$,dismiss:n=>Nc({type:"DISMISS_TOAST",toastId:n})}}function at(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function E1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fP(...e){return t=>{let n=!1;const r=e.map(s=>{const i=E1(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():E1(e[s],null)}}}}function mn(...e){return b.useCallback(fP(...e),e)}function r$(e,t){const n=b.createContext(t),r=i=>{const{children:a,...o}=i,l=b.useMemo(()=>o,Object.values(o));return h.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function s(i){const a=b.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function Bu(e,t=[]){let n=[];function r(i,a){const o=b.createContext(a),l=n.length;n=[...n,a];const c=d=>{var g;const{scope:p,children:f,...v}=d,x=((g=p==null?void 0:p[e])==null?void 0:g[l])||o,w=b.useMemo(()=>v,Object.values(v));return h.jsx(x.Provider,{value:w,children:f})};c.displayName=i+"Provider";function u(d,p){var x;const f=((x=p==null?void 0:p[e])==null?void 0:x[l])||o,v=b.useContext(f);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(a=>b.createContext(a));return function(o){const l=(o==null?void 0:o[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return s.scopeName=e,[r,s$(s,...t)]}function s$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...o,...d}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function df(e){const t=i$(e),n=b.forwardRef((r,s)=>{const{children:i,...a}=r,o=b.Children.toArray(i),l=o.find(o$);if(l){const c=l.props.children,u=o.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return h.jsx(t,{...a,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return h.jsx(t,{...a,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}function i$(e){const t=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const a=c$(s),o=l$(i,s.props);return s.type!==b.Fragment&&(o.ref=r?fP(r,a):a),b.cloneElement(s,o)}return b.Children.count(s)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pP=Symbol("radix.slottable");function a$(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pP,t}function o$(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pP}function l$(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{const l=i(...o);return s(...o),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function c$(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function u$(e){const t=e+"CollectionProvider",[n,r]=Bu(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:w,children:g}=x,y=z.useRef(null),m=z.useRef(new Map).current;return h.jsx(s,{scope:w,itemMap:m,collectionRef:y,children:g})};a.displayName=t;const o=e+"CollectionSlot",l=df(o),c=z.forwardRef((x,w)=>{const{scope:g,children:y}=x,m=i(o,g),_=mn(w,m.collectionRef);return h.jsx(l,{ref:_,children:y})});c.displayName=o;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=df(u),f=z.forwardRef((x,w)=>{const{scope:g,children:y,...m}=x,_=z.useRef(null),k=mn(w,_),S=i(u,g);return z.useEffect(()=>(S.itemMap.set(_,{ref:_,...m}),()=>void S.itemMap.delete(_))),h.jsx(p,{[d]:"",ref:k,children:y})});f.displayName=u;function v(x){const w=i(e+"CollectionConsumer",x);return z.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const m=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((S,E)=>m.indexOf(S.ref.current)-m.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},v,r]}var d$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nt=d$.reduce((e,t)=>
vendor: 5,363 bytes, line 69
69{const n=df(`Primitive.${t}`),r=b.forwardRef((s,i)=>{const{asChild:a,...o}=s,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mP(e,t){e&&zu.flushSync(()=>e.dispatchEvent(t))}function gs(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function h$(e,t=globalThis==null?void 0:globalThis.document){const n=gs(e);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var f$="DismissableLayer",Uy="dismissableLayer.update",p$="dismissableLayer.pointerDownOutside",m$="dismissableLayer.focusOutside",C1,gP=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wp=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...l}=e,c=b.useContext(gP),[u,d]=b.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=b.useState({}),v=mn(t,E=>d(E)),x=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=x.indexOf(w),y=u?x.indexOf(u):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,_=y>=g,k=y$(E=>{const P=E.target,j=[...c.branches].some(R=>R.contains(P));!_||j||(s==null||s(E),a==null||a(E),E.defaultPrevented||o==null||o())},p),S=v$(E=>{const P=E.target;[...c.branches].some(R=>R.contains(P))||(i==null||i(E),a==null||a(E),E.defaultPrevented||o==null||o())},p);return h$(E=>{y===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&o&&(E.preventDefault(),o()))},p),b.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(C1=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),T1(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=C1)}},[u,p,n,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),T1())},[u,c]),b.useEffect(()=>{const E=()=>f({});return document.addEventListener(Uy,E),()=>document.removeEventListener(Uy,E)},[]),h.jsx(Nt.div,{...l,ref:v,style:{pointerEvents:m?_?"auto":"none":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,S.onFocusCapture),onBlurCapture:at(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,k.onPointerDownCapture)})});wp.displayName=f$;var g$="DismissableLayerBranch",yP=b.forwardRef((e,t)=>{const n=b.useContext(gP),r=b.useRef(null),s=mn(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsx(Nt.div,{...e,ref:s})});yP.displayName=g$;function y$(e,t=globalThis==null?void 0:globalThis.document){const n=gs(e),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let l=function(){vP(p$,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function v$(e,t=globalThis==null?void 0:globalThis.document){const n=gs(e),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&vP(m$,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function T1(){const e=new CustomEvent(Uy);document.dispatchEvent(e)}function vP(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?mP(s,i):s.dispatchEvent(i)}var x$=wp,w$=yP,Hs=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},b$="Portal",gx=b.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[s,i]=b.useState(!1);Hs(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?FA.createPortal(h.jsx(Nt.div,{...r,ref:t}),a):null});gx.displayName=b$;function _$(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var jl=e=>{const{present:t,children:n}=e,r=k$(t),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=mn(r.ref,S$(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}):null};jl.displayName="Presence";function k$(e){const[t,n]=b.useState(),r=b.useRef(null),s=b.useRef(e),i=b.useRef("none"),a=e?"mounted":"unmounted",[o,l]=_$(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Sd(r.current);i.current=o==="mounted"?c:"none"},[o]),Hs(()=>{const c=r.current,u=s.current;if(u!==e){const p=i.current,f=Sd(c);e?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Hs(()=>
69{if(t){let c;const u=t.ownerDocument.defaultView??window,d=f=>{const x=Sd(r.current).includes(f.animationName);if(f.target===t&&x&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},p=f=>{f.target===t&&(i.current=Sd(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:b.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Sd(e){return(e==null?void 0:e.animationName)||"none"}function S$(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var E$=w0[" useInsertionEffect ".trim().toString()]||Hs;function xP({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,a]=C$({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:s;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const d=u.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"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.`),u.current=o},[o,r])}const c=b.useCallback(u=>{var d;if(o){const p=T$(u)?u(e):u;p!==e&&((d=a.current)==null||d.call(a,p))}else i(u)},[o,e,i,a]);return[l,c]}function C$({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),s=b.useRef(n),i=b.useRef(t);return E$(()=>{i.current=t},[t]),b.useEffect(()=>{var a;s.current!==n&&((a=i.current)==null||a.call(i,n),s.current=n)},[n,s]),[n,r,i]}function T$(e){return typeof e=="function"}var A$=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"}),P$="VisuallyHidden",bp=b.forwardRef((e,t)=>h.jsx(Nt.span,{...e,ref:t,style:{...A$,...e.style}}));bp.displayName=P$;var j$=bp,yx="ToastProvider",[vx,N$,R$]=u$("Toast"),[wP,Fae]=Bu("Toast",[R$]),[O$,_p]=wP(yx),bP=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=e,[o,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),p=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${yx}\`. Expected non-empty \`string\`.`),h.jsx(vx.Provider,{scope:t,children:h.jsx(O$,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:o,onViewportChange:l,onToastAdd:b.useCallback(()=>u(f=>f+1),[]),onToastRemove:b.useCallback(()=>u(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:a})})};bP.displayName=yx;var _P="ToastViewport",I$=["F8"],Hy="toast.viewportPause",Wy="toast.viewportResume",kP=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=I$,label:s="Notifications ({hotkey})",...i}=e,a=_p(_P,n),o=N$(n),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),p=mn(t,d,a.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=a.toastCount>0;b.useEffect(()=>{const w=g=>{var m;r.length!==0&&r.every(_=>g[_]||g.code===_)&&((m=d.current)==null||m.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),b.useEffect(()=>{const w=l.current,g=d.current;if(v&&w&&g){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(Hy);g.dispatchEvent(S),a.isClosePausedRef.current=!0}},m=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(Wy);g.dispatchEvent(S),a.isClosePausedRef.current=!1}},_=S=>{!w.contains(S.relatedTarget)&&m()},k=()=>{w.contains(document.activeElement)||m()};return w.addEventListener("focusin",y),w.addEventListener("focusout",_),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",k),window.addEventListener("blur",y),window.addEventListener("focus",m),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",k),window.removeEventListener("blur",y),window.removeEventListener("focus",m)}}},[v,a.isClosePausedRef]);const x=b.useCallback(({tabbingDirection:w})=>{const y=o().map(m=>{const _=m.ref.current,k=[_,...Z$(_)];return w==="forwards"?k:k.reverse()});return(w==="forwards"?y.reverse():y).flat()},[o]);return b.useEffect(()=>{const w=d.current;if(w){const g=y=>{var k,S,E;const m=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!m){const P=document.activeElement,j=y.shiftKey;if(y.target===w&&j){(k=c.current)==null||k.focus();return}const O=x({tabbingDirection:j?"backwards":"forwards"}),W=O.findIndex(F=>F===P);Dm(O.slice(W+1))?y.preventDefault():j?(S=c.current)==null||S.focus():(E=u.current)==null||E.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[o,x]),h.jsxs(w$,{ref:l,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&h.jsx(qy,{ref:c,onFocusFromOutsideViewport:()=>{const w=x({tabbingDirection:"forwards"});Dm(w)}}),h.jsx(vx.Slot,{scope:n,children:h.jsx(Nt.ol,{tabIndex:-1,...i,ref:p})}),v&&h.jsx(qy,{ref:u,onFocusFromOutsideViewport:()=>{const w=x({tabbingDirection:"backwards"});Dm(w)}})]})});kP.displayName=_P;var SP="ToastFocusProxy",qy=b.forwardRef((e,t)=>
69{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=_p(SP,n);return h.jsx(bp,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const o=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(o))&&r()}})});qy.displayName=SP;var Vu="Toast",D$="toast.swipeStart",L$="toast.swipeMove",M$="toast.swipeCancel",$$="toast.swipeEnd",EP=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=e,[o,l]=xP({prop:r,defaultProp:s??!0,onChange:i,caller:Vu});return h.jsx(jl,{present:n||o,children:h.jsx(B$,{open:o,...a,ref:t,onClose:()=>l(!1),onPause:gs(e.onPause),onResume:gs(e.onResume),onSwipeStart:at(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:at(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:at(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:at(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});EP.displayName=Vu;var[F$,z$]=wP(Vu,{onClose(){}}),B$=b.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:o,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:f,...v}=e,x=_p(Vu,n),[w,g]=b.useState(null),y=mn(t,F=>g(F)),m=b.useRef(null),_=b.useRef(null),k=s||x.duration,S=b.useRef(0),E=b.useRef(k),P=b.useRef(0),{onToastAdd:j,onToastRemove:R}=x,M=gs(()=>{var q;(w==null?void 0:w.contains(document.activeElement))&&((q=x.viewport)==null||q.focus()),a()}),O=b.useCallback(F=>{!F||F===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout(M,F))},[M]);b.useEffect(()=>{const F=x.viewport;if(F){const q=()=>{O(E.current),c==null||c()},K=()=>{const re=new Date().getTime()-S.current;E.current=E.current-re,window.clearTimeout(P.current),l==null||l()};return F.addEventListener(Hy,K),F.addEventListener(Wy,q),()=>{F.removeEventListener(Hy,K),F.removeEventListener(Wy,q)}}},[x.viewport,k,l,c,O]),b.useEffect(()=>{i&&!x.isClosePausedRef.current&&O(k)},[i,k,x.isClosePausedRef,O]),b.useEffect(()=>(j(),()=>R()),[j,R]);const W=b.useMemo(()=>w?RP(w):null,[w]);return x.viewport?h.jsxs(h.Fragment,{children:[W&&h.jsx(V$,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),h.jsx(F$,{scope:n,onClose:M,children:zu.createPortal(h.jsx(vx.ItemSlot,{scope:n,children:h.jsx(x$,{asChild:!0,onEscapeKeyDown:at(o,()=>{x.isFocusedToastEscapeKeyDownRef.current||M(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(Nt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":x.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:at(e.onKeyDown,F=>{F.key==="Escape"&&(o==null||o(F.nativeEvent),F.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:at(e.onPointerDown,F=>{F.button===0&&(m.current={x:F.clientX,y:F.clientY})}),onPointerMove:at(e.onPointerMove,F=>{if(!m.current)return;const q=F.clientX-m.current.x,K=F.clientY-m.current.y,re=!!_.current,D=["left","right"].includes(x.swipeDirection),$=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,C=D?$(0,q):0,le=D?0:$(0,K),oe=F.pointerType==="touch"?10:2,T={x:C,y:le},L={originalEvent:F,delta:T};re?(_.current=T,Ed(L$,d,L,{discrete:!1})):A1(T,x.swipeDirection,oe)?(_.current=T,Ed(D$,u,L,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(q)>oe||Math.abs(K)>oe)&&(m.current=null)}),onPointerUp:at(e.onPointerUp,F=>{const q=_.current,K=F.target;if(K.hasPointerCapture(F.pointerId)&&K.releasePointerCapture(F.pointerId),_.current=null,m.current=null,q){const re=F.currentTarget,D={originalEvent:F,delta:q};A1(q,x.swipeDirection,x.swipeThreshold)?Ed($$,f,D,{discrete:!0}):Ed(M$,p,D,{discrete:!0}),re.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),V$=e=>{const{__scopeToast:t,children:n,...r}=e,s=_p(Vu,t),[i,a]=b.useState(!1),[o,l]=b.useState(!1);return W$(()=>a(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),o?null:h.jsx(gx,{asChild:!0,children:h.jsx(bp,{...r,children:i&&h.jsxs(h.Fragment,{children:[s.label," ",n]})})})},U$="ToastTitle",CP=b.forwardRef((e,t)=>
vendor: 5,198 bytes, lines 69-94
69{const{__scopeToast:n,...r}=e;return h.jsx(Nt.div,{...r,ref:t})});CP.displayName=U$;var H$="ToastDescription",TP=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return h.jsx(Nt.div,{...r,ref:t})});TP.displayName=H$;var AP="ToastAction",PP=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?h.jsx(NP,{altText:n,asChild:!0,children:h.jsx(xx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${AP}\`. Expected non-empty \`string\`.`),null)});PP.displayName=AP;var jP="ToastClose",xx=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=z$(jP,n);return h.jsx(NP,{asChild:!0,children:h.jsx(Nt.button,{type:"button",...r,ref:t,onClick:at(e.onClick,s.onClose)})})});xx.displayName=jP;var NP=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return h.jsx(Nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function RP(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),q$(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...RP(r))}}),t}function Ed(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?mP(s,i):s.dispatchEvent(i)}var A1=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function W$(e=()=>{}){const t=gs(e);Hs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function q$(e){return e.nodeType===e.ELEMENT_NODE}function Z$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dm(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var G$=bP,OP=kP,IP=EP,DP=CP,LP=TP,MP=PP,$P=xx;function FP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=FP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zP(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=FP(e))&&(r&&(r+=" "),r+=t);return r}const P1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,j1=zP,K$=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return j1(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,a=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=P1(u)||P1(d);return s[c][p]}),o=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(v=>{let[x,w]=v;return Array.isArray(w)?w.includes({...i,...o}[x]):{...i,...o}[x]===w})?[...c,d,p]:c},[]);return j1(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
70 * @license lucide-react v0.462.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */const Y$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BP=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
75 * @license lucide-react v0.462.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */var J$={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"};/**
80 * @license lucide-react v0.462.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const Q$=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},l)=>b.createElement("svg",{ref:l,...J$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:BP("lucide",s),...o},[...a.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
85 * @license lucide-react v0.462.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const Se=(e,t)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(Q$,{ref:i,iconNode:t,className:BP(`lucide-${Y$(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
90 * @license lucide-react v0.462.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const X$=Se("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
94-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
95 * @license lucide-react v0.462.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const VP=Se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
100 * @license lucide-react v0.462.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const Un=Se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
105 * @license lucide-react v0.462.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const hf=Se("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
110 * @license lucide-react v0.462.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const eF=Se("Baby",[["path",{d:"M9 12h.01",key:"157uk2"}],["path",{d:"M15 12h.01",key:"1k8ypt"}],["path",{d:"M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5",key:"1u7htd"}],["path",{d:"M19 6.3a9 9 0 0 1 1.8 3.9 2 2 0 0 1 0 3.6 9 9 0 0 1-17.6 0 2 2 0 0 1 0-3.6A9 9 0 0 1 12 3c2 0 3.5 1.1 3.5 2.5s-.9 2.5-2 2.5c-.8 0-1.5-.4-1.5-1",key:"5yv0yz"}]]);/**
115 * @license lucide-react v0.462.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const tF=Se("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
120 * @license lucide-react v0.462.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const wx=Se("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
125 * @license lucide-react v0.462.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const nF=Se("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
130 * @license lucide-react v0.462.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const UP=Se("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
135 * @license lucide-react v0.462.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const kp=Se("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
140 * @license lucide-react v0.462.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const Zy=Se("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
145 * @license lucide-react v0.462.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const ff=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
150 * @license lucide-react v0.462.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const rF=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
155 * @license lucide-react v0.462.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const Lm=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
160 * @license lucide-react v0.462.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const sF=Se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
165 * @license lucide-react v0.462.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const iF=Se("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
170 * @license lucide-react v0.462.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const aF=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
175 * @license lucide-react v0.462.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const oF=Se("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
180 * @license lucide-react v0.462.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const lF=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
185 * @license lucide-react v0.462.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const HP=Se("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
190 * @license lucide-react v0.462.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const cF=Se("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
195 * @license lucide-react v0.462.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const uF=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
200 * @license lucide-react v0.462.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const WP=Se("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/**
205 * @license lucide-react v0.462.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const qP=Se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
210 * @license lucide-react v0.462.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const Uu=Se("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
215 * @license lucide-react v0.462.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const dF=Se("HeartHandshake",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]]);/**
220 * @license lucide-react v0.462.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const N1=Se("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
225 * @license lucide-react v0.462.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const hF=Se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
230 * @license lucide-react v0.462.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const ZP=Se("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
235 * @license lucide-react v0.462.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const fF=Se("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
240 * @license lucide-react v0.462.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const Sp=Se("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
245 * @license lucide-react v0.462.0 - ISC
246 *
247 * This source code is licensed under the ISC license.
248 * See the LICENSE file in the root directory of this source tree.
249 */const GP=Se("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
250 * @license lucide-react v0.462.0 - ISC
251 *
252 * This source code is licensed under the ISC license.
253 * See the LICENSE file in the root directory of this source tree.
254 */const KP=Se("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
255 * @license lucide-react v0.462.0 - ISC
256 *
257 * This source code is licensed under the ISC license.
258 * See the LICENSE file in the root directory of this source tree.
259 */const pF=Se("Plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.
2591-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);/**
260 * @license lucide-react v0.462.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */const mF=Se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
265 * @license lucide-react v0.462.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const gF=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
270 * @license lucide-react v0.462.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const yF=Se("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
275 * @license lucide-react v0.462.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const YP=Se("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
280 * @license lucide-react v0.462.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const Ep=Se("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
285 * @license lucide-react v0.462.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const Fs=Se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
290 * @license lucide-react v0.462.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const vF=Se("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
295 * @license lucide-react v0.462.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const xF=Se("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
300 * @license lucide-react v0.462.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const R1=Se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
305 * @license lucide-react v0.462.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const ds=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,203 bytes, lines 309-314
309],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
310 * @license lucide-react v0.462.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const gh=Se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),bx="-",wF=e=>{const t=_F(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(bx);return o[0]===""&&o.length!==1&&o.shift(),JP(o,t)||bF(a)},getConflictingClassGroupIds:(a,o)=>{const l=n[a]||[];return o&&r[a]?[...l,...r[a]]:l}}},JP=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?JP(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(bx);return(a=t.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},O1=/^\[(.+)\]$/,bF=e=>{if(O1.test(e)){const t=O1.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},_F=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return SF(Object.entries(e.classGroups),n).forEach(([i,a])=>{Gy(a,r,i,t)}),r},Gy=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:I1(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(kF(s)){Gy(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{Gy(a,I1(t,i),n,r)})})},I1=(e,t)=>{let n=e;return t.split(bx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},kF=e=>e.isThemeGetter,SF=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[t+a,o])):i);return[n,s]}):e,EF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},QP="!",CF=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,a=o=>{const l=[];let c=0,u=0,d;for(let w=0;w<o.length;w++){let g=o[w];if(c===0){if(g===s&&(r||o.slice(w,w+i)===t)){l.push(o.slice(u,w)),u=w+i;continue}if(g==="/"){d=w;continue}}g==="["?c++:g==="]"&&c--}const p=l.length===0?o:o.substring(u),f=p.startsWith(QP),v=f?p.substring(1):p,x=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:x}};return n?o=>n({className:o,parseClassName:a}):a},TF=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},AF=e=>({cache:EF(e.cacheSize),parseClassName:CF(e),...wF(e)}),PF=/\s+/,jF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],a=e.trim().split(PF);let o="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:f}=n(c);let v=!!f,x=r(v?p.substring(0,f):p);if(!x){if(!v){o=c+(o.length>0?" "+o:o);continue}if(x=r(p),!x){o=c+(o.length>0?" "+o:o);continue}v=!1}const w=TF(u).join(":"),g=d?w+QP:w,y=g+x;if(i.includes(y))continue;i.push(y);const m=s(x,v);for(let _=0;_<m.length;++_){const k=m[_];i.push(g+k)}o=c+(o.length>0?" "+o:o)}return o};function NF(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=XP(t))&&(r&&(r+=" "),r+=n);return r}const XP=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=XP(e[r]))&&(n&&(n+=" "),n+=t);return n};function RF(e,...t){let n,r,s,i=a;function a(l){const c=t.reduce((u,d)=>d(u),e());return n=AF(c),r=n.cache.get,s=n.cache.set,i=o,o(l)}function o(l){const c=r(l);if(c)return c;const u=jF(l,n);return s(l,u),u}return function(){return i(NF.apply(null,arguments))}}const Qe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},e2=/^\[(?:([a-z-]+):)?(.+)\]$/i,OF=/^\d+\/\d+$/,IF=new Set(["px","full","screen"]),DF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,MF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$F=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ts=e=>Zo(e)||IF.has(e)||OF.test(e),ri=e=>Nl(e,"length",ZF),Zo=e=>!!e&&!Number.isNaN(Number(e)),Mm=e=>Nl(e,"number",Zo),Jl=e=>!!e&&Number.isInteger(Number(e)),zF=e=>e.endsWith("%")&&Zo(e.slice(0,-1)),Ae=e=>e2.test(e),si=e=>DF.test(e),BF=new Set(["length","size","percentage"]),VF=e=>Nl(e,BF,t2),UF=e=>Nl(e,"position",t2),HF=new Set(["image","url"]),WF=e=>Nl(e,HF,KF),qF=e=>Nl(e,"",GF),Ql=()=>!0,Nl=(e,t,n)=>{const r=e2.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ZF=e=>LF.test(e)&&!MF.test(e),t2=()=>!1,GF=e=>$F.test(e),KF=e=>FF.test(e),YF=()=>{const e=Qe("colors"),t=Qe("spacing"),n=Qe("blur"),r=Qe("brightness"),s=Qe("borderColor"),i=Qe("borderRadius"),a=Qe("borderSpacing"),o=Qe("borderWidth"),l=Qe("
314contrast"),c=Qe("grayscale"),u=Qe("hueRotate"),d=Qe("invert"),p=Qe("gap"),f=Qe("gradientColorStops"),v=Qe("gradientColorStopPositions"),x=Qe("inset"),w=Qe("margin"),g=Qe("opacity"),y=Qe("padding"),m=Qe("saturate"),_=Qe("scale"),k=Qe("sepia"),S=Qe("skew"),E=Qe("space"),P=Qe("translate"),j=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Ae,t],O=()=>[Ae,t],W=()=>["",Ts,ri],F=()=>["auto",Zo,Ae],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",Ae],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[Zo,Ae];return{cacheSize:500,separator:":",theme:{colors:[Ql],spacing:[Ts,ri],blur:["none","",si,Ae],brightness:le(),borderColor:[e],borderRadius:["none","","full",si,Ae],borderSpacing:O(),borderWidth:W(),contrast:le(),grayscale:$(),hueRotate:le(),invert:$(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[zF,ri],inset:M(),margin:M(),opacity:le(),padding:O(),saturate:le(),scale:le(),sepia:$(),skew:le(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[si]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:[...q(),Ae]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jl,Ae]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Jl,Ae]}],"grid-cols":[{"grid-cols":[Ql]}],"col-start-end":[{col:["auto",{span:["full",Jl,Ae]},Ae]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[Ql]}],"row-start-end":[{row:["auto",{span:[Jl,Ae]},Ae]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,t]}],"min-w":[{"min-w":[Ae,t,"min","max","fit"]}],"max-w":[{"max-w":[Ae,t,"none","full","min","max","fit","prose",{screen:[si]},si]}],h:[{h:[Ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",si,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mm]}],"font-family":[{font:[Ql]}],"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",Ae]}],"line-clamp":[{"line-clamp":["none",Zo,Mm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ts,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ts,ri]}],"underline-offset":[{"underline-offset":["auto",Ts,Ae]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],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",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),UF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",VF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},WF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 4,889 bytes, line 314
314],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:K()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[Ts,Ae]}],"outline-w":[{outline:[Ts,ri]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Ts,ri]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",si,qF]}],"shadow-color":[{shadow:[Ql]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",si,Ae]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[m]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:le()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:le()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Jl,Ae]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],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",Ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
314],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ts,ri,Mm]}],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"]}}},JF=RF(YF);function Hr(...e){return JF(zP(e))}const QF=G$,n2=b.forwardRef(({className:e,...t},n)=>h.jsx(OP,{ref:n,className:Hr("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}));n2.displayName=OP.displayName;const XF=K$("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"}}),r2=b.forwardRef(({className:e,variant:t,...n},r)=>h.jsx(IP,{ref:r,className:Hr(XF({variant:t}),e),...n}));r2.displayName=IP.displayName;const e3=b.forwardRef(({className:e,...t},n)=>h.jsx(MP,{ref:n,className:Hr("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}));e3.displayName=MP.displayName;const s2=b.forwardRef(({className:e,...t},n)=>h.jsx($P,{ref:n,className:Hr("absolute right-2 top-2 rounded-md p-1 text-foreground
314/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:h.jsx(ds,{className:"h-4 w-4"})}));s2.displayName=$P.displayName;const i2=b.forwardRef(({className:e,...t},n)=>h.jsx(DP,{ref:n,className:Hr("text-sm font-semibold",e),...t}));i2.displayName=DP.displayName;const a2=b.forwardRef(({className:e,...t},n)=>h.jsx(LP,{ref:n,className:Hr("text-sm opacity-90",e),...t}));a2.displayName=LP.displayName;function t3(){const{toasts:e}=n$();return h.jsxs(QF,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return h.jsxs(r2,{...i,children:[h.jsxs("div",{className:"grid gap-1",children:[n&&h.jsx(i2,{children:n}),r&&h.jsx(a2,{children:r})]}),s,h.jsx(s2,{})]},t)}),h.jsx(n2,{})]})}var n3=w0[" useId ".trim().toString()]||(()=>{}),r3=0;function $m(e){const[t,n]=b.useState(n3());return Hs(()=>{n(r=>r??String(r3++))},[e]),t?`radix-${t}`:""}const s3=["top","right","bottom","left"],Vi=Math.min,Ln=Math.max,pf=Math.round,Cd=Math.floor,Ui=e=>({x:e,y:e}
vendor: 2,282 bytes, line 314
314),i3={left:"right",right:"left",bottom:"top",top:"bottom"},a3={start:"end",end:"start"};function Ky(e,t,n){return Ln(e,Vi(t,n))}function Ws(e,t){return typeof e=="function"?e(t):e}function qs(e){return e.split("-")[0]}function Rl(e){return e.split("-")[1]}function _x(e){return e==="x"?"y":"x"}function kx(e){return e==="y"?"height":"width"}function Hi(e){return["top","bottom"].includes(qs(e))?"y":"x"}function Sx(e){return _x(Hi(e))}function o3(e,t,n){n===void 0&&(n=!1);const r=Rl(e),s=Sx(e),i=kx(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=mf(a)),[a,mf(a)]}function l3(e){const t=mf(e);return[Yy(e),t,Yy(t)]}function Yy(e){return e.replace(/start|end/g,t=>a3[t])}function c3(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:a;default:return[]}}function u3(e,t,n,r){const s=Rl(e);let i=c3(qs(e),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),t&&(i=i.concat(i.map(Yy)))),i}function mf(e){return e.replace(/left|right|bottom|top/g,t=>i3[t])}function d3(e){return{top:0,right:0,bottom:0,left:0,...e}}function o2(e){return typeof e!="number"?d3(e):{top:e,right:e,bottom:e,left:e}}function gf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function D1(e,t,n){let{reference:r,floating:s}=e;const i=Hi(t),a=Sx(t),o=kx(a),l=qs(t),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,p=r[o]/2-s[o]/2;let f;switch(l){case"top":f={x:u,y:r.y-s.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-s.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Rl(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1);break}return f}const h3=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,o=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=D1(c,r,l),p=r,f={},v=0;for(let x=0;x<o.length;x++){const{name:w,fn:g}=o[x],{x:y,y:m,data:_,reset:k}=await g({x:u,y:d,initialPlacement:r,placement:p,strategy:s,middlewareData:f,re
vendor: 9,381 bytes, line 314
314cts:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=m??d,f={...f,[w]:{...f[w],..._}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(c=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:u,y:d}=D1(c,p,l)),x=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:f}};async function fu(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Ws(t,e),v=o2(f),w=o[p?d==="floating"?"reference":"floating":d],g=gf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,m=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),_=await(i.isElement==null?void 0:i.isElement(m))?await(i.getScale==null?void 0:i.getScale(m))||{x:1,y:1}:{x:1,y:1},k=gf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:m,strategy:l}):y);return{top:(g.top-k.top+v.top)/_.y,bottom:(k.bottom-g.bottom+v.bottom)/_.y,left:(g.left-k.left+v.left)/_.x,right:(k.right-g.right+v.right)/_.x}}const f3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:u=0}=Ws(e,t)||{};if(c==null)return{};const d=o2(u),p={x:n,y:r},f=Sx(s),v=kx(f),x=await a.getDimensions(c),w=f==="y",g=w?"top":"left",y=w?"bottom":"right",m=w?"clientHeight":"clientWidth",_=i.reference[v]+i.reference[f]-p[f]-i.floating[v],k=p[f]-i.reference[f],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=S?S[m]:0;(!E||!await(a.isElement==null?void 0:a.isElement(S)))&&(E=o.floating[m]||i.floating[v]);const P=_/2-k/2,j=E/2-x[v]/2-1,R=Vi(d[g],j),M=Vi(d[y],j),O=R,W=E-x[v]-M,F=E/2-x[v]/2+P,q=Ky(O,F,W),K=!l.arrow&&Rl(s)!=null&&F!==q&&i.reference[v]/2-(F<O?R:M)-x[v]/2<0,re=K?F<O?F-O:F-W:0;return{[f]:p[f]+re,data:{[f]:q,centerOffset:F-q-re,...K&&{alignmentOffset:re}},reset:K}}}),p3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,...w}=Ws(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=qs(s),y=Hi(o),m=qs(o)===o,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=p||(m||!x?[mf(o)]:l3(o)),S=v!=="none";!p&&S&&k.push(...u3(o,x,v,_));const E=[o,...k],P=await fu(t,w),j=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&j.push(P[g]),d){const F=o3(s,a,_);j.push(P[F[0]],P[F[1]])}if(R=[...R,{placement:s,overflows:j}],!j.every(F=>F<=0)){var M,O;const F=(((M=i.flip)==null?void 0:M.index)||0)+1,q=E[F];if(q)return{data:{index:F,overflows:R},reset:{placement:q}};let K=(O=R.filter(re=>re.overflows[0]<=0).sort((re,D)=>re.overflows[1]-D.overflows[1])[0])==null?void 0:O.placement;if(!K)switch(f){case"bestFit":{var W;const re=(W=R.filter(D=>{if(S){const $=Hi(D.placement);return $===y||$==="y"}return!0}).map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,C)=>$+C,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:W[0];re&&(K=re);break}case"initialPlacement":K=o;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function L1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M1(e){return s3.some(t=>e[t]>=0)}const m3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ws(e,t);switch(r){case"referenceHidden":{const i=await fu(t,{...s,elementContext:"reference"}),a=L1(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:M1(a)}}}case"escaped":{const i=await fu(t,{...s,altBoundary:!0}),a=L1(i,n.floating);return{data:{escapedOffsets:a,escaped:M1(a)}}}default:return{}}}}};async function g3(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=qs(n),o=Rl(n),l=Hi(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Ws(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof v=="number"&&(f=o==="end"?v*-1:v),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const y3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:a,middlewareData:o}=t,l=await g3(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:a}}}}},v3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:w=>{let{x:g,y}=w;return{x:g,y}}},...l}=Ws(e,t),c={x:n,y:r},u=await fu(t,l),d=Hi(qs(s)),p=_x(d);let f=c[p],v=c[d];if(i){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=f+u[w],m=f-u[g];f=Ky(y,f,m)}if(a){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=v+u[w],m=v-u[g];v=Ky(y,v,m)}const x=o.fn({...t,[p]:f,[d]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:i,[d]:a}}}}}},x3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Ws(e,t),u={x:n,y:r},d=Hi(s),p=_x(d);let f=u[p],v=u[d];const x=Ws(o,t),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const m=p==="y"?"height":"width",_=i.reference[p]-i.floating[m]+w.mainAxis,k=i.reference[p]+i.reference[m]-w.mainAxis;f<_?f=_:f>k&&(f=k)}if(c){var g,y;const m=p==="y"?"width":"height",_=["top","left"].includes(qs(s)),k=i.reference[d]-i.floating[m]+(_&&((g=a.offset)==null?void 0:g[d])||0)+(_?0:w.crossAxis),S=i.reference[d]+i.reference[m]+(_?0:((y=a.offset)==null?void 0:y[d])||0)-(_?w.crossAxis:0);v<k?v=k:v>S&&(v=S)}return{[p]:f,[d]:v}}}},w3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:a,elements:o}=t,{apply:l=()=>{},...c}=Ws(e,t),u=await fu(t,c),d=qs(s),p=Rl(s),f=Hi(s)==="y",{width:v,height:x}=i.floating;let w,g;d==="top"||d==="bottom"?(w=d,g=p===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(g=d,w=p==="end"?"top":"bottom");const y=x-u.top-u.bottom,m=v-u.left-u.right,_=Vi(x-u[w],y),k=Vi(v-u[g],m),S=!t.middlewareData.shift;let E=_,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=m),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),S&&!p){const R=Ln(u.left,0),M=Ln(u.right,0),O=Ln(u.top,0),W=Ln(u.bottom,0);f?P=v-2*(R!==0||M!==0?R+M:Ln(u.left,u.right)):E=x-2*(O!==0||W!==0?O+W:Ln(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:E});const j=await a.getDimensions(o.floating);return v!==j.width||x!==j.height?{reset:{rects:!0}}:{}}}};function Cp(){return typeof window<"u"}function Ol(e){return l2(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _s(e){var t;return(t=(l2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l2(e){return Cp()?e instanceof Node||e instanceof Bn(e).Node:!1}function Br(e){return Cp()?e instanceof Element||e instanceof Bn(e).Element:!1}function ys(e){return Cp()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function $1(e){return!Cp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}function Hu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function b3(e){return["table","td","th"].includes(Ol(e))}function Tp(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ex(e){const t=Cx(),n=Br(e)?Vr(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 _3(e){let t=Wi(e);for(;ys(t)&&!ml(t);){if(Ex(t))return t;if(Tp(t))return null;t=Wi(t)}return null}function Cx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ml(e){return["html","body","#document"].includes(Ol(e))}function Vr(e){return Bn(e).getComputedStyle(e)}function Ap(e){return Br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wi(e){if(Ol(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$1(e)&&e.host||_s(e);return $1(t)?t.host:t}function c2(e){const t=Wi(e);return ml(t)?e.ownerDocument?e.ownerDocument.body:e.body:ys(t)&&Hu(t)?t:c2(t)}function pu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=c2(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),a=Bn(s);if(i){const o=Jy(a);
vendor: 6,878 bytes, line 314
314return t.concat(a,a.visualViewport||[],Hu(s)?s:[],o&&n?pu(o):[])}return t.concat(s,pu(s,[],n))}function Jy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function u2(e){const t=Vr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ys(e),i=s?e.offsetWidth:n,a=s?e.offsetHeight:r,o=pf(n)!==i||pf(r)!==a;return o&&(n=i,r=a),{width:n,height:r,$:o}}function Tx(e){return Br(e)?e:e.contextElement}function Go(e){const t=Tx(e);if(!ys(t))return Ui(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=u2(t);let a=(i?pf(n.width):n.width)/r,o=(i?pf(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const k3=Ui(0);function d2(e){const t=Bn(e);return!Cx()||!t.visualViewport?k3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bn(e)?!1:t}function Ua(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Tx(e);let a=Ui(1);t&&(r?Br(r)&&(a=Go(r)):a=Go(e));const o=S3(i,n,r)?d2(i):Ui(0);let l=(s.left+o.x)/a.x,c=(s.top+o.y)/a.y,u=s.width/a.x,d=s.height/a.y;if(i){const p=Bn(i),f=r&&Br(r)?Bn(r):r;let v=p,x=Jy(v);for(;x&&r&&f!==v;){const w=Go(x),g=x.getBoundingClientRect(),y=Vr(x),m=g.left+(x.clientLeft+parseFloat(y.paddingLeft))*w.x,_=g.top+(x.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,d*=w.y,l+=m,c+=_,v=Bn(x),x=Jy(v)}}return gf({width:u,height:d,x:l,y:c})}function E3(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",a=_s(r),o=t?Tp(t.floating):!1;if(r===a||o&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ui(1);const u=Ui(0),d=ys(r);if((d||!d&&!i)&&((Ol(r)!=="body"||Hu(a))&&(l=Ap(r)),ys(r))){const p=Ua(r);c=Go(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function C3(e){return Array.from(e.getClientRects())}function Qy(e,t){const n=Ap(e).scrollLeft;return t?t.left+n:Ua(_s(e)).left+n}function T3(e){const t=_s(e),n=Ap(e),r=e.ownerDocument.body,s=Ln(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ln(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Qy(e);const o=-n.scrollTop;return Vr(r).direction==="rtl"&&(a+=Ln(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:o}}function A3(e,t){const n=Bn(e),r=_s(e),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,o=0,l=0;if(s){i=s.width,a=s.height;const c=Cx();(!c||c&&t==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:i,height:a,x:o,y:l}}function P3(e,t){const n=Ua(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=ys(e)?Go(e):Ui(1),a=e.clientWidth*i.x,o=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:a,height:o,x:l,y:c}}function F1(e,t,n){let r;if(t==="viewport")r=A3(e,n);else if(t==="document")r=T3(_s(e));else if(Br(t))r=P3(t,n);else{const s=d2(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return gf(r)}function h2(e,t){const n=Wi(e);return n===t||!Br(n)||ml(n)?!1:Vr(n).position==="fixed"||h2(n,t)}function j3(e,t){const n=t.get(e);if(n)return n;let r=pu(e,[],!1).filter(o=>Br(o)&&Ol(o)!=="body"),s=null;const i=Vr(e).position==="fixed";let a=i?Wi(e):e;for(;Br(a)&&!ml(a);){const o=Vr(a),l=Ex(a);!l&&o.position==="fixed"&&(s=null),(i?!l&&!s:!l&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Hu(a)&&!l&&h2(e,a))?r=r.filter(u=>u!==a):s=o,a=Wi(a)}return t.set(e,r),r}function N3(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Tp(t)?[]:j3(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,u)=>{const d=F1(t,u,s);return c.top=Ln(d.top,c.top),c.right=Vi(d.right,c.right),c.bottom=Vi(d.bottom,c.bottom),c.left=Ln(d.left,c.left),c},F1(t,o,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function R3(e){const{width:t,height:n}=u2(e);return{width:t,height:n}}function O3(e,t,n){const r=ys(t),s=_s(t),i=n==="fixed",a=Ua(e,!0,i,t);let o={scrollLeft:0,scrollTop:0};const l=Ui(0);if(r||!r&&!i)if((Ol(t)!=="body"||Hu(s))&&(o=Ap(t)),r){const f=Ua(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else s&&(l.x=Qy(s));let c=0,u=0;if(s&&!r&&!i){const f=s.getBoundingClientRect();u=f.top+o.scrollTop,c=f.left+o.scrollLeft-Qy(s,f)}const d=a.left+o.scrollLeft-l.x-c,p=a.top+o.scrollTop-l.y-u;return{x:d,y:p,width:a.width,height:a.height}}function Fm(e){return Vr(e).position==="static"}function z1(e,t){if(!ys(e)||Vr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _s(e)===n&&(n=n.ownerDocument.body),n}function f2(e,t){const n=Bn(e);if(Tp(e))return n;if(!ys(e)){let s=Wi(e);for(;s&&!ml(s);){if(Br(s)&&!Fm(s))return s;s=Wi(s)}return n}let r=z1(e,t);for(;r&&b3(r)&&Fm(r);)r=z1(r,t);return r&&ml(r)&&Fm(r)&&!Ex(r)?n:r||_3(e)||n}const I3=async function(e){const t=this.getOffsetParent||f2,n=this.getDimensions,r=await n(e.floating);return{reference:O3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function D3(e){return Vr(e).direction==="rtl"}const L3={convertOffsetParentRelativeRectToViewportRelativeRect:E3,getDocumentElement:_s,getClippingRect:N3,getOffsetParent:f2,getElementRects:I3,getClientRects:C3,getDimensions:R3,getScale:Go,isElement:Br,isRTL:D3};function M3(e,t){let n=null,r;const s=_s(e);function i(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(o||t(),!d||!p)return;const f=Cd(u),v=Cd(s.clientWidth-(c+d)),x=Cd(s.clientHeight-(u+p)),w=Cd(c),y={rootMargin:-f+"px "+-v+"px "+-x+"px "+-w+"px",threshold:Ln(0,Vi(1,l))||1};let m=!0;function _(k){const S=k[0].intersectionRatio;if(S!==l){if(!m)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}m=!1}try{n=new IntersectionObserver(_,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return a(!0),i}function $3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Tx(e),u=s||i?[...c?pu(c):[],...pu(t)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=c&&o?M3(c,n):null;let p=-1,f=null;a&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var m;(m=f)==null||m.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let v,x=l?Ua(e):null;l&&w();function w(){const g=Ua(e);x&&(g.x!==x.x||g.y!==x.y||g.width!==x.width||g.height!==x.height)&&n(),x=g,v=requestAnimationFrame(w)}return n(),()=>{var g;u.forEach(y=>{s&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(v)}}
vendor: 3,008 bytes, line 314
314const F3=y3,z3=v3,B3=p3,V3=w3,U3=m3,B1=f3,H3=x3,W3=(e,t,n)=>{const r=new Map,s={platform:L3,...n},i={...s.platform,_c:r};return h3(e,t,{...s,platform:i})};var yh=typeof document<"u"?b.useLayoutEffect:b.useEffect;function yf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!yf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function p2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V1(e,t){const n=p2(e);return Math.round(t*n)/n}function zm(e){const t=b.useRef(e);return yh(()=>{t.current=e}),t}function q3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=b.useState(r);yf(p,r)||f(r);const[v,x]=b.useState(null),[w,g]=b.useState(null),y=b.useCallback(D=>{D!==S.current&&(S.current=D,x(D))},[]),m=b.useCallback(D=>{D!==E.current&&(E.current=D,g(D))},[]),_=i||v,k=a||w,S=b.useRef(null),E=b.useRef(null),P=b.useRef(u),j=l!=null,R=zm(l),M=zm(s),O=zm(c),W=b.useCallback(()=>{if(!S.current||!E.current)return;const D={placement:t,strategy:n,middleware:p};M.current&&(D.platform=M.current),W3(S.current,E.current,D).then($=>{const C={...$,isPositioned:O.current!==!1};F.current&&!yf(P.current,C)&&(P.current=C,zu.flushSync(()=>{d(C)}))})},[p,t,n,M,O]);yh(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const F=b.useRef(!1);yh(()=>(F.current=!0,()=>{F.current=!1}),[]),yh(()=>{if(_&&(S.current=_),k&&(E.current=k),_&&k){if(R.current)return R.current(_,k,W);W()}},[_,k,W,R,j]);const q=b.useMemo(()=>({reference:S,floating:E,setReference:y,setFloating:m}),[y,m]),K=b.useMemo(()=>({reference:_,floating:k}),[_,k]),re=b.useMemo(()=>{const D={position:n,left:0,top:0};if(!K.floating)return D;const $=V1(K.floating,u.x),C=V1(K.floating,u.y);return o?{...D,transform:"translate("+$+"px, "+C+"px)",...p2(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:C}},[n,o,K.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:W,refs:q,elements:K,floatingStyles:re}),[u,W,q,K,re])}const Z3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?B1({element:r.current,padding:s}).fn(n):{}:r?B1({element:r,padding:s}).fn(n):{}}}},G3=(e,t)=>({...F3(e),options:[e,t]}),K3=(e,t)=>({...z3(e),options:[e,t]}),Y3=(e,t)=>({...H3(e),options:[e,t]}),J3=(e,t)=>
vendor: 5,693 bytes, line 314
314({...B3(e),options:[e,t]}),Q3=(e,t)=>({...V3(e),options:[e,t]}),X3=(e,t)=>({...U3(e),options:[e,t]}),ez=(e,t)=>({...Z3(e),options:[e,t]});var tz="Arrow",m2=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return h.jsx(Nt.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});m2.displayName=tz;var nz=m2;function rz(e){const[t,n]=b.useState(void 0);return Hs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,o=c.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var g2="Popper",[y2,v2]=Bu(g2),[zae,x2]=y2(g2),w2="PopperAnchor",b2=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=x2(w2,n),a=b.useRef(null),o=mn(t,a);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.jsx(Nt.div,{...s,ref:o})});b2.displayName=w2;var Ax="PopperContent",[sz,iz]=y2(Ax),_2=b.forwardRef((e,t)=>{var ye,gt,bt,Lt,rn,pr;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:v,...x}=e,w=x2(Ax,n),[g,y]=b.useState(null),m=mn(t,Gn=>y(Gn)),[_,k]=b.useState(null),S=rz(_),E=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,j=r+(i!=="center"?"-"+i:""),R=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(c)?c:[c],O=M.length>0,W={padding:R,boundary:M.filter(oz),altBoundary:O},{refs:F,floatingStyles:q,placement:K,isPositioned:re,middlewareData:D}=q3({strategy:"fixed",placement:j,whileElementsMounted:(...Gn)=>$3(...Gn,{animationFrame:f==="always"}),elements:{reference:w.anchor},middleware:[G3({mainAxis:s+P,alignmentAxis:a}),l&&K3({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Y3():void 0,...W}),l&&J3({...W}),Q3({...W,apply:({elements:Gn,rects:ks,availableWidth:Ss,availableHeight:Es})=>{const{width:Js,height:Qs}=ks.reference,Kn=Gn.floating.style;Kn.setProperty("--radix-popper-available-width",`${Ss}px`),Kn.setProperty("--radix-popper-available-height",`${Es}px`),Kn.setProperty("--radix-popper-anchor-width",`${Js}px`),Kn.setProperty("--radix-popper-anchor-height",`${Qs}px`)}}),_&&ez({element:_,padding:o}),lz({arrowWidth:E,arrowHeight:P}),p&&X3({strategy:"referenceHidden",...W})]}),[$,C]=E2(K),le=gs(v);Hs(()=>{re&&(le==null||le())},[re,le]);const oe=(ye=D.arrow)==null?void 0:ye.x,T=(gt=D.arrow)==null?void 0:gt.y,L=((bt=D.arrow)==null?void 0:bt.centerOffset)!==0,[_e,ie]=b.useState();return Hs(()=>{g&&ie(window.getComputedStyle(g).zIndex)},[g]),h.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:re?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(Lt=D.transformOrigin)==null?void 0:Lt.x,(rn=D.transformOrigin)==null?void 0:rn.y].join(" "),...((pr=D.hide)==null?void 0:pr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(sz,{scope:n,placedSide:$,onArrowChange:k,arrowX:oe,arrowY:T,shouldHideArrow:L,children:h.jsx(Nt.div,{"data-side":$,"data-align":C,...x,ref:m,style:{...x.style,animation:re?void 0:"none"}})})})});_2.displayName=Ax;var k2="PopperArrow",az={top:"bottom",right:"left",bottom:"top",left:"right"},S2=b.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=iz(k2,r),a=az[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsx(nz,{...s,ref:n,style:{...s.style,display:"block"}})})});S2.displayName=k2;function oz(e){return e!==null}var lz=e=>({name:"transformOrigin",options:e,fn(t){var w,g,y;const{placement:n,rects:r,middlewareData:s}=t,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=E2(n),d={start:"0%",center:"50%",end:"100%"}[u],p=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,f=(((y=s.arrow)==null?void 0:y.y)??0)+l/2;let v="",x="";return c==="bottom"?(v=a?d:`${p}px`,x=`${-l}px`):c==="top"?(v=a?d:`${p}px`,x=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,x=a?d:`${f}px`):c==="left"&&(v=`${r.floating.width+l}px`,x=a?d:`${f}px`),{data:{x:v,y:x}}}});function E2(e){const[t,n="center"]=e.split("-");return[t,n]}var cz=b2,uz=_2,dz=S2,[Pp,Bae]=Bu("Tooltip",[v2]),Px=v2(),C2="TooltipProvider",hz=700,U1="tooltip.open",[fz,T2]=Pp(C2),A2=e=>{const{__scopeTooltip:t,delayDuration:n=hz,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,a=b.useRef(!0),o=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(fz,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:b.useCallback(c=>{o.current=c},[]),disableHoverableContent:s,children:i})};A2.displayName=C2;var P2="Tooltip",[Vae,jp]=Pp(P2),Xy="TooltipTrigger",pz=b.forwardRef((e,t)=>
vendor: 5,227 bytes, line 314
314{const{__scopeTooltip:n,...r}=e,s=jp(Xy,n),i=T2(Xy,n),a=Px(n),o=b.useRef(null),l=mn(t,o,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(cz,{asChild:!0,...a,children:h.jsx(Nt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:at(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:at(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:at(e.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:at(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:at(e.onBlur,s.onClose),onClick:at(e.onClick,s.onClose)})})});pz.displayName=Xy;var mz="TooltipPortal",[Uae,gz]=Pp(mz,{forceMount:void 0}),gl="TooltipContent",j2=b.forwardRef((e,t)=>{const n=gz(gl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,a=jp(gl,e.__scopeTooltip);return h.jsx(jl,{present:r||a.open,children:a.disableHoverableContent?h.jsx(N2,{side:s,...i,ref:t}):h.jsx(yz,{side:s,...i,ref:t})})}),yz=b.forwardRef((e,t)=>{const n=jp(gl,e.__scopeTooltip),r=T2(gl,e.__scopeTooltip),s=b.useRef(null),i=mn(t,s),[a,o]=b.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,p=b.useCallback(()=>{o(null),d(!1)},[d]),f=b.useCallback((v,x)=>{const w=v.currentTarget,g={x:v.clientX,y:v.clientY},y=_z(g,w.getBoundingClientRect()),m=kz(g,y),_=Sz(x.getBoundingClientRect()),k=Cz([...m,..._]);o(k),d(!0)},[d]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(l&&u){const v=w=>f(w,u),x=w=>f(w,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",x),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",x)}}},[l,u,f,p]),b.useEffect(()=>{if(a){const v=x=>{const w=x.target,g={x:x.clientX,y:x.clientY},y=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),m=!Ez(g,a);y?p():m&&(p(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,a,c,p]),h.jsx(N2,{...e,ref:i})}),[vz,xz]=Pp(P2,{isInside:!1}),wz=a$("TooltipContent"),N2=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...o}=e,l=jp(gl,n),c=Px(n),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(U1,u),()=>document.removeEventListener(U1,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=p=>{const f=p.target;f!=null&&f.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),h.jsx(wp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:h.jsxs(uz,{"data-state":l.stateAttribute,...c,...o,ref:t,style:{...o.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:[h.jsx(wz,{children:r}),h.jsx(vz,{scope:n,isInside:!0,children:h.jsx(j$,{id:l.contentId,role:"tooltip",children:s||r})})]})})});j2.displayName=gl;var R2="TooltipArrow",bz=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Px(n);return xz(R2,n).isInside?null:h.jsx(dz,{...s,...r,ref:t})});bz.displayName=R2;function _z(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function kz(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 Sz(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function Ez(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const o=t[i],l=t[a],c=o.x,u=o.y,d=l.x,p=l.y;u>r!=p>r&&n<(d-c)*(r-u)/(p-u)+c&&(s=!s)}return s}function Cz(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),Tz(t)}function Tz(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Az=A2,O2=j2;const Pz=Az,jz=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
314h.jsx(O2,{ref:r,sideOffset:t,className:Hr("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}));jz.displayName=O2.displayName;const H1=[{id:"gcc",icon:Ep,title:"GCC Healthcare Licensing",desc:"DHA · MOH · DOH · SCFHS · QCHP · NHRA · OMSB",color:"#F9A01B"},{id:"germany",icon:pF,title:"Germany Nursing Recruitment",desc:"Language, employer match, visa & relocation",color:"#2CC5F4"},{id:"training",icon:Uu,title:"Professional Trainings",desc:"BLS · ACLS · PALS · CNA · CPHQ & more",color:"#F9A01B"},{id:"mcq",icon:wx,title:"Study Materials / MCQ Packages",desc:"Live pricing for every profession",color:"#2CC5F4"},{id:"facility",icon:kp,title:"Facility Licensing Services",desc:"Clinic · Homecare · Hospital · Medical Center",color:"#F9A01B"},{id:"other",icon:HP,title:"Other Inquiry",desc:"Tell us what you're looking for",color:"#2CC5F4"}],Nz=["Nurse","GP / Doctor","Dentist","Pharmacist","Allied Health Professional","Laboratory Technician","Specialist / Consultant","Other"],Rz=[{code:"in",name:"India"},{code:"pk",name:"Pakistan"},{code:"bd",name:"Bangladesh"},{code:"lk",name:"Sri Lanka"},{code:"np",name:"Nepal"},{code:"ph",name:"Philippines"},{code:"id",name:"Indonesia"},{code:"my",name:"Malaysia"},{code:"eg",name:"Egypt"},{code:"jo",name:"Jordan"},{code:"lb",name:"Lebanon"},{code:"sy",name:"Syria"},{code:"iq",name:"Iraq"},{code:"ye",name:"Yemen"},{code:"sd",name:"Sudan"},{code:"ma",name:"Morocco"},{code:"tn",name:"Tunisia"},{code:"ng",name:"Nigeria"},{code:"ke",name:"Kenya"},{code:"gh",name:"Ghana"},{code:"za",name:"South Africa"},{code:"et",name:"Ethiopia"},{code:"gb",name:"United Kingdom"},{code:"us",name:"United States"},{code:"ca",name:"Canada"},{code:"ae",name:"UAE"},{code:"sa",name:"Saudi Arabia"},{code:"qa",name:"Qatar"},{code:"bh",name:"Bahrain"},{code:"kw",name:"Kuwait"},{code:"om",name:"Oman"},{code:"xx",name:"Other"}],W1=["Less than 1 year","1–3 years","3–5 years","5–10 years","10+ years"],q1=["Yes","No"],Oz=["Diploma Nurse","BSc Nurse","GNM","Post Basic","Other"],Z1=[{name:"BLS",mode:"Offline",duration:"1 Day · 8AM–2PM",cpd:"CPD Points"},{name:"Infection Control",mode:"Online & Offline",duration:"1 Day",cpd:"CPD Points"},{name:"CPHQ",mode:"Online",duration:"40 Hours · Flexible",cpd:"—"},{name:"CPPS",mode:"Online",duration:"30 Hours",cpd:"—"},{name:"CNA",mode:"Practical + Migration",duration:"Flexible",cpd:"Job Assistance"},{name:"First Aid",mode:"Offline",duration:"1 Day · 2 Year Validity",cpd:"—"},{name:"ACLS",mode:"Offline",duration:"Contact for schedule",cpd:"—"},{name:"PALS",mode:"Offline",duration:"Contact for schedule",cpd:"—"}],Iz=["Clinic","Homecare","Hospital","Medical Center","Diagnostic Center","Other"],Dz=["Dubai","Abu Dhabi","Sharjah","Ajman","Ras Al Khaimah","Fujairah","Umm Al Quwain"],Lz=["tourist visa","visit visa","student visa","immigration","pr visa","driver","engineer","it job","software job","construction","mba","school admission","university admission","restaurant","real estate","trading license","general business"],Mz=["Specialist","GP / Dentist","Nurse / Allied / Technical"],$z=[{id:"5",label:"5 Tests Pack",tests:"5 practice tests"},{id:"15",label:"15 Tests Pack",tests:"15 practice tests"},{id:"25",label:"25 Tests Pack",tests:"25 practice tests"},{id:"Single",label:"Single MCQ Bundle",tests:"1 single bundle"}],Fz={5:"1 Month",15:"2 Months",25:"3 Months",Single:"3 Months"},zz={Specialist:{5:306.52,15:616.92,25:772.12,Single:500.52},"GP / Dentist":{5:267.72,15:500.52,25:694.52,Single:384.12},"Nurse / Allied / Technical":{5:190.12,15:384.12,25:539.32,Single:267.72}},Hae={5:"Perfect starter pack for focused exam prep.",15:"Most popular — ideal balance of breadth and value.",25:"Maximum coverage for complete exam mastery.",Single:"A single comprehensive MCQ bundle."},I2=({code:e,name:t,size:n=20,className:r="",rounded:s=!0})=>{const i=n,a=Math.round(n*.75);return h.jsx("img",{src:`https://flagcdn.com/${e.toLowerCase()}.svg`,alt:t?`${t} flag`:`${e.toUpperCase()} flag`,width:i,height:a,loading:"lazy",decoding:"async",className:`inline-block object-cover shadow-sm ring-1 ring-gray-200/70 ${s?"rounded-[3px]":""} ${r}`,style:{width:i,height:a,minWidth:i}})};var Me;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),a={};for(const o of i)a[o]=s[o];return e.objectValues(a)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},e.find=(s,i)=>{for(const a of s)if(i(a))return a}
vendor: 5,512 bytes, line 314
314,e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Me||(Me={}));var G1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(G1||(G1={}));const fe=Me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return Number.isNaN(e)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(e)?fe.array:e===null?fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?fe.promise:typeof Map<"u"&&e instanceof Map?fe.map:typeof Set<"u"&&e instanceof Set?fe.set:typeof Date<"u"&&e instanceof Date?fe.date:fe.object;default:return fe.unknown}},Y=Me.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 Zs 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(i){return i.message},r={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return s(this),r}static assert(t){if(!(t instanceof Zs))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Me.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Zs.create=e=>new Zs(e);const ev=(e,t)=>{let n;switch(e.code){case Y.invalid_type:e.received===fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:n=`Unrecognized key(s) in object: ${Me.joinValues(e.keys,", ")}`;break;case Y.invalid_union:n="Invalid input";break;case Y.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Me.joinValues(e.options)}`;break;case Y.invalid_enum_value:n=`Invalid enum value. Expected ${Me.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:n="Invalid function arguments";break;case Y.invalid_return_type:n="Invalid function return type";break;case Y.invalid_date:n="Invalid date";break;case Y.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}"`:Me.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Y.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 Y.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 Y.custom:n="Invalid input";break;
vendor: 5,141 bytes, line 314
314case Y.invalid_intersection_types:n="Intersection results could not be merged";break;case Y.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:n="Number must be finite";break;default:n=t.defaultError,Me.assertNever(e)}return{message:n}};let Bz=ev;function Vz(){return Bz}const Uz=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:t,defaultError:o}).message;return{...s,path:i,message:o}};function ae(e,t){const n=Vz(),r=Uz({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ev?void 0:ev].filter(s=>!!s)});e.common.issues.push(r)}class Hn{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 s of n){if(s.status==="aborted")return Ee;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,a=await s.value;r.push({key:i,value:a})}return Hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return Ee;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),dc=e=>({status:"dirty",value:e}),fr=e=>({status:"valid",value:e}),K1=e=>e.status==="aborted",Y1=e=>e.status==="dirty",yl=e=>e.status==="valid",vf=e=>typeof Promise<"u"&&e instanceof Promise;var pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(pe||(pe={}));class qi{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}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 J1=(e,t)=>{if(yl(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 Zs(e.common.issues);return this._error=n,this._error}}};function je(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=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:s}:{errorMap:(a,o)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:s}}let De=class{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hn,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(vf(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:fi(t)},s=this._parseSync({data:t,path:r.path,parent:r});return J1(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return yl(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>yl(i)?{value:i.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:fi(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(vf(s)?s:Promise.resolve(s));return J1(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const a=t(s),o=()=>i.addIssue({code:Y.custom,...r(s)});
vendor: 5,345 bytes, line 314
314return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new xl({schema:this,typeName:Q.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 $i.create(this,this._def)}nullable(){return wl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vl.create(this)}promise(){return _f.create(this,this._def)}or(t){return wf.create([this,t],this._def)}and(t){return bf.create(this,t,this._def)}transform(t){return new xl({...je(this._def),schema:this,typeName:Q.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new av({...je(this._def),innerType:this,defaultValue:n,typeName:Q.ZodDefault})}brand(){return new h9({typeName:Q.ZodBranded,type:this,...je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ov({...je(this._def),innerType:this,catchValue:n,typeName:Q.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Nx.create(this,t)}readonly(){return lv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Hz=/^c[^\s-]{8,}$/i,Wz=/^[0-9a-z]+$/,qz=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Zz=/^[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,Gz=/^[a-z0-9_-]{21}$/i,Kz=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yz=/^[-+]?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)?)??$/,Jz=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bm;const Xz=/^(?:(?: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])$/,e9=/^(?:(?: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])$/,t9=/^(([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]))$/,n9=/^(([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])$/,r9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,s9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,D2="((\\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])))",i9=new RegExp(`^${D2}$`);function L2(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 a9(e){return new RegExp(`^${L2(e)}$`)}function o9(e){let t=`${D2}T${L2(e)}`;
vendor: 7,670 bytes, line 314
314const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function l9(e,t){return!!((t==="v4"||!t)&&Xz.test(e)||(t==="v6"||!t)&&t9.test(e))}function c9(e,t){if(!Kz.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,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function u9(e,t){return!!((t==="v4"||!t)&&e9.test(e)||(t==="v6"||!t)&&n9.test(e))}let tv=class hc extends De{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==fe.string){const i=this._getOrReturnCtx(t);return ae(i,{code:Y.invalid_type,expected:fe.string,received:i.parsedType}),Ee}const r=new Hn;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,o=t.data.length<i.value;(a||o)&&(s=this._getOrReturnCtx(t,s),a?ae(s,{code:Y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&ae(s,{code:Y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Jz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"email",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Bm||(Bm=new RegExp(Qz,"u")),Bm.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"emoji",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Zz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"uuid",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Gz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"nanoid",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Hz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Wz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cuid2",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")qz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ulid",code:Y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ae(s,{validation:"url",code:Y.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"regex",code:Y.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?o9(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?i9.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?a9(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Yz.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"duration",code:Y.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?l9(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"ip",code:Y.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?c9(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"jwt",code:Y.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?u9(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"cidr",code:Y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?r9.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64",code:Y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?s9.test(t.data)||(s=this._getOrReturnCtx(t,s),ae(s,{validation:"base64url",code:Y.invalid_string,message:i.message}),r.dirty()):Me.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:Y.invalid_string,...pe.errToObj(r)})}_addCheck(t){return new hc({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...pe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...pe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...pe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...pe.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,...pe.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,...pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...pe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...pe.errToObj(n)})}nonempty(t){return this.min(1,pe.errToObj(t))}trim(){return new hc({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new hc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new hc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 10,810 bytes, line 314
314get 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}};tv.create=e=>new tv({checks:[],typeName:Q.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...je(e)});function d9(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}let Q1=class nv extends De{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)!==fe.number){const i=this._getOrReturnCtx(t);return ae(i,{code:Y.invalid_type,expected:fe.number,received:i.parsedType}),Ee}let r;const s=new Hn;for(const i of this._def.checks)i.kind==="int"?Me.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?d9(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.not_finite,message:i.message}),s.dirty()):Me.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,s){return new nv({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(s)}]})}_addCheck(t){return new nv({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.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"&&Me.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)}};Q1.create=e=>new Q1({checks:[],typeName:Q.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...je(e)});class mu extends De{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)!==fe.bigint)return this._getInvalidInput(t);let r;const s=new Hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ae(r,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Me.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ae(n,{code:Y.invalid_type,expected:fe.bigint,received:n.parsedType}),Ee}gte(t,n){return this.setLimit("min",t,!0,pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,pe.toString(n))}setLimit(t,n,r,s){return new mu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:pe.toString(s)}]})}_addCheck(t){return new mu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:pe.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}}mu.create=e=>new mu({checks:[],typeName:Q.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...je(e)});let X1=class extends De{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==fe.boolean){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.boolean,received:r.parsedType}),Ee}return fr(t.data)}};X1.create=e=>new X1({typeName:Q.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...je(e)});class xf extends De{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==fe.date){const i=this._getOrReturnCtx(t);return ae(i,{code:Y.invalid_type,expected:fe.date,received:i.parsedType}),Ee}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ae(i,{code:Y.invalid_date}),Ee}const r=new Hn;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ae(s,{code:Y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Me.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new xf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:pe.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}}xf.create=e=>new xf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Q.ZodDate,...je(e)});class e_ extends De{_parse(t){if(this._getType(t)!==fe.symbol){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.symbol,received:r.parsedType}),Ee}return fr(t.data)}}e_.create=e=>new e_({typeName:Q.ZodSymbol,...je(e)});class t_ extends De{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.undefined,received:r.parsedType}),Ee}return fr(t.data)}}t_.create=e=>new t_({typeName:Q.ZodUndefined,...je(e)});let n_=class extends De{_parse(t){if(this._getType(t)!==fe.null){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.null,received:r.parsedType}),Ee}return fr(t.data)}};n_.create=e=>new n_({typeName:Q.ZodNull,...je(e)});class r_ extends De{constructor(){super(...arguments),this._any=!0}_parse(t){return fr(t.data)}}r_.create=e=>new r_({typeName:Q.ZodAny,...je(e)});let s_=class extends De{constructor(){super(...arguments),this._unknown=!0}_parse(t){return fr(t.data)}};s_.create=e=>new s_({typeName:Q.ZodUnknown,...je(e)});let Zi=class extends De{_parse(t){const n=this._getOrReturnCtx(t);return ae(n,{code:Y.invalid_type,expected:fe.never,received:n.parsedType}),Ee}};Zi.create=e=>new Zi({typeName:Q.ZodNever,...je(e)});class i_ extends De{_parse(t){if(this._getType(t)!==fe.undefined){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.void,received:r.parsedType}),Ee}return fr(t.data)}}i_.create=e=>new i_({typeName:Q.ZodVoid,...je(e)});let vl=class vh extends De{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==fe.array)return ae(n,{code:Y.invalid_type,expected:fe.array,received:n.parsedType}),Ee;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,o=n.data.length<s.exactLength.value;(a||o)&&(ae(n,{code:a?Y.too_big:Y.too_small,minimum:o?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}
vendor: 4,447 bytes, line 314
314if(s.minLength!==null&&n.data.length<s.minLength.value&&(ae(n,{code:Y.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ae(n,{code:Y.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>s.type._parseAsync(new qi(n,a,n.path,o)))).then(a=>Hn.mergeArray(r,a));const i=[...n.data].map((a,o)=>s.type._parseSync(new qi(n,a,n.path,o)));return Hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new vh({...this._def,minLength:{value:t,message:pe.toString(n)}})}max(t,n){return new vh({...this._def,maxLength:{value:t,message:pe.toString(n)}})}length(t,n){return new vh({...this._def,exactLength:{value:t,message:pe.toString(n)}})}nonempty(t){return this.min(1,t)}};vl.create=(e,t)=>new vl({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Q.ZodArray,...je(t)});function po(e){if(e instanceof Ur){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$i.create(po(r))}return new Ur({...e._def,shape:()=>t})}else return e instanceof vl?new vl({...e._def,type:po(e.element)}):e instanceof $i?$i.create(po(e.unwrap())):e instanceof wl?wl.create(po(e.unwrap())):e instanceof Ha?Ha.create(e.items.map(t=>po(t))):e}let Ur=class kr extends De{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=Me.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==fe.object){const c=this._getOrReturnCtx(t);return ae(c,{code:Y.invalid_type,expected:fe.object,received:c.parsedType}),Ee}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Zi&&this._def.unknownKeys==="strip"))for(const c in s.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new qi(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Zi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")o.length>0&&(ae(s,{code:Y.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new qi(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>Hn.mergeObjectSync(r,c)):Hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return pe.errToObj,new kr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a;const s=((a=(i=this._def).errorMap)==null?void 0:a.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:pe.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new kr({...this._def,unknownKeys:"strip"})}passthrough(){return new kr({...this._def,unknownKeys:"passthrough"})}extend(t){return new kr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new kr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Q.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new kr({...this._def,catchall:t})}pick(t){const n={};for(const r of Me.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new kr({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Me.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new kr({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(t){const n={};for(const r of Me.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new kr({...this._def,shape:()=>n})}required(t){const n={};for(const r of Me.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof $i;)i=i._def.innerType;n[r]=i}return new kr({...this._def,shape:()=>n})}keyof(){return M2(Me.objectKeys(this.shape))}};Ur.create=(e,t)=>
vendor: 6,274 bytes, line 314
314new Ur({shape:()=>e,unknownKeys:"strip",catchall:Zi.create(),typeName:Q.ZodObject,...je(t)});Ur.strictCreate=(e,t)=>new Ur({shape:()=>e,unknownKeys:"strict",catchall:Zi.create(),typeName:Q.ZodObject,...je(t)});Ur.lazycreate=(e,t)=>new Ur({shape:e,unknownKeys:"strip",catchall:Zi.create(),typeName:Q.ZodObject,...je(t)});let wf=class extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(o=>new Zs(o.ctx.common.issues));return ae(n,{code:Y.invalid_union,unionErrors:a}),Ee}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const o=a.map(l=>new Zs(l));return ae(n,{code:Y.invalid_union,unionErrors:o}),Ee}}get options(){return this._def.options}};wf.create=(e,t)=>new wf({options:e,typeName:Q.ZodUnion,...je(t)});function rv(e,t){const n=fi(e),r=fi(t);if(e===t)return{valid:!0,data:e};if(n===fe.object&&r===fe.object){const s=Me.objectKeys(t),i=Me.objectKeys(e).filter(o=>s.indexOf(o)!==-1),a={...e,...t};for(const o of i){const l=rv(e[o],t[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===fe.array&&r===fe.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const a=e[i],o=t[i],l=rv(a,o);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===fe.date&&r===fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let bf=class extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,a)=>{if(K1(i)||K1(a))return Ee;const o=rv(i.value,a.value);return o.valid?((Y1(i)||Y1(a))&&n.dirty(),{status:n.value,value:o.data}):(ae(r,{code:Y.invalid_intersection_types}),Ee)};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(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};bf.create=(e,t,n)=>new bf({left:e,right:t,typeName:Q.ZodIntersection,...je(n)});class Ha extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.array)return ae(r,{code:Y.invalid_type,expected:fe.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return ae(r,{code:Y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(ae(r,{code:Y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new qi(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Hn.mergeArray(n,a)):Hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Ha({...this._def,rest:t})}}Ha.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ha({items:e,typeName:Q.ZodTuple,rest:null,...je(t)})};class a_ extends De{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!==fe.map)return ae(r,{code:Y.invalid_type,expected:fe.map,received:r.parsedType}),Ee;const s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:s._parse(new qi(r,o,r.path,[c,"key"])),value:i._parse(new qi(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}a_.create=(e,t,n)=>new a_({valueType:t,keyType:e,typeName:Q.ZodMap,...je(n)});class gu extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==fe.set)return ae(r,{code:Y.invalid_type,expected:fe.set,received:r.parsedType}),Ee;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ae(r,{code:Y.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ae(r,{code:Y.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>i._parse(new qi(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(t,n){return new gu({...this._def,minSize:{value:t,message:pe.toString(n)}})}max(t,n){return new gu({...this._def,maxSize:{value:t,message:pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}gu.create=(e,t)=>new gu({valueType:e,minSize:null,maxSize:null,typeName:Q.ZodSet,...je(t)});let o_=class extends De{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})}};o_.create=(e,t)=>new o_({getter:e,typeName:Q.ZodLazy,...je(t)});let sv=class extends De{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ae(n,{received:n.data,code:Y.invalid_literal,expected:this._def.value}),Ee}
vendor: 4,159 bytes, line 314
314return{status:"valid",value:t.data}}get value(){return this._def.value}};sv.create=(e,t)=>new sv({value:e,typeName:Q.ZodLiteral,...je(t)});function M2(e,t){return new jx({values:e,typeName:Q.ZodEnum,...je(t)})}let jx=class iv extends De{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ae(n,{expected:Me.joinValues(r),received:n.parsedType,code:Y.invalid_type}),Ee}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 ae(n,{received:n.data,code:Y.invalid_enum_value,options:r}),Ee}return fr(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 iv.create(t,{...this._def,...n})}exclude(t,n=this._def){return iv.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};jx.create=M2;class l_ extends De{_parse(t){const n=Me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const s=Me.objectValues(n);return ae(r,{expected:Me.joinValues(s),received:r.parsedType,code:Y.invalid_type}),Ee}if(this._cache||(this._cache=new Set(Me.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=Me.objectValues(n);return ae(r,{received:r.data,code:Y.invalid_enum_value,options:s}),Ee}return fr(t.data)}get enum(){return this._def.values}}l_.create=(e,t)=>new l_({values:e,typeName:Q.ZodNativeEnum,...je(t)});class _f extends De{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==fe.promise&&n.common.async===!1)return ae(n,{code:Y.invalid_type,expected:fe.promise,received:n.parsedType}),Ee;const r=n.parsedType===fe.promise?n.data:Promise.resolve(n.data);return fr(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_f.create=(e,t)=>new _f({type:e,typeName:Q.ZodPromise,...je(t)});class xl extends De{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:a=>{ae(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ee:l.status==="dirty"||n.value==="dirty"?dc(l.value):l});{if(n.value==="aborted")return Ee;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?Ee:o.status==="dirty"||n.value==="dirty"?dc(o.value):o}}if(s.type==="refinement"){const a=o=>{const l=s.refinement(o,i);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 o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ee:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Ee:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!yl(a))return Ee;const o=s.transform(a.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>yl(a)?Promise.resolve(s.transform(a.value,i)).then(o=>({status:n.value,value:o})):Ee);Me.assertNever(s)}}
314xl.create=(e,t,n)=>new xl({schema:e,typeName:Q.ZodEffects,effect:t,...je(n)});xl.createWithPreprocess=(e,t,n)=>new xl({schema:t,effect:{type:"preprocess",transform:e},typeName:Q.ZodEffects,...je(n)});let $i=class extends De{_parse(t){return this._getType(t)===fe.undefined?fr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$i.create=(e,t)=>new $i({innerType:e,typeName:Q.ZodOptional,...je(t)});let wl=class extends De{_parse(t){return this._getType(t)===fe.null?fr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};wl.create=(e,t)=>new wl({innerType:e,typeName:Q.ZodNullable,...je(t)});let av=class extends De{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};av.create=(e,t)=>new av({innerType:e,typeName:Q.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...je(t)});let ov=class extends De{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return vf(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zs(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Zs(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};ov.create=(e,t)=>new ov({innerType:e,typeName:Q.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...je(t)});class c_ extends De{_parse(t){if(this._getType(t)!==fe.nan){const r=this._getOrReturnCtx(t);return ae(r,{code:Y.invalid_type,expected:fe.nan,received:r.parsedType}),Ee}return{status:"valid",value:t.data}}}c_.create=e=>new c_({typeName:Q.ZodNaN,...je(e)});class h9 extends De{_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 Nx extends De{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ee:i.status==="dirty"?(n.dirty(),dc(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Nx({in:t,out:n,typeName:Q.ZodPipeline})}}let lv=class extends De{_parse(t){const n=this._def.innerType._parse(t),r=s=>(yl(s)&&(s.value=Object.freeze(s.value)),s);return vf(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};lv.create=(e,t)=>new lv({innerType:e,typeName:Q.ZodReadonly,...je(t)});Ur.lazycreate;var Q;(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"})(Q||(Q={}));const Sn=tv.create;Zi.create;vl.create;const Rx=Ur.create;Ur.strictCreate;wf.create;bf.create;Ha.create;const f9=sv.create,p9=jx.create;_f.create;$i.create;wl.create;const Ox=Rx({name:Sn().trim().min(2,"Please enter your full name").max(80),email:Sn().trim().email("Enter a valid email").max(160),whatsapp:Sn().trim().regex(/^\+?[0-9 ()-]{7,20}$/,"Enter a valid WhatsApp number")}),$2=e=>Ox.safeParse({name:e.name??"",email:e.email??"",whatsapp:e.whatsapp??""}
314).success,F2=({value:e,onChange:t,theme:n="light",accent:r="#F9A01B",showErrors:s=!1,title:i,subtitle:a})=>{const o=s?(()=>{const p=Ox.safeParse(e);if(p.success)return{};const f={};return p.error.issues.forEach(v=>{v.path[0]&&(f[v.path[0]]=v.message)}),f})():{},l=n==="dark"?"text-white/75 text-xs mb-1.5 block":"text-[11px] font-semibold text-gray-600 uppercase tracking-wider mb-1.5 block",c=n==="dark"?"w-full h-14 px-4 rounded-xl bg-white/[0.04] border border-white/[0.12] text-white text-sm focus:border-[#2CC5F4] focus:shadow-[0_0_0_3px_rgba(44,197,244,0.12)] outline-none transition-all placeholder:text-white/30":"w-full px-3.5 py-2.5 rounded-xl border border-gray-200 bg-white text-sm text-gray-900 placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:border-transparent transition",u=n==="dark"?"text-white font-semibold":"font-display font-bold text-gray-900 text-base",d=n==="dark"?"text-white/70 text-xs mt-1":"text-gray-500 text-xs mt-1";return h.jsxs("div",{className:"space-y-3.5",children:[(i||a)&&h.jsxs("div",{children:[i&&h.jsx("p",{className:u,children:i}),a&&h.jsx("p",{className:d,children:a})]}),h.jsxs("div",{children:[h.jsxs("label",{className:l,children:["Full Name ",h.jsx("span",{style:{color:r},children:"*"})]}),h.jsx("input",{type:"text",required:!0,maxLength:80,value:e.name,onChange:p=>t({...e,name:p.target.value}),placeholder:"Your full name",className:c,style:n==="light"?{boxShadow:"none"}:void 0}),o.name&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:o.name})]}),h.jsxs("div",{children:[h.jsxs("label",{className:l,children:["Email ",h.jsx("span",{style:{color:r},children:"*"})]}),h.jsx("input",{type:"email",required:!0,maxLength:160,value:e.email,onChange:p=>t({...e,email:p.target.value}),placeholder:"[email protected]",className:c}),o.email&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:o.email})]}),h.jsxs("div",{children:[h.jsxs("label",{className:l,children:["WhatsApp Number ",h.jsx("span",{style:{color:r},children:"*"})]}),h.jsx("input",{type:"tel",required:!0,maxLength:20,value:e.whatsapp,onChange:p=>t({...e,whatsapp:p.target.value}),placeholder:"+971 50 123 4567",className:c}),o.whatsapp&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:o.whatsapp})]})]})},ioe=Object.freeze(Object.defineProperty({__proto__:null,contactDetailsSchema:Ox,default:F2,isContactDetailsValid:$2},Symbol.toStringTag,{value:"Module"}));function m9(e,t,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function o(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):s(u.value).then(o,l)}c((r=r.apply(e,t||[])).next())})}const g9=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Ix 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 y9 extends Ix{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class u_ extends Ix{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class d_ extends Ix{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var cv;(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"})(cv||(cv={}));class v9{constructor(t,{headers:n={},customFetch:r,region:s=cv.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=g9(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return m9(this,arguments,void 0,function*(n,r={}){var s;let i,a;try{const{headers:o,method:l,body:c,signal:u,timeout:d}=r;let p={},{region:f}=r;f||(f=this.region);const v=new URL(`${this.url}/${n}`);f&&f!=="any"&&(p["x-region"]=f,v.searchParams.set("forceFunctionRegion",f));let x;c&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",x=c):typeof c=="string"?(p["Content-Type"]="text/plain",x=c):typeof FormData<"u"&&c instanceof FormData?x=c:(p["Content-Type"]="application/json",x=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?x=JSON.stringify(c):x=c;let w=u;d&&(a=new AbortController,i=setTimeout(()=>a.abort(),d),u?(w=a.signal,u.addEventListener("abort",()=>a.abort())):w=a.signal);const g=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),o),body:x,signal:w}).catch(k=>{throw new y9(k)}),y=g.headers.get("x-relay-error");
314if(y&&y==="true")throw new u_(g);if(!g.ok)throw new d_(g);let m=((s=g.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return m==="application/json"?_=yield g.json():m==="application/octet-stream"||m==="application/pdf"?_=yield g.blob():m==="text/event-stream"?_=g:m==="multipart/form-data"?_=yield g.formData():_=yield g.text(),{data:_,error:null,response:g}}catch(o){return{data:null,error:o,response:o instanceof d_||o instanceof u_?o.context:void 0}}finally{i&&clearTimeout(i)}})}}const z2=3,h_=e=>Math.min(1e3*2**e,3e4),x9=[520,503],B2=["GET","HEAD","OPTIONS"];var w9=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 f_(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function b9(e,t,n,r){return!(!r||n>=z2||!B2.includes(e)||!x9.includes(t))}var _9=class{constructor(e){var t,n,r,s,i;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=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!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 a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let a=0;for(;;){const c=new Headers(n.headers);a>0&&c.set("X-Retry-Count",String(a));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(d,p)=>typeof p=="bigint"?p.toString():p),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!B2.includes(n.method))throw d;if(n.retryEnabled&&a<z2){const p=h_(a);a++,await f_(p,n.signal);continue}throw d}if(b9(n.method,u.status,a,n.retryEnabled)){var o,l;const d=(o=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&o!==void 0?o:null,p=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:h_(a);await u.text(),a++,await f_(p,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(a=>{var o;let l="",c="",u="";const d=a==null?void 0:a.cause;if(d){var p,f,v,x;const y=(p=d==null?void 0:d.message)!==null&&p!==void 0?p:"",m=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(v=a==null?void 0:a.name)!==null&&v!==void 0?v:"FetchError"}: ${a==null?void 0:a.message}`,l+=`
315
316Caused by: ${(x=d==null?void 0:d.name)!==null&&x!==void 0?x:"Error"}: ${y}`,m&&(l+=` (${m})`),d!=null&&d.stack&&(l+=`
317${d.stack}`)}else{var w;l=(w=a==null?void 0:a.stack)!==null&&w!==void 0?w:""}const g=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",g>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${g} 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")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",g>this.urlLengthLimit&&(c+=`. Your request URL is ${g} 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:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
317)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,a=e.statusText;if(e.ok){var o,l;if(t.method!=="HEAD"){var c;const p=await e.text();p===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((c=t.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?r=p:r=JSON.parse(p))}const u=(o=t.headers.get("Prefer"))===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),d=(l=e.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=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,s=null,i=406,a="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await e.text();try{n=JSON.parse(u),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,a="OK")}catch{e.status===404&&u===""?(i=204,a="No Content"):n={message:u}}if(n&&t.shouldThrowOnError)throw new w9(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:a}}returns(){return this}overrideTypes(){return this}},k9=class extends _9{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.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:s=!1,format:i="text"}={}){var a;const o=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${o};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};
317const p_=new RegExp("[,()]");var mo=class extends k9{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"&&p_.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"&&p_.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>n!==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}},S9=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const a=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",a),r&&l.append("Prefer",`count=${r}`),new mo({method:s,url:o,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),n||a.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(o.length>0){const l=[...new Set(o)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new mo({method:s,url:i,headers:a,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:s=!0}={}){var i;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&o.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);o.searchParams.set("columns",u.join(","))}}return new mo({method:a,url:o,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new mo({method:r,url:s,headers:i,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:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new mo({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function E9(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C9(e){var t=E9(e,"string");return yu(t)=="symbol"?t:t+""}function T9(e,t,n){return(t=C9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Td(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
317t%2?m_(Object(n),!0).forEach(function(r){T9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var A9=class V2{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=a;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,p=setTimeout(()=>d.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(p),l(c,u);const v=()=>{clearTimeout(p),d.abort()};return f.addEventListener("abort",v,{once:!0}),l(c,Td(Td({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(p),f.removeEventListener("abort",v)})}return l(c,Td(Td({},u),{},{signal:d.signal})).finally(()=>clearTimeout(p))}:this.fetch=l,this.retry=o}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new S9(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 V2(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var a;let o;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),d=r&&Object.values(n).some(u);d?(o="POST",c=n):r||s?(o=r?"HEAD":"GET",Object.entries(n).filter(([f,v])=>v!==void 0).map(([f,v])=>[f,Array.isArray(v)?`{${v.join(",")}}`:`${v}`]).forEach(([f,v])=>{l.searchParams.append(f,v)})):(o="POST",c=n);const p=new Headers(this.headers);return d?p.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&p.set("Prefer",`count=${i}`),new mo({method:o,url:l,headers:p,schema:this.schemaName,body:c,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class P9{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 s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const a=i.node,o=parseInt(a.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
318import ws from "ws"
319new 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+=`
320
321Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const j9="2.105.4",N9=`realtime-js/${j9}`,R9="1.0.0",U2="2.0.0",O9=U2,I9=1e4,D9=100,yi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},H2={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},uv={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class L9{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},a=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,n,r){var s,i;const a=t.topic,o=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+o.length+a.length+c.length+d.length,f=new ArrayBuffer(this.HEADER_LENGTH+p);let v=new DataView(f),x=0;v.setUint8(x++,this.KINDS.userBroadcastPush),v.setUint8(x++,l.length),v.setUint8(x++,o.length),v.setUint8(x++,a.length),v.setUint8(x++,c.length),v.setUint8(x++,d.length),v.setUint8(x++,n),Array.from(l,g=>v.setUint8(x++,g.charCodeAt(0))),Array.from(o,g=>v.setUint8(x++,g.charCodeAt(0))),Array.from(a,g=>v.setUint8(x++,g.charCodeAt(0))),Array.from(c,g=>v.setUint8(x++,g.charCodeAt(0))),Array.from(d,g=>v.setUint8(x++,g.charCodeAt(0)));var w=new Uint8Array(f.byteLength+r.byteLength);return w.set(new Uint8Array(f),0),w.set(new Uint8Array(r),f.byteLength),w.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,a,o,l]=r;
321return n({join_ref:s,ref:i,topic:a,event:o,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),a=n.getUint8(3),o=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+a));l=l+a;const p=t.slice(l,t.byteLength),f=o===this.JSON_ENCODING?JSON.parse(r.decode(p)):p,v={type:this.BROADCAST_EVENT,event:u,payload:f};return a>0&&(v.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,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 Ze;(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"})(Ze||(Ze={}));const g_=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,a)=>(i[a]=M9(a,e,t,s),i),{}):{}},M9=(e,t,n,r)=>{const s=t.find(o=>o.name===e),i=s==null?void 0:s.type,a=n[e];return i&&!r.includes(i)?W2(i,a):dv(a)},W2=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return B9(t,n)}switch(e){case Ze.bool:return $9(t);case Ze.float4:case Ze.float8:case Ze.int2:case Ze.int4:case Ze.int8:case Ze.numeric:case Ze.oid:return F9(t);case Ze.json:case Ze.jsonb:return z9(t);case Ze.timestamp:return V9(t);case Ze.abstime:case Ze.date:case Ze.daterange:case Ze.int4range:case Ze.int8range:case Ze.money:case Ze.reltime:case Ze.text:case Ze.time:case Ze.timestamptz:case Ze.timetz:case Ze.tsrange:case Ze.tstzrange:return dv(t);default:return dv(t)}},dv=e=>e,$9=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},F9=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},z9=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},B9=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const a=e.slice(1,n);try{i=JSON.parse("["+a+"]")}catch{i=a?a.split(","):[]}return i.map(o=>W2(t,o))}return e},V9=e=>typeof e=="string"?e.replace(" ","T"):e,q2=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 Rc=e=>typeof e=="function"?e:function(){return e},U9=typeof self<"u"?self:null,go=typeof window<"u"?window:null,es=U9||go||globalThis,H9="2.0.0",W9=1e4,q9=1e3,as={connecting:0,open:1,closing:2,closed:3},xn={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Rs={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},hv={longpoll:"longpoll",websocket:"websocket"},Z9={complete:4},fv="base64url.bearer.phx.",Ad=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.recHooks=[],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()}
vendor: 8,135 bytes, line 321
321matchReceive({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})}},Z2=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))}},G9=class{constructor(e,t,n){this.state=xn.closed,this.topic=e,this.params=Rc(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ad(this,Rs.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Z2(()=>{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=xn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=xn.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=xn.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=xn.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 Ad(this,Rs.leave,Rc({}),this.timeout).send(),this.state=xn.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Rs.reply,(r,s)=>{this.trigger(this.replyEventName(s),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=xn.closed,this.bindings=[]}onClose(e){this.on(Rs.close,e)}onError(e){return this.on(Rs.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 Ad(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=xn.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Rs.close,"leave")},n=new Ad(this,Rs.leave,Rc({}),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=xn.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(a=>a.event===e&&this.filterBindings(a,t,n));for(let a=0;a<i.length;a++)i[a].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===xn.closed}isErrored(){return this.state===xn.errored}isJoined(){return this.state===xn.joined}isJoining(){return this.state===xn.joining}isLeaving(){return this.state===xn.leaving}},kf=class{static request(e,t,n,r,s,i,a){if(es.XDomainRequest){let o=new es.XDomainRequest;return this.xdomainRequest(o,e,t,r,s,i,a)}else if(es.XMLHttpRequest){let o=new es.XMLHttpRequest;return this.xhrRequest(o,e,t,n,r,s,i,a)}else{if(es.fetch&&es.AbortController)return this.fetchRequest(e,t,n,r,s,i,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,a){let o={method:e,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),o.signal=l.signal),es.fetch(t,o).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>a&&a(c)).catch(c=>{c.name==="AbortError"&&i?i():a&&a(null)}),l}static xdomainRequest(e,t,n,r,s,i,a){return e.timeout=s,e.open(t,n),e.onload=()=>{let o=this.parseJSON(e.responseText);a&&a(o)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,a,o){e.open(t,n,!0),e.timeout=i;for(let[l,c]of Object.entries(r))e.setRequestHeader(l,c);return e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{if(e.readyState===Z9.complete&&o){let l=this.parseJSON(e.responseText);o(l)}},a&&(e.ontimeout=a),e.send(s),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 s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}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)}`}},K9=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},to=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(fv)&&(this.authToken=atob(t[1].slice(fv.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=as.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+hv.websocket),"$1/"+hv.longpoll)}endpointURL(){return kf.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=as.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===as.open||this.readyState===as.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:s}=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:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=as.open,this.onopen({}),this.poll();break;
321case 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=K9(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(`
322`),()=>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 s of this.reqs)s.abort();this.readyState=as.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,s){let i,a=()=>{this.reqs.delete(i),r()};i=kf.request(e,this.endpointURL(),t,n,this.timeout,a,o=>{this.reqs.delete(i),this.isActive()&&s(o)}),this.reqs.add(i)}},Y9=class fc{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,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel.joinRef(),this.state=fc.syncState(this.state,s,i,a),this.pendingDiffs.forEach(l=>{this.state=fc.syncDiff(this.state,l,i,a)}),this.pendingDiffs=[],o()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=fc.syncDiff(this.state,s,i,a),o())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return fc.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),a={},o={};return this.map(i,(l,c)=>{n[l]||(o[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(x=>x.phx_ref),p=u.metas.map(x=>x.phx_ref),f=c.metas.filter(x=>p.indexOf(x.phx_ref)<0),v=u.metas.filter(x=>d.indexOf(x.phx_ref)<0);f.length>0&&(a[l]=c,a[l].metas=f),v.length>0&&(o[l]=this.clone(u),o[l].metas=v)}else a[l]=c}),this.syncDiff(i,{joins:a,leaves:o},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:a}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(o,l)=>{let c=t[o];if(t[o]=this.clone(l),c){let u=t[o].metas.map(p=>p.phx_ref),d=c.metas.filter(p=>u.indexOf(p.phx_ref)<0);t[o].metas.unshift(...d)}r(o,c,l)}),this.map(a,(o,l)=>{let c=t[o];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(o,c,l),c.metas.length===0&&delete t[o]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Pd={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,s,i,a]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:a})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,a=this.META_LENGTH+t.length+n.length+s.length+r.length,o=new ArrayBuffer(this.HEADER_LENGTH+a),l=new DataView(o),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,t.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(t,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(o.byteLength+i.byteLength);return u.set(new Uint8Array(o),0),u.set(new Uint8Array(i),o.byteLength),u.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)}}
322,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(e.slice(a,a+r));a=a+r;let l=n.decode(e.slice(a,a+s));a=a+s;let c=n.decode(e.slice(a,a+i));a=a+i;let u=e.slice(a,e.byteLength);return{join_ref:o,ref:null,topic:l,event:c,payload:u}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),a=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(e.slice(o,o+r));o=o+r;let c=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+i));o=o+i;let d=n.decode(e.slice(o,o+a));o=o+a;let p=e.slice(o,e.byteLength),f={status:d,response:p};return{join_ref:l,ref:c,topic:u,event:Rs.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,a=n.decode(e.slice(i,i+r));i=i+r;let o=n.decode(e.slice(i,i+s));i=i+s;let l=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:a,event:o,payload:l}}},J9=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||W9,this.transport=t.transport||es.WebSocket||to,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=es&&es.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Pd.encode.bind(Pd),this.defaultDecoder=Pd.decode.bind(Pd),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!==to?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;go&&go.addEventListener&&(go.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),go.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),go.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=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,i,a)=>{console.log(`${s}: ${i}`,a)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Rc(t.params||{}),this.endPoint=`${e}/${hv.websocket}`,this.vsn=t.vsn||H9,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Z2(()=>{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 to}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=kf.appendParams(kf.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=Rc(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==to?this.connectWithF
vendor: 4,379 bytes, line 322
322allback(to,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(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case to:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${fv}${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,s,i,a=this.transportName(e),o=l=>{this.log("transport",`falling back to ${a}...`,l),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),o(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(o,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(),q9,"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===as.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)}
322triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Rs.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case as.connecting:return"connecting";case as.open:return"open";case as.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 G9(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,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:s,ref:i,join_ref:a}=t;if(i&&i===this.pendingHeartbeatRef){const o=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",o)}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",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let o=0;o<this.channels.length;o++){const l=this.channels[o];l.isMember(n,r,s,a)&&l.trigger(r,s,i,a)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}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 Oc{constructor(t,n){const r=X9(n);this.presence=new Y9(t.getChannel(),r),this.presence.onJoin((s,i,a)=>{const o=Oc.onJoinPayload(s,i,a);t.getChannel().trigger("presence",o)}),this.presence.onLeave((s,i,a)=>{const o=Oc.onLeavePayload(s,i,a);t.getChannel().trigger("presence",o)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Oc.transformState(this.presence.state)}static transformState(t){return t=Q9(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=xh(s),n},{})}static onJoinPayload(t,n,r){const s=y_(n),i=xh(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=y_(n),i=xh(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function xh(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function Q9(e){return JSON.parse(JSON.stringify(e))}function X9(e){return(e==null?void 0:e.events)&&{events:e.events}}function y_(e){return e!=null&&e.metas?xh(e):[]}var v_;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(v_||(v_={}));class e6{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Oc(this.channel.channelAdapter,n)}}function t6(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);
322if(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 n6{constructor(t,n,r){const s=r6(r);this.channel=t.getSocket().channel(n,s),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 s;try{s=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>D9){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}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===yi.joined}isJoined(){return this.state===yi.joined}isJoining(){return this.state===yi.joining}isClosed(){return this.state===yi.closed}isLeaving(){return this.state===yi.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function r6(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var x_;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(x_||(x_={}));var Io;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Io||(Io={}));var Os;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Os||(Os={}));class Ic{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 s,i;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 n6(this.socket.socketAdapter,t,this.params),this.presence=new e6(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=q2(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:o,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Io.PRESENCE]&&this.bindings[Io.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},p={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(f=>{t==null||t(Os.CHANNEL_ERROR,t6(f))}),this._onClose(()=>t==null?void 0:t(Os.CLOSED)),this.updateJoinPayload(Object.assign({config:p},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:f})=>{if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(Os.SUBSCRIBED);return}this._updatePostgresBindings(f,t)}).receive("error",f=>{this.state=yi.errored;const v=Object.values(f).join(", ")||"error";t==null||t(Os.CHANNEL_ERROR,new Error(v,{cause:f}))}).receive("timeout",()=>{t==null||t(Os.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,a=[];for(let o=0;o<i;o++){const l=s[o],{filter:{event:c,schema:u,table:d,filter:p}}=l,f=t&&t[o];if(f&&f.event===c&&Ic.isFilterValueEqual(f.schema,u)&&Ic.isFilterValueEqual(f.table,d)&&Ic.isFilterValueEqual(f.filter,p))a.push(Object.assign(Object.assign({},l),{id:f.id}));else{this.unsubscribe(),this.state=yi.errored,n==null||n(Os.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=yi.errored&&n&&n(Os.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 s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Io.PRESENCE||t===Io.POSTGRES_CHANGES;if(s&&i)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 s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(o.status===202)return{success:!0};let l=o.statusText;
322try{const c=await o.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:a}=t,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:a,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var a,o,l;const c=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("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 s=new AbortController,i=setTimeout(()=>s.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),a}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),a={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,a,o,l,c,u;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const p=(s=this.bindings[d])===null||s===void 0?void 0:s.find(f=>f.ref===t.ref);if(!p)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in p){const f=p.id,v=(i=p.filter)===null||i===void 0?void 0:i.event;return f&&((a=n.ids)===null||a===void 0?void 0:a.includes(f))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((o=n.data)===null||o===void 0?void 0:o.type.toLocaleLowerCase()))}else{const f=(c=(l=p==null?void 0:p.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return f==="*"||f===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:a}=H2;return n&&[r,s,i,a].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:a,commit_timestamp:o,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:a,commit_timestamp:o,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}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=g_(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=g_(t.columns,t.old_record)),n}}class s6{constructor(t,n){this.socket=new J9(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,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("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()==uv.connecting}isDisconnecting(){return this.socket.connectionState()==uv.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const w_={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},i6=[1e3,2e3,5e3,1e4],a6=1e4;function o6(){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 l6(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return o6()}const c6=`
323  addEventListener("message", (e) => {
324    if (e.data.event === "start") {
325      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
326    }
327  });`;class u6{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={}
327,this.ref=0,this.serializer=new L9,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((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 s=this._initializeOptions(n);this.socketAdapter=new s6(t,s),this.httpEndpoint=q2(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}
328
329To use Realtime in Node.js, you need to provide a WebSocket implementation:
330
331Option 1: Use Node.js 22+ which has native WebSocket support
332Option 2: Install and provide the "ws" package:
333
334  npm install ws
335
336  import ws from "ws"
337  const client = new RealtimeClient(url, {
338    ...options,
339    transport: ws
340  })`):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 s=await r.unsubscribe();return r.teardown(),s}),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()||uv.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Ic(`realtime:${t}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}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}
340this._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(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:N9};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(H2.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([c6],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,a,o,l,c,u,d,p,f;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=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:I9,v.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:w_.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(a=t==null?void 0:t.disconnectOnEmptyChannelsAfterMs)!==null&&a!==void 0?a:2*((o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:w_.HEARTBEAT_INTERVAL),v.transport=(l=t==null?void 0:t.transport)!==null&&l!==void 0?l:P9.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=(c=t==null?void 0:t.sessionStorage)!==null&&c!==void 0?c:l6(),v.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:y=>i6[y-1]||a6;let x,w;const g=(d=t==null?void 0:t.vsn)!==null&&d!==void 0?d:O9;switch(g){case R9:x=(y,m)=>m(JSON.stringify(y)),w=(y,m)=>m(JSON.parse(y));break;case U2:x=this.serializer.encode.bind(this.serializer),w=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${v.vsn}`)}if(v.vsn=g,v.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:x,v.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:w,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()}}
340var vu=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 d6(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function h6(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 f6(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:a}){const o=d6(e.baseUrl,r,s),l=await h6(e.auth),c=await t(o,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...a},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),p=d&&u?JSON.parse(u):u;if(!c.ok){const f=d?p:void 0,v=f==null?void 0:f.error;throw new vu((v==null?void 0:v.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:f})}return{status:c.status,headers:c.headers,data:p}}}}function jd(e){return e.join("�")}var p6=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:jd(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/${jd(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jd(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${jd(e.namespace)}`}),!0}catch(t){if(t instanceof vu&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof vu&&n.status===409)return;throw n}}};function no(e){return e.join("�")}var m6=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/${no(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/${no(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/${no(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/${no(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/${no(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/${no(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof vu&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof vu&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},g6=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=f6({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new p6(this.client,t),this.tableOps=new m6(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)}
340async 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 xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function y6(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v6(e){var t=y6(e,"string");return xu(t)=="symbol"?t:t+""}function x6(e,t,n){return(t=v6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b_(Object(n),!0).forEach(function(r){x6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Np=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 Rp(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var pv=class extends Np{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 be({},super.toJSON())}},G2=class extends Np{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};function Sf(e,t,n){const r=be({},e),s=t.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function w6(e){const t={};for(const[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}const b6=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),_6=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)},mv=e=>{if(Array.isArray(e))return e.map(n=>mv(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=mv(r)}),t},k6=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),__=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)},S6=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&"json"in e&&typeof e.json=="function"){const s=e;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||i+"";t(new pv(__(a),i,o,r))}).catch(()=>{const a=i+"";t(new pv(s.statusText||`HTTP ${i} error`,i,a,r))})}else t(new G2(__(e),e,r))},E6=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return be(be({},s),n);if(_6(r)){var i;const a=(t==null?void 0:t.headers)||{};let o;for(const[l,c]of Object.entries(a))l.toLowerCase()==="content-type"&&(o=c);s.headers=Sf(a,"Content-Type",(i=o)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),be(be({},s),n)};async function Xl(e,t,n,r,s,i,a){return new Promise((o,l)=>{e(n,E6(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(a==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>o(c)).catch(c=>S6(c,l,r,a))})}function K2(e="storage"){return{get:async(t,n,r,s)=>Xl(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Xl(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Xl(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Xl(t,"HEAD",n,be(be({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Xl(t,"DELETE",n,s,i,r,e)}}const C6=K2("storage"),{get:wu,post:Ar,put:gv,head:T6,remove:Dx}=C6,Mn=K2("vectors");var Il=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=w6(t),this.fetch=b6(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Sf(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(Rp(n))return{data:null,error:n};throw n}}},A6=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;
340if(Rp(t))return{data:null,error:t};throw t}}};let Y2;Y2=Symbol.toStringTag;var P6=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Y2]="BlobDownloadBuilder",this.promise=null}asStream(){return new A6(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(Rp(t))return{data:null,error:t};throw t}}};const j6={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},k_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var N6=class extends Il{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const a=be(be({},k_),r);let o=be(be({},s.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",a.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",a.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,l&&(o["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))o=Sf(o,p,f);const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),d=await(e=="PUT"?gv:Ar)(s.fetch,`${s.url}/object/${u}`,i,be({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:c,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 s=this;const i=s._removeEmptyFolders(e),a=s._getFinalPath(i),o=new URL(s.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",t),s.handleOperation(async()=>{let l;const c=be(be({},k_),r);let u=be(be({},s.headers),{"x-upsert":String(c.upsert)});const d=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),d&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(d))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,d&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[p,f]of Object.entries(r.headers))u=Sf(u,p,f);return{path:i,fullPath:(await gv(s.fetch,o.toString(),l,be({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=be({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Ar(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),a=new URL(n.url+i.url),o=a.searchParams.get("token");if(!o)throw new Np("No token returned by API");return{signedUrl:a.toString(),path:e,token:o}})}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 Ar(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
340stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Ar(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 s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let a=await Ar(r.fetch,`${r.url}/object/sign/${s}`,be({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const o=new URLSearchParams;n!=null&&n.download&&o.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&o.set("cacheNonce",String(n.cacheNonce));const l=o.toString();return{signedUrl:encodeURI(`${r.url}${a.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await Ar(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const a=i.toString();return s.map(o=>be(be({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${a?`&${a}`:""}`):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",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),a=this._getFinalPath(e),o=()=>wu(this.fetch,`${this.url}/${r}/${a}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new P6(o,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>mv(await wu(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await T6(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Rp(s)){var r;const i=s instanceof pv?s.status:s instanceof G2?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}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 s=r.toString(),i=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}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await Dx(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 s=be(be(be({},j6),t),{},{prefix:e||""});return await Ar(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=be({},e);return await Ar(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 R6="2.105.4",Wu={"X-Client-Info":`storage-js/${R6}`};var O6=class extends Il{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),a=be(be({},Wu),t);super(i,a,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await wu(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await wu(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Ar(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 gv(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 Ar(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dx(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():""}},I6=class extends Il{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=be(be({},Wu),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ar(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(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await wu(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dx(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!k6(e))throw new Np("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 g6({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
340),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const a=s[i];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(s,o),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},D6=class extends Il{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=be(be({},Wu),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Mn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Mn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},L6=class extends Il{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=be(be({},Wu),{},{"Content-Type":"application/json"},t);super(r,s,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 Mn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Mn.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 Mn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Mn.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 Mn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},M6=class extends Il{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=be(be({},Wu),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Mn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},$6=class extends M6{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new F6(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)}},F6=class extends D6{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,be(be({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,be(be({},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 z6(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
340,z6=class extends L6{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,be(be({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,be(be({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,be(be({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,be(be({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,be(be({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},B6=class extends O6{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new N6(this.url,this.headers,e,this.fetch)}get vectors(){return new $6(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new I6(this.url+"/iceberg",this.headers,this.fetch)}};function Op(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const J2="2.105.4",yo=30*1e3,yv=3,Vm=yv*yo,V6="http://localhost:9999",U6="supabase.auth.token",H6={"X-Client-Info":`gotrue-js/${J2}`},vv="X-Supabase-Api-Version",Q2={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},W6=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,q6=10*60*1e3;class bu 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 ne(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Z6 extends bu{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function G6(e){return ne(e)&&e.name==="AuthApiError"}class Or extends bu{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ys extends bu{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Mt extends Ys{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Nd(e){return ne(e)&&e.name==="AuthSessionMissingError"}class ro extends Ys{constructor(){super("Auth session or user missing","AuthInvalidToken
340ResponseError",500,void 0)}}class Rd extends Ys{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Od extends Ys{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 K6(e){return ne(e)&&e.name==="AuthImplicitGrantRedirectError"}class S_ extends Ys{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 Y6 extends Ys{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 xv extends Ys{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Um(e){return ne(e)&&e.name==="AuthRetryableFetchError"}class E_ extends Ys{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 wv extends Ys{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ef="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),C_=` 	
341\r=`.split(""),J6=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<C_.length;t+=1)e[C_[t].charCodeAt(0)]=-2;for(let t=0;t<Ef.length;t+=1)e[Ef[t].charCodeAt(0)]=t;return e})();function T_(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(Ef[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(Ef[r]),t.queuedBits-=6}}function X2(e,t,n){const r=J6[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 A_(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=a=>{eB(a,r,n)};for(let a=0;a<e.length;a+=1)X2(e.charCodeAt(a),s,i);return t.join("")}function Q6(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 X6(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}Q6(r,t)}}function eB(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 Ko(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)X2(e.charCodeAt(s),n,r);return new Uint8Array(t)}function tB(e){const t=[];return X6(e,n=>t.push(n)),new Uint8Array(t)}function ba(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>T_(s,n,r)),T_(null,n,r),t.join("")}function nB(e){return Math.round(Date.now()/1e3)+e}function rB(){return Symbol("auth-callback")}const Ut=()=>typeof window<"u"&&typeof document<"u",oa={tested:!1,writable:!1},ej=()=>
341{if(!Ut())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(oa.tested)return oa.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),oa.tested=!0,oa.writable=!0}catch{oa.tested=!0,oa.writable=!1}return oa.writable};function sB(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const tj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),iB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",vo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},la=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Vt=async(e,t)=>{await e.removeItem(t)};class Ip{constructor(){this.promise=new Ip.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Ip.promiseConstructor=Promise;function Id(e){const t=e.split(".");if(t.length!==3)throw new wv("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!W6.test(t[r]))throw new wv("JWT not in base64url format");return{header:JSON.parse(A_(t[0])),payload:JSON.parse(A_(t[1])),signature:Ko(t[2]),raw:{header:t[0],payload:t[1]}}}async function aB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function oB(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const a=await e(i);if(!t(i,null,a)){r(a);return}}catch(a){if(!t(i,a)){s(a);return}}})()})}function lB(e){return("0"+e.toString(16)).substr(-2)}function cB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,lB).join("")}async function uB(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function dB(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 uB(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function so(e,t,n=!1){const r=cB();let s=r;n&&(s+="/recovery"),await vo(e,`${t}-code-verifier`,s);const i=await dB(r);return[i,r===i?"plain":"s256"]}const hB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function fB(e){const t=e.headers.get(vv);if(!t||!t.match(hB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function pB(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 mB(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 gB=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function As(e){if(!gB.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Sr(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 Hm(){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 yB(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
341if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function P_(e){return JSON.parse(JSON.stringify(e))}const ma=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)},vB=[502,503,504,520,521,522,523,524,530];async function j_(e){var t;if(!iB(e))throw new xv(ma(e),0);if(vB.includes(e.status))throw new xv(ma(e),e.status);let n;try{n=await e.json()}catch(i){throw new Or(ma(i),i)}let r;const s=fB(e);if(s&&s.getTime()>=Q2["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 E_(ma(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Mt}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,a)=>i&&typeof a=="string",!0))throw new E_(ma(n),e.status,n.weak_password.reasons);throw new Z6(ma(n),e.status||500,r)}const xB=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function he(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[vv]||(i[vv]=Q2["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const a=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await wB(e,t,n+o,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function wB(e,t,n,r,s,i){const a=xB(t,r,s,i);let o;try{o=await e(n,Object.assign({},a))}catch(l){throw console.error(l),new xv(ma(l),0)}if(o.ok||await j_(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await j_(l)}}function Qn(e){var t;let n=null;kB(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=nB(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function N_(e){const t=Qn(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 vi(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function bB(e){return{data:e,error:null}}function _B(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,a=Op(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},a);return{data:{properties:o,user:l},error:null}}function R_(e){return e}function kB(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}const Wm=["global","local","others"];class SB{constructor({url:t="",headers:n={},fetch:r,experimental:s}){this.url=t,this.headers=n,this.fetch=tj(r),this.experimental=s??{},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)}}async signOut(t,n=Wm[0]){if(Wm.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Wm.join(", ")}`);try{return await he(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ne(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await he(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:vi})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Op(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await he(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:_B,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ne(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await he(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:vi})}catch(n){if(ne(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,a,o,l;try{const c={nextPage:null,lastPage:0,total:0},u=await he(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:R_});if(u.error)throw u.error;const d=await u.json(),p=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,f=(l=(o=u.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(v=>{const x=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);c[`${w}Page`]=x}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ne(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){As(t);try{return await he(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:vi})}catch(n){if(ne(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){As(t);try{return await he(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:vi})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){As(t);
341try{return await he(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:vi})}catch(r){if(ne(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){As(t.userId);try{const{data:n,error:r}=await he(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _deleteFactor(t){As(t.userId),As(t.id);try{return{data:await he(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,a,o,l;try{const c={nextPage:null,lastPage:0,total:0},u=await he(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:R_});if(u.error)throw u.error;const d=await u.json(),p=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,f=(l=(o=u.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(v=>{const x=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);c[`${w}Page`]=x}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ne(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await he(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await he(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await he(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await he(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await he(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await he(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(ne(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await he(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await he(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await he(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ne(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await he(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _adminListPasskeys(t){Sr(this.experimental),As(t.userId);try{return await he(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ne(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(t){Sr(this.experimental),As(t.userId),As(t.passkeyId);
341try{return await he(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/passkeys/${t.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ne(n))return{data:null,error:n};throw n}}}function O_(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Kr={debug:!!(globalThis&&ej()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class nj extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class I_ extends nj{}async function EB(e,t,n){Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Kr.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 i=>{if(i){clearTimeout(s),Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new I_(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Kr.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}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(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&t>0){if(r.signal.aborted)return Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/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 a=>{if(a){Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,a.name);try{return await n()}finally{Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,a.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Kr.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new I_(`Lock "${e}" was released because another request stole it`)}throw i}}function CB(){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 rj(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function TB(e){return parseInt(e,16)}function AB(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function PB(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:l,resources:c,scheme:u,uri:d,version:p}=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(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);
341if(!((t=e.statement)===null||t===void 0)&&t.includes(`
342`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=rj(e.address),v=u?`${u}://${r}`:r,x=e.statement?`${e.statement}
343`:"",w=`${v} wants you to sign in with your Ethereum account:
344${f}
345
346${x}`;let g=`URI: ${d}
347Version: ${p}
348Chain ID: ${n}${a?`
349Nonce: ${a}`:""}
350Issued At: ${i.toISOString()}`;if(s&&(g+=`
351Expiration Time: ${s.toISOString()}`),o&&(g+=`
352Not Before: ${o.toISOString()}`),l&&(g+=`
353Request ID: ${l}`),c){let y=`
354Resources:`;for(const m of c){if(!m||typeof m!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${m}`);y+=`
355- ${m}`}g+=y}return`${w}
356${g}`}class Tt extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Cf extends Tt{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function jB({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Tt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Tt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Tt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Tt({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 Tt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Tt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new Tt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Tt({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 a=window.location.hostname;if(sj(a)){if(i.rp.id!==a)return new Tt({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Tt({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 Tt({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 Tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function NB({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 Tt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Tt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(sj(r)){if(n.rpId!==r)return new Tt({message:`The RP ID "${n.rpId}
356" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Tt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Tt({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 Tt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class RB{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 bv=new RB;function D_(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Op(e,["challenge","user","excludeCredentials"]),i=Ko(t).buffer,a=Object.assign(Object.assign({},n),{id:Ko(n.id).buffer}),o=Object.assign(Object.assign({},s),{challenge:i,user:a});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];o.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Ko(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return o}function L_(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=Op(e,["challenge","allowCredentials"]),s=Ko(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const o=n[a];i.allowCredentials[a]=Object.assign(Object.assign({},o),{id:Ko(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return i}function M_(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:ba(new Uint8Array(e.response.attestationObject)),clientDataJSON:ba(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function $_(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ba(new Uint8Array(s.authenticatorData)),clientDataJSON:ba(new Uint8Array(s.clientDataJSON)),signature:ba(new Uint8Array(s.signature)),userHandle:s.userHandle?ba(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function sj(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Tf(){var e,t;return!!(Ut()&&"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 ij(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Cf("Browser returned unexpected credential type",t)}:{data:null,error:new Cf("Empty credential response",t)}}catch(t){return{data:null,error:jB({error:t,options:e})}}}async function aj(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Cf("Browser returned unexpected credential type",t)}:{data:null,error:new Cf("Empty credential response",t)}}
356catch(t){return{data:null,error:NB({error:t,options:e})}}}const OB={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},IB={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Af(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const a=s[i];if(a!==void 0)if(Array.isArray(a))r[i]=a;else if(n(a))r[i]=a;else if(t(a)){const o=r[i];t(o)?r[i]=Af(o,a):r[i]=Af(a)}else r[i]=a}return r}function DB(e,t){return Af(OB,e,t||{})}function LB(e,t){return Af(IB,e,t||{})}class MB{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var a;try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:l};const c=s??bv.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const f=(await this.client.getUser()).data.user,v=((a=f==null?void 0:f.user_metadata)===null||a===void 0?void 0:a.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${v}`}}u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=DB(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:p}=await ij({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:p}}case"request":{const u=LB(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:p}=await aj(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:p}}}}catch(o){return ne(o)?{data:null,error:o}:{data:null,error:new Or("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new bu("rpId is required for WebAuthn authentication")};
356try{if(!Tf())return{data:null,error:new Or("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!a)return{data:null,error:o};const{webauthn:l}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(a){return ne(a)?{data:null,error:a}:{data:null,error:new Or("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new bu("rpId is required for WebAuthn registration")};try{if(!Tf())return{data:null,error:new Or("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:o};const{data:l,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(a){return ne(a)?{data:null,error:a}:{data:null,error:new Or("Unexpected error in register",a)}}}}CB();const $B={url:V6,storageKey:U6,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:H6,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function F_(e,t,n){return await n()}const io={};class _u{get jwks(){var t,n;return(n=(t=io[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){io[this.storageKey]=Object.assign(Object.assign({},io[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=io[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){io[this.storageKey]=Object.assign(Object.assign({},io[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s,i;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 a=Object.assign(Object.assign({},$B),t);if(this.storageKey=a.storageKey,this.instanceID=(n=_u.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,_u.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Ut()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.experimental=(r=a.experimental)!==null&&r!==void 0?r:{},this.admin=new SB({url:a.url,headers:a.headers,fetch:a.fetch,experimental:this.experimental}),this.url=a.url,this.headers=a.headers,this.fetch=tj(a.fetch),this.lock=a.lock||F_,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Ut()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=EB:this.lock=F_,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 MB(this)}
356,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?(a.storage?this.storage=a.storage:ej()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=O_(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=O_(this.memoryStorage)),Ut()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${J2}) ${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(Ut()&&(n=sB(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Ut()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),K6(i)){const l=(t=i.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:i}}return{error:i}}const{session:a,redirectType:o}=s;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ne(n)?this._returnResult({error:n}):this._returnResult({error:new Or("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Qn}),{data:a,error:o}=i;if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(ne(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:d,options:p}=t;let f=null,v=null;this.flowType==="pkce"&&([f,v]=await so(this.storage,this.storageKey)),i=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,password:d,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:v},xform:Qn})}else if("phone"in t){const{phone:u,password:d,options:p}=t;i=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Qn})}else throw new Rd("You must provide either an email or phone number and a password");const{data:a,error:o}=i;if(o||!a)return await Vt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:a,options:o}=t;n=await he(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:N_})}else if("phone"in t){const{phone:i,password:a,options:o}=t;n=await he(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:N_})}else throw new Rd("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new ro;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(ne(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,a,o,l,c,u,d,p;let f,v;if("message"in t)f=t.message,v=t.signature;else{const{chain:x,wallet:w,statement:g,options:y}=t;let m;if(Ut())if(typeof w=="object")m=w;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")m=j.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 w!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");m=w}const _=new URL((n=y==null?void 0:y.url)!==null&&n!==void 0?n:window.location.href),k=await m.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=rj(k[0]);let E=(r=y==null?void 0:y.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const j=await m.request({method:"eth_chainId"});E=TB(j)}const P={domain:_.host,address:S,statement:g,uri:_.href,version:"1",chainId:E,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(a=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=y==null?void 0:y.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=PB(P),v=await m.request({method:"personal_sign",params:[AB(f),S]})}try{const{data:x,error:w}=await he(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:v},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Qn});if(w)throw w;if(!x||!x.session||!x.user){const g=new ro;return this._returnResult({data:{user:null,session:null},error:g})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:w})}
356catch(x){if(ne(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(t){var n,r,s,i,a,o,l,c,u,d,p,f;let v,x;if("message"in t)v=t.message,x=t.signature;else{const{chain:w,wallet:g,statement:y,options:m}=t;let _;if(Ut())if(typeof g=="object")_=g;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))_=S.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 g!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=g}const k=new URL((n=m==null?void 0:m.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const S=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},m==null?void 0:m.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),y?{statement:y}:null));let E;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")E=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)E=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)v=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),x=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${k.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${k.href}`,`Issued At: ${(s=(r=m==null?void 0:m.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=m==null?void 0:m.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${m.signInWithSolana.notBefore}`]:[],...!((a=m==null?void 0:m.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${m.signInWithSolana.expirationTime}`]:[],...!((o=m==null?void 0:m.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${m.signInWithSolana.chainId}`]:[],...!((l=m==null?void 0:m.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${m.signInWithSolana.nonce}`]:[],...!((c=m==null?void 0:m.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${m.signInWithSolana.requestId}`]:[],...!((d=(u=m==null?void 0:m.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...m.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
357`);const S=await _.signMessage(new TextEncoder().encode(v),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=S}}try{const{data:w,error:g}=await he(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:ba(x)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Qn});if(g)throw g;if(!w||!w.session||!w.user){const y=new ro;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:g})}catch(w){if(ne(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const n=await la(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new Y6;const{data:i,error:a}=await he(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Qn});if(await Vt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!i||!i.session||!i.user){const o=new ro;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:a})}catch(i){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:a}=t,o=await he(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Qn}),{data:l,error:c}=o;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new ro;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(ne(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,a;try{if("email"in t){const{email:o,options:l}=t;
357let c=null,u=null;this.flowType==="pkce"&&([c,u]=await so(this.storage,this.storageKey));const{error:d}=await he(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,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:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:o,options:l}=t,{data:c,error:u}=await he(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new Rd("You must provide either an email or phone number.")}catch(o){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:o}=await he(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Qn});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,c=a.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:c,session:l},error:null})}catch(s){if(ne(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,a;try{let o=null,l=null;this.flowType==="pkce"&&([o,l]=await so(this.storage,this.storageKey));const c=await he(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:l}),headers:this.headers,xform:bB});return!((i=c.data)===null||i===void 0)&&i.url&&Ut()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(o){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(o))return this._returnResult({data:null,error:o});throw o}}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 Mt;const{error:s}=await he(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(ne(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:a}=await he(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:a,error:o}=await he(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new Rd("You must provide either an email or phone number and a type")}catch(n){if(ne(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await la(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
357id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Vm:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await la(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=Hm()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=yB(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await he(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:vi}):await this._useSession(async n=>{var r,s,i;const{data:a,error:o}=n;if(o)throw o;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Mt}:await he(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=a.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:vi})})}catch(n){if(ne(n))return Nd(n)&&(await this._removeSession(),await Vt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Mt;const a=s.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await so(this.storage,this.storageKey));const{data:c,error:u}=await he(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:a.access_token,xform:vi});if(u)throw u;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(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 Mt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:a}=Id(t.access_token);if(a.exp&&(r=a.exp,s=r<=n),s){const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o)return{data:{user:null,session:null},error:null};i=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(ne(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:a,error:o}=n;if(o)throw o;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Mt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ne(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){var r;try{if(!Ut())throw new Od("No browser detected.");
357if(t.error||t.error_description||t.error_code)throw new Od(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 S_("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Od("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 S_("No code detected.");const{data:m,error:_}=await this._exchangeCodeForSession(t.code);if(_)throw _;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:m.session,redirectType:(r=m.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!a||!l||!o||!u)throw new Od("No session defined in URL");const d=Math.round(Date.now()/1e3),p=parseInt(l);let f=d+p;c&&(f=parseInt(c));const v=f-d;v*1e3<=yo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${p}s`);const x=f-p;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,f,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,f,d);const{data:w,error:g}=await this._getUser(a);if(g)throw g;const y={provider_token:s,provider_refresh_token:i,access_token:a,expires_in:p,expires_at:f,refresh_token:o,token_type:u,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(s){if(ne(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_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 la(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Nd(i))return this._returnResult({error:i});const a=(r=s.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:o}=await this.admin.signOut(a,t);if(o&&!(G6(o)&&(o.status===404||o.status===401||o.status===403)||Nd(o)))return this._returnResult({error:o})}return t!=="others"&&(await this._removeSession(),await Vt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=rB(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),Nd(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await so(this.storage,this.storageKey,!0));try{return await he(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var a,o,l,c,u;const{data:d,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await he(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Ut()&&!(!((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(ne(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
357if(s)throw s;const{options:a,provider:o,token:l,access_token:c,nonce:u}=t,d=await he(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Qn}),{data:p,error:f}=d;return f?this._returnResult({data:{user:null,session:null},error:f}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new ro}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:f}))}catch(s){if(await Vt(this.storage,`${this.storageKey}-code-verifier`),ne(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:a}=n;if(a)throw a;return await he(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ne(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 oB(async s=>(s>
3570&&await aB(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await he(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Qn})),(s,i)=>{const a=200*Math.pow(2,s);return i&&Um(i)&&Date.now()+a-r<yo})}catch(r){if(this._debug(n,"error",r),ne(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),Ut()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await la(this.storage,this.storageKey);if(s&&this.userStorage){let a=await la(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:s.user},await vo(this.userStorage,this.storageKey+"-user",a)),s.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:Hm()}else if(s&&!s.user&&!s.user){const a=await la(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(s.user=a.user,await Vt(this.storage,this.storageKey+"-user"),await vo(this.storage,this.storageKey,s)):s.user=Hm()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Vm;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Vm}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:a}=await this._callRefreshToken(s.refresh_token);a&&(console.error(a),Um(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(s.access_token);!o&&(a!=null&&a.user)?(s.user=a.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Mt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Ip;const{data:i,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!i.session)throw new Mt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const o={data:i.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(i){if(this._debug(s,"error",i),ne(i)){const a={data:null,error:i};return Um(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(a),i.length>0){for(let o=0;o<i.length;o+=1)console.error(i[o]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Vt(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 vo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=P_(s);await vo(this.storage,this.storageKey,i)}else{const s=P_(n);await vo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Vt(this.storage,this.storageKey),await Vt(this.storage,this.storageKey+"-code-verifier"),await Vt(this.storage,this.storageKey+"-user"),this.userStorage&&await Vt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ut()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
357catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),yo);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/yo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${yo}ms, refresh threshold is ${yv} ticks`),s<=yv&&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 nj)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ut()||!(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 s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,a]=await so(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(o.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await he(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=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:c}=await he(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.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(ne(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?M_(t.webauthn.credential_response):$_(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:l}=await he(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.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)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:l}))})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const a=await he(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:D_(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:L_(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:f}=Id(t);let v=null;f.aal&&(v=f.aal);let x=v;const{data:{user:w},error:g}=await this.getUser(t);if(g)return this._returnResult({data:null,error:g});((r=(n=w==null?void 0:w.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(x="aal2");const m=f.amr||[];return{data:{currentLevel:v,nextLevel:x,currentAuthenticationMethods:m},error:null}}catch(f){if(ne(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:a},error:o}
357=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Id(a.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=a.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const p=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await he(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Mt})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Mt});const a=await he(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ut()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Mt});const a=await he(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ut()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(ne(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 he(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Mt})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await he(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 Mt})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(o=>o.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(o=>o.kid===t),r&&this.jwks_cached_at+q6>s)return r;const{data:i,error:a}=await he(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(o=>o.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:v}
357=await this.getSession();if(v||!f.session)return this._returnResult({data:null,error:v});r=f.session.access_token}const{header:s,payload:i,signature:a,raw:{header:o,payload:l}}=Id(r);n!=null&&n.allowExpired||pB(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:a},error:null}}const u=mB(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,a,tB(`${o}.${l}`)))throw new wv("Invalid JWT signature");return{data:{claims:i,header:s,signature:a},error:null}}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(t){var n,r,s;Sr(this.experimental);try{if(!Tf())return this._returnResult({data:null,error:new Or("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyAuthentication({options:{captchaToken:(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.captchaToken}});if(a||!i)return this._returnResult({data:null,error:a});const o=L_(i.options),l=(s=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:bv.createNewAbortSignal(),{data:c,error:u}=await aj({publicKey:o,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new Or("WebAuthn ceremony failed",null)});const d=$_(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(ne(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(t){var n,r;Sr(this.experimental);
357try{if(!Tf())return this._returnResult({data:null,error:new Or("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const a=D_(s.options),o=(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:bv.createNewAbortSignal(),{data:l,error:c}=await ij({publicKey:a,signal:o});if(c||!l)return this._returnResult({data:null,error:c??new Or("WebAuthn ceremony failed",null)});const u=M_(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if(ne(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){Sr(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 Mt});const{data:s,error:i}=await he(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _verifyPasskeyRegistration(t){Sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Mt});const{data:i,error:a}=await he(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:t.challengeId,credential:t.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(t){var n;Sr(this.experimental);try{const{data:r,error:s}=await he(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 s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(ne(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(t){Sr(this.experimental);try{const{data:n,error:r}=await he(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:t.challengeId,credential:t.credential},xform:Qn});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(ne(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){Sr(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 Mt});const{data:s,error:i}=await he(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(t){if(ne(t))return this._returnResult({data:null,error:t});throw t}}async _updatePasskey(t){Sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Mt});const{data:i,error:a}=await he(this.fetch,"PATCH",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:t.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(t){Sr(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Mt});const{error:i}
357=await he(this.fetch,"DELETE",`${this.url}/passkeys/${t.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(ne(n))return this._returnResult({data:null,error:n});throw n}}}_u.nextInstanceID={};const FB=_u,zB="2.105.4";let pc="";typeof Deno<"u"?pc="deno":typeof document<"u"?pc="web":typeof navigator<"u"&&navigator.product==="ReactNative"?pc="react-native":pc="node";const BB={"X-Client-Info":`supabase-js-${pc}/${zB}`},VB={headers:BB},UB={schema:"public"},HB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},WB={};function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function qB(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZB(e){var t=qB(e,"string");return ku(t)=="symbol"?t:t+""}function GB(e,t,n){return(t=ZB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(n),!0).forEach(function(r){GB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const KB=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YB=()=>Headers,JB=(e,t,n)=>{const r=KB(n),s=YB();return async(i,a)=>{var o;const l=(o=await t())!==null&&o!==void 0?o:e;let c=new s(a==null?void 0:a.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,xt(xt({},a),{},{headers:c}))}};function QB(e){return e.endsWith("/")?e:e+"/"}function XB(e,t){var n,r;const{db:s,auth:i,realtime:a,global:o}=e,{db:l,auth:c,realtime:u,global:d}=t,p={db:xt(xt({},l),s),auth:xt(xt({},c),i),realtime:xt(xt({},u),a),storage:{},global:xt(xt(xt({},d),o),{},{headers:xt(xt({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=o==null?void 0:o.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function eV(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(QB(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var tV=class extends FB{constructor(e){super(e)}},nV=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=eV(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const a=`sb-${i.hostname.split(".")[0]}-auth-token`,o={db:UB,realtime:WB,auth:xt(xt({},HB),{},{storageKey:a}),global:VB},l=XB(n??{},o);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,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 c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=JB(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(xt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new A9(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new B6(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new v9(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)}
357channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:a,lock:o,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:p},f,v){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tV({url:this.authUrl.href,headers:xt(xt({},x),f),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:a,lock:o,debug:l,throwOnError:c,experimental:u,fetch:v,lockAcquireTimeout:d,skipAutoInitialize:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new u6(this.realtimeUrl.href,xt(xt({},e),{},{params:xt(xt({},{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 rV=(e,t,n)=>new nV(e,t,n);function sV(){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}sV()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function iV(){var w,g;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}",s=n?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((g=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:g[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const a=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),o=a?/^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:""),c=l&&o.test(l)?[l]:a?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),f=(y,m,_)=>new Promise(k=>{const S=p();let E=!1,P;const j=O=>{E||(E=!0,clearTimeout(P),window.removeEventListener("message",R),k(O))},R=O=>{if(c.indexOf(O.origin)<0)return;const W=O.data;W&&W.type===u&&W.requestId===S&&j(W)};window.addEventListener("message",R);const M={type:y,requestId:S,projectId:s,key:m};_!==void 0&&(M.value=_);for(const O of c)window.parent.postMessage(M,O);P=setTimeout(()=>j(null),d)});let v=!0;const x=250;return{getItem:async y=>{let m=await f("lovable-preview-auth:get",y);return!m&&v&&(await new Promise(_=>setTimeout(_,x)),m=await f("lovable-preview-auth:get",y)),v=!1,m&&m.ok&&typeof m.value=="string"?m.value===""?(localStorage.removeItem(y),null):m.value:localStorage.getItem(y)},setItem:(y,m)=>(localStorage.setItem(y,m),f("lovable-preview-auth:set",y,m).then(()=>{})),removeItem:y=>(localStorage.removeItem(y),f("lovable-preview-auth:remove",y).then(()=>{}))}}const aV="https://nzaweyjfkrxnydlavsln.supabase.co",oV="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56YXdleWpma3J4b
357nlkbGF2c2xuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg5MjUwNjQsImV4cCI6MjA5NDUwMTA2NH0.E3JAGw56VmKq0Cb13TapBxP2rCYPEStF6AgZOQXck6E",kt=rV(aV,oV,{auth:{storage:iV(),persistSession:!0,autoRefreshToken:!0}});async function Lx(e,t){const{data:n,error:r}=await kt.functions.invoke("write-to-sheet",{body:{sheetName:e,row:t}});if(r)throw new Error(r.message||"Unable to record the lead in Google Sheets.");if(!(n!=null&&n.success))throw new Error((n==null?void 0:n.error)||"Unable to record the lead in Google Sheets.");return n}async function oj(e,t){const{error:n}=await kt.from("form_submissions").insert({form_key:e,data:t,source_url:typeof window<"u"?window.location.href.slice(0,500):null,user_agent:typeof navigator<"u"?navigator.userAgent.slice(0,500):null,status:"new"});if(n)throw new Error(n.message)}const lV=["You're closer than you think.","You're making a smart career decision.","Your healthcare journey is moving in the right direction.","This could be the beginning of something exciting.","A stronger next chapter starts right here.","You've just taken a meaningful step forward.","The right pathway is coming into focus.","Momentum is on your side.","You're one step closer to the career you want.","This is a decision your future self will thank you for.","You've moved from thinking about it to acting on it.","Your goals are now in motion.","The plan starts taking shape from here.","You're building something worth investing in.","A clear direction is now within reach.","You've done the hardest part — starting.","Your ambition just met the right guidance.","You're already ahead of most who only dream about this.","This is what a serious next step looks like.","Consider this the first mile of a much bigger journey."],cV=["Every healthcare professional who reaches their goals starts by taking one important step. You've just taken yours.","Growth begins when preparation meets opportunity — and you've now created both.","Investing in yourself today is what creates the opportunities that show up tomorrow.","Success in healthcare comes from continuous learning and the courage to act on it.","The professionals who move furthest are the ones who take clarity seriously — and that's exactly what you're doing.","Careers are built on decisions like this one: quiet, intentional, and forward-moving.","Real progress rarely feels dramatic in the moment; it usually looks a lot like what you just did.","The best pathways aren't stumbled upon — they're chosen. You just chose yours.","Big careers are simply a series of small, well-informed steps taken consistently.","You don't need to have everything figured out — you just need to begin. You have.","Ambition without direction stalls; ambition with a plan compounds. You now have both.","Every strong healthcare career has a moment where the person decides to stop waiting. This is yours.","Preparation is a quiet superpower — and you're building it right now.","The right guidance turns effort into progress. You've just unlocked that.","The distance between where you are and where you want to be is mostly a question of who's helping you get there."],uV=["Our specialists are preparing recommendations based on your responses.","A member of our team will walk you through the next stage personally.","Let's turn your goals into a clear, step-by-step action plan.","Our experts are ready to guide you through what comes next.","Someone from the team will reach out shortly with tailored guidance.","We'll pick up from here and map the details out with you.","The next conversation is where the specifics come together.","You'll hear from a Healthserve advisor with the exact steps for your profile.","From here, we make the process simple, practical, and personal.","A quick follow-up will turn this into a working plan for you."],B_={licensing:["Pursuing {authority} licensing as a {profession} from {country} is a structured process, and getting your Dataflow verification and exam preparation aligned early makes a real difference. Your background positions you well for a clean pathway. The next few steps are where most of the momentum is built.","As a {profession} with {experience} of experience, your {authority} licensing journey has a clear runway. Regulatory readiness usually comes down to organized documentation and a well-planned examination window — both very achievable from where you are.","Regulatory work in the {authority}
357 region rewards preparation, and your profile as a {profession} gives you a strong starting point. Getting the sequencing right — evaluation, verification, then exam — is what separates a smooth licensing journey from a slow one.","Healthcare licensing in the UAE isn't complicated when it's mapped correctly. For a {profession} from {country}, the fastest path usually starts with a proper eligibility review — which is exactly what our team will do for you next."],facility:["Setting up a {facility} in {emirate} is a serious commitment, and the regulatory framework rewards operators who plan the licensing sequence before the fit-out begins. Your inquiry puts you in a strong position to do this right from day one.","Building a healthcare business in {emirate} means aligning DHA/DOH/MOH requirements with real operational choices — space, staffing, scope. Getting that alignment early is what makes a {facility} launch smoothly instead of stalling.","A well-licensed {facility} is a long-term asset. Starting the regulatory conversation before finalizing location or investment protects both timelines and budget."],training:["Choosing {training} is a strong professional development move. Certified training doesn't just add a line to your CV — it changes the way employers and regulators view your profile.","{training} is one of the more practical investments a {profession} can make, especially in a market where CPD and clinical competency both matter. Your timing here is good.","Committing to {training} signals something regulators and employers both notice: a professional who takes their competency seriously. That reputation compounds over time."],mcq:["Structured MCQ practice is one of the highest-ROI things a {mcqProfession} can do before a licensing exam. The candidates who pass on the first attempt are almost always the ones who trained with the right question banks — not just more material.","Preparing for a licensing exam as a {mcqProfession} isn't about studying harder; it's about studying the right pattern of questions. That's exactly what a proper MCQ package is designed to do.","Exam preparation is where careful preparation quietly pays off. Your choice to invest in a real MCQ package puts you in the group that treats this seriously."],german:["The German nursing pathway is real, structured, and one of the strongest international opportunities available to nurses today. With {qualification} and {experience} of experience, your profile fits the pipeline that German hospitals actively recruit from.","Germany's nursing shortage isn't a temporary trend — it's a long-term structural gap, and internationally trained nurses are being welcomed. Your qualifications and willingness on the language side put you inside the right lane.","Relocating to Germany as a nurse is a life-changing career move, and it's very achievable when the language, recognition and employer-match steps are sequenced correctly. That's where the real difference is made."],career:["Career decisions in healthcare rarely come with a clear map — which is why a proper conversation with someone who has walked hundreds of professionals through this is worth more than any online guide.","Your profile has more options than you probably realize. The next conversation is where those options get filtered into a shortlist that actually fits you."],webinar:["Webinars like this one exist because {profession}s from {country} keep asking the same practical questions about licensing and career pathways. You'll walk out with the specific answers — not generic ones.","Being in the room (even virtually) with a licensing advisor and other {profession}s means you'll hear the questions you didn't know to ask. That alone often shortens the journey by months."],contact:["Reaching out is often the hardest step, and now that it's done, the next stage becomes concrete rather than theoretical. Our team will tie your interest to a specific plan."],"chat-lead":["As a {profession} from {nationality}, you're exactly the kind of professional we work with every week. Good conversations start with real context — and n
357ow Layla has it."],onboarding:["You've told us enough to route this properly. A {profession} exploring {topic} usually has 2–3 clear next moves, and we'll map those out for you."]};function dV(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>{const s=t[r];return Array.isArray(s)?s.filter(Boolean).join(", "):typeof s=="string"&&s.trim()?s.trim():{profession:"healthcare professional",country:"your country",nationality:"your background",experience:"your current experience",authority:"GCC",facility:"healthcare facility",emirate:"the UAE",training:"this training",mcqProfession:"your profession",qualification:"your nursing background",topic:"this area"}[r]||""})}const V_=new Map;function Dd(e,t){if(!e.length)throw new Error("empty pool");let n=V_.get(t);(!n||n.size>=e.length)&&(n=new Set,V_.set(t,n));let r=Math.floor(Math.random()*e.length),s=0;for(;n.has(r)&&s++<20;)r=Math.floor(Math.random()*e.length);return n.add(r),e[r]}function hV(e){const t=e.toLowerCase();return t?t==="facility"||t.includes("facility")||t.includes("medical center")?"facility":t==="german"||t.includes("german")?"german":t==="mcq"||t.includes("mcq")?"mcq":t==="training"||t.includes("training")||t.includes("bls")||t.includes("acls")?"training":t==="licensing"||t.includes("licensing")||t.includes("licence")||t.includes("license")||t.includes("dataflow")||t.includes("prometric")?"licensing":t==="consultation"||t.includes("consultation")?"career":null:null}function fV(e,t){if(e==="guided-flow"){const n=String(t.service||"");if(n==="gcc")return"licensing";if(n==="germany")return"german";if(n==="training")return"training";if(n==="mcq")return"mcq";if(n==="facility")return"facility";if(n==="other")return"career"}if(e==="consultation"){const n=Array.isArray(t.goals)?t.goals:[];return n.includes("german")?"german":n.includes("training")?"training":n.includes("facility")?"facility":n.includes("licensing")?"licensing":"career"}if(e==="german-nursing")return"german";if(e==="contact")return hV(String(t.service||""))||"contact";if(e==="webinar")return"webinar";if(e==="onboarding"){const n=String(t.flow||t.topic||"");return n==="licensing"?"licensing":n==="training"?"training":"onboarding"}return e==="chat-lead"?"chat-lead":"career"}function pV(e,t){const n=fV(e,t),r=B_[n]||B_.career,s=Dd(lV,"headline"),i=Dd(r,`insight-${n}`),a=Dd(cV,"motivation"),o=Dd(uV,"next-step");return{headline:s,insight:dV(i,t),motivation:a,nextStep:o}}async function mV(e,t){var n,r;try{const s=new Promise((l,c)=>setTimeout(()=>c(new Error("timeout")),6500)),i=kt.functions.invoke("generate-personalized-response",{body:{formType:e,answers:t}}).then(l=>l),{data:a,error:o}=await Promise.race([i,s]);if(o)throw o;if((n=a==null?void 0:a.response)!=null&&n.headline&&((r=a==null?void 0:a.response)!=null&&r.insight))return{response:a.response,source:a.source??"ai"};throw new Error("bad shape")}catch(s){return console.warn("personalized response fallback",s),{response:pV(e,t),source:"fallback"}}}const gV="971523941876",yV={name:"Name",email:"Email",whatsapp:"WhatsApp",phone:"WhatsApp",nationality:"Nationality",country:"Country",profession:"Profession",experience:"Experience",goals:"Goals",service:"Service",status:"Status",qualification:"Qualification",language:"German Language Level",authority:"Authority",facility:"Facility Type",emirate:"Emirate",training:"Training",mcqProfession:"Category",mcqVolume:"Package",webinar:"Webinar",message:"Message",topic:"Topic",flow:"Interest"},vV=new Set(["id","createdAt","raw"]);function xV(e){return Array.isArray(e)?e.filter(Boolean).join(", "):e==null?"":String(e).trim()}function wV(e,t,n){const r=bV(e),s=[];for(const[l,c]of Object.entries(t)){if(vV.has(l))continue;const u=xV(c);if(!u)continue;const d=yV[l]||l.replace(/([A-Z])/g," $1").replace(/^./,p=>p.toUpperCase());s.push(`${d}: ${u}`)}const i=n.insight.split(new RegExp("(?<=[.!?])\\s"))[0]||n.insight,a=i.length>220?i.slice(0,217)+"…":i,o=[r,"",s.join(`
358`),"","— From my personalized guidance —",a].filter(Boolean).join(`
359`);return`https://wa.me/${gV}?text=${encodeURIComponent(o)}`}function bV(e){switch(e){case"guided-flow":return"Hi Healthserve! I just completed the guided assessment on your website.";case"consultation":return"Hi Healthserve! I just booked a consultation on your website.";case"contact":return"Hi Healthserve! I just submitted an enquiry on your website.";case"german-nursing":return"Hi Healthserve! I'm interested in the German Nursing pathway.";case"webinar":return"Hi Healthserve! I just registered for one of your webinars.";case"onboarding":return"Hi Healthserve! I just shared my interests through your website.";case"chat-lead":return"Hi Healthserve! I was chatting with Layla and would like to continue here."}}const U_=["Reviewing your responses…","Identifying the best pathway…","Preparing your personalized guidance…","Finalizing recommendations…"],lj=({formType:e,answers:t,theme:n="light",variant:r="full",bookConsultationHref:s="/book-consultation",onBookConsultationClick:i,onContinue:a})=>{const[o,l]=b.useState(null),[c,u]=b.useState(0),[d,p]=b.useState(!1);b.useEffect(()=>{if(d)return;const w=setInterval(()=>{u(g=>(g+1)%U_.length)},750);return()=>clearInterval(w)},[d]),b.useEffect(()=>{let w=!1;const g=Date.now();
359return mV(e,t).then(({response:y})=>{if(w)return;const m=Date.now()-g,_=Math.max(0,2200-m);setTimeout(()=>{w||(l(y),p(!0))},_)}),()=>{w=!0}},[]);const f=n==="dark",v=String(t.name||"").split(" ")[0];if(!d||!o)return h.jsxs("div",{className:`w-full rounded-3xl p-8 md:p-10 text-center animate-fade-in ${f?"bg-white/[0.03] border border-white/10":"bg-white border border-gray-100 shadow-[0_10px_40px_rgba(15,23,42,0.06)]"}`,children:[h.jsxs("div",{className:"relative inline-flex mb-5",children:[h.jsx("div",{className:"absolute inset-0 rounded-full blur-2xl opacity-40",style:{background:"radial-gradient(circle, #F9A01B, transparent)"}}),h.jsx("div",{className:"relative w-16 h-16 rounded-full flex items-center justify-center",style:{background:"linear-gradient(135deg, #F9A01B, #2CC5F4)"},children:h.jsx(Fs,{size:26,className:"text-white animate-pulse",strokeWidth:2.2})})]}),h.jsx("p",{className:`font-display font-semibold text-lg mb-5 transition-opacity ${f?"text-white":"text-gray-900"}`,children:h.jsx("span",{className:"animate-fade-in inline-block",children:U_[c]})},c),h.jsx("div",{className:`h-1 w-full rounded-full overflow-hidden ${f?"bg-white/10":"bg-gray-100"}`,children:h.jsx("div",{className:"h-full rounded-full",style:{width:"65%",background:"linear-gradient(90deg, #F9A01B, #2CC5F4)",animation:"shimmer-progress 1.6s ease-in-out infinite"}})}),h.jsx("style",{children:`
360          @keyframes shimmer-progress {
361            0%,100% { transform: translateX(-30%); }
362            50% { transform: translateX(30%); }
363          }
364        `})]});if(r==="compact")return h.jsx("div",{className:"w-full rounded-2xl bg-white border border-gray-100 p-4 animate-fade-up shadow-sm",children:h.jsxs("div",{className:"flex items-start gap-2.5",children:[h.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg, #F9A01B, #2CC5F4)"},children:h.jsx(Fs,{size:14,className:"text-white"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"font-display font-bold text-gray-900 text-sm leading-tight",children:o.headline}),h.jsx("p",{className:"text-[13px] text-gray-700 mt-1.5 leading-relaxed",children:o.insight}),h.jsx("p",{className:"text-[11px] text-gray-500 mt-2 italic",children:o.nextStep})]})]})});const x=wV(e,t,o);return h.jsxs("div",{className:`w-full rounded-3xl overflow-hidden animate-fade-up ${f?"bg-gradient-to-br from-white/[0.06] to-white/[0.02] border border-white/10":"bg-white border border-gray-100 shadow-[0_20px_60px_rgba(15,23,42,0.08)]"}`,children:[h.jsx("div",{className:"h-1.5 w-full",style:{background:"linear-gradient(90deg, #F9A01B, #2CC5F4)"}}),h.jsxs("div",{className:"p-6 md:p-9",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[h.jsx("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center",style:{background:"linear-gradient(135deg, #F9A01B, #2CC5F4)"},children:h.jsx(Fs,{size:16,className:"text-white",strokeWidth:2.4})}),h.jsxs("div",{children:[h.jsx("p",{className:`text-[10px] font-bold uppercase tracking-[2.5px] ${f?"text-white/60":"text-gray-500"}`,children:v?`Personalized for ${v}`:"Personalized guidance"}),h.jsx("p",{className:`text-[11px] ${f?"text-white/50":"text-gray-500"}`,children:"Prepared by your Healthserve advisor"})]})]}),h.jsx("h2",{className:`font-display font-extrabold leading-tight text-2xl md:text-[32px] mb-5 ${f?"text-white":"text-gray-900"}`,style:{letterSpacing:"-0.5px"},children:h.jsx("span",{className:"inline-block pb-1",style:{backgroundImage:"linear-gradient(90deg, #F9A01B, #f7c56a)",backgroundRepeat:"no-repeat",backgroundPosition:"left bottom",backgroundSize:"100% 4px"},children:o.headline})}),h.jsx("p",{className:`text-[15px] md:text-base leading-relaxed mb-6 ${f?"text-white/85":"text-gray-700"}`,children:o.insight}),h.jsx("div",{className:`rounded-2xl p-5 mb-6 border-l-4 ${f?"bg-white/[0.04] border-[#F9A01B]":"bg-gradient-to-br from-orange-50/60 to-blue-50/40 border-[#F9A01B]"}`,children:h.jsx("p",{className:`text-[14px] md:text-[15px] leading-relaxed italic ${f?"text-white/85":"text-gray-800"}`,children:o.motivation})}),h.jsx("p",{className:`text-[13px] mb-7 ${f?"text-white/60":"text-gray-500"}`,children:o.nextStep}),h.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[h.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",onClick:a,className:"inline-flex items-center justify-center gap-2 py-3.5 px-5 rounded-full text-white font-bold text-sm transition-all hover:shadow-lg hover:-translate-y-0.5",style:{background:"linear-gradient(135deg, #25D366, #128C7E)"},children:[h.jsx(Sp,{size:16})," Continue on WhatsApp"]}),i?h.jsxs("button",{type:"button",onClick:i,className:"btn-primary-hs text-sm flex items-center justify-center gap-2",children:[h.jsx(Zy,{size:16})," Book a Consultation"]}):h.jsxs(ze,{to:s,onClick:a,className:"btn-primary-hs text-sm flex items-center justify-center gap-2",children:[h.jsx(Zy,{size:16})," Book a Consultation"]})]})]})]})},Jn=({selected:e,onClick:t,children:n,accent:r="#F9A01B"})=>h.jsxs("button",{type:"button",onClick:t,className:"text-left w-full px-5 py-4 rounded-2xl border-2 transition-all duration-300 flex items-center justify-between bg-white hover:-translate-y-0.5 hover:shadow-md",style:{borderColor:e?r:"#f3f4f6",background:e?`${r}10`:"white"},children:[h.jsx("span",{className:"font-semibold text-gray-800 text-sm",children:n}),e&&h.jsx(ff,{size:16,style:{color:r}})]}),wn=({step:e,total:t,title:n,sub:r})=>h.jsxs("div",{className:"mb-6",children:[h.jsxs("span",{className:"font-mono-accent text-[10px] font-bold tracking-[3px] text-gray-600",children:["QUESTION ",e," OF ",t]}),h.jsx("h2",{className:"font-display font-bold text-gray-900 text-2xl md:text-3xl mt-2 leading-tight",children:n}),r&&h.jsx("p",{className:"text-gray-500 text-sm mt-2",children:r})]}),_V=({initialService:e,onClose:t})=>{const[n,r]=b.useState(e),[s,i]=b.useState(0),[a,o]=b.useState({}),[l,c]=b.useState(""),[u,d]=b.useState(""),[p,f]=b.useState({name:"",email:"",whatsapp:""}),[v,x]=b.useState(!1),[w,g]=b.useState("");b.useEffect(()=>{const L=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[]),b.useEffect(()=>{const L=_e=>{_e.key==="Escape"&&t()};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[t]);const y=b.useMemo(()=>{switch(n){case"gcc":return 4;case"germany":return 3;case"training":return 1;case"mcq":return 2;case"facility":return 2;case"other":return 1;default:return 0}},[n]),m=y+2,_=y,k=y+1,S=$2(p);`${p.name}${p.email}${p.whatsapp}`;const E=b.useMemo(()=>{const L=H1.find(_e=>_e.id===n);return(L==null?void 0:L.color)??"#F9A01B"},[n]),P=(L,_e)=>o(ie=>({...ie,[L]:_e})),j=(L,_e)=>{P(L,_e),i(ie=>ie+1)},R=()=>
364{if(s===0&&n){r(null),o({}),d("");return}s>0&&i(L=>L-1)},M=L=>{r(L),i(0),o({})};if(!n)return h.jsxs(H_,{onClose:t,accent:"#F9A01B",showBack:!1,progress:0,stepLabel:"Welcome",children:[h.jsxs("div",{className:"text-center mb-7",children:[h.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-orange-50 border border-orange-100 mb-4",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#F9A01B] animate-pulse"}),h.jsx("span",{className:"text-[10px] font-bold text-[#F9A01B] uppercase tracking-widest",children:"Healthserve Smart Routing"})]}),h.jsxs("h2",{className:"font-display font-bold text-gray-900 text-2xl md:text-3xl leading-tight",children:["Welcome to Healthserve ",h.jsx("span",{className:"inline-block",children:"👋"})]}),h.jsx("p",{className:"text-gray-500 mt-2 text-sm md:text-base",children:"Please select the service you are looking for."})]}),h.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:H1.map(L=>{const _e=L.icon;return h.jsxs("button",{onClick:()=>M(L.id),className:"group text-left bg-white rounded-2xl p-5 border border-gray-100 hover:border-[color:var(--c)]/40 hover:shadow-xl hover:-translate-y-1 transition-all duration-300",style:{"--c":L.color},children:[h.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center mb-3 transition-transform group-hover:scale-110",style:{background:`${L.color}15`},children:h.jsx(_e,{size:20,style:{color:L.color}})}),h.jsx("h3",{className:"font-display font-semibold text-gray-900 text-sm md:text-base",children:L.title}),h.jsx("p",{className:"text-gray-500 text-xs mt-1 leading-relaxed",children:L.desc})]},L.id)})})]});const O=()=>{if(s===0)return h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"What is your healthcare profession?"}),h.jsx("div",{className:"grid gap-2.5",children:Nz.map(L=>h.jsx(Jn,{accent:E,selected:a.profession===L,onClick:()=>j("profession",L),children:L},L))})]});if(s===1){const L=l.toLowerCase(),_e=Rz.filter(ie=>ie.name.toLowerCase().includes(L));return h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:2,total:m,title:"Which country are you currently based in?"}),h.jsxs("div",{className:"relative mb-4",children:[h.jsx(gF,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600"}),h.jsx("input",{value:l,onChange:ie=>c(ie.target.value),placeholder:"Search country...",className:"w-full pl-9 pr-4 py-3 rounded-xl border border-gray-200 text-sm focus:outline-none focus:border-[#F9A01B]/50"})]}),h.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-[320px] overflow-y-auto pr-1",children:_e.map(ie=>h.jsx(Jn,{accent:E,selected:a.country===ie.name,onClick:()=>j("country",ie.name),children:h.jsxs("span",{className:"inline-flex items-center gap-2.5",children:[h.jsx(I2,{code:ie.code,name:ie.name,size:20}),ie.name]})},ie.code))})]})}return s===2?h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:3,total:m,title:"How many years of experience do you have?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:W1.map(L=>h.jsx(Jn,{accent:E,selected:a.experience===L,onClick:()=>j("experience",L),children:L},L))})]}):h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:4,total:m,title:"Do you currently hold an active council registration?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:q1.map(L=>h.jsx(Jn,{accent:E,selected:a.council===L,onClick:()=>j("council",L),children:L},L))})]})},W=()=>s===0?h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"What is your nursing qualification?"}),h.jsx("div",{className:"grid gap-2.5",children:Oz.map(L=>h.jsx(Jn,{accent:E,selected:a.qualification===L,onClick:()=>j("qualification",L),children:L},L))})]}):s===1?h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:2,total:m,title:"How many years of clinical experience do you have?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:W1.map(L=>h.jsx(Jn,{accent:E,selected:a.experience===L,onClick:()=>j("experience",L),children:L},L))})]}):h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:3,total:m,title:"Are you willing to undergo German language training?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:q1.map(L=>h.jsx(Jn,{accent:E,selected:a.language===L,onClick:()=>j("language",L),children:L},L))})]}),F=()=>h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"Which training are you interested in?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:Z1.map(L=>h.jsx(Jn,{accent:E,selected:a.training===L.name,onClick:()=>j("training",L.name),children:L.name},L.name))})]}),q=()=>s===0?h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"What is your profession category?"}),h.jsx("div",{className:"grid gap-2.5",children:Mz.map(L=>h.jsx(Jn,{accent:E,selected:a.mcqProfession===L,onClick:()=>j("mcqProfession",L),children:L},L))})]}):h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:2,total:m,title:"How many practice tests would you like?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:$z.map(L=>h.jsx(Jn,{accent:E,selected:a.mcqVolume===L.id,onClick:()=>j("mcqVolume",L.id),children:h.jsxs("span",{children:[h.jsx("span",{className:"block",children:L.label}),h.jsx("span",{className:"block text-[11px] font-normal text-gray-600 mt-0.5",children:L.tests})]})},L.id))})]}),K=()=>s===0?h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"What type of healthcare facility are you planning to establish?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:Iz.map(L=>h.jsx(Jn,{accent:E,selected:a.facility===L,onClick:()=>j("facility",L),children:L},L))})]}):h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:2,total:m,title:"Which emirate are you planning to establish the facility in?"}),h.jsx("div",{className:"grid grid-cols-2 gap-2.5",children:Dz.map(L=>h.jsx(Jn,{accent:E,selected:a.emirate===L,onClick:()=>j("emirate",L),children:L},L))})]}),re=()=>{const L=u.trim().toLowerCase(),_e=L.length>3&&Lz.some(ie=>L.includes(ie));return h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:1,total:m,title:"Tell us briefly what you're looking for",sub:"A quick line helps us route you to the right person."}),h.jsx("textarea",{value:u,onChange:ie=>d(ie.target.value),rows:4,placeholder:"e.g. I want to confirm whether you support a specific licensing pathway...",className:"w-full px-4 py-3 rounded-2xl border-2 border-gray-100 text-sm focus:outline-none focus:border-[#F9A01B]/40 resize-none"}),_e&&h.jsx("div",{className:"mt-5 rounded-2xl p-5 border border-amber-200 bg-amber-50",children:h.jsxs("div",{className:"flex gap-3",children:[h.jsx(sF,{size:20,className:"text-amber-500 flex-shrink-0 mt-0.5"}),h.jsxs("div",{children:[h.jsx("p",{className:"font-display font-semibold text-gray-900 text-sm",children:"Currently we do not provide this particular service."}),h.jsx("p",{className:"text-gray-600 text-sm mt-1",children:"Please contact our representative for further clarification."})]})]})}),h.jsx("button",{type:"button",onClick:()=>i(ie=>ie+1),disabled:u.trim().length<3,className:"mt-5 w-full py-3 rounded-full text-white font-bold text-sm disabled:opacity-50 transition-all hover:shadow-lg",style:{background:"linear-gradient(135deg, #F9A01B, #fbbf24)"},children:"Continue →"})]})},D=()=>{switch(n){case"gcc":return O();case"germany":return W();case"training":return F();case"mcq":return q();case"facility":return K();case"other":return re()}},$=()=>h.jsxs(h.Fragment,{children:[h.jsx(wn,{step:_+1,total:m,title:"Your contact details",sub:"So our specialist can reach you with a personalised plan."}),h.jsx(F2,{theme:"light",accent:E,value:p,onChange:f,showErrors:!1}),h.jsx("button",{type:"button",onClick:async()=>
364{if(!v){x(!0),g("");try{await oj("guided_flow",{service:n??"",name:p.name,email:p.email,whatsapp:p.whatsapp,answers:a,other:u}),Lx("GuidedFlowLeads",[new Date().toISOString(),n??"",p.name,p.email,p.whatsapp,JSON.stringify(a),u]).catch(L=>console.warn("Guided flow sheet mirror failed:",L)),i(k)}catch(L){console.error("guided flow save failed",L),g("Could not record your details. Please try again.")}finally{x(!1)}}},disabled:v||!S,className:"mt-5 w-full py-3 rounded-full text-white font-bold text-sm disabled:opacity-50 transition-all hover:shadow-lg",style:{background:`linear-gradient(135deg, ${E}, ${E}cc)`},children:v?"Recording...":"Continue →"}),w&&h.jsx("p",{className:"text-[11px] text-red-500 mt-2 text-center",children:w}),!S&&h.jsx("p",{className:"text-[11px] text-gray-500 mt-2 text-center",children:"Name, email and WhatsApp are required."})]}),C=()=>{const L={service:n??"",name:p.name,email:p.email,whatsapp:p.whatsapp,...Object.fromEntries(Object.entries(a).map(([ie,ye])=>[ie,ye]))};u&&(L.message=u);let _e=null;if(n==="training"){const ie=Z1.find(ye=>ye.name===a.training);ie&&(_e=h.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-5",children:[h.jsxs("div",{className:"rounded-2xl p-4 bg-orange-50/50 border border-orange-100",children:[h.jsx("p",{className:"text-[10px] font-bold tracking-widest text-gray-500 uppercase",children:"Mode"}),h.jsx("p",{className:"font-display font-semibold text-gray-900 text-sm mt-1",children:ie.mode})]}),h.jsxs("div",{className:"rounded-2xl p-4 bg-blue-50/50 border border-blue-100",children:[h.jsx("p",{className:"text-[10px] font-bold tracking-widest text-gray-500 uppercase",children:"Duration"}),h.jsx("p",{className:"font-display font-semibold text-gray-900 text-sm mt-1",children:ie.duration})]}),h.jsxs("div",{className:"rounded-2xl p-4 bg-orange-50/50 border border-orange-100",children:[h.jsx("p",{className:"text-[10px] font-bold tracking-widest text-gray-500 uppercase",children:"CPD"}),h.jsx("p",{className:"font-display font-semibold text-gray-900 text-sm mt-1",children:ie.cpd})]})]}))}else if(n==="mcq"){const ie=a.mcqProfession,ye=a.mcqVolume,gt=ie&&ye?zz[ie][ye]:null,bt=ye?Fz[ye]:null;ie&&ye&&gt&&(_e=h.jsxs("div",{className:"rounded-2xl p-6 border border-gray-100 bg-gradient-to-br from-orange-50/40 to-blue-50/40 mb-5",children:[h.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:ie}),h.jsx("h3",{className:"font-display font-bold text-gray-900 text-xl mt-1",children:ye==="Single"?"Single MCQ Bundle":`${ye} Tests Pack`}),h.jsxs("div",{className:"flex items-baseline gap-2 mt-3",children:[h.jsx("span",{className:"font-mono-accent font-bold text-3xl text-[#F9A01B]",children:gt.toFixed(2)}),h.jsx("span",{className:"text-gray-500 text-sm font-semibold",children:"AED"}),h.jsxs("span",{className:"text-gray-600 text-xs ml-2",children:["· Validity: ",bt]})]})]}),L.package=`${ye==="Single"?"Single MCQ Bundle":`${ye} Tests Pack`} for ${ie} (AED ${gt.toFixed(2)})`)}return h.jsxs(h.Fragment,{children:[_e,h.jsx(lj,{formType:"guided-flow",answers:L,theme:"light",onContinue:t})]})},le=()=>s===_?$():s===k?C():D(),oe=(s+1)/m*100,T=n?`Step ${Math.min(s+1,m)} of ${m}`:"Welcome";return h.jsx(H_,{onClose:t,accent:E,showBack:!0,progress:oe,stepLabel:T,onBack:R,children:h.jsx("div",{className:"animate-fade-up",children:le()},`${n}-${s}`)})},H_=({children:e,onClose:t,onBack:n,accent:r,showBack:s,progress:i,stepLabel:a})=>h.jsxs("div",{className:"fixed inset-0 z-[10000] flex items-stretch sm:items-center justify-center sm:p-4",children:[h.jsx("div",{className:"absolute inset-0 bg-gray-900/40 backdrop-blur-md animate-fade-in",onClick:t}),h.jsxs("div",{className:"relative bg-white w-full sm:max-w-2xl sm:rounded-3xl shadow-2xl border border-gray-100 max-h-screen sm:max-h-[90vh] flex flex-col overflow-hidden",style:{animation:"slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1)"},children:[h.jsxs("div",{className:"px-5 sm:px-7 pt-5 pb-3 flex items-center justify-between border-b border-gray-100",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[s&&n&&h.jsx("button",{onClick:n,className:"w-9 h-9 rounded-full bg-gray-50 hover:bg-gray-100 flex items-center justify-center transition-colors",children:h.jsx(VP,{size:16,className:"text-gray-600"})}),h.jsxs("div",{children:[h.jsx("p",{className:"text-[10px] font-bold tracking-widest uppercase",style:{color:r},children:"Healthserve"}),h.jsx("p",{className:"text-xs text-gray-500",children:a})]})]}),h.jsx("button",{onClick:t,className:"w-9 h-9 rounded-full bg-gray-50 hover:bg-gray-100 flex items-center justify-center transition-colors",children:h.jsx(ds,{size:16,className:"text-gray-600"})})]}),h.jsx("div",{className:"h-1 bg-gray-100 relative overflow-hidden",children:h.jsx("div",{className:"absolute inset-y-0 left-0 transition-[width] duration-500 ease-out",style:{width:`${i}%`,background:"linear-gradient(90deg, #F9A01B, #2CC5F4)"}})}),h.jsx("div",{className:"flex-1 overflow-y-auto px-5 sm:px-7 py-6",children:e})]})]}),cj=b.createContext(null),kV=({children:e})=>{const[t,n]=b.useState(!1),[r,s]=b.useState(null),i=b.useCallback(o=>{s(o??null),n(!0)},[]),a=b.useCallback(()=>n(!1),[]);return h.jsxs(cj.Provider,{value:{open:t,initialService:r,openFlow:i,closeFlow:a},children:[e,t&&h.jsx(_V,{initialService:r,onClose:a})]})},Mx=()=>{const e=b.useContext(cj);if(!e)throw new Error("useGuidedFlow must be used inside GuidedFlowProvider");return e};var qu=e=>e.type==="checkbox",_a=e=>e instanceof Date,cn=e=>e==null;const uj=e=>typeof e=="object";var St=e=>!cn(e)&&!Array.isArray(e)&&uj(e)&&!_a(e),SV=e=>St(e)&&e.target?qu(e.target)?e.target.checked:e.target.value:e,EV=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,CV=(e,t)=>e.has(EV(t)),TV=e=>{const t=e.constructor&&e.constructor.prototype;return St(t)&&t.hasOwnProperty("isPrototypeOf")},$x=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function $t(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!($x&&(e instanceof Blob||r))&&(n||St(e)))if(t=n?[]:{},!n&&!TV(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=$t(e[s]));else return e;return t}var Dp=e=>/^\w*$/.test(e),Pt=e=>e===void 0,Fx=e=>Array.isArray(e)?e.filter(Boolean):[],zx=e=>
364Fx(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ue=(e,t,n)=>{if(!t||!St(e))return n;const r=(Dp(t)?[t]:zx(t)).reduce((s,i)=>cn(s)?s:s[i],e);return Pt(r)||r===e?Pt(e[t])?n:e[t]:r},ts=e=>typeof e=="boolean",He=(e,t,n)=>{let r=-1;const s=Dp(t)?[t]:zx(t),i=s.length,a=i-1;for(;++r<i;){const o=s[r];let l=n;if(r!==a){const c=e[o];l=St(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const W_={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ir={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ps={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},AV=z.createContext(null);AV.displayName="HookFormContext";var PV=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const a=i;return t._proxyFormState[a]!==Ir.all&&(t._proxyFormState[a]=!r||Ir.all),e[a]}});return s};const jV=typeof window<"u"?z.useLayoutEffect:z.useEffect;var hs=e=>typeof e=="string",NV=(e,t,n,r,s)=>hs(e)?(r&&t.watch.add(e),ue(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ue(n,i))):(r&&(t.watchAll=!0),n),_v=e=>cn(e)||!uj(e);function xi(e,t,n=new WeakSet){if(_v(e)||_v(t))return e===t;if(_a(e)&&_a(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const a=e[i];if(!s.includes(i))return!1;if(i!=="ref"){const o=t[i];if(_a(a)&&_a(o)||St(a)&&St(o)||Array.isArray(a)&&Array.isArray(o)?!xi(a,o,n):a!==o)return!1}}return!0}var dj=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Dc=e=>Array.isArray(e)?e:[e],q_=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},_n=e=>St(e)&&!Object.keys(e).length,Bx=e=>e.type==="file",Dr=e=>typeof e=="function",Pf=e=>{if(!$x)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hj=e=>e.type==="select-multiple",Vx=e=>e.type==="radio",RV=e=>Vx(e)||qu(e),qm=e=>Pf(e)&&e.isConnected;function OV(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Pt(e)?r++:e[t[r++]];return e}function IV(e){for(const t in e)if(e.hasOwnProperty(t)&&!Pt(e[t]))return!1;return!0}function Et(e,t){const n=Array.isArray(t)?t:Dp(t)?[t]:zx(t),r=n.length===1?e:OV(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(St(r)&&_n(r)||Array.isArray(r)&&IV(r))&&Et(e,n.slice(0,-1)),e}var fj=e=>{for(const t in e)if(Dr(e[t]))return!0;return!1};function jf(e,t={}){const n=Array.isArray(e);if(St(e)||n)for(const r in e)Array.isArray(e[r])||St(e[r])&&!fj(e[r])?(t[r]=Array.isArray(e[r])?[]:{},jf(e[r],t[r])):cn(e[r])||(t[r]=!0);return t}function pj(e,t,n){const r=Array.isArray(e);if(St(e)||r)for(const s in e)Array.isArray(e[s])||St(e[s])&&!fj(e[s])?Pt(t)||_v(n[s])?n[s]=Array.isArray(e[s])?jf(e[s],[]):{...jf(e[s])}:pj(e[s],cn(t)?{}:t[s],n[s]):n[s]=!xi(e[s],t[s]);return n}var ec=(e,t)=>pj(e,t,jf(t));const Z_={value:!1,isValid:!1},G_={value:!0,isValid:!0};var mj=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Pt(e[0].attributes.value)?Pt(e[0].value)||e[0].value===""?G_:{value:e[0].value,isValid:!0}:G_:Z_}return Z_},gj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Pt(e)?e:t?e===""?NaN:e&&+e:n&&hs(e)?new Date(e):r?r(e):e;const K_={isValid:!1,value:null};var yj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,K_):K_;function Y_(e){const t=e.ref;return Bx(t)?t.files:Vx(t)?yj(e.refs).value:hj(t)?[...t.selectedOptions].map(({value:n})=>n):qu(t)?mj(e.refs).value:gj(Pt(t.value)?e.ref.value:t.value,e)}var DV=(e,t,n,r)=>{const s={};for(const i of e){const a=ue(t,i);a&&He(s,i,a._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Nf=e=>e instanceof RegExp,tc=e=>Pt(e)?e:Nf(e)?e.source:St(e)?Nf(e.value)?e.value.source:e.value:e,J_=e=>({isOnSubmit:!e||e===Ir.onSubmit,isOnBlur:e===Ir.onBlur,isOnChange:e===Ir.onChange,isOnAll:e===Ir.all,isOnTouch:e===Ir.onTouched});const Q_="AsyncFunction";var LV=e=>!!e&&!!e.validate&&!!(Dr(e.validate)&&e.validate.constructor.name===Q_||St(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Q_)),MV=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),X_=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Lc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=ue(e,s);if(i){const{_f:a,...o}=i;
vendor: 4,168 bytes, line 364
364if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],s)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(Lc(o,t))break}else if(St(o)&&Lc(o,t))break}}};function ek(e,t,n){const r=ue(e,n);if(r||Dp(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),a=ue(t,i),o=ue(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};if(o&&o.root&&o.root.type)return{name:`${i}.root`,error:o.root};s.pop()}return{name:n}}var $V=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return _n(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||Ir.all))},FV=(e,t,n)=>!e||!t||e===t||Dc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),zV=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,BV=(e,t)=>!Fx(ue(e,t)).length&&Et(e,t),VV=(e,t,n)=>{const r=Dc(ue(e,n));return He(r,"root",t[n]),He(e,n,r),e},wh=e=>hs(e);function tk(e,t,n="validate"){if(wh(e)||Array.isArray(e)&&e.every(wh)||ts(e)&&!e)return{type:n,message:wh(e)?e:"",ref:t}}var ao=e=>St(e)&&!Nf(e)?e:{value:e,message:""},nk=async(e,t,n,r,s,i)=>{const{ref:a,refs:o,required:l,maxLength:c,minLength:u,min:d,max:p,pattern:f,validate:v,name:x,valueAsNumber:w,mount:g}=e._f,y=ue(n,x);if(!g||t.has(x))return{};const m=o?o[0]:a,_=O=>{s&&m.reportValidity&&(m.setCustomValidity(ts(O)?"":O||""),m.reportValidity())},k={},S=Vx(a),E=qu(a),P=S||E,j=(w||Bx(a))&&Pt(a.value)&&Pt(y)||Pf(a)&&a.value===""||y===""||Array.isArray(y)&&!y.length,R=dj.bind(null,x,r,k),M=(O,W,F,q=Ps.maxLength,K=Ps.minLength)=>{const re=O?W:F;k[x]={type:O?q:K,message:re,ref:a,...R(O?q:K,re)}};if(i?!Array.isArray(y)||!y.length:l&&(!P&&(j||cn(y))||ts(y)&&!y||E&&!mj(o).isValid||S&&!yj(o).isValid)){const{value:O,message:W}=wh(l)?{value:!!l,message:l}:ao(l);if(O&&(k[x]={type:Ps.required,message:W,ref:m,...R(Ps.required,W)},!r))return _(W),k}if(!j&&(!cn(d)||!cn(p))){let O,W;const F=ao(p),q=ao(d);if(!cn(y)&&!isNaN(y)){const K=a.valueAsNumber||y&&+y;cn(F.value)||(O=K>F.value),cn(q.value)||(W=K<q.value)}else{const K=a.valueAsDate||new Date(y),re=C=>new Date(new Date().toDateString()+" "+C),D=a.type=="time",$=a.type=="week";hs(F.value)&&y&&(O=D?re(y)>re(F.value):$?y>F.value:K>new Date(F.value)),hs(q.value)&&y&&(W=D?re(y)<re(q.value):$?y<q.value:K<new Date(q.value))}if((O||W)&&(M(!!O,F.message,q.message,Ps.max,Ps.min),!r))return _(k[x].message),k}if((c||u)&&!j&&(hs(y)||i&&Array.isArray(y))){const O=ao(c),W=ao(u),F=!cn(O.value)&&y.length>+O.value,q=!cn(W.value)&&y.length<+W.value;if((F||q)&&(M(F,O.message,W.message),!r))return _(k[x].message),k}if(f&&!j&&hs(y)){const{value:O,message:W}=ao(f);if(Nf(O)&&!y.match(O)&&(k[x]={type:Ps.pattern,message:W,ref:a,...R(Ps.pattern,W)},!r))return _(W),k}if(v){if(Dr(v)){const O=await v(y,n),W=tk(O,m);if(W&&(k[x]={...W,...R(Ps.validate,W.message)},!r))return _(W.message),k}else if(St(v)){let O={};for(const W in v){if(!_n(O)&&!r)break;const F=tk(await v[W](y,n),m,W);F&&(O={...F,...R(W,F.message)},_(F.message),r&&(k[x]=O))}if(!_n(O)&&(k[x]={ref:m,...O},!r))return k}}return _(!0),k};const UV={mode:Ir.onSubmit,reValidateMode:Ir.onChange,shouldFocusError:!0};function HV(e={}){let t={...UV,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Dr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=St(t.defaultValues)||St(t.values)?$t(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:$t(s),a={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const p={array:q_(),state:q_()},f=t.criteriaMode===Ir.all,v=A=>I=>{clearTimeout(c),c=setTimeout(A,I)},x=async A=>{if(!t.disabled&&(u.isValid||d.isValid||A)){const I=t.resolver?_n((await E()).errors):await j(r,!0);I!==n.isValid&&p.state.next({isValid:I})}},w=(A,I)=>{!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((A||Array.from(o.mount)).forEac
364h(B=>{B&&(I?He(n.validatingFields,B,I):Et(n.validatingFields,B))}),p.state.next({validatingFields:n.validatingFields,isValidating:!_n(n.validatingFields)}))},g=(A,I=[],B,te,ee=!0,J=!0)=>{if(te&&B&&!t.disabled){if(a.action=!0,J&&Array.isArray(ue(r,A))){const N=B(ue(r,A),te.argA,te.argB);ee&&He(r,A,N)}if(J&&Array.isArray(ue(n.errors,A))){const N=B(ue(n.errors,A),te.argA,te.argB);ee&&He(n.errors,A,N),BV(n.errors,A)}if((u.touchedFields||d.touchedFields)&&J&&Array.isArray(ue(n.touchedFields,A))){const N=B(ue(n.touchedFields,A),te.argA,te.argB);ee&&He(n.touchedFields,A,N)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=ec(s,i)),p.state.next({name:A,isDirty:M(A,I),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else He(i,A,I)},y=(A,I)=>{He(n.errors,A,I),p.state.next({errors:n.errors})},m=A=>{n.errors=A,p.state.next({errors:n.errors,isValid:!1})},_=(A,I,B,te)=>{const ee=ue(r,A);if(ee){const J=ue(i,A,Pt(B)?ue(s,A):B);Pt(J)||te&&te.defaultChecked||I?He(i,A,I?J:Y_(ee._f)):F(A,J),a.mount&&x()}},k=(A,I,B,te,ee)=>{let J=!1,N=!1;const U={name:A};if(!t.disabled){if(!B||te){(u.isDirty||d.isDirty)&&(N=n.isDirty,n.isDirty=U.isDirty=M(),J=N!==U.isDirty);const se=xi(ue(s,A),I);N=!!ue(n.dirtyFields,A),se?Et(n.dirtyFields,A):He(n.dirtyFields,A,!0),U.dirtyFields=n.dirtyFields,J=J||(u.dirtyFields||d.dirtyFields)&&N!==!se}if(B){const se=ue(n.touchedFields,A);se||(He(n.touchedFields,A,B),U.touchedFields=n.touchedFields,J=J||(u.touchedFields||d.touchedFields)&&se!==B)}J&&ee&&p.state.next(U)}return J?U:{}},S=(A,I,B,te)=>{const ee=ue(n.errors,A),J=(u.isValid||d.isValid)&&ts(I)&&n.isValid!==I;if(t.delayError&&B?(l=v(()=>y(A,B)),l(t.delayError)):(clearTimeout(c),l=null,B?He(n.errors,A,B):Et(n.errors,A)),(B?!xi(ee,B):ee)||!_n(te)||J){const N={...te,...J&&ts(I)?{isValid:I}:{},errors:n.errors,name:A};n={...n,...N},p.state.next(N)}},E=async A=>{w(A,!0);const I=await t.resolver(i,t.context,DV(A||o.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(A),I},P=async A=>{const{errors:I}=await E(A);if(A)for(const B of A){const te=ue(I,B);te?He(n.errors,B,te):Et(n.errors,B)}else n.errors=I;return I},j=async(A,I,B={valid:!0})=>{for(const te in A){const ee=A[te];
364if(ee){const{_f:J,...N}=ee;if(J){const U=o.array.has(J.name),se=ee._f&&LV(ee._f);se&&u.validatingFields&&w([te],!0);const we=await nk(ee,o.disabled,i,f,t.shouldUseNativeValidation&&!I,U);if(se&&u.validatingFields&&w([te]),we[J.name]&&(B.valid=!1,I))break;!I&&(ue(we,J.name)?U?VV(n.errors,we,J.name):He(n.errors,J.name,we[J.name]):Et(n.errors,J.name))}!_n(N)&&await j(N,I,B)}}return B.valid},R=()=>{for(const A of o.unMount){const I=ue(r,A);I&&(I._f.refs?I._f.refs.every(B=>!qm(B)):!qm(I._f.ref))&&ye(A)}o.unMount=new Set},M=(A,I)=>!t.disabled&&(A&&I&&He(i,A,I),!xi(C(),s)),O=(A,I,B)=>NV(A,o,{...a.mount?i:Pt(I)?s:hs(A)?{[A]:I}:I},B,I),W=A=>Fx(ue(a.mount?i:s,A,t.shouldUnregister?ue(s,A,[]):[])),F=(A,I,B={})=>{const te=ue(r,A);let ee=I;if(te){const J=te._f;J&&(!J.disabled&&He(i,A,gj(I,J)),ee=Pf(J.ref)&&cn(I)?"":I,hj(J.ref)?[...J.ref.options].forEach(N=>N.selected=ee.includes(N.value)):J.refs?qu(J.ref)?J.refs.forEach(N=>{(!N.defaultChecked||!N.disabled)&&(Array.isArray(ee)?N.checked=!!ee.find(U=>U===N.value):N.checked=ee===N.value||!!ee)}):J.refs.forEach(N=>N.checked=N.value===ee):Bx(J.ref)?J.ref.value="":(J.ref.value=ee,J.ref.type||p.state.next({name:A,values:$t(i)})))}(B.shouldDirty||B.shouldTouch)&&k(A,ee,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&$(A)},q=(A,I,B)=>{for(const te in I){if(!I.hasOwnProperty(te))return;const ee=I[te],J=A+"."+te,N=ue(r,J);(o.array.has(A)||St(ee)||N&&!N._f)&&!_a(ee)?q(J,ee,B):F(J,ee,B)}},K=(A,I,B={})=>{const te=ue(r,A),ee=o.array.has(A),J=$t(I);He(i,A,J),ee?(p.array.next({name:A,values:$t(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&B.shouldDirty&&p.state.next({name:A,dirtyFields:ec(s,i),isDirty:M(A,J)})):te&&!te._f&&!cn(J)?q(A,J,B):F(A,J,B),X_(A,o)&&p.state.next({...n,name:A}),p.state.next({name:a.mount?A:void 0,values:$t(i)})},re=async A=>{a.mount=!0;const I=A.target;let B=I.name,te=!0;const ee=ue(r,B),J=se=>{te=Number.isNaN(se)||_a(se)&&isNaN(se.getTime())||xi(se,ue(i,B,se))},N=J_(t.mode),U=J_(t.reValidateMode);if(ee){let se,we;const Ne=I.type?Y_(ee._f):SV(A),yt=A.type===W_.BLUR||A.type===W_.FOCUS_OUT,Yn=!MV(ee._f)&&!t.resolver&&!ue(n.errors,B)&&!ee._f.deps||zV(yt,ue(n.touchedFields,B),n.isSubmitted,U,N),Bt=X_(B,o,yt);He(i,B,Ne),yt?(ee._f.onBlur&&ee._f.onBlur(A),l&&l(0)):ee._f.onChange&&ee._f.onChange(A);const Kt=k(B,Ne,yt),qr=!_n(Kt)||Bt;if(!yt&&p.state.next({name:B,type:A.type,values:$t(i)}),Yn)return(u.isValid||d.isValid)&&(t.mode==="onBlur"?yt&&x():yt||x()),qr&&p.state.next({name:B,...Bt?{}:Kt});if(!yt&&Bt&&p.state.next({...n}),t.resolver){const{errors:ct}=await E([B]);if(J(Ne),te){const Zr=ek(n.errors,r,B),vn=ek(ct,r,Zr.name||B);se=vn.error,B=vn.name,we=_n(ct)}}else w([B],!0),se=(await nk(ee,o.disabled,i,f,t.shouldUseNativeValidation))[B],w([B]),J(Ne),te&&(se?we=!1:(u.isValid||d.isValid)&&(we=await j(r,!0)));te&&(ee._f.deps&&$(ee._f.deps),S(B,we,se,Kt))}},D=(A,I)=>{if(ue(n.errors,I)&&A.focus)return A.focus(),1},$=async(A,I={})=>{let B,te;const ee=Dc(A);if(t.resolver){const J=await P(Pt(A)?A:ee);B=_n(J),te=A?!ee.some(N=>ue(J,N)):B}else A?(te=(await Promise.all(ee.map(async J=>{const N=ue(r,J);return await j(N&&N._f?{[J]:N}:N)}))).every(Boolean),!(!te&&!n.isValid)&&x()):te=B=await j(r);return p.state.next({...!hs(A)||(u.isValid||d.isValid)&&B!==n.isValid?{}:{name:A},...t.resolver||!A?{isValid:B}:{},errors:n.errors}),I.shouldFocus&&!te&&Lc(r,D,A?ee:o.mount),te},C=A=>{const I={...a.mount?i:s};return Pt(A)?I:hs(A)?ue(I,A):A.map(B=>ue(I,B))},le=(A,I)=>({invalid:!!ue((I||n).errors,A),isDirty:!!ue((I||n).dirtyFields,A),error:ue((I||n).errors,A),isValidating:!!ue(n.validatingFields,A),isTouched:!!ue((I||n).touchedFields,A)}),oe=A=>{A&&Dc(A).forEach(I=>Et(n.errors,I)),p.state.next({errors:A?n.errors:{}})},T=(A,I,B)=>{const te=(ue(r,A,{_f:{}})._f||{}).ref,ee=ue(n.errors,A)||{},{ref:J,message:N,type:U,...se}=ee;He(n.errors,A,{...se,...I,ref:te}),p.state.next({name:A,errors:n.errors,isValid:!1}),B&&B.shouldFocus&&te&&te.focus&&te.focus()},L=(A,I)=>Dr(A)?p.state.subscribe({next:B=>"values"in B&&A(O(void 0,I),B)}):O(A,I,!0),_e=A=>p.state.subscribe({next:I=>{FV(A.name,I.name,A.exact)&&$V(I,A.formState||u,Js,A.reRenderRoot)&&A.callback({values:{...i},...n,...I,defaultValues:s})}}).unsubscribe,ie=A=>(a.mount=!0,d={...d,...A.formState},_e({...A,formState:d})),ye=(A,I={})=>{for(const B of A?Dc(A):o.mount)o.mount.delete(B),o.array.delete(B),I.keepValue||(Et(r,B),Et(i,B)),!I.keepError&&Et(n.errors,B),!I.keepDirty&&Et(n.dirtyFields,B),!I.keepTouched&&Et(n.touchedFields,B),!I.keepIsValidating&&Et
vendor: 5,481 bytes, line 364
364(n.validatingFields,B),!t.shouldUnregister&&!I.keepDefaultValue&&Et(s,B);p.state.next({values:$t(i)}),p.state.next({...n,...I.keepDirty?{isDirty:M()}:{}}),!I.keepIsValid&&x()},gt=({disabled:A,name:I})=>{(ts(A)&&a.mount||A||o.disabled.has(I))&&(A?o.disabled.add(I):o.disabled.delete(I))},bt=(A,I={})=>{let B=ue(r,A);const te=ts(I.disabled)||ts(t.disabled);return He(r,A,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:A}},name:A,mount:!0,...I}}),o.mount.add(A),B?gt({disabled:ts(I.disabled)?I.disabled:t.disabled,name:A}):_(A,!0,I.value),{...te?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:tc(I.min),max:tc(I.max),minLength:tc(I.minLength),maxLength:tc(I.maxLength),pattern:tc(I.pattern)}:{},name:A,onChange:re,onBlur:re,ref:ee=>{if(ee){bt(A,I),B=ue(r,A);const J=Pt(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll("input,select,textarea")[0]||ee,N=RV(J),U=B._f.refs||[];if(N?U.find(se=>se===J):J===B._f.ref)return;He(r,A,{_f:{...B._f,...N?{refs:[...U.filter(qm),J,...Array.isArray(ue(s,A))?[{}]:[]],ref:{type:J.type,name:A}}:{ref:J}}}),_(A,!1,void 0,J)}else B=ue(r,A,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(CV(o.array,A)&&a.action)&&o.unMount.add(A)}}},Lt=()=>t.shouldFocusError&&Lc(r,D,o.mount),rn=A=>{ts(A)&&(p.state.next({disabled:A}),Lc(r,(I,B)=>{const te=ue(r,B);te&&(I.disabled=te._f.disabled||A,Array.isArray(te._f.refs)&&te._f.refs.forEach(ee=>{ee.disabled=te._f.disabled||A}))},0,!1))},pr=(A,I)=>async B=>{let te;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let ee=$t(i);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:J,values:N}=await E();n.errors=J,ee=$t(N)}else await j(r);if(o.disabled.size)for(const J of o.disabled)Et(ee,J);if(Et(n.errors,"root"),_n(n.errors)){p.state.next({errors:{}});try{await A(ee,B)}catch(J){te=J}}else I&&await I({...n.errors},B),Lt(),setTimeout(Lt);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_n(n.errors)&&!te,submitCount:n.submitCount+1,errors:n.errors}),te)throw te},Gn=(A,I={})=>{ue(r,A)&&(Pt(I.defaultValue)?K(A,$t(ue(s,A))):(K(A,I.defaultValue),He(s,A,$t(I.defaultValue))),I.keepTouched||Et(n.touchedFields,A),I.keepDirty||(Et(n.dirtyFields,A),n.isDirty=I.defaultValue?M(A,$t(ue(s,A))):M()),I.keepError||(Et(n.errors,A),u.isValid&&x()),p.state.next({...n}))},ks=(A,I={})=>{const B=A?$t(A):s,te=$t(B),ee=_n(A),J=ee?s:te;if(I.keepDefaultValues||(s=B),!I.keepValues){if(I.keepDirtyValues){const N=new Set([...o.mount,...Object.keys(ec(s,i))]);for(const U of Array.from(N))ue(n.dirtyFields,U)?He(J,U,ue(i,U)):K(U,ue(J,U))}else{if($x&&Pt(A))for(const N of o.mount){const U=ue(r,N);if(U&&U._f){const se=Array.isArray(U._f.refs)?U._f.refs[0]:U._f.ref;if(Pf(se)){const we=se.closest("form");if(we){we.reset();break}}}}if(I.keepFieldsRef)for(const N of o.mount)K(N,ue(J,N));else r={}}i=t.shouldUnregister?I.keepDefaultValues?$t(s):{}:$t(J),p.array.next({values:{...J}}),p.state.next({values:{...J}})}o={mount:I.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!I.keepIsValid||!!I.keepDirtyValues,a.watch=!!t.shouldUnregister,p.state.next({submitCount:I.keepSubmitCount?n.submitCount:0,isDirty:ee?!1:I.keepDirty?n.isDirty:!!(I.keepDefaultValues&&!xi(A,s)),isSubmitted:I.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ee?{}:I.keepDirtyValues?I.keepDefaultValues&&i?ec(s,i):n.dirtyFields:I.keepDefaultValues&&A?ec(s,A):I.keepDirty?n.dirtyFields:{},touchedFields:I.keepTouched?n.touchedFields:{},errors:I.keepErrors?n.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ss=(A,I)=>ks(Dr(A)?A(i):A,I),Es=(A,I={})=>{const B=ue(r,A),te=B&&B._f;if(te){const ee=te.refs?te.refs[0]:te.ref;ee.focus&&(ee.focus(),I.shouldSelect&&Dr(ee.select)&&ee.select())}},Js=A=>{n={...n,...A}},Kn={control:{register:bt,unregister:ye,getFieldState:le,handleSubmit:pr,setError:T,_subscribe:_e,_runSchema:E,_focusError:Lt,_getWatch:O,_getDirty:M,_setValid:x,_setFieldArray:g,_setDisabledField:gt,_setErrors:m,_getFieldArray:W,_reset:ks,_resetDefaultValues:()=>Dr(t.defaultValues)&&t.defaultValues().then(A=>{Ss(A,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:R,_disableForm:rn,_subjects:p,_proxyFormState:u,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(A){a=A},get _defaultValues(){return s},get _names(){return o},set _names(A){o=A},get _formState(){return n},get _options(){return t},set _options(A){t={...t,...A}}},subscribe:ie,trigger:$,register:bt,handleSubmit:pr,watch:L,setValue:K,getValues:C,reset:Ss,resetField:Gn,clearErrors:oe,unregister:ye,setError:T,setFocus:Es,getFieldState:le};return{...Kn,formControl:Kn}}function WV(e={}){const t=z.useRef(void 0),n=z.useRef(void 0),[r,s]=z.useState({isDirty:!1,isValidating:!1,isLoading:Dr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Dr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Dr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...o}=HV(e);t.current={...o,formState:r}}const i=t.current.control;return i._options=e,jV(()=>{const a=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}
364),reRenderRoot:!0});return s(o=>({...o,isReady:!0})),i._formState.isReady=!0,a},[i]),z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),z.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),z.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),z.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),z.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),z.useEffect(()=>{e.values&&!xi(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=e.values,s(a=>({...a}))):i._resetDefaultValues()},[i,e.values]),z.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=PV(r,i),t.current}const rk=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ue(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},vj=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?rk(r.ref,n,e):r.refs&&r.refs.forEach(s=>rk(s,n,e))}},qV=(e,t)=>{t.shouldUseNativeValidation&&vj(e,t);const n={};for(const r in e){const s=ue(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(ZV(t.names||Object.keys(e),r)){const a=Object.assign({},ue(n,r));He(a,"root",i),He(n,r,a)}else He(n,r,i)}return n},ZV=(e,t)=>e.some(n=>n.startsWith(t+"."));var GV=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var o=r.unionErrors[0].errors[0];n[a]={message:o.message,type:o.code}}else n[a]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var l=n[a].types,c=l&&l[r.code];n[a]=dj(a,t,n,s,c?[].concat(c,r.message):r.message)}e.shift()}return n},KV=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(a,o){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&vj({},i),{errors:{},values:n.raw?r:c}})}catch(c){return o(c)}return l&&l.then?l.then(void 0,o):l}(0,function(a){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(a))return{values:{},errors:qV(GV(a.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}},Zm="focusScope.autoFocusOnMount",Gm="focusScope.autoFocusOnUnmount",sk={bubbles:!1,cancelable:!0},YV="FocusScope",xj=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[o,l]=b.useState(null),c=gs(s),u=gs(i),d=b.useRef(null),p=mn(t,x=>l(x)),f=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let x=function(m){if(f.paused||!o)return;const _=m.target;o.contains(_)?d.current=_:oi(d.current,{select:!0})},w=function(m){if(f.paused||!o)return;const _=m.relatedTarget;_!==null&&(o.contains(_)||oi(d.current,{select:!0}))},g=function(m){if(document.activeElement===document.body)for(const k of m)k.removedNodes.length>0&&oi(o)};document.addEventListener("focusin",x),document.addEventListener("focusout",w);const y=new MutationObserver(g);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",w),y.disconnect()}}},[r,o,f.paused]),b.useEffect(()=>{if(o){ak.add(f);const x=document.activeElement;if(!o.contains(x)){const g=new CustomEvent(Zm,sk);o.addEventListener(Zm,c),o.dispatchEvent(g),g.defaultPrevented||(JV(nU(wj(o)),{select:!0}),document.activeElement===x&&oi(o))}return()=>{o.removeEventListener(Zm,c),setTimeout(()=>{const g=new CustomEvent(Gm,sk);o.addEventListener(Gm,u),o.dispatchEvent(g),g.defaultPrevented||oi(x??document.body,{select:!0}),o.removeEventListener(Gm,u),ak.remove(f)},0)}}},[o,c,u,f]);const v=b.useCallback(x=>{if(!n&&!r||f.paused)return;const w=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,g=document.activeElement;if(w&&g){const y=x.currentTarget,[m,_]=QV(y);
vendor: 4,675 bytes, line 364
364m&&_?!x.shiftKey&&g===_?(x.preventDefault(),n&&oi(m,{select:!0})):x.shiftKey&&g===m&&(x.preventDefault(),n&&oi(_,{select:!0})):g===y&&x.preventDefault()}},[n,r,f.paused]);return h.jsx(Nt.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});xj.displayName=YV;function JV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(oi(r,{select:t}),document.activeElement!==n)return}function QV(e){const t=wj(e),n=ik(t,e),r=ik(t.reverse(),e);return[n,r]}function wj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ik(e,t){for(const n of e)if(!XV(n,{upTo:t}))return n}function XV(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 eU(e){return e instanceof HTMLInputElement&&"select"in e}function oi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eU(e)&&t&&e.select()}}var ak=tU();function tU(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ok(e,t),e.unshift(t)},remove(t){var n;e=ok(e,t),(n=e[0])==null||n.resume()}}}function ok(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nU(e){return e.filter(t=>t.tagName!=="A")}var Km=0;function rU(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lk()),document.body.insertAdjacentElement("beforeend",e[1]??lk()),Km++,()=>{Km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Km--}},[])}function lk(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var cs=function(){return cs=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},cs.apply(this,arguments)};function bj(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function sU(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var bh="right-scroll-bar-position",_h="width-before-scroll-bar",iU="with-scroll-bars-hidden",aU="--removed-body-scroll-bar-size";function Ym(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oU(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var lU=typeof window<"u"?b.useLayoutEffect:b.useEffect,ck=new WeakMap;function cU(e,t){var n=oU(null,function(r){return e.forEach(function(s){return Ym(s,r)})});return lU(function(){var r=ck.get(n);if(r){var s=new Set(r),i=new Set(e),a=n.current;s.forEach(function(o){i.has(o)||Ym(o,null)}),i.forEach(function(o){s.has(o)||Ym(o,a)})}ck.set(n,e)},[e]),n}function uU(e){return e}function dU(e,t){t===void 0&&(t=uU);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(i),a=n}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return s}function hU(e){e===void 0&&(e={});var t=dU(null);return t.options=cs({async:!0,ssr:!1},e),t}var _j=function(e){var t=e.sideCar,n=bj(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 b.createElement(r,cs({},n))};
vendor: 4,936 bytes, lines 364-401
364_j.isSideCarExport=!0;function fU(e,t){return e.useMedium(t),_j}var kj=hU(),Jm=function(){},Lp=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Jm,onWheelCapture:Jm,onTouchMoveCapture:Jm}),s=r[0],i=r[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,v=e.noIsolation,x=e.inert,w=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,m=e.gapMode,_=bj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,S=cU([n,t]),E=cs(cs({},_),s);return b.createElement(b.Fragment,null,u&&b.createElement(k,{sideCar:kj,removeScrollBar:c,shards:d,noRelative:f,noIsolation:v,inert:x,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:m}),a?b.cloneElement(b.Children.only(o),cs(cs({},E),{ref:S})):b.createElement(y,cs({},E,{className:l,ref:S}),o))});Lp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lp.classNames={fullWidth:_h,zeroRight:bh};var pU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pU();return t&&e.setAttribute("nonce",t),e}function gU(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yU(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vU=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mU())&&(gU(t,n),yU(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xU=function(){var e=vU();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Sj=function(){var e=xU(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},wU={left:0,top:0,right:0,gap:0},Qm=function(e){return parseInt(e||"",10)||0},bU=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Qm(n),Qm(r),Qm(s)]},_U=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wU;var t=bU(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])}},kU=Sj(),Yo="data-scroll-locked",SU=function(e,t,n,r){var s=e.left,i=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
365  .`.concat(iU,` {
366   overflow: hidden `).concat(r,`;
367   padding-right: `).concat(o,"px ").concat(r,`;
368  }
369  body[`).concat(Yo,`] {
370    overflow: hidden `).concat(r,`;
371    overscroll-behavior: contain;
372    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
373    padding-left: `.concat(s,`px;
374    padding-top: `).concat(i,`px;
375    padding-right: `).concat(a,`px;
376    margin-left:0;
377    margin-top:0;
378    margin-right: `).concat(o,"px ").concat(r,`;
379    `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
380  }
381  
382  .`).concat(bh,` {
383    right: `).concat(o,"px ").concat(r,`;
384  }
385  
386  .`).concat(_h,` {
387    margin-right: `).concat(o,"px ").concat(r,`;
388  }
389  
390  .`).concat(bh," .").concat(bh,` {
391    right: 0 `).concat(r,`;
392  }
393  
394  .`).concat(_h," .").concat(_h,` {
395    margin-right: 0 `).concat(r,`;
396  }
397  
398  body[`).concat(Yo,`] {
399    `).concat(aU,": ").concat(o,`px;
400  }
401`)},uk=function(){var e=parseInt(document.body.getAttribute(Yo)||"0",10);return isFinite(e)?e:0},EU=function(){b.useEffect(function(){return document.body.setAttribute(Yo,(uk()+1).toString()),function(){var e=uk()-1;e<=0?document.body.removeAttribute(Yo):document.body.setAttribute(Yo,e.toString())}},[])},CU=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;EU();var i=b.useMemo(function(){return _U(s)},[s]);return b.createElement(kU,{styles:SU(i,!t,s,n?"":"!important")})},kv=!1;if(typeof window<"u")try{var Ld=Object.defineProperty({},"passive",{get:function(){return kv=!0,!0}});window.addEventListener("test",Ld,Ld),window.removeEventListener("test",Ld,Ld)}catch{kv=!1}var oo=kv?{passive:!1}:!1,TU=function(e){return e.tagName==="TEXTAREA"},Ej=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!TU(e)&&n[t]==="visible")},AU=function(e){return Ej(e,"overflowY")},PU=function(e){return Ej(e,"overflowX")},dk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Cj(e,r);if(s){var i=Tj(e,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jU=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},NU=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Cj=function(e,t){return e==="v"?AU(t):PU(t)},Tj=function(e,t){return e==="v"?jU(t):NU(t)},RU=function(e,t){return e==="h"&&t==="rtl"?-1:1}
vendor: 4,364 bytes, lines 401-404
401,OU=function(e,t,n,r,s){var i=RU(e,window.getComputedStyle(t).direction),a=i*r,o=n.target,l=t.contains(o),c=!1,u=a>0,d=0,p=0;do{if(!o)break;var f=Tj(e,o),v=f[0],x=f[1],w=f[2],g=x-w-i*v;(v||g)&&Cj(e,o)&&(d+=g,p+=v);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(p)<1||!s))&&(c=!0),c},Md=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hk=function(e){return[e.deltaX,e.deltaY]},fk=function(e){return e&&"current"in e?e.current:e},IU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DU=function(e){return`
402  .block-interactivity-`.concat(e,` {pointer-events: none;}
403  .allow-interactivity-`).concat(e,` {pointer-events: all;}
404`)},LU=0,lo=[];function MU(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),s=b.useState(LU++)[0],i=b.useState(Sj)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var x=sU([e.lockRef.current],(e.shards||[]).map(fk),!0).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=b.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!a.current.allowPinchZoom;var g=Md(x),y=n.current,m="deltaX"in x?x.deltaX:y[0]-g[0],_="deltaY"in x?x.deltaY:y[1]-g[1],k,S=x.target,E=Math.abs(m)>Math.abs(_)?"h":"v";if("touches"in x&&E==="h"&&S.type==="range")return!1;var P=dk(E,S);if(!P)return!0;if(P?k=E:(k=E==="v"?"h":"v",P=dk(E,S)),!P)return!1;if(!r.current&&"changedTouches"in x&&(m||_)&&(r.current=k),!k)return!0;var j=r.current||k;return OU(j,w,x,j==="h"?m:_,!0)},[]),l=b.useCallback(function(x){var w=x;if(!(!lo.length||lo[lo.length-1]!==i)){var g="deltaY"in w?hk(w):Md(w),y=t.current.filter(function(k){return k.name===w.type&&(k.target===w.target||w.target===k.shadowParent)&&IU(k.delta,g)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var m=(a.current.shards||[]).map(fk).filter(Boolean).filter(function(k){return k.contains(w.target)}),_=m.length>0?o(w,m[0]):!a.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),c=b.useCallback(function(x,w,g,y){var m={name:x,delta:w,target:g,should:y,shadowParent:$U(g)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(_){return _!==m})},1)},[]),u=b.useCallback(function(x){n.current=Md(x),r.current=void 0},[]),d=b.useCallback(function(x){c(x.type,hk(x),x.target,o(x,e.lockRef.current))},[]),p=b.useCallback(function(x){c(x.type,Md(x),x.target,o(x,e.lockRef.current))},[]);b.useEffect(function(){return lo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,oo),document.addEventListener("touchmove",l,oo),document.addEventListener("touchstart",u,oo),function(){lo=lo.filter(function(x){return x!==i}),document.removeEventListener("wheel",l,oo),document.removeEventListener("touchmove",l,oo),document.removeEventListener("touchstart",u,oo)}},[]);var f=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:DU(s)}):null,f?b.createElement(CU,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $U(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FU=fU(kj,MU);var Aj=b.forwardRef(function(e,t){return b.createElement(Lp,cs({},e,{ref:t,sideCar:FU}))});Aj.classNames=Lp.classNames;var zU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},co=new WeakMap,$d=new WeakMap,Fd={},Xm=0,Pj=function(e){return e&&(e.host||Pj(e.parentNode))},BU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pj(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})},VU=function(e,t,n,r){var s=BU(t,Array.isArray(e)?e:[e]);Fd[n]||(Fd[n]=new WeakMap);var i=Fd[n],a=[],o=new Set,l=new Set(s),c=function(d){!d||o.has(d)||(o.add(d),c(d.parentNode))};
vendor: 6,936 bytes, lines 404-408
404s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(o.has(p))u(p);else try{var f=p.getAttribute(r),v=f!==null&&f!=="false",x=(co.get(p)||0)+1,w=(i.get(p)||0)+1;co.set(p,x),i.set(p,w),a.push(p),x===1&&v&&$d.set(p,!0),w===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return u(t),o.clear(),Xm++,function(){a.forEach(function(d){var p=co.get(d)-1,f=i.get(d)-1;co.set(d,p),i.set(d,f),p||($d.has(d)||d.removeAttribute(r),$d.delete(d)),f||d.removeAttribute(n)}),Xm--,Xm||(co=new WeakMap,co=new WeakMap,$d=new WeakMap,Fd={})}},UU=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=zU(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),VU(r,s,n,"aria-hidden")):function(){return null}},Mp="Dialog",[jj,aoe]=Bu(Mp),[HU,Wr]=jj(Mp),Nj=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,o=b.useRef(null),l=b.useRef(null),[c,u]=xP({prop:r,defaultProp:s??!1,onChange:i,caller:Mp});return h.jsx(HU,{scope:t,triggerRef:o,contentRef:l,contentId:$m(),titleId:$m(),descriptionId:$m(),open:c,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};Nj.displayName=Mp;var Rj="DialogTrigger",WU=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Rj,n),i=mn(t,s.triggerRef);return h.jsx(Nt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Wx(s.open),...r,ref:i,onClick:at(e.onClick,s.onOpenToggle)})});WU.displayName=Rj;var Ux="DialogPortal",[qU,Oj]=jj(Ux,{forceMount:void 0}),Ij=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Wr(Ux,t);return h.jsx(qU,{scope:t,forceMount:n,children:b.Children.map(r,a=>h.jsx(jl,{present:n||i.open,children:h.jsx(gx,{asChild:!0,container:s,children:a})}))})};Ij.displayName=Ux;var Rf="DialogOverlay",Dj=b.forwardRef((e,t)=>{const n=Oj(Rf,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Wr(Rf,e.__scopeDialog);return i.modal?h.jsx(jl,{present:r||i.open,children:h.jsx(GU,{...s,ref:t})}):null});Dj.displayName=Rf;var ZU=df("DialogOverlay.RemoveScroll"),GU=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Rf,n);return h.jsx(Aj,{as:ZU,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(Nt.div,{"data-state":Wx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wa="DialogContent",Lj=b.forwardRef((e,t)=>{const n=Oj(Wa,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Wr(Wa,e.__scopeDialog);return h.jsx(jl,{present:r||i.open,children:i.modal?h.jsx(KU,{...s,ref:t}):h.jsx(YU,{...s,ref:t})})});Lj.displayName=Wa;var KU=b.forwardRef((e,t)=>{const n=Wr(Wa,e.__scopeDialog),r=b.useRef(null),s=mn(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return UU(i)},[]),h.jsx(Mj,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:at(e.onFocusOutside,i=>i.preventDefault())})}),YU=b.forwardRef((e,t)=>{const n=Wr(Wa,e.__scopeDialog),r=b.useRef(!1),s=b.useRef(!1);return h.jsx(Mj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),Mj=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=e,o=Wr(Wa,n),l=b.useRef(null),c=mn(t,l);return rU(),h.jsxs(h.Fragment,{children:[h.jsx(xj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(wp,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Wx(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(JU,{titleId:o.titleId}),h.jsx(XU,{contentRef:l,descriptionId:o.descriptionId})]})]})}),Hx="DialogTitle",$j=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Hx,n);return h.jsx(Nt.h2,{id:s.titleId,...r,ref:t})});$j.displayName=Hx;var Fj="DialogDescription",zj=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Fj,n);return h.jsx(Nt.p,{id:s.descriptionId,...r,ref:t})});zj.displayName=Fj;var Bj="DialogClose",Vj=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Wr(Bj,n);return h.jsx(Nt.button,{type:"button",...r,ref:t,onClick:at(e.onClick,()=>s.onOpenChange(!1))})});Vj.displayName=Bj;function Wx(e){return e?"open":"closed"}var Uj="DialogTitleWarning",[ooe,Hj]=r$(Uj,{contentName:Wa,titleName:Hx,docsSlug:"dialog"}),JU=({titleId:e})=>{const t=Hj(Uj),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
405
406If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
407
408For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},QU="DialogDescriptionWarning",XU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hj(QU).contentName}}.`;return b.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},e8=Nj,t8=Ij,Wj=Dj,qj=Lj,Zj=$j,Gj=zj,n8=Vj;const r8=e8,s8=t8,Kj=b.forwardRef(({className:e,...t},n)=>h.jsx(Wj,{ref:n,className:Hr("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Kj.displayName=Wj.displayName;const Yj=b.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(s8,{children:[h.jsx(Kj,{}),h.jsxs(qj,{ref:r,className:Hr("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,h.jsxs(n8,{className:"absolute right-4 top-4 roun
408ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[h.jsx(ds,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Yj.displayName=qj.displayName;const Jj=b.forwardRef(({className:e,...t},n)=>h.jsx(Zj,{ref:n,className:Hr("text-lg font-semibold leading-none tracking-tight",e),...t}));Jj.displayName=Zj.displayName;const Qj=b.forwardRef(({className:e,...t},n)=>h.jsx(Gj,{ref:n,className:Hr("text-sm text-muted-foreground",e),...t}));Qj.displayName=Gj.displayName;const Xj=[{id:"gcc-licensing",badge:"AED 5 ONLY",title:"GCC Healthcare Licensing Webinar — English Session",shortDescription:"A comprehensive live webinar designed for healthcare professionals planning to obtain a GCC healthcare license and build their career in the Gulf countries.",includes:["GCC Licensing Process","DataFlow Verification","Prometric Exam Guidance","Documentation Checklist","Country-wise Licensing Pathways","Common Mistakes to Avoid","Live Q&A Session","Digital Participation Certificate","Bonus GCC Licensing PDF Guide"],audience:["Doctors","Dentists","Nurses","Pharmacists","Physiotherapists","Laboratory Professionals","Radiographers","Allied Healthcare","Students"],primaryCta:"Register Now",secondaryCta:"View Topics",price:"Registration Fee",language:"en",startsAt:"2026-07-10T13:00:00Z",durationMinutes:90,isFree:!1,attendeeCount:247,liveBadges:["Certificate Included","Bonus PDF Included","Beginner Friendly"]},{id:"germany-career",badge:"FREE WEBINAR",title:"Germany Healthcare Career Webinar — Nurses & Physiotherapists",shortDescription:"A live career guidance webinar explaining the complete recruitment process for healthcare professionals planning to build their career in Germany.",includes:["Germany Recruitment Process","Eligibility Requirements","Nursing Career Path in Germany","Physiotherapy Career Path","Salary Expectations","German Language Requirements","Language Training Support","Required Documents","Recruiter Expectations","Interview Preparation","Visa & Relocation Guidance","Career Growth Opportunities","Live Questions & Answers"],audience:["Registered Nurses","BSc Nurses","GNM 
408Nurses","Physiotherapists","Fresh Graduates","Experienced Professionals"],primaryCta:"Register Free",secondaryCta:"View Details",language:"en",startsAt:"2026-07-17T13:00:00Z",durationMinutes:90,isFree:!0,attendeeCount:168,liveBadges:["Germany Recruitment","Career Guidance","Language Support"]},{id:"live-qa",badge:"AED 25",title:"Live GCC Licensing Q&A Session",shortDescription:"Interactive expert-led session to discuss your profession-specific GCC licensing concerns.",includes:["Live Expert Interaction","Personalized Q&A","Licensing Clarifications","Career Guidance","Real Case Discussions","Practical Licensing Advice"],primaryCta:"Reserve Your Seat",secondaryCta:"Join Q&A Session",price:"AED 25 ONLY",language:"en",startsAt:null,durationMinutes:90,isFree:!1,attendeeCount:89,liveBadges:["Live Expert Session","Seats Filling Fast"]}],loe=[{title:"GCC Healthcare Licensing",description:"Overview of healthcare licensing across UAE, Saudi Arabia, Qatar, Oman, Bahrain and Kuwait — covering DHA, DOH, MOHAP, SCFHS, QCHP, OMSB and NHRA."},{title:"Eligibility Requirements",description:"Profession-wise eligibility criteria for nurses, doctors, pharmacists, dentists, physiotherapists, lab technicians and allied healthcare professionals."},{title:"DataFlow Verification",description:"Step-by-step DataFlow primary source verification process — required documents, processing times, and how to avoid common rejections."},{title:"Prometric Exams",description:"Authority-wise Prometric exam patterns, scheduling, scoring, and proven preparation strategies for first-attempt success."},{title:"Documentation Process",description:"Mandatory documents, attestation flow, embassy requirements and how Healthserve manages documentation end-to-end."},{title:"Career Opportunities",description:"Realistic salary ranges, hiring trends and career growth paths across GCC government and private healthcare facilities."},{title:"Common Mistakes to Avoid",description:"The most frequent mistakes that delay licensing — from photo specs to credential mismatches — and how to prevent them."},{title:"Country-Wise Licensing Guidance",description:"A practical comparison of DHA, DOH, MOHAP, SCFHS, QCHP, OMSB and NHRA — costs, timelines and difficulty levels."},{title:"Germany Recruitment Pathway",description:"End-to-end recruitment process for nurses and physiotherapists relocating to Germany — eligibility, timelines and support."},{title:"German Language Requirements",description:"B1/B2 language expectations, training support, exam preparation and how language impacts recruitment and salaries."},{title:"Nursing Licensing",description:"Tailored licensing pathway for nurses including bridging requirements, NCLEX equivalence and Prometric specialty mapping."},{title:"Doctor Licensing",description:"Specialty recognition, residency equivalence and assessment pathways for general practitioners and specialists."},{title:"Allied Healthcare Licensing",description:"Licensing roadmap for pharmacists, physiotherapists, lab technicians, radiographers and other allied healthcare professions."}],coe=[{title:"Expert Licensing Guidance",desc:"Direct insights from senior GCC licensing consultants.",icon:"GraduationCap"},{title:"Live Q&A Interaction",desc:"Get your profession-specific questions answered live.",icon:"MessageCircle"},{title:"Career Roadmap Clarity",desc:"A clear, step-by-step pathway to your GCC career.",icon:"Compass"},{title:"Avoid Licensing Mistakes",desc:"Learn what delays applications — and how to prevent it.",icon:"ShieldAlert"},{title:"Certificate of Participation",desc:"A verified certificate emailed after the session.",icon:"Award"},{title:"Professional Networking",desc:"Connect with healthcare professionals across the GCC.",icon:"Users"}];function i8(e){return{id:e.slug,badge:e.badge,title:e.title,shortDescription:e.short_description,includes:e.includes??[],audience:e.audience??[],primaryCta:e.primary_cta,secondaryCta:e.secondary_cta,price:e.price??void 0,language:e.language??"en",startsAt:e.starts_at,durationMinutes:e.duration_minutes,isFree:e.is_free,attendeeCount:e.attendee_count,liveBadges:e.live_badges??[],status:e.status??"upcoming",countdownLabel:e.countdown_label||"Next Webinar Starts In",showCountdown:e.show_countdown!==!1,dbId:e.id,isRegistrable:e.is_registrable}}let ka=null;const Sv=new Set;async function eN(){const{data:e,error:t}=await kt.from("webinars").select("*").eq("published",!0).order("sort_order");t||!e||e.length===0?ka=Xj.map(n=>({...n,dbId:n.id,isRegistrable:n.id!=="live-qa"})):ka=e.map(i8),Sv.forEach(n=>n())}function $p(){const[e,t]=b.useState(ka??Xj.map(s=>({...s,dbId:s.id,isRegistrable:s.id!=="live-qa"}))),[n,r]=b.useState(ka===null);return b.useEffect(()=>{const s=()=>{t(ka),r(!1)};return Sv.add(s),ka===null?eN():s(),()=>{Sv.delete(s)}},[]),{webinars:e,loading:n}}function uoe(){ka=null,eN()}function tN(e){const t=Date.now();return e.filter(n=>
408n.status!=="cancelled"&&n.status!=="completed").filter(n=>n.startsAt&&new Date(n.startsAt).getTime()>t).sort((n,r)=>+new Date(n.startsAt)-+new Date(r.startsAt))[0]}const a8=Rx({name:Sn().trim().min(2,"Enter your full name").max(80),profession:Sn().min(1,"Select your profession"),experience:Sn().min(1,"Select your years of experience"),country:Sn().min(1,"Select your country"),whatsapp:Sn().trim().regex(/^\+?[0-9\s-]{8,20}$/,"Enter a valid mobile number"),email:Sn().trim().email("Enter a valid email").max(255),preferredWebinar:Sn().min(1,"Select a webinar"),consent:f9(!0,{message:"Consent is required"})}),o8=["Nurse","Doctor","Pharmacist","Dentist","Physiotherapist","Lab Technician","Radiographer","Allied Healthcare","Healthcare Student"],l8=["Nurse","Physiotherapist"],c8=["UAE","Saudi Arabia","Qatar","Oman","Bahrain","Kuwait","India","Philippines","Egypt","Pakistan","Other"],u8=["Fresh Graduate","0–2 years","3–5 years","6–10 years","10+ years"],eg="gcc-licensing",d8=({open:e,onOpenChange:t,preselect:n})=>{var S;const{webinars:r}=$p(),[s,i]=b.useState(1),[a,o]=b.useState(n??eg),[l,c]=b.useState(!1),[u,d]=b.useState(""),{register:p,handleSubmit:f,formState:{errors:v},reset:x,setValue:w,watch:g}=WV({resolver:KV(a8),defaultValues:{preferredWebinar:((S=r.find(E=>E.id===(n??eg)))==null?void 0:S.title)??""}});b.useEffect(()=>{var E;if(e){const P=n??eg;i(n?2:1),o(P),c(!1),d(""),w("preferredWebinar",((E=r.find(j=>j.id===P))==null?void 0:E.title)??"")}else setTimeout(()=>{i(1),x()},300)},[e,n,x,w,r]),b.useEffect(()=>{var E;w("preferredWebinar",((E=r.find(P=>P.id===a))==null?void 0:E.title)??"")},[a,w,r]);const y=async E=>{if(l)return;c(!0),d("");const P=r.find(j=>j.id===a);try{await kt.from("webinar_registrations").insert({webinar_id:(P==null?void 0:P.dbId)??null,webinar_slug:a,webinar_title:E.preferredWebinar,name:E.name,email:E.email,whatsapp:E.whatsapp,profession:E.profession,experience:E.experience,country:E.country,consent:E.consent});try{await Lx("WebinarRegistrations",[new Date().toISOString(),E.preferredWebinar,a,E.name,E.profession,E.experience,E.country,E.whatsapp,E.email,E.consent?"Yes":"No"])}catch(j){console.warn("Sheet mirror failed (registration still saved to DB)",j)}i(3)}catch(j){console.error("Webinar registration failed",j),d("Registration could not be recorded. Please try again.")}finally{c(!1)}},m=r.find(E=>E.id===a)??r[0],_=r.filter(E=>E.isRegistrable!==!1),k=a==="germany-career"?l8:o8;return h.jsx(r8,{open:e,onOpenChange:t,children:h.jsxs(Yj,{className:"max-w-xl p-0 overflow-hidden border-0 shadow-2xl rounded-3xl bg-white",children:[h.jsx(Jj,{className:"sr-only",children:"Webinar Registration"}),h.jsx(Qj,{className:"sr-only",children:"Register for a Healthserve healthcare webinar"}),h.jsx("div",{className:"h-1.5 w-full",style:{background:"linear-gradient(90deg, #F9A01B, #2CC5F4)"}}),h.jsx("div",{className:"px-6 pt-6 pb-2 flex items-center gap-2",children:[1,2,3].map(E=>h.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[h.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-[11px] font-bold transition-all ${s>=E?"bg-gradient-to-br from-[#F9A01B] to-[#e88d0c] text-white shadow-md":"bg-gray-100 text-gray-600"}`,children:s>E?h.jsx(ff,{size:14}):E}),E<3&&h.jsx("div",{className:`flex-1 h-0.5 rounded-full transition-all ${s>E?"bg-[#F9A01B]":"bg-gray-100"}`})]},E))}),h.jsxs("div",{className:"px-6 pb-6 pt-4 min-h-[420px]",children:[s===1&&h.jsxs("div",{className:"animate-fade-in",children:[h.jsx("h3",{className:"font-display font-bold text-xl text-gray-900 mb-1",children:"Select a webinar"}),h.jsx("p",{className:"text-sm text-gray-500 mb-5",children:"Pick the session you want to attend."}),h.jsx("div",{className:"space-y-2.5",children:r.map(E=>h.jsx("button",{type:"button",onClick:()=>o(E.id),className:`w-full text-left p-4 rounded-2xl border-2 transition-all ${a===E.id?"border-[#F9A01B] bg-[#F9A01B]/5 shadow-md":"border-gray-100 hover:border-gray-200 bg-white"}`,children:h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex-shrink-0 mt-0.5 flex items-center justify-center ${a===E.id?"border-[#F9A01B] bg-[#F9A01B]":"border-gray-300"}`,children:a===E.id&&h.jsx(ff,{size:12,className:"text-white"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:h.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full ${E.isFree?"bg-green-50 text-green-600":"bg-[#F9A01B]/10 text-[#F9A01B]"}`,children:E.badge})}),h.jsx("p",{className:"font-semibold text-gray-900 text-sm leading-tight",children:E.title})]})]})},E.id))}),h.jsxs("button",{type:"button",onClick:()=>i(2),className:"w-full mt-5 btn-primary-hs !py-3 text-sm flex items-center justify-center gap-2",children:["Continue ",h.jsx(Un,{size:16})]})]}),s===2&&h.jsxs("form",{onSubmit:f(y),className:"animate-fade-in space-y-4",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-display font-bold text-xl text-gray-900 mb-1",children:"Your details"}),h.jsxs("p",{className:"text-sm text-gray-500",children:["Registering for: ",h.jsx("span",{className:"font-semibold text-gray-700",children:m.title})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Full Name"}
408),h.jsx("input",{...p("name"),className:"w-full h-11 px-4 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition",placeholder:"John Doe"}),v.name&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.name.message})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Email Address"}),h.jsx("input",{...p("email"),type:"email",className:"w-full h-11 px-4 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition",placeholder:"[email protected]"}),v.email&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.email.message})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Mobile Number (WhatsApp)"}),h.jsx("input",{...p("whatsapp"),className:"w-full h-11 px-4 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition",placeholder:"+971 50 123 4567"}),v.whatsapp&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.whatsapp.message})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Country"}),h.jsxs("select",{...p("country"),className:"w-full h-11 px-3 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition bg-white",children:[h.jsx("option",{value:"",children:"Select…"}),c8.map(E=>h.jsx("option",{value:E,children:E},E))]}),v.country&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.country.message})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Profession"}),h.jsxs("select",{...p("profession"),className:"w-full h-11 px-3 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition bg-white",children:[h.jsx("option",{value:"",children:"Select…"}),k.map(E=>h.jsx("option",{value:E,children:E},E))]}),v.profession&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.profession.message})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Years of Experience"}),h.jsxs("select",{...p("experience"),className:"w-full h-11 px-3 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition bg-white",children:[h.jsx("option",{value:"",children:"Select…"}),u8.map(E=>h.jsx("option",{value:E,children:E},E))]}),v.experience&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.experience.message})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-xs font-semibold text-gray-600 mb-1.5 block",children:"Preferred Webinar"}),h.jsx("select",{...p("preferredWebinar"),onChange:E=>{const P=_.find(j=>j.title===E.target.value);P&&o(P.id),w("preferredWebinar",E.target.value)},className:"w-full h-11 px-3 rounded-xl border border-gray-200 focus:border-[#F9A01B] focus:ring-2 focus:ring-[#F9A01B]/15 outline-none transition bg-white",children:_.map(E=>h.jsx("option",{value:E.title,children:E.title},E.id))}),v.preferredWebinar&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:v.preferredWebinar.message})]}),h.jsxs("label",{className:"flex items-start gap-2.5 text-xs text-gray-700 cursor-pointer",children:[h.jsx("input",{type:"checkbox",...p("consent"),className:"mt-0.5 w-4 h-4 rounded border-gray-300 text-[#F9A01B] focus:ring-[#F9A01B]/30"}),h.jsx("span",{children:"I agree to be contacted by Healthserve Health Consultancy regarding this webinar."})]}),v.consent&&h.jsx("p",{className:"text-[11px] text-red-500 -mt-2",children:v.consent.message}),h.jsxs("div",{className:"flex gap-3 pt-2",children:[h.jsxs("button",{type:"button",onClick:()=>i(1),disabled:l,className:"px-5 py-3 rounded-full border border-gray-200 text-gray-600 text-sm font-semibold flex items-center gap-2 hover:bg-gray-50 transition disabled:opacity-50",children:[h.jsx(VP,{size:14})," Back"]}),h.jsxs("button",{type:"submit",disabled:l,className:"flex-1 btn-primary-hs !py-3 text-sm flex items-center justify-center gap-2 disabled:opacity-50",children:[l?"Recording...":"Register Now"," ",!l&&h.jsx(Un,{size:16})]})]}),u&&h.jsx("p",{className:"text-[12px] text-red-500 text-center",children:u})]}),s===3&&h.jsxs("div",{className:"animate-fade-in text-center py-6",children:[h.jsx("div",{className:"w-16 h-16 rounded-full mx-auto mb-4 flex items-center justify-center",style:{background:"linear-gradient(135deg, rgba(249,160,27,0.15), rgba(44,197,244,0.15))"},children:h.jsx(aF,{size:36,className:"text-[#F9A01B]",strokeWidth:2.4})}),h.jsx("h3",{className:"font-display font-extrabold text-2xl text-gray-900 mb-2",children:"Registration Successful!"}),h.jsx("p",{className:"text-sm text-gray-600 max-w-sm mx-auto leading-relaxed",children:"You will receive webinar details through Email and WhatsApp before the session begins."}),h.jsxs("p",{className:"mt-4 text-xs text-gray-500",children:["Session: ",h.jsx("span",{className:"font-semibold text-gray-700",children:g("preferredWebinar")||m.title})]}),h.jsx("button",{type:"button",onClick:()=>t(!1),className:"mt-6 btn-primary-hs !py-2.5 !px-8 text-sm inline-flex items-center gap-2",children:"Done"})]})]})]})})},nN=b.createContext(null),h8=({children:e})=>{const[t,n]=b.useState(!1),[r,s]=b.useState(),i=b.useCallback(a=>{s(a),n(!0)},[]);return h.jsxs(nN.Provider,{value:{open:i},children:[e,h.jsx(d8,{open:t,onOpenChange:n,preselect:r})]})},rN=()=>{const e=b.useContext(nN);if(!e)throw new Error("useWebinarRegistration must be used within WebinarRegistrationProvider");return e},sN=b.createContext(void 0),f8=({children:e})=>{const[t,n]=b.useState(null),[r,s]=b.useState(null),[i,a]=b.useState([]),[o,l]=b.useState(!0),c=async v=>{if(!v){a([]);return}const{data:x}=await kt.from("user_roles").select("role").eq("user_id",v);a((x??[]).map(w=>w.role))};b.useEffect(()=>{const{data:v}=kt.auth.onAuthStateChange((x,w)=>{s(w),n((w==null?void 0:w.user)??null),setTimeout(()=>{var g;return c((g=w==null?void 0:w.user)==null?void 0:g.id)},0)});return kt.auth.getSession().then(({data:x})=>{var w,g,y;
408s(x.session),n(((w=x.session)==null?void 0:w.user)??null),c((y=(g=x.session)==null?void 0:g.user)==null?void 0:y.id).finally(()=>l(!1))}),()=>v.subscription.unsubscribe()},[]);const u=async()=>{await kt.auth.signOut(),a([])},d=async()=>{await c(t==null?void 0:t.id)},p=i.includes("admin"),f=i.includes("editor");return h.jsx(sN.Provider,{value:{user:t,session:r,roles:i,loading:o,isAdmin:p,isEditor:f,isStaff:p||f,signOut:u,refreshRoles:d},children:e})},p8=()=>{const e=b.useContext(sN);if(!e)throw new Error("useAdminAuth must be used inside AdminAuthProvider");return e},iN=b.createContext(void 0),m8=e=>!e||e==="/"?"home":e.replace(/^\/+|\/+$/g,"").replace(/\//g,"."),g8=({children:e})=>{const{isStaff:t}=p8(),n=hr(),r=m8(n.pathname),[s,i]=b.useState(!1),[a,o]=b.useState({}),[l,c]=b.useState(new Set),[u,d]=b.useState(!1),[p,f]=b.useState(0);b.useEffect(()=>{i(!1),d(!1)},[r]),b.useEffect(()=>{let y=!0;return(async()=>{const{data:m}=await kt.from("page_content").select("section_key,data").eq("page_key",r);if(!y)return;const _={},k=new Set;(m??[]).forEach(S=>{var E;_[S.section_key]=((E=S.data)==null?void 0:E.value)??S.data,k.add(S.section_key)}),o(_),c(k),d(!0),f(S=>S+1)})(),()=>{y=!1}},[r]);const v=b.useCallback((y,m)=>{const _=a[y];return _??m},[a]),x=b.useCallback(async(y,m)=>{o(k=>({...k,[y]:m})),c(k=>{if(k.has(y))return k;const S=new Set(k);return S.add(y),S});const{error:_}=await kt.from("page_content").upsert({page_key:r,section_key:y,data:{value:m}},{onConflict:"page_key,section_key"});_?jc.error(`Save failed: ${_.message}`):jc.success("Saved",{duration:1200})},[r]),w=b.useCallback((y,m)=>{!t||!u||l.has(y)||(c(_=>{const k=new Set(_);return k.add(y),k}),kt.from("page_content").insert({page_key:r,section_key:y,data:{value:m}}).then(()=>{}))},[t,u,l,r]),g=b.useMemo(()=>({isStaff:t,editMode:s,setEditMode:i,pageKey:r,get:v,save:x,registerDefault:w,version:p,loaded:u}),[t,s,r,v,x,w,p,u]);return h.jsx(iN.Provider,{value:g,children:e})},aN=()=>{const e=b.useContext(iN);return e||{isStaff:!1,editMode:!1,setEditMode:()=>{},pageKey:"",get:(t,n)=>n,save:async()=>{},registerDefault:()=>{},version:0,loaded:!1}};function y8(){const{isStaff:e,editMode:t,setEditMode:n}=aN(),r=hr();return!e||r.pathname.startsWith("/admin")?null:h.jsxs("button",{type:"button",onClick:()=>n(!t),className:`fixed bottom-6 left-6 z-[250] flex items-center gap-2 px-4 py-3 rounded-full shadow-xl font-semibold text-sm transition-all ${t?"bg-[#F9A01B] text-white ring-4 ring-[#F9A01B]/25":"bg-white text-gray-800 border border-gray-200 hover:shadow-2xl"}`,title:t?"Exit edit mode":"Enter edit mode",children:[t?h.jsx(cF,{size:16}):h.jsx(GP,{size:16}),t?"Exit editing":"Edit page"]})}const oN=()=>{const[e,t]=b.useState(0),[n,r]=b.useState(0);return b.useEffect(()=>{const s=()=>{t(window.scrollY);const i=document.documentElement.scrollHeight-window.innerHeight;r(i>0?window.scrollY/i:0)};return window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),{scrollY:e,scrollProgress:n}},Ev="/assets/logo-BbrZSnz5.png",Cv=({src:e,alt:t,sizes:n,priority:r=!1,className:s="",...i})=>{const[a,o]=b.useState(r),l=b.useRef(null);return b.useEffect(()=>{if(r)return;const c=l.current;if(!c)return;const u=new IntersectionObserver(([d])=>{d.isIntersecting&&(o(!0),u.disconnect())},{rootMargin:"200px"});return u.observe(c),()=>u.disconnect()},[r]),h.jsx("img",{ref:l,src:a?e:void 0,alt:t,loading:r?"eager":"lazy",decoding:"async",sizes:n,className:s,...r?{fetchPriority:"high"}:{},...i})},pk=[{title:"GCC Licensing",icon:Ep,color:"#F9A01B",href:"/services/gcc-licensing",desc:"Licensing, eligibility, Dataflow and Prometric support"},{title:"Training",icon:Uu,color:"#2CC5F4",href:"/training",desc:"BLS, ACLS, PALS, CNA, CPHQ, CPPS and more"},{title:"German Recruitment",icon:UP,color:"#F9A01B",href:"/german-nursing-program",desc:"Nursing placement, B1/B2 German training, visa support"},{title:"MCQ Practice Test",icon:oF,color:"#2CC5F4",href:"/mcq-packages",desc:"DHA, HAAD, MOH, SCFHS, Prometric exam prep banks"},{title:"Healthcare Business Setup",icon:kp,color:"#F9A01B",href:"/services/facility-licensing",desc:"Clinic, medical center and home healthcare permits",fullWidth:!0}],v8=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState(!1),s=b.useRef(null),{openFlow:i}=Mx(),{scrollY:a}=oN(),o=a>36;return b.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),b.useEffect(()=>{const l=u=>{s.current&&!s.current.contains(u.target)&&r(!1)},c=u=>{u.key==="Escape"&&r(!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[]),h.jsxs(h.Fragment,{children:[h.jsx("nav",{className:`fixed left-0 right-0 z-50 transition-all duration-500 nav-glass ${o?"top-0":"top-9"}`,style:{height:64},children:h.jsxs("div",{className:"max-w-[1320px] mx-auto px-6 md:px-10 h-full flex items-center justify-between",children:[h.jsx(ze,{to:"/",className:"flex-shrink-0",children:h.jsx(Cv,{src:Ev,alt:"Healthserve Health Consultancy",className:"h-9",priority:!0})}),h.jsxs("div",{className:"hidden lg:flex items-center gap-10",children:[h.jsxs("div",{ref:s,className:"relative",children:[h.jsxs("button",{type:"button","aria-expanded":n,"aria-haspopup":"menu",onClick:()=>r(l=>!l),className:`flex items-center gap-1.5 text-[13px] font-semibold transition-colors tracking-wide uppercase ${n?"text-gray-900":"text-gray-600 hover:text-gray-900"}`,children:["Programs ",h.jsx(rF,{size:13,className:`transition-transform duration-300 ${n?"rotate-180":""}`})]}),h.jsx("div",{role:"menu",className:`absolute top-full left-1/2 pt-4 transition-all duration-300 ease-out ${n?"opacity-100 visible translate-y-0":"opacity-0 invisible -translate-y-2"}`,style:{transform:`translateX(-50%) translateY(${n?"0":"-8px"})`},children:h.jsxs("div",{className:"relative bg-white/[0.98] backdrop-blur-2xl rounded-[28px] shadow-[0_30px_80px_-15px_rgba(0,0,0,0.12)] border border-gray-100/60 p-5 w-[760px]",children:[h.jsx("div",{className:"absolute -inset-px rounded-[28px] bg-gradient-to-br from-[#F9A01B]/15 via-trans
408parent to-[#2CC5F4]/15 -z-10 blur-md"}),h.jsx("div",{className:"grid grid-cols-2 gap-3",children:pk.map(l=>{const c=l.icon;return h.jsxs(ze,{to:l.href,onClick:()=>r(!1),className:`group/cat flex items-center gap-4 rounded-2xl border border-gray-100/80 bg-white/80 p-4 transition-all duration-300 hover:-translate-y-0.5 hover:border-gray-200 hover:shadow-[0_16px_35px_-20px_rgba(15,23,42,0.35)] ${l.fullWidth?"md:col-span-2":""}`,children:[h.jsx("div",{className:"w-11 h-11 rounded-2xl flex items-center justify-center flex-shrink-0 transition-all duration-300 group-hover/cat:scale-105",style:{background:`linear-gradient(135deg, ${l.color}12, ${l.color}28)`},children:h.jsx(c,{size:18,style:{color:l.color}})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-[13px] font-bold uppercase tracking-[0.12em] text-gray-700 group-hover/cat:text-gray-950 transition-colors",children:l.title}),h.jsx(Lm,{size:14,className:"text-gray-500 transition-transform duration-300 group-hover/cat:translate-x-0.5 group-hover/cat:text-[#F9A01B]"})]}),h.jsx("p",{className:"mt-1 text-[11px] leading-snug text-gray-600 group-hover/cat:text-gray-500 transition-colors",children:l.desc})]})]},l.title)})}),h.jsxs("div",{className:"mt-4 p-3.5 rounded-2xl bg-gradient-to-r from-[#F9A01B]/[0.04] via-white to-[#2CC5F4]/[0.04] border border-gray-100/50 flex items-center justify-between",children:[h.jsx("span",{className:"text-xs text-gray-500 font-medium",children:"Not sure where to start?"}),h.jsxs("button",{onClick:()=>{r(!1),i()},className:"text-xs font-bold text-[#F9A01B] hover:text-[#e8900a] transition-colors flex items-center gap-1 group/cta",children:["Check Eligibility ",h.jsx(Lm,{size:12,className:"group-hover/cta:translate-x-0.5 transition-transform"})]})]})]})})]}),h.jsx(ze,{to:"/webinars",className:"text-[13px] font-semibold text-gray-600 hover:text-gray-900 transition-colors tracking-wide uppercase",children:"Webinars"}),h.jsx(ze,{to:"/careers",className:"text-[13px] font-semibold text-gray-600 hover:text-gray-900 transition-colors tracking-wide uppercase",children:"Careers"}),h.jsx(ze,{to:"/career-hub",className:"text-[13px] font-semibold text-[#2CC5F4] hover:text-[#F9A01B] transition-colors tracking-wide uppercase",children:"Career Hub"}),h.jsx(ze,{to:"/blog",className:"text-[13px] font-semibold text-gray-600 hover:text-gray-900 transition-colors tracking-wide uppercase",children:"Blog"}),h.jsx(ze,{to:"/about",className:"text-[13px] font-semibold text-gray-600 hover:text-gray-900 transition-colors tracking-wide uppercase",children:"About"}),h.jsx(ze,{to:"/contact",className:"text-[13px] font-semibold text-gray-600 hover:text-gray-900 transition-colors tracking-wide uppercase",children:"Contact"})]}),h.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[h.jsxs("a",{href:"https://wa.me/971523941876?text=Hi%20Healthserve!",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm font-semibold text-gray-500 hover:text-[#25D366] transition-colors",children:[h.jsx(KP,{size:14})," WhatsApp"]}),h.jsx(ze,{to:"/book-consultation",className:"btn-primary-hs !py-2.5 !px-6 text-sm",children:"Book Consultation"})]}),h.jsx("button",{onClick:()=>t(!e),className:"lg:hidden text-gray-700 p-2","aria-label":"Toggle menu",children:e?h.jsx(ds,{size:24}):h.jsx(fF,{size:24})})]})}),e&&h.jsxs("div",{className:"fixed inset-0 z-[999] bg-white flex flex-col lg:hidden",children:[h.jsxs("div",{className:"h-[64px] flex items-center justify-between px-6 border-b border-gray-100",children:[h.jsx(Cv,{src:Ev,alt:"Healthserve",className:"h-9",priority:!0}),h.jsx("button",{onClick:()=>t(!1),className:"text-gray-700 p-2",children:h.jsx(ds,{size:24})})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-1",children:[pk.map(l=>{const c=l.icon;return h.jsxs(ze,{to:l.href,onClick:()=>t(!1),className:"flex items-center gap-3 py-3.5 px-3 rounded-2xl transition-colors hover:bg-gray-50",children:[h.jsx("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:`linear-gradient(135deg, ${l.color}15, ${l.color}30)`},children:h.jsx(c,{size:16,style:{color:l.color}})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"text-gray-800 font-semibold text-[15px] block",children:l.title}),h.jsx("span",{className:"text-[11px] text-gray-600 mt-0.5 block",children:l.desc})]}),h.jsx(Lm,{size:16,className:"text-gray-500"})]},l.title)}),h.jsxs("div",{className:"pt-2 space-y-1",children:[h.jsx(ze,{to:"/webinars",onClick:()=>t(!1),className:"block text-gray-800 font-semibold text-[15px] py-3.5 px-3",children:"Webinars"}),h.jsx(ze,{to:"/careers",onClick:()=>t(!1),className:"block text-gray-800 font-semibold text-[15px] py-3.5 px-3",children:"Careers"}),h.jsx(ze,{to:"/career-hub",onClick:()=>t(!1),className:"block text-[#2CC5F4] font-semibold text-[15px] py-3.5 px-3",children:"Career Hub"}),h.jsx(ze,{to:"/blog",onClick:()=>t(!1),className:"block text-gray-800 font-semibold text-[15px] py-3.5 px-3",children:"Blog"}),h.jsx(ze,{to:"/about",onClick:()=>t(!1),className:"block text-gray-800 font-semibold text-[15px] py-3.5 px-3",children:"About"}),h.jsx(ze,{to:"/contact",onClick:()=>t(!1),className:"block text-gray-800 font-semibold text-[15px] py-3.5 px-3",children:"Contact"})]})]}),h.jsxs("div",{className:"p-5 space-y-3 border-t border-gray-100",children:[h.jsx("a",{href:"https://wa.me/971523941876",className:"btn-whatsapp block text-center !py-3 text-sm",children:"💬 WhatsApp Us"}),h.jsx(ze,{to:"/book-consultation",onClick:()=>t(!1),className:"btn-primary-hs block text-center !py-3 text-sm",children:"Book Your Consultation"})]})]})]})},mk=["🚨 NOW RECRUITING – DHA & DOH Registered Nurses, Sales Executives → Apply at /careers","🎓 FREE GCC Licensing Career Webinar – Register Now","🇦🇪 Learn DHA Licensing Process Step-by-Step","💼 Active Openings – Homecare & B2C Marketplace Roles","🇩🇪 German Nursing Recruitment Program Open","📢 Live Arabic Webinar This Frid
408ay","🩺 Free Licensing Eligibility Assessment Available","📚 New BLS AHA Batch Open for Registration","🎯 Limited Seats Available for CNA Training"],x8=()=>{const e=b.useRef(null);b.useEffect(()=>{const n=e.current;if(!n)return;let r,s=0;const i=.5,a=()=>{s-=i,Math.abs(s)>=n.scrollWidth/2&&(s=0),n.style.transform=`translateX(${s}px)`,r=requestAnimationFrame(a)};return r=requestAnimationFrame(a),()=>cancelAnimationFrame(r)},[]);const t=[...mk,...mk];return h.jsxs("div",{className:"relative w-full overflow-hidden",style:{background:"linear-gradient(90deg, #F9A01B 0%, #e88d0c 30%, #F9A01B 60%, #fbbf24 100%)",height:36},children:[h.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%)",animation:"shimmer 4s ease-in-out infinite",backgroundSize:"200% 100%"}}),h.jsx("div",{ref:e,className:"flex items-center h-full whitespace-nowrap will-change-transform",children:t.map((n,r)=>h.jsxs("span",{className:"inline-flex items-center px-8 text-white text-xs font-bold tracking-wide",children:[n,h.jsx("span",{className:"mx-6 w-1 h-1 rounded-full bg-white/40"})]},r))})]})},w8=()=>{const{scrollProgress:e}=oN();return h.jsx("div",{className:"fixed top-0 left-0 right-0 z-[1001] h-[2px]",children:h.jsx("div",{className:"h-full transition-all duration-100",style:{width:`${e*100}%`,background:"linear-gradient(90deg, #F9A01B, #f7c56a)"}})})},Mc="/assets/layla-avatar-CQdVlbXz.jpg",tg="hs-chat-lead";function b8(){const[e,t]=b.useState(()=>{if(typeof window>"u")return null;try{const r=window.localStorage.getItem(tg);if(!r)return null;const s=JSON.parse(r);return s.email?s:null}catch{return null}});return b.useEffect(()=>{typeof window>"u"||e&&window.localStorage.setItem(tg,JSON.stringify(e))},[e]),{lead:e,setLead:t,clearLead:()=>{t(null),typeof window<"u"&&window.localStorage.removeItem(tg)}}}const Do=new Map,zd=new Map;function doe(e){e?Do.delete(e):Do.clear()}function _8(e){const[t,n]=b.useState(Do.get(e)??null),[r,s]=b.useState(!Do.has(e));b.useEffect(()=>{let a=!0;zd.has(e)||zd.set(e,new Set);const o=zd.get(e),l=c=>a&&n(c);return o.add(l),Do.has(e)?s(!1):kt.from("form_definitions").select("slug,name,description,submit_label,success_message,fields").eq("slug",e).maybeSingle().then(({data:c})=>{var u;if(a){if(c){const d={...c,fields:c.fields??[]};Do.set(e,d),(u=zd.get(e))==null||u.forEach(p=>p(d))}s(!1)}}),()=>{a=!1,o.delete(l)}},[e]);const i=a=>t==null?void 0:t.fields.find(o=>o.key===a);return{def:t,loading:r,label:(a,o)=>{var l;return((l=i(a))==null?void 0:l.label)||o},placeholder:(a,o="")=>{var l;return((l=i(a))==null?void 0:l.placeholder)??o},options:(a,o)=>{var c;const l=(c=i(a))==null?void 0:c.options;return l&&l.length?l:o},required:(a,o)=>{var l;return((l=i(a))==null?void 0:l.required)??o},submitLabel:a=>(t==null?void 0:t.submit_label)||a,successMessage:a=>(t==null?void 0:t.success_message)||a}}const k8=Rx({name:Sn().trim().min(2,"Please enter your name").max(60),phone:Sn().trim().regex(/^\+?[0-9 ()-]{7,20}$/,"Enter a valid WhatsApp number"),email:Sn().trim().email("Enter a valid email").max(160),nationality:Sn().trim().min(2,"Required").max(60),profession:p9(["Doctor","Nurse","Pharmacist","Dentist","Allied Health","Student","Other"],{message:"Please select"})}),S8=["Doctor","Nurse","Pharmacist","Dentist","Allied Health","Student","Other"],E8=({onSubmit:e})=>{const t=_8("chat_lead"),[n,r]=b.useState({name:"",phone:"",email:"",nationality:"",profession:""}),[s,i]=b.useState({}),[a,o]=b.useState(!1),l=async d=>{if(d.preventDefault(),a)return;const p=k8.safeParse(n);if(!p.success){const v={};p.error.issues.forEach(x=>{x.path[0]&&(v[x.path[0]]=x.message)}),i(v);return}const f=p.data;o(!0);try{await e({name:f.name,phone:f.phone,email:f.email,nationality:f.nationality,profession:f.profession,createdAt:Date.now()})}finally{o(!1)}},c=d=>({value:n[d],onChange:p=>{r(f=>({...f,[d]:p.target.value})),s[d]&&i(f=>({...f,[d]:""}))}}),u="w-full px-3.5 py-2.5 rounded-xl border border-gray-200 bg-white text-sm text-gray-900 placeholder:text-gray-600 focus:outline-none focus:ring-2 focus:ring-[#F9A01B]/40 focu
408s:border-[#F9A01B] transition";return h.jsxs("form",{onSubmit:l,className:"p-5 space-y-3.5 overflow-y-auto",children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-display font-bold text-gray-900 text-[17px] leading-tight",children:"Let's get you started"}),h.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"A few quick details so Layla can help you better. Saved only on this device."})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-[11px] font-semibold text-gray-600 uppercase tracking-wider",children:t.label("name","Full name")}),h.jsx("input",{...c("name"),className:u,placeholder:t.placeholder("name","Dr. Aisha Khan"),maxLength:60}),s.name&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:s.name})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-[11px] font-semibold text-gray-600 uppercase tracking-wider",children:t.label("phone","WhatsApp number")}),h.jsx("input",{...c("phone"),className:u,placeholder:t.placeholder("phone","+971 50 123 4567"),maxLength:20}),s.phone&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:s.phone})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-[11px] font-semibold text-gray-600 uppercase tracking-wider",children:t.label("email","Email")}),h.jsx("input",{...c("email"),type:"email",className:u,placeholder:t.placeholder("email","[email protected]"),maxLength:160}),s.email&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:s.email})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-[11px] font-semibold text-gray-600 uppercase tracking-wider",children:t.label("nationality","Nationality")}),h.jsx("input",{...c("nationality"),className:u,placeholder:t.placeholder("nationality","Indian, Filipino, Egyptian…"),maxLength:60}),s.nationality&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:s.nationality})]}),h.jsxs("div",{children:[h.jsx("label",{className:"text-[11px] font-semibold text-gray-600 uppercase tracking-wider",children:"Profession"}),h.jsxs("select",{...c("profession"),className:u,children:[h.jsx("option",{value:"",children:"Select your profession"}),S8.map(d=>h.jsx("option",{value:d,children:d},d))]}),s.profession&&h.jsx("p",{className:"text-[11px] text-red-500 mt-1",children:s.profession})]}),h.jsxs("button",{type:"submit",disabled:a,className:"w-full mt-2 py-3 rounded-xl text-white font-bold text-sm inline-flex items-center justify-center gap-2 transition-all hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50",style:{background:"linear-gradient(135deg, #F9A01B 0%, #fbbf24 50%, #2CC5F4 100%)"},children:[a?"Recording...":t.submitLabel("Start chatting with Layla")," ",!a&&h.jsx(Un,{size:16})]}),h.jsx("p",{className:"text-[10px] text-gray-600 text-center",children:"By continuing you agree to be contacted by Healthserve about your enquiry."})]})};var lN="vercel.ai.error",C8=Symbol.for(lN),gk,yk,vs=class cN extends(yk=Error,gk=C8,yk){constructor({name:t,message:n,cause:r}){super(n),this[gk]=!0,this.name=t,this.cause=r}static isInstance(t){return cN.hasMarker(t,lN)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function uN(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var dN="AI_InvalidArgumentError",hN=`vercel.ai.error.${dN}`,T8=Symbol.for(hN),vk,xk,A8=class extends(xk=vs,vk=T8,xk){constructor({message:e,cause:t,argument:n}){super({name:dN,message:e,cause:t}),this[vk]=!0,this.argument=n}static isInstance(e){return vs.hasMarker(e,hN)}},fN="AI_JSONParseError",pN=`vercel.ai.error.${fN}`,P8=Symbol.for(pN),wk,bk,_k=class extends(bk=vs,wk=P8,bk){constructor({text:e,cause:t}){super({name:fN,message:`JSON parsing failed: Text: ${e}.
409Error message: ${uN(t)}`,cause:t}),this[wk]=!0,this.text=e}static isInstance(e){return vs.hasMarker(e,pN)}},mN="AI_TypeValidationError",gN=`vercel.ai.error.${mN}`,j8=Symbol.for(gN),kk,Sk,bl=class Tv extends(Sk=vs,kk=j8,Sk){constructor({value:t,cause:n,context:r}){let s="Type validation failed";if(r!=null&&r.field&&(s+=` for ${r.field}`),r!=null&&r.entityName||r!=null&&r.entityId){s+=" (";const i=[];r.entityName&&i.push(r.entityName),r.entityId&&i.push(`id: "${r.entityId}"`),s+=i.join(", "),s+=")"}super({name:mN,message:`${s}: Value: ${JSON.stringify(t)}.
410Error message: ${uN(n)}`,cause:n}),this[kk]=!0,this.value=t,this.context=r}static isInstance(t){return vs.hasMarker(t,gN)}static wrap({value:t,cause:n,context:r}){var s,i,a;return Tv.isInstance(n)&&n.value===t&&((s=n.context)==null?void 0:s.field)===(r==null?void 0:r.field)&&((i=n.context)==null?void 0:i.entityName)===(r==null?void 0:r.entityName)&&((a=n.context)==null?void 0:a.entityId)===(r==null?void 0:r.entityId)?n:new Tv({value:t,cause:n,context:r})}};
vendor: 26,406 bytes, lines 410-435
410function V(e,t,n){function r(o,l){var c;Object.defineProperty(o,"_zod",{value:o._zod??{},enumerable:!1}),(c=o._zod).traits??(c.traits=new Set),o._zod.traits.add(e),t(o,l);for(const u in a.prototype)u in o||Object.defineProperty(o,u,{value:a.prototype[u].bind(o)});o._zod.constr=a,o._zod.def=l}const s=(n==null?void 0:n.Parent)??Object;class i extends s{}Object.defineProperty(i,"name",{value:e});function a(o){var l;const c=n!=null&&n.Parent?new i:this;r(c,o),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>{var l,c;return n!=null&&n.Parent&&o instanceof n.Parent?!0:(c=(l=o==null?void 0:o._zod)==null?void 0:l.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Su extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const yN={};function Gi(e){return yN}function vN(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function N8(e,t){return typeof t=="bigint"?t.toString():t}function qx(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Zx(e){return e==null}function Gx(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function R8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return i%a/10**s}function Fe(e,t,n){Object.defineProperty(e,t,{get(){{const r=n();return e[t]=r,r}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Fp(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nc(e){return JSON.stringify(e)}const xN=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Of(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const O8=qx(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function If(e){if(Of(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(Of(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}const I8=new Set(["string","number","symbol"]);function Zu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ja(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function D8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const L8={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function M8(e,t){const n={},r=e._zod.def;for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(n[s]=r.shape[s])}return Ja(e,{...e._zod.def,shape:n,checks:[]})}function $8(e,t){const n={...e._zod.def.shape},r=e._zod.def;for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete n[s]}return Ja(e,{...e._zod.def,shape:n,checks:[]})}function F8(e,t){if(!If(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return Fp(this,"shape",r),r},checks:[]};return Ja(e,n)}function z8(e,t){return Ja(e,{...e._zod.def,get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Fp(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function B8(e,t,n){const r=t._zod.def.shape,s={...r};if(n)for(const i in n){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)s[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return Ja(t,{...t._zod.def,shape:s,checks:[]})}function V8(e,t,n){const r=t._zod.def.shape,s={...r};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)s[i]=new e({type:"nonoptional",innerType:r[i]});return Ja(t,{...t._zod.def,shape:s,checks:[]})}function $c(e,t=0){var n;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Sa(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Bd(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ki(e,t,n){var s,i,a,o,l,c;const r={...e,path:e.path??[]};if(!e.message){const u=Bd((a=(i=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:i.error)==null?void 0:a.call(i,e))??Bd((o=t==null?void 0:t.error)==null?void 0:o.call(t,e))??Bd((l=n.customError)==null?void 0:l.call(n,e))??Bd((c=n.localeError)==null?void 0:c.call(n,e))??"Invalid input";r.message=u}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Kx(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Eu(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const wN=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,N8,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},bN=V("$ZodError",wN),_N=V("$ZodError",wN,{Parent:Error});function U8(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function H8(e,t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>s({issues:o}));else if(a.code==="invalid_key")s({issues:a.issues});else if(a.code==="invalid_element")s({issues:a.issues});else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return s(e),r}const W8=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Su;if(a.issues.length){const o=new((s==null?void 0:s.Err)??e)(a.issues.map(l=>Ki(l,i,Gi())));throw xN(o,s==null?void 0:s.callee),o}return a.value},q8=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new((s==null?void 0:s.Err)??e)(a.issues.map(l=>Ki(l,i,Gi())));throw xN(o,s==null?void 0:s.callee),o}return a.value},kN=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Su;return i.issues.length?{success:!1,error:new(e??bN)(i.issues.map(a=>Ki(a,s,Gi())))}:{success:!0,data:i.value}},Z8=kN(_N),SN=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Ki(a,s,Gi())))}:{success:!0,data:i.value}},G8=SN(_N),K8=/^[cC][^\s-]{8,}$/,Y8=/^[0-9a-z]+$/,J8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Q8=/^[0-9a-vA-V]{20}$/,X8=/^[A-Za-z0-9]{27}$/,e7=/^[a-zA-Z0-9_-]{21}$/,t7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,n7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ek=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,r7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,s7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function i7(){return new RegExp(s7,"u")}const a7=/^(?:(?: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])$/,o7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,l7=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,c7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,u7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,EN=/^[A-Za-z0-9_-]*$/,d7=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,h7=/^\+(?:[0-9]){6,14}[0-9]$/,CN="(?:(?:\\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])))",f7=new RegExp(`^${CN}$`);function TN(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function p7(e){return new RegExp(`^${TN(e)}$`)}function m7(e){const t=TN({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${CN}T(?:${r})$`)}const g7=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},y7=/^\d+$/,v7=/^-?\d+(?:\.\d+)?/i,x7=/true|false/i,w7=/null/i,b7=/^[^A-Z]*$/,_7=/^[^a-z]*$/,Rn=V("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),AN={number:"number",bigint:"bigint",object:"date"},PN=V("$ZodCheckLessThan",(e,t)=>{Rn.init(e,t);const n=AN[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jN=V("$ZodCheckGreaterThan",(e,t)=>{Rn.init(e,t);const n=AN[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),k7=V("$ZodCheckMultipleOf",(e,t)=>{Rn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):R8(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),S7=V("$ZodCheckNumberFormat",(e,t)=>{var a;Rn.init(e,t),t.format=t.format||"float64";const n=(a=t.format)==null?void 0:a.includes("int"),r=n?"int":"number",[s,i]=L8[t.format];e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,l.minimum=s,l.maximum=i,n&&(l.pattern=y7)}),e._zod.check=o=>{const l=o.value;if(n){if(!Number.isInteger(l)){o.issues.push({expected:r,format:t.format,code:"invalid_type",input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?o.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):o.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort});return}}l<s&&o.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>i&&o.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inst:e})}}),E7=V("$ZodCheckMaxLength",(e,t)=>{var n;Rn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Zx(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const a=Kx(s);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),C7=V("$ZodCheckMinLength",(e,t)=>{var n;Rn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Zx(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const a=Kx(s);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),T7=V("$ZodCheckLengthEquals",(e,t)=>{var n;Rn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!Zx(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,i=s.length;if(i===t.length)return;const a=Kx(s),o=i>t.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),zp=V("$ZodCheckStringFormat",(e,t)=>{var n,r;Rn.init(e,t),e._zod.onattach.push(s=>{const i=s._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),A7=V("$ZodCheckRegex",(e,t)=>{zp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),P7=V("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=b7),zp.init(e,t)}),j7=V("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_7),zp.init(e,t)}),N7=V("$ZodCheckIncludes",(e,t)=>{Rn.init(e,t);const n=Zu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),R7=V("$ZodCheckStartsWith",(e,t)=>{Rn.init(e,t);const n=new RegExp(`^${Zu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),O7=V("$ZodCheckEndsWith",(e,t)=>{Rn.init(e,t);const n=new RegExp(`.*${Zu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),I7=V("$ZodCheckOverwrite",(e,t)=>{Rn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class D7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
411`).filter(a=>a),s=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(s)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,n=this==null?void 0:this.args,s=[...((this==null?void 0:this.content)??[""]).map(i=>`  ${i}`)];return new t(...n,s.join(`
412`))}}const L7={major:4,minor:0,patch:0},Je=V("$ZodType",(e,t)=>{var s;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=L7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const a of i._zod.onattach)a(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,o,l)=>{let c=$c(a),u;for(const d of o){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&(l==null?void 0:l.async)===!1)throw new Su;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(c||(c=$c(a,p)))});else{if(a.issues.length===p)continue;c||(c=$c(a,p))}}return u?u.then(()=>a):a};e._zod.run=(a,o)=>{const l=e._zod.parse(a,o);if(l instanceof Promise){if(o.async===!1)throw new Su;return l.then(c=>i(c,r,o))}return i(l,r,o)}}e["~standard"]={validate:i=>{var a;try{const o=Z8(e,i);return o.success?{value:o.data}:{issues:(a=o.error)==null?void 0:a.issues}}catch{return G8(e,i).then(l=>{var c;return l.success?{value:l.data}:{issues:(c=l.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}}),Yx=V("$ZodString",(e,t)=>{var n;Je.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??g7(e._zod.bag),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ot=V("$ZodStringFormat",(e,t)=>{zp.init(e,t),Yx.init(e,t)}),M7=V("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=n7),ot.init(e,t)}),$7=V("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ek(r))}else t.pattern??(t.pattern=Ek());ot.init(e,t)}),F7=V("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=r7),ot.init(e,t)}),z7=V("$ZodURL",(e,t)=>{ot.init(e,t),e._zod.check=n=>{try{const r=n.value,s=new URL(r),i=s.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:d7.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),!r.endsWith("/")&&i.endsWith("/")?n.value=i.slice(0,-1):n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),B7=V("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=i7()),ot.init(e,t)}),V7=V("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=e7),ot.init(e,t)}),U7=V("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=K8),ot.init(e,t)}),H7=V("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Y8),ot.init(e,t)}),W7=V("$ZodULID",(e,t)=>{t.pattern??(t.pattern=J8),ot.init(e,t)}),q7=V("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Q8),ot.init(e,t)}),Z7=V("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=X8),ot.init(e,t)}),G7=V("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=m7(t)),ot.init(e,t)}),K7=V("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=f7),ot.init(e,t)}),Y7=V("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=p7(t)),ot.init(e,t)}),J7=V("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=t7),ot.init(e,t)}),Q7=V("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=a7),ot.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),X7=V("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o7),ot.init(e,t),e._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),eH=V("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=l7),ot.init(e,t)}),tH=V("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=c7),ot.init(e,t),e._zod.check=n=>{const[r,s]=n.value.split("/");try{if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function NN(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const nH=V("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=u7),ot.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{NN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function rH(e){if(!EN.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return NN(n)}const sH=V("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=EN),ot.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{rH(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),iH=V("$ZodE164",(e,t)=>{t.pattern??(t.pattern=h7),ot.init(e,t)});function aH(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const oH=V("$ZodJWT",(e,t)=>{ot.init(e,t),e._zod.check=n=>{aH(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),RN=V("$ZodNumber",(e,t)=>{Je.init(e,t),e._zod.pattern=e._zod.bag.pattern??v7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),lH=V("$ZodNumber",(e,t)=>{S7.init(e,t),RN.init(e,t)}),cH=V("$ZodBoolean",(e,t)=>{Je.init(e,t),e._zod.pattern=x7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),uH=V("$ZodNull",(e,t)=>{Je.init(e,t),e._zod.pattern=w7,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const s=n.value;return s===null||n.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),n}}),dH=V("$ZodUnknown",(e,t)=>{Je.init(e,t),e._zod.parse=n=>n}),hH=V("$ZodNever",(e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ck(e,t,n){e.issues.length&&t.issues.push(...Sa(n,e.issues)),t.value[n]=e.value}const fH=V("$ZodArray",(e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let a=0;a<s.length;a++){const o=s[a],l=t.element._zod.run({value:o,issues:[]},r);l instanceof Promise?i.push(l.then(c=>Ck(c,n,a))):Ck(l,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function Vd(e,t,n){e.issues.length&&t.issues.push(...Sa(n,e.issues)),t.value[n]=e.value}function Tk(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...Sa(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}const pH=V("$ZodObject",(e,t)=>{Je.init(e,t);const n=qx(()=>{const d=Object.keys(t.shape);for(const f of d)if(!(t.shape[f]instanceof Je))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);const p=D8(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(p)}});Fe(e._zod,"propValues",()=>{const d=t.shape,p={};for(const f in d){const v=d[f]._zod;if(v.values){p[f]??(p[f]=new Set);for(const x of v.values)p[f].add(x)}}return p});const r=d=>{const p=new D7(["shape","payload","ctx"]),f=n.value,v=y=>{const m=nc(y);return`shape[${m}]._zod.run({ value: input[${m}], issues: [] }, ctx)`};p.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const y of f.keys)x[y]=`key_${w++}`;p.write("const newResult = {}");for(const y of f.keys)if(f.optionalKeys.has(y)){const m=x[y];p.write(`const ${m} = ${v(y)};`);const _=nc(y);p.write(`
413        if (${m}.issues.length) {
414          if (input[${_}] === undefined) {
415            if (${_} in input) {
416              newResult[${_}] = undefined;
417            }
418          } else {
419            payload.issues = payload.issues.concat(
420              ${m}.issues.map((iss) => ({
421                ...iss,
422                path: iss.path ? [${_}, ...iss.path] : [${_}],
423              }))
424            );
425          }
426        } else if (${m}.value === undefined) {
427          if (${_} in input) newResult[${_}] = undefined;
428        } else {
429          newResult[${_}] = ${m}.value;
430        }
431        `)}else{const m=x[y];p.write(`const ${m} = ${v(y)};`),p.write(`
432          if (${m}.issues.length) payload.issues = payload.issues.concat(${m}.issues.map(iss => ({
433            ...iss,
434            path: iss.path ? [${nc(y)}, ...iss.path] : [${nc(y)}]
435          })));`),p.write(`newResult[${nc(y)}] = ${m}.value`)}p.write("payload.value = newResult;"),p.write("return payload;");const g=p.compile();return(y,m)=>g(d,y,m)};let s;const i=Of,a=!yN.jitless,l=a&&O8.value,c=t.catchall;let u;e._zod.parse=(d,p)=>{u??(u=n.value);const f=d.value;if(!i(f))return d.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),d;const v=[];
435if(a&&l&&(p==null?void 0:p.async)===!1&&p.jitless!==!0)s||(s=r(t.shape)),d=s(d,p);else{d.value={};const m=u.shape;for(const _ of u.keys){const k=m[_],S=k._zod.run({value:f[_],issues:[]},p),E=k._zod.optin==="optional"&&k._zod.optout==="optional";S instanceof Promise?v.push(S.then(P=>E?Tk(P,d,_,f):Vd(P,d,_))):E?Tk(S,d,_,f):Vd(S,d,_)}}if(!c)return v.length?Promise.all(v).then(()=>d):d;const x=[],w=u.keySet,g=c._zod,y=g.def.type;for(const m of Object.keys(f)){if(w.has(m))continue;if(y==="never"){x.push(m);continue}const _=g.run({value:f[m],issues:[]},p);_ instanceof Promise?v.push(_.then(k=>Vd(k,d,m))):Vd(_,d,m)}return x.length&&d.issues.push({code:"unrecognized_keys",keys:x,input:f,inst:e}),v.length?Promise.all(v).then(()=>d):d}});function Ak(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(i=>Ki(i,r,Gi())))}),t}const ON=V("$ZodUnion",(e,t)=>{Je.init(e,t),Fe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Fe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Fe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Fe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>Gx(r.source)).join("|")})$`)}}),e._zod.parse=(n,r)=>{let s=!1;const i=[];for(const a of t.options){const o=a._zod.run({value:n.value,issues:[]},r);if(o instanceof Promise)i.push(o),s=!0;else{if(o.issues.length===0)return o;i.push(o)}}return s?Promise.all(i).then(a=>Ak(a,n,e,r)):Ak(i,n,e,r)}}),mH=V("$ZodDiscriminatedUnion",(e,t)=>{ON.init(e,t);const n=e._zod.parse;Fe(e._zod,"propValues",()=>{const s={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[o,l]of Object.entries(a)){s[o]||(s[o]=new Set);for(const c of l)s[o].add(c)}}return s});const r=qx(()=>{const s=t.options,i=new Map;for(const a of s){const o=a._zod.propValues[t.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const l of o){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,a)}}return i});e._zod.parse=(s,i)=>{const a=s.value;if(!Of(a))return s.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),s;const o=r.value.get(a==null?void 0:a[t.discriminator]);return o?o._zod.run(s,i):t.unionFallback?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[t.discriminator],inst:e}),s)}}),gH=V("$ZodIntersection",(e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},r),a=t.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>Pk(n,l,c)):Pk(n,i,a)}});function Av(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(If(e)&&If(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of r){const a=Av(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};s[i]=a.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const s=e[r],i=t[r],a=Av(s,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Pk(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),$c(e))return e;const r=Av(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const yH=V("$ZodRecord",(e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!If(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[];if(t.keyType._zod.values){const a=t.keyType._zod.values;n.value={};for(const l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){const c=t.valueType._zod.run({value:s[l],issues:[]},r);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&n.issues.push(...Sa(l,u.issues)),n.value[l]=u.value})):(c.issues.length&&n.issues.push(...Sa(l,c.issues)),n.value[l]=c.value)}let o;for(const l in s)a.has(l)||(o=o??[],o.push(l));o&&o.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:o})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;const o=t.keyType._zod.run({value:a,issues:[]},r);if(o instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(o.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map(c=>
vendor: 9,701 bytes, line 435
435Ki(c,r,Gi())),input:a,path:[a],inst:e}),n.value[o.value]=o.value;continue}const l=t.valueType._zod.run({value:s[a],issues:[]},r);l instanceof Promise?i.push(l.then(c=>{c.issues.length&&n.issues.push(...Sa(a,c.issues)),n.value[o.value]=c.value})):(l.issues.length&&n.issues.push(...Sa(a,l.issues)),n.value[o.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),vH=V("$ZodEnum",(e,t)=>{Je.init(e,t);const n=vN(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(r=>I8.has(typeof r)).map(r=>typeof r=="string"?Zu(r):r.toString()).join("|")})$`),e._zod.parse=(r,s)=>{const i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:n,input:i,inst:e}),r}}),xH=V("$ZodLiteral",(e,t)=>{Je.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Zu(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const s=n.value;return e._zod.values.has(s)||n.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),n}}),wH=V("$ZodTransform",(e,t)=>{Je.init(e,t),e._zod.parse=(n,r)=>{const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(n.value=a,n));if(s instanceof Promise)throw new Su;return n.value=s,n}}),bH=V("$ZodOptional",(e,t)=>{Je.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Fe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Gx(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(n,r):n.value===void 0?n:t.innerType._zod.run(n,r)}),_H=V("$ZodNullable",(e,t)=>{Je.init(e,t),Fe(e._zod,"optin",()=>t.innerType._zod.optin),Fe(e._zod,"optout",()=>t.innerType._zod.optout),Fe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Gx(n.source)}|null)$`):void 0}),Fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),kH=V("$ZodDefault",(e,t)=>{Je.init(e,t),e._zod.optin="optional",Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>jk(i,t)):jk(s,t)}});function jk(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const SH=V("$ZodPrefault",(e,t)=>{Je.init(e,t),e._zod.optin="optional",Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),EH=V("$ZodNonOptional",(e,t)=>{Je.init(e,t),Fe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>Nk(i,e)):Nk(s,e)}});function Nk(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const CH=V("$ZodCatch",(e,t)=>{Je.init(e,t),e._zod.optin="optional",Fe(e._zod,"optout",()=>t.innerType._zod.optout),Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>Ki(a,r,Gi()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>Ki(i,r,Gi()))},input:n.value}),n.issues=[]),n)}}),TH=V("$ZodPipe",(e,t)=>{Je.init(e,t),Fe(e._zod,"values",()=>t.in._zod.values),Fe(e._zod,"optin",()=>t.in._zod.optin),Fe(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,r)=>{const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Rk(i,t,r)):Rk(s,t,r)}});function Rk(e,t,n){return $c(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const AH=V("$ZodReadonly",(e,t)=>{Je.init(e,t),Fe(e._zod,"propValues",()=>t.innerType._zod.propValues),Fe(e._zod,"values",()=>t.innerType._zod.values),Fe(e._zod,"optin",()=>t.innerType._zod.optin),Fe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(Ok):Ok(s)}});function Ok(e){return e.value=Object.freeze(e.value),e}const PH=V("$ZodLazy",(e,t)=>{Je.init(e,t),Fe(e._zod,"innerType",()=>t.getter()),Fe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Fe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Fe(e._zod,"optin",()=>e._zod.innerType._zod.optin),Fe(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),jH=V("$ZodCustom",(e,t)=>{Rn.init(e,t),Je.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(i=>Ik(i,n,r,e));Ik(s,n,r,e)}});function Ik(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(Eu(s))}}class IN{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}}function NH(){return new IN}const mc=NH();function RH(e,t){return new e({type:"string",...me(t)})}function OH(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(t)})}function Dk(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(t)})}function IH(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(t)})}function DH(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(t)})}function LH(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(t)})}function MH(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(t)})}function $H(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(t)})}function FH(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(t)})}function zH(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(t)})}function BH(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(t)})}function VH(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(t)})}function UH(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(t)})}function HH(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(t)})}function WH(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(t)})}function qH(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(t)})}function ZH(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(t)})}function GH(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(t)})}function KH(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(t)})}function YH(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(t)})}function JH(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(t)})}function QH(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(t)})}function XH(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(t)})}function eW(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(t)})}function tW(e,t){return new e({type:"string",format:"date",check:"string_format",...me(t)})}function nW(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(t)})}function rW(e,t){return new e({type:"string",format:"duration",check:"string_format",...me(t)})}function sW(e,t){return new e({type:"number",checks:[],...me(t)})}function iW(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(t)})}function aW(e,t){return new e({type:"boolean",...me(t)})}function oW(e,t){return new e({type:"null",...me(t)})}function lW(e){return new e({type:"unknown"})}function cW(e,t){return new e({type:"never",...me(t)})}function Lk(e,t){return new PN({check:"less_than",...me(t),value:e,inclusive:!1})}function ng(e,t){return new PN({check:"less_than",...me(t),value:e,inclusive:!0})}function Mk(e,t){return new jN({check:"greater_than",...me(t),value:e,inclusive:!1})}function rg(e,t){return new jN({check:"greater_than",...me(t),value:e,inclusive:!0})}function $k(e,t){return new k7({check:"multiple_of",...me(t),value:e})}function DN(e,t){return new E7({check:"max_length",...me(t),maximum:e})}function Df(e,t){return new C7({check:"min_length",...me(t),minimum:e})}function LN(e,t){return new T7({check:"length_equals",...me(t),length:e})}function uW(e,t){return new A7({check:"string_format",format:"regex",...me(t),pattern:e})}function dW(e){return new P7({check:"string_format",format:"lowercase",...me(e)})}
435function hW(e){return new j7({check:"string_format",format:"uppercase",...me(e)})}function fW(e,t){return new N7({check:"string_format",format:"includes",...me(t),includes:e})}function pW(e,t){return new R7({check:"string_format",format:"starts_with",...me(t),prefix:e})}function mW(e,t){return new O7({check:"string_format",format:"ends_with",...me(t),suffix:e})}function Gu(e){return new I7({check:"overwrite",tx:e})}function gW(e){return Gu(t=>t.normalize(e))}function yW(){return Gu(e=>e.trim())}function vW(){return Gu(e=>e.toLowerCase())}function xW(){return Gu(e=>e.toUpperCase())}function wW(e,t,n){return new e({type:"array",element:t,...me(n)})}function bW(e,t,n){const r=me(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function _W(e,t,n){return new e({type:"custom",check:"custom",fn:t,...me(n)})}class Fk{constructor(t){this.counter=0,this.metadataRegistry=(t==null?void 0:t.metadata)??mc,this.target=(t==null?void 0:t.target)??"draft-2020-12",this.unrepresentable=(t==null?void 0:t.unrepresentable)??"throw",this.override=(t==null?void 0:t.override)??(()=>{}),this.io=(t==null?void 0:t.io)??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var d,p,f;var r;const s=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,n.schemaPath.includes(t)&&(a.cycle=n.path),a.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,o);const l=(p=(d=t._zod).toJSONSchema)==null?void 0:p.call(d);if(l)o.schema=l;else{const v={...n,schemaPath:[...n.schemaPath,t],path:n.path},x=t._zod.parent;if(x)o.ref=x,this.process(x,v),this.seen.get(x).isParent=!0;else{const w=o.schema;switch(s.type){case"string":{const g=w;g.type="string";const{minimum:y,maximum:m,format:_,patterns:k,contentEncoding:S}=t._zod.bag;if(typeof y=="number"&&(g.minLength=y),typeof m=="number"&&(g.maxLength=m),_&&(g.format=i[_]??_,g.format===""&&delete g.format),S&&(g.contentEncoding=S),k&&k.size>0){const E=[...k];E.length===1?g.pattern=E[0].source:E.length>1&&(o.schema.allOf=[...E.map(P=>({...this.target==="draft-7"?{type:"string"}:{},pattern:P.source}))])}break}case"number":{const g=w,{minimum:y,maximum:m,format:_,multipleOf:k,exclusiveMaximum:S,exclusiveMinimum:E}=t._zod.bag;typeof _=="string"&&_.includes("int")?g.type="integer":g.type="number",typeof E=="number"&&(g.exclusiveMinimum=E),typeof y=="number"&&(g.minimum=y,typeof E=="number"&&(E>=y?delete g.minimum:delete g.exclusiveMinimum)),typeof S=="number"&&(g.exclusiveMaximum=S),typeof m=="number"&&(g.maximum=m,typeof S=="number"&&(S<=m?delete g.maximum:delete g.exclusiveMaximum)),typeof k=="number"&&(g.multipleOf=k);break}case"boolean":{const g=w;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{w.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{w.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const g=w,{minimum:y,maximum:m}=t._zod.bag;typeof y=="number"&&(g.minItems=y),typeof m=="number"&&(g.maxItems=m),g.type="array",g.items=this.process(s.element,{...v,path:[...v.path,"items"]});break}case"object":{const g=w;g.type="object",g.properties={};const y=s.shape;for(const k in y)g.properties[k]=this.process(y[k],{...v,path:[...v.path,"properties",k]});const m=new Set(Object.keys(y)),_=new Set([...m].filter(k=>{const S=s.shape[k]._zod;return this.io==="input"?S.optin===void 0:S.optout===void 0}));_.size>0&&(g.required=Array.from(_)),((f=s.catchall)==null?void 0:f._zod.def.type)==="never"?g.additionalProperties=!1:s.catchall?s.catchall&&(g.additionalProperties=this.process(s.catchall,{...v,path:[...v.path,"additionalProperties"]})):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{const g=w;g.anyOf=s.options.map((y,m)=>this.process(y,{...v,path:[...v.path,"anyOf",m]}));break}case"intersection":{const g=w,y=this.process(s.left,{...v,path:[...v.path,"allOf",0]}),m=this.process(s.right,{...v,path:[...v.path,"allOf",1]}),_=S=>"allOf"in S&&Object.keys(S).length===1,k=[..._(y)?y.allOf:[y],..._(m)?m.allOf:[m]];g.allOf=k;break}case"tuple":{const g=w;g.type="array";const y=s.items.map((k,S)=>this.process(k,{...v,path:[...v.path,"prefixItems",S]}));
435if(this.target==="draft-2020-12"?g.prefixItems=y:g.items=y,s.rest){const k=this.process(s.rest,{...v,path:[...v.path,"items"]});this.target==="draft-2020-12"?g.items=k:g.additionalItems=k}s.rest&&(g.items=this.process(s.rest,{...v,path:[...v.path,"items"]}));const{minimum:m,maximum:_}=t._zod.bag;typeof m=="number"&&(g.minItems=m),typeof _=="number"&&(g.maxItems=_);break}case"record":{const g=w;g.type="object",g.propertyNames=this.process(s.keyType,{...v,path:[...v.path,"propertyNames"]}),g.additionalProperties=this.process(s.valueType,{...v,path:[...v.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const g=w,y=vN(s.entries);y.every(m=>typeof m=="number")&&(g.type="number"),y.every(m=>typeof m=="string")&&(g.type="string"),g.enum=y;break}case"literal":{const g=w,y=[];for(const m of s.values)if(m===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");y.push(Number(m))}else y.push(m);if(y.length!==0)if(y.length===1){const m=y[0];g.type=m===null?"null":typeof m,g.const=m}else y.every(m=>typeof m=="number")&&(g.type="number"),y.every(m=>typeof m=="string")&&(g.type="string"),y.every(m=>typeof m=="boolean")&&(g.type="string"),y.every(m=>m===null)&&(g.type="null"),g.enum=y;break}case"file":{const g=w,y={type:"string",format:"binary",contentEncoding:"binary"},{minimum:m,maximum:_,mime:k}=t._zod.bag;m!==void 0&&(y.minLength=m),_!==void 0&&(y.maxLength=_),k?k.length===1?(y.contentMediaType=k[0],Object.assign(g,y)):g.anyOf=k.map(S=>({...y,contentMediaType:S})):Object.assign(g,y);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const g=this.process(s.innerType,v);w.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(s.innerType,v),o.ref=s.innerType;break}case"success":{const g=w;g.type="boolean";break}case"default":{this.process(s.innerType,v),o.ref=s.innerType,w.default=JSON.parse(JSON.stringify(s.defaultValue));break}case"prefault":{this.process(s.innerType,v),o.ref=s.innerType,this.io==="input"&&(w._prefault=JSON.parse(JSON.stringify(s.defaultValue)));break}case"catch":{this.process(s.innerType,v),o.ref=s.innerType;let g;try{g=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}w.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const g=w,y=t._zod.pattern;if(!y)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=y.source;break}case"pipe":{const g=this.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;this.process(g,v),o.ref=g;break}case"readonly":{this.process(s.innerType,v),o.ref=s.innerType,w.readOnly=!0;break}case"promise":{this.process(s.innerType,v),o.ref=s.innerType;break}case"optional":{this.process(s.innerType,v),o.ref=s.innerType;break}case"lazy":{const g=t._zod.innerType;this.process(g,v),o.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const c=this.metadataRegistry.get(t);return c&&Object.assign(o.schema,c),this.io==="input"&&Rt(t)&&(delete o.schema.examples,delete o.schema.default),this.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(t).schema}emit(t,n){var u,d,p,f,v,x;const r={cycles:(n==null?void 0:n.cycles)??"ref",reused:(n==null?void 0:n.reused)??"inline",external:(n==null?void 0:n.external)??void 0},s=this.seen.get(t);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=w=>{var k;const g=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){const S=(k=r.external.registry.get(w[0]))==null?void 0:k.id,E=r.external.uri??(j=>j);if(S)return{ref:E(S)};const P=w[1].defId??w[1].schema.id??`schema${this.counter++}`;return w[1].defId=P,{defId:P,ref:`${E("__shared")}#/${g}/${P}`}}if(w[1]===s)return{ref:"#"};const m=`#/${g}/`,_=w[1].schema.id??`__schema${this.counter++}`;return{defId:_,ref:m+_}},a=w=>{if(w[1].schema.$ref)return;const g=w[1],{ref:y,defId:m}=i(w);g.def={...g.schema},m&&(g.defId=m);const _=g.schema;for(const k in _)delete _[k];_.$ref=y};if(r.cycles==="throw")for(const w of this.seen.entries()){const g=w[1];if(g.cycle)throw new Error(`Cycle detected: #/${(u=g.cycle)==null?void 0:u.join("/")}/<root>
436
437Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const w of this.seen.entries()){const g=w[1];if(t===w[0]){a(w);continue}if(r.external){const m=(d=r.external.registry.get(w[0]))==null?void 0:d.id;if(t!==w[0]&&m){a(w);continue}}if((p=this.metadataRegistry.get(w[0]))==null?void 0:p.id){a(w);continue}if(g.cycle){a(w);continue}if(g.count>1&&r.reused==="ref"){a(w);continue}}const o=(w,g)=>{const y=this.seen.get(w),m=y.def??y.schema,_={...m};if(y.ref===null)return;const k=y.ref;if(y.ref=null,k){o(k,g);const S=this.seen.get(k).schema;S.$ref&&g.target==="draft-7"?(m.allOf=m.allOf??[],m.allOf.push(S)):(Object.assign(m,S),Object.assign(m,_))}y.isParent||this.override({zodSchema:w,jsonSchema:m,path:y.path??[]})};for(const w of[...this.seen.entries()].reverse())o(w[0],{target:this.target});const l={};
437if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(f=r.external)!=null&&f.uri){const w=(v=r.external.registry.get(t))==null?void 0:v.id;if(!w)throw new Error("Schema is missing an `id` property");l.$id=r.external.uri(w)}Object.assign(l,s.def);const c=((x=r.external)==null?void 0:x.defs)??{};for(const w of this.seen.entries()){const g=w[1];g.def&&g.defId&&(c[g.defId]=g.def)}r.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function kW(e,t){if(e instanceof IN){const r=new Fk(t),s={};for(const o of e._idmap.entries()){const[l,c]=o;r.process(c)}const i={},a={registry:e,uri:t==null?void 0:t.uri,defs:s};for(const o of e._idmap.entries()){const[l,c]=o;i[l]=r.emit(c,{...t,external:a})}if(Object.keys(s).length>0){const o=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[o]:s}}return{schemas:i}}const n=new Fk(t);return n.process(e),n.emit(e,t)}function Rt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;switch(s.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Rt(s.element,n);case"object":{for(const i in s.shape)if(Rt(s.shape[i],n))return!0;return!1}case"union":{for(const i of s.options)if(Rt(i,n))return!0;return!1}case"intersection":return Rt(s.left,n)||Rt(s.right,n);case"tuple":{for(const i of s.items)if(Rt(i,n))return!0;return!!(s.rest&&Rt(s.rest,n))}case"record":return Rt(s.keyType,n)||Rt(s.valueType,n);case"map":return Rt(s.keyType,n)||Rt(s.valueType,n);case"set":return Rt(s.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Rt(s.innerType,n);case"lazy":return Rt(s.getter(),n);case"default":return Rt(s.innerType,n);case"prefault":return Rt(s.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Rt(s.in,n)||Rt(s.out,n);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${s.type}`)}const SW=V("ZodISODateTime",(e,t)=>{G7.init(e,t),mt.init(e,t)});function EW(e){return eW(SW,e)}const CW=V("ZodISODate",(e,t)=>{K7.init(e,t),mt.init(e,t)});function TW(e){return tW(CW,e)}const AW=V("ZodISOTime",(e,t)=>{Y7.init(e,t),mt.init(e,t)});function PW(e){return nW(AW,e)}const jW=V("ZodISODuration",(e,t)=>{J7.init(e,t),mt.init(e,t)});function NW(e){return rW(jW,e)}const RW=(e,t)=>{bN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>H8(e,n)},flatten:{value:n=>U8(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},Bp=V("ZodError",RW,{Parent:Error}),OW=W8(Bp),IW=q8(Bp),DW=kN(Bp),MN=SN(Bp),lt=V("ZodType",(e,t)=>(Je.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(n,r)=>Ja(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>OW(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>DW(e,n,r),e.parseAsync=async(n,r)=>IW(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>MN(e,n,r),e.spa=e.safeParseAsync,e.refine=(n,r)=>e.check(jq(n,r)),e.superRefine=n=>e.check(Nq(n)),e.overwrite=n=>e.check(Gu(n)),e.optional=()=>Vk(e),e.nullable=()=>Uk(e),e.nullish=()=>Vk(Uk(e)),e.nonoptional=n=>bq(e,n),e.array=()=>Dl(e),e.or=n=>pn([e,n]),e.and=n=>dq(e,n),e.transform=n=>Hk(e,mq(n)),e.default=n=>vq(e,n),e.prefault=n=>wq(e,n),e.catch=n=>kq(e,n),e.pipe=n=>Hk(e,n),e.readonly=()=>Cq(e),e.describe=n=>{const r=e.clone();return mc.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=mc.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return mc.get(e);const r=e.clone();return mc.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$N=V("_ZodString",(e,t)=>{Yx.init(e,t),lt.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(uW(...r)),e.includes=(...r)=>e.check(fW(...r)),e.startsWith=(...r)=>e.check(pW(...r)),e.endsWith=(...r)=>e.check(mW(...r)),e.min=(...r)=>e.check(Df(...r)),e.max=(...r)=>e.check(DN(...r)),e.length=(...r)=>e.check(LN(...r)),e.nonempty=(...r)=>e.check(Df(1,...r)),e.lowercase=r=>e.check(dW(r)),e.uppercase=r=>e.check(hW(r)),e.trim=()=>e.check(yW()),e.normalize=(...r)=>e.check(gW(...r)),e.toLowerCase=()=>e.check(vW()),e.toUpperCase=()=>e.check(xW())}),LW=V("ZodString",(e,t)=>{Yx.init(e,t),$N.init(e,t),e.email=n=>e.check(OH(MW,n)),e.url=n=>e.check($H($W,n)),e.jwt=n=>e.check(XH(XW,n)),e.emoji=n=>e.check(FH(FW,n)),e.guid=n=>e.check(Dk(zk,n)),e.uuid=n=>
vendor: 4,963 bytes, line 437
437e.check(IH(Ud,n)),e.uuidv4=n=>e.check(DH(Ud,n)),e.uuidv6=n=>e.check(LH(Ud,n)),e.uuidv7=n=>e.check(MH(Ud,n)),e.nanoid=n=>e.check(zH(zW,n)),e.guid=n=>e.check(Dk(zk,n)),e.cuid=n=>e.check(BH(BW,n)),e.cuid2=n=>e.check(VH(VW,n)),e.ulid=n=>e.check(UH(UW,n)),e.base64=n=>e.check(YH(YW,n)),e.base64url=n=>e.check(JH(JW,n)),e.xid=n=>e.check(HH(HW,n)),e.ksuid=n=>e.check(WH(WW,n)),e.ipv4=n=>e.check(qH(qW,n)),e.ipv6=n=>e.check(ZH(ZW,n)),e.cidrv4=n=>e.check(GH(GW,n)),e.cidrv6=n=>e.check(KH(KW,n)),e.e164=n=>e.check(QH(QW,n)),e.datetime=n=>e.check(EW(n)),e.date=n=>e.check(TW(n)),e.time=n=>e.check(PW(n)),e.duration=n=>e.check(NW(n))});function X(e){return RH(LW,e)}const mt=V("ZodStringFormat",(e,t)=>{ot.init(e,t),$N.init(e,t)}),MW=V("ZodEmail",(e,t)=>{F7.init(e,t),mt.init(e,t)}),zk=V("ZodGUID",(e,t)=>{M7.init(e,t),mt.init(e,t)}),Ud=V("ZodUUID",(e,t)=>{$7.init(e,t),mt.init(e,t)}),$W=V("ZodURL",(e,t)=>{z7.init(e,t),mt.init(e,t)}),FW=V("ZodEmoji",(e,t)=>{B7.init(e,t),mt.init(e,t)}),zW=V("ZodNanoID",(e,t)=>{V7.init(e,t),mt.init(e,t)}),BW=V("ZodCUID",(e,t)=>{U7.init(e,t),mt.init(e,t)}),VW=V("ZodCUID2",(e,t)=>{H7.init(e,t),mt.init(e,t)}),UW=V("ZodULID",(e,t)=>{W7.init(e,t),mt.init(e,t)}),HW=V("ZodXID",(e,t)=>{q7.init(e,t),mt.init(e,t)}),WW=V("ZodKSUID",(e,t)=>{Z7.init(e,t),mt.init(e,t)}),qW=V("ZodIPv4",(e,t)=>{Q7.init(e,t),mt.init(e,t)}),ZW=V("ZodIPv6",(e,t)=>{X7.init(e,t),mt.init(e,t)}),GW=V("ZodCIDRv4",(e,t)=>{eH.init(e,t),mt.init(e,t)}),KW=V("ZodCIDRv6",(e,t)=>{tH.init(e,t),mt.init(e,t)}),YW=V("ZodBase64",(e,t)=>{nH.init(e,t),mt.init(e,t)}),JW=V("ZodBase64URL",(e,t)=>{sH.init(e,t),mt.init(e,t)}),QW=V("ZodE164",(e,t)=>{iH.init(e,t),mt.init(e,t)}),XW=V("ZodJWT",(e,t)=>{oH.init(e,t),mt.init(e,t)}),FN=V("ZodNumber",(e,t)=>{RN.init(e,t),lt.init(e,t),e.gt=(r,s)=>e.check(Mk(r,s)),e.gte=(r,s)=>e.check(rg(r,s)),e.min=(r,s)=>e.check(rg(r,s)),e.lt=(r,s)=>e.check(Lk(r,s)),e.lte=(r,s)=>e.check(ng(r,s)),e.max=(r,s)=>e.check(ng(r,s)),e.int=r=>e.check(Bk(r)),e.safe=r=>e.check(Bk(r)),e.positive=r=>e.check(Mk(0,r)),e.nonnegative=r=>e.check(rg(0,r)),e.negative=r=>e.check(Lk(0,r)),e.nonpositive=r=>e.check(ng(0,r)),e.multipleOf=(r,s)=>e.check($k(r,s)),e.step=(r,s)=>e.check($k(r,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function eq(e){return sW(FN,e)}const tq=V("ZodNumberFormat",(e,t)=>{lH.init(e,t),FN.init(e,t)});function Bk(e){return iW(tq,e)}const nq=V("ZodBoolean",(e,t)=>{cH.init(e,t),lt.init(e,t)});function an(e){return aW(nq,e)}const rq=V("ZodNull",(e,t)=>{uH.init(e,t),lt.init(e,t)});function sq(e){return oW(rq,e)}const iq=V("ZodUnknown",(e,t)=>{dH.init(e,t),lt.init(e,t)});function ns(){return lW(iq)}const aq=V("ZodNever",(e,t)=>{hH.init(e,t),lt.init(e,t)});function zN(e){return cW(aq,e)}const oq=V("ZodArray",(e,t)=>{fH.init(e,t),lt.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(Df(n,r)),e.nonempty=n=>e.check(Df(1,n)),e.max=(n,r)=>e.check(DN(n,r)),e.length=(n,r)=>e.check(LN(n,r)),e.unwrap=()=>e.element});function Dl(e,t){return wW(oq,e,t)}const BN=V("ZodObject",(e,t)=>{pH.init(e,t),lt.init(e,t),Fe(e,"shape",()=>t.shape),e.keyof=()=>UN(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ns()}),e.loose=()=>e.clone({...e._zod.def,catchall:ns()}),e.strict=()=>e.clone({...e._zod.def,catchall:zN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>F8(e,n),e.merge=n=>z8(e,n),e.pick=n=>M8(e,n),e.omit=n=>$8(e,n),e.partial=(...n)=>B8(HN,e,n[0]),e.required=(...n)=>V8(WN,e,n[0])});function We(e,t){const n={type:"object",get shape(){return Fp(this,"shape",{...e}),this.shape},...me(t)};return new BN(n)}function Xe(e,t){return new BN({type:"object",get shape(){return Fp(this,"shape",{...e}),this.shape},catchall:zN(),...me(t)})}const VN=V("ZodUnion",(e,t)=>{ON.init(e,t),lt.init(e,t),e.options=t.options});function pn(e,t){return new VN({type:"union",options:e,...me(t)})}const lq=V("ZodDiscriminatedUnion",(e,t)=>{VN.init(e,t),mH.init(e,t)});function cq(e,t,n){return new lq({type:"union",options:t,discriminator:e,...me(n)})}const uq=V("ZodIntersection",(e,t)=>{gH.init(e,t),lt.init(e,t)});function dq(e,t){return new uq({type:"intersection",left:e,right:t})}const hq=V("ZodRecord",(e,t)=>{yH.init(e,t),lt.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function qa(e,t,n){return new hq({type:"record",keyType:e,valueType:t,...me(n)})}const Pv=V("ZodEnum",(e,t)=>{vH.init(e,t),lt.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);
vendor: 36,453 bytes, lines 437-450
437return new Pv({...t,checks:[],...me(s),entries:i})},e.exclude=(r,s)=>{const i={...t.entries};for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Pv({...t,checks:[],...me(s),entries:i})}});function UN(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Pv({type:"enum",entries:n,...me(t)})}const fq=V("ZodLiteral",(e,t)=>{xH.init(e,t),lt.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xe(e,t){return new fq({type:"literal",values:Array.isArray(e)?e:[e],...me(t)})}const pq=V("ZodTransform",(e,t)=>{wH.init(e,t),lt.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Eu(i,n.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),a.continue??(a.continue=!0),n.issues.push(Eu(a))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function mq(e){return new pq({type:"transform",transform:e})}const HN=V("ZodOptional",(e,t)=>{bH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Vk(e){return new HN({type:"optional",innerType:e})}const gq=V("ZodNullable",(e,t)=>{_H.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Uk(e){return new gq({type:"nullable",innerType:e})}const yq=V("ZodDefault",(e,t)=>{kH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vq(e,t){return new yq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const xq=V("ZodPrefault",(e,t)=>{SH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function wq(e,t){return new xq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}const WN=V("ZodNonOptional",(e,t)=>{EH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType});function bq(e,t){return new WN({type:"nonoptional",innerType:e,...me(t)})}const _q=V("ZodCatch",(e,t)=>{CH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kq(e,t){return new _q({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Sq=V("ZodPipe",(e,t)=>{TH.init(e,t),lt.init(e,t),e.in=t.in,e.out=t.out});function Hk(e,t){return new Sq({type:"pipe",in:e,out:t})}const Eq=V("ZodReadonly",(e,t)=>{AH.init(e,t),lt.init(e,t)});function Cq(e){return new Eq({type:"readonly",innerType:e})}const Tq=V("ZodLazy",(e,t)=>{PH.init(e,t),lt.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Aq(e){return new Tq({type:"lazy",getter:e})}const Jx=V("ZodCustom",(e,t)=>{jH.init(e,t),lt.init(e,t)});function Pq(e){const t=new Rn({check:"custom"});return t._zod.check=e,t}function qN(e,t){return bW(Jx,e??(()=>!0),t)}function jq(e,t={}){return _W(Jx,e,t)}function Nq(e){const t=Pq(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Eu(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(Eu(s))}},e(n.value,n)));return t}function Lf(e,t={error:`Input not instance of ${e.name}`}){const n=new Jx({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...me(t)});return n._zod.bag.Class=e,n}class Wk extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}const qk=10,Rq=13,ca=32;function sg(e){}function Oq(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=sg,onError:n=sg,onRetry:r=sg,onComment:s}=e,i=[];let a=!0,o,l="",c=0,u;function d(g){if(a&&(a=!1,g.charCodeAt(0)===239&&g.charCodeAt(1)===187&&g.charCodeAt(2)===191&&(g=g.slice(3))),i.length===0){const _=p(g);_!==""&&i.push(_);return}if(g.indexOf(`
438`)===-1&&g.indexOf("\r")===-1){i.push(g);return}i.push(g);const y=i.join("");i.length=0;const m=p(y);m!==""&&i.push(m)}function p(g){let y=0;if(g.indexOf("\r")===-1){let m=g.indexOf(`
439`,y);for(;m!==-1;){if(y===m){c>0&&t({id:o,event:u,data:l}),o=void 0,l="",c=0,u=void 0,y=m+1,m=g.indexOf(`
440`,y);continue}const _=g.charCodeAt(y);if(Zk(g,y,_)){const k=g.charCodeAt(y+5)===ca?y+6:y+5,S=g.slice(k,m);if(c===0&&g.charCodeAt(m+1)===qk){t({id:o,event:u,data:S}),o=void 0,l="",u=void 0,y=m+2,m=g.indexOf(`
441`,y);continue}l=c===0?S:`${l}
442${S}`,c++}else Gk(g,y,_)?u=g.slice(g.charCodeAt(y+6)===ca?y+7:y+6,m)||void 0:f(g,y,m);y=m+1,m=g.indexOf(`
443`,y)}return g.slice(y)}for(;y<g.length;){const m=g.indexOf("\r",y),_=g.indexOf(`
444`,y);let k=-1;if(m!==-1&&_!==-1?k=m<_?m:_:m!==-1?m===g.length-1?k=-1:k=m:_!==-1&&(k=_),k===-1)break;f(g,y,k),y=k+1,g.charCodeAt(y-1)===Rq&&g.charCodeAt(y)===qk&&y++}return g.slice(y)}function f(g,y,m){if(y===m){x();return}const _=g.charCodeAt(y);if(Zk(g,y,_)){const R=g.charCodeAt(y+5)===ca?y+6:y+5,M=g.slice(R,m);l=c===0?M:`${l}
445${M}`,c++;return}if(Gk(g,y,_)){u=g.slice(g.charCodeAt(y+6)===ca?y+7:y+6,m)||void 0;return}if(_===105&&g.charCodeAt(y+1)===100&&g.charCodeAt(y+2)===58){const R=g.slice(g.charCodeAt(y+3)===ca?y+4:y+3,m);o=R.includes("\0")?void 0:R;return}if(_===58){if(s){const R=g.slice(y,m);s(R.slice(g.charCodeAt(y+1)===ca?2:1))}return}const k=g.slice(y,m),S=k.indexOf(":");if(S===-1){v(k,"",k);return}const E=k.slice(0,S),P=k.charCodeAt(S+1)===ca?2:1,j=k.slice(S+P);v(E,j,k)}function v(g,y,m){switch(g){case"event":u=y||void 0;break;case"data":l=c===0?y:`${l}
446${y}`,c++;break;case"id":o=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?r(parseInt(y,10)):n(new Wk(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:m}));break;default:n(new Wk(`Unknown field "${g.length>20?`${g.slice(0,20)}…`:g}"`,{type:"unknown-field",field:g,value:y,line:m}));break}}function x(){c>0&&t({id:o,event:u,data:l}),o=void 0,l="",c=0,u=void 0}function w(g={}){if(g.consume&&i.length>0){const y=i.join("");f(y,0,y.length)}a=!0,o=void 0,l="",c=0,u=void 0,i.length=0}return{feed:d,reset:w}}function Zk(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Gk(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class Iq extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let s;super({start(i){s=Oq({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:n,onComment:r})},transform(i){s.feed(i)}})}}var Ku=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const i=n.length,a=new Array(t);for(let o=0;o<t;o++)a[o]=n[Math.random()*i|0];return a.join("")};if(e==null)return s;if(n.includes(r))throw new A8({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${s()}`},Dq=Ku();function uo(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((n,r)=>{t[r.toLowerCase()]=n});else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var Lq=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Mq=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Kk(e){const t=JSON.parse(e);return t===null||typeof t!="object"||Lq.test(e)===!1&&Mq.test(e)===!1?t:$q(t)}function $q(e){let t=[e];for(;t.length;){const n=t;t=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const i=r[s];i&&typeof i=="object"&&t.push(i)}}}return e}function Fq(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Kk(e)}try{return Kk(e)}finally{Error.stackTraceLimit=t}}function Qx(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:n}=e;if(n!=null)for(const r of Object.keys(n))n[r]=ua(n[r])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(ua):ua(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(ua)),e.allOf!=null&&(e.allOf=e.allOf.map(ua)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(ua));const{definitions:t}=e;if(t!=null)for(const n of Object.keys(t))t[n]=ua(t[n]);return e}function ua(e){return typeof e=="boolean"?e:Qx(e)}var zq=Symbol("Let zodToJsonSchema decide on which parser to use"),Yk={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Bq=e=>typeof e=="string"?{...Yk,name:e}:{...Yk,...e};function Wn(){return{}}function Vq(e,t){var n,r,s;const i={type:"array"};return(n=e.type)!=null&&n._def&&((s=(r=e.type)==null?void 0:r._def)==null?void 0:s.typeName)!==Q.ZodAny&&(i.items=Be(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function Uq(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function Hq(){return{type:"boolean"}}function ZN(e,t){return Be(e.type._def,t)}var Wq=(e,t)=>Be(e.innerType._def,t);function GN(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,i)=>GN(e,t,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qq(e)}}var qq=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value;break}return t};function Zq(e,t){return{...Be(e.innerType._def,t),default:e.defaultValue()}}function Gq(e,t){return t.effectStrategy==="input"?Be(e.schema._def,t):Wn()}function Kq(e){return{type:"string",enum:Array.from(e.values)}}var Yq=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Jq(e,t){const n=[Be(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Be(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return n.forEach(s=>{if(Yq(s))r.push(...s.allOf);else{let i=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:a,...o}=s;i=o}r.push(i)}}),r.length?{allOf:r}:void 0}function Qq(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var ig=void 0,wr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(ig===void 0&&(ig=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ig),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function KN(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":br(n,"email",r.message,t);break;case"format:idn-email":br(n,"idn-email",r.message,t);break;case"pattern:zod":sn(n,wr.email,r.message,t);break}break;case"url":br(n,"uri",r.message,t);break;case"uuid":br(n,"uuid",r.message,t);break;case"regex":sn(n,r.regex,r.message,t);break;case"cuid":sn(n,wr.cuid,r.message,t);break;case"cuid2":sn(n,wr.cuid2,r.message,t);break;case"startsWith":sn(n,RegExp(`^${ag(r.value,t)}`),r.message,t);break;case"endsWith":sn(n,RegExp(`${ag(r.value,t)}$`),r.message,t);break;case"datetime":br(n,"date-time",r.message,t);break;case"date":br(n,"date",r.message,t);break;case"time":br(n,"time",r.message,t);break;case"duration":br(n,"duration",r.message,t);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{sn(n,RegExp(ag(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&br(n,"ipv4",r.message,t),r.version!=="v4"&&br(n,"ipv6",r.message,t);break}case"base64url":sn(n,wr.base64url,r.message,t);break;case"jwt":sn(n,wr.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&sn(n,wr.ipv4Cidr,r.message,t),r.version!=="v4"&&sn(n,wr.ipv6Cidr,r.message,t);break}case"emoji":sn(n,wr.emoji(),r.message,t);break;case"ulid":{sn(n,wr.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{br(n,"binary",r.message,t);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{sn(n,wr.base64,r.message,t);break}}break}case"nanoid":sn(n,wr.nanoid,r.message,t)}return n}function ag(e,t){return t.patternStrategy==="escape"?eZ(e):e}var Xq=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function eZ(e){let t="";for(let n=0;n<e.length;n++)Xq.has(e[n])||(t+="\\"),t+=e[n];return t}function br(e,t,n,r){var s;e.format||(s=e.anyOf)!=null&&s.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function sn(e,t,n,r){var s;e.pattern||(s=e.allOf)!=null&&s.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Jk(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=Jk(t,r)}function Jk(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},s=r.i?e.source.toLowerCase():e.source;let i="",a=!1,o=!1,l=!1;for(let c=0;c<s.length;c++){if(a){i+=s[c],a=!1;continue}if(r.i){if(o){if(s[c].match(/[a-z]/)){l?(i+=s[c],i+=`${s[c-2]}-${s[c]}`.toUpperCase(),l=!1):s[c+1]==="-"&&((n=s[c+2])!=null&&n.match(/[a-z]/))?(i+=s[c],l=!0):i+=`${s[c]}${s[c].toUpperCase()}`;continue}}else if(s[c].match(/[a-z]/)){i+=`[${s[c]}${s[c].toUpperCase()}]`;continue}}if(r.m){if(s[c]==="^"){i+=`(^|(?<=[\r
447]))`;continue}else if(s[c]==="$"){i+=`($|(?=[\r
448]))`;continue}}if(r.s&&s[c]==="."){i+=o?`${s[c]}\r
449`:`[${s[c]}\r
450]`;continue}i+=s[c],s[c]==="\\"?a=!0:o&&s[c]==="]"?o=!1:!o&&s[c]==="["&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function YN(e,t){var n,r,s,i,a,o;const l={type:"object",additionalProperties:(n=Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?n:t.allowedAdditionalProperties};if(((r=e.keyType)==null?void 0:r._def.typeName)===Q.ZodString&&((s=e.keyType._def.checks)!=null&&s.length)){const{type:c,...u}=KN(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===Q.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((a=e.keyType)==null?void 0:a._def.typeName)===Q.ZodBranded&&e.keyType._def.type._def.typeName===Q.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:c,...u}=ZN(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function tZ(e,t){if(t.mapStrategy==="record")return YN(e,t);const n=Be(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Wn(),r=Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Wn();return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function nZ(e){const t=e.values,r=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),s=Array.from(new Set(r.map(i=>typeof i)));return{type:s.length===1?s[0]==="string"?"string":"number":["string","number"],enum:r}}function rZ(){return{not:Wn()}}function sZ(){return{type:"null"}}var jv={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function iZ(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in jv&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((s,i)=>{const a=jv[i._def.typeName];return a&&!s.includes(a)?[...s,a]:s},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((s,i)=>{const a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...s,a];case"bigint":return[...s,"integer"];case"object":if(i._def.value===null)return[...s,"null"];case"symbol":case"undefined":case"function":default:return s}},[]);if(r.length===n.length){const s=r.filter((i,a,o)=>o.indexOf(i)===a);return{type:s.length>1?s:s[0],enum:n.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,s)=>[...r,...s._def.values.filter(i=>!r.includes(i))],[])};return aZ(e,t)}var aZ=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,s)=>Be(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${s}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function oZ(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[jv[e.innerType._def.typeName],"null"]};const n=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function lZ(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value;break}return t}function cZ(e,t){const n={type:"object",properties:{}},r=[],s=e.shape();for(const a in s){let o=s[a];if(o===void 0||o._def===void 0)continue;const l=dZ(o),c=Be(o._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});c!==void 0&&(n.properties[a]=c,l||r.push(a))}r.length&&(n.required=r);const i=uZ(e,t);return i!==void 0&&(n.additionalProperties=i),n}function uZ(e,t){if(e.catchall._def.typeName!=="ZodNever")return Be(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function dZ(e){try{return e.isOptional()}catch{return!0}}var hZ=(e,t)=>{var n;if(t.currentPath.toString()===((n=t.propertyPath)==null?void 0:n.toString()))return Be(e.innerType._def,t);const r=Be(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Wn()},r]}:Wn()},fZ=(e,t)=>{if(t.pipeStrategy==="input")return Be(e.in._def,t);if(t.pipeStrategy==="output")return Be(e.out._def,t);const n=Be(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=Be(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(s=>s!==void 0)}};function pZ(e,t){return Be(e.type._def,t)}function mZ(e,t){const r={type:"array",uniqueItems:!0,items:Be(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(r.minItems=e.minSize.value),e.maxSize&&(r.maxItems=e.maxSize.value),r}function gZ(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>Be(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:Be(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>Be(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function yZ(){return{not:Wn()}}function vZ(){return Wn()}var xZ=(e,t)=>Be(e.innerType._def,t),wZ=(e,t,n)=>{switch(t){case Q.ZodString:return KN(e,n);case Q.ZodNumber:return lZ(e);case Q.ZodObject:return cZ(e,n);case Q.ZodBigInt:return Uq(e);case Q.ZodBoolean:return Hq();case Q.ZodDate:return GN(e,n);case Q.ZodUndefined:return yZ();case Q.ZodNull:return sZ();case Q.ZodArray:return Vq(e,n);case Q.ZodUnion:case Q.ZodDiscriminatedUnion:return iZ(e,n);case Q.ZodIntersection:return Jq(e,n);case Q.ZodTuple:return gZ(e,n);case Q.ZodRecord:return YN(e,n);case Q.ZodLiteral:return Qq(e);case Q.ZodEnum:return Kq(e);case Q.ZodNativeEnum:return nZ(e);case Q.ZodNullable:return oZ(e,n);case Q.ZodOptional:return hZ(e,n);case Q.ZodMap:return tZ(e,n);case Q.ZodSet:return mZ(e,n);case Q.ZodLazy:return()=>e.getter()._def;case Q.ZodPromise:return pZ(e,n);case Q.ZodNaN:case Q.ZodNever:return rZ();case Q.ZodEffects:return Gq(e,n);case Q.ZodAny:return Wn();case Q.ZodUnknown:return vZ();case Q.ZodDefault:return Zq(e,n);case Q.ZodBranded:return ZN(e,n);case Q.ZodReadonly:return xZ(e,n);case Q.ZodCatch:return Wq(e,n);case Q.ZodPipeline:return fZ(e,n);case Q.ZodFunction:case Q.ZodVoid:case Q.ZodSymbol:return;default:return(r=>{})()}},bZ=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function Be(e,t,n=!1){var r;const s=t.seen.get(e);if(t.override){const l=(r=t.override)==null?void 0:r.call(t,e,t,s,n);if(l!==zq)return l}if(s&&!n){const l=_Z(s,t);if(l!==void 0)return l}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const a=wZ(e,e.typeName,t),o=typeof a=="function"?Be(a(),t):a;if(o&&kZ(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return i.jsonSchema=o,l}return i.jsonSchema=o,o}var _Z=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:bZ(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Wn()):t.$refStrategy==="seen"?Wn():void 0}},kZ=(e,t,n)=>(e.description&&(n.description=e.description),n),SZ=e=>{const t=Bq(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,s])=>[s._def,{def:s._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}},EZ=(e,t)=>{var n;const r=SZ(t);let s=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var p;return{...c,[u]:(p=Be(d._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0))!=null?p:Wn()}},{}):void 0;const i=typeof t=="string"?t:(t==null?void 0:t.nameStrategy)==="title"||t==null?void 0:t.name,a=(n=Be(e._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1))!=null?n:Wn(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(a.title=o);const l=i===void 0?s?{...a,[r.definitionPath]:s}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...s,[i]:a}};return l.$schema="http://json-schema.org/draft-07/schema#",l},Nv=Symbol.for("vercel.ai.schema");function CZ(e){let t;return()=>(t==null&&(t=e()),t)}function Vp(e,{validate:t}={}){return{[Nv]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function TZ(e){return typeof e=="object"&&e!==null&&Nv in e&&e[Nv]===!0&&"jsonSchema"in e&&"validate"in e}function Xx(e){return e==null?Vp({properties:{},additionalProperties:!1}):TZ(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?JN(e):AZ(e):e()}function AZ(e){return Vp(()=>Qx(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{const n=await e["~standard"].validate(t);return"value"in n?{success:!0,value:n.value}:{success:!1,error:new bl({value:t,cause:n.issues})}}})}function PZ(e,t){var n;const r=(n=void 0)!=null?n:!1;return Vp(()=>EZ(e,{$refStrategy:r?"root":"none"}),{validate:async s=>{const i=await e.safeParseAsync(s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function jZ(e,t){var n;const r=(n=void 0)!=null?n:!1;return Vp(()=>Qx(kW(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"})),{validate:async s=>{const i=await MN(e,s);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function NZ(e){return"_zod"in e}function JN(e,t){return NZ(e)?jZ(e):PZ(e)}async function Qk({value:e,schema:t,context:n}){const r=await Cu({value:e,schema:t,context:n});if(!r.success)throw bl.wrap({value:e,cause:r.error,context:n});return r.value}async function Cu({value:e,schema:t,context:n}){const r=Xx(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};const s=await r.validate(e);return s.success?{success:!0,value:s.value,rawValue:e}:{success:!1,error:bl.wrap({value:e,cause:s.error,context:n}),rawValue:e}}catch(s){return{success:!1,error:bl.wrap({value:e,cause:s,context:n}),rawValue:e}}}async function Za({text:e,schema:t}){try{const n=Fq(e);return t==null?{success:!0,value:n,rawValue:n}:await Cu({value:n,schema:t})}catch(n){return{success:!1,error:_k.isInstance(n)?n:new _k({text:e,cause:n}),rawValue:void 0}}}function RZ({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Iq).pipeThrough(new TransformStream({async transform({data:n},r){n!=="[DONE]"&&r.enqueue(await Za({text:n,schema:t}))}}))}async function pi(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var OZ=Object.defineProperty,IZ=(e,t)=>{for(var n in t)OZ(e,n,{get:t[n],enumerable:!0})},QN="AI_NoObjectGeneratedError",XN=`vercel.ai.error.${QN}`,DZ=Symbol.for(XN),eR,Fi=class extends vs{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:s,finishReason:i}){super({name:QN,message:e,cause:t}),this[eR]=!0,this.text=n,this.response=r,this.usage=s,this.finishReason=i}static isInstance(e){return vs.hasMarker(e,XN)}};eR=DZ;var tR="AI_UIMessageStreamError",nR=`vercel.ai.error.${tR}`,LZ=Symbol.for(nR),rR,ho=class extends vs{constructor({chunkType:e,chunkId:t,message:n}){super({name:tR,message:n}),this[rR]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return vs.hasMarker(e,nR)}};rR=LZ;var sR=pn([X(),Lf(Uint8Array),Lf(ArrayBuffer),qN(e=>{var t,n;return(n=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?n:!1},{message:"Must be a Buffer"})]),Ga=Aq(()=>pn([sq(),X(),eq(),an(),qa(X(),Ga.optional()),Dl(Ga)])),Re=qa(X(),qa(X(),Ga.optional())),iR=We({type:xe("text"),text:X(),providerOptions:Re.optional()}),MZ=We({type:xe("image"),image:pn([sR,Lf(URL)]),mediaType:X().optional(),providerOptions:Re.optional()}),aR=We({type:xe("file"),data:pn([sR,Lf(URL)]),filename:X().optional(),mediaType:X(),providerOptions:Re.optional()}),$Z=We({type:xe("reasoning"),text:X(),providerOptions:Re.optional()}),FZ=We({type:xe("tool-call"),toolCallId:X(),toolName:X(),input:ns(),providerOptions:Re.optional(),providerExecuted:an().optional()}),zZ=cq("type",[We({type:xe("text"),value:X(),providerOptions:Re.optional()}),We({type:xe("json"),value:Ga,providerOptions:Re.optional()}),We({type:xe("execution-denied"),reason:X().optional(),providerOptions:Re.optional()}),We({type:xe("error-text"),value:X(),providerOptions:Re.optional()}),We({type:xe("error-json"),value:Ga,providerOptions:Re.optional()}),We({type:xe("content"),value:Dl(pn([We({type:xe("text"),text:X(),providerOptions:Re.optional()}),We({type:xe("media"),data:X(),mediaType:X()}),We({type:xe("file-data"),data:X(),mediaType:X(),filename:X().optional(),providerOptions:Re.optional()}),We({type:xe("file-url"),url:X(),providerOptions:Re.optional()}),We({type:xe("file-id"),fileId:pn([X(),qa(X(),X())]),providerOptions:Re.optional()}),We({type:xe("image-data"),data:X(),mediaType:X(),providerOptions:Re.optional()}),We({type:xe("image-url"),url:X(),providerOptions:Re.optional()}),We({type:xe("image-file-id"),fileId:pn([X(),qa(X(),X())]),providerOptions:Re.optional()}),We({type:xe("custom"),providerOptions:Re.optional()})]))})]),oR=We({type:xe("tool-result"),toolCallId:X(),toolName:X(),output:zZ,providerOptions:Re.optional()}),BZ=We({type:xe("tool-approval-request"),approvalId:X(),toolCallId:X()}),VZ=We({type:xe("tool-approval-response"),approvalId:X(),approved:an(),reason:X().optional()}),UZ=We({role:xe("system"),content:X(),providerOptions:Re.optional()}),HZ=We({role:xe("user"),content:pn([X(),Dl(pn([iR,MZ,aR]))]),providerOptions:Re.optional()}),WZ=We({role:xe("assistant"),content:pn([X(),Dl(pn([iR,aR,$Z,FZ,oR,BZ]))]),providerOptions:Re.optional()}),qZ=We({role:xe("tool"),content:Dl(pn([oR,VZ])),providerOptions:Re.optional()});pn([UZ,HZ,WZ,qZ]);function lR(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const n={...e};for(const r in t)if(!(r==="__proto__"||r==="constructor"||r==="prototype")&&Object.prototype.hasOwnProperty.call(t,r)){const s=t[r];if(s===void 0)continue;const i=r in e?e[r]:void 0,a=s!==null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp),o=i!=null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp);a&&o?n[r]=lR(i,s):n[r]=s}return n}var ZZ={};IZ(ZZ,{array:()=>JZ,choice:()=>QZ,json:()=>XZ,object:()=>YZ,text:()=>KZ});function GZ(e){const t=["ROOT"];let n=-1,r=null;function s(l,c,u){switch(l){case'"':{n=c,t.pop(),t.push(u),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{n=c,r=c,t.pop(),t.push(u),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(u),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=c,t.pop(),t.push(u),t.push("INSIDE_NUMBER");break}case"{":{n=c,t.pop(),t.push(u),t.push("INSIDE_OBJECT_START");break}case"[":{n=c,t.pop(),t.push(u),t.push("INSIDE_ARRAY_START");break}}}function i(l,c){switch(l){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{n=c,t.pop();break}}}function a(l,c){switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=c,t.pop();break}}}for(let l=0;l<e.length;l++){const c=e[l];switch(t[t.length-1]){case"ROOT":s(c,l,"FINISH");break;case"INSIDE_OBJECT_START":{switch(c){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{n=l,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(c){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(c){case'"':{t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(c){case":":{t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{s(c,l,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{i(c,l);break}case"INSIDE_STRING":{switch(c){case'"':{t.pop(),n=l;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:n=l}break}case"INSIDE_ARRAY_START":{switch(c){case"]":{n=l,t.pop();break}default:{n=l,s(c,l,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(c){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{n=l,t.pop();break}default:{n=l;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{s(c,l,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),n=l;break}case"INSIDE_NUMBER":{switch(c){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{n=l;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(c,l),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&i(c,l);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&i(c,l);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(c,l);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const d=e.substring(r,l+1);!"false".startsWith(d)&&!"true".startsWith(d)&&!"null".startsWith(d)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?i(c,l):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(c,l)):n=l;break}}}let o=e.slice(0,n+1);for(let l=t.length-1;l>=0;l--)switch(t[l]){case"INSIDE_STRING":{o+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{o+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{o+="]";break}case"INSIDE_LITERAL":{const u=e.substring(r,e.length);"true".startsWith(u)?o+="true".slice(u.length):"false".startsWith(u)?o+="false".slice(u.length):"null".startsWith(u)&&(o+="null".slice(u.length))}}return o}async function Yu(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Za({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Za({text:GZ(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var KZ=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),YZ=({schema:e,name:t,description:n})=>{const r=Xx(e);return{name:"object",responseFormat:pi(r.jsonSchema).then(s=>({type:"json",schema:s,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:s},i){const a=await Za({text:s});if(!a.success)throw new Fi({message:"No object generated: could not parse the response.",cause:a.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});const o=await Cu({value:a.value,schema:r});if(!o.success)throw new Fi({message:"No object generated: response did not match sc
450hema.",cause:o.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});return o.value},async parsePartialOutput({text:s}){const i=await Yu(s);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value}}},createElementStreamTransform(){}}},JZ=({element:e,name:t,description:n})=>{const r=Xx(e);return{name:"array",responseFormat:pi(r.jsonSchema).then(s=>{const{$schema:i,...a}=s;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:a}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:s},i){const a=await Za({text:s});if(!a.success)throw new Fi({message:"No object generated: could not parse the response.",cause:a.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});const o=a.value;if(o==null||typeof o!="object"||!("elements"in o)||!Array.isArray(o.elements))throw new Fi({message:"No object generated: response did not match schema.",cause:new bl({value:o,cause:"response must be an object with an elements array"}),text:s,response:i.response,usage:i.usage,finishReason:i.finishReason});for(const l of o.elements){const c=await Cu({value:l,schema:r});if(!c.success)throw new Fi({message:"No object generated: response did not match schema.",cause:c.error,text:s,response:i.response,usage:i.usage,finishReason:i.finishReason})}return o.elements},async parsePartialOutput({text:s}){const i=await Yu(s);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const a=i.value;if(a==null||typeof a!="object"||!("elements"in a)||!Array.isArray(a.elements))return;const o=i.state==="repaired-parse"&&a.elements.length>0?a.elements.slice(0,-1):a.elements,l=[];for(const c of o){const u=await Cu({value:c,schema:r});u.success&&l.push(u.value)}return{partial:l}}}},createElementStreamTransform(){let s=0;return new TransformStream({transform({partialOutput:i},a){if(i!=null)for(;s<i.length;s++)a.enqueue(i[s])}})}}},QZ=({options:e,name:t,description:n})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:r},s){const i=await Za({text:r});if(!i.success)throw new Fi({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:s.response,usage:s.usage,finishReason:s.finishReason});const a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string"||!e.includes(a.result))throw new Fi({message:"No object generated: response did not match schema.",cause:new bl({value:a,cause:"response must be an object that contains a choice value."}),text:r,response:s.response,usage:s.usage,finishReason:s.finishReason});return a.result},async parsePartialOutput({text:r}){const s=await Yu(r);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const i=s.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string")return;const a=e.filter(o=>o.startsWith(i.result));return s.state==="successful-parse"?a.includes(i.result)?{partial:i.result}:void 0:a.length===1?{partial:a[0]}:void 0}}},createElementStreamTransform(){}}),XZ=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:n},r){const s=await Za({text:n});if(!s.success)throw new Fi({message:"No object generated: could not parse the response.",cause:s.error,text:n,response:r.response,usage:r.usage,finishReason:r.finishReason});return s.value},async parsePartialOutput({text:n}){const r=await Yu(n);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return r.value===void 0?void 0:{partial:r.value}}},createElementStreamTransform(){}});Ku({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
451
452`)},flush(e){e.enqueue(`data: [DONE]
453
454`)}})}});var rc=qa(X(),Ga.optional()),eG=CZ(()=>JN(pn([Xe({type:xe("text-start"),id:X(),providerMetadata:Re.optional()}),Xe({type:xe("text-delta"),id:X(),delta:X(),providerMetadata:Re.optional()}),Xe({type:xe("text-end"),id:X(),providerMetadata:Re.optional()}),Xe({type:xe("error"),errorText:X()}),Xe({type:xe("tool-input-start"),toolCallId:X(),toolName:X(),providerExecuted:an().optional(),providerMetadata:Re.optional(),toolMetadata:rc.optional(),dynamic:an().optional(),title:X().optional()}),Xe({type:xe("tool-input-delta"),toolCallId:X(),inputTextDelta:X()}),Xe({type:xe("tool-input-available"),toolCallId:X(),toolName:X(),input:ns(),providerExecuted:an().optional(),providerMetadata:Re.optional(),toolMetadata:rc.optional(),dynamic:an().optional(),title:X().optional()}),Xe({type:xe("tool-input-error"),toolCallId:X(),toolName:X(),input:ns(),providerExecuted:an().optional(),providerMetadata:Re.optional(),toolMetadata:rc.optional(),dynamic:an().optional(),errorText:X(),title:X().optional()}),Xe({type:xe("tool-approval-request"),approvalId:X(),toolCallId:X()}),Xe({type:xe("tool-output-available"),toolCallId:X(),output:ns(),providerExecuted:an().optional(),providerMetadata:Re.optional(),toolMetadata:rc.optional(),dynamic:an().optional(),preliminary:an().optional()}),Xe({type:xe("tool-output-error"),toolCallId:X(),errorText:X(),providerExecuted:an().optional(),providerMetadata:Re.optional(),toolMetadata:rc.optional(),dynamic:an().optional()}),Xe({type:xe("tool-output-denied"),toolCallId:X()}),Xe({type:xe("reasoning-start"),id:X(),providerMetadata:Re.optional()}),Xe({type:xe("reasoning-delta"),id:X(),delta:X(),providerMetadata:Re.optional()}),Xe({type:xe("reasoning-end"),id:X(),providerMetadata:Re.optional()}),Xe({type:xe("source-url"),sourceId:X(),url:X(),title:X().optional(),providerMetadata:Re.optional()}),Xe({type:xe("source-document"),sourceId:X(),mediaType:X(),title:X(),filename:X().optional(),providerMetadata:Re.optional()}),Xe({type:xe("file"),url:X(),mediaType:X(),providerMetadata:Re.optional()}),Xe({type:qN(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:X().optional(),data:ns(),transient:an().optional()}),Xe({type:xe("start-step")}),Xe({type:xe("finish-step")}),Xe({type:xe("start"),messageId:X().optional(),messageMetadata:ns().optional()}),Xe({type:xe("finish"),finishReason:UN(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:ns().optional()}),Xe({type:xe("abort"),reason:X().optional()}),Xe({type:xe("message-metadata"),messageMetadata:ns()})])));function tG(e){return e.type.startsWith("data-")}function Rv(e){return e.type.startsWith("tool-")}function nG(e){return e.type==="dynamic-tool"}function Mf(e){return Rv(e)||nG(e)}function Xk(e){return e.type.split("-").slice(1).join("-")}function rG({lastMessage:e,messageId:t}){return{message:(e==null?void 0:e.role)==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}
vendor: 23,945 bytes, line 454
454function sG({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:s,onToolCall:i,onData:a}){return e.pipeThrough(new TransformStream({async transform(o,l){await r(async({state:c,write:u})=>{var d,p,f,v;function x(m){const k=c.message.parts.filter(Mf).find(S=>S.toolCallId===m);if(k==null)throw new ho({chunkType:"tool-invocation",chunkId:m,message:`No tool invocation found for tool call ID "${m}".`});return k}function w(m){var _;const k=c.message.parts.find(P=>Rv(P)&&P.toolCallId===m.toolCallId),S=m,E=k;if(k!=null){k.state=m.state,E.input=S.input,E.output=S.output,E.errorText=S.errorText,E.rawInput=S.rawInput,E.preliminary=S.preliminary,m.title!==void 0&&(E.title=m.title),m.toolMetadata!==void 0&&(E.toolMetadata=m.toolMetadata),E.providerExecuted=(_=S.providerExecuted)!=null?_:k.providerExecuted;const P=S.providerMetadata;if(P!=null)if(m.state==="output-available"||m.state==="output-error"){const j=k;j.resultProviderMetadata=P}else k.callProviderMetadata=P}else c.message.parts.push({type:`tool-${m.toolName}`,toolCallId:m.toolCallId,state:m.state,title:m.title,...m.toolMetadata!==void 0?{toolMetadata:m.toolMetadata}:{},input:S.input,output:S.output,rawInput:S.rawInput,errorText:S.errorText,providerExecuted:S.providerExecuted,preliminary:S.preliminary,...S.providerMetadata!=null&&(m.state==="output-available"||m.state==="output-error")?{resultProviderMetadata:S.providerMetadata}:{},...S.providerMetadata!=null&&!(m.state==="output-available"||m.state==="output-error")?{callProviderMetadata:S.providerMetadata}:{}})}function g(m){var _,k;const S=c.message.parts.find(j=>j.type==="dynamic-tool"&&j.toolCallId===m.toolCallId),E=m,P=S;if(S!=null){S.state=m.state,P.toolName=m.toolName,P.input=E.input,P.output=E.output,P.errorText=E.errorText,P.rawInput=(_=E.rawInput)!=null?_:P.rawInput,P.preliminary=E.preliminary,m.title!==void 0&&(P.title=m.title),m.toolMetadata!==void 0&&(P.toolMetadata=m.toolMetadata),P.providerExecuted=(k=E.providerExecuted)!=null?k:S.providerExecuted;const j=E.providerMetadata;if(j!=null)if(m.state==="output-available"||m.state==="output-error"){const R=S;R.resultProviderMetadata=j}else S.callProviderMetadata=j}else c.message.parts.push({type:"dynamic-tool",toolName:m.toolName,toolCallId:m.toolCallId,state:m.state,input:E.input,output:E.output,errorText:E.errorText,preliminary:E.preliminary,providerExecuted:E.providerExecuted,title:m.title,...m.toolMetadata!==void 0?{toolMetadata:m.toolMetadata}:{},...E.providerMetadata!=null&&(m.state==="output-available"||m.state==="output-error")?{resultProviderMetadata:E.providerMetadata}:{},...E.providerMetadata!=null&&!(m.state==="output-available"||m.state==="output-error")?{callProviderMetadata:E.providerMetadata}:{}})}async function y(m){if(m!=null){const _=c.message.metadata!=null?lR(c.message.metadata,m):m;t!=null&&await Qk({value:_,schema:t,context:{field:"message.metadata",entityId:c.message.id}}),c.message.metadata=_}}switch(o.type){case"text-start":{const m={type:"text",text:"",providerMetadata:o.providerMetadata,state:"streaming"};c.activeTextParts[o.id]=m,c.message.parts.push(m),u();break}case"text-delta":{const m=c.activeTextParts[o.id];if(m==null)throw new ho({chunkType:"text-delta",chunkId:o.id,message:`Received text-delta for missing text part with ID "${o.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});m.text+=o.delta,m.providerMetadata=(d=o.providerMetadata)!=null?d:m.providerMetadata,u();break}case"text-end":{const m=c.activeTextParts[o.id];if(m==null)throw new ho({chunkType:"text-end",chunkId:o.id,message:`Received text-end for missing text part with ID "${o.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});m.state="done",m.providerMetadata=(p=o.providerMetadata)!=null?p:m.providerMetadata,delete c.activeTextParts[o.id],u();break}case"reasoning-start":{const m={type:"reasoning",text:"",providerMetadata:o.providerMetadata,state:"streaming"};c.activeReasoningParts[o.id]=m,c.message.parts.push(m),u();break}case"reasoning-delta":{const m=c.activeReasoningParts[o.id];if(m==null)throw new ho({chunkType:"reasoning-delta",chunkId:o.id,message:`Received reasoning-delta for missing reasoning part with ID "${o.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});m.text+=o.delta,m.providerMetadata=(f=o.providerMetadata)!=null?f:m.providerMetadata,u();break}case"reasoning-end":{const m=c.activeReasoningParts[o.id];if(m==null)throw new ho({chunkType:"reasoning-end",chunkId:o.id,message:`Received reasoning-end for missing reasoning part with ID "${o.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});m.providerMetadata=(v=o.providerMetadata)!=null?v:m.providerMetadata,m.state="done",delete c.activeReasoningParts[o.id],u();break}case"file":{c.message.parts.push({type:"file",mediaType:o.mediaType,url:o.url,...o.providerMetadata!=null?{providerMetadata:o.providerMetadata}:{}}),u();break}case"source-url":{c.message.parts.push({type:"source-url",sourceId:o.sourceId,url:o.url,title:o.title,providerMetadata:o.providerMetadata}),u();break}case"source-document":{c.message.parts.push({type:"source-document",sourceId:o.sourceId,mediaType:o.mediaType,title:o.title,filename:o.filename,providerMetadata:o.providerMetadata}),u();break}case"tool-input-start":{const m=c.message.parts.filter(Rv);c.partialToolCalls[o.toolCallId]={text:"",toolName:o.toolName,index:m.length,dynamic:o.dynamic,title:o.title,toolMetadata:o.toolMetadata},o.dynamic?g({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-streaming",input:void 0,providerExecuted:o.providerExecuted,title:o.title,toolMetadata:o.toolMetadata,providerMetadata:o.providerMetadata}):w({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-streaming",input:void 0,providerExecuted:o.providerExecuted,title:o.title,toolMetadata:o.toolMetadata,providerMetadata:o.providerMetadata}),u();break}case"tool-input-delta":{const m=c.partialToolCalls[o.toolCallId];if(m==null)throw new ho({chunkType:"tool-input-delta",chunkId:o.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${o.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});m.text+=o.inputTextDelta;const{value:_}=await Yu(m.text);m.dynamic?g({toolCallId:o.toolCallId,toolName:m.toolName,state:"input-streaming",input:_,title:m.title,toolMetadata:m.toolMetadata}):w({toolCallId:o.toolCallId,toolName:m.toolName,state:"input-streaming",input:_,title:m.title,toolMetadata:m.toolMetadata}),u();break}case"tool-input-available":{o.dynamic?g({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-available",input:o.input,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:o.title,toolMetadata:o.toolMetadata}):w({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-available",input:o.input,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:o.title,toolMetadata:o.toolMetadata}),u(),i&&!o.providerExecuted&&await i({toolCall:o});break}case"tool-input-error":{const m=c.message.parts.filter(Mf).find(k=>k.toolCallId===o.toolCallId);(m!=null?m.type==="dynamic-tool":!!o.dynamic)?g({toolCallId:o.toolCallId,toolName:o.toolName,state:"output-error",input:o.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,toolMetadata:o.toolMetadata}):w({toolCallId:o.toolCallId,toolName:o.toolName,state:"output-error",input:void 0,rawInput:o.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,toolMetadata:o.toolMetadata}),u();break}case"tool-approval-request":{const m=x(o.toolCallId);m.state="approval-requested",m.approval={id:o.approvalId},u();break}case"tool-output-denied":{const m=x(o.toolCallId);m.state="output-denied",u();break}case"tool-output-available":{const m=x(o.toolCallId);m.type==="dynamic-tool"?g({toolCallId:o.toolCallId,toolName:m.toolName,state:"output-available",input:m.input,output:o.output,preliminary:o.preliminary,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:m.title,toolMetadata:m.toolMetadata}):w({toolCallId:o.toolCallId,toolName:Xk(m),state:"output-available",input:m.input,output:o.output,providerExecuted:o.providerExecuted,preliminary:o.preliminary,providerMetadata:o.providerMetadata,title:m.title,toolMetadata:m.toolMetadata}),u();break}case"tool-output-error":{const m=x(o.toolCallId);m.type==="dynamic-tool"?g({toolCallId:o.toolCallId,toolName:m.toolName,state:"output-error",input:m.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:m.title,toolMetadata:m.toolMetadata}):w({toolCallId:o.toolCallId,toolName:Xk(m),state:"output-error",input:m.input,rawInput:m.rawInput,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:m.title,toolMetadata:m.toolMetadata}),u();break}case"start-step":{c.message.parts.push({type:"step-start"});break}case"finish-step":{c.activeTextParts={},c.activeReasoningParts={};break}case"start":{o.messageId!=null&&(c.message.id=o.messageId),await y(o.messageMetadata),(o.messageId!=null||o.messageMetadata!=null)&&u();break}case"finish":{o.finishReason!=null&&(c.finishReason=o.finishReason),await y(o.messageMetadata),o.messageMetadata!=null&&u();break}case"message-metadata":{await y(o.messageMetadata),o.messageMetadata!=null&&u();break}case"error":{s==null||s(new Error(o.errorText));break}default:if(tG(o)){if((n==null?void 0:n[o.type])!=null){const k=c.message.parts.findIndex(E=>"id"in E&&"data"in E&&E.id===o.id&&E.type===o.type),S=k>=0?k:c.message.parts.length;await Qk({value:o.data,schema:n[o.type],context:{field:`message.parts[${S}].data`,entityName:o.type,entityId:o.id}})}const m=o;if(m.transient){a==null||a(m);break}const _=m.id!=null?c.message.parts.find(k=>m.type===k.type&&m.id===k.id):void 0;_!=null?_.data=m.data:c.message.parts.push(m),a==null||a(m),u()}}l.enqueue(o)})}}))}async function iG({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:r}=await n.read();if(r)break}}catch(r){t==null||t(r)}finally{n.releaseLock()}}Ku({prefix:"aitxt",size:24});qa(X(),Ga.optional());Ku({prefix:"aiobj",size:24});var aG=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(r){n(r)}}),this.processQueue()})}};Ku({prefix:"aiobj",size:24});async function oG(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:n,type:r}=t,s=await new Promise((i,a)=>{const o=new FileReader;o.onload=l=>{var c;i((c=l.target)==null?void 0:c.result)},o.onerror=l=>a(l),o.readAsDataURL(t)});return{type:"file",mediaType:r,filename:n,url:s}}))}var lG=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:s,prepareSendMessagesRequest:i,prepareReconnectToStreamRequest:a}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=s,this.prepareSendMessagesRequest=i,this.prepareReconnectToStreamRequest=a}async sendMessages({abortSignal:e,...t}){var n,r,s,i,a;const o=await pi(this.body),l=await pi(this.headers),c=await pi(this.credentials),u={...uo(l),...uo(t.headers)},d=await((n=this.prepareSendMessagesRequest)==null?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...o,...t.body},headers:u,credentials:c,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),p=(r=d==null?void 0:d.api)!=null?r:this.api,f=(d==null?void 0:d.headers)!==void 0?uo(d.headers):u,v=(d==null?void 0:d.body)!==void 0?d.body:{...o,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},x=(s=d==null?void 0:d.credentials)!=null?s:c,g=await((i=this.fetch)!=null?i:globalThis.fetch)(p,{method:"POST",headers:{"Content-Type":"application/json",...f},body:JSON.stringify(v),credentials:x,signal:e});if(!g.ok)throw new Error((a=await g.text())!=null?a:"Failed to fetch the chat response.");if(!g.body)throw new Error("The response body is empty.");return this.processResponseStream(g.body)}async reconnectToStream(e){var t,n,r,s,i;const a=await pi(this.body),o=await pi(this.headers),l=await pi(this.credentials),c={...uo(o),...uo(e.headers)},u=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...a,...e.body},headers:c,credentials:l,requestMetadata:e.metadata})),d=(n=u==null?void 0:u.api)!=null?n:`${this.api}/${e.chatId}/stream`,p=(u==null?void 0:u.headers)!==void 0?uo(u.headers):c,f=(r=u==null?void 0:u.credentials)!=null?r:l,x=await((s=this.fetch)!=null?s:globalThis.fetch)(d,{method:"GET",headers:p,credentials:f});if(x.status===204)return null;if(!x.ok)throw new Error((i=await x.text())!=null?i:"Failed to fetch the chat response.");if(!x.body)throw new Error("The response body is empty.");return this.processResponseStream(x.body)}},cR=class extends lG{constructor(e={}){super(e)}processResponseStream(e){return RZ({stream:e,schema:eG}).pipeThrough(new TransformStream({async transform(t,n){if(!t.success)throw t.error;n.enqueue(t.value)}}))}},cG=class{constructor({generateId:e=Dq,id:t=e(),transport:n=new cR,messageMetadataSchema:r,dataPartSchemas:s,state:i,onError:a,onToolCall:o,onFinish:l,onData:c,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new aG,this.sendMessage=async(d,p)=>{var f,v,x,w;if(d==null){await this.makeRequest({trigger:"submit-message",messageId:(f=this.lastMessage)==null?void 0:f.id,...p});return}let g;if("text"in d||"files"in d?g={parts:[...Array.isArray(d.files)?d.files:await oG(d.files),..."text"in d&&d.text!=null?[{type:"text",text:d.text}]:[]]}:g=d,d.messageId!=null){const y=this.state.messages.findIndex(m=>m.id===d.messageId);if(y===-1)throw new Error(`message with id ${d.messageId} not found`);if(this.state.messages[y].role!=="user")throw new Error(`message with id ${d.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,y+1),this.state.replaceMessage(y,{...g,id:d.messageId,role:(v=g.role)!=null?v:"user",metadata:d.metadata})}else this.state.pushMessage({...g,id:(x=g.id)!=null?x:this.generateId(),role:(w=g.role)!=null?w:"user",metadata:d.metadata});await this.makeRequest({trigger:"submit-message",messageId:d.messageId,...p})},this.regenerate=async({messageId:d,...p}={})=>{const f=d==null?this.state.messages.length-1:this.state.messages.findIndex(v=>v.id===d);if(f===-1)throw new Error(`message ${d} not found`);this.state.messages=this.state.messages.slice(0,this.messages[f].role==="assistant"?f:f+1),await this.makeRequest({trigger:"regenerate-message",messageId:d,...p})},this.resumeStream=async(d={})=>{await this.makeRequest({trigger:"resume-stream",...d})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:d,approved:p,reason:f,options:v})=>this.jobExecutor.run(async()=>{const x=this.state.messages,w=x[x.length-1],g=y=>Mf(y)&&y.state==="approval-requested"&&y.approval.id===d?{...y,state:"approval-responded",approval:{id:d,approved:p,reason:f}}:y;this.state.replaceMessage(x.length-1,{...w,parts:w.parts.map(g)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(g)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(y=>{var m;y&&this.makeRequest({trigger:"submit-message",messageId:(m=this.lastMessage)==null?void 0:m.id,...v})})}),this.addToolOutput=async({state:d="output-available",toolCallId:p,output:f,errorText:v,options:x})=>this.jobExecutor.run(async()=>{const w=this.state.messages,g=w[w.length-1],y=m=>Mf(m)&&m.toolCallId===p?{...m,state:d,output:f,errorText:v}:m;this.state.replaceMessage(w.length-1,{...g,parts:g.parts.map(y)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(y)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(m=>{var _;m&&this.makeRequest({trigger:"submit-message",messageId:(_=this.lastMessage)==null?void 0:_.id,...x})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var d;this.status!=="streaming"&&this.status!=="submitted"||(d=this.activeResponse)!=null&&d.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=s,this.state=i,this.onError=a,this.onToolCall=o,this.onFinish=l,this.onData=c,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:s}){var i,a,o;let l;if(e==="resume-stream")try{const f=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(f==null)return;l=f}catch(f){this.onError&&f instanceof Error&&this.onError(f),this.setStatus({status:"error",error:f});return}this.setStatus({status:"submitted",error:void 0});const c=this.lastMessage;let u=!1,d=!1,p=!1;try{const f={state:rG({lastMessage:this.state.snapshot(c),messageId:this.generateId()}),abortController:new AbortController};f.abortController.signal.addEventListener("abort",()=>{u=!0}),this.activeResponse=f;let v;e==="resume-stream"?v=l:v=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:f.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:s});const x=w=>this.jobExecutor.run(()=>w({state:f.state,write:()=>{var g;this.setStatus({status:"streaming"}),f.state.message.id===((g=this.lastMessage)==null?void 0:g.id)?this.state.replaceMessage(this.state.messages.length-1,f.state.message):this.state.pushMessage(f.state.message)}}));await iG({stream:sG({stream:v,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:x,onError:w=>{throw w}}),onError:w=>{throw w}}),this.setStatus({status:"ready"})}catch(f){if(u||f.name==="AbortError")return u=!0,this.setStatus({status:"ready"}),null;p=!0,f instanceof TypeError&&(f.message.toLowerCase().includes("fetch")||f.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&f instanceof Error&&this.onError(f),this.setStatus({status:"error",error:f})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:u,isDisconnect:d,isError:p,finishReason:(i=this.activeResponse)==null?void 0:i.state.finishReason})}catch(f){console.error(f)}this.activeResponse=void 0}!p&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(o=this.lastMessage)==null?void 0:o.id,metadata:t,headers:n,body:r})}};function uG(e,t){if(typeof e!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);const a=Date.now(),o=a-r,l=t-o;l<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},l)}}var dG=uG;const hG=Qi(dG);var uR=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},tt=(e,t,n)=>(uR(e,t,"read from private field"),n?n.call(e):t.get(e)),Yr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},li=(e,t,n,r)=>(uR(e,t,"write to private field"),t.set(e,n),n);function fG(e,t){return t!=null?hG(e,t):e}var Xn,kh,Sh,gc,yc,vc,xo,Ov,Iv,pG=class{constructor(e=[]){Yr(this,Xn,void 0),Yr(this,kh,"ready"),Yr(this,Sh,void 0),Yr(this,gc,new Set),Yr(this,yc,new Set),Yr(this,vc,new Set),this.pushMessage=t=>{li(this,Xn,tt(this,Xn).concat(t)),tt(this,xo).call(this)},this.popMessage=()=>{li(this,Xn,tt(this,Xn).slice(0,-1)),tt(this,xo).call(this)},this.replaceMessage=(t,n)=>{li(this,Xn,[...tt(this,Xn).slice(0,t),this.snapshot(n),...tt(this,Xn).slice(t+1)]),tt(this,xo).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,n)=>{const r=n?fG(t,n):t;return tt(this,gc).add(r),()=>{tt(this,gc).delete(r)}},this["~registerStatusCallback"]=t=>(tt(this,yc).add(t),()=>{tt(this,yc).delete(t)}),this["~registerErrorCallback"]=t=>(tt(this,vc).add(t),()=>{tt(this,vc).delete(t)}),Yr(this,xo,()=>{tt(this,gc).forEach(t=>t())}),Yr(this,Ov,()=>{tt(this,yc).forEach(t=>t())}),Yr(this,Iv,()=>{tt(this,vc).forEach(t=>t())}),li(this,Xn,e)}get status(){return tt(this,kh)}set status(e){li(this,kh,e),tt(this,Ov).call(this)}get error(){return tt(this,Sh)}set error(e){li(this,Sh,e),tt(this,Iv).call(this)}get messages(){return tt(this,Xn)}set messages(e){li(this,Xn,[...e]),tt(this,xo).call(this)}};Xn=new WeakMap;kh=new WeakMap;Sh=new WeakMap;gc=new WeakMap;yc=new WeakMap;vc=new WeakMap;xo=new WeakMap;Ov=new WeakMap;Iv=new WeakMap;var wo,eS=class extends cG{constructor({messages:e,...t}){const n=new pG(e);super({...t,state:n}),Yr(this,wo,void 0),this["~registerMessagesCallback"]=(r,s)=>tt(this,wo)["~registerMessagesCallback"](r,s),this["~registerStatusCallback"]=r=>tt(this,wo)["~registerStatusCallback"](r),this["~registerErrorCallback"]=r=>tt(this,wo)["~registerErrorCallback"](r),li(this,wo,n)}};wo=new WeakMap;function mG({experimental_throttle:e,resume:t=!1,...n}={}){const r=b.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const s={...n,onToolCall:p=>{var f,v;return(v=(f=r.current).onToolCall)==null?void 0:v.call(f,p)},onData:p=>{var f,v;return(v=(f=r.current).onData)==null?void 0:v.call(f,p)},onFinish:p=>{var f,v;return(v=(f=r.current).onFinish)==null?void 0:v.call(f,p)},onError:p=>{var f,v;return(v=(f=r.current).onError)==null?void 0:v.call(f,p)},sendAutomaticallyWhen:p=>{var f,v,x;return(x=(v=(f=r.current).sendAutomaticallyWhen)==null?void 0:v.call(f,p))!=null?x:!1}},i=b.useRef("chat"in n?n.chat:new eS(s));("chat"in n&&n.chat!==i.current||"id"in n&&i.current.id!==n.id)&&(i.current="chat"in n?n.chat:new eS(s));const o=b.useCallback(p=>i.current["~registerMessagesCallback"](p,e),[e,i.current.id]),l=b.useSyncExternalStore(o,()=>i.current.messages,()=>i.current.messages),c=b.useSyncExternalStore(i.current["~registerStatusCallback"],()=>i.current.status,()=>i.current.status),u=b.useSyncExternalStore(i.current["~registerErrorCallback"],()=>i.current.error,()=>i.current.error),d=b.useCallback(p=>{typeof p=="function"&&(p=p(i.current.messages)),i.current.messages=p},[i]);return b.useEffect(()=>{t&&i.current.resumeStream()},[t,i]),{id:i.current.id,messages:l,setMessages:d,sendMessage:i.current.sendMessage,regenerate:i.current.regenerate,clearError:i.current.clearError,stop:i.current.stop,error:u,resumeStream:i.current.resumeStream,status:c,addToolResult:i.current.addToolOutput,addToolOutput:i.current.addToolOutput,addToolApprovalResponse:i.current.addToolApprovalResponse}}const ew="hs-chat-messages",dR=50;function gG(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(ew);if(!e)return[];const t=JSON.parse(e);
454return Array.isArray(t)?t.slice(-dR):[]}catch{return[]}}function yG(e){b.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(ew,JSON.stringify(e.slice(-dR)))}catch{}},[e])}function vG(){typeof window<"u"&&window.localStorage.removeItem(ew)}const xG="971523941876";function tw(e){return e.parts.map(t=>t.type==="text"?t.text:"").join("").trim()}function wG(e,t){const r=t.slice(-6).map(a=>`${a.role==="user"?"Me":"Layla"}: ${tw(a).slice(0,240)}`).filter(a=>a.split(": ")[1]).join(`
455`),s=e?`Hi Healthserve team! I was chatting with Layla and would like a human expert.
456
457Name: ${e.name}
458Email: ${e.email}
459WhatsApp: ${e.phone}
460Nationality: ${e.nationality}
461Profession: ${e.profession}`:"Hi Healthserve! I'd like to speak with an expert.",i=r?`${s}
462
463— Recent conversation —
464${r}`:s;return`https://wa.me/${xG}?text=${encodeURIComponent(i)}`}function bG(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _G=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kG=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SG={};function tS(e,t){return(SG.jsx?kG:_G).test(e)}const EG=/[ \t\n\f\r]/g;function CG(e){return typeof e=="object"?e.type==="text"?nS(e.value):!1:nS(e)}function nS(e){return e.replace(EG,"")===""}class Ju{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ju.prototype.normal={};Ju.prototype.property={};Ju.prototype.space=void 0;function hR(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ju(n,r,t)}function Dv(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let TG=0;const Pe=Qa(),Ct=Qa(),Lv=Qa(),G=Qa(),Ge=Qa(),Jo=Qa(),In=Qa();function Qa(){return 2**++TG}const Mv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:Ct,commaOrSpaceSeparated:In,commaSeparated:Jo,number:G,overloadedBoolean:Lv,spaceSeparated:Ge},Symbol.toStringTag,{value:"Module"})),og=Object.keys(Mv);class nw extends On{constructor(t,n,r,s){let i=-1;if(super(t,n),rS(this,"space",s),typeof r=="number")for(;++i<og.length;){const a=og[i];rS(this,og[i],(r&Mv[a])===Mv[a])}}}nw.prototype.defined=!0;function rS(e,t,n){n&&(e[t]=n)}function Ll(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new nw(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Dv(r)]=r,n[Dv(i.attribute)]=r}return new Ju(t,n,e.space)}const fR=Ll({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:Ge,ariaCurrent:null,ariaDescribedBy:Ge,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:Ge,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:Ge,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ge,ariaLevel:G,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:Ge,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:Ge,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Ct,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function pR(e,t){return t in e?e[t]:t}function mR(e,t){return pR(e,t.toLowerCase())}const AG=Ll({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jo,acceptCharset:Ge,accessKey:Ge,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:Ge,autoFocus:Pe,autoPlay:Pe,blocking:Ge,capture:null,charSet:null,checked:Pe,cite:null,className:Ge,cols:G,colSpan:null,content:null,contentEditable:Ct,controls:Pe,controlsList:Ge,coords:G|Jo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Lv,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:Ge,height:G,hidden:Lv,high:G,href:null,hrefLang:null,htmlFor:Ge,httpEquiv:Ge,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:Ge,itemRef:Ge,itemScope:Pe,itemType:Ge,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxCl
464ick: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:G,pattern:null,ping:Ge,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:Ge,required:Pe,reversed:Pe,rows:G,rowSpan:G,sandbox:Ge,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Ct,src:null,
464srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:Ct,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ge,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,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:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Ct,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:G,security:null,unselectable:null},space:"html",transform:mR}),PG=Ll({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",colorRendering:"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
464-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:In,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:Ge,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:Jo,g2:Jo,glyphName:Jo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,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:G,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,on
vendor: 4,817 bytes, lines 464-465
464Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ge,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pR}),gR=Ll({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),yR=Ll({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mR}),vR=Ll({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jG={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"},NG=/[A-Z]/g,sS=/-[a-z]/g,RG=/^data[-\w.:]+$/i;function OG(e,t){const n=Dv(t);let r=t,s=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RG.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(sS,DG);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!sS.test(i)){let a=i.replace(NG,IG);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=nw}return new s(r,t)}function IG(e){return"-"+e.toLowerCase()}function DG(e){return e.charAt(1).toUpperCase()}const LG=hR([fR,AG,gR,yR,vR],"html"),rw=hR([fR,PG,gR,yR,vR],"svg");function MG(e){return e.join(" ").trim()}var sw={},iS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$G=/\n/g,FG=/^\s*/,zG=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,BG=/^:\s*/,VG=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,UG=/^[;\s]*/,HG=/^\s+|\s+$/g,WG=`
465`,aS="/",oS="*",ya="",qG="comment",ZG="declaration";function GG(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 s(v){var x=v.match($G);x&&(n+=x.length);var w=v.lastIndexOf(WG);r=~w?v.length-w:r+v.length}function i(){var v={line:n,column:r};return function(x){return x.position=new a(v),c(),x}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(v){var x=new Error(t.source+":"+n+":"+r+": "+v);if(x.reason=v,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function l(v){var x=v.exec(e);if(x){var w=x[0];return s(w),e=e.slice(w.length),x}}function c(){l(FG)}function u(v){var x;for(v=v||[];x=d();)x!==!1&&v.push(x);return v}function d(){var v=i();if(!(aS!=e.charAt(0)||oS!=e.charAt(1))){for(var x=2;ya!=e.charAt(x)&&(oS!=e.charAt(x)||aS!=e.charAt(x+1));)++x;if(x+=2,ya===e.charAt(x-1))return o("End of comment missing");var w=e.slice(2,x-2);
465return r+=2,s(w),e=e.slice(x),r+=2,v({type:qG,comment:w})}}function p(){var v=i(),x=l(zG);if(x){if(d(),!l(BG))return o("property missing ':'");var w=l(VG),g=v({type:ZG,property:lS(x[0].replace(iS,ya)),value:w?lS(w[0].replace(iS,ya)):ya});return l(UG),g}}function f(){var v=[];u(v);for(var x;x=p();)x!==!1&&(v.push(x),u(v));return v}return c(),f()}function lS(e){return e?e.replace(HG,ya):ya}var KG=GG,YG=Ih&&Ih.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sw,"__esModule",{value:!0});sw.default=QG;const JG=YG(KG);function QG(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,JG.default)(e),s=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:o}=i;s?t(a,o,i):o&&(n=n||{},n[a]=o)}),n}var Up={};Object.defineProperty(Up,"__esModule",{value:!0});Up.camelCase=void 0;var XG=/^--[a-zA-Z0-9_-]+$/,eK=/-([a-z])/g,tK=/^[^-]+$/,nK=/^-(webkit|moz|ms|o|khtml)-/,rK=/^-(ms)-/,sK=function(e){return!e||tK.test(e)||XG.test(e)},iK=function(e,t){return t.toUpperCase()},cS=function(e,t){return"".concat(t,"-")},aK=function(e,t){return t===void 0&&(t={}),sK(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(rK,cS):e=e.replace(nK,cS),e.replace(eK,iK))};Up.camelCase=aK;var oK=Ih&&Ih.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lK=oK(sw),cK=Up;function $v(e,t){var n={};return!e||typeof e!="string"||(0,lK.default)(e,function(r,s){r&&s&&(n[(0,cK.camelCase)(r,t)]=s)}),n}$v.default=$v;var uK=$v;const dK=Qi(uK),xR=wR("end"),iw=wR("start");function wR(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 hK(e){const t=iw(e),n=xR(e);if(t&&n)return{start:t,end:n}}function Fc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uS(e.position):"start"in e||"end"in e?uS(e):"line"in e||"column"in e?Fv(e):""}function Fv(e){return dS(e&&e.line)+":"+dS(e&&e.column)}function uS(e){return Fv(e&&e.start)+"-"+Fv(e&&e.end)}function dS(e){return e&&typeof e=="number"?e:1}
vendor: 1,921 bytes, line 465
465class nn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(a=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=Fc(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const aw={}.hasOwnProperty,fK=new Map,pK=/[A-Z]/g,mK=new Set(["table","tbody","thead","tfoot","tr"]),gK=new Set(["td","th"]),bR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yK(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=EK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 5,854 bytes, line 465
465if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=SK(n,t.jsx,t.jsxs)}const s={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"?rw:LG,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=_R(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function _R(e,t,n){if(t.type==="element")return vK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bK(e,t,n);if(t.type==="mdxjsEsm")return wK(e,t);if(t.type==="root")return _K(e,t,n);if(t.type==="text")return kK(e,t)}function vK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=rw,e.schema=s),e.ancestors.push(t);const i=SR(e,t.tagName,!1),a=CK(e,t);let o=lw(e,t);return mK.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!CG(l):!0})),kR(e,a,i,t),ow(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function xK(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)}Tu(e,t.position)}function wK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tu(e,t.position)}function bK(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=rw,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:SR(e,t.name,!0),a=TK(e,t),o=lw(e,t);return kR(e,a,i,t),ow(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function _K(e,t,n){const r={};return ow(r,lw(e,t)),e.create(t,e.Fragment,r,n)}function kK(e,t){return t.value}function kR(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ow(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function SK(e,t,n){return r;function r(s,i,a,o){const c=Array.isArray(a.children)?n:t;return o?c(i,a,o):c(i,a)}}function EK(e,t){return n;function n(r,s,i,a){const o=Array.isArray(i.children),l=iw(r);return t(s,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function CK(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&aw.call(t.properties,s)){const i=AK(e,s,t.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&gK.has(t.tagName)?r=o:n[a]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function TK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Tu(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else Tu(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function lw(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:fK;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=s.get(l)||0;a=l+"-"+c,s.set(l,c+1)}}const o=_R(e,i,a);o!==void 0&&n.push(o)}return n}function AK(e,t,n){const r=OG(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bG(n):MG(n)),r.property==="style"){let s=typeof n=="object"?n:PK(e,String(n));return e.stylePropertyNameCase==="css"&&(s=jK(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?jG[r.property]||r.property:r.attribute,n]}}function PK(e,t){try{return dK(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new nn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=bR+"#cannot-parse-style-attribute",s}}function SR(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,a;for(;++i<s.length;){const o=tS(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=a}else r=tS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return aw.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tu(e)}function Tu(e,t){const n=new nn("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=bR+"#cannot-handle-mdx-estrees-without-createevaluater",n}function jK(e){const t={};let n;for(n in e)aw.call(e,n)&&(t[NK(n)]=e[n]);return t}function NK(e){let t=e.replace(pK,RK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RK(e){return"-"+e.toLowerCase()}const lg={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"]},OK={};function IK(e,t){const n=OK,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ER(e,r,s)}
vendor: 11,328 bytes, line 465
465function ER(e,t,n){if(DK(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 hS(e.children,t,n)}return Array.isArray(e)?hS(e,t,n):""}function hS(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=ER(e[s],t,n);return r.join("")}function DK(e){return!!(e&&typeof e=="object")}const fS=document.createElement("i");function cw(e){const t="&"+e+";";fS.innerHTML=t;const n=fS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xs(e,t,n,r){const s=e.length;let i=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function sr(e,t){return e.length>0?(xs(e,e.length,0,t),e):t}const pS={}.hasOwnProperty;function LK(e){const t={};let n=-1;for(;++n<e.length;)MK(t,e[n]);return t}function MK(e,t){let n;for(n in t){const s=(pS.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){pS.call(s,a)||(s[a]=[]);const o=i[a];$K(s[a],Array.isArray(o)?o:o?[o]:[])}}}function $K(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xs(e,0,0,r)}function CR(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 Qo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const us=na(/[A-Za-z]/),Fn=na(/[\dA-Za-z]/),FK=na(/[#-'*+\--9=?A-Z^-~]/);function zv(e){return e!==null&&(e<32||e===127)}const Bv=na(/\d/),zK=na(/[\dA-Fa-f]/),BK=na(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function jn(e){return e!==null&&(e<0||e===32)}function $e(e){return e===-2||e===-1||e===32}const VK=na(new RegExp("\\p{P}|\\p{S}","u")),UK=na(/\s/);function na(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ml(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Fn(e.charCodeAt(n+1))&&Fn(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Ye(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return $e(l)?(e.enter(n),o(l)):t(l)}function o(l){return $e(l)&&i++<s?(e.consume(l),o):(e.exit(n),t(l))}}const HK={tokenize:WK};function WK(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ye(e,t,"linePrefix")}function s(o){return e.enter("paragraph"),i(o)}function i(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ke(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),a)}}const qK={tokenize:ZK},mS={tokenize:GK};function ZK(e){const t=this,n=[];let r=0,s,i,a;return o;function o(m){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,l,c)(m)}return c(m)}function l(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&y();const _=t.events.length;let k=_,S;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){S=t.events[k][1].end;break}g(r);let E=_;for(;E<t.events.length;)t.events[E][1].end={...S},E++;return xs(t.events,k+1,0,t.events.slice(_)),t.events.length=E,c(m)}return o(m)}function c(m){if(r===n.length){if(!s)return p(m);if(s.currentConstruct&&s.currentConstruct.concrete)return v(m);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mS,u,d)(m)}function u(m){return s&&y(),g(r),p(m)}function d(m){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(m)}function p(m){return t.containerState={},e.attempt(mS,f,v)(m)}function f(m){return r++,n.push([t.currentConstruct,t.containerState]),p(m)}function v(m){if(m===null){s&&y(),g(0),e.consume(m);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),x(m)}function x(m){if(m===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(m);return}return ke(m)?(e.consume(m),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(m),x)}function w(m,_){const k=t.sliceStream(m);if(_&&k.push(null),m.previous=i,i&&(i.next=m),i=m,s.defineSkip(m.start),s.write(k),t.parser.lazy[m.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<a&&(!s.events[S][1].end||s.events[S][1].end.offset>a))return;const E=t.events.length;let P=E,j,R;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(j){R=t.events[P][1].end;break}j=!0}for(g(r),S=E;S<t.events.length;)t.events[S][1].end={...R},S++;xs(t.events,P+1,0,t.events.slice(E)),t.events.length=S}}function g(m){let _=n.length;for(;_-- >m;){const k=n[_];t.containerState=k[1],k[0].exit.call(t,e)}n.length=m}function y(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function GK(e,t,n){return Ye(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gS(e){if(e===null||jn(e)||UK(e))return 1;if(VK(e))return 2}function uw(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Vv={name:"attention",resolveAll:KK,tokenize:YK};function KK(e,t){let n=-1,r,s,i,a,o,l,c,u;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},p={...e[n][1].start};yS(d,-l),yS(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=sr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sr(c,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=sr(c,uw(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sr(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=sr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,xs(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function YK(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=gS(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===i)return e.consume(l),o;const c=e.exit("attentionSequence"),u=gS(l),d=!u||u===2&&s||n.includes(l),p=!s||s===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(s||!p)),c._close=!!(i===42?p:p&&(u||!d)),t(l)}}function yS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JK={name:"autolink",tokenize:QK};function QK(e,t,n){let r=0;return s;function s(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return us(f)?(e.consume(f),a):f===64?n(f):c(f)}function a(f){return f===43||f===45||f===46||Fn(f)?(r=1,o(f)):c(f)}function o(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Fn(f))&&r++<32?(e.consume(f),o):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zv(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):FK(f)?(e.consume(f),c):n(f)}function u(f){return Fn(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Fn(f))&&r++<63){const v=f===45?p:d;return e.consume(f),v}return n(f)}}const Hp={partial:!0,tokenize:XK};function XK(e,t,n){return r;function r(i){return $e(i)?Ye(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||ke(i)?t(i):n(i)}}const TR={continuation:{tokenize:tY},exit:nY,name:"blockQuote",tokenize:eY};function eY(e,t,n){const r=this;return s;function s(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return $e(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function tY(e,t,n){const r=this;return s;function s(a){return $e(a)?Ye(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(TR,t,n)(a)}}function nY(e){e.exit("blockQuote")}const AR={name:"characterEscape",tokenize:rY};function rY(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return BK(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const PR={name:"characterReference",tokenize:sY};function sY(e,t,n){const r=this;let s=0,i,a;return o;function o(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"),c):(e.enter("characterReferenceValue"),i=31,a=Fn,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=zK,u):(e.enter("characterReferenceValue"),i=7,a=Bv,u(d))}function u(d){if(d===59&&s){const p=e.exit("characterReferenceValue");return a===Fn&&!cw(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&s++<i?(e.consume(d),u):n(d)}}const vS={partial:!0,tokenize:aY},xS={concrete:!0,name:"codeFenced",tokenize:iY};function iY(e,t,n){const r=this,s={partial:!0,tokenize:k};let i=0,a=0,o;return l;function l(S){return c(S)}function c(S){const E=r.events[r.events.length-1];return i=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,o=S,e.enter("co
465deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===o?(a++,e.consume(S),u):a<3?n(S):(e.exit("codeFencedFenceSequence"),$e(S)?Ye(e,d,"whitespace")(S):d(S))}function d(S){return S===null||ke(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(vS,x,_)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||ke(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):$e(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,f,"whitespace")(S)):S===96&&S===o?n(S):(e.consume(S),p)}function f(S){return S===null||ke(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===null||ke(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===o?n(S):(e.consume(S),v)}function x(S){return e.attempt(s,_,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return i>0&&$e(S)?Ye(e,y,"linePrefix",i+1)(S):y(S)}function y(S){return S===null||ke(S)?e.check(vS,x,_)(S):(e.enter("codeFlowValue"),m(S))}function m(S){return S===null||ke(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),m)}function _(S){return e.exit("codeFenced"),t(S)}function k(S,E,P){let j=0;return R;function R(q){return S.enter("lineEnding"),S.consume(q),S.exit("lineEnding"),M}function M(q){return S.enter("codeFencedFence"),$e(q)?Ye(S,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):O(q)}function O(q){return q===o?(S.enter("codeFencedFenceSequence"),W(q)):P(q)}function W(q){return q===o?(j++,S.consume(q),W):j>=a?(S.exit("codeFencedFenceSequence"),$e(q)?Ye(S,F,"whitespace")(q):F(q)):P(q)}function F(q){return q===null||ke(q)?(S.exit("codeFencedFence"),E(q)):P(q)}}}function aY(e,t,n){const r=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const cg={name:"codeIndented",tokenize:lY},oY={partial:!0,tokenize:cY};function lY(e,t,n){const r=this;return s;function s(c){return e.enter("codeIndented"),Ye(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):ke(c)?e.attempt(oY,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||ke(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function cY(e,t,n){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?n(a):ke(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Ye(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):ke(a)?s(a):n(a)}}const uY={name:"codeText",previous:hY,resolve:dY,tokenize:fY};function dY(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function hY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fY(e,t,n){let r=0,s,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(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?(i=e.enter("codeTextSequence"),s=0,u(d)):ke(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ke(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),s++,u):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class pY{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 s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&sc(this.left,r),i.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),sc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sc(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);sc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sc(this.left,n.reverse())}}}function sc(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 jR(e){const t={};let n=-1,r,s,i,a,o,l,c;const u=new pY(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,mY(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(u.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(r[1].end={...u.get(s)[1].start},o=u.slice(s,n),o.unshift(r),u.splice(s,n-s+1,o))}}return xs(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function mY(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let u,d,p=-1,f=n,v=0,x=0;const w=[x];for(;f;){for(;e.get(++s)[1]!==f;);i.push(s),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSki
vendor: 22,806 bytes, line 465
465p(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(x=p+1,w.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),p=w.length;p--;){const g=o.slice(w[p],w[p+1]),y=i.pop();l.push([y,y+g.length-1]),e.splice(y,2,g)}for(l.reverse(),p=-1;++p<l.length;)c[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return c}const gY={resolve:vY,tokenize:xY},yY={partial:!0,tokenize:wY};function vY(e){return jR(e),e}function xY(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(o)}function s(o){return o===null?i(o):ke(o)?e.check(yY,a,i)(o):(e.consume(o),s)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function wY(e,t,n){const r=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ye(e,i,"linePrefix")}function i(a){if(a===null||ke(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function NR(e,t,n,r,s,i,a,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(g),e.exit(i),p):g===null||g===32||g===41||zv(g)?n(g):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(g))}function p(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(o),p(g)):g===null||g===60||ke(g)?n(g):(e.consume(g),g===92?v:f)}function v(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function x(g){return!u&&(g===null||g===41||jn(g))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(g)):u<c&&g===40?(e.consume(g),u++,x):g===41?(e.consume(g),u--,x):g===null||g===32||g===40||zv(g)?n(g):(e.consume(g),g===92?w:x)}function w(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function RR(e,t,n,r,s,i){const a=this;let o=0,l;return c;function c(f){return e.enter(r),e.enter(s),e.consume(f),e.exit(s),e.enter(i),u}function u(f){return o>999||f===null||f===91||f===93&&!l||f===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(i),e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):ke(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||ke(f)||o++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!$e(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function OR(e,t,n,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===a?(e.exit(i),l(a)):p===null?n(p):ke(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ye(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||ke(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function zc(e,t){let n;return r;function r(s){return ke(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):$e(s)?Ye(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const bY={name:"definition",tokenize:kY},_Y={partial:!0,tokenize:SY};function kY(e,t,n){const r=this;let s;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return RR.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return s=Qo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return jn(f)?zc(e,c)(f):c(f)}function c(f){return NR(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(_Y,d,d)(f)}function d(f){return $e(f)?Ye(e,p,"whitespace")(f):p(f)}function p(f){return f===null||ke(f)?(e.exit("definition"),r.parser.defined.push(s),t(f)):n(f)}}function SY(e,t,n){return r;function r(o){return jn(o)?zc(e,s)(o):n(o)}function s(o){return OR(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return $e(o)?Ye(e,a,"whitespace")(o):a(o)}function a(o){return o===null||ke(o)?t(o):n(o)}}const EY={name:"hardBreakEscape",tokenize:CY};function CY(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return ke(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const TY={name:"headingAtx",resolve:AY,tokenize:PY};function AY(e,t){let n=e.length-2,r=3,s,i;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&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xs(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function PY(e,t,n){let r=0;return s;function s(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||jn(u)?(e.exit("atxHeadingSequence"),o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||ke(u)?(e.exit("atxHeading"),t(u)):$e(u)?Ye(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||jn(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const jY=["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"],wS=["pre","script","style","textarea"],NY={concrete:!0,name:"htmlFlow",resolveTo:IY,tokenize:DY},RY={partial:!0,tokenize:MY},OY={partial:!0,tokenize:LY};function IY(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 DY(e,t,n){const r=this;let s,i,a,o,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),i=!0,x):T===63?(e.consume(T),s=3,r.interrupt?t:C):us(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function p(T){return T===45?(e.consume(T),s=2,f):T===91?(e.consume(T),s=5,o=0,v):us(T)?(e.consume(T),s=4,r.interrupt?t:C):n(T)}function f(T){return T===45?(e.consume(T),r.interrupt?t:C):n(T)}function v(T){const L="CDATA[";return T===L.charCodeAt(o++)?(e.consume(T),o===L.length?r.interrupt?t:O:v):n(T)}function x(T){return us(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||jn(T)){const L=T===47,_e=a.toLowerCase();return!L&&!i&&wS.includes(_e)?(s=1,r.interrupt?t(T):O(T)):jY.includes(a.toLowerCase())?(s=6,L?(e.consume(T),g):r.interrupt?t(T):O(T)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):i?y(T):m(T))}return T===45||Fn(T)?(e.consume(T),a+=String.fromCharCode(T),w):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:O):n(T)}function y(T){return $e(T)?(e.consume(T),y):R(T)}function m(T){return T===47?(e.consume(T),R):T===58||T===95||us(T)?(e.consume(T),_):$e(T)?(e.consume(T),m):R(T)}function _(T){return T===45||T===46||T===58||T===95||Fn(T)?(e.consume(T),_):k(T)}function k(T){return T===61?(e.consume(T),S):$e(T)?(e.consume(T),k):m(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,E):$e(T)?(e.consume(T),S):P(T)}function E(T){return T===l?(e.consume(T),l=null,j):T===null||ke(T)?n(T):(e.consume(T),E)}function P(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||jn(T)?k(T):(e.consume(T),P)}function j(T){return T===47||T===62||$e(T)?m(T):n(T)}function R(T){return T===62?(e.consume(T),M):n(T)}function M(T){return T===null||ke(T)?O(T):$e(T)?(e.consume(T),M):n(T)}function O(T){return T===45&&s===2?(e.consume(T),K):T===60&&s===1?(e.consume(T),re):T===62&&s===4?(e.consume(T),le):T===63&&s===3?(e.consume(T),C):T===93&&s===5?(e.consume(T),$):ke(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(RY,oe,W)(T)):T===null||ke(T)?(e.exit("htmlFlowData"),W(T)):(e.consume(T),O)}function W(T){return e.check(OY,F,oe)(T)}function F(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),q}function q(T){return T===null||ke(T)?W(T):(e.enter("htmlFlowData"),O(T))}function K(T){return T===45?(e.consume(T),C):O(T)}function re(T){return T===47?(e.consume(T),a="",D):O(T)}function D(T){if(T===62){const L=a.toLowerCase();return wS.includes(L)?(e.consume(T),le):O(T)}return us(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),D):O(T)}function $(T){return T===93?(e.consume(T),C):O(T)}function C(T){return T===62?(e.consume(T),le):T===45&&s===2?(e.consume(T),C):O(T)}function le(T){return T===null||ke(T)?(e.exit("htmlFlowData"),oe(T)):(e.consume(T),le)}function oe(T){return e.exit("htmlFlow"),t(T)}}function LY(e,t,n){const r=this;return s;function s(a){return ke(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function MY(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hp,t,n)}}const $Y={name:"htmlText",tokenize:FY};function FY(e,t,n){const r=this;let s,i,a;return o;function o(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),l}function l(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),k):C===63?(e.consume(C),m):us(C)?(e.consume(C),P):n(C)}function c(C){return C===45?(e.consume(C),u):C===91?(e.consume(C),i=0,v):us(C)?(e.consume(C),y):n(C)}function u(C){return C===45?(e.consume(C),f):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),p):ke(C)?(a=d,re(C)):(e.consume(C),d)}function p(C){return C===45?(e.consume(C),f):d(C)}function f(C){return C===62?K(C):C===45?p(C):d(C)}function v(C){const le="CDATA[";return C===le.charCodeAt(i++)?(e.consume(C),i===le.length?x:v):n(C)}function x(C){return C===null?n(C):C===93?(e.consume(C),w):ke(C)?(a=x,re(C)):(e.consume(C),x)}function w(C){return C===93?(e.consume(C),g):x(C)}function g(C){return C===62?K(C):C===93?(e.consume(C),g):x(C)}function y(C){return C===null||C===62?K(C):ke(C)?(a=y,re(C)):(e.consume(C),y)}function m(C){return C===null?n(C):C===63?(e.consume(C),_):ke(C)?(a=m,re(C)):(e.consume(C),m)}function _(C){return C===62?K(C):m(C)}function k(C){return us(C)?(e.consume(C),S):n(C)}function S(C){return C===45||Fn(C)?(e.consume(C),S):E(C)}function E(C){return ke(C)?(a=E,re(C)):$e(C)?(e.consume(C),E):K(C)}function P(C){return C===45||Fn(C)?(e.consume(C),P):C===47||C===62||jn(C)?j(C):n(C)}function j(C){return C===47?(e.consume(C),K):C===58||C===95||us(C)?(e.consume(C),R):ke(C)?(a=j,re(C)):$e(C)?(e.consume(C),j):K(C)}function R(C){return C===45||C===46||C===58||C===95||Fn(C)?(e.consume(C),R):M(C)}function M(C){return C===61?(e.consume(C),O):ke(C)?(a=M,re(C)):$e(C)?(e.consume(C),M):j(C)}function O(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,W):ke(C)?(a=O,re(C)):$e(C)?(e.consume(C),O):(e.consume(C),F)}function W(C){return C===s?(e.consume(C),s=void 0,q):C===null?n(C):ke(C)?(a=W,re(C)):(e.consume(C),W)}function F(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||jn(C)?j(C):(e.consume(C),F)}function q(C){return C===47||C===62||jn(C)?j(C):n(C)}function K(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function re(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),D}function D(C){return $e(C)?Ye(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):$(C)}function $(C){return e.enter("htmlTextData"),a(C)}}const dw={name:"labelEnd",resolveAll:UY,resolveTo:HY,tokenize:WY},zY={tokenize:qY},BY={tokenize:ZY},VY={tokenize:GY};function UY(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&xs(e,0,e.length,n),e}function HY(e,t){let n=e.length,r=0,s,i,a,o;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=sr(o,e.slice(i+1,i+r+3)),o=sr(o,[["enter",u,t]]),o=sr(o,uw(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=sr(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=sr(o,e.slice(a+1)),o=sr(o,[["exit",l,t]]),xs(e,i,e.length,o),e}function WY(e,t,n){const r=this;let s=r.events.length,i,a;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return o;function o(p){return i?i._inactive?d(p):(a=r.parser.defined.includes(Qo(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(zY,u,a?u:d)(p):p===91?e.attempt(BY,u,a?c:d)(p):a?u(p):d(p)}function c(p){return e.attempt(VY,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,n(p)}}function qY(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),s}function s(d){return jn(d)?zc(e,i)(d):i(d)}function i(d){return d===41?u(d):NR(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return jn(d)?zc(e,l)(d):u(d)}function o(d){return n(d)}function l(d){return d===34||d===39||d===40?OR(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return jn(d)?zc(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function ZY(e,t,n){const r=this;return s;function s(o){return RR.call(r,e,i,a,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(Qo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function GY(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const KY={name:"labelStartImage",resolveAll:dw.resolveAll,tokenize:YY};function YY(e,t,n){const r=this;return s;function s(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const JY={name:"labelStartLink",resolveAll:dw.resolveAll,tokenize:QY};function QY(e,t,n){const r=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ug={name:"lineEnding",tokenize:XY};function XY(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ye(e,t,"linePrefix")}}const Eh={name:"thematicBreak",tokenize:eJ};function eJ(e,t,n){let r=0,s;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return s=c,o(c)}function o(c){return c===s?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ke(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===s?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),$e(c)?Ye(e,o,"whitespace")(c):o(c))}}const bn={continuation:{tokenize:sJ},exit:aJ,name:"list",tokenize:rJ},tJ={partial:!0,tokenize:oJ},nJ={partial:!0,tokenize:iJ};function rJ(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(f){const v=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Bv(f)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Eh,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Bv(f)&&++a<10?(e.consume(f),l):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Hp,r.interrupt?n:u,e.attempt(tJ,p,d))}function u(f){return r.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return $e(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function sJ(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Hp,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ye(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!$e(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nJ,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ye(e,e.attempt(bn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function iJ(e,t,n){const r=this;return Ye(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function aJ(e){e.exit(this.containerState.type)}function oJ(e,t,n){const r=this;return Ye(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!$e(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const bS={name:"setextUnderline",resolveTo:lJ,tokenize:cJ};function lJ(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function cJ(e,t,n){const r=this;let s;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),s=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===s?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),$e(c)?Ye(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ke(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const uJ={tokenize:dJ};function dJ(e){const t=this,n=e.attempt(Hp,r,e.attempt(this.parser.constructs.flowInitial,s,Ye(e,e.attempt(this.parser.constructs.flow,s,e.attempt(gY,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hJ={resolveAll:DR()},fJ=IR("string"),pJ=IR("text");function IR(e){return{resolveAll:DR(e==="text"?mJ:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,a,o);return a;function a(u){return c(u)?i(u):o(u)}function o(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=s[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function DR(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function mJ(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],s=t.sliceStream(r);let i=s.length,a=-1,o=0,l;for(;i--;){const c=s[i];if(typeof c=="string"){for(a=c.length;
vendor: 5,565 bytes, lines 465-467
465c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const gJ={42:bn,43:bn,45:bn,48:bn,49:bn,50:bn,51:bn,52:bn,53:bn,54:bn,55:bn,56:bn,57:bn,62:TR},yJ={91:bY},vJ={[-2]:cg,[-1]:cg,32:cg},xJ={35:TY,42:Eh,45:[bS,Eh],60:NY,61:bS,95:Eh,96:xS,126:xS},wJ={38:PR,92:AR},bJ={[-5]:ug,[-4]:ug,[-3]:ug,33:KY,38:PR,42:Vv,60:[JK,$Y],91:JY,92:[EY,AR],93:dw,95:Vv,96:uY},_J={null:[Vv,hJ]},kJ={null:[42,95]},SJ={null:[]},EJ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kJ,contentInitial:yJ,disable:SJ,document:gJ,flow:xJ,flowInitial:vJ,insideSpan:_J,string:wJ,text:bJ},Symbol.toStringTag,{value:"Module"}));function CJ(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let a=[],o=[];const l={attempt:E(k),check:E(S),consume:y,enter:m,exit:_,interrupt:E(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:v,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(M){return a=sr(a,M),w(),a[a.length-1]!==null?[]:(P(t,0),c.events=uw(i,c.events,c),c.events)}function p(M,O){return AJ(f(M),O)}function f(M){return TJ(a,M)}function v(){const{_bufferIndex:M,_index:O,line:W,column:F,offset:q}=r;return{_bufferIndex:M,_index:O,line:W,column:F,offset:q}}function x(M){s[M.line]=M.column,R()}function w(){let M;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<O.length;)g(O.charCodeAt(r._bufferIndex));else g(O)}}function g(M){u=u(M)}function y(M){ke(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,R()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function m(M,O){const W=O||{};return W.type=M,W.start=v(),c.events.push(["enter",W,c]),o.push(W),W}function _(M){const O=o.pop();return O.end=v(),c.events.push(["exit",O,c]),O}function k(M,O){P(M,O.from)}function S(M,O){O.restore()}function E(M,O){return W;function W(F,q,K){let re,D,$,C;return Array.isArray(F)?oe(F):"tokenize"in F?oe([F]):le(F);function le(ie){return ye;function ye(gt){const bt=gt!==null&&ie[gt],Lt=gt!==null&&ie.null,rn=[...Array.isArray(bt)?bt:bt?[bt]:[],...Array.isArray(Lt)?Lt:Lt?[Lt]:[]];return oe(rn)(gt)}}function oe(ie){return re=ie,D=0,ie.length===0?K:T(ie[D])}function T(ie){return ye;function ye(gt){return C=j(),$=ie,ie.partial||(c.currentConstruct=ie),ie.name&&c.parser.constructs.disable.null.includes(ie.name)?_e():ie.tokenize.call(O?Object.assign(Object.create(c),O):c,l,L,_e)(gt)}}function L(ie){return M($,C),q}function _e(ie){return C.restore(),++D<re.length?T(re[D]):K}}}function P(M,O){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&xs(c.events,O,c.events.length-O,M.resolve(c.events.slice(O),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function j(){const M=v(),O=c.previous,W=c.currentConstruct,F=c.events.length,q=Array.from(o);return{from:F,restore:K};function K(){r=M,c.previous=O,c.currentConstruct=W,c.events.length=F,o=q,R()}}function R(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function TJ(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(r,i)];else{if(a=e.slice(n,s),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function AJ(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
466`;break}case-3:{a=`\r
467`;break}case-2:{a=t?" ":"	";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(i)}s=i===-2,r.push(a)}return r.join("")}function PJ(e){const r={constructs:LK([EJ,...(e||{}).extensions||[]]),content:s(HK),defined:[],document:s(qK),flow:s(uJ),lazy:{},string:s(fJ),text:s(pJ)};return r;function s(i){return a;function a(o){return CJ(r,i,o)}}}function jJ(e){for(;!jR(e););return e}const _S=/[\0\t\n\r]/g;function NJ(){let e=1,t="",n=!0,r;return s;function s(i,a,o){const l=[];let c,u,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(_S.lastIndex=d,c=_S.exec(i),p=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(p),!c){t=i.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(i.slice(d,p)),e+=p-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const RJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function OJ(e){return e.replace(RJ,IJ)}function IJ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return CR(n.slice(i?2:1),i?16:10)}return cw(n)||e}const LR={}.hasOwnProperty;function DJ(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),LJ(n)(jJ(PJ(n).document().write(NJ()(e,t,!0))
vendor: 10,182 bytes, line 467
467))}function LJ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Kn),autolinkProtocol:j,autolinkEmail:j,atxHeading:i(Ss),blockQuote:i(Lt),characterEscape:j,characterReference:j,codeFenced:i(rn),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(rn,a),codeText:i(pr,a),codeTextData:j,data:j,codeFlowValue:j,definition:i(Gn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ks),hardBreakEscape:i(Es),hardBreakTrailing:i(Es),htmlFlow:i(Js,a),htmlFlowData:j,htmlText:i(Js,a),htmlTextData:j,image:i(Qs),label:a,link:i(Kn),listItem:i(I),listItemValue:p,listOrdered:i(A,d),listUnordered:i(A),paragraph:i(B),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ss),strong:i(te),thematicBreak:i(J)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:bt,autolinkProtocol:gt,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ie,characterReference:ye,codeFenced:l(w),codeFencedFence:x,codeFencedFenceInfo:f,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:l(g),codeText:l(q),codeTextData:R,data:R,definition:l(),definitionDestinationString:_,definitionLabelString:y,definitionTitleString:m,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(W),htmlFlowData:R,htmlText:l(F),htmlTextData:R,image:l(re),label:$,labelText:D,lineEnding:M,link:l(K),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:L,resourceDestinationString:C,resourceTitleString:le,resource:oe,setextHeading:l(P),setextHeadingLineSequence:E,setextHeadingText:S,strong:l(),thematicBreak:l()}};MR(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let U={type:"root",children:[]};const se={stack:[U],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:u,data:n},we=[];let Ne=-1;for(;++Ne<N.length;)if(N[Ne][1].type==="listOrdered"||N[Ne][1].type==="listUnordered")if(N[Ne][0]==="enter")we.push(Ne);else{const yt=we.pop();Ne=s(N,yt,Ne)}for(Ne=-1;++Ne<N.length;){const yt=t[N[Ne][0]];LR.call(yt,N[Ne][1].type)&&yt[N[Ne][1].type].call(Object.assign({sliceSerialize:N[Ne][2].sliceSerialize},se),N[Ne][1])}if(se.tokenStack.length>0){const yt=se.tokenStack[se.tokenStack.length-1];(yt[1]||kS).call(se,void 0,yt[0])}for(U.position={start:ii(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:ii(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<t.transforms.length;)U=t.transforms[Ne](U)||U;return U}function s(N,U,se){let we=U-1,Ne=-1,yt=!1,Yn,Bt,Kt,qr;for(;++we<=se;){const ct=N[we];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?Ne++:Ne--,qr=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(Yn&&!qr&&!Ne&&!Kt&&(Kt=we),qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qr=void 0}if(!Ne&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||Ne===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(Yn){let Zr=we;for(Bt=void 0;Zr--;){const vn=N[Zr];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;Bt&&(N[Bt][1].type="lineEndingBlank",yt=!0),vn[1].type="lineEnding",Bt=Zr}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}Kt&&(!Bt||Kt<Bt)&&(Yn._spread=!0),Yn.end=Object.assign({},Bt?N[Bt][1].start:ct[1].end),N.splice(Bt||we,0,["exit",Yn,ct[2]]),we++,se++}if(ct[1].type==="listItemPrefix"){const Zr={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};Yn=Zr,N.splice(we,0,["enter",Zr,ct[2]]),we++,se++,Kt=void 0,qr=!0}}}return N[U][1]._spread=yt,se}function i(N,U){return se;function se(we){o.call(this,N(we),we),U&&U.call(this,we)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(N,U,se){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([U,se||void 0]),N.position={start:ii(U.start),end:void 0}}function l(N){return U;function U(se){N&&N.call(this,se),c.call(this,se)}}function c(N,U){const se=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==N.type&&(U?U.call(this,N,we[0]):(we[1]||kS).call(this,N,we[0]));else throw new Error("Cannot close `"+N.type+"` ("+Fc({start:N.start,end:N.end})+"): it’s not open");se.position.end=ii(N.end)}function u(){return IK(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(N){if(this.data.expectingFirstListItemValue){const U=this.stack[this.stack.length-2];U.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function f(){const N=this.resume(),U=this.stack[this.stack.length-1];U.lang=N}function v(){const N=this.resume(),U=this.stack[this.stack.length-1];U.meta=N}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const N=this.resume(),U=this.stack[this.stack.length-1];U.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const N=this.resume(),U=this.stack[this.stack.length-1];U.value=N.replace(/(\r?\n|\r)$/g,"")}function y(N){const U=this.resume(),se=this.stack[this.stack.length-1];se.label=U,se.identifier=Qo(this.sliceSerialize(N)).toLowerCase()}function m(){const N=this.resume(),U=this.stack[this.stack.length-1];U.title=N}function _(){const N=this.resume(),U=this.stack[this.stack.length-1];U.url=N}function k(N){const U=this.stack[this.stack.length-1];if(!U.depth){const se=this.sliceSerialize(N).length;U.depth=se}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function E(N){const U=this.stack[this.stack.length-1];U.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function j(N){const se=this.stack[this.stack.length-1].children;let we=se[se.length-1];(!we||we.type!=="text")&&(we=ee(),we.position={start:ii(N.start),end:void 0},se.push(we)),this.stack.push(we)}function R(N){const U=this.stack.pop();U.value+=this.sliceSerialize(N),U.position.end=ii(N.end)}function M(N){const U=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=U.children[U.children.length-1];se.position.end=ii(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(U.type)&&(j.call(this,N),R.call(this,N))}function O(){this.data.atHardBreak=!0}function W(){const N=this.resume(),U=this.stack[this.stack.length-1];U.value=N}function F(){const N=this.resume(),U=this.stack[this.stack.length-1];U.value=N}function q(){const N=this.resume(),U=this.stack[this.stack.length-1];U.value=N}function K(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=U,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function re(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const U=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=U,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function D(N){const U=this.sliceSerialize(N),se=this.stack[this.stack.length-2];se.label=OJ(U),se.identifier=Qo(U).toLowerCase()}function $(){const N=this.stack[this.stack.length-1],U=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const we=N.children;se.children=we}else se.alt=U}function C(){const N=this.resume(),U=this.stack[this.stack.length-1];U.url=N}function le(){const N=this.resume(),U=this.stack[this.stack.length-1];U.title=N}function oe(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function L(N){const U=this.resume(),se=this.stack[this.stack.length-1];se.label=U,se.identifier=Qo(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function _e(N){this.data.characterReferenceType=N.type}function ie(N){const U=this.sliceSerialize(N),se=this.data.characterReferenceType;let we;se?(we=CR(U,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=cw(U);const Ne=this.stack[this.stack.length-1];Ne.value+=we}function ye(N){const U=this.stack.pop();U.position.end=ii(N.end)}function gt(N){R.call(this,N);const U=this.stack[this.stack.length-1];U.url=this.sliceSerialize(N)}function bt(N){R.call(this,N);const U=this.stack[this.stack.length-1];U.url="mailto:"+this.sliceSerialize(N)}function Lt(){return{type:"blockquote",children:[]}}function rn(){return{type:"code",lang:null,meta:null,value:""}}function pr(){return{type:"inlineCode",value:""}}function Gn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ks(){return{type:"emphasis",children:[]}}function Ss(){return{type:"heading",depth:0,children:[]}}function Es(){return{type:"break"}}function Js(){return{type:"html",value:""}}function Qs(){return{type:"image",title:null,url:"",alt:null}}function Kn(){return{type:"link",title:null,url:"",children:[]}}function A(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function I(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function B(){return{type:"paragraph",children:[]}}function te(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function J(){return{type:"thematicBreak"}}}function ii(e){return{line:e.line,column:e.column,offset:e.offset}}function MR(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?MR(e,r):MJ(e,r)}}function MJ(e,t){let n;for(n in t)if(LR.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 kS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fc({start:t.start,end:t.end}
vendor: 6,027 bytes, lines 467-471
467)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fc({start:t.start,end:t.end})+") is still open")}function $J(e){const t=this;t.parser=n;function n(r){return DJ(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function FJ(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 zJ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
468`}]}function BJ(e,t){const n=t.value?t.value+`
469`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function VJ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function UJ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HJ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ml(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function WJ(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 qJ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function $R(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 s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function ZJ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $R(e,t);const s={src:Ml(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function GJ(e,t){const n={src:Ml(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 KJ(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 YJ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $R(e,t);const s={href:Ml(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function JJ(e,t){const n={href:Ml(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 QJ(e,t,n){const r=e.all(t),s=n?XJ(n):FR(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(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:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const u=r[o];(s||o!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
470`}),u.type==="element"&&u.tagName==="p"&&!s?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(s||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
471`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function XJ(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=FR(n[r])}return t}function FR(e){const t=e.spread;return t??e.children.length>1}function eQ(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const a=r[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function tQ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nQ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rQ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sQ(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=iw(t.children[1]),l=xR(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}
vendor: 1,719 bytes, line 471
471function iQ(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const d=t.children[l],p={},f=a?a[l]:void 0;f&&(p.align=f);let v={type:"element",tagName:i,properties:p,children:[]};d&&(v.children=e.all(d),e.patch(d,v),v=e.applyData(d,v)),c.push(v)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function aQ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const SS=9,ES=32;function oQ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(CS(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(CS(t.slice(s),s>0,!1)),i.join("")}function CS(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===SS||i===ES;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===SS||i===ES;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function lQ(e,t){const n={type:"text",value:oQ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cQ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const uQ={blockquote:FJ,break:zJ,code:BJ,delete:VJ,emphasis:UJ,footnoteReference:HJ,heading:WJ,html:qJ,imageReference:ZJ,image:GJ,inlineCode:KJ,linkReference:YJ,link:JJ,listItem:QJ,list:eQ,paragraph:tQ,root:nQ,strong:rQ,table:sQ,tableCell:aQ,tableRow:iQ,text:lQ,thematicBreak:cQ,toml:Hd,yaml:Hd,definition:Hd,footnoteDefinition:Hd};function Hd(){}const zR=-1,Wp=0,Bc=1,$f=2,hw=3,fw=4,pw=5,mw=6,BR=7,VR=8,dQ=typeof self=="object"?self:globalThis,TS=(e,t)=>
vendor: 4,583 bytes, lines 471-472
471{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new dQ[e](t)},hQ=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=t[s];switch(i){case Wp:case zR:return n(a,s);case Bc:{const o=n([],s);for(const l of a)o.push(r(l));return o}case $f:{const o=n({},s);for(const[l,c]of a)o[r(l)]=r(c);return o}case hw:return n(new Date(a),s);case fw:{const{source:o,flags:l}=a;return n(new RegExp(o,l),s)}case pw:{const o=n(new Map,s);for(const[l,c]of a)o.set(r(l),r(c));return o}case mw:{const o=n(new Set,s);for(const l of a)o.add(r(l));return o}case BR:{const{name:o,message:l}=a;return n(TS(o,l),s)}case VR:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(TS(i,a),s)};return r},AS=e=>hQ(new Map,e)(0),fo="",{toString:fQ}={},{keys:pQ}=Object,ic=e=>{const t=typeof e;if(t!=="object"||!e)return[Wp,t];const n=fQ.call(e).slice(8,-1);switch(n){case"Array":return[Bc,fo];case"Object":return[$f,fo];case"Date":return[hw,fo];case"RegExp":return[fw,fo];case"Map":return[pw,fo];case"Set":return[mw,fo];case"DataView":return[Bc,n]}return n.includes("Array")?[Bc,n]:n.includes("Error")?[BR,n]:[$f,n]},Wd=([e,t])=>e===Wp&&(t==="function"||t==="symbol"),mQ=(e,t,n,r)=>{const s=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},i=a=>{if(n.has(a))return n.get(a);let[o,l]=ic(a);switch(o){case Wp:{let u=a;switch(l){case"bigint":o=VR,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return s([zR],a)}return s([o,u],a)}case Bc:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),s([l,[...p]],a)}const u=[],d=s([o,u],a);for(const p of a)u.push(i(p));return d}case $f:{if(l)switch(l){case"BigInt":return s([l,a.toString()],a);case"Boolean":case"Number":case"String":return s([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],d=s([o,u],a);for(const p of pQ(a))(e||!Wd(ic(a[p])))&&u.push([i(p),i(a[p])]);return d}case hw:return s([o,a.toISOString()],a);case fw:{const{source:u,flags:d}=a;return s([o,{source:u,flags:d}],a)}case pw:{const u=[],d=s([o,u],a);for(const[p,f]of a)(e||!(Wd(ic(p))||Wd(ic(f))))&&u.push([i(p),i(f)]);return d}case mw:{const u=[],d=s([o,u],a);for(const p of a)(e||!Wd(ic(p)))&&u.push(i(p));return d}}const{message:c}=a;return s([o,{name:l,message:c}],a)};return i},PS=(e,{json:t,lossy:n}={})=>{const r=[];return mQ(!(t||n),!!t,new Map,r)(e),r},Ff=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?AS(PS(e,t)):structuredClone(e):(e,t)=>AS(PS(e,t));function gQ(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 yQ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vQ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gQ,r=e.options.footnoteBackLabel||yQ,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),p=Ml(d.toLowerCase());let f=0;const v=[],x=e.footnoteCounts.get(d);for(;x!==void 0&&++f<=x;){v.length>0&&v.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,f);typeof y=="string"&&(y={type:"text",value:y}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const y=w.children[w.children.length-1];y&&y.type==="text"?y.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...v)}else u.push(...v);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(c,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ff(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
472`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
vendor: 19,820 bytes, lines 472-477
472,{type:"text",value:`
473`}]}}const UR=function(e){if(e==null)return _Q;if(typeof e=="function")return qp(e);if(typeof e=="object")return Array.isArray(e)?xQ(e):wQ(e);if(typeof e=="string")return bQ(e);throw new Error("Expected function, string, or object as test")};function xQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=UR(e[n]);return qp(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function wQ(e){const t=e;return qp(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function bQ(e){return qp(t);function t(n){return n&&n.type===e}}function qp(e){return t;function t(n,r,s){return!!(kQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function _Q(){return!0}function kQ(e){return e!==null&&typeof e=="object"&&"type"in e}const HR=[],SQ=!0,jS=!1,EQ="skip";function CQ(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=UR(s),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=HR,v,x,w;if((!t||i(l,c,u[u.length-1]||void 0))&&(f=TQ(n(l,u)),f[0]===jS))return f;if("children"in l&&l.children){const g=l;if(g.children&&f[0]!==EQ)for(x=(r?g.children.length:-1)+a,w=u.concat(g);x>-1&&x<g.children.length;){const y=g.children[x];if(v=o(y,x,w)(),v[0]===jS)return v;x=typeof v[1]=="number"?v[1]:x+a}}return f}}}function TQ(e){return Array.isArray(e)?e:typeof e=="number"?[SQ,e]:e==null?HR:[e]}function WR(e,t,n,r){let s,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,s=n):(i=t,a=n,s=r),CQ(e,i,o,s);function o(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const Uv={}.hasOwnProperty,AQ={};function PQ(e,t){const n=t||AQ,r=new Map,s=new Map,i=new Map,a={...uQ,...n.handlers},o={all:c,applyData:NQ,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:jQ,wrap:OQ};return WR(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:s,p=String(u.identifier).toUpperCase();d.has(p)||d.set(p,u)}}),o;function l(u,d){const p=u.type,f=o.handlers[p];if(Uv.call(o.handlers,p)&&f)return f(o,u,d);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in u){const{children:x,...w}=u,g=Ff(w);return g.children=o.all(u),g}return Ff(u)}return(o.options.unknownHandler||RQ)(o,u,d)}function c(u){const d=[];if("children"in u){const p=u.children;let f=-1;for(;++f<p.length;){const v=o.one(p[f],u);if(v){if(f&&p[f-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=NS(v.value)),!Array.isArray(v)&&v.type==="element")){const x=v.children[0];x&&x.type==="text"&&(x.value=NS(x.value))}Array.isArray(v)?d.push(...v):d.push(v)}}}return d}}function jQ(e,t){e.position&&(t.position=hK(e))}function NQ(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,Ff(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function RQ(e,t){const n=t.data||{},r="value"in t&&!(Uv.call(n,"hProperties")||Uv.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 OQ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
474`});++r<e.length;)r&&n.push({type:"text",value:`
475`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
476`}),n}function NS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function RS(e,t){const n=PQ(e,t),r=n.one(e,void 0),s=vQ(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:`
477`},s),i}function IQ(e,t){return e&&"run"in e?async function(n,r){const s=RS(n,{file:r,...t});await e.run(s,r)}:function(n,r){return RS(n,{file:r,...e||t})}}function OS(e){if(e)throw e}var Ch=Object.prototype.hasOwnProperty,qR=Object.prototype.toString,IS=Object.defineProperty,DS=Object.getOwnPropertyDescriptor,LS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):qR.call(t)==="[object Array]"},MS=function(t){if(!t||qR.call(t)!=="[object Object]")return!1;var n=Ch.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ch.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var s;for(s in t);return typeof s>"u"||Ch.call(t,s)},$S=function(t,n){IS&&n.name==="__proto__"?IS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},FS=function(t,n){if(n==="__proto__")if(Ch.call(t,n)){if(DS)return DS(t,n).value}else return;return t[n]},DQ=function e(){var t,n,r,s,i,a,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=FS(o,n),s=FS(t,n),o!==s&&(u&&s&&(MS(s)||(i=LS(s)))?(i?(i=!1,a=r&&LS(r)?r:[]):a=r&&MS(r)?r:{},$S(o,{name:n,newValue:e(u,a,s)})):typeof s<"u"&&$S(o,{name:n,newValue:s}));return o};const dg=Qi(DQ);function Hv(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 LQ(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...s);function o(l,...c){const u=e[++i];let d=-1;if(l){a(l);return}for(;++d<s.length;)(c[d]===null||c[d]===void 0)&&(c[d]=s[d]);s=c,u?MQ(u,o)(...c):a(null,...c)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function MQ(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(s);try{l=e.apply(this,a)}catch(c){const u=c;if(o&&n)throw u;return s(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(a,...o){n||(n=!0,t(a,...o))}function i(a){s(null,a)}}const Qr={basename:$Q,dirname:FQ,extname:zQ,join:BQ,sep:"/"};function $Q(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qu(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function FQ(e){if(Qu(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 zQ(e){Qu(e);let t=e.length,n=-1,r=0,s=-1,i=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function BQ(...e){let t=-1,n;for(;++t<e.length;)Qu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":VQ(n)}function VQ(e){Qu(e);const t=e.codePointAt(0)===47;let n=UQ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function UQ(e,t){let n="",r=0,s=-1,i=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||i===1))if(s!==a-1&&i===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("/")),s=a,i=0;continue}}else if(n.length>0){n="",r=0,s=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return n}function Qu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const HQ={cwd:WQ};function WQ(){return"/"}function Wv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qQ(e){if(typeof e=="string")e=new URL(e);else if(!Wv(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 ZQ(e)}function ZQ(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const hg=["history","path","basename","stem","extname","dirname"];class ZR{constructor(t){let n;t?Wv(t)?n={path:t}:typeof t=="string"||GQ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":HQ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<hg.length;){const i=hg[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)hg.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Qr.basename(this.path):void 0}set basename(t){pg(t,"basename"),fg(t,"basename"),this.path=Qr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qr.dirname(this.path):void 0}set dirname(t){zS(this.basename,"dirname"),this.path=Qr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qr.extname(this.path):void 0}set extname(t){if(fg(t,"extname"),zS(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=Qr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wv(t)&&(t=qQ(t)),pg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qr.basename(this.path,this.extname):void 0}set stem(t){pg(t,"stem"),fg(t,"stem"),this.path=Qr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new nn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fg(e,t){if(e&&e.includes(Qr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qr.sep+"`")}function pg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const KQ=function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},YQ={}.hasOwnProperty;class gw extends KQ{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=LQ()}copy(){const t=new gw;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(dg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(yg("data",this.frozen),this.namespace[t]=n,this):YQ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(yg("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qd(t),r=this.parser||this.Parser;return mg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),mg("process",this.parser||this.Parser),gg("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,a){const o=qd(t),l=r.parse(o);r.run(l,o,function(u,d,p){if(u||!d||!p)return c(u);const f=d,v=r.stringify(f,p);XQ(v)?p.value=v:p.result=v,c(u,p)});function c(u,d){u||!d?a(u):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),mg("processSync",this.parser||this.Parser),gg("processSync",this.compiler||this.Compiler),this.process(t,s),VS("processSync","process",n),r;function s(i,a){n=!0,OS(i),r=a}}run(t,n,r){BS(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,o){const l=qd(n);s.run(t,l,c);function c(u,d,p){const f=d||t;u?o(u):a?a(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),VS("runSync","run",r),s;function i(a,o){OS(a),s=o,r=!0}}stringify(t,n){this.freeze();const r=qd(n),s=this.compiler||this.Compiler;return gg("stringify",s),BS(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(yg("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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");o(c.plugins),c.settings&&(s.settings=dg(!0,s.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===c){p=d;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[f,...v]=u;const x=r[p][1];Hv(x)&&Hv(f)&&(f=dg(!0,x,f)),r[p]=[c,f,...v]}}}}const JQ=new gw().freeze();function mg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function gg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function yg(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 BS(e){if(!Hv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function VS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qd(e){return QQ(e)?e:new ZR(e)}function QQ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function XQ(e){return typeof e=="string"||eX(e)}function eX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tX="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",US=[],HS={allowDangerousHtml:!0},nX=/^(https?|ircs?|mailto|xmpp)$/i,rX=[{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 sX(e){const t=iX(e),n=aX(e);return oX(t.runSync(t.parse(n),n),e)}function iX(e){const t=e.rehypePlugins||US,n=e.remarkPlugins||US,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...HS}:HS;return JQ().use($J).use(n).use(IQ,r).use(t)}function aX(e){const t=e.children||"",n=new ZR;return typeof t=="string"&&(n.value=t),n}function oX(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,i=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||lX;for(const u of rX)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+tX+u.id,void 0);return WR(e,c),yK(e,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function c(u,d,p){if(u.type==="raw"&&p&&typeof d=="number")return a?p.children.splice(d,1):p.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in lg)if(Object.hasOwn(lg,f)&&Object.hasOwn(u.properties,f)){const v=u.properties[f],x=lg[f];(x===null||x.includes(u.tagName))&&(u.properties[f]=l(String(v||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,p)),f&&p&&typeof d=="number")return o&&u.children?p.children.splice(d,1,...u.children):p.children.splice(d,1),d}}}function lX(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||nX.test(e.slice(0,t))?e:""}const cX=({message:e})=>{const t=tw(e);return t?e.role==="user"?h.jsx("div",{className:"flex justify-end",children:h.jsx("div",{className:"max-w-[82%] rounded-2xl rounded-tr-sm px-3.5 py-2 text-[14px] leading-snug font-medium shadow-sm",style:{background:"linear-gradient(135deg, #F9A01B, #fbbf24)",color:"#1a1a1a"},children:t})}):h.jsxs("div",{className:"flex gap-2",children:[h.jsx("div",{className:"w-7 h-7 rounded-full flex-shrink-0 flex items-center justify-center text-white text-[11px] font-bold shadow",style:{background:"linear-gradient(135deg, #2CC5F4, #0ea5e9)"},children:"L"}),h.jsx("div",{className:"max-w-[85%] text-[14px] leading-relaxed text-gray-800 prose prose-sm prose-p:my-1 prose-ul:my-1 prose-ol:my-1 prose-strong:text-gray-900 prose-a:text-[#F9A01B]",children:h.jsx(sX,{children:t})})]}):null},WS=({suggestions:e,onPick:t})=>h.jsx("div",{className:"flex flex-wrap gap-2 pl-9",children:e.map(n=>h.jsx("button",{onClick:()=>t(n),className:"text-[12px] font-semibold px-3 py-1.5 rounded-full border border-[#F9A01B]/30 text-[#b46a00] bg-[#F9A01B]/8 hover:bg-[#F9A01B]/15 hover:border-[#F9A01B]/60 transition-all",children:n},n))}),uX="https://nzaweyjfkrxnydlavsln.supabase.co",qS="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56YXdleWpma3J4b
477nlkbGF2c2xuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg5MjUwNjQsImV4cCI6MjA5NDUwMTA2NH0.E3JAGw56VmKq0Cb13TapBxP2rCYPEStF6AgZOQXck6E",dX=["Check my DHA eligibility","Germany Nursing program","Prometric MCQ packages","Talk to a human"],hX=["human","agent","expert","call","talk to someone","real person"],fX=({lead:e,onClose:t})=>{const[n,r]=b.useState(""),s=b.useRef(null),i=b.useRef(null),{messages:a,sendMessage:o,status:l,setMessages:c,error:u}=mG({id:"hs-serve",messages:gG(),transport:new cR({api:`${uX}/functions/v1/chat-assistant`,headers:{Authorization:`Bearer ${qS}`,apikey:qS},body:{lead:e}})});yG(a),b.useEffect(()=>{if(u){const y=u.message||"Something went wrong";y.includes("429")?jc.error("Too many requests — please wait a moment."):y.includes("402")?jc.error("AI usage limit reached. Please use WhatsApp for now."):jc.error("Chat error. Please try again or use WhatsApp.")}},[u]),b.useEffect(()=>{var y;(y=s.current)==null||y.scrollTo({top:s.current.scrollHeight,behavior:"smooth"})},[a,l]),b.useEffect(()=>{var y;(y=i.current)==null||y.focus()},[]);const d=l==="submitted"||l==="streaming",p=async y=>{const m=y.trim();!m||d||(r(""),await o({text:m}))},f=y=>{y.preventDefault(),p(n)},v=()=>{vG(),c([])},x=a[a.length-1],w=a.length>=6||(x==null?void 0:x.role)==="user"&&hX.some(y=>tw(x).toLowerCase().includes(y)),g=wG(e,a);return h.jsxs("div",{className:"flex flex-col h-full bg-white",children:[h.jsxs("div",{className:"px-4 py-3.5 flex items-center gap-3 text-white relative overflow-hidden",style:{background:"linear-gradient(135deg, #F9A01B 0%, #fbbf24 50%, #2CC5F4 130%)"},children:[h.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"radial-gradient(circle at 20% 30%, white 0.5px, transparent 0.5px)",backgroundSize:"12px 12px"}}),h.jsxs("div",{className:"relative w-10 h-10 rounded-full border-2 border-white/90 shadow overflow-hidden flex-shrink-0",children:[h.jsx("img",{src:Mc,alt:"Layla",className:"w-full h-full object-cover"}),h.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full bg-green-400 border-2 border-white"})]}),h.jsxs("div",{className:"relative flex-1 min-w-0",children:[h.jsx("p",{className:"font-display font-bold text-[15px] leading-tight",children:"Layla · Support Executive"}),h.jsx("p",{className:"text-[11px] text-white/85 leading-tight",children:"Healthserve · usually replies instantly"})]}),h.jsx("button",{onClick:v,className:"relative p-1.5 rounded-lg hover:bg-white/15 transition",title:"New conversation",children:h.jsx(mF,{size:15})}),h.jsx("button",{onClick:t,className:"relative p-1.5 rounded-lg hover:bg-white/15 transition",title:"Close",children:h.jsx(ds,{size:17})})]}),h.jsxs("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 py-2 text-[12px] font-semibold text-white border-b border-black/5",style:{background:"linear-gradient(90deg, #25D366, #128C7E)"},children:[h.jsx(Sp,{size:13})," Continue on WhatsApp with full context →"]}),h.jsxs("div",{ref:s,className:"flex-1 overflow-y-auto px-4 py-4 space-y-4 bg-gradient-to-b from-white to-gray-50/50",children:[a.length===0&&h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex gap-2",children:[h.jsx("div",{className:"w-7 h-7 rounded-full flex-shrink-0 overflow-hidden shadow",style:{background:"linear-gradient(135deg, #2CC5F4, #0ea5e9)"},children:h.jsx("img",{src:Mc,alt:"Layla",className:"w-full h-full object-cover"})}),h.jsxs("div",{className:"max-w-[85%] text-[14px] leading-relaxed text-gray-800",children:["Hi ",h.jsx("strong",{className:"text-gray-900",children:e.name.split(" ")[0]})," 👋 I'm Layla from the Healthserve support team. I can help you with ",h.jsx("strong",{children:"GCC licensing"}),", ",h.jsx("strong",{children:"Germany Nursing"}),", ",h.jsx("strong",{children:"Prometric prep"}),", ",h.jsx("strong",{children:"trainings"})," and ",h.jsx("strong",{children:"facility licensing"}),". What would you like to explore?"]})]}),h.jsx(WS,{suggestions:dX,onPick:p})]}),a.map(y=>h.jsx(cX,{message:y},y.id)),d&&h.jsxs("div",{className:"flex gap-2",children:[h.jsx("div",{className:"w-7 h-7 rounded-full flex-shrink-0 overflow-hidden shadow",style:{background:"linear-gradient(135deg, #2CC5F4, #0ea5e9)"},children:h.jsx("img",{src:Mc,alt:"Layla",className:"w-full h-full object-cover"})}),h.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2.5 rounded-xl bg-gray-100",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce",style:{animationDelay:"0s"}}),h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce",style:{animationDelay:"0.15s"}}),h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce",style:{animationDelay:"0.3s"}})]})]}),!d&&a.length>0&&(x==null?void 0:x.role)==="assistant"&&h.jsx(WS,{suggestions:w?["Talk to a human on WhatsApp","Tell me more","What's next?"]:["Tell me more","What does it cost?","Talk to a human"],onPick:y=>y.toLowerCase().includes("whatsapp")?window.open(g,"_blank"):p(y)})]}),h.jsxs("form",{onSubmit:f,className:"border-t border-gray-100 p-3 bg-white",children:[h.jsxs("div",{className:"flex items-end gap-2",children:[h.jsx("textarea",{ref:i,value:n,onChange:y=>r(y.target.value),onKeyDown:y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),p(n))},placeholder:"Ask Layla anything…",rows:1,maxLength:1e3,disabled:d,className:"flex-1 resize-none px-3.5 py-2.5 rounded-xl border border-gray-200 text-[14px] text-gray-900 placeholder:text-gray-600 focus:outline-none focus:ring-2 focus:ring-[#F9A01B]/40 focu
477s:border-[#F9A01B] max-h-32"}),h.jsx("button",{type:"submit",disabled:!n.trim()||d,className:"w-10 h-10 rounded-xl flex-shrink-0 flex items-center justify-center text-white transition-all disabled:opacity-40 disabled:cursor-not-allowed hover:shadow-lg active:scale-95",style:{background:"linear-gradient(135deg, #F9A01B, #fbbf24)"},"aria-label":"Send",children:h.jsx(yF,{size:16})})]}),h.jsx("p",{className:"text-[10px] text-gray-600 mt-1.5 text-center",children:"Layla can make mistakes. For official advice, use WhatsApp."})]})]})},pX=({size:e=24})=>h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor",children:h.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.247-.694.247-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0 0 20.464 3.488"})}),mX=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState(!1),[s,i]=b.useState(null),{lead:a,setLead:o}=b8(),l=async c=>{i(c),o(c),oj("chat_lead",{name:c.name,phone:c.phone,email:c.email,nationality:c.nationality,profession:c.profession}).catch(u=>console.warn("Chat lead save failed:",u)),Lx("ChatLeads",[new Date(c.createdAt).toISOString(),c.name,c.phone,c.email,c.nationality,c.profession]).catch(u=>console.warn("Chat lead sheet mirror failed:",u))};return b.useEffect(()=>{if(e)return;const c=setTimeout(()=>r(!0),6e3);return()=>clearTimeout(c)},[e]),h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"fixed bottom-6 right-6 z-[9999]",children:[n&&!e&&h.jsxs("div",{className:"absolute bottom-[74px] right-0 mb-1 bg-white rounded-2xl shadow-[0_12px_40px_rgba(15,23,42,0.18)] px-4 py-3 w-[230px] border border-gray-100 animate-fade-up",children:[h.jsx("button",{onClick:()=>r(!1),className:"absolute top-1.5 right-1.5 text-gray-500 hover:text-gray-500",children:h.jsx(ds,{size:12})}),h.jsx("p",{className:"text-[13px] font-bold text-gray-900 leading-tight",children:"👋 Need help getting licensed?"}),h.jsx("p",{className:"text-[11px] text-gray-500 mt-1 leading-snug",children:"Chat with Layla — our AI assistant. Get instant answers."})]}),h.jsxs("button",{onClick:()=>{t(c=>!c),r(!1)},className:"relative w-[60px] h-[60px] rounded-full flex items-center justify-center text-white shadow-[0_8px_28px_rgba(37,211,102,0.45)] hover:shadow-[0_12px_36px_rgba(37,211,102,0.6)] transition-all hover:-translate-y-0.5 active:scale-95",style:{background:"linear-gradient(135deg, #25D366 0%, #128C7E 100%)"},"aria-label":e?"Close chat":"Open chat",children:[!e&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"absolute inset-0 rounded-full opacity-60",style:{background:"#25D366",animation:"whatsapp-pulse 2.4s ease-out infinite"}}),h.jsx("span",{className:"absolute inset-0 rounded-full opacity-60",style:{background:"#25D366",animation:"whatsapp-pulse 2.4s ease-out infinite 1.2s"}})]}),h.jsx("span",{className:"relative z-10 transition-transform duration-300",style:{transform:e?"rotate(180deg) scale(0.9)":"rotate(0deg)"},children:e?h.jsx(ds,{size:24,strokeWidth:2.4}):h.jsx(pX,{size:26})}),!e&&h.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-3.5 h-3.5 rounded-full bg-green-400 border-2 border-white"})]})]}),e&&h.jsx("div",{className:"fixed z-[9998] inset-x-0 bottom-0 sm:bottom-24 sm:right-6 sm:left-auto sm:inset-x-auto",children:h.jsx("div",{className:"bg-white sm:rounded-3xl shadow-[0_30px_80px_rgba(15,23,42,0.28)] border border-black/5 overflow-hidden flex flex-col origin-bottom-right animate-slide-up-spring",style:{width:"min(100vw, 384px)",height:"min(80vh, 600px)"},children:a?s?h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"px-5 py-4 flex items-center gap-3 text-white relative",style:{background:"linear-gradient(135deg, #F9A01B 0%, #fbbf24 50%, #2CC5F4 130%)"},children:[h.jsx("img",{src:Mc,alt:"Layla",className:"w-10 h-10 rounded-full object-cover border-2 border-white/90 shadow"}),h.jsxs("div",{className:"flex-1",children:[h.jsxs("p",{className:"font-display font-bold text-[15px] leading-tight",children:["Just for you, ",s.name.split(" ")[0]]}),h.jsx("p",{className:"text-[11px] text-white/85",children:"Personalized by Layla"})]}),h.jsx("button",{onClick:()=>t(!1),className:"p-1.5 rounded-lg hover:bg-white/15",children:h.jsx(ds,{size:17})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:h.jsx(lj,{formType:"chat-lead",answers:{name:s.name,nationality:s.nationality,profession:s.profession},variant:"compact"})}),h.jsx("div",{className:"p-3 border-t border-gray-100",children:h.jsx("button",{onClick:()=>i(null),className:"w-full py-3 rounded-xl text-white font-bold text-sm",style:{background:"linear-gradient(135deg, #F9A01B 0%, #fbbf24 50%, #2CC5F4 100%)"},children:"Start chatting with Layla →"})})]}):h.jsx(fX,{lead:a,onClose:()=>t(!1)}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"px-5 py-4 flex items-center gap-3 text-white relative",style:{background:"linear-gradient(135deg, #F9A01B 0%, #fbbf24 50%, #2CC5F4 130%)"},children:[h.jsx("img",{src:Mc,alt:"Layla",className:"w-10 h-10 rounded-full object-cover border-2 border-white/90 shadow"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("p",{className:"font-display font-bold text-[15px] leading-tight",children:"Welcome to Healthserve"}),h.jsx("p",{className:"text-[11px] text-white/85",children:"Layla · Support Executive"})]}),h.jsx("button",{onClick:()=>t(!1),className:"p-1.5 rounded-lg hover:bg-white/15",children:h.jsx(ds,{size:17})})]}),h.jsx(E8,{onSubmit:l})]})})})]})};var GR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ZS=z.createContext&&z.createContext(GR),gX=["attr","size","title"];function yX(e,t){if(e==null)return{};var n,r,s=vX(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function vX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zf.apply(null,arguments)}function GS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
477t%2?GS(Object(n),!0).forEach(function(r){xX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xX(e,t,n){return(t=wX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wX(e){var t=bX(e,"string");return typeof t=="symbol"?t:t+""}function bX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KR(e){return e&&e.map((t,n)=>z.createElement(t.tag,Bf({key:n},t.attr),KR(t.child)))}function Zp(e){return t=>z.createElement(_X,zf({attr:Bf({},e.attr)},t),KR(e.child))}function _X(e){var t=n=>{var{attr:r,size:s,title:i}=e,a=yX(e,gX),o=s||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),z.createElement("svg",zf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:Bf(Bf({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&z.createElement("title",null,i),e.children)};return ZS!==void 0?z.createElement(ZS.Consumer,null,n=>t(n)):t(GR)}function kX(e){return Zp({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"},child:[]}]})(e)}function SX(e){return Zp({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"},child:[]}]})(e)}function EX(e){return Zp({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"},child:[]}]})(e)}function CX(e){return Zp({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M279.14 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.43 0 225.36 0c-73.22 0-121.08 44.38-121.08 124.72v70.62H22.89V288h81.39v224h100.17V288z"},child:[]}]})(e)}const TX=()=>{const[e,t]=b.useState("");return h.jsxs("footer",{className:"bg-dark-footer relative",children:[h.jsx("div",{className:"border-b border-white/[0.06]",children:h.jsx("div",{className:"max-w-[1320px] mx-auto px-6 md:px-10 py-10",children:h.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[h.jsxs("div",{children:[h.jsx("h4",{className:"text-white font-display font-bold text-xl",children:"Stay Updated"}),h.jsx("p",{className:"text-white/75 text-sm mt-1",children:"Get the latest healthcare licensing news and training updates."})]}),h.jsxs("div",{className:"flex gap-3 w-full md:w-auto",children:[h.jsx("input",{type:"email",value:e,onCh
477ange:n=>t(n.target.value),placeholder:"Enter your email",className:"bg-white/[0.06] border border-white/[0.1] rounded-full px-5 py-3 text-white text-sm placeholder:text-white/30 focus:outline-none focus:border-[#F9A01B]/50 flex-1 md:w-[280px]"}),h.jsxs("button",{className:"bg-[#F9A01B] text-white font-semibold px-6 py-3 rounded-full text-sm hover:bg-[#e88d0c] transition-colors flex items-center gap-2",children:["Subscribe ",h.jsx(Un,{size:14})]})]})]})})}),h.jsxs("div",{className:"max-w-[1320px] mx-auto px-6 md:px-10 py-16 md:py-20",children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-10 lg:gap-8",children:[h.jsxs("div",{className:"space-y-5",children:[h.jsx(Cv,{src:Ev,alt:"Healthserve",className:"h-10",sizes:"160px"}),h.jsx("p",{className:"text-white/75 text-sm leading-relaxed",children:"UAE's leading healthcare licensing, training & international placement consultancy."}),h.jsx("div",{className:"flex gap-3",children:[{Icon:EX,href:"https://www.instagram.com/healthservehealthconsultancy/",color:"#E4405F",gradient:"linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4)"},{Icon:SX,href:"https://ae.linkedin.com/company/healthserve-health-consultancy",color:"#0A66C2"},{Icon:CX,href:"https://www.facebook.com/healthservehealthconsultancyuaehealthcarelicense",color:"#1877F2"},{Icon:kX,href:"https://www.youtube.com/@healthservehealthconsultancy",color:"#FF0000"}].map(({Icon:n,href:r,color:s,gradient:i},a)=>h.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":"Social link",className:"w-10 h-10 rounded-full flex items-center justify-center text-white shadow-md hover:scale-110 transition-transform",style:{background:i??s},children:h.jsx(n,{size:18})},a))})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"text-white font-semibold text-sm mb-5",children:"Licensing Services"}),h.jsx("ul",{className:"space-y-2.5",children:[{name:"DHA Licensing",href:"/services/dha-licensing"},{name:"MOH Licensing",href:"/services/moh-licensing"},{name:"DOH Licensing",href:"/services/doh-licensing"},{name:"GCC Licensing",href:"/services/gcc-licensing"},{name:"Dataflow Assistance",href:"/services/dataflow-assistance"},{name:"Prometric Assistance",href:"/services/prometric-assistance"},{name:"Facility Licensing",href:"/services/facility-licensing"}].map(n=>h.jsx("li",{children:h.jsx(ze,{to:n.href,className:"text-white/75 hover:text-[#F9A01B] text-sm transition-colors",children:n.name})},n.name))})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"text-white font-semibold text-sm mb-5",children:"Training"}),h.jsx("ul",{className:"space-y-2.5",children:[{name:"BLS AHA",href:"/training/bls-aha"},{name:"BLS ASHI",href:"/training/bls-ashi"},{name:"ACLS",href:"/training/acls"},{name:"PALS",href:"/training/pals"},{name:"Infection Control",href:"/training/infection-control"},{name:"First Aid",href:"/training/first-aid"},{name:"CPHQ",href:"/training/cphq"},{name:"CPPS",href:"/training/cpps"},{name:"CNA Training",href:"/training/cna"}].map(n=>h.jsx("li",{children:h.jsx(ze,{to:n.href,className:"text-white/75 hover:text-[#F9A01B] text-sm transition-colors",children:n.name})},n.name))})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsx("h4",{className:"text-white font-semibold text-sm mb-5",children:"Get In Touch"}),h.jsxs("div",{className:"flex items-start gap-3 text-white/75 text-sm",children:[h.jsx(ZP,{size:16,className:"flex-shrink-0 mt-0.5"}),h.jsxs("span",{children:["#332, Sultan Business Center,",h.jsx("br",{}),"Near Lamcy Plaza, Oud Metha,",h.jsx("br",{}),"Dubai – UAE"]})]}),h.jsxs("div",{className:"flex items-start gap-3 text-white/75 text-sm",children:[h.jsx(KP,{size:16,className:"flex-shrink-0 mt-0.5"}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("a",{href:"tel:+97145521757",className:"hover:text-[#F9A01B] transition-colors",children:"+971 4 552 1757"}),h.jsx("a",{href:"tel:+971523941876",className:"hover:text-[#F9A01B] transition-colors",children:"+971 52 394 1876"}),h.jsx("a",{href:"https://wa.me/971502720059",target:"_blank",rel:"noopener noreferrer",className:"hover:text-[#F9A01B] transition-colors",children:"+971 50 272 0059 (WhatsApp)"})]})]}),h.jsxs("div",{className:"flex items-start gap-3 text-white/75 text-sm",children:[h.jsx(hF,{size:16,className:"flex-shrink-0 mt-0.5"}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("a",{href:"mailto:[email protected]",className:"hover:text-[#F9A01B] transition-colors",children:"[email protected]"}),h.jsx("a",{href:"mailto:[email protected]",className:"hover:text-[#F9A01B] transition-colors",children:"[email protected]"})]})]}),h.jsx(ze,{to:"/book-consultation",className:"btn-primary-hs block text-center !py-3 !px-6 text-sm mt-6 w-full",children:"Book Your Consultation"})]})]}),h.jsxs("div",{className:"mt-14 pt-6 border-t border-white/[0.06] flex flex-col md:flex-row items-center justify-between gap-4",children:[h.jsx("p",{className:"text-white/30 text-xs",children:"© 2025 Healthserve Health Consultancy. All rights reserved."}),h.jsxs("div",{className:"flex gap-6",children:[h.jsx(ze,{to:"/contact",className:"text-white/70 hover:text-[#F9A01B] text-xs font-semibold transition-colors",children:"Contact Us"}),h.jsx(ze,{to:"/privacy-policy",className:"text-white/70 hover:text-[#F9A01B] text-xs font-semibold transition-colors",children:"Privacy Policy"}),h.jsx("a",{href:"#",className:"text-white/75 hover:text-white/70 text-xs transition-colors",children:"Terms of Service"})]})]})]})]})},ra=(e=.2)=>{const t=b.useRef(null),[n,r]=b.useState(!1);return b.useEffect(()=>{const s=t.current;if(!s)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&(r(!0),i.unobserve(s))},{threshold:e});return i.observe(s),()=>i.disconnect()},[e]),{ref:t,isInView:n}},AX=(e=.3)=>{const t=b.useRef(null),[n,r]=b.useState(0);return b.useEffect(()=>{const s=()=>
477{if(!t.current)return;const i=t.current.getBoundingClientRect(),a=window.innerHeight,l=i.top+i.height/2-a/2;r(l*e)};return window.addEventListener("scroll",s,{passive:!0}),s(),()=>window.removeEventListener("scroll",s)},[e]),{ref:t,offset:n}},KS=new Map,PX=6e4;async function jX(e,t,n={}){const r=`${e}:${t}`,s=KS.get(r);if(s&&Date.now()-s.ts<PX)return s.data;const{data:i}=await kt.from("page_content").select("data").eq("page_key",e).eq("section_key",t).maybeSingle(),a=(i==null?void 0:i.data)??n;return KS.set(r,{data:a,ts:Date.now()}),a}function Vf(e,t,n){const[r,s]=b.useState(n);return b.useEffect(()=>{let i=!0;return jX(e,t,n).then(a=>{i&&s(a)}),()=>{i=!1}},[e,t]),r}const YS="/assets/hero-banner-bg-B32Pvr0w.jpg",NX=1,RX="5ee675e2-dc35-4c31-88c0-34d130de26fc",OX="a382e84d-2307-4b46-a331-5a4753672502",IX="/__l5e/assets-v1/5ee675e2-dc35-4c31-88c0-34d130de26fc/hero-video-4.mp4",DX="hero-video-4.mp4",LX=24574660,MX="2026-07-28T09:59:10Z",JS={version:NX,asset_id:RX,project_id:OX,url:IX,original_filename:DX,size:LX,created_at:MX},Au=({service:e,children:t,onClick:n,...r})=>{const{openFlow:s}=Mx();return h.jsx("button",{type:"button",onClick:i=>{n==null||n(i),s(e)},...r,children:t})};function ir({id:e,defaultValue:t,as:n="span",multiline:r=!1,className:s="",style:i,children:a}){const{editMode:o,isStaff:l,get:c,save:u,registerDefault:d,version:p,loaded:f}=aN(),v=c(e,t),x=b.useRef(null),[w,g]=b.useState(!1);b.useEffect(()=>{f&&d(e,t)},[f,e,t,d]),b.useEffect(()=>{x.current&&x.current.innerText!==v&&(x.current.innerText=v)},[v,o,p]);const y=()=>{if(!x.current)return;const k=x.current.innerText.replace(/\u00a0/g," ").trim();k!==v&&u(e,k)},m=k=>{k.key==="Enter"&&!r&&!k.shiftKey&&(k.preventDefault(),k.target.blur()),k.key==="Escape"&&(x.current&&(x.current.innerText=v),k.target.blur())};if(!o||!l)return a?h.jsx(h.Fragment,{children:a(v)}):h.jsx(n,{ref:x,className:s,style:i,children:v});const _=`${s} outline-none transition-all rounded-sm ${w?"ring-2 ring-offset-2 ring-[#F9A01B]/70":"ring-1 ring-dashed ring-[#F9A01B]/40"}`;return h.jsxs("span",{className:"relative inline-block",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[h.jsx(n,{ref:x,className:_,style:i,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!0,onBlur:y,onKeyDown:m,onClick:k=>k.stopPropagation(),onMouseDown:k=>k.stopPropagation(),children:v}),w&&h.jsx("span",{className:"absolute -top-3 -right-3 bg-[#F9A01B] text-white rounded-full w-6 h-6 flex items-center justify-center pointer-events-none shadow-lg",children:h.jsx(GP,{size:12})})]})}const YR=["Global Healthcare Opportunities","GCC Licensing Success","DHA, MOH & DOH Approvals","Germany Nursing Careers","Dataflow & Prometric Support","Healthcare Facility Licensing","Professional Medical Trainings"],QS=[{icon:Ep,label:"DHA Guidance",color:"#F9A01B",pos:"top-28 right-6 md:right-16"},{icon:qP,label:"Germany Recruitment",color:"#2CC5F4",pos:"top-1/2 right-10 md:right-24 -translate-y-12"},{icon:Uu,label:"Healthcare Trainings",color:"#F9A01B",pos:"bottom-40 right-4 md:right-32"},{icon:kp,label:"UAE Facility Licensing",color:"#2CC5F4",pos:"bottom-16 right-8 md:right-12"}],$X={badge:"Trusted Healthcare Consultancy",headline_prefix:"Your Gateway to",rotating_phrases:YR,subheadline:"GCC Licensing, Professional Trainings, Germany Nursing Recruitment & Healthcare Facility Licensing — all under one trusted consultancy.",cta_primary:"Start Your Eligibility Check",cta_secondary:"Talk to Our Expert",whatsapp_label:"Chat with us on WhatsApp →"},FX=()=>{var u;const{ref:e,isInView:t}=ra(.1),{ref:n,offset:r}=AX(.15),s=Vf("home","hero",$X),i=Vf("home","hero.video",{value:JS.url}),a=(i==null?void 0:i.value)||JS.url,o=(u=s.rotating_phrases)!=null&&u.length?s.rotating_phrases:YR,[l,c]=b.useState(0);return b.useEffect(()=>{const d=setInterval(()=>c(p=>(p+1)%o.length),2600);return()=>clearInterval(d)},[o.length]),h.jsxs("section",{ref:e,className:"relative min-h-screen flex items-center overflow-hidden pt-24",children:[h.jsx("img",{src:YS,alt:"Modern hospital corridor backdrop",width:1920,height:1080,fetchPriority:"high",decoding:"async",className:"absolute inset-0 w-full h-full object-cover opacity-60"}
477),h.jsx("video",{src:a,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"metadata",poster:YS,onLoadedMetadata:d=>d.currentTarget.play().catch(()=>{}),className:"absolute inset-0 w-full h-full object-cover"},a),h.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white/95 via-white/75 to-white/20 md:from-white/90 md:via-white/55 md:to-white/10"}),h.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white/40 via-transparent to-white/60"}),h.jsxs("div",{ref:n,className:"absolute inset-0 overflow-hidden pointer-events-none",children:[h.jsx("div",{className:"absolute w-[800px] h-[800px] rounded-full opacity-[0.10] blur-[150px] -top-60 -right-40",style:{background:"linear-gradient(135deg, #2CC5F4, #a5e6ff)",transform:`translate(${r*.3}px, ${r*.5}px)`,animation:"float-orb 25s ease-in-out infinite"}}),h.jsx("div",{className:"absolute w-[600px] h-[600px] rounded-full opacity-[0.10] blur-[120px] bottom-[-20%] left-[-10%]",style:{background:"linear-gradient(135deg, #F9A01B, #fde68a)",transform:`translate(${-r*.2}px, ${r*.4}px)`,animation:"float-orb 20s ease-in-out infinite 5s"}}),h.jsx("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"radial-gradient(circle, #231F20 0.5px, transparent 0.5px)",backgroundSize:"24px 24px"}})]}),h.jsx("div",{className:"relative z-10 max-w-[1320px] mx-auto px-6 md:px-10 w-full py-16 md:py-0",children:h.jsxs("div",{className:"max-w-2xl space-y-7",children:[h.jsxs("div",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/90 backdrop-blur border border-gray-100 shadow-sm ${t?"animate-fade-left":"opacity-0"}`,style:{animationDelay:"0.2s"},children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-green-400 animate-pulse"}),h.jsx(ir,{id:"hero.badge",defaultValue:s.badge,as:"span",className:"text-[11px] font-bold text-gray-500 uppercase tracking-widest"})]}),h.jsxs("h1",{className:`font-display font-extrabold leading-[1.05] tracking-tight text-gray-900 ${t?"animate-blur-in":"opacity-0"}`,style:{fontSize:"clamp(38px, 5.5vw, 68px)",letterSpacing:"-2px",animationDelay:"0.3s"},children:[h.jsx(ir,{id:"hero.headline_prefix",defaultValue:s.headline_prefix,as:"span"})," ",h.jsx("br",{}),h.jsx("span",{className:"relative inline-block align-baseline overflow-hidden",style:{minHeight:"1.1em"},children:h.jsx("span",{className:"text-gradient-orange inline-block animate-blur-in",style:{animationDuration:"0.6s"},children:o[l]},l)})]}),h.jsx(ir,{id:"hero.subheadline",defaultValue:s.subheadline,as:"p",multiline:!0,className:`text-gray-700 text-lg md:text-xl leading-relaxed max-w-xl ${t?"animate-blur-in":"opacity-0"}`,style:{animationDelay:"0.5s"}}),h.jsxs("div",{className:`flex flex-wrap gap-3 ${t?"animate-slide-up-spring":"opacity-0"}`,style:{animationDelay:"0.6s"},children:[h.jsxs(Au,{className:"btn-primary-hs text-base flex items-center gap-2",children:[h.jsx(ir,{id:"hero.cta_primary",defaultValue:s.cta_primary,as:"span"})," ",h.jsx(Un,{size:18})]}),h.jsx(Au,{className:"btn-secondary-hs text-base",children:h.jsx(ir,{id:"hero.cta_secondary",defaultValue:s.cta_secondary,as:"span"})})]}),h.jsxs("a",{href:"https://wa.me/971523941876",target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center gap-2 text-sm font-semibold text-[#25D366] hover:underline ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.7s"},children:[h.jsx(Sp,{size:16})," ",h.jsx(ir,{id:"hero.whatsapp_label",defaultValue:s.whatsapp_label,as:"span"})]}),h.jsx("div",{className:"mt-5 md:mt-6",children:h.jsxs("a",{href:"/careers",className:`group inline-flex items-center gap-3 pl-2 pr-4 py-2 rounded-full bg-white/90 backdrop-blur border border-[#F9A01B]/30 shadow-[0_8px_24px_-8px_rgba(249,160,27,0.35)] hover:shadow-[0_12px_32px_-8px_rgba(249,160,27,0.55)] hover:-translate-y-0.5 transition-all ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.8s"},children:[h.jsxs("span",{className:"relative flex items-center justify-center w-7 h-7 rounded-full bg-gradient-to-br from-[#F9A01B] to-[#f97316] text-white text-[10px] font-black uppercase tracking-wider",children:[h.jsx("span",{className:"absolute inset-0 rounded-full bg-[#F9A01B]/60 animate-ping"}),h.jsx("span",{className:"relative",children:"4"})]}),h.jsxs("span",{className:"flex items-center gap-2 text-sm",children:[h.jsx("span",{className:"text-[10px] font-black uppercase tracking-[0.15em] text-[#F9A01B]",children:"Now Recruiting"}),h.jsx("span",{className:"hidden sm:inline text-gray-700 font-semibold",children:"Healthcare & Sales roles open"})]}),h.jsx(Un,{size:14,className:"text-[#F9A01B] group-hover:translate-x-1 transition-transform"})]})})]})}),h.jsxs("div",{className:"absolute top-1/2 -translate-y-1/2 right-6 lg:right-12 hidden md:block z-20",children:[h.jsx("div",{className:"absolute left-7 top-6 bottom-6 w-px bg-gradient-to-b from-transparent via-[#F9A01B]/40 to-transparent","aria-hidden":!0}),h.jsx("div",{className:"relative flex flex-col gap-5",children:QS.map((d,p)=>{const f=d.icon,v=p===l%QS.length;return h.jsxs("div",{className:`group relative flex items-center gap-3 pl-2 pr-5 py-2.5 rounded-2xl bg-white/85 backdrop-blur-xl border border-white/60 shadow-[0_8px_30px_rgba(15,23,42,0.08)] hover:shadow-[0_12px_40px_rgba(15,23,42,0.14)] transition-all duration-500 hover:-translate-x-2 cursor-default ${t?"opacity-100 translate-x-0":"opacity-0 translate-x-12"}`,style:{transition:"transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.6s ease, box-shadow 0.4s ease",transitionDelay:`${.7+p*.12}s`,transform:t?`translateY(${Math.sin((Date.now()/1e3+p)*.5)*0}px) translateX(${v?"-8px":"0"})`:void 0,animation:t?`float ${5+p*.6}s ease-in-out infinite ${p*.4}s`:void 0,borderColor:v?`${d.color}55`:void 0}
477,children:[h.jsx("span",{"aria-hidden":!0,className:"absolute left-2 top-1/2 -translate-y-1/2 w-11 h-11 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity",style:{boxShadow:`0 0 0 0 ${d.color}66`,animation:"pulse-ring 1.8s ease-out infinite"}}),h.jsxs("div",{className:"relative w-10 h-10 rounded-xl flex items-center justify-center overflow-hidden",style:{background:`linear-gradient(135deg, ${d.color}22, ${d.color}10)`,boxShadow:v?`0 6px 20px -6px ${d.color}80, inset 0 0 0 1px ${d.color}40`:`inset 0 0 0 1px ${d.color}22`},children:[h.jsx(f,{size:18,style:{color:d.color},strokeWidth:2.25}),v&&h.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 -translate-x-full",style:{background:"linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.65) 50%, transparent 65%)",animation:"shimmer-sweep 1.6s ease-in-out"}})]}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-[13px] font-bold text-gray-900 whitespace-nowrap leading-tight",children:d.label}),h.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-600",children:v?"Active service":"Explore →"})]}),h.jsx("span",{className:"absolute -left-1 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full transition-all duration-500",style:{background:d.color,opacity:v?1:0,boxShadow:v?`0 0 12px ${d.color}`:"none"},"aria-hidden":!0})]},d.label)})})]})]})},Zd=[{code:"in",name:"India"},{code:"pk",name:"Pakistan"},{code:"lk",name:"Sri Lanka"},{code:"ph",name:"Philippines"},{code:"np",name:"Nepal"},{code:"bd",name:"Bangladesh"},{code:"eg",name:"Egypt"},{code:"jo",name:"Jordan"},{code:"lb",name:"Lebanon"},{code:"ng",name:"Nigeria"},{code:"ke",name:"Kenya"},{code:"za",name:"South Africa"},{code:"gh",name:"Ghana"},{code:"et",name:"Ethiopia"},{code:"id",name:"Indonesia"},{code:"my",name:"Malaysia"},{code:"vn",name:"Vietnam"},{code:"th",name:"Thailand"},{code:"mv",name:"Maldives"},{code:"sd",name:"Sudan"},{code:"ma",name:"Morocco"},{code:"tn",name:"Tunisia"},{code:"sy",name:"Syria"},{code:"iq",name:"Iraq"},{code:"ye",name:"Yemen"},{code:"tz",name:"Tanzania"},{code:"ug",name:"Uganda"},{code:"zw",name:"Zimbabwe"},{code:"cm",name:"Cameroon"},{code:"dz",name:"Algeria"},{code:"tr",name:"Turkey"},{code:"ru",name:"Russia"},{code:"ua",name:"Ukraine"},{code:"gb",name:"United Kingdom"},{code:"ie",name:"Ireland"},{code:"de",name:"Germany"},{code:"fr",name:"France"},{code:"it",name:"Italy"},{code:"es",name:"Spain"},{code:"pt",name:"Portugal"},{code:"nl",name:"Netherlands"},{code:"be",name:"Belgium"},{code:"ch",name:"Switzerland"},{code:"at",name:"Austria"},{code:"se",name:"Sweden"},{code:"no",name:"Norway"},{code:"dk",name:"Denmark"},{code:"fi",name:"Finland"},{code:"pl",name:"Poland"},{code:"gr",name:"Greece"},{code:"ro",name:"Romania"},{code:"us",name:"United States"},{code:"ca",name:"Canada"},{code:"br",name:"Brazil"},{code:"mx",name:"Mexico"},{code:"ar",name:"Argentina"},{code:"au",name:"Australia"},{code:"nz",name:"New Zealand"},{code:"cn",name:"China"},{code:"jp",name:"Japan"},{code:"kr",name:"South Korea"},{code:"sg",name:"Singapore"}],zX=()=>{const{ref:e,isInView:t}=ra(.2),n=Math.ceil(Zd.length/2),r=Zd.slice(0,n),s=Zd.slice(n),i=({items:a,reverse:o=!1,duration:l=60})=>h.jsxs("div",{className:"group relative overflow-hidden",children:[h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-24 md:w-40 bg-gradient-to-r from-white via-white/90 to-transparent z-10 pointer-events-none"}),h.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-24 md:w-40 bg-gradient-to-l from-white via-white/90 to-transparent z-10 pointer-events-none"}),h.jsx("div",{className:"flex gap-3 md:gap-4 items-center will-change-transform group-hover:[animation-play-state:paused]",style:{width:"max-content",animation:`ticker-scroll ${l}s linear infinite`,animationDirection:o?"reverse":"normal"},children:[...a,...a,...a].map((c,u)=>h.jsxs("div",{className:"flex-shrink-0 inline-flex items-center gap-2.5 px-5 py-2.5 rounded-full bg-white/70 backdrop-blur-md border border-gray-200/70 shadow-[0_2px_10px_-2px_rgba(15,23,42,0.06)] hover:border-[#F9A01B]/50 hover:shadow-[0_8px_28px_-8px_rgba(249,160,27,0.35)] hover:-translate-y-0.5 transition-all duration-300 cursor-default select-none",children:[h.jsx(I2,{code:c.code,name:c.name,size:18}),h.jsx("span",{className:"text-gray-700 text-sm font-semibold tracking-wide whitespace-nowrap",children:c.name})]},`${c.code}-${u}`))})]});return h.jsxs("section",{ref:e,className:"relative bg-white border-y border-gray-100 py-12 md:py-14 overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0 pointer-events-none opacity-60",children:[h.jsx("div",{className:"absolute top-1/2 left-1/4 -translate-y-1/2 w-[400px] h-[200px] rounded-full blur-[120px] bg-[#F9A01B]/5"}),h.jsx("div",{className:"absolute top-1/2 right-1/4 -translate-y-1/2 w-[400px] h-[200px] rounded-full blur-[120px] bg-[#2CC5F4]/5"})]}),h.jsxs("div",{className:"relative max-w-[1320px] mx-auto px-6 md:px-10 mb-8",children:[h.jsx("p",{className:`text-center uppercase tracking-[3px] text-4xl font-extrabold text-slate-700 ${t?"animate-blur-in":"opacity-0"}`,children:"Trusted by Healthcare Professionals Across"}),h.jsxs("p",{className:`text-center mt-2 animate-fade-up text-lg text-amber-500 ${t?"":"op
477acity-0"}`,style:{animationDelay:"0.15s"},children:[Zd.length,"+ countries · global healthcare reach"]})]}),h.jsxs("div",{className:`relative space-y-3 md:space-y-4 ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.25s"},children:[h.jsx(i,{items:r,duration:140}),h.jsx(i,{items:s,reverse:!0,duration:170})]})]})},JR=b.createContext({});function BX(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const VX=typeof window<"u",UX=VX?b.useLayoutEffect:b.useEffect,yw=b.createContext(null);function vw(e,t){e.indexOf(t)===-1&&e.push(t)}function Uf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ws=(e,t,n)=>n>t?t:n<e?e:n;let Gp=()=>{},_l=()=>{};const Yi={},QR=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function XR(e){return typeof e=="object"&&e!==null}const eO=e=>/^0[^.\s]+$/u.test(e);function tO(e){let t;return()=>(t===void 0&&(t=e()),t)}const cr=e=>e,HX=(e,t)=>n=>t(e(n)),Xu=(...e)=>e.reduce(HX),Pu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class xw{constructor(){this.subscriptions=[]}add(t){return vw(this.subscriptions,t),()=>Uf(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Nn=e=>e*1e3,or=e=>e/1e3;function nO(e,t){return t?e*(1e3/t):0}const rO=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,WX=1e-7,qX=12;function ZX(e,t,n,r,s){let i,a,o=0;do a=t+(n-t)/2,i=rO(a,r,s)-e,i>0?n=a:t=a;while(Math.abs(i)>WX&&++o<qX);return a}function ed(e,t,n,r){if(e===t&&n===r)return cr;const s=i=>ZX(i,0,1,e,n);return i=>i===0||i===1?i:rO(s(i),t,r)}const sO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,iO=e=>t=>1-e(1-t),aO=ed(.33,1.53,.69,.99),ww=iO(aO),oO=sO(ww),lO=e=>e>=1?1:(e*=2)<1?.5*ww(e):.5*(2-Math.pow(2,-10*(e-1))),bw=e=>1-Math.sin(Math.acos(e)),cO=iO(bw),uO=sO(bw),GX=ed(.42,0,1,1),KX=ed(0,0,.58,1),dO=ed(.42,0,.58,1),YX=e=>Array.isArray(e)&&typeof e[0]!="number",hO=e=>Array.isArray(e)&&typeof e[0]=="number",XS={linear:cr,easeIn:GX,easeInOut:dO,easeOut:KX,circIn:bw,circInOut:uO,circOut:cO,backIn:ww,backInOut:oO,backOut:aO,anticipate:lO},JX=e=>typeof e=="string",eE=e=>{if(hO(e)){_l(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return ed(t,n,r,s)}else if(JX(e))return _l(XS[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),XS[e];return e},Gd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tE={value:null,addProjectionMetrics:null};function QX(e,t){let n=new Set,r=new Set,s=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){a.has(d)&&(u.schedule(d),e()),l++,d(o)}const u={schedule:(d,p=!1,f=!1)=>{const x=f&&s?n:r;return p&&a.add(d),x.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(o=d,s){i=!0;return}s=!0;const p=n;n=r,r=p,n.forEach(c),t&&tE.value&&tE.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const XX=40;function fO(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Gd.reduce((m,_)=>(m[_]=QX(i,t?_:void 0),m),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:f,postRender:v}=a,x=()=>{const m=Yi.useManualTiming,_=m?s.timestamp:performance.now();n=!1,m||(s.delta=r?1e3/60:Math.max(Math.min(_-s.timestamp,XX),1)),s.timestamp=_,s.isProcessing=!0,o.process(s),l.process(s),c.process(s),u.process(s),d.process(s),p.process(s),f.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(x))},w=()=>{n=!0,r=!0,s.isProcessing||e(x)};return{schedule:Gd.reduce((m,_)=>{const k=a[_];return m[_]=(S,E=!1,P=!1)=>(n||w(),k.schedule(S,E,P)),m},{}),cancel:m=>{for(let _=0;_<Gd.length;_++)a[Gd[_]].cancel(m)},state:s,steps:a}}const{schedule:qe,cancel:Ji,state:Wt,steps:vg}=fO(typeof requestAnimationFrame<"u"?requestAnimationFrame:cr,!0);let Th;function eee(){Th=void 0}const dn={now:()=>(Th===void 0&&dn.set(Wt.isProcessing||Yi.useManualTiming?Wt.timestamp:performance.now()),Th),set:e=>{Th=e,queueMicrotask(eee)}},pO=e=>t=>typeof t=="string"&&t.startsWith(e),mO=pO("--"),tee=pO("var(--"),_w=e=>tee(e)?nee.test(e.split("/*")[0].trim()):!1,nee=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nE(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const $l={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ju={...$l,transform:e=>ws(0,1,e)},Kd={...$l,default:1}
vendor: 14,669 bytes, line 477
477,Vc=e=>Math.round(e*1e5)/1e5,kw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ree(e){return e==null}const see=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sw=(e,t)=>n=>!!(typeof n=="string"&&see.test(n)&&n.startsWith(e)||t&&!ree(n)&&Object.prototype.hasOwnProperty.call(n,t)),gO=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,o]=r.match(kw);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},iee=e=>ws(0,255,e),xg={...$l,transform:e=>Math.round(iee(e))},Ea={test:Sw("rgb","red"),parse:gO("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+xg.transform(e)+", "+xg.transform(t)+", "+xg.transform(n)+", "+Vc(ju.transform(r))+")"};function aee(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const qv={test:Sw("#"),parse:aee,transform:Ea.transform},td=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ci=td("deg"),ms=td("%"),de=td("px"),oee=td("vh"),lee=td("vw"),rE={...ms,parse:e=>ms.parse(e)/100,transform:e=>ms.transform(e*100)},Lo={test:Sw("hsl","hue"),parse:gO("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ms.transform(Vc(t))+", "+ms.transform(Vc(n))+", "+Vc(ju.transform(r))+")"},At={test:e=>Ea.test(e)||qv.test(e)||Lo.test(e),parse:e=>Ea.test(e)?Ea.parse(e):Lo.test(e)?Lo.parse(e):qv.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ea.transform(e):Lo.transform(e),getAnimatableNone:e=>{const t=At.parse(e);return t.alpha=0,At.transform(t)}},cee=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uee(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kw))==null?void 0:t.length)||0)+(((n=e.match(cee))==null?void 0:n.length)||0)>0}const yO="number",vO="color",dee="var",hee="var(",sE="${}",fee=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const o=t.replace(fee,l=>(At.test(l)?(r.color.push(i),s.push(vO),n.push(At.parse(l))):l.startsWith(hee)?(r.var.push(i),s.push(dee),n.push(l)):(r.number.push(i),s.push(yO),n.push(parseFloat(l))),++i,sE)).split(sE);return{values:n,split:o,indexes:r,types:s}}function pee(e){return kl(e).values}function xO({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const a=t[i];a===yO?s+=Vc(r[i]):a===vO?s+=At.transform(r[i]):s+=r[i]}return s}}function mee(e){return xO(kl(e))}const gee=e=>typeof e=="number"?0:At.test(e)?At.getAnimatableNone(e):e,yee=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gee(e);function vee(e){const t=kl(e);return xO(t)(t.values.map((r,s)=>yee(r,t.split[s])))}const Fr={test:uee,parse:pee,createTransformer:mee,getAnimatableNone:vee};function wg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xee({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,a=0;if(!t)s=i=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;s=wg(l,o,e+1/3),i=wg(l,o,e),a=wg(l,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Hf(e,t){return n=>n>0?t:e}const nt=(e,t,n)=>e+(t-e)*n,bg=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},wee=[qv,Ea,Lo],bee=e=>wee.find(t=>t.test(e));function iE(e){const t=bee(e);if(Gp(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Lo&&(n=xee(n)),n}const aE=(e,t)=>{const n=iE(e),r=iE(t);if(!n||!r)return Hf(e,t);const s={...n};return i=>(s.red=bg(n.red,r.red,i),s.green=bg(n.green,r.green,i),s.blue=bg(n.blue,r.blue,i),s.alpha=nt(n.alpha,r.alpha,i),Ea.transform(s))},Zv=new Set(["none","hidden"]);function _ee(e,t){return Zv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kee(e,t){return n=>nt(e,t,n)}function Ew(e){return typeof e=="number"?kee:typeof e=="string"?_w(e)?Hf:At.test(e)?aE:Cee:Array.isArray(e)?wO:typeof e=="object"?At.test(e)?aE:See:Hf}function wO(e,t){const n=[...e],r=n.length,s=e.map((i,a)=>Ew(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function See(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Ew(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function Eee(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][r[i]],o=e.values[a]??0;n[s]=o,r[i]++}return n}const Cee=(e,t)=>{const n=Fr.createTransformer(t),r=kl(e),s=kl(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Zv.has(e)&&!s.values.length||Zv.has(t)&&!r.values.length?_ee(e,t):Xu(wO(Eee(r,s),s.values),n):(Gp(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Hf(e,t))};function bO(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?nt(e,t,n):Ew(e)(e,t)}const Tee=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>qe.update(t,n),stop:()=>Ji(t),now:()=>Wt.isProcessing?Wt.timestamp:dn.now()}},_O=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Wf=2e4;function Cw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wf;)t+=n,r=e.next(t);return t>=Wf?1/0:t}function Aee(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Cw(r),Wf);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:or(s)}}const ut={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Gv(e,t){return e*Math.sqrt(1-t*t)}const Pee=12;function jee(e,t,n){let r=n;for(let s=1;s<Pee;s++)r=r-e(r)/t(r);return r}const _g=.001;function Nee({duration:e=ut.duration,bounce:t=ut.bounce,velocity:n=ut.velocity,mass:r=ut.mass}){let s,i;Gp(e<=Nn(ut.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=ws(ut.minDamping,ut.maxDamping,a),e=ws(ut.minDuration,ut.maxDuration,or(e)),a<1?(s=c=>{const u=c*a,d=u*e,p=u-n,f=Gv(c,a),v=Math.exp(-d);return _g-p/f*v},i=c=>{const d=c*a*e,p=d*n+n,f=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),x=Gv(Math.pow(c,2),a);return(-s(c)+_g>0?-1:1)*((p-f)*v)/x}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-_g+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const o=5/e,l=jee(s,i,o);if(e=Nn(e),isNaN(l))return{stiffness:ut.stiffness,damping:ut.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Ree=["duration","bounce"],Oee=["stiffness","damping","mass"];function oE(e,t){return t.some(n=>e[n]!==void 0)}function Iee(e){let t={velocity:ut.velocity,stiffness:ut.stiffness,damping:ut.damping,mass:ut.mass,isResolvedFromDuration:!1,...e};if(!oE(e,Oee)&&oE(e,Ree))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*ws(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ut.mass,stiffness:s,damping:i}}else{const n=Nee({...e,velocity:0});t={...t,...n,mass:ut.mass},t.isResolvedFromDuration=!0}return t}function qf(e=ut.visualDuration,t=ut.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=Iee({...n,velocity:-or(n.velocity||0)}),v=p||0,x=c/(2*Math.sqrt(l*u)),w=a-i,g=or(Math.sqrt(l/u)),y=Math.abs(w)<5;r||(r=y?ut.restSpeed.granular:ut.restSpeed.default),s||(s=y?ut.restDelta.granular:ut.restDelta.default);let m,_,k,S,E,P;if(x<1)k=Gv(g,x),S=(v+x*g*w)/k,m=R=>{const M=Math.exp(-x*g*R);return a-M*(S*Math.sin(k*R)+w*Math.cos(k*R))},E=x*g*S+w*k,P=x*g*w-S*k,_=R=>Math.exp(-x*g*R)*(E*Math.sin(k*R)+P*Math.cos(k*R));else if(x===1){m=M=>a-Math.exp(-g*M)*(w+(v+g*w)*M);const R=v+g*w;_=M=>Math.exp(-g*M)*(g*R*M-v)}else{const R=g*Math.sqrt(x*x-1);m=F=>{const q=Math.exp(-x*g*F),K=Math.min(R*F,300);return a-q*((v+x*g*w)*Math.sinh(K)+R*w*Math.cosh(K))/R};const M=(v+x*g*w)/R,O=x*g*M-w*R,W=x*g*w-M*R;_=F=>{const q=Math.exp(-x*g*F),K=Math.min(R*F,300);return q*(O*Math.sinh(K)+W*Math.cosh(K))}}const j={calculatedDuration:f&&d||null,velocity:R=>Nn(_(R)),next:R=>{if(!f&&x<1){const O=Math.exp(-x*g*R),W=Math.sin(k*R),F=Math.cos(k*R),q=a-O*(S*W+w*F),K=Nn(O*(E*W+P*F));return o.done=Math.abs(K)<=r&&Math.abs(a-q)<=s,o.value=o.done?a:q,o}const M=m(R);if(f)o.done=R>=d;else{const O=Nn(_(R));o.done=Math.abs(O)<=r&&Math.abs(a-M)<=s}return o.value=o.done?a:M,o},toString:()=>{const R=Math.min(Cw(j),Wf),M=_O(O=>j.next(R*O).value,R,30);return R+"ms "+M},toTransition:()=>{}};return j}qf.applyToOptions=e=>{const t=Aee(e,100,qf);return e.ease=t.ease,e.duration=Nn(t.duration),e.type="keyframes",e};const Dee=5;function kO(e,t,n){const r=Math.max(t-Dee,0);return nO(n-e(r),t-r)}function Kv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:o,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=P=>o!==void 0&&P<o||l!==void 0&&P>l,v=P=>o===void 0?l:l===void 0||Math.abs(o-P)<Math.abs(l-P)?o:l;let x=n*t;const w=d+x,g=a===void 0?w:a(w);g!==w&&(x=g-d);const y=P=>-x*Math.exp(-P/r),m=P=>g+y(P),_=P=>{const j=y(P),R=m(P);p.done=Math.abs(j)<=c,p.value=p.done?g:R};let k,S;const E=P=>{f(p.value)&&(k=P,S=qf({keyframes:[p.value,v(p.value)],velocity:kO(m,P,p.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:P=>{let j=!1;return!S&&k===void 0&&(j=!0,_(P),E(P)),k!==void 0&&P>=k?S.next(P-k):(!j&&_(P),p)}}}function Lee(e,t,n){const r=[],s=n||Yi.mix||bO,i=e.length-1;for(let a=0;a<i;a++){let o=s(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||cr:t;o=Xu(l,o)}r.push(o)}return r}function Mee(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(_l(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Lee(t,r,s),l=o.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const p=Pu(e[d],e[d+1],u);return o[d](p)};return n?u=>c(ws(e[0],e[i-1],u)):c}function $ee(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Pu(0,t,r);e.push(nt(n,1,s))}}function Fee(e){const t=[0];return $ee(t,e.length-1),t}function zee(e,t){return e.map(n=>n*t)}function Bee(e,t){return e.map(()=>t||dO).splice(0,e.length-1)}function Uc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=YX(r)?r.map(eE):eE(r),i={done:!1,value:t[0]},a=zee(n&&n.length===t.length?n:Fee(t),e),o=Mee(a,t,{ease:Array.isArray(s)?s:Bee(t,s)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const Vee=e=>e!==null;function Kp(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(Vee),o=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Uee={decay:Kv,inertia:Kv,tween:Uc,keyframes:Uc,spring:qf};function SO(e){typeof e.type=="string"&&(e.type=Uee[e.type])}class Tw{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Hee=e=>e/100;class Zf extends Tw{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==dn.now()&&this.tick(dn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;SO(t);const{type:n=Uc,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=t;let{keyframes:o}=t;const l=n||Uc;l!==Uc&&typeof o[0]!="number"&&(this.mixKeyframes=Xu(Hee,bO(o[0],o[1])),o=[0,100]);const c=l({...t,keyframes:o});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Cw(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:p,repeatDelay:f,type:v,onUpdate:x,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let m=this.currentTime,_=r;if(d){const P=Math.min(this.currentTime,s)/o;let j=Math.floor(P),R=P%1;!R&&P>=1&&(R=1),R===1&&j--,j=Math.min(j,d+1),!!(j%2)&&(p==="reverse"?(R=1-R,f&&(R-=f/o)):p==="mirror"&&(_=a)),m=ws(0,1,R)*o}let k;y?(this.delayState.value=u[0],k=this.delayState):k=_.next(m),i&&!y&&(k.value=i(k.value));let{done:S}=k;!y&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return E&&v!==Kv&&(k.value=Kp(u,this.options,w,this.speed)),x&&x(k.value),E&&this.finish(),
477k}then(t,n){return this.finished.then(t,n)}get duration(){return or(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+or(t)}get time(){return or(this.currentTime)}set time(t){t=Nn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return kO(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(dn.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=or(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=Tee,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(dn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Wee(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ca=e=>e*180/Math.PI,Yv=e=>{const t=Ca(Math.atan2(e[1],e[0]));return Jv(t)},qee={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yv,rotateZ:Yv,skewX:e=>Ca(Math.atan(e[1])),skewY:e=>Ca(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Jv=e=>(e=e%360,e<0&&(e+=360),e),lE=Yv,cE=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uE=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Zee={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cE,scaleY:uE,scale:e=>(cE(e)+uE(e))/2,rotateX:e=>Jv(Ca(Math.atan2(e[6],e[5]))),rotateY:e=>Jv(Ca(Math.atan2(-e[2],e[0]))),rotateZ:lE,rotate:lE,skewX:e=>Ca(Math.atan(e[4])),skewY:e=>Ca(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Qv(e){return e.includes("scale")?1:0}function Xv(e,t){if(!e||e==="none")return Qv(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Zee,s=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qee,s=o}if(!s)return Qv(t);const i=r[t],a=s[1].split(",").map(Kee);return typeof i=="function"?i(a):a[i]}const Gee=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xv(n,t)};function Kee(e){return parseFloat(e.trim())}const Fl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zl=new Set(Fl),dE=e=>e===$l||e===de,Yee=new Set(["x","y","z"]),Jee=Fl.filter(e=>!Yee.has(e));function Qee(e){const t=[];return Jee.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ai={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Xv(t,"x"),y:(e,{transform:t})=>Xv(t,"y")};Ai.translateX=Ai.x;Ai.translateY=Ai.y;const La=new Set;let e0=!1,t0=!1,n0=!1;function EO(){if(t0){const e=Array.from(La).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Qee(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);
477s&&s.forEach(([i,a])=>{var o;(o=r.getValue(i))==null||o.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}t0=!1,e0=!1,La.forEach(e=>e.complete(n0)),La.clear()}function CO(){La.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(t0=!0)})}function Xee(){n0=!0,CO(),EO(),n0=!1}class Aw{constructor(t,n,r,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(La.add(this),e0||(e0=!0,qe.read(CO),qe.resolveKeyframes(EO))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const o=r.readValue(n,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}Wee(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),La.delete(this)}cancel(){this.state==="scheduled"&&(La.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ete=e=>e.startsWith("--");function TO(e,t,n){ete(t)?e.style.setProperty(t,n):e.style[t]=n}const tte={};function AO(e,t){const n=tO(e);return()=>tte[t]??n()}const nte=AO(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),PO=AO(()=>{try{document.createElement("div").animate({opacity:0}
477,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xc([0,.65,.55,1]),circOut:xc([.55,0,1,.45]),backIn:xc([.31,.01,.66,-.59]),backOut:xc([.33,1.53,.69,.99])};function jO(e,t){if(e)return typeof e=="function"?PO()?_O(e,t):"ease-out":hO(e)?xc(e):Array.isArray(e)?e.map(n=>jO(n,t)||hE.easeOut):hE[e]}function rte(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:o="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=jO(o,s);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(u,p)}function NO(e){return typeof e=="function"&&"applyToOptions"in e}function ste({type:e,...t}){return NO(e)&&PO()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class RO extends Tw{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,_l(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=ste(t);this.animation=rte(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Kp(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(u),TO(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return or(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+or(t)}get time(){return or(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Nn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&nte()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),cr):s(this)}}const OO={anticipate:lO,backInOut:oO,circInOut:uO};function ite(e){return e in OO}function ate(e){typeof e.ease=="string"&&ite(e.ease)&&(e.ease=OO[e.ease])}const kg=10;class ote extends RO{constructor(t){ate(t),SO(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new Zf({...a,autoplay:!1}),l=Math.max(kg,dn.now()-this.startTime),c=ws(0,kg,l-kg),u=o.sample(l).value,{name:d}=this.options;i&&d&&TO(i,d,u),n.setWithVelocity(o.sample(Math.max(0,l-c)).value,u,c),o.stop()}}const fE=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Fr.test(e)||e==="0")&&!e.startsWith("url("));function lte(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cte(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=fE(s,t),o=fE(i,t);return Gp(a===o,`You are trying to animate ${t} from "${s}" to "${i}". "${a?i:s}" is not an animatable value.`,"value-not-animatable"),!a||!o?!1:lte(e)||(n==="spring"||NO(n))&&r}function r0(e){e.duration=0,e.type="keyframes"}const IO=new Set(["opacity","clipPath","filter","transform"]),ute=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function dte(e){for(let t=0;t<e.length;
477t++)if(typeof e[t]=="string"&&ute.test(e[t]))return!0;return!1}const hte=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fte=tO(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pte(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:a,keyframes:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return fte()&&n&&(IO.has(n)||hte.has(n)&&dte(o))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const mte=40;class gte extends Tw{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:o,name:l,motionValue:c,element:u,...d}){var v;super(),this.stop=()=>{var x,w;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=dn.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},f=(u==null?void 0:u.KeyframeResolver)||Aw;this.keyframeResolver=new f(o,(x,w,g)=>this.onKeyframesResolved(x,w,p,!g),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var g,y;this.keyframeResolver=void 0;const{name:i,type:a,velocity:o,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=dn.now();let d=!0;cte(t,i,a,o)||(d=!1,(Yi.instantAnimations||!l)&&(u==null||u(Kp(t,r,n))),t[0]=t[t.length-1],r0(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>mte?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=d&&!c&&pte(f),x=(y=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:y.current;let w;if(v)try{w=new ote({...f,element:x})}catch{w=new Zf(f)}else w=new Zf(f);w.finished.then(()=>{this.notifyFinished()}).catch(cr),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Xee()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function DO(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,o=(a-1)*r;return typeof n=="function"?n(i,a):s===1?i*r:o-i*r}const yte=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vte(e){const t=yte.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const xte=4;function LO(e,t,n=1){_l(n<=xte,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=vte(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return QR(a)?parseFloat(a):a}return _w(s)?LO(s,t,n+1):s}const wte={type:"spring",stiffness:500,damping:25,restSpeed:10},bte=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_te={type:"keyframes",duration:.8},kte={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ste=(e,{keyframes:t})=>t.length>2?_te:zl.has(e)?e.startsWith("scale")?bte(t[1]):wte:kte;function MO(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Pw(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?MO(n,e):n}const Ete=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Cte(e){for(const t in e)if(!Ete.has(t))return!0;return!1}const jw=(e,t,n,r={},s,i)=>a=>{const o=Pw(r,e)||{},l=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Nn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:s};Cte(o)||Object.assign(u,Ste(e,u)),u.duration&&(u.duration=Nn(u.duration)),u.repeatDelay&&(u.repeatDelay=Nn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(r0(u),u.delay===0&&(
vendor: 26,065 bytes, line 477
477d=!0)),(Yi.instantAnimations||Yi.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,r0(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,d&&!i&&t.get()!==void 0){const p=Kp(u.keyframes,o);if(p!==void 0){qe.update(()=>{u.onUpdate(p),u.onComplete()});return}}return o.isSync?new Zf(u):new gte(u)};function pE(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nw(e,t,n,r){if(typeof t=="function"){const[s,i]=pE(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=pE(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Ma(e,t,n){const r=e.getProps();return Nw(r,t,n!==void 0?n:r.custom,e)}const $O=new Set(["width","height","top","left","right","bottom",...Fl]),mE=30,Tte=e=>!isNaN(parseFloat(e));class Ate{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=dn.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Tte(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xw);const r=this.events[t].add(n);return t==="change"?()=>{r(),qe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>mE)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,mE);return nO(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Sl(e,t){return new Ate(e,t)}const s0=e=>Array.isArray(e);function Pte(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Sl(n))}function jte(e){return s0(e)?e[e.length-1]||0:e}function Nte(e,t){const n=Ma(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const o=jte(i[a]);Pte(e,a,o)}}const qt=e=>!!(e&&e.getVelocity);function Rte(e){return!!(qt(e)&&e.add)}function i0(e,t){const n=e.getValue("willChange");if(Rte(n))return n.add(t);if(!n&&Yi.WillChange){const r=new Yi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rw(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ote="framerAppearId",FO="data-"+Rw(Ote);function zO(e){return e.props[FO]}function Ite({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function BO(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...o}=t;const l=e.getDefaultTransition();i=i?MO(i,l):l;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const p in o){const f=e.getValue(p,e.latestValues[p]??null),v=o[p];if(v===void 0||d&&Ite(d,p))continue;const x={delay:n,...Pw(i||{},p)},w=f.get();if(w!==void 0&&!f.isAnimating()&&!Array.isArray(v)&&v===w&&!x.velocity){qe.update(()=>f.set(v));continue}let g=!1;if(window.MotionHandoffAnimation){const _=zO(e);if(_){const k=window.MotionHandoffAnimation(_,p,qe);k!==null&&(x.startTime=k,g=!0)}}i0(e,p);const y=c??e.shouldReduceMotion;f.start(jw(p,f,v,y&&$O.has(p)?{type:!1}:x,e,g));const m=f.animation;m&&u.push(m)}if(a){const p=()=>qe.update(()=>{a&&Nte(e,a)});u.length?Promise.all(u).then(p):p()}return u}function a0(e,t,n={}){var l;const r=Ma(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(BO(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:p}=s;return Dte(e,t,c,u,d,p,n)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,u]=o==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Dte(e,t,n=0,r=0,s=0,i=1,a){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(a0(l,t,{...a,delay:n+(typeof r=="function"?0:r)+DO(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}function Lte(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>a0(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=a0(e,t,n);else{const s=typeof t=="function"?Ma(e,t,n.custom):t;r=Promise.all(BO(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Mte={test:e=>e==="auto",parse:e=>e},VO=e=>t=>t.test(e),UO=[$l,de,ms,ci,lee,oee,Mte],gE=e=>UO.find(VO(e));function $te(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||eO(e):!0}const Fte=new Set(["brightness","contrast","saturate","opacity"]);function zte(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kw)||[];if(!r)return e;const s=n.replace(r,"");let i=Fte.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Bte=/\b([a-z-]*)\(.*?\)/gu,o0={...Fr,getAnimatableNone:e=>{const t=e.match(Bte);return t?t.map(zte).join(" "):e}},l0={...Fr,getAnimatableNone:e=>{const t=Fr.parse(e);return Fr.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},yE={...$l,transform:Math.round},Vte={rotate:ci,rotateX:ci,rotateY:ci,rotateZ:ci,scale:Kd,scaleX:Kd,scaleY:Kd,scaleZ:Kd,skew:ci,skewX:ci,skewY:ci,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:ju,originX:rE,originY:rE,originZ:de},Ow={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,top:de,right:de,bottom:de,left:de,inset:de,insetBlock:de,insetBlockStart:de,insetBlockEnd:de,insetInline:de,insetInlineStart:de,insetInlineEnd:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,paddingBlock:de,paddingBlockStart:de,paddingBlockEnd:de,paddingInline:de,paddingInlineStart:de,paddingInlineEnd:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,marginBlock:de,marginBlockStart:de,marginBlockEnd:de,marginInline:de,marginInlineStart:de,marginInlineEnd:de,fontSize:de,backgroundPositionX:de,backgroundPositionY:de,...Vte,zIndex:yE,fillOpacity:ju,strokeOpacity:ju,numOctaves:yE},Ute={...Ow,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:o0,WebkitFilter:o0,mask:l0,WebkitMask:l0},HO=e=>Ute[e],Hte=new Set([o0,l0]);function WO(e,t){let n=HO(e);return Hte.has(n)||(n=Fr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Wte=new Set(["auto","none","0"]);function qte(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!Wte.has(i)&&kl(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=WO(n,s)}class Zte extends Aw{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),_w(d))){const p=LO(d,n.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!$O.has(r)||t.length!==2)return;const[s,i]=t,a=gE(s),o=gE(i),l=nE(s),c=nE(i);if(l!==c&&Ai[r]){this.needsMeasurement=!0;return}if(a!==o)if(dE(a)&&dE(o))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Ai[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||$te(t[s]))&&r.push(s);r.length&&qte(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ai[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var o;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Ai[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function qO(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const ZO=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gte(e){return XR(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Iw,cancel:hoe}=fO(queueMicrotask,!1),Er={x:!1,y:!1};function GO(){return Er.x||Er.y}function Kte(e){return e==="x"||e==="y"?Er[e]?null:(Er[e]=!0,()=>{Er[e]=!1}):Er.x||Er.y?null:(Er.x=Er.y=!0,()=>{Er.x=Er.y=!1})}function KO(e,t){const n=qO(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Yte(e){return!(e.pointerType==="touch"||GO())}function Jte(e,t,n={}){const[r,s,i]=KO(e,n);return r.forEach(a=>{let o=!1,l=!1,c;const u=()=>{a.removeEventListener("pointerleave",v)},d=w=>{c&&(c(w),c=void 0),u()},p=w=>{o=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),l&&(l=!1,d(w))},f=()=>{o=!0,window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",p,s)},v=w=>{if(w.pointerType!=="touch"){if(o){l=!0;return}d(w)}},x=w=>{if(!Yte(w))return;l=!1;const g=t(a,w);typeof g=="function"&&(c=g,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",x,s),a.addEventListener("pointerdown",f,s)}),i}const YO=(e,t)=>t?e===t?!0:YO(e,t.parentElement):!1,Dw=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Qte=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Xte(e){return Qte.has(e.tagName)||e.isContentEditable===!0}const ene=new Set(["INPUT","SELECT","TEXTAREA"]);function tne(e){return ene.has(e.tagName)||e.isContentEditable===!0}const Ah=new WeakSet;function vE(e){return t=>{t.key==="Enter"&&e(t)}}function Sg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nne=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=vE(()=>{if(Ah.has(n))return;Sg(n,"down");const s=vE(()=>{Sg(n,"up")}),i=()=>Sg(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function xE(e){return Dw(e)&&!GO()}const wE=new WeakSet;function rne(e,t,n={}){const[r,s,i]=KO(e,n),a=o=>{const l=o.currentTarget;if(!xE(o)||wE.has(o))return;Ah.add(l),n.stopPropagation&&wE.add(o);const c=t(l,o),u=(f,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",p),Ah.has(l)&&Ah.delete(l),xE(f)&&typeof c=="function"&&c(f,{success:v})},d=f=>{u(f,l===window||l===document||n.useGlobalTarget||YO(l,f.target))},p=f=>{u(f,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",p,s)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),Gte(o)&&(o.addEventListener("focus",c=>nne(c,s)),!Xte(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),i}function Lw(e){return XR(e)&&"ownerSVGElement"in e}const Ph=new WeakMap;let ui;const JO=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Lw(r)&&"getBBox"in r?r.getBBox()[t]:r[n],sne=JO("inline","width","offsetWidth"),ine=JO("block","height","offsetHeight");function ane({target:e,borderBoxSize:t}){var n;(n=Ph.get(e))==null||n.forEach(r=>{r(e,{get width(){return sne(e,t)},get height(){return ine(e,t)}})})}function one(e){e.forEach(ane)}function lne(){typeof ResizeObserver>"u"||(ui=new ResizeObserver(one))}function cne(e,t){ui||lne();const n=qO(e);return n.forEach(r=>{let s=Ph.get(r);s||(s=new Set,Ph.set(r,s)),s.add(t),ui==null||ui.observe(r)}),()=>{n.forEach(r=>{const s=Ph.get(r);s==null||s.delete(t),s!=null&&s.size||ui==null||ui.unobserve(r)})}}const jh=new Set;let Mo;function une(){Mo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};jh.forEach(t=>t(e))},window.addEventListener("resize",Mo)}function dne(e){return jh.add(e),Mo||une(),()=>{jh.delete(e),!jh.size&&typeof Mo=="function"&&(window.removeEventListener("resize",Mo),Mo=void 0)}}function bE(e,t){return typeof e=="function"?dne(e):cne(e,t)}function hne(e){return Lw(e)&&e.tagName==="svg"}const fne=[...UO,At,Fr],pne=e=>fne.find(VO(e)),_E=()=>({translate:0,scale:1,origin:0,originPoint:0}),$o=()=>({x:_E(),y:_E()}),kE=()=>({min:0,max:0}),Ot=()=>({x:kE(),y:kE()}),mne=new WeakMap;function Yp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Nu(e){return typeof e=="string"||Array.isArray(e)}const Mw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$w=["initial",...Mw];function Jp(e){return Yp(e.animate)||$w.some(t=>Nu(e[t]))}function QO(e){return!!(Jp(e)||e.variants)}function gne(e,t,n){for(const r in t){const s=t[r],i=n[r];if(qt(s))e.addValue(r,s);else if(qt(i))e.addValue(r,Sl(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Sl(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const c0={current:null},XO={current:!1},yne=typeof window<"u";function vne(){if(XO.current=!0,!!yne)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>c0.current=e.matches;e.addEventListener("change",t),t()}else c0.current=!1}const SE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Gf={};function eI(e){Gf=e}function xne(){return Gf}class wne{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Aw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=dn.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,qe.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Jp(n),this.isVariantNode=QO(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in p){const v=p[f];c[f]!==void 0&&qt(v)&&v.set(c[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,mne.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(XO.current||vne(),this.shouldReduceMotion=c0.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ji(this.notifyUpdate),Ji(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&IO.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:l,ease:c,duration:u}=n.accelerate,d=new RO({element:this.current,name:t,keyframes:o,times:l,ease:c,duration:Nn(u)}),p=a(d);this.valueSubscriptions.set(t,()=>{p(),d.cancel()});return}const r=zl.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gf){const n=Gf[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ot()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<SE.length;r++){const s=SE[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=t[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=gne(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Sl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(QR(r)||eO(r))?r=parseFloat(r):!pne(r)&&Fr.test(n)&&(r=WO(t,n)),this.setBaseTarget(t,qt(r)?r.get():r)),qt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Nw(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!qt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Iw.render(this.render)}}class tI extends wne{constructor(){super(...arguments),this.KeyframeResolver=Zte}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class sa{constructor(t){this.isMounted=!1,this.node=t}update(){}}function nI({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bne({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _ne(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Eg(e){return e===void 0||e===1}function u0({scale:e,scaleX:t,scaleY:n}){return!Eg(e)||!Eg(t)||!Eg(n)}function ga(e){return u0(e)||rI(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rI(e){return EE(e.x)||EE(e.y)}function EE(e){return e&&e!=="0%"}function Kf(e,t,n){const r=e-n,s=t*r;return n+s}function CE(e,t,n,r,s){return s!==void 0&&(e=Kf(e,s,r)),Kf(e,n,r)+t}function d0(e,t=0,n=1,r,s){e.min=CE(e.min,t,n,r,s),e.max=CE(e.max,t,n,r,s)}function sI(e,{x:t,y:n}){d0(e.x,t.translate,t.scale,t.originPoint),d0(e.y,n.translate,n.scale,n.originPoint)}const TE=.999999999999,AE=1.0000000000001;function kne(e,t,n,r=!1){var o;const s=n.length;if(!s)return;t.x=t.y=1;let i,a;for(let l=0;l<s;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(os(e.x,-i.scroll.offset.x),os(e.y,-i.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,sI(e,a)),r&&ga(i.latestValues)&&Nh(e,i.latestValues,(o=i.layout)==null?void 0:o.layoutBox))}t.x<AE&&t.x>TE&&(t.x=1),t.y<AE&&t.y>TE&&(t.y=1)}function os(e,t){e.min+=t,e.max+=t}function PE(e,t,n,r,s=.5){const i=nt(e.min,e.max,s);d0(e,t,n,i,r)}function jE(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Nh(e,t,n){const r=n??e;PE(e.x,jE(t.x,r.x),t.scaleX,t.scale,t.originX),PE(e.y,jE(t.y,r.y),t.scaleY,t.scale,t.originY)}function iI(e,t){return nI(_ne(e.getBoundingClientRect(),t))}function Sne(e,t,n){const r=iI(e,n),{scroll:s}=t;return s&&(os(r.x,s.offset.x),os(r.y,s.offset.y)),r}const Ene={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cne=Fl.length;function Tne(e,t,n){let r="",s=!0;for(let i=0;i<Cne;i++){const a=Fl[i],o=e[a];if(o===void 0)continue;let l=!0;if(typeof o=="number")l=o===(a.startsWith("scale")?1:0);else{const c=parseFloat(o);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=ZO(o,Ow[a]);if(!l){s=!1;const u=Ene[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Fw(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let a=!1,o=!1;for(const l in t){const c=t[l];if(zl.has(l)){a=!0;continue}else if(mO(l)){s[l]=c;continue}else{const u=ZO(c,Ow[l]);l.startsWith("origin")?(o=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=Tne(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function aI(e,{style:t,vars:n}
477,r,s){const i=e.style;let a;for(a in t)i[a]=t[a];s==null||s.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function NE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ac={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=NE(e,t.target.x),r=NE(e,t.target.y);return`${n}% ${r}%`}},Ane={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Fr.parse(e);if(s.length>5)return r;const i=Fr.createTransformer(e),a=typeof s[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;s[0+a]/=o,s[1+a]/=l;const c=nt(o,l,.5);return typeof s[2+a]=="number"&&(s[2+a]/=c),typeof s[3+a]=="number"&&(s[3+a]/=c),i(s)}},h0={borderRadius:{...ac,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ac,borderTopRightRadius:ac,borderBottomLeftRadius:ac,borderBottomRightRadius:ac,boxShadow:Ane};function oI(e,{layout:t,layoutId:n}){return zl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!h0[e]||e==="opacity")}function zw(e,t,n){var a;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const o in r)(qt(r[o])||s&&qt(s[o])||oI(o,e)||((a=n==null?void 0:n.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=r[o]);return i}function Pne(e){return window.getComputedStyle(e)}class jne extends tI{constructor(){super(...arguments),this.type="html",this.renderInstance=aI}readValueFromInstance(t,n){var r;if(zl.has(n))return(r=this.projection)!=null&&r.isProjecting?Qv(n):Gee(t,n);{const s=Pne(t),i=(mO(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return iI(t,n)}build(t,n,r){Fw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zw(t,n,r)}}const Nne={offset:"stroke-dashoffset",array:"stroke-dasharray"},Rne={offset:"strokeDashoffset",array:"strokeDasharray"};function One(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Nne:Rne;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const Ine=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function lI(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...o},l,c,u){if(Fw(e,o,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const f of Ine)d[f]!==void 0&&(p[f]=d[f],delete d[f]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&One(d,s,i,a,!1)}const cI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),uI=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Dne(e,t,n,r){aI(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(cI.has(s)?s:Rw(s),t.attrs[s])}function dI(e,t,n){const r=zw(e,t,n);for(const s in e)if(qt(e[s])||qt(t[s])){const i=Fl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class Lne extends tI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ot}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(zl.has(n)){const r=HO(n);return r&&r.default||0}return n=cI.has(n)?n:Rw(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return dI(t,n,r)}build(t,n,r){lI(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){Dne(t,n,r,s)}mount(t){this.isSVGTag=uI(t.tagName),super.mount(t)}}const Mne=$w.length;function hI(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hI(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Mne;n++){const r=$w[n],s=e.props[r];(Nu(s)||s===!1)&&(t[r]=s)}return t}function fI(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $ne=[...Mw].reverse(),Fne=Mw.length;function zne(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Lte(e,n,r)))}function Bne(e){let t=zne(e),n=RE(),r=!0,s=!1;const i=c=>(u,d)=>{var f;const p=Ma(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(p){const{transition:v,transitionEnd:x,...w}=p;u={...u,...w,...x}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,d=hI(e.parent)||{},p=[],f=new Set;let v={},x=1/0;for(let g=0;g<Fne;
vendor: 1,040 bytes, line 477
477g++){const y=$ne[g],m=n[y],_=u[y]!==void 0?u[y]:d[y],k=Nu(_),S=y===c?m.isActive:null;S===!1&&(x=g);let E=_===d[y]&&_!==u[y]&&k;if(E&&(r||s)&&e.manuallyAnimateOnMount&&(E=!1),m.protectedKeys={...v},!m.isActive&&S===null||!_&&!m.prevProp||Yp(_)||typeof _=="boolean")continue;if(y==="exit"&&m.isActive&&S!==!0){m.prevResolvedValues&&(v={...v,...m.prevResolvedValues});continue}const P=Vne(m.prevProp,_);let j=P||y===c&&m.isActive&&!E&&k||g>x&&k,R=!1;const M=Array.isArray(_)?_:[_];let O=M.reduce(i(y),{});S===!1&&(O={});const{prevResolvedValues:W={}}=m,F={...W,...O},q=D=>{j=!0,f.has(D)&&(R=!0,f.delete(D)),m.needsAnimating[D]=!0;const $=e.getValue(D);$&&($.liveStyle=!1)};for(const D in F){const $=O[D],C=W[D];if(v.hasOwnProperty(D))continue;let le=!1;s0($)&&s0(C)?le=!fI($,C):le=$!==C,le?$!=null?q(D):f.add(D):$!==void 0&&f.has(D)?q(D):m.protectedKeys[D]=!0}m.prevProp=_,m.prevResolvedValues=O,m.isActive&&(v={...v,...O}),(r||s)&&e.blockInitialAnimation&&(j=!1);const K=E&&P;j&&(!K||R)&&p.push(...M.map(D=>{const $={type:y};if(typeof D=="str
477ing"&&(r||s)&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:C}=e,le=Ma(C,D);if(C.enteringChildren&&le){const{delayChildren:oe}=le.transition||{};$.delay=DO(C.enteringChildren,e,oe)}}return{animation:D,options:$}}))}if(f.size){const g={};if(typeof u.initial!="boolean"){const y=Ma(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const m=e.getBaseTarget(y),_=e.getValue(y);_&&(_.liveStyle=!0),g[y]=m??null}),p.push({animation:g})}let w=!!p.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?t(p):Promise.resolve()}function l(c,u){var p;if(n[c].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(f=>{var v;return(v=f.animationState)==null?void 0:v.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=RE(),s=!0}}}function Vne(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fI(t,e):!1}function da(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RE(){return{animate:da(!0),whileInView:da(),whileHover:da(),whileTap:da(),whileDrag:da(),whileFocus:da(),exit:da()}}function f0(e,t){e.min=t.min,e.max=t.max}function _r(e,t){f0(e.x,t.x),f0(e.y,t.y)}function OE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const pI=1e-4,Une=1-pI,Hne=1+pI,mI=.01,Wne=0-mI,qne=0+mI;function hn(e){return e.max-e.min}function Zne(e,t,n){return Math.abs(e-t)<=n}function IE(e,t,n,r=.5){e.origin=r,e.originPoint=nt(t.min,t.max,e.origin),e.scale=hn(n)/hn(t),e.translate=nt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Une&&e.scale<=Hne||isNaN(e.scale))&&(e.scale=1),(e.translate>=Wne&&e.translate<=qne||isNaN(e.translate))&&(e.translate=0)}function Hc(e,t,n,r){IE(e.x,t.x,n.x,r?r.originX:void 0),IE(e.y,t.y,n.y,r?r.originY:void 0)}function DE(e,t,n,r=0){const s=r?nt(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+hn(t)}function Gne(e,t,n,r){DE(e.x,t.x,n.x,r==null?void 0:r.x),DE(e.y,t.y,n.y,r==null?void 0:r.y)}function LE(e,t,n,r=0){const s=r?nt(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+hn(t)}function Yf(e,t,n,r){LE(e.x,t.x,n.x,r==null?void 0:r.x),LE(e.y,t.y,n.y,r==null?void 0:r.y)}function ME(e,t,n,r,s){return e-=t,e=Kf(e,1/n,r),s!==void 0&&(e=Kf(e,1/s,r)),e}function Kne(e,t=0,n=1,r=.5,s,i=e,a=e){if(ms.test(t)&&(t=parseFloat(t),t=nt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=nt(i.min,i.max,r);e===i&&(o-=t),e.min=ME(e.min,t,n,o,s),e.max=ME(e.max,t,n,o,s)}function $E(e,t,[n,r,s],i,a){Kne(e,t[n],t[r],t[s],t.scale,i,a)}const Yne=["x","scaleX","originX"],Jne=["y","scaleY","originY"];function FE(e,t,n,r){$E(e.x,t,Yne,n?n.x:void 0,r?r.x:void 0),$E(e.y,t,Jne,n?n.y:void 0,r?r.y:void 0)}function zE(e){return e.translate===0&&e.scale===1}function gI(e){return zE(e.x)&&zE(e.y)}function BE(e,t){return e.min===t.min&&e.max===t.max}function Qne(e,t){return BE(e.x,t.x)&&BE(e.y,t.y)}function VE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yI(e,t){return VE(e.x,t.x)&&VE(e.y,t.y)}function UE(e){return hn(e.x)/hn(e.y)}function HE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Xr(e){return[e("x"),e("y")]}function Xne(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:p,skewX:f,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),v&&(r+=`skewY(${v}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const vI=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ere=vI.length,WE=e=>typeof e=="string"?parseFloat(e):e,qE=e=>typeof e=="number"||de.test(e);function tre(e,t,n,r,s,i){s?(e.opacity=nt(0,n.opacity??1,nre(r)),e.o
477pacityExit=nt(t.opacity??1,0,rre(r))):i&&(e.opacity=nt(t.opacity??1,n.opacity??1,r));for(let a=0;a<ere;a++){const o=vI[a];let l=ZE(t,o),c=ZE(n,o);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||qE(l)===qE(c)?(e[o]=Math.max(nt(WE(l),WE(c),r),0),(ms.test(c)||ms.test(l))&&(e[o]+="%")):e[o]=c}(t.rotate||n.rotate)&&(e.rotate=nt(t.rotate||0,n.rotate||0,r))}function ZE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nre=xI(0,.5,cO),rre=xI(.5,.95,cr);function xI(e,t,n){return r=>r<e?0:r>t?1:n(Pu(e,t,r))}function sre(e,t,n){const r=qt(e)?e:Sl(e);return r.start(jw("",r,t,n)),r.animation}function Ru(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const ire=(e,t)=>e.depth-t.depth;class are{constructor(){this.children=[],this.isDirty=!1}add(t){vw(this.children,t),this.isDirty=!0}remove(t){Uf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ire),this.isDirty=!1,this.children.forEach(t)}}function ore(e,t){const n=dn.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ji(r),e(i-t))};return qe.setup(r,!0),()=>Ji(r)}function Rh(e){return qt(e)?e.get():e}class lre{constructor(){this.members=[]}add(t){vw(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Uf(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Uf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:a}=t.options;(i===void 0||i!==a)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,a;(r=(n=t.options).onExitComplete)==null||r.call(n),(a=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||a.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Oh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Cg=["","X","Y","Z"],cre=1e3;let ure=0;function Tg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function wI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zO(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",qe,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&wI(r)}function bI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},o=t==null?void 0:t()){this.id=ure++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(fre),this.nodes.forEach(xre),this.nodes.forEac
vendor: 10,949 bytes, line 477
477h(wre),this.nodes.forEach(pre)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new are)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xw),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Lw(a)&&!hne(a),this.instance=a;const{layoutId:o,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),e){let u,d=0;const p=()=>this.root.updateBlockedByResize=!1;qe.read(()=>{d=window.innerWidth}),e(a,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=ore(p,250),Oh.hasAnimatedSinceResize&&(Oh.hasAnimatedSinceResize=!1,this.nodes.forEach(YE)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&c&&(o||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Ere,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=c.getProps(),g=!this.targetLayout||!yI(this.targetLayout,f),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const m={...Pw(v,"layout"),onPlay:x,onComplete:w};(c.shouldReduceMotion||this.options.layoutRoot)&&(m.delay=0,m.type=!1),this.startAnimation(m),this.setAnimationOrigin(u,y)}else d||YE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ji(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bre),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&wI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(gre),this.nodes.forEach(GE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yre),this.nodes.forEach(vre),this.nodes.forEach(dre),this.nodes.forEach(hre)):this.nodes.forEach(KE),this.clearAllSnapshots();const o=dn.now();Wt.delta=ws(0,1e3/60,o-Wt.timestamp),Wt.timestamp=o,Wt.isProcessing=!0,vg.update.process(Wt),vg.preRender.process(Wt),vg.render.process(Wt),Wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Iw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mre),this.sharedNodes.forEach(_re)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!hn(this.snapshot.measuredBox.x)&&!hn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ot()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!gI(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(o||ga(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),Cre(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:a}=this.options;if(!a)return Ot();const o=a.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Tre))){const{scroll:u}=this.root;u&&(os(o.x,u.offset.x),os(o.y,u.offset.y))}return o}removeElementScroll(a){var l;const o=Ot();if(_r(o,a),(l=this.scroll)!=null&&l.wasRoot)return o;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:p}=u;u!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&_r(o,a),os(o.x,d.offset.x),os(o.y,d.offset.y))}return o}applyTransform(a,o=!1,l){var u,d;const c=l||Ot();_r(c,a);for(let p=0;p<this.path.length;p++){const f=this.path[p];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(os(c.x,-f.scroll.offset.x),os(c.y,-f.scroll.offset.y)),ga(f.latestValues)&&Nh(c,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ga(this.latestValues)&&Nh(c,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),c}removeTransform(a){var l;const o=Ot();_r(o,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ga(u.latestValues))continue;let d;u.instance&&(u0(u.latestValues)&&u.updateSnapshot(),d=Ot(),_r(d,u.measurePageBox())),FE(o,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,d)}return ga(this.latestValues)&&FE(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Wt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Wt.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ot(),this.targetWithTransforms=Ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gne(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):_r(this.target,this.layout.layoutBox),sI(this.target,this.targetDelta)):_r(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||u0(this.parent.latestValues)||rI(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ot(),this.relativeTargetOrigin=Ot(),Yf(this.relativeTargetOrigin,o,l,this.options.layoutAnchor||void 0),_r(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,341 bytes, line 477
477(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Wt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;_r(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;kne(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ot());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(OE(this.prevProjectionDelta.x,this.projectionDelta.x),OE(this.prevProjectionDelta.y,this.projectionDelta.y)),Hc(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!HE(this.projectionDelta.x,this.prevProjectionDelta.x)||!HE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$o(),this.projectionDelta=$o(),this.projectionDeltaWithTransform=$o()}setAnimationOrigin(a,o=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=$o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const p=Ot(),f=l?l.source:void 0,v=this.layout?this.layout.source:void 0,x=f!==v,w=this.getStack(),g=!w||w.members.length<=1,y=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(Sre));this.animationProgress=0;let m;this.mixTargetDelta=_=>{const k=_/1e3;JE(d.x,a.x,k),JE(d.y,a.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),kre(this.relativeTarget,this.relativeTargetOrigin,p,k),m&&Qne(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=Ot()),_r(m,this.relativeTarget)),x&&(this.animationValues=u,tre(u,c,this.latestValues,k,y,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,l,c;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Ji(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qe.update(()=>{Oh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Sl(0)),this.motionValue.jump(0,!1),this.currentAnimation=sre(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),a.onUpdate&&a.onUpdate(u)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cre),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:c,latestValues:u}=a;if(!(!o||!l||!c)){if(this!==a&&this.layout&&c&&_I(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ot();const d=hn(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=hn(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}_r(o,l),Nh(o,u),Hc(this.projectionDeltaWithTransform,this.layoutCorrected,o,u)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new lre),this.sharedNodes.get(a).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}
vendor: 8,918 bytes, line 477
477resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const c={};l.z&&Tg("z",a,c,this.animationValues);for(let u=0;u<Cg.length;u++)Tg(`rotate${Cg[u]}`,a,c,this.animationValues),Tg(`skew${Cg[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Rh(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Rh(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ga(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Xne(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:p,y:f}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in h0){if(u[v]===void 0)continue;const{correct:x,applyTo:w,isCSSVariable:g}=h0[v],y=d==="none"?u[v]:x(u[v],c);if(w){const m=w.length;for(let _=0;_<m;_++)a[w[_]]=y}else g?this.options.visualElement.renderState.vars[v]=y:a[v]=y}this.options.layoutId&&(a.pointerEvents=c===this?Rh(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(GE),this.root.sharedNodes.clear()}}}function dre(e){e.updateLayout()}function hre(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i==="size")Xr(d=>{const p=a?t.measuredBox[d]:t.layoutBox[d],f=hn(p);p.min=r[d].min,p.max=p.min+f});else if(i==="x"||i==="y"){const d=i==="x"?"y":"x";f0(a?t.measuredBox[d]:t.layoutBox[d],r[d])}else _I(i,t.layoutBox,r)&&Xr(d=>{const p=a?t.measuredBox[d]:t.layoutBox[d],f=hn(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const o=$o();Hc(o,r,t.layoutBox);const l=$o();a?Hc(l,e.applyTransform(s,!0),t.measuredBox):Hc(l,r,t.layoutBox);const c=!gI(o);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const v=e.options.layoutAnchor||void 0,x=Ot();Yf(x,t.layoutBox,p.layoutBox,v);const w=Ot();Yf(w,r,f.layoutBox,v),yI(x,w)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=x,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function fre(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pre(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mre(e){e.clearSnapshot()}function GE(e){e.clearMeasurements()}function gre(e){e.isLayoutDirty=!0,e.updateLayout()}function KE(e){e.isLayoutDirty=!1}function yre(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function vre(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function YE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xre(e){e.resolveTargetDelta()}function wre(e){e.calcProjection()}function bre(e){e.resetSkewAndRotation()}function _re(e){e.removeLeadSnapshot()}function JE(e,t,n){e.translate=nt(t.translate,0,n),e.scale=nt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function QE(e,t,n,r){e.min=nt(t.min,n.min,r),e.max=nt(t.max,n.max,r)}function kre(e,t,n,r){QE(e.x,t.x,n.x,r),QE(e.y,t.y,n.y,r)}function Sre(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ere={duration:.45,ease:[.4,0,.1,1]},XE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eC=XE("applewebkit/")&&!XE("chrome/")?Math.round:cr;function tC(e){e.min=eC(e.min),e.max=eC(e.max)}function Cre(e){tC(e.x),tC(e.y)}function _I(e,t,n){return e==="position"||e==="preserve-aspect"&&!Zne(UE(t),UE(n),.2)}function Tre(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Are=bI({attachResizeListener:(e,t)=>Ru(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ag={current:void 0},kI=bI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ag.current){const e=new Are({});e.mount(window),e.setOptions({layoutScroll:!0}),Ag.current=e}return Ag.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),SI=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Pre(e=!0){const t=b.useContext(yw);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=b.useId();b.useEffect(()=>{if(e)return s(i)},[e]);const a=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const EI=b.createContext({strict:!1}),nC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let rC=!1;function jre(){if(rC)return;const e={};for(const t in nC)e[t]={isEnabled:n=>nC[t].some(r=>!!n[r])};eI(e),rC=!0}function CI(){return jre(),xne()}function Nre(e){const t=CI();for(const n in e)t[n]={...t[n],...e[n]};eI(t)}const Rre=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Jf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Rre.has(e)}let TI=e=>!Jf(e);function Ore(e){typeof e=="function"&&(TI=t=>t.startsWith("on")?!Jf(t):e(t))}try{Ore(require("@emotion/is-prop-valid").default)}catch{}function Ire(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||qt(e[s])||(TI(s)||n===!0&&Jf(s)||!t&&!Jf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Qp=b.createContext({});function Dre(e,t){if(Jp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nu(n)?n:void 0,animate:Nu(r)?r:void 0}}return e.inherit!==!1?t:{}}function Lre(e){const{initial:t,animate:n}=Dre(e,b.useContext(Qp));return b.useMemo(()=>({initial:t,animate:n}),[sC(t),sC(n)])}function sC(e){return Array.isArray(e)?e.join(" "):e}const Bw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function AI(e,t,n){for(const r in t)!qt(t[r])&&!oI(r,n)&&(e[r]=t[r])}function Mre({transformTemplate:e},t){return b.useMemo(()=>{const n=Bw();return Fw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $re(e,t){const n=e.style||{},r={};return AI(r,n,e),Object.assign(r,Mre(e,t)),r}function Fre(e,t){const n={},r=$re(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
477`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const PI=()=>({...Bw(),attrs:{}});function zre(e,t,n,r){const s=b.useMemo(()=>{const i=PI();return lI(i,t,uI(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};AI(i,e.style,e),s.style={...i,...s.style}}return s}const Bre=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vw(e){return typeof e!="string"||e.includes("-")?!1:!!(Bre.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vre(e,t,n,{latestValues:r},s,i=!1,a){const l=(a??Vw(e)?zre:Fre)(t,r,s,e),c=Ire(t,typeof e=="string",i),u=e!==b.Fragment?{...c,...l,ref:n}:{},{children:d}=t,p=b.useMemo(()=>qt(d)?d.get():d,[d]);return b.createElement(e,{...u,children:p})}function Ure({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Hre(n,r,s,e),renderState:t()}}function Hre(e,t,n,r){const s={},i=r(e,{});for(const p in i)s[p]=Rh(i[p]);let{initial:a,animate:o}=e;const l=Jp(e),c=QO(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?o:a;if(d&&typeof d!="boolean"&&!Yp(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const v=Nw(e,p[f]);if(v){const{transitionEnd:x,transition:w,...g}=v;for(const y in g){let m=g[y];if(Array.isArray(m)){const _=u?m.length-1:0;m=m[_]}m!==null&&(s[y]=m)}for(const y in x)s[y]=x[y]}}}return s}const jI=e=>(t,n)=>{const r=b.useContext(Qp),s=b.useContext(yw),i=()=>Ure(e,t,r,s);return n?i():BX(i)},Wre=jI({scrapeMotionValuesFromProps:zw,createRenderState:Bw}),qre=jI({scrapeMotionValuesFromProps:dI,createRenderState:PI}),Zre=Symbol.for("motionComponentSymbol");function Gre(e,t,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var o;i&&((o=e.onMount)==null||o.call(e,i));const a=r.current;if(typeof a=="function")if(i){const l=a(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):a(i);else a&&(a.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const NI=b.createContext({});function bo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Kre(e,t,n,r,s,i){var m,_;const{visualElement:a}=b.useContext(Qp),o=b.useContext(EI),l=b.useContext(yw),c=b.useContext(SI),u=c.reducedMotion,d=c.skipAnimations,p=b.useRef(null),f=b.useRef(!1);r=r||o.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),f.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const v=p.current,x=b.useContext(NI);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&Yre(p.current,n,s,x);const w=b.useRef(!1);b.useInsertionEffect(()=>{v&&w.current&&v.update(n,l)});const g=n[FO],y=b.useRef(!!g&&typeof window<"u"&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,g))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,g)));return UX(()=>{f.current=!0,v&&(w.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),y.current&&v.animationState&&v.animationState.animateChanges())}),b.useEffect(()=>{v&&(!y.current&&v.animationState&&v.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,g)}),y.current=!1),v.enteringChildren=void 0)}),v}function Yre(e,t,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:RI(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||o&&bo(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function RI(e){if(e)return e.options.allowProjection!==!1?e.projection:RI(e.parent)}function Pg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Nre(r);const i=n?n==="svg":Vw(e),a=i?qre:Wre;function o(c,u){let d;const p={...b.useContext(SI),...c,layoutId:Jre(c)},{isStatic:f}=p,v=Lre(c),x=a(c,f);
vendor: 18,124 bytes, line 477
477if(!f&&typeof window<"u"){Qre();const w=Xre(p);d=w.MeasureLayout,v.visualElement=Kre(e,x,p,s,w.ProjectionNode,i)}return h.jsxs(Qp.Provider,{value:v,children:[d&&v.visualElement?h.jsx(d,{visualElement:v.visualElement,...p}):null,Vre(e,c,Gre(x,v.visualElement,u),x,f,t,i)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=b.forwardRef(o);return l[Zre]=e,l}function Jre({layoutId:e}){const t=b.useContext(JR).id;return t&&e!==void 0?t+"-"+e:e}function Qre(e,t){b.useContext(EI).strict}function Xre(e){const t=CI(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ese(e,t){if(typeof Proxy>"u")return Pg;const n=new Map,r=(i,a)=>Pg(i,a,e,t),s=(i,a)=>r(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Pg(a,void 0,e,t)),n.get(a))})}const tse=(e,t)=>t.isSVG??Vw(e)?new Lne(t):new jne(t,{allowProjection:e!==b.Fragment});class nse extends sa{constructor(t){super(t),t.animationState||(t.animationState=Bne(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Yp(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let rse=0;class sse extends sa{constructor(){super(...arguments),this.id=rse++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:o}=this.node.getProps();if(typeof a=="string"){const l=Ma(this.node,a,o);if(l){const{transition:c,transitionEnd:u,...d}=l;for(const p in d)(i=this.node.getValue(p))==null||i.jump(d[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ise={animation:{Feature:nse},exit:{Feature:sse}};function nd(e){return{point:{x:e.pageX,y:e.pageY}}}const ase=e=>t=>Dw(t)&&e(t,nd(t));function Wc(e,t,n,r){return Ru(e,t,ase(n),r)}const OI=({current:e})=>e?e.ownerDocument.defaultView:null,iC=(e,t)=>Math.abs(e-t);function ose(e,t){const n=iC(e.x,t.x),r=iC(e.y,t.y);return Math.sqrt(n**2+r**2)}const aC=new Set(["auto","scroll"]);class II{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Yd(this.lastRawMoveEventInfo,this.transformPagePoint));const f=jg(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,x=ose(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!x)return;const{point:w}=f,{timestamp:g}=Wt;this.history.push({...w,timestamp:g});const{onStart:y,onMove:m}=this.handlers;v||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,v)=>{this.lastMoveEvent=f,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=Yd(v,this.transformPagePoint),qe.update(this.updatePoint,!0)},this.handlePointerUp=(f,v)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=jg(f.type==="pointercancel"?this.lastMoveEventInfo:Yd(v,this.transformPagePoint),this.history);this.startEvent&&x&&x(f,y),w&&w(f,y)},!Dw(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const l=nd(t),c=Yd(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Wt;this.history=[{...u,timestamp:d}];const{onSessionStart:p}=n;p&&p(t,jg(c,this.history)),this.removeListeners=Xu(Wc(this.contextWindow,"pointermove",this.handlePointerMove),Wc(this.contextWindow,"pointerup",this.handlePointerUp),Wc(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(aC.has(r.overflowX)||aC.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),qe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ji(this.updatePoint)}}function Yd(e,t){return t?{point:t(e.point)}:e}function oC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jg({point:e},t){return{point:e,delta:oC(e,DI(t)),offset:oC(e,lse(t)),velocity:cse(t,.1)}}function lse(e){return e[0]}function DI(e){return e[e.length-1]}function cse(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=DI(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Nn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Nn(t)*2&&(r=e[1]);const i=or(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function use(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?nt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?nt(n,e,r.max):Math.min(e,n)),e}function lC(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function dse(e,{top:t,left:n,bottom:r,right:s}){return{x:lC(e.x,n,s),y:lC(e.y,t,r)}}function cC(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function hse(e,t){return{x:cC(e.x,t.x),y:cC(e.y,t.y)}}function fse(e,t){let n=.5;const r=hn(e),s=hn(t);return s>r?n=Pu(t.min,t.max-r,e.min):r>s&&(n=Pu(e.min,e.max-s,t.min)),ws(0,1,n)}function pse(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const p0=.35;function mse(e=p0){return e===!1?e=0:e===!0&&(e=p0),{x:uC(e,"left","right"),y:uC(e,"top","bottom")}}function uC(e,t,n){return{min:dC(e,t),max:dC(e,n)}}function dC(e,t){return typeof e=="number"?e:e[t]||0}const gse=new WeakMap;class yse{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(nd(d).point),this.stopAnimation()},a=(d,p)=>{const{drag:f,dragPropagation:v,onDragStart:x}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kte(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xr(g=>{let y=this.getAxisMotionValue(g).get()||0;if(ms.test(y)){const{projection:m}=this.visualElement;if(m&&m.layout){const _=m.layout.layoutBox[g];_&&(y=hn(_)*(parseFloat(y)/100))}}this.originPoint[g]=y}),x&&qe.update(()=>x(d,p),!1,!0),i0(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:x,onDrag:w}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:g}=p;if(v&&this.currentDirection===null){this.currentDirection=xse(g),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,g),this.updateAxis("y",p.point,g),this.visualElement.render(),w&&qe.update(()=>w(d,p),!1,!0)},l=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new II(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:OI(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&qe.postRender(()=>o(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Jd(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=use(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&bo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=dse(r.layoutBox,t):this.constraints=!1,this.elastic=mse(n),s!==this.constraints&&!bo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Xr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=pse(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bo(t))return!1;const r=t.current;_l(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Sne(r,s.root,this.visualElement.getTransformPagePoint());let a=hse(s.layout.layoutBox,i);if(n){const o=n(bne(a));this.hasMutatedConstraints=!!o,o&&(a=nI(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},c=Xr(u=>{if(!Jd(u,n,this.currentDirection))return;let d=l&&l[u]||{};(a===!0||a===u)&&(d={min:0,max:0});const p=s?200:1e6,f=s?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return i0(this.visualElement,t),r.start(jw(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xr(n=>{const{drag:r}=this.getProps();if(!Jd(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:o}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-nt(a,o,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!bo(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Xr(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const l=o.get();s[a]=fse({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Xr(a=>{if(!Jd(a,t,null))return;const o=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];o.set(nt(l,c,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;gse.set(this.visualElement,this);const t=this.visualElement.current,n=Wc(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),p=c.target,f=p!==t&&tne(p);u&&d&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();bo(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=vse(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),qe.read(s);const o=Ru(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xr(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=p0,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function hC(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function vse(e,t,n){const r=bE(e,hC(n)),s=bE(t,hC(n));return()=>{r(),s()}}function Jd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xse(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wse extends sa{constructor(t){super(t),this.removeGroupControls=cr,this.removeListeners=cr,this.controls=new yse(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ng=e=>(t,n)=>{e&&qe.update(()=>e(t,n),!1,!0)};class bse extends sa{constructor(){super(...arguments),this.removePointerDownListener=cr}onPointerDown(t){this.session=new II(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:OI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ng(t),onStart:Ng(n),onMove:Ng(r),onEnd:(i,a)=>{delete this.session,s&&qe.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Wc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Rg=!1;class _se extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Rg&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Oh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Rg=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||qe.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Iw.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Rg=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function LI(e){const[t,n]=Pre(),r=b.useContext(JR);return h.jsx(_se,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(NI),isPresent:t,safeToRemove:n})}const kse={pan:{Feature:bse},drag:{Feature:wse,ProjectionNode:kI,MeasureLayout:LI}};
477function fC(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&qe.postRender(()=>i(t,nd(t)))}class Sse extends sa{mount(){const{current:t}=this.node;t&&(this.unmount=Jte(t,(n,r)=>(fC(this.node,r,"Start"),s=>fC(this.node,s,"End"))))}unmount(){}}class Ese extends sa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xu(Ru(this.node.current,"focus",()=>this.onFocus()),Ru(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function pC(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&qe.postRender(()=>i(t,nd(t)))}class Cse extends sa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=rne(t,(s,i)=>(pC(this.node,i,"Start"),(a,{success:o})=>pC(this.node,a,o?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const m0=new WeakMap,Og=new WeakMap,Tse=e=>{const t=m0.get(e.target);t&&t(e)},Ase=e=>{e.forEach(Tse)};function Pse({root:e,...t}){const n=e||document;Og.has(n)||Og.set(n,{});const r=Og.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Ase,{root:e,...t})),r[s]}function jse(e,t,n){const r=Pse(t);return m0.set(e,n),r.observe(e),()=>{m0.delete(e),r.unobserve(e)}}const Nse={some:0,all:1};class Rse extends sa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Nse[s]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),f=u?d:p;f&&f(c)};this.stopObserver=jse(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ose(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Ose({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ise={inView:{Feature:Rse},tap:{Feature:Cse},focus:{Feature:Ese},hover:{Feature:Sse}},Dse={layout:{ProjectionNode:kI,MeasureLayout:LI}},Lse={...ise,...Ise,...kse,...Dse},Mse=ese(Lse,tse),$se={bestseller:{bg:"bg-[#F9A01B]",label:"Bestseller"},new:{bg:"bg-[#2CC5F4]",label:"New"},limited:{bg:"bg-rose-500",label:"Limited"}},Fse=({service:e,index:t=0})=>{const n=e.icon,r=e.accent==="orange"?"#F9A01B":"#2CC5F4",s=e.tag?$se[e.tag]:null;return h.jsx(Mse.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.2},transition:{duration:.5,delay:t*.08},className:"h-full",children:h.jsxs(Au,{service:e.service,className:"group relative flex flex-col h-full w-full text-left bg-white rounded-3xl overflow-hidden border border-gray-100/80 shadow-[0_1px_0_rgba(15,23,42,0.04),0_8px_30px_-12px_rgba(15,23,42,0.10)] hover:shadow-[0_2px_0_rgba(15,23,42,0.05),0_30px_60px_-20px_rgba(15,23,42,0.25)] hover:-translate-y-1 transition-all duration-500",children:[h.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden bg-gray-50",children:[h.jsx("img",{src:e.image,alt:e.title,width:1024,height:640,loading:"lazy",decoding:"async",sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-[1200ms] group-hover:scale-105"}),h.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-900/60 via-slate-900/0 to-transparent"}),s&&h.jsx("span",{className:`absolute top-3 left-3 ${s.bg} text-white text-[10px] font-bold uppercase tracking-wider px-2.5 py-1 rounded-full shadow-sm`,children:s.label}),h.jsx("div",{className:"absolute bottom-3 left-3 w-11 h-11 rounded-xl backdrop-blur-md bg-white/90 border border-white/60 shadow-sm flex items-center justify-center",children:h.jsx(n,{size:20,style:{color:r}})})]}),h.jsxs("div",{className:"flex flex-col flex-1 p-6 md:p-7",children:[h.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.14em] text-gray-600 mb-2",children:e.badge}),h.jsx("h3",{className:"font-display font-semibold text-gray-900 text-xl mb-2 group-hover:text-[#F9A01B] transition-colors",children:e.title}),h.jsx("p",{className:"text-gray-500 text-[14px] leading-relaxed mb-6 flex-1",children:e.desc}),h.jsx("div",{className:"pt-4 border-t border-gray-100",children:h.jsxs("span",{className:"w-full inline-flex items-center justify-center gap-1.5 bg-gray-900 group-hover:bg-[#F9A01B] text-white text-xs font-semibold px-4 py-3 rounded-full transition-all duration-300 shadow-sm",children:[e.cta," ",h.jsx(Un,{size:13,className:"transition-transform group-hover:translate-x-0.5"})]})})]})]})})},zse="/assets/hero-bls-aha-CkDUK922.jpg",Bse="/assets/hero-bls-ashi-CsHCfIEg.jpg",Vse="/assets/hero-acls-BfpjQ3dV.jpg",Use="/assets/hero-pals-CgYfDRaS.jpg",Hse="/assets/hero-infection-control-VV4cx7rS.jpg",Wse="/assets/hero-cphq-CCBkFrre.jpg",qse="/assets/hero-cpps-gmyPiMRE.jpg",Zse="/assets/hero-cna-lF-X6w4D.jpg",Gse="/assets/hero-first-aid-GcGJqIiq.jpg",Kse="/assets/card-gcc-licensing-DLRF57jX.jpg",Yse="/assets/card-mcq-study-C8SngtzT.jpg",Jse="/assets/card-training-DSBOozwY.jpg",Qse="/assets/card-germany-nursing-DMp2U1Xt.jpg",Xse="/assets/card-facility-licensing-ahxIGuOv.jpg",poe=[{slug:"bls-aha",title:"BLS — Basic Life Support",badge:"AHA Certified",category:"Life Support",icon:N1,image:zse,duration:"1 Day · 8AM – 2PM",mode:"Offline · Hands-on",cpd:"CPD Points",price:650,rating:4.9,enrolled:1240,tag:"bestseller",href:"/training/bls-aha"},{slug:"bls-ashi",title:"BLS — ASHI Pathway",badge:"ASHI Certified",category:"Life Support",icon:N1,image:Bse,duration:"1 Day",mode:"Offline",cpd:"CPD Points",price:600,rating:4.8,enrolled:820,tag:null,href:"/training/bls-ashi"},{slug:"acls",title:"ACLS — Advanced Cardiac Life Support",badge:"AHA Certified",category:"Life Support",icon:X$,image:Vse,duration:"2 Days",mode:"Offline · Hands-on",cpd:"CPD Points",price:1850,rating:4.9,enrolled:540,tag:"limited",href:"/training/acls"},{slug:"pals",title:"PALS — Pediatric Advanced Life Support",badge:"AHA Certified",category:"Life Support",icon:eF,image:Use,duration:"2 Days",mode:"Offline · Hands-on",cpd:"CPD Points",price:1850,rating:4.8,enrolled:420,tag:null,href:"/training/pals"},{slug:"infection-control",title:"Infection Prevention & Control",badge:"DHA Approved",category:"Clinical",icon:YP,image:Hse,duration:"1 Day",mode:"Online & Offline",cpd:"CPD Points",price:450,rating:4.7,enrolled:1980,tag:"bestseller",href:"/training/infection-control"},{slug:"first-aid",title:"First Aid — DCAS Regulated",badge:"DCAS",category:"Clinical",icon:HP,image:Gse,duration:"1 Day · 2-Year Validity",mode:"Offline",price:400,rating:4.8,enrolled:1340,tag:null,href:"/training/first-aid"},{slug:"cphq",title:"CPHQ — Healthcare Quality",badge:"Quality Track",category:"Quality",icon:wx,image:Wse,duration:"40 Hours · Flexible",mode:"Online/Offline",price:2400,rating:4.9,enrolled:310,tag:"new",href:"/training/cphq"},{slug:"cpps",title:"CPPS — Patient Safety",badge:"Patient Safety",category:"Quality",icon:hf,image:qse,duration:"30 Hours",mode:"Online/Offline",price:2200,rating:4.8,enrolled:240,tag:null,href:"/training/cpps"},{slug:"cna",title:"International CNA — Certified Nursing Assistant",badge:"Career Track",category:"Foundation",icon:Uu,image:Zse,duration:"3 Months · Flexible",mode:"Online",cpd:"Job Assistance",price:3500,rating:4.9,enrolled:680,tag:"bestseller",href:"/training/cna"}],moe=["All","Life Support","Clinical","Quality","Foundation"],eie=[{slug:"gcc",title:"GCC Licensing",desc:"End-to-end licensing across DHA, MOH, DOH, MOPH, SCHS, NHRA.",cta:"Check Eligibility",service:"gcc",accent:"orange",icon:Ep,image:Kse,priceLabel:"From AED 2,500",badge:"Most Requested",tag:"bestseller"},{slug:"mcq",title:"Study Materials & MCQ",desc:"Exam-grade question banks, mock tests and study plans.",cta:"Explore Packages",service:"mcq",accent:"blue",icon:wx,image:Yse,priceLabel:"From AED 199",badge:"Self
477-paced",tag:null},{slug:"training",title:"Professional Trainings",desc:"AHA, ASHI and DHA-approved clinical training.",cta:"View Trainings",service:"training",accent:"orange",icon:Uu,image:Jse,priceLabel:"From AED 400",badge:"Accredited",tag:"new"},{slug:"germany",title:"Germany Nursing Recruitment",desc:"Free placement programme to Germany — language + visa support.",cta:"Apply Now",service:"germany",accent:"blue",icon:qP,image:Qse,priceLabel:"100% Free Programme",badge:"Sponsored",tag:"limited"},{slug:"facility",title:"Facility Licensing UAE",desc:"Clinic, medical center & home healthcare setup consultancy.",cta:"Talk to Consultant",service:"facility",accent:"orange",icon:kp,image:Xse,priceLabel:"Custom Quote",badge:"Enterprise",tag:null}],tie=()=>{const{ref:e,isInView:t}=ra(.15);return h.jsx("section",{ref:e,className:"relative bg-white py-20 md:py-28 overflow-hidden",children:h.jsxs("div",{className:"relative z-10 max-w-[1320px] mx-auto px-6 md:px-10",children:[h.jsxs("div",{className:`text-center mb-14 ${t?"animate-blur-in":"opacity-0"}`,children:[h.jsx("span",{className:"badge-hs mb-4 inline-block",children:"WHAT WE DO"}),h.jsxs("h2",{className:"font-display font-bold text-gray-900 mt-4 leading-tight",style:{fontSize:"clamp(32px, 4.5vw, 52px)",letterSpacing:"-1px"},children:["End-to-End ",h.jsx("span",{className:"text-gradient-orange",children:"Healthcare Solutions"})]}),h.jsx("p",{className:"text-gray-600 text-lg mt-4 max-w-2xl mx-auto",children:"Healthcare licensing, recruitment, training and facility setup — all under one trusted platform."})]}),h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 auto-rows-fr",children:eie.map((n,r)=>h.jsx("div",{className:"h-full",children:h.jsx(Fse,{service:n,index:r})},n.slug))})]})})},nie=e=>{const t=new Date(e),n=t.toLocaleString("en-US",{timeZone:"Asia/Dubai",weekday:"long",day:"numeric",month:"long",year:"numeric"}),r=t.toLocaleString("en-US",{timeZone:"Asia/Dubai",hour:"numeric",minute:"2-digit",hour12:!0});return{date:n,time:r,label:`${n} · ${r} UAE`}},Ig=e=>{const t=Math.max(0,e-Date.now());return{d:Math.floor(t/864e5),h:Math.floor(t%864e5/36e5),m:Math.floor(t%36e5/6e4),s:Math.floor(t%6e4/1e3)}},rie={live:{text:"Live Now",cls:"bg-red-50 border-red-100 text-red-600",dot:"bg-red-500"},completed:{text:"Session Completed",cls:"bg-gray-50 border-gray-200 text-gray-600",dot:"bg-gray-400"},cancelled:{text:"Session Cancelled",cls:"bg-amber-50 border-amber-200 text-amber-700",dot:"bg-amber-500"}},sie=({webinar:e,label:t})=>{const{open:n}=rN(),r=(e==null?void 0:e.status)??"upcoming",s=rie[r],i=(e==null?void 0:e.showCountdown)!==!1&&!s,a=t??(e==null?void 0:e.countdownLabel)??"Next Webinar Starts In",o=(e==null?void 0:e.startsAt)??null,l=!!o&&new Date(o).getTime()>Date.now(),c=l?o:null,[u,d]=b.useState(()=>c?Ig(new Date(c).getTime()):null);b.useEffect(()=>{if(!c){d(null);return}const v=new Date(c).getTime();d(Ig(v));const x=setInterval(()=>d(Ig(v)),1e3);return()=>clearInterval(x)},[c]);const p=c?nie(c):null,f=u?[["Days",u.d],["Hours",u.h],["Minutes",u.m],["Seconds",u.s]]:[];return h.jsxs("div",{className:"flex flex-col items-center gap-5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-[#F9A01B] animate-pulse"}),h.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-gray-500",children:a})]}),e&&h.jsxs("div",{className:"text-center max-w-xl px-4",children:[h.jsx("h3",{className:"font-display font-extrabold text-gray-900 text-lg sm:text-xl leading-tight",children:e.title}),p&&h.jsxs("p",{className:"mt-1.5 inline-flex items-center gap-1.5 text-sm text-gray-600",children:[h.jsx(ZP,{size:13,className:"text-[#2CC5F4]"}),h.jsx("span",{className:"font-semibold text-gray-800",children:p.date}),h.jsx("span",{className:"text-gray-600",children:"·"}),h.jsxs("span",{className:"font-semibold text-[#F9A01B]",children:[p.time," UAE"]})]})]}),s&&h.jsxs("div",{className:`flex items-center gap-2 px-5 py-2.5 rounded-2xl border ${s.cls}`,children:[h.jsx("span",{className:`w-2 h-2 rounded-full animate-pulse ${s.dot}`}),h.jsx("span",{className:"text-[11px] font-extrabold uppercase tracking-[0.15em]",children:s.text})]}),i&&h.jsx("div",{className:"flex gap-3 sm:gap-4",children:(u?f:[["Days",0],["Hours",0],["Minutes",0],["Seconds",0]]).map(([v,x])=>h.jsxs("div",{className:"relative group",children:[h.jsx("div",{className:"absolute -inset-0.5 rounded-2xl opacity-60 blur-md transition-opacity group-hover:opacity-100",style:{background:"linear-gradient(135deg, rgba(249,160,27,0.4), rgba(44,197,244,0.4))"}}),h.jsxs("div",{className:"relative w-16 h-16 sm:w-20 sm:h-20 rounded-2xl bg-white/80 backdrop-blur-xl border border-white/70 flex flex-col items-center justify-center shadow-[0_8px_32px_rgba(44,197,244,0.12)]",children:[h.jsx("span",{className:"font-mono-accent text-2xl sm:text-3xl font-extrabold text-gray-900 tabular-nums",children:String(x).padStart(2,"0")}),h.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-gray-600 mt-0.5",children:v})]})]},v))}),e&&r!=="cancelled"&&r!=="completed"&&h.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2.5 pt-1",children:h.jsxs("button",{onClick:()=>n(e.id),className:"btn-primary-hs !py-2.5 !px-5 text-xs flex items-center gap-2",children:[h.jsx(tF,{size:14})," ",l?"Register & Get Reminder":"Notify Me"]})})]})},iie={"Seats Filling Fast":gh,"Limited Seats":gh,"High Demand":gh,"Certificate Included":hf,"Bonus PDF Included":hf,"Live Expert Session":Fs,"Beginner Friendly":R1,"Germany Recruitment":Fs,"Career Guidance":Fs,"Language Support":R1},Dg=e=>{const t=Math.max(0,e-Date.now());return{d:Math.floor(t/864e5),h:Math.floor(t%864e5/36e5),m:Math.floor(t%36e5/6e4),s:Math.floor(t%6e4/1e3),ended:t===0}},Lg=({text:e,tone:t})=>{const n=t==="live"?"bg-red-50 border-red-100 text-red-600":t==="warn"?"bg-amber-50 border-amber-200 text-amber-700":"bg-gray-50 border-gray-200 text-gray-600",r=t==="live"?"bg-red-500":t==="warn"?"bg-amber-500":"bg-gray-400";return h.jsxs("div",{className:`mb-5 flex items-center justify-center gap-2 py-2.5 rounded-2xl border ${n}`,children:[h.jsx("span",{className:`w-2 h-2 rounded-full animate-pulse ${r}`}),h.jsx("span",{className:"text-[11px] font-extrabold uppercase tracking-[0.15em]",children:e})]})},aie=({startsAt:e,label:t})=>{const n=new Date(e).getTime(),[r,s]=b.useState(()=>Dg(n));if(b.useEffect(()=>{s(Dg(n));const a=setInterval(()=>s(Dg(n)),1e3);return()=>clearInterval(a)},[n]),r.ended)return h.jsxs("div",{className:"mb-5 flex items-center justify-center gap-2 py-2.5 rounded-2xl bg-red-50 border border-red-100",children:[h.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),h.jsx("span",{className:"text-[11px] font-extrabold uppercase tracking-[0.15em] text-red-600",children:"🔴 Live Now"})]});const i=[["Days",r.d],["Hrs",r.h],["Min",r.m],["Sec",r.s]];return h.jsxs("div",{className:"mb-5",children:[h.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.15em] text-gray-500 mb-2 text-center",children:t||"Starts In"}),h.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:i.map(([a,o])=>h.jsxs("div",{className:"rounded-xl bg-gradient-to-br from-white to-gray-50 border border-gray-100 py-2 flex flex-col items-center",children:[h.jsx("span",{className:"font-mono-accent text-lg font-extrabold text-gray-900 tabular-nums leading-none",children:String(o).padStart(2,"0")}),h.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider text-gray-500 mt-1",children:a})]},a))})]})},oie=({webinar:e,index:t,isInView:n})=>{const{open:r}=rN(),s=e.language==="ar",i=!e.isFree,{webinars:a}=$p(),o=tN(a),l=!!o&&o.id===e.id,c=e.primaryCta||(l?"Reserve Your Seat":"Notify Me");return h.jsxs("div",{className:`relative group ${n?"animate-fade-up":"opacity-0"}`,style:{animationDelay:`${.15+t*.12}s`},dir:s?"rtl":"ltr",children:[h.jsx("div",{className:"absolute -inset-0.5 rounded-3xl opacity-0 group-hover:opacity-100 blur-lg transition-opacity duration-500",style:{background:i?"linear-gradient(135deg, #F9A01B, #2CC5F4)":"linear-gradient(135deg, rgba(44,197,244,0.6), rgba(249,160,27,0.4))"}}),h.jsxs("div",{className:"relative h-full bg-white/80 backdrop-blur-xl border border-white/70 rounded-3xl p-6 md:p-7 shadow-[0_8px_32px_rgba(0,0,0,0.04)] hover:shadow-[0_24px_64px_rgba(44,197,244,0.18)] transition-all duration-500 group-hover:-translate-y-1.5 flex flex-col",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-4",children:[h.jsx("span",{className:`text-[10px] font-extrabold uppercase tracking-[0.15em] px-3 py-1.5 rounded-full ${i?"text-white shadow-md":"bg-gradient-to-r from-green-50 to-emerald-50 text-green-600 border border-green-200"}`,style:i?{background:"linear-gradient(135deg, #F9A01B, #e88d0c)"}:void 0,children:e.badge}),e.price&&h.jsx("span",{className:"text-[10px] font-bold text-gray-600",children:e.price})]}),h.jsx("h3",{className:"font-display font-extrabold text-gray-900 text-lg md:text-xl leading-tight mb-2.5",children:e.title}),h.jsx("p",{className:"text-sm text-gray-500 leading-relaxed mb-5",children:e.shortDe
477scription}),(()=>{const u=e.status??"upcoming";return u==="live"?h.jsx(Lg,{text:"🔴 Live Now",tone:"live"}):u==="completed"?h.jsx(Lg,{text:"Session Completed",tone:"muted"}):u==="cancelled"?h.jsx(Lg,{text:"Session Cancelled",tone:"warn"}):e.showCountdown===!1?null:e.startsAt?h.jsx(aie,{startsAt:e.startsAt,label:e.countdownLabel}):null})(),h.jsx("div",{className:"space-y-2 mb-5 flex-1",children:e.includes.map(u=>h.jsxs("div",{className:"flex items-start gap-2.5 text-[13px] text-gray-700",children:[h.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:"linear-gradient(135deg, rgba(249,160,27,0.15), rgba(44,197,244,0.15))"},children:h.jsx(ff,{size:10,className:"text-[#F9A01B]",strokeWidth:3})}),h.jsx("span",{children:u})]},u))}),e.audience&&h.jsx("div",{className:"flex flex-wrap gap-1.5 mb-5",children:e.audience.map(u=>h.jsx("span",{className:"text-[10px] font-semibold px-2.5 py-1 rounded-full bg-gray-50 text-gray-600 border border-gray-100",children:u},u))}),h.jsx("div",{className:"flex flex-wrap gap-1.5 mb-5",children:e.liveBadges.map(u=>{const d=iie[u]??Fs;return h.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold px-2.5 py-1 rounded-full bg-[#2CC5F4]/8 text-[#0a8abf] border border-[#2CC5F4]/20",children:[h.jsx(d,{size:10})," ",u]},u)})}),h.jsxs("div",{className:"flex items-center gap-2 mb-5 pb-5 border-b border-gray-100",children:[h.jsx("div",{className:"flex -space-x-2",children:[0,1,2,3].map(u=>h.jsx("div",{className:"w-7 h-7 rounded-full border-2 border-white flex items-center justify-center text-[10px] font-bold text-white",style:{background:`linear-gradient(135deg, ${u%2?"#F9A01B":"#2CC5F4"}, ${u%2?"#e88d0c":"#0a8abf"})`},children:String.fromCharCode(65+u)},u))}),h.jsxs("span",{className:"text-xs text-gray-500 font-medium",children:["+",e.attendeeCount," ",s?"مسجل":"registered"]})]}),h.jsxs("div",{className:"flex flex-col gap-2.5",children:[h.jsxs("button",{onClick:()=>r(e.id),className:"btn-primary-hs !py-3 text-sm flex items-center justify-center gap-2 group/btn",children:[c,h.jsx(Un,{size:15,className:"transition-transform group-hover/btn:translate-x-1"})]}),h.jsxs("button",{onClick:()=>r(e.id),className:"text-xs font-semibold text-gray-500 hover:text-[#2CC5F4] transition-colors py-1",children:[e.secondaryCta," →"]})]})]})]})},lie=()=>{const{ref:e,isInView:t}=ra(.05),{webinars:n}=$p();return h.jsx("div",{ref:e,className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-7",children:n.map((r,s)=>h.jsx(oie,{webinar:r,index:s,isInView:t},r.id))})},cie=()=>{const{ref:e,isInView:t}=ra(.05),{webinars:n}=$p(),r=tN(n)??n[0];return h.jsxs("section",{ref:e,className:"relative py-20 md:py-28 bg-section-cool overflow-hidden",children:[h.jsx("div",{className:"absolute -top-40 -left-40 w-[500px] h-[500px] rounded-full opacity-[0.12] blur-[120px]",style:{background:"#2CC5F4"}}),h.jsx("div",{className:"absolute -bottom-40 -right-40 w-[500px] h-[500px] rounded-full opacity-[0.10] blur-[120px]",style:{background:"#F9A01B"}}),h.jsxs("div",{className:"relative z-10 max-w-[1320px] mx-auto px-6 md:px-10",children:[h.jsxs("div",{className:`text-center max-w-3xl mx-auto mb-12 ${t?"animate-blur-in":"opacity-0"}`,children:[h.jsx("span",{className:"badge-blue mb-4 inline-block",children:"Live Webinars"}),h.jsxs("h2",{className:"font-display font-extrabold text-gray-900",style:{fontSize:"clamp(30px, 4vw, 48px)",letterSpacing:"-1px",lineHeight:1.1},children:["Upcoming ",h.jsx("span",{className:"text-gradient-orange",children:"GCC Licensing"})," Webinars"]}),h.jsx("p",{className:"text-gray-500 mt-4 leading-relaxed",children:"Learn directly from healthcare licensing experts and understand the GCC licensing process with clarity, guidance and real-world insights."})]}),h.jsx("div",{className:`flex justify-center mb-14 ${t?"animate-scale-up":"opacity-0"}`,style:{animationDelay:"0.15s"},children:h.jsx(sie,{webinar:r})}),h.jsx(lie,{}),h.jsx("div",{className:"text-center mt-12",children:h.jsxs(ze,{to:"/webinars",className:"inline-flex items-center gap-2 text-sm font-bold text-[#F9A01B] hover:text-[#e88d0c] transition-colors group",children:["Explore all topics & sessions",h.jsx(Un,{size:16,className:"transition-transform group-hover:translate-x-1"})]})})]})]})},uie=(e,t,n=2e3)=>{const[r,s]=b.useState(0);return b.useEffect(()=>{if(!t)return;const i=performance.now(),a=o=>{const l=Math.min((o-i)/n,1),c=1-Math.pow(1-l,3);s(c*e),l<1&&requestAnimationFrame(a)};requestAnimationFrame(a)},[e,t,n]),r},die=[{value:2800,suffix:"+",label:"Healthcare Professionals Guided"},{value:7,suffix:"",label:"GCC Licensing Authorities Supported"},{value:12,suffix:"+",label:"Training Programs Delivered"},{value:500,suffix:"+",label:"International Recruitment Cases"}],hie=[{icon:YP,title:"Expert Guidance",desc:"Specialists with deep regulatory experience across the GCC."}
477,{icon:dF,title:"End-to-End Support",desc:"From eligibility to license activation — we own the journey."},{icon:gh,title:"Fast Response",desc:"Most queries answered within an hour during business hours."},{icon:hf,title:"Trusted Consultancy",desc:"A reputation built on outcomes, transparency and care."}],fie=({value:e,suffix:t,active:n})=>{const r=uie(e,n,1800);return h.jsxs("span",{className:"font-mono-accent font-bold text-transparent bg-clip-text",style:{fontSize:"clamp(36px, 4.5vw, 56px)",backgroundImage:"linear-gradient(135deg, #F9A01B, #e88d0c)"},children:[Math.round(r).toLocaleString(),t]})},pie=()=>{const{ref:e,isInView:t}=ra(.2);return h.jsx("section",{ref:e,className:"relative bg-section-warm py-20 md:py-28 overflow-hidden",children:h.jsxs("div",{className:"relative z-10 max-w-[1320px] mx-auto px-6 md:px-10",children:[h.jsxs("div",{className:`text-center mb-14 ${t?"animate-blur-in":"opacity-0"}`,children:[h.jsx("span",{className:"badge-hs mb-4 inline-block",children:"WHY CHOOSE US"}),h.jsxs("h2",{className:"font-display font-bold text-gray-900 mt-4",style:{fontSize:"clamp(32px, 4.5vw, 52px)",letterSpacing:"-1px"},children:["Outcomes That ",h.jsx("span",{className:"text-gradient-orange",children:"Speak For Themselves"})]})]}
477),h.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-5 mb-16",children:die.map((n,r)=>h.jsxs("div",{className:`bg-white rounded-3xl p-7 text-center border border-gray-100 shadow-sm hover:shadow-lg hover:-translate-y-1 transition-all duration-500 ${t?"animate-slide-up-spring":"opacity-0"}`,style:{animationDelay:`${r*.12}s`},children:[h.jsx(fie,{value:n.value,suffix:n.suffix,active:t}),h.jsx("p",{className:"text-gray-500 text-sm font-medium mt-3 leading-snug",children:n.label})]},n.label))}),h.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-5",children:hie.map((n,r)=>{const s=n.icon;return h.jsxs("div",{className:`bg-white rounded-3xl p-6 border border-gray-100 hover:border-[#F9A01B]/30 hover:shadow-md transition-all duration-500 ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:`${.4+r*.1}s`},children:[h.jsx("div",{className:"w-12 h-12 rounded-xl bg-orange-50 flex items-center justify-center mb-4",children:h.jsx(s,{size:22,className:"text-[#F9A01B]"})}),h.jsx("h3",{className:"font-display font-semibold text-gray-900 text-base mb-1.5",children:n.title}),h.jsx("p",{className:"text-gray-500 text-sm leading-relaxed",children:n.desc})]},n.title)})})]})})},mC={badge:"LIVE GOOGLE REVIEWS",headline_prefix:"Verified by",headline_accent:"Google",subheadline_prefix:"Trusted by",subheadline_highlight:"5,000+ healthcare professionals",subheadline_suffix:"across the UAE, GCC, and beyond.",ticker:["Ahmed from Egypt — DHA Licensed in 4 weeks ✓","Priya from India — MOH Approved ✓","Chen Wei from China — HAAD Licensed ✓","Fatima from Pakistan — BLS Certified ✓","John from Nigeria — DHA Licensed in 3 weeks ✓","Maria from Philippines — Working in Germany ✓","Sara from Jordan — Facility License Granted ✓","David from UK — DOH Licensed ✓"]},mie=()=>{var s;const{ref:e,isInView:t}=ra(.15),n=Vf("home","testimonials",mC),r=(s=n.ticker)!=null&&s.length?n.ticker:mC.ticker;return h.jsxs("section",{ref:e,className:"relative bg-white py-20 md:py-28 overflow-hidden",children:[h.jsx("div",{className:"absolute top-20 -left-32 w-96 h-96 rounded-full bg-gradient-to-br from-[#F9A01B]/10 to-transparent blur-3xl pointer-events-none"}),h.jsx("div",{className:"absolute bottom-20 -right-32 w-96 h-96 rounded-full bg-gradient-to-br from-[#2CC5F4]/10 to-transparent blur-3xl pointer-events-none"}),h.jsxs("div",{className:"relative z-10 max-w-[1320px] mx-auto px-6 md:px-10",children:[h.jsxs("div",{className:`text-center mb-12 ${t?"animate-blur-in":"opacity-0"}`,children:[h.jsxs("span",{className:"badge-hs mb-4 inline-flex items-center gap-2",children:[h.jsxs("span",{className:"relative flex h-2 w-2",children:[h.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[#F9A01B] opacity-75"}),h.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[#F9A01B]"})]}),n.badge]}),h.jsxs("h2",{className:"font-display font-bold text-gray-900 mt-4",style:{fontSize:"clamp(32px, 4.5vw, 52px)",letterSpacing:"-1px"},children:[n.headline_prefix," ",h.jsx("span",{className:"text-gradient-orange",children:n.headline_accent})]}),h.jsxs("p",{className:"text-gray-600 text-lg mt-4 max-w-2xl mx-auto",children:[n.subheadline_prefix," ",h.jsx("span",{className:"font-semibold text-gray-900",children:n.subheadline_highlight})," ",n.subheadline_suffix]})]}),h.jsxs("div",{className:`relative group ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.2s"},children:[h.jsx("div",{className:"absolute -inset-0.5 bg-gradient-to-r from-[#F9A01B] via-[#2CC5F4] to-[#F9A01B] rounded-3xl opacity-20 group-hover:opacity-40 blur-md transition-opacity duration-700 bg-[length:200%_200%] animate-gradient-shift"}),h.jsx("div",{className:"relative bg-white/80 backdrop-blur-xl rounded-3xl border border-gray-100 shadow-[0_8px_40px_-12px_rgba(0,0,0,0.08)] p-6 md:p-10 transition-all duration-500 hover:shadow-[0_20px_60px_-15px_rgba(249,160,27,0.15)]",children:h.jsx("div",{className:"elfsight-app-4a48f5eb-1d5b-4400-b979-6c8bb3ee7528","data-elfsight-app-lazy":!0})})]}),h.jsx("div",{className:`text-center mt-10 ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.4s"},children:h.jsxs("a",{href:"https://search.google.com/local/writereview?placeid=ChIJf3PMvBZDXz4RhNtQyQbcSJE",target:"_blank",rel:"noopener noreferrer",className:"group relative inline-flex items-center gap-2 px-7 py-3.5 rounded-full bg-gradient-to-r from-[#F9A01B] to-[#e88d0c] text-white font-semibold text-sm shadow-lg shadow-orange-500/30 hover:shadow-xl hover:shadow-orange-500/40 hover:-translate-y-0.5 transition-all duration-300 overflow-hidden",children:[h.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/30 to-white/0 -translate-x-full group-hover:translate-x-full transition-transform duration-700"}),h.jsx("span",{className:"relative text-base",children:"⭐"}),h.jsx("span",{className:"relative",children:"Write a Google Review"})]})})]}),h.jsx("div",{className:`mt-16 border-y border-gray-100 py-4 overflow-hidden bg-gradient-to-r from-gray-50/30 via-orange-50/20 to-gray-50/30 ${t?"animate-fade-in":"opacity-0"}`,style:{animationDelay:"0.6s"},children:h.jsx("div",{className:"flex gap-12 items-center",style:{animation:"ticker-scroll 40s linear infinite",width:"max-content"},children:[...r,...r].map((i,a)=>h.jsxs("span",{className:"text-gray-500 text-sm whitespace-nowrap flex-shrink-0",children:[h.jsxs("span",{className:"text-[#F9A01B] font-semibold",children:[i.split("—")[0],"—"]}),i.split("—").slice(1).join("—")]},a))})})]})},gC={headline_l1:"Ready to Start Your",headline_l2:"Healthcare Career Journey?",subheadline:"One conversation can map your fastest path to licensing, training, or a new career abroad.",whatsapp_label:"WhatsApp Us",expert_label:"Talk to Expert",apply_label:"Start Application",trust_items:["No hidden fees","Response within 1 hour","Trusted by 2,800+ professionals"]},gie=()=>{var s;const{ref:e,isInView:t}
477=ra(.15),n=Vf("home","final_cta",gC),r=(s=n.trust_items)!=null&&s.length?n.trust_items:gC.trust_items;return h.jsxs("section",{ref:e,id:"book",className:"relative py-24 md:py-32 overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, #0f3460 0%, #1a5a8a 45%, #2CC5F4 100%)"}}),h.jsx("div",{className:"absolute -top-40 -left-40 w-[600px] h-[600px] rounded-full bg-white/20 blur-3xl"}),h.jsx("div",{className:"absolute -bottom-40 -right-40 w-[600px] h-[600px] rounded-full bg-white/15 blur-3xl"})]}),h.jsxs("div",{className:"relative z-10 max-w-[900px] mx-auto px-6 md:px-10 text-center",children:[h.jsxs("h2",{className:`font-display font-bold text-white leading-tight ${t?"animate-blur-in":"opacity-0"}`,style:{fontSize:"clamp(36px, 5vw, 60px)",letterSpacing:"-1px"},children:[h.jsx(ir,{id:"final_cta.headline_l1",defaultValue:n.headline_l1,as:"span"})," ",h.jsx("br",{})," ",h.jsx(ir,{id:"final_cta.headline_l2",defaultValue:n.headline_l2,as:"span"})]}),h.jsx(ir,{id:"final_cta.subheadline",defaultValue:n.subheadline,as:"p",multiline:!0,className:`text-white/90 text-lg mt-6 mb-10 max-w-xl mx-auto leading-relaxed ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.2s"}}),h.jsxs("div",{className:`flex flex-col sm:flex-row gap-3 justify-center mb-10 ${t?"animate-slide-up-spring":"opacity-0"}`,style:{animationDelay:"0.4s"},children:[h.jsxs("a",{href:"https://wa.me/971523941876",target:"_blank",rel:"noopener noreferrer",className:"bg-white text-[#25D366] font-bold py-4 px-8 rounded-full text-base hover:shadow-2xl hover:-translate-y-1 transition-all duration-300 inline-flex items-center justify-center gap-2",children:[h.jsx(Sp,{size:18})," ",h.jsx(ir,{id:"final_cta.whatsapp_label",defaultValue:n.whatsapp_label,as:"span"})]}),h.jsxs(Au,{className:"bg-white/15 backdrop-blur-md text-white font-bold py-4 px-8 rounded-full text-base border border-white/40 hover:bg-white/25 transition-all duration-300 inline-flex items-center justify-center gap-2",children:[h.jsx(Zy,{size:18})," ",h.jsx(ir,{id:"final_cta.expert_label",defaultValue:n.expert_label,as:"span"})]}),h.jsxs(Au,{className:"bg-white text-[#F9A01B] font-bold py-4 px-8 rounded-full text-base hover:shadow-2xl hover:-translate-y-1 transition-all duration-300 inline-flex items-center justify-center gap-2",children:[h.jsx(ir,{id:"final_cta.apply_label",defaultValue:n.apply_label,as:"span"})," ",h.jsx(Un,{size:18})]})]}),h.jsx("div",{className:`flex flex-wrap justify-center gap-6 ${t?"animate-fade-up":"opacity-0"}`,style:{animationDelay:"0.6s"},children:r.map(i=>h.jsxs("div",{className:"flex items-center gap-2 text-white/90 text-sm",children:[h.jsx(iF,{size:14,className:"text-white"}),i]},i))})]})]})},yie=()=>{const[e,t]=b.useState(null);if(b.useEffect(()=>{let r=!0;return kt.from("job_positions").select("title").eq("is_active",!0).order("sort_order",{ascending:!0}).then(({data:s})=>{r&&t((s??[]).map(i=>i.title))}),()=>{r=!1}},[]),e===null)return null;const n=e.length>0;return h.jsxs("section",{className:"relative py-14 md:py-20 px-4 overflow-hidden bg-gradient-to-br from-orange-50 via-white to-sky-50",children:[h.jsx("div",{className:"absolute -top-20 -left-20 w-72 h-72 rounded-full bg-[#F9A01B]/20 blur-3xl pointer-events-none"}),h.jsx("div",{className:"absolute -bottom-20 -right-20 w-72 h-72 rounded-full bg-[#2CC5F4]/20 blur-3xl pointer-events-none"}),h.jsx("div",{className:"relative max-w-6xl mx-auto",children:h.jsx("div",{className:"rounded-3xl bg-white/70 backdrop-blur-xl border border-white shadow-[0_20px_60px_-15px_rgba(249,160,27,0.25)] p-6 md:p-10",children:h.jsxs("div",{className:`grid gap-8 items-center ${n?"md:grid-cols-[1.2fr_1fr]":""}`,children:[h.jsxs("div",{children:[n?h.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-gradient-to-r from-[#F9A01B] to-[#e88d0c] text-white text-[11px] font-bold uppercase tracking-wider shadow-lg",children:[h.jsx(Fs,{className:"w-3.5 h-3.5"}),"Active Recruitment · Live Openings"]}):h.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-gray-900/85 text-white text-[11px] font-bold uppercase tracking-wider shadow-lg",children:[h.jsx(lF,{className:"w-3.5 h-3.5"}),"No active roles right now"]}),h.jsx("h2",{className:"mt-4 font-heading text-3xl md:text-4xl font-bold text-gray-900 leading-tight",children:n?h.jsxs(h.Fragment,{children:["Now recruiting for"," ",h.jsx("span",{className:"bg-gradient-to-r from-[#F9A01B] to-[#2CC5F4] bg-clip-text text-transparent",children:"healthcare roles"})," ","across the UAE."]}):h.jsxs(h.Fragment,{children:["All current positions are"," ",h.jsx("span",{className:"bg-gradient-to-r from-[#F9A01B] to-[#2CC5F4] bg-clip-text text-transparent",children:"filled"})," ","— but we're always meeting talent."]})}),h.jsx("p",{className:"mt-3 text-gray-600 md:text-lg max-w-xl",children:n?"We're recruiting nurses and commercial talent for homecare, occupational health, and B2C marketplace roles across the UAE. Apply now to be considered for current openings.":"There are no open vacancies at the moment. Send us your CV and we’ll contact you first when a matching healthcare or commercial role opens up."}),h.jsxs("div",{className:"mt-5 flex flex-wrap gap-3",children:[h.jsxs(ze,{to:"/careers",className:"inline-flex items-center gap-2 h-12 px-6 rounded-xl bg-[#F9A01B] hover:bg-[#e88d0c] text-white font-bold shadow-lg shadow-orange-500/30 transition-all hover:-translate-y-0.5",children:[h.jsx(UP,{className:"w-4 h-4"}),n?"View Open Positions":"Join Our Talent Pool",h.jsx(Un,{className:"w-4 h-4"})]}),h.jsx(ze,{to:"/careers",className:"inline-flex items-center gap-2 h-12 px-6 rounded-xl border-2 border-gray-200 hover:border-[#2CC5F4] text-gray-800 font-bold bg-white transition-all",children:"Upload Your CV"})]})]}),n&&h.jsx("ul",{className:"space-y-2.5",children:e.slice(0,5).map((r,s)=>h.jsxs("li",{className:"group flex items-center gap-3 p-3.5 rounded-xl bg-white border border-gray-100 hover:border-[#F9A01B]/40 hover:shadow-md transition-all",children:[h.jsx("span",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-orange-100 to-sky-100 flex items-center justify-center text-[#F9A01B] font-bold text-sm",children:s+1}),h.jsx("span",{className:"text-sm md:text-[15px] font-semibold text-gray-800 flex-1",children:r}),h.jsx(Un,{className:"w-4 h-4 text-gray-300 group-hover:text-[#F9A01B] group-hover:translate-x-1 transition-all"})]},s))})]})})})]})},vie=[{icon:nF,title:"Prometric Quiz Arcade",desc:"100+ randomised clinical questions with timers, combos and XP."},{icon:vF,title:"Speed Round",desc:"Beat the clock on rapid-fire licensing and clinical questions."},{icon:WP,title:"Memory Match & Word Guess",desc:"Playful drills that keep medical terminology sharp."},{icon:xF,title:"Daily Missions & Spin Wheel",desc:"Earn XP daily, unlock badges and reach Healthserve Gold."}],xie=["AI CV / résumé analyser with instant score","CV content generator for healthcare roles","AI salary calculator for GCC & Germany","Licensing timeline & eligibility checker"],wie=()=>h.jsxs("section",{className:"relative py-16 sm:py-20 overflow-hidden bg-gradient-to-br from-[#F2FBFF] via-white to-[#FFF6E8]",children:[h.jsx("div",{className:"absolute -top-24 -right-24 w-72 h-72 rounded-full bg-[#2CC5F4]/10 blur-3xl pointer-events-none"}),h.jsx("div",{className:"absolute -bottom-24 -left-24 w-72 h-72 rounded-full bg-[#F9A01B]/10 blur-3xl pointer-events-none"}),h.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6",children:h.jsxs("div",{className:"grid lg:grid-cols-2 gap-10 items-center",children:[h.jsxs("div",{children:[h.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-[#F9A01B]/30 bg-[#F9A01B]/10 px-4 py-1.5 text-xs font-bold uppercase tracking-wide text-[#a3660b]",children:[h.jsx(Fs,{className:"w-3.5 h-3.5"})," Free · Healthserve Career Hub"]}),h.jsx("h2",{className:"font-heading text-3xl sm:text-4xl font-extrabold text-[#1a1a1a] mt-4 leading-tight",children:"Play games, check your CV and plan your licence — all free"}),h.jsx("p",{className:"text-[15px] sm:text-base text-gray-600 mt-4 leading-relaxed",children:"The Career Hub is our free gamified learning zone for healthcare professionals. Practise Prometric-style questions as arcade games, generate and score your CV with our AI tools, estimate your salary abroad, earn XP and climb to Healthserve Gold."}),h.jsx("ul",{className:"mt-6 space-y-2.5",children:xie.map(e=>h.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-gray-700",children:[h.jsx(uF,{className:"w-4 h-4 text-[#0b7fa3] mt-0.5 shrink-0"}),e]},e))}),h.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mt-8",children:[h.jsxs(ze,{to:"/career-hub/register",className:"inline-flex items-center justify-center gap-2 rounded-xl bg-[#F9A01B] px-6 py-3.5 text-sm font-bold text-white shadow-[0_10px_30px_rgba(249,160,27,0.28)] hover:brightness-105 transition",children:["Create free account ",h.jsx(Un,{className:"w-4 h-4"})]}),h.jsxs(ze,{to:"/career-hub/dashboard",className:"inline-flex items-center justify-center gap-2 rounded-xl border border-gray-200 bg-white px-6 py-3.5 text-sm font-bold text-gray-700 hover:border-[#2CC5F4] transition",children:[h.jsx(WP,{className:"w-4 h-4 text-[#0b7fa3]"})," Explore the games"]})]}),h.jsx("p",{className:"text-xs text-gray-400 mt-3",children:"Free to use — no payment required. Games are for practice and learning only."})]}),h.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:vie.map(e=>h.jsxs("div",{className:"rounded-2xl border border-white/70 bg-white/80 backdrop-blur-xl p-5 shadow-[0_12px_40px_rgba(15,23,42,0.06)] hover:-translate-y-1 transition-transform",children:[h.jsx("span",{className:"grid place-items-center w-11 h-11 rounded-xl bg-gradient-to-br from-[#2CC5F4]/15 to-[#F9A01B]/15",children:h.jsx(e.icon,{className:"w-5 h-5 text-[#0b7fa3]"})}),h.jsx("p",{className:"font-heading font-bold text-[#1a1a1a] mt-3.5",children:e.title}),h.jsx("p",{className:"text-sm text-gray-600 mt-1.5 leading-relaxed",children:e.desc})]},e.title))})]})})]}),bie="https://healthserve.ae",_ie=({title:e,description:t,path:n,type:r="website",jsonLd:s})=>{const i=`${bie}${n}`,a=s?Array.isArray(s)?s:[s]:[];return h.jsxs(GA,{children:[h.jsx("title",{children:e}),h.jsx("meta",{name:"description",content:t}),h.jsx("link",{rel:"canonical",href:i}),h.jsx("meta",{property:"og:title",content:e}),h.jsx("meta",{property:"og:description",content:t}),h.jsx("meta",{property:"og:url",content:i}),h.jsx("meta",{property:"og:type",content:r}),h.jsx("meta",{name:"twitter:title",content:e}),h.jsx("meta",{name:"twitter:description",content:t}),a.map((o,l)=>h.jsx("script",{type:"application/ld+json",children:JSON.stringify(o)},l))]})},MI="section_visibility",goe=[{key:"home.trustbar",label:"Trust bar",page:"Home page",description:"Logos / trust indicators under the hero."},{key:"home.services",label:"Services",page:"Home page",description:"Main services grid."},{key:"home.webinars",label:"Webinars",page:"Home page",description:"Upcoming webinars strip."},{key:"home.why",label:"Why choose us",page:"Home page",description:"Reasons to pick Healthserve."},{key:"home.testimonials",label:"Testimonials",page:"Home page",description:"Client reviews carousel."},{key:"home.hiring",label:"Recruitment / hiring banner",page:"Home page",description:'"Now recruiting" banner with open roles.'},{key:"home.finalcta",label:"Final call to action",page:"Home page",description:"Bottom conversion block."}];let wc=null;
477const kie=3e4;async function Sie(){if(wc&&Date.now()-wc.ts<kie)return wc.data;const{data:e}=await kt.from("site_settings").select("value").eq("key",MI).maybeSingle(),t=(e==null?void 0:e.value)??{};return wc={data:t,ts:Date.now()},t}function Eie(){wc=null}async function yoe(e){return Eie(),kt.from("site_settings").upsert({key:MI,value:e},{onConflict:"key"})}function ha(e){const[t,n]=b.useState(!0);return b.useEffect(()=>{let r=!0;return Sie().then(s=>{r&&s[e]===!1&&n(!1)}),()=>{r=!1}},[e]),t}const Cie=()=>{const{openFlow:e}=Mx(),t=ha("home.trustbar"),n=ha("home.services"),r=ha("home.webinars"),s=ha("home.why"),i=ha("home.testimonials"),a=ha("home.hiring"),o=ha("home.finalcta");return b.useEffect(()=>{if(!sessionStorage.getItem("hs-onboarding-seen")){const c=setTimeout(()=>{e(),sessionStorage.setItem("hs-onboarding-seen","true")},1800);return()=>clearTimeout(c)}},[e]),h.jsxs(h.Fragment,{children:[h.jsx(_ie,{title:"Healthserve — UAE Healthcare Licensing & Training",description:"DHA, MOH & DOH licensing, AHA/ASHI clinical training, German nursing pathway & facility setup — UAE's trusted healthcare consultancy.",path:"/"}),h.jsxs("div",{children:[h.jsx(x8,{}),h.jsx(w8,{}),h.jsx(v8,{}),h.jsxs("main",{children:[h.jsx(FX,{}),t&&h.jsx(zX,{}),n&&h.jsx(tie,{}),r&&h.jsx(cie,{}),s&&h.jsx(pie,{}),i&&h.jsx(mie,{}),h.jsx(wie,{}),a&&h.jsx(yie,{}),o&&h.jsx(gie,{})]}),h.jsx(TX,{}),h.jsx(mX,{})]})]})},Tie=()=>{const e=hr();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),h.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),h.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),h.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},Mg=new Map;function Aie(){const{pathname:e}=hr(),[t,n]=b.useState(null);return b.useEffect(()=>{let r=!0;if(Mg.has(e)){n(Mg.get(e)??null);return}return kt.from("page_seo").select("title,description,og_image,canonical,robots,keywords").eq("route",e).maybeSingle().then(({data:s})=>{Mg.set(e,s??null),r&&n(s??null)}),()=>{r=!1}},[e]),t?h.jsxs(GA,{children:[t.title&&h.jsx("title",{children:t.title}),t.title&&h.jsx("meta",{property:"og:title",content:t.title}),t.description&&h.jsx("meta",{name:"description",content:t.description}),t.description&&h.jsx("meta",{property:"og:description",content:t.description}),t.og_image&&h.jsx("meta",{property:"og:image",content:t.og_image}),t.og_image&&h.jsx("meta",{name:"twitter:image",content:t.og_image}),t.canonical&&h.jsx("link",{rel:"canonical",href:t.canonical}),t.canonical&&h.jsx("meta",{property:"og:url",content:t.canonical}),t.robots&&h.jsx("meta",{name:"robots",content:t.robots}),t.keywords&&h.jsx("meta",{name:"keywords",content:t.keywords})]}):null}const Pie=()=>{const{pathname:e,hash:t}=hr();return b.useEffect(()=>{t||("scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),window.scrollTo({top:0,left:0,behavior:"auto"}))},[e,t]),null},yC="hs_analytics_sid",vC="hs_analytics_country",$g=()=>{try{let e=localStorage.getItem(yC);return e||(e=crypto.randomUUID(),localStorage.setItem(yC,e)),e}catch{return"anon"}};let Qd=null;const jie=()=>{try{const e=localStorage.getItem(vC);if(e)return Promise.resolve(e)}catch{}return Qd||(Qd=fetch("https://ipapi.co/json/").then(e=>e.ok?e.json():null).then(e=>{const t=(e==null?void 0:e.country_code)||(e==null?void 0:e.country)||null;if(t)try{localStorage.setItem(vC,t)}catch{}return t}).catch(()=>null),Qd)},Nie=e=>e.startsWith("/admin"),Rie=()=>{const e=hr(),t=b.useRef(null),n=b.useRef(Date.now());return b.useEffect(()=>{if(Nie(e.pathname)){t.current=null;return}const r=async()=>{const a=t.current;if(!a)return;const o=Date.now()-n.current;t.current=null;try{await kt.rpc("update_page_view_duration",{_id:a,_session_id:$g(),_duration_ms:o})}catch{}},s=async()=>{n.current=Date.now();const a=crypto.randomUUID(),o=await jie();try{const{error:l}=await kt.from("page_views").insert({id:a,session_id:$g(),path:e.pathname+e.search,referrer:document.referrer||null,user_agent:navigator.userAgent,screen:`${window.innerWidth}x${window.innerHeight}`,language:navigator.language,country:o});l||(t.current=a)}catch{}};r(),s();const i=()=>{const a=t.current;if(!a)return;const o=Date.now()-n.current;kt.rpc("update_page_view_duration",{_id:a,_session_id:$g(),_duration_ms:o})};return window.addEventListener("pagehide",i),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),()=>{window.removeEventListener("pagehide",i),r()}},[e.pathname,e.search]),null},Oie=b.lazy(()=>ve(()=>import("./DHALicensing-CaBOMkCB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Iie=b.lazy(()=>ve(()=>import("./MOHLicensing-DzVeWo-G.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]))),Die=b.lazy(()=>ve(()=>import("./DOHLicensing-Dc7qpUr6.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]))),Lie=b.lazy(()=>ve(()=>import("./DataflowAssistance-_Kh1baK9.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]))),Mie=b.lazy(()=>ve(()=>import("./PrometricAssistance-CNcejvsh.js"),__vite__mapDeps([11,1,2,3,4,5,6,7]))),$ie=b.lazy(()=>ve(()=>import("./FacilityLicensing-CDAp2zS8.js"),__vite__mapDeps([12,1,2,3,4,5,6,7]))),Fie=b.lazy(()=>ve(()=>import("./TrainingOverview-oxDyH3Vx.js"),__vite__mapDeps([13,14,3,15]))),zie=b.lazy(()=>ve(()=>
477import("./BLSAha-xyAsCpnF.js"),__vite__mapDeps([16,17,15,6,14]))),Bie=b.lazy(()=>ve(()=>import("./BLSAshi-CQdaFCgx.js"),__vite__mapDeps([18,17,15,6,14]))),Vie=b.lazy(()=>ve(()=>import("./ACLS-BU5g9RIv.js"),__vite__mapDeps([19,17,15,6,14]))),Uie=b.lazy(()=>ve(()=>import("./PALS-BCGquWZR.js"),__vite__mapDeps([20,17,15,6,14]))),Hie=b.lazy(()=>ve(()=>import("./CNA-CAY1WR1s.js"),__vite__mapDeps([21,17,15,6,14]))),Wie=b.lazy(()=>ve(()=>import("./InfectionControl-BnTTR4Ax.js"),__vite__mapDeps([22,17,15,6,14]))),qie=b.lazy(()=>ve(()=>import("./GermanNursing-TW8w4ng4.js"),__vite__mapDeps([23,5]))),Zie=b.lazy(()=>ve(()=>import("./About-Bux49dS_.js"),__vite__mapDeps([24,25]))),Gie=b.lazy(()=>ve(()=>import("./Contact-BuX2CJmg.js"),[])),Kie=b.lazy(()=>ve(()=>import("./BookConsultation-DYfvXaCd.js"),[])),Yie=b.lazy(()=>ve(()=>import("./MCQPackages-C0VwecNb.js"),[])),Jie=b.lazy(()=>ve(()=>import("./CPHQ-BFm4hv0h.js"),[])),Qie=b.lazy(()=>ve(()=>import("./CPPS-Czz1LXyc.js"),[])),Xie=b.lazy(()=>ve(()=>import("./FirstAid-CarNf2B1.js"),__vite__mapDeps([26,17,15,6,14]))),eae=b.lazy(()=>ve(()=>import("./Blog-Cr1l_3kO.js"),__vite__mapDeps([27,5]))),tae=b.lazy(()=>ve(()=>import("./EligibilityChecker-fQXX_OVX.js"),[])),nae=b.lazy(()=>ve(()=>import("./MedicalCenterSetup-BqrY_HBq.js"),[])),rae=b.lazy(()=>ve(()=>import("./ClinicLicensing-CA6TTcUX.js"),[])),sae=b.lazy(()=>ve(()=>import("./HomeHealthcareLicensing-CSBZBD_e.js"),[])),iae=b.lazy(()=>ve(()=>import("./GCCLicensing-CIzFiZsI.js"),__vite__mapDeps([28,2,3,4,5]))),aae=b.lazy(()=>ve(()=>import("./Webinars-qESvNzsb.js"),__vite__mapDeps([29,25]))),oae=b.lazy(()=>ve(()=>import("./PrivacyPolicy-B0vkQsn9.js"),[])),lae=b.lazy(()=>ve(()=>import("./AdminLayout-CabuPatR.js"),__vite__mapDeps([30,31,32,33,34,35,36]))),cae=b.lazy(()=>ve(()=>import("./AdminLogin-BAQkoA5J.js"),[])),uae=b.lazy(()=>ve(()=>import("./AdminDashboard-BJlSAiSd.js"),__vite__mapDeps([37,38,35,39,36,31,6,40,5,34,33]))),dae=b.lazy(()=>ve(()=>import("./AdminAnalytics-B0o-a0LA.js"),__vite__mapDeps([41,42,5]))),hae=b.lazy(()=>ve(()=>import("./AdminUsers-DqxqiDuH.js"),__vite__mapDeps([43,42]))),fae=b.lazy(()=>ve(()=>import("./AdminMedia-CaxhqkPF.js"),__vite__mapDeps([44,42,45,46,34,47,48]))),pae=b.lazy(()=>ve(()=>import("./AdminWebinars-Bs_vdYyb.js"),__vite__mapDeps([49,42,6,40]))),mae=b.lazy(()=>ve(()=>import("./AdminWebinarEdit-DymvCFCu.js"),__vite__mapDeps([50,42,48,51,6,52,53]))),gae=b.lazy(()=>ve(()=>import("./AdminContent-9uZpNh8j.js"),__vite__mapDeps([54,42,55,56,46,34,45,7,14,38,6,51,48,35]))),yae=b.lazy(()=>ve(()=>import("./AdminSeo-CmDXE8Nw.js"),__vite__mapDeps([57,42,56,46,34,45,6,31,51,48,40,47]))),vae=b.lazy(()=>ve(()=>import("./AdminForms-oRGc1CW3.js"),__vite__mapDeps([58,42,51,6,52,59,48,36,53]))),xae=b.lazy(()=>ve(()=>import("./AdminSettings-Boge4IiO.js"),__vite__mapDeps([60,42,55,6,51]))),wae=b.lazy(()=>ve(()=>import("./AdminSections-DAh6bIaD.js"),__vite__mapDeps([61,42,51,62]))),bae=b.lazy(()=>ve(()=>import("./AdminCareers-CqT2TiCy.js"),__vite__mapDeps([63,42,6,51,48,52]))),_ae=b.lazy(()=>ve(()=>import("./AdminApplications-gKO0UlYB.js"),__vite__mapDeps([64,42,53,48]))),kae=b.lazy(()=>ve(()=>import("./AdminBlog-Dsp2YTZZ.js"),__vite__mapDeps([65,42,66,6,48]))),Sae=b.lazy(()=>ve(()=>import("./AdminBlogEdit-7FZS4mxV.js"),__vite__mapDeps([67,42,56,46,34,45,66,31,51]))),Eae=b.lazy(()=>ve(()=>import("./AdminBlogAuthors-C3OwDQqS.js"),__vite__mapDeps([68,42,56,46,34,45,66,6,51,48]))),Cae=b.lazy(()=>ve(()=>import("./AdminBlogCategories-DHe-TixR.js"),__vite__mapDeps([69,42,66,6,51,48]))),Tae=b.lazy(()=>ve(()=>import("./BlogPost-BX6BuxSW.js"),[])),Aae=b.lazy(()=>ve(()=>import("./Careers-Bn58S3yP.js"),__vite__mapDeps([70,45]))),Pae=b.lazy(()=>ve(()=>import("./CareerHubRoutes-eRJYupy8.js"),__vite__mapDeps([71,72,39,32,59,62,4,6,48,5,40,53,45]))),jae=b.lazy(()=>ve(()=>import("./AdminCareerHub-BXyWIaOp.js"),__vite__mapDeps([73,42,72,39,6,53,48]))),Nae=new f4,Rae=()=>h.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsx("div",{className:"w-8 h-8 border-2 border-[#F9A01B] border-t-transparent roun
477ded-full animate-spin"}),h.jsx("p",{className:"text-gray-600 text-sm",children:"Loading..."})]})}),Oae=()=>h.jsx(m4,{client:Nae,children:h.jsxs(Pz,{children:[h.jsx(t3,{}),h.jsx(Y5,{}),h.jsx(f5,{children:h.jsx(f8,{children:h.jsx(g8,{children:h.jsx(kV,{children:h.jsx(h8,{children:h.jsxs(b.Suspense,{fallback:h.jsx(Rae,{}),children:[h.jsx(Pie,{}),h.jsx(Aie,{}),h.jsx(Rie,{}),h.jsx(y8,{}),h.jsxs(i5,{children:[h.jsx(ge,{path:"/",element:h.jsx(Cie,{})}),h.jsx(ge,{path:"/services/gcc-licensing",element:h.jsx(iae,{})}),h.jsx(ge,{path:"/services/dha-licensing",element:h.jsx(Oie,{})}),h.jsx(ge,{path:"/services/moh-licensing",element:h.jsx(Iie,{})}),h.jsx(ge,{path:"/services/doh-haad-licensing",element:h.jsx(Die,{})}),h.jsx(ge,{path:"/services/dataflow-assistance",element:h.jsx(Lie,{})}),h.jsx(ge,{path:"/services/prometric-assistance",element:h.jsx(Mie,{})}),h.jsx(ge,{path:"/services/facility-licensing",element:h.jsx($ie,{})}),h.jsx(ge,{path:"/services/medical-center-setup",element:h.jsx(nae,{})}),h.jsx(ge,{path:"/services/clinic-licensing",element:h.jsx(rae,{})}),h.jsx(ge,{path:"/services/home-healthcare-licensing",element:h.jsx(sae,{})}),h.jsx(ge,{path:"/training",element:h.jsx(Fie,{})}),h.jsx(ge,{path:"/training/bls-aha",element:h.jsx(zie,{})}),h.jsx(ge,{path:"/training/bls-ashi",element:h.jsx(Bie,{})}),h.jsx(ge,{path:"/training/acls",element:h.jsx(Vie,{})}),h.jsx(ge,{path:"/training/pals",element:h.jsx(Uie,{})}),h.jsx(ge,{path:"/training/cna",element:h.jsx(Hie,{})}),h.jsx(ge,{path:"/training/infection-control",element:h.jsx(Wie,{})}),h.jsx(ge,{path:"/training/cphq",element:h.jsx(Jie,{})}),h.jsx(ge,{path:"/training/cpps",element:h.jsx(Qie,{})}),h.jsx(ge,{path:"/training/first-aid",element:h.jsx(Xie,{})}),h.jsx(ge,{path:"/german-nursing-program",element:h.jsx(qie,{})}),h.jsx(ge,{path:"/about",element:h.jsx(Zie,{})}),h.jsx(ge,{path:"/contact",element:h.jsx(Gie,{})}),h.jsx(ge,{path:"/blog",element:h.jsx(eae,{})}),h.jsx(ge,{path:"/blog/:slug",element:h.jsx(Tae,{})}),h.jsx(ge,{path:"/book-consultation",element:h.jsx(Kie,{})}),h.jsx(ge,{path:"/mcq-packages",element:h.jsx(Yie,{})}),h.jsx(ge,{path:"/eligibility-checker",element:h.jsx(tae,{})}),h.jsx(ge,{path:"/webinars",element:h.jsx(aae,{})}),h.jsx(ge,{path:"/careers",element:h.jsx(Aae,{})}),h.jsx(ge,{path:"/career-hub/*",element:h.jsx(Pae,{})}),h.jsx(ge,{path:"/privacy-policy",element:h.jsx(oae,{})}),h.jsx(ge,{path:"/admin/login",element:h.jsx(cae,{})}),h.jsxs(ge,{path:"/admin",element:h.jsx(lae,{}),children:[h.jsx(ge,{index:!0,element:h.jsx(uae,{})}),h.jsx(ge,{path:"analytics",element:h.jsx(dae,{})}),h.jsx(ge,{path:"users",element:h.jsx(hae,{})}),h.jsx(ge,{path:"media",element:h.jsx(fae,{})}),h.jsx(ge,{path:"webinars",element:h.jsx(pae,{})}),h.jsx(ge,{path:"webinars/:id",element:h.jsx(mae,{})}),h.jsx(ge,{path:"content",element:h.jsx(gae,{})}),h.jsx(ge,{path:"sections",element:h.jsx(wae,{})}),h.jsx(ge,{path:"seo",element:h.jsx(yae,{})}),h.jsx(ge,{path:"forms",element:h.jsx(vae,{})}),h.jsx(ge,{path:"settings",element:h.jsx(xae,{})}),h.jsx(ge,{path:"careers",element:h.jsx(bae,{})}),h.jsx(ge,{path:"applications",element:h.jsx(_ae,{})}),h.jsx(ge,{path:"career-hub",element:h.jsx(jae,{})}),h.jsx(ge,{path:"blog",element:h.jsx(kae,{})}),h.jsx(ge,{path:"blog/authors",element:h.jsx(Eae,{})}),h.jsx(ge,{path:"blog/categories",element:h.jsx(Cae,{})}),h.jsx(ge,{path:"blog/:id",element:h.jsx(Sae,{})})]}),h.jsx(ge,{path:"*",element:h.jsx(Tie,{})})]})]})})})})})})]})});zA(document.getElementById("root")).render(h.jsx(ZA,{children:h.jsx(Oae,{})}));export{$z as $,hf as A,wx as B,wie as C,r8 as D,ir as E,TX as F,qP as G,GA as H,cF as I,YP as J,Uu as K,ze as L,ZP as M,v8 as N,kp as O,lj as P,KP as Q,hF as R,_ie as S,pF as T,R1 as U,UP as V,zz as W,ds as X,Mz as Y,ff as Z,ve as _,w8 as a,Dae as a$,Fs as a0,Fz as a1,Hae as a2,Gse as a3,Zy as a4,Mx as a5,cP as a6,Ep as a7,uF as a8,I2 as a9,coe as aA,Sp as aB,HP as aC,rN as aD,x8 as aE,lie as aF,p8 as aG,hr as aH,Lae as aI,Ev as aJ,$ae as aK,tF as aL,Mae as aM,xF as aN,jc as aO,zse as aP,Bse as aQ,Vse as aR,Use as aS,Zse as aT,Hse as aU,JS as aV,Ih as aW,Qi as aX,zP as aY,GP as aZ,uoe as a_,rF as aa,mF as ab,oj as ac,SI as ad,Gte as ae,BX as af,yw as ag,Pre as ah,UX as ai,JR as aj,$p as ak,tN as al,sie as am,X$ as an,Bu as ao,xP as ap,$m as aq,Nt as ar,at as as,jl as at,mn as au,Hs as av,u$ as aw,z as ax,Hr as ay,loe as az,mX as b,VP as b0,Lm as b1,doe as b2,Sie as b3,goe as b4,yoe as b5,sX as b6,Rx as b7,Sn as b8,f9 as b9,zu as ba,WP as bb,vF as bc,gh as bd,i5 as be,ge as bf,ioe as bg,iF as c,lF as d,Se as e,N1 as f,Au as g,Un as h,moe as i,h as j,gF as k,Wse as l,Mse as m,qse as n,Yj as o,Jj as p,aF as q,b as r,poe as s,_8 as t,ra as u,F2 as v,$2 as w,t$ as x,kt as y,Lx as z};

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.