mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
4168 lines
1.8 MiB
4168 lines
1.8 MiB
import{r as R,R as Je,a as B3,b as U3,c as pY,d as T_,e as fC,u as __,L as AR,N as ME,O as K3,f as fY,g as Um,h as mY,i as gY,j as hs,B as yY}from"./react-Dt2M6tWj.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(d){if(d.ep)return;d.ep=!0;const p=s(d);fetch(d.href,p)}})();var OR={exports:{}},nb={};var pM;function vY(){if(pM)return nb;pM=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,d,p){var m=null;if(p!==void 0&&(m=""+p),d.key!==void 0&&(m=""+d.key),"key"in d){p={};for(var g in d)g!=="key"&&(p[g]=d[g])}else p=d;return d=p.ref,{$$typeof:e,type:o,key:m,ref:d!==void 0?d:null,props:p}}return nb.Fragment=r,nb.jsx=s,nb.jsxs=s,nb}var fM;function xY(){return fM||(fM=1,OR.exports=vY()),OR.exports}var u=xY(),bY=(e,r,s,o,d,p,m,g)=>{let b=document.documentElement,S=["light","dark"];function j(T){(Array.isArray(e)?e:[e]).forEach(M=>{let I=M==="class",q=I&&p?d.map(G=>p[G]||G):d;I?(b.classList.remove(...q),b.classList.add(p&&p[T]?p[T]:T)):b.setAttribute(M,T)}),A(T)}function A(T){g&&S.includes(T)&&(b.style.colorScheme=T)}function k(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)j(o);else try{let T=localStorage.getItem(r)||s,M=m&&T==="system"?k():T;j(M)}catch{}},mM=["light","dark"],V3="(prefers-color-scheme: dark)",wY=typeof window>"u",$_=R.createContext(void 0),SY={setTheme:e=>{},themes:[]},N_=()=>{var e;return(e=R.useContext($_))!=null?e:SY},EY=e=>R.useContext($_)?R.createElement(R.Fragment,null,e.children):R.createElement(CY,{...e}),jY=["light","dark"],CY=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:o=!0,storageKey:d="theme",themes:p=jY,defaultTheme:m=s?"system":"light",attribute:g="data-theme",value:b,children:S,nonce:j,scriptProps:A})=>{let[k,T]=R.useState(()=>OY(d,m)),[M,I]=R.useState(()=>k==="system"?kR():k),q=b?Object.values(b):p,G=R.useCallback(ee=>{let oe=ee;if(!oe)return;ee==="system"&&s&&(oe=kR());let Q=b?b[oe]:oe,ne=r?kY(j):null,de=document.documentElement,je=ve=>{ve==="class"?(de.classList.remove(...q),Q&&de.classList.add(Q)):ve.startsWith("data-")&&(Q?de.setAttribute(ve,Q):de.removeAttribute(ve))};if(Array.isArray(g)?g.forEach(je):je(g),o){let ve=mM.includes(m)?m:null,le=mM.includes(oe)?oe:ve;de.style.colorScheme=le}ne?.()},[j]),K=R.useCallback(ee=>{let oe=typeof ee=="function"?ee(k):ee;T(oe);try{localStorage.setItem(d,oe)}catch{}},[k]),X=R.useCallback(ee=>{let oe=kR(ee);I(oe),k==="system"&&s&&!e&&G("system")},[k,e]);R.useEffect(()=>{let ee=window.matchMedia(V3);return ee.addListener(X),X(ee),()=>ee.removeListener(X)},[X]),R.useEffect(()=>{let ee=oe=>{oe.key===d&&(oe.newValue?T(oe.newValue):K(m))};return window.addEventListener("storage",ee),()=>window.removeEventListener("storage",ee)},[K]),R.useEffect(()=>{G(e??k)},[e,k]);let L=R.useMemo(()=>({theme:k,setTheme:K,forcedTheme:e,resolvedTheme:k==="system"?M:k,themes:s?[...p,"system"]:p,systemTheme:s?M:void 0}),[k,K,e,M,s,p]);return R.createElement($_.Provider,{value:L},R.createElement(AY,{forcedTheme:e,storageKey:d,attribute:g,enableSystem:s,enableColorScheme:o,defaultTheme:m,value:b,themes:p,nonce:j,scriptProps:A}),S)},AY=R.memo(({forcedTheme:e,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:d,defaultTheme:p,value:m,themes:g,nonce:b,scriptProps:S})=>{let j=JSON.stringify([s,r,p,e,g,m,o,d]).slice(1,-1);return R.createElement("script",{...S,suppressHydrationWarning:!0,nonce:typeof window>"u"?b:"",dangerouslySetInnerHTML:{__html:`(${bY.toString()})(${j})`}})}),OY=(e,r)=>{if(wY)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||r},kY=e=>{let r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},kR=e=>(e||(e=window.matchMedia(V3)),e.matches?"dark":"light");function RY({children:e,defaultTheme:r="system",storageKey:s="vite-ui-theme"}){return u.jsx(EY,{attribute:"class",defaultTheme:r,enableSystem:!0,storageKey:s,disableTransitionOnChange:!0,children:e})}var jg=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(){}},TY={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},_Y=class{#e=TY;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,r){return this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}},vp=new _Y;function $Y(e){setTimeout(e,0)}var Cp=typeof window>"u"||"Deno"in globalThis;function Pi(){}function NY(e,r){return typeof e=="function"?e(r):e}function ST(e){return typeof e=="number"&&e>=0&&e!==1/0}function H3(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Ld(e,r){return typeof e=="function"?e(r):e}function no(e,r){return typeof e=="function"?e(r):e}function gM(e,r){const{type:s="all",exact:o,fetchStatus:d,predicate:p,queryKey:m,stale:g}=e;if(m){if(o){if(r.queryHash!==D_(m,r.options))return!1}else if(!Mb(r.queryKey,m))return!1}if(s!=="all"){const b=r.isActive();if(s==="active"&&!b||s==="inactive"&&b)return!1}return!(typeof g=="boolean"&&r.isStale()!==g||d&&d!==r.state.fetchStatus||p&&!p(r))}function yM(e,r){const{exact:s,status:o,predicate:d,mutationKey:p}=e;if(p){if(!r.options.mutationKey)return!1;if(s){if(Ap(r.options.mutationKey)!==Ap(p))return!1}else if(!Mb(r.options.mutationKey,p))return!1}return!(o&&r.state.status!==o||d&&!d(r))}function D_(e,r){return(r?.queryKeyHashFn||Ap)(e)}function Ap(e){return JSON.stringify(e,(r,s)=>ET(s)?Object.keys(s).sort().reduce((o,d)=>(o[d]=s[d],o),{}):s)}function Mb(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(s=>Mb(e[s],r[s])):!1}var DY=Object.prototype.hasOwnProperty;function G3(e,r){if(e===r)return e;const s=vM(e)&&vM(r);if(!s&&!(ET(e)&&ET(r)))return r;const d=(s?e:Object.keys(e)).length,p=s?r:Object.keys(r),m=p.length,g=s?new Array(m):{};let b=0;for(let S=0;S<m;S++){const j=s?S:p[S],A=e[j],k=r[j];if(A===k){g[j]=A,(s?S<d:DY.call(e,j))&&b++;continue}if(A===null||k===null||typeof A!="object"||typeof k!="object"){g[j]=k;continue}const T=G3(A,k);g[j]=T,T===A&&b++}return d===m&&b===d?e:g}function Aj(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const s in e)if(e[s]!==r[s])return!1;return!0}function vM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ET(e){if(!xM(e))return!1;const r=e.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!xM(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xM(e){return Object.prototype.toString.call(e)==="[object Object]"}function PY(e){return new Promise(r=>{vp.setTimeout(r,e)})}function jT(e,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,r):s.structuralSharing!==!1?G3(e,r):r}function MY(e,r,s=0){const o=[...e,r];return s&&o.length>s?o.slice(1):o}function IY(e,r,s=0){const o=[r,...e];return s&&o.length>s?o.slice(0,-1):o}var P_=Symbol();function X3(e,r){return!e.queryFn&&r?.initialPromise?()=>r.initialPromise:!e.queryFn||e.queryFn===P_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Y3(e,r){return typeof e=="function"?e(...r):!!e}var LY=class extends jg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Cp&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},M_=new LY;function CT(){let e,r;const s=new Promise((d,p)=>{e=d,r=p});s.status="pending",s.catch(()=>{});function o(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{o({status:"fulfilled",value:d}),e(d)},s.reject=d=>{o({status:"rejected",reason:d}),r(d)},s}var zY=$Y;function FY(){let e=[],r=0,s=g=>{g()},o=g=>{g()},d=zY;const p=g=>{r?e.push(g):d(()=>{s(g)})},m=()=>{const g=e;e=[],g.length&&d(()=>{o(()=>{g.forEach(b=>{s(b)})})})};return{batch:g=>{let b;r++;try{b=g()}finally{r--,r||m()}return b},batchCalls:g=>(...b)=>{p(()=>{g(...b)})},schedule:p,setNotifyFunction:g=>{s=g},setBatchNotifyFunction:g=>{o=g},setScheduler:g=>{d=g}}}var Cs=FY(),qY=class extends jg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Cp&&window.addEventListener){const r=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Oj=new qY;function BY(e){return Math.min(1e3*2**e,3e4)}function Z3(e){return(e??"online")==="online"?Oj.isOnline():!0}var AT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function W3(e){let r=!1,s=0,o;const d=CT(),p=()=>d.status!=="pending",m=I=>{if(!p()){const q=new AT(I);k(q),e.onCancel?.(q)}},g=()=>{r=!0},b=()=>{r=!1},S=()=>M_.isFocused()&&(e.networkMode==="always"||Oj.isOnline())&&e.canRun(),j=()=>Z3(e.networkMode)&&e.canRun(),A=I=>{p()||(o?.(),d.resolve(I))},k=I=>{p()||(o?.(),d.reject(I))},T=()=>new Promise(I=>{o=q=>{(p()||S())&&I(q)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),M=()=>{if(p())return;let I;const q=s===0?e.initialPromise:void 0;try{I=q??e.fn()}catch(G){I=Promise.reject(G)}Promise.resolve(I).then(A).catch(G=>{if(p())return;const K=e.retry??(Cp?0:3),X=e.retryDelay??BY,L=typeof X=="function"?X(s,G):X,ee=K===!0||typeof K=="number"&&s<K||typeof K=="function"&&K(s,G);if(r||!ee){k(G);return}s++,e.onFail?.(s,G),PY(L).then(()=>S()?void 0:T()).then(()=>{r?k(G):M()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(o?.(),d),cancelRetry:g,continueRetry:b,canStart:j,start:()=>(j()?M():T().then(M),d)}}var J3=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ST(this.gcTime)&&(this.#e=vp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(vp.clearTimeout(this.#e),this.#e=void 0)}},UY=class extends J3{#e;#t;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=wM(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=wM(this.options);r.data!==void 0&&(this.setState(bM(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,r){const s=jT(this.state.data,e,this.options);return this.#i({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e,r){this.#i({type:"setState",state:e,setStateOptions:r})}cancel(e){const r=this.#r?.promise;return this.#r?.cancel(e),r?r.then(Pi).catch(Pi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>no(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===P_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ld(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!H3(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}const s=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},d=()=>{const g=X3(this.options,r),S=(()=>{const j={client:this.#s,queryKey:this.queryKey,meta:this.meta};return o(j),j})();return this.#o=!1,this.options.persister?this.options.persister(g,S,this):g(S)},m=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:d};return o(g),g})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#i({type:"fetch",meta:m.fetchOptions?.meta}),this.#r=W3({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:g=>{g instanceof AT&&g.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(g,b)=>{this.#i({type:"failed",failureCount:g,error:b})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const g=await this.#r.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#n.config.onSuccess?.(g,this),this.#n.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof AT){if(g.silent)return this.#r.promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#i({type:"error",error:g}),this.#n.config.onError?.(g,this),this.#n.config.onSettled?.(this.state.data,g,this),g}finally{this.scheduleGc()}}#i(e){const r=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Q3(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...bM(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const d=e.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=r(this.state),Cs.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Q3(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Z3(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bM(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wM(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,s=r!==void 0,o=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var KY=class extends jg{constructor(e,r){super(),this.options=r,this.#e=e,this.#i=null,this.#o=CT(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#m;#h;#p;#c;#u;#l;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),SM(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return OT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return OT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof no(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!Aj(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&EM(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),o&&(this.#t!==s||no(this.options.enabled,this.#t)!==no(r.enabled,this.#t)||Ld(this.options.staleTime,this.#t)!==Ld(r.staleTime,this.#t))&&this.#g();const d=this.#y();o&&(this.#t!==s||no(this.options.enabled,this.#t)!==no(r.enabled,this.#t)||d!==this.#l)&&this.#v(d)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(r,e);return HY(this,s)&&(this.#s=s,this.#a=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#s}trackResult(e,r){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),r?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#S();let r=this.#t.fetch(this.options,e);return e?.throwOnError||(r=r.catch(Pi)),r}#g(){this.#b();const e=Ld(this.options.staleTime,this.#t);if(Cp||this.#s.isStale||!ST(e))return;const s=H3(this.#s.dataUpdatedAt,e)+1;this.#c=vp.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Cp||no(this.options.enabled,this.#t)===!1||!ST(this.#l)||this.#l===0)&&(this.#u=vp.setInterval(()=>{(this.options.refetchIntervalInBackground||M_.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(vp.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(vp.clearInterval(this.#u),this.#u=void 0)}createResult(e,r){const s=this.#t,o=this.options,d=this.#s,p=this.#r,m=this.#a,b=e!==s?e.state:this.#n,{state:S}=e;let j={...S},A=!1,k;if(r._optimisticResults){const ne=this.hasListeners(),de=!ne&&SM(e,r),je=ne&&EM(e,s,r,o);(de||je)&&(j={...j,...Q3(S.data,e.options)}),r._optimisticResults==="isRestoring"&&(j.fetchStatus="idle")}let{error:T,errorUpdatedAt:M,status:I}=j;k=j.data;let q=!1;if(r.placeholderData!==void 0&&k===void 0&&I==="pending"){let ne;d?.isPlaceholderData&&r.placeholderData===m?.placeholderData?(ne=d.data,q=!0):ne=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,ne!==void 0&&(I="success",k=jT(d?.data,ne,r),A=!0)}if(r.select&&k!==void 0&&!q)if(d&&k===p?.data&&r.select===this.#m)k=this.#h;else try{this.#m=r.select,k=r.select(k),k=jT(d?.data,k,r),this.#h=k,this.#i=null}catch(ne){this.#i=ne}this.#i&&(T=this.#i,k=this.#h,M=Date.now(),I="error");const G=j.fetchStatus==="fetching",K=I==="pending",X=I==="error",L=K&&G,ee=k!==void 0,Q={status:I,fetchStatus:j.fetchStatus,isPending:K,isSuccess:I==="success",isError:X,isInitialLoading:L,isLoading:L,data:k,dataUpdatedAt:j.dataUpdatedAt,error:T,errorUpdatedAt:M,failureCount:j.fetchFailureCount,failureReason:j.fetchFailureReason,errorUpdateCount:j.errorUpdateCount,isFetched:j.dataUpdateCount>0||j.errorUpdateCount>0,isFetchedAfterMount:j.dataUpdateCount>b.dataUpdateCount||j.errorUpdateCount>b.errorUpdateCount,isFetching:G,isRefetching:G&&!K,isLoadingError:X&&!ee,isPaused:j.fetchStatus==="paused",isPlaceholderData:A,isRefetchError:X&&ee,isStale:I_(e,r),refetch:this.refetch,promise:this.#o,isEnabled:no(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=ve=>{Q.status==="error"?ve.reject(Q.error):Q.data!==void 0&&ve.resolve(Q.data)},de=()=>{const ve=this.#o=Q.promise=CT();ne(ve)},je=this.#o;switch(je.status){case"pending":e.queryHash===s.queryHash&&ne(je);break;case"fulfilled":(Q.status==="error"||Q.data!==je.value)&&de();break;case"rejected":(Q.status!=="error"||Q.error!==je.reason)&&de();break}}return Q}updateResult(){const e=this.#s,r=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),Aj(r,e))return;this.#s=r;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,d=typeof o=="function"?o():o;if(d==="all"||!d&&!this.#f.size)return!0;const p=new Set(d??this.#f);return this.options.throwOnError&&p.add("error"),Object.keys(this.#s).some(m=>{const g=m;return this.#s[g]!==e[g]&&p.has(g)})};this.#E({listeners:s()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const r=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){Cs.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function VY(e,r){return no(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&r.retryOnMount===!1)}function SM(e,r){return VY(e,r)||e.state.data!==void 0&&OT(e,r,r.refetchOnMount)}function OT(e,r,s){if(no(r.enabled,e)!==!1&&Ld(r.staleTime,e)!=="static"){const o=typeof s=="function"?s(e):s;return o==="always"||o!==!1&&I_(e,r)}return!1}function EM(e,r,s,o){return(e!==r||no(o.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&I_(e,s)}function I_(e,r){return no(r.enabled,e)!==!1&&e.isStaleByTime(Ld(r.staleTime,e))}function HY(e,r){return!Aj(e.getCurrentResult(),r)}function jM(e){return{onFetch:(r,s)=>{const o=r.options,d=r.fetchOptions?.meta?.fetchMore?.direction,p=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let g={pages:[],pageParams:[]},b=0;const S=async()=>{let j=!1;const A=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>(r.signal.aborted?j=!0:r.signal.addEventListener("abort",()=>{j=!0}),r.signal)})},k=X3(r.options,r.fetchOptions),T=async(M,I,q)=>{if(j)return Promise.reject();if(I==null&&M.pages.length)return Promise.resolve(M);const K=(()=>{const oe={client:r.client,queryKey:r.queryKey,pageParam:I,direction:q?"backward":"forward",meta:r.options.meta};return A(oe),oe})(),X=await k(K),{maxPages:L}=r.options,ee=q?IY:MY;return{pages:ee(M.pages,X,L),pageParams:ee(M.pageParams,I,L)}};if(d&&p.length){const M=d==="backward",I=M?GY:CM,q={pages:p,pageParams:m},G=I(o,q);g=await T(q,G,M)}else{const M=e??p.length;do{const I=b===0?m[0]??o.initialPageParam:CM(o,g);if(b>0&&I==null)break;g=await T(g,I),b++}while(b<M)}return g};r.options.persister?r.fetchFn=()=>r.options.persister?.(S,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=S}}}function CM(e,{pages:r,pageParams:s}){const o=r.length-1;return r.length>0?e.getNextPageParam(r[o],r,s[o],s):void 0}function GY(e,{pages:r,pageParams:s}){return r.length>0?e.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var XY=class extends J3{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||eL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(r=>r!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const r=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=W3({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(p,m)=>{this.#r({type:"failed",failureCount:p,error:m})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",d=!this.#s.canStart();try{if(o)r();else{this.#r({type:"pending",variables:e,isPaused:d}),await this.#n.config.onMutate?.(e,this,s);const m=await this.options.onMutate?.(e,s);m!==this.state.context&&this.#r({type:"pending",context:m,variables:e,isPaused:d})}const p=await this.#s.start();return await this.#n.config.onSuccess?.(p,e,this.state.context,this,s),await this.options.onSuccess?.(p,e,this.state.context,s),await this.#n.config.onSettled?.(p,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(p,null,e,this.state.context,s),this.#r({type:"success",data:p}),p}catch(p){try{throw await this.#n.config.onError?.(p,e,this.state.context,this,s),await this.options.onError?.(p,e,this.state.context,s),await this.#n.config.onSettled?.(void 0,p,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(void 0,p,e,this.state.context,s),p}finally{this.#r({type:"error",error:p})}}finally{this.#n.runNext(this)}}#r(e){const r=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Cs.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function eL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var YY=class extends jg{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,r,s){const o=new XY({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(r),state:s});return this.add(o),o}add(e){this.#e.add(e);const r=IE(e);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(e):this.#t.set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const r=IE(e);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&this.#t.delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=IE(e);if(typeof r=="string"){const o=this.#t.get(r)?.find(d=>d.state.status==="pending");return!o||o===e}else return!0}runNext(e){const r=IE(e);return typeof r=="string"?this.#t.get(r)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Cs.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const r={exact:!0,...e};return this.getAll().find(s=>yM(r,s))}findAll(e={}){return this.getAll().filter(r=>yM(e,r))}notify(e){Cs.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return Cs.batch(()=>Promise.all(e.map(r=>r.continue().catch(Pi))))}};function IE(e){return e.options.scope?.id}var ZY=class extends jg{#e;#t=void 0;#n;#s;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),Aj(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Ap(s.mutationKey)!==Ap(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#a(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(r,s){return this.#s=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??eL();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#a(r){Cs.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#t.variables,o=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};r?.type==="success"?(this.#s.onSuccess?.(r.data,s,o,d),this.#s.onSettled?.(r.data,null,s,o,d)):r?.type==="error"&&(this.#s.onError?.(r.error,s,o,d),this.#s.onSettled?.(void 0,r.error,s,o,d))}this.listeners.forEach(s=>{s(this.#t)})})}},WY=class extends jg{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,r,s){const o=r.queryKey,d=r.queryHash??D_(o,r);let p=this.get(d);return p||(p=new UY({client:e,queryKey:o,queryHash:d,options:e.defaultQueryOptions(r),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(p)),p}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=this.#e.get(e.queryHash);r&&(e.destroy(),r===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Cs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const r={exact:!0,...e};return this.getAll().find(s=>gM(r,s))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(s=>gM(e,s)):r}notify(e){Cs.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},JY=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#e=e.queryCache||new WY,this.#t=e.mutationCache||new YY,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=M_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Oj.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),s=this.#e.build(this,r),o=s.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Ld(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:r,state:s})=>{const o=s.data;return[r,o]})}setQueryData(e,r,s){const o=this.defaultQueryOptions({queryKey:e}),p=this.#e.get(o.queryHash)?.state.data,m=NY(r,p);if(m!==void 0)return this.#e.build(this,o).setData(m,{...s,manual:!0})}setQueriesData(e,r,s){return Cs.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,r,s)]))}getQueryState(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state}removeQueries(e){const r=this.#e;Cs.batch(()=>{r.findAll(e).forEach(s=>{r.remove(s)})})}resetQueries(e,r){const s=this.#e;return Cs.batch(()=>(s.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const s={revert:!0,...r},o=Cs.batch(()=>this.#e.findAll(e).map(d=>d.cancel(s)));return Promise.all(o).then(Pi).catch(Pi)}invalidateQueries(e,r={}){return Cs.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},r)))}refetchQueries(e,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},o=Cs.batch(()=>this.#e.findAll(e).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let p=d.fetch(void 0,s);return s.throwOnError||(p=p.catch(Pi)),d.state.fetchStatus==="paused"?Promise.resolve():p}));return Promise.all(o).then(Pi)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(Ld(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pi).catch(Pi)}fetchInfiniteQuery(e){return e.behavior=jM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pi).catch(Pi)}ensureInfiniteQueryData(e){return e.behavior=jM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Oj.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,r){this.#s.set(Ap(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...this.#s.values()],s={};return r.forEach(o=>{Mb(e,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(e,r){this.#r.set(Ap(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...this.#r.values()],s={};return r.forEach(o=>{Mb(e,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const r={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=D_(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===P_&&(r.enabled=!1),r}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},tL=R.createContext(void 0),Hs=e=>{const r=R.useContext(tL);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},QY=({client:e,children:r})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(tL.Provider,{value:e,children:r})),nL=R.createContext(!1),eZ=()=>R.useContext(nL);nL.Provider;function tZ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nZ=R.createContext(tZ()),rZ=()=>R.useContext(nZ),sZ=(e,r)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(r.isReset()||(e.retryOnMount=!1))},iZ=e=>{R.useEffect(()=>{e.clearReset()},[e])},aZ=({result:e,errorResetBoundary:r,throwOnError:s,query:o,suspense:d})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(d&&e.data===void 0||Y3(s,[e.error,o])),oZ=e=>{if(e.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...d)=>s(o(...d)):s(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},lZ=(e,r)=>e.isLoading&&e.isFetching&&!r,cZ=(e,r)=>e?.suspense&&r.isPending,AM=(e,r,s)=>r.fetchOptimistic(e).catch(()=>{s.clearReset()});function uZ(e,r,s){const o=eZ(),d=rZ(),p=Hs(),m=p.defaultQueryOptions(e);p.getDefaultOptions().queries?._experimental_beforeQuery?.(m),m._optimisticResults=o?"isRestoring":"optimistic",oZ(m),sZ(m,d),iZ(d);const g=!p.getQueryCache().get(m.queryHash),[b]=R.useState(()=>new r(p,m)),S=b.getOptimisticResult(m),j=!o&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(A=>{const k=j?b.subscribe(Cs.batchCalls(A)):Pi;return b.updateResult(),k},[b,j]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),R.useEffect(()=>{b.setOptions(m)},[m,b]),cZ(m,S))throw AM(m,b,d);if(aZ({result:S,errorResetBoundary:d,throwOnError:m.throwOnError,query:p.getQueryCache().get(m.queryHash),suspense:m.suspense}))throw S.error;return p.getDefaultOptions().queries?._experimental_afterQuery?.(m,S),m.experimental_prefetchInRender&&!Cp&&lZ(S,o)&&(g?AM(m,b,d):p.getQueryCache().get(m.queryHash)?.promise)?.catch(Pi).finally(()=>{b.updateResult()}),m.notifyOnChangeProps?S:b.trackResult(S)}function rr(e,r){return uZ(e,KY)}function nn(e,r){const s=Hs(),[o]=R.useState(()=>new ZY(s,e));R.useEffect(()=>{o.setOptions(e)},[o,e]);const d=R.useSyncExternalStore(R.useCallback(m=>o.subscribe(Cs.batchCalls(m)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),p=R.useCallback((m,g)=>{o.mutate(m,g).catch(Pi)},[o]);if(d.error&&Y3(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:p,mutateAsync:d.mutate}}const dZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hZ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,o)=>o?o.toUpperCase():s.toLowerCase()),OM=e=>{const r=hZ(e);return r.charAt(0).toUpperCase()+r.slice(1)},rL=(...e)=>e.filter((r,s,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===s).join(" ").trim(),pZ=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var fZ={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"};const mZ=R.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:d="",children:p,iconNode:m,...g},b)=>R.createElement("svg",{ref:b,...fZ,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:rL("lucide",d),...!p&&!pZ(g)&&{"aria-hidden":"true"},...g},[...m.map(([S,j])=>R.createElement(S,j)),...Array.isArray(p)?p:[p]]));const ln=(e,r)=>{const s=R.forwardRef(({className:o,...d},p)=>R.createElement(mZ,{ref:p,iconNode:r,className:rL(`lucide-${dZ(OM(e))}`,`lucide-${e}`,o),...d}));return s.displayName=OM(e),s};const gZ=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],yZ=ln("boxes",gZ);const vZ=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],sL=ln("building-2",vZ);const xZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],iL=ln("check",xZ);const bZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],aL=ln("chevron-down",bZ);const wZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],SZ=ln("chevron-right",wZ);const EZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jZ=ln("chevron-up",EZ);const CZ=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],AZ=ln("chevrons-up-down",CZ);const OZ=[["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"}]],kM=ln("circle-alert",OZ);const kZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],L_=ln("circle-check",kZ);const RZ=[["path",{d:"M22 2 2 22",key:"y4kqgn"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Jb=ln("circle-slash-2",RZ);const TZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_Z=ln("circle",TZ);const $Z=[["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"}]],NZ=ln("clipboard",$Z);const DZ=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],PZ=ln("component",DZ);const MZ=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],IZ=ln("download",MZ);const LZ=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zZ=ln("earth",LZ);const FZ=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],z_=ln("ellipsis",FZ);const qZ=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],BZ=ln("external-link",qZ);const UZ=[["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"}]],kT=ln("eye",UZ);const KZ=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],VZ=ln("file-code-corner",KZ);const HZ=[["path",{d:"M10.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.1",key:"1a2hbp"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 15 1 1",key:"1h4vmv"}],["path",{d:"m11 14-4.586 4.586",key:"maylof"}],["circle",{cx:"5",cy:"20",r:"2",key:"860zyv"}]],GZ=ln("file-key",HZ);const XZ=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],YZ=ln("git-commit-horizontal",XZ);const ZZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oL=ln("info",ZZ);const WZ=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],JZ=ln("key-round",WZ);const QZ=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],LE=ln("link",QZ);const eW=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ds=ln("loader-circle",eW);const tW=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],nW=ln("lock-keyhole",tW);const rW=[["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"}]],sW=ln("map-pin",rW);const iW=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],aW=ln("monitor",iW);const oW=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],lW=ln("moon",oW);const cW=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],uW=ln("network",cW);const dW=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],hW=ln("octagon-x",dW);const pW=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],fW=ln("panel-left",pW);const mW=[["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"}]],pu=ln("pencil",mW);const gW=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],oo=ln("plus",gW);const yW=[["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"}]],vW=ln("refresh-cw",yW);const xW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pa=ln("search",xW);const bW=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],F_=ln("server",bW);const wW=[["path",{d:"M3 3h.01",key:"159qn6"}],["path",{d:"M7 5h.01",key:"1hq22a"}],["path",{d:"M11 7h.01",key:"1osv80"}],["path",{d:"M3 7h.01",key:"1xzrh3"}],["path",{d:"M7 9h.01",key:"19b3jx"}],["path",{d:"M3 11h.01",key:"1eifu7"}],["rect",{width:"4",height:"4",x:"15",y:"5",key:"mri9e4"}],["path",{d:"m19 9 2 2v10c0 .6-.4 1-1 1h-6c-.6 0-1-.4-1-1V11l2-2",key:"aib6hk"}],["path",{d:"m13 14 8-2",key:"1d7bmk"}],["path",{d:"m13 19 8-2",key:"1y2vml"}]],SW=ln("spray-can",wW);const EW=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],jW=ln("sun",EW);const CW=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],mC=ln("tags",CW);const AW=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ib=ln("trash-2",AW);const OW=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],kj=ln("triangle-alert",OW);const kW=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],RW=ln("user-round",kW);const TW=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],lL=ln("users",TW);const _W=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],$W=ln("wrench",_W);const NW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],q_=ln("x",NW);function DW(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const PW=e=>{switch(e){case"success":return LW;case"info":return FW;case"warning":return zW;case"error":return qW;default:return null}},MW=Array(12).fill(0),IW=({visible:e,className:r})=>Je.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},Je.createElement("div",{className:"sonner-spinner"},MW.map((s,o)=>Je.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),LW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),zW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Je.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"})),FW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),qW=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Je.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"})),BW=Je.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"},Je.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Je.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),UW=()=>{const[e,r]=Je.useState(document.hidden);return Je.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let RT=1;class KW{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:o,...d}=r,p=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:RT++,m=this.toasts.find(b=>b.id===p),g=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(p)&&this.dismissedToasts.delete(p),m?this.toasts=this.toasts.map(b=>b.id===p?(this.publish({...b,...r,id:p,title:o}),{...b,...r,id:p,dismissible:g,title:o}):b):this.addToast({title:o,...d,dismissible:g,id:p}),p},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(o=>o({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let o;s.loading!==void 0&&(o=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const d=Promise.resolve(r instanceof Function?r():r);let p=o!==void 0,m;const g=d.then(async S=>{if(m=["resolve",S],Je.isValidElement(S))p=!1,this.create({id:o,type:"default",message:S});else if(HW(S)&&!S.ok){p=!1;const A=typeof s.error=="function"?await s.error(`HTTP error! status: ${S.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${S.status}`):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(S instanceof Error){p=!1;const A=typeof s.error=="function"?await s.error(S):s.error,k=typeof s.description=="function"?await s.description(S):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(s.success!==void 0){p=!1;const A=typeof s.success=="function"?await s.success(S):s.success,k=typeof s.description=="function"?await s.description(S):s.description,M=typeof A=="object"&&!Je.isValidElement(A)?A:{message:A};this.create({id:o,type:"success",description:k,...M})}}).catch(async S=>{if(m=["reject",S],s.error!==void 0){p=!1;const j=typeof s.error=="function"?await s.error(S):s.error,A=typeof s.description=="function"?await s.description(S):s.description,T=typeof j=="object"&&!Je.isValidElement(j)?j:{message:j};this.create({id:o,type:"error",description:A,...T})}}).finally(()=>{p&&(this.dismiss(o),o=void 0),s.finally==null||s.finally.call(s)}),b=()=>new Promise((S,j)=>g.then(()=>m[0]==="reject"?j(m[1]):S(m[1])).catch(j));return typeof o!="string"&&typeof o!="number"?{unwrap:b}:Object.assign(o,{unwrap:b})},this.custom=(r,s)=>{const o=s?.id||RT++;return this.create({jsx:r(o),id:o,...s}),o},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ca=new KW,VW=(e,r)=>{const s=r?.id||RT++;return ca.addToast({title:e,...r,id:s}),s},HW=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",GW=VW,XW=()=>ca.toasts,YW=()=>ca.getActiveToasts(),Ze=Object.assign(GW,{success:ca.success,info:ca.info,warning:ca.warning,error:ca.error,custom:ca.custom,message:ca.message,promise:ca.promise,dismiss:ca.dismiss,loading:ca.loading},{getHistory:XW,getToasts:YW});DW("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function zE(e){return e.label!==void 0}const ZW=3,WW="24px",JW="16px",RM=4e3,QW=356,eJ=14,tJ=45,nJ=200;function Wl(...e){return e.filter(Boolean).join(" ")}function rJ(e){const[r,s]=e.split("-"),o=[];return r&&o.push(r),s&&o.push(s),o}const sJ=e=>{var r,s,o,d,p,m,g,b,S;const{invert:j,toast:A,unstyled:k,interacting:T,setHeights:M,visibleToasts:I,heights:q,index:G,toasts:K,expanded:X,removeToast:L,defaultRichColors:ee,closeButton:oe,style:Q,cancelButtonStyle:ne,actionButtonStyle:de,className:je="",descriptionClassName:ve="",duration:le,position:be,gap:Ce,expandByDefault:Ke,classNames:ce,icons:re,closeButtonAriaLabel:ue="Close toast"}=e,[_e,fe]=Je.useState(null),[He,Oe]=Je.useState(null),[ke,Ve]=Je.useState(!1),[ie,De]=Je.useState(!1),[Le,tt]=Je.useState(!1),[yt,Ot]=Je.useState(!1),[Ft,kt]=Je.useState(!1),[Jt,ze]=Je.useState(0),[zt,Rt]=Je.useState(0),V=Je.useRef(A.duration||le||RM),Dn=Je.useRef(null),cn=Je.useRef(null),xe=G===0,Ne=G+1<=I,Ge=A.type,D=A.dismissible!==!1,z=A.className||"",H=A.descriptionClassName||"",Z=Je.useMemo(()=>q.findIndex(Lt=>Lt.toastId===A.id)||0,[q,A.id]),we=Je.useMemo(()=>{var Lt;return(Lt=A.closeButton)!=null?Lt:oe},[A.closeButton,oe]),Re=Je.useMemo(()=>A.duration||le||RM,[A.duration,le]),st=Je.useRef(0),Kt=Je.useRef(0),Qt=Je.useRef(0),Fn=Je.useRef(null),[dn,Ht]=be.split("-"),wi=Je.useMemo(()=>q.reduce((Lt,vr,Yr)=>Yr>=Z?Lt:Lt+vr.height,0),[q,Z]),Xr=UW(),fa=A.invert||j,uo=Ge==="loading";Kt.current=Je.useMemo(()=>Z*Ce+wi,[Z,wi]),Je.useEffect(()=>{V.current=Re},[Re]),Je.useEffect(()=>{Ve(!0)},[]),Je.useEffect(()=>{const Lt=cn.current;if(Lt){const vr=Lt.getBoundingClientRect().height;return Rt(vr),M(Yr=>[{toastId:A.id,height:vr,position:A.position},...Yr]),()=>M(Yr=>Yr.filter(Os=>Os.toastId!==A.id))}},[M,A.id]),Je.useLayoutEffect(()=>{if(!ke)return;const Lt=cn.current,vr=Lt.style.height;Lt.style.height="auto";const Yr=Lt.getBoundingClientRect().height;Lt.style.height=vr,Rt(Yr),M(Os=>Os.find(Er=>Er.toastId===A.id)?Os.map(Er=>Er.toastId===A.id?{...Er,height:Yr}:Er):[{toastId:A.id,height:Yr,position:A.position},...Os])},[ke,A.title,A.description,M,A.id,A.jsx,A.action,A.cancel]);const Ma=Je.useCallback(()=>{De(!0),ze(Kt.current),M(Lt=>Lt.filter(vr=>vr.toastId!==A.id)),setTimeout(()=>{L(A)},nJ)},[A,L,M,Kt]);Je.useEffect(()=>{if(A.promise&&Ge==="loading"||A.duration===1/0||A.type==="loading")return;let Lt;return X||T||Xr?(()=>{if(Qt.current<st.current){const Os=new Date().getTime()-st.current;V.current=V.current-Os}Qt.current=new Date().getTime()})():(()=>{V.current!==1/0&&(st.current=new Date().getTime(),Lt=setTimeout(()=>{A.onAutoClose==null||A.onAutoClose.call(A,A),Ma()},V.current))})(),()=>clearTimeout(Lt)},[X,T,A,Ge,Xr,Ma]),Je.useEffect(()=>{A.delete&&(Ma(),A.onDismiss==null||A.onDismiss.call(A,A))},[Ma,A.delete]);function cc(){var Lt;if(re?.loading){var vr;return Je.createElement("div",{className:Wl(ce?.loader,A==null||(vr=A.classNames)==null?void 0:vr.loader,"sonner-loader"),"data-visible":Ge==="loading"},re.loading)}return Je.createElement(IW,{className:Wl(ce?.loader,A==null||(Lt=A.classNames)==null?void 0:Lt.loader),visible:Ge==="loading"})}const xu=A.icon||re?.[Ge]||PW(Ge);var uc,ma;return Je.createElement("li",{tabIndex:0,ref:cn,className:Wl(je,z,ce?.toast,A==null||(r=A.classNames)==null?void 0:r.toast,ce?.default,ce?.[Ge],A==null||(s=A.classNames)==null?void 0:s[Ge]),"data-sonner-toast":"","data-rich-colors":(uc=A.richColors)!=null?uc:ee,"data-styled":!(A.jsx||A.unstyled||k),"data-mounted":ke,"data-promise":!!A.promise,"data-swiped":Ft,"data-removed":ie,"data-visible":Ne,"data-y-position":dn,"data-x-position":Ht,"data-index":G,"data-front":xe,"data-swiping":Le,"data-dismissible":D,"data-type":Ge,"data-invert":fa,"data-swipe-out":yt,"data-swipe-direction":He,"data-expanded":!!(X||Ke&&ke),"data-testid":A.testId,style:{"--index":G,"--toasts-before":G,"--z-index":K.length-G,"--offset":`${ie?Jt:Kt.current}px`,"--initial-height":Ke?"auto":`${zt}px`,...Q,...A.style},onDragEnd:()=>{tt(!1),fe(null),Fn.current=null},onPointerDown:Lt=>{Lt.button!==2&&(uo||!D||(Dn.current=new Date,ze(Kt.current),Lt.target.setPointerCapture(Lt.pointerId),Lt.target.tagName!=="BUTTON"&&(tt(!0),Fn.current={x:Lt.clientX,y:Lt.clientY})))},onPointerUp:()=>{var Lt,vr,Yr;if(yt||!D)return;Fn.current=null;const Os=Number(((Lt=cn.current)==null?void 0:Lt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pn=Number(((vr=cn.current)==null?void 0:vr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Er=new Date().getTime()-((Yr=Dn.current)==null?void 0:Yr.getTime()),Ys=_e==="x"?Os:Pn,ll=Math.abs(Ys)/Er;if(Math.abs(Ys)>=tJ||ll>.11){ze(Kt.current),A.onDismiss==null||A.onDismiss.call(A,A),Oe(_e==="x"?Os>0?"right":"left":Pn>0?"down":"up"),Ma(),Ot(!0);return}else{var gs,Zs;(gs=cn.current)==null||gs.style.setProperty("--swipe-amount-x","0px"),(Zs=cn.current)==null||Zs.style.setProperty("--swipe-amount-y","0px")}kt(!1),tt(!1),fe(null)},onPointerMove:Lt=>{var vr,Yr,Os;if(!Fn.current||!D||((vr=window.getSelection())==null?void 0:vr.toString().length)>0)return;const Er=Lt.clientY-Fn.current.y,Ys=Lt.clientX-Fn.current.x;var ll;const gs=(ll=e.swipeDirections)!=null?ll:rJ(be);!_e&&(Math.abs(Ys)>1||Math.abs(Er)>1)&&fe(Math.abs(Ys)>Math.abs(Er)?"x":"y");let Zs={x:0,y:0};const bu=ga=>1/(1.5+Math.abs(ga)/20);if(_e==="y"){if(gs.includes("top")||gs.includes("bottom"))if(gs.includes("top")&&Er<0||gs.includes("bottom")&&Er>0)Zs.y=Er;else{const ga=Er*bu(Er);Zs.y=Math.abs(ga)<Math.abs(Er)?ga:Er}}else if(_e==="x"&&(gs.includes("left")||gs.includes("right")))if(gs.includes("left")&&Ys<0||gs.includes("right")&&Ys>0)Zs.x=Ys;else{const ga=Ys*bu(Ys);Zs.x=Math.abs(ga)<Math.abs(Ys)?ga:Ys}(Math.abs(Zs.x)>0||Math.abs(Zs.y)>0)&&kt(!0),(Yr=cn.current)==null||Yr.style.setProperty("--swipe-amount-x",`${Zs.x}px`),(Os=cn.current)==null||Os.style.setProperty("--swipe-amount-y",`${Zs.y}px`)}},we&&!A.jsx&&Ge!=="loading"?Je.createElement("button",{"aria-label":ue,"data-disabled":uo,"data-close-button":!0,onClick:uo||!D?()=>{}:()=>{Ma(),A.onDismiss==null||A.onDismiss.call(A,A)},className:Wl(ce?.closeButton,A==null||(o=A.classNames)==null?void 0:o.closeButton)},(ma=re?.close)!=null?ma:BW):null,(Ge||A.icon||A.promise)&&A.icon!==null&&(re?.[Ge]!==null||A.icon)?Je.createElement("div",{"data-icon":"",className:Wl(ce?.icon,A==null||(d=A.classNames)==null?void 0:d.icon)},A.promise||A.type==="loading"&&!A.icon?A.icon||cc():null,A.type!=="loading"?xu:null):null,Je.createElement("div",{"data-content":"",className:Wl(ce?.content,A==null||(p=A.classNames)==null?void 0:p.content)},Je.createElement("div",{"data-title":"",className:Wl(ce?.title,A==null||(m=A.classNames)==null?void 0:m.title)},A.jsx?A.jsx:typeof A.title=="function"?A.title():A.title),A.description?Je.createElement("div",{"data-description":"",className:Wl(ve,H,ce?.description,A==null||(g=A.classNames)==null?void 0:g.description)},typeof A.description=="function"?A.description():A.description):null),Je.isValidElement(A.cancel)?A.cancel:A.cancel&&zE(A.cancel)?Je.createElement("button",{"data-button":!0,"data-cancel":!0,style:A.cancelButtonStyle||ne,onClick:Lt=>{zE(A.cancel)&&D&&(A.cancel.onClick==null||A.cancel.onClick.call(A.cancel,Lt),Ma())},className:Wl(ce?.cancelButton,A==null||(b=A.classNames)==null?void 0:b.cancelButton)},A.cancel.label):null,Je.isValidElement(A.action)?A.action:A.action&&zE(A.action)?Je.createElement("button",{"data-button":!0,"data-action":!0,style:A.actionButtonStyle||de,onClick:Lt=>{zE(A.action)&&(A.action.onClick==null||A.action.onClick.call(A.action,Lt),!Lt.defaultPrevented&&Ma())},className:Wl(ce?.actionButton,A==null||(S=A.classNames)==null?void 0:S.actionButton)},A.action.label):null)};function TM(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function iJ(e,r){const s={};return[e,r].forEach((o,d)=>{const p=d===1,m=p?"--mobile-offset":"--offset",g=p?JW:WW;function b(S){["top","right","bottom","left"].forEach(j=>{s[`${m}-${j}`]=typeof S=="number"?`${S}px`:S})}typeof o=="number"||typeof o=="string"?b(o):typeof o=="object"?["top","right","bottom","left"].forEach(S=>{o[S]===void 0?s[`${m}-${S}`]=g:s[`${m}-${S}`]=typeof o[S]=="number"?`${o[S]}px`:o[S]}):b(g)}),s}const aJ=Je.forwardRef(function(r,s){const{id:o,invert:d,position:p="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:b,className:S,offset:j,mobileOffset:A,theme:k="light",richColors:T,duration:M,style:I,visibleToasts:q=ZW,toastOptions:G,dir:K=TM(),gap:X=eJ,icons:L,containerAriaLabel:ee="Notifications"}=r,[oe,Q]=Je.useState([]),ne=Je.useMemo(()=>o?oe.filter(ke=>ke.toasterId===o):oe.filter(ke=>!ke.toasterId),[oe,o]),de=Je.useMemo(()=>Array.from(new Set([p].concat(ne.filter(ke=>ke.position).map(ke=>ke.position)))),[ne,p]),[je,ve]=Je.useState([]),[le,be]=Je.useState(!1),[Ce,Ke]=Je.useState(!1),[ce,re]=Je.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ue=Je.useRef(null),_e=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),fe=Je.useRef(null),He=Je.useRef(!1),Oe=Je.useCallback(ke=>{Q(Ve=>{var ie;return(ie=Ve.find(De=>De.id===ke.id))!=null&&ie.delete||ca.dismiss(ke.id),Ve.filter(({id:De})=>De!==ke.id)})},[]);return Je.useEffect(()=>ca.subscribe(ke=>{if(ke.dismiss){requestAnimationFrame(()=>{Q(Ve=>Ve.map(ie=>ie.id===ke.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{B3.flushSync(()=>{Q(Ve=>{const ie=Ve.findIndex(De=>De.id===ke.id);return ie!==-1?[...Ve.slice(0,ie),{...Ve[ie],...ke},...Ve.slice(ie+1)]:[ke,...Ve]})})})}),[oe]),Je.useEffect(()=>{if(k!=="system"){re(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;const ke=window.matchMedia("(prefers-color-scheme: dark)");try{ke.addEventListener("change",({matches:Ve})=>{re(Ve?"dark":"light")})}catch{ke.addListener(({matches:ie})=>{try{re(ie?"dark":"light")}catch(De){console.error(De)}})}},[k]),Je.useEffect(()=>{oe.length<=1&&be(!1)},[oe]),Je.useEffect(()=>{const ke=Ve=>{var ie;if(m.every(tt=>Ve[tt]||Ve.code===tt)){var Le;be(!0),(Le=ue.current)==null||Le.focus()}Ve.code==="Escape"&&(document.activeElement===ue.current||(ie=ue.current)!=null&&ie.contains(document.activeElement))&&be(!1)};return document.addEventListener("keydown",ke),()=>document.removeEventListener("keydown",ke)},[m]),Je.useEffect(()=>{if(ue.current)return()=>{fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null,He.current=!1)}},[ue.current]),Je.createElement("section",{ref:s,"aria-label":`${ee} ${_e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},de.map((ke,Ve)=>{var ie;const[De,Le]=ke.split("-");return ne.length?Je.createElement("ol",{key:ke,dir:K==="auto"?TM():K,tabIndex:-1,ref:ue,className:S,"data-sonner-toaster":!0,"data-sonner-theme":ce,"data-y-position":De,"data-x-position":Le,style:{"--front-toast-height":`${((ie=je[0])==null?void 0:ie.height)||0}px`,"--width":`${QW}px`,"--gap":`${X}px`,...I,...iJ(j,A)},onBlur:tt=>{He.current&&!tt.currentTarget.contains(tt.relatedTarget)&&(He.current=!1,fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null))},onFocus:tt=>{tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false"||He.current||(He.current=!0,fe.current=tt.relatedTarget)},onMouseEnter:()=>be(!0),onMouseMove:()=>be(!0),onMouseLeave:()=>{Ce||be(!1)},onDragEnd:()=>be(!1),onPointerDown:tt=>{tt.target instanceof HTMLElement&&tt.target.dataset.dismissible==="false"||Ke(!0)},onPointerUp:()=>Ke(!1)},ne.filter(tt=>!tt.position&&Ve===0||tt.position===ke).map((tt,yt)=>{var Ot,Ft;return Je.createElement(sJ,{key:tt.id,icons:L,index:yt,toast:tt,defaultRichColors:T,duration:(Ot=G?.duration)!=null?Ot:M,className:G?.className,descriptionClassName:G?.descriptionClassName,invert:d,visibleToasts:q,closeButton:(Ft=G?.closeButton)!=null?Ft:b,interacting:Ce,position:ke,style:G?.style,unstyled:G?.unstyled,classNames:G?.classNames,cancelButtonStyle:G?.cancelButtonStyle,actionButtonStyle:G?.actionButtonStyle,closeButtonAriaLabel:G?.closeButtonAriaLabel,removeToast:Oe,toasts:ne.filter(kt=>kt.position==tt.position),heights:je.filter(kt=>kt.position==tt.position),setHeights:ve,expandByDefault:g,gap:X,expanded:le,swipeDirections:r.swipeDirections})})):null}))}),oJ=({...e})=>{const{theme:r="system"}=N_();return u.jsx(aJ,{theme:r,className:"toaster group",icons:{success:u.jsx(L_,{className:"size-4"}),info:u.jsx(oL,{className:"size-4"}),warning:u.jsx(kj,{className:"size-4"}),error:u.jsx(hW,{className:"size-4"}),loading:u.jsx(Ds,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},lJ=new JY,cJ=({children:e})=>u.jsx(QY,{client:lJ,children:u.jsxs(RY,{defaultTheme:"system",storageKey:"dragon-theme",children:[e,u.jsx(oJ,{richColors:!0,expand:!0,position:"top-center"})]})});var RR={exports:{}},rb={},TR={exports:{}},_R={};var _M;function uJ(){return _M||(_M=1,(function(e){function r(ce,re){var ue=ce.length;ce.push(re);e:for(;0<ue;){var _e=ue-1>>>1,fe=ce[_e];if(0<d(fe,re))ce[_e]=re,ce[ue]=fe,ue=_e;else break e}}function s(ce){return ce.length===0?null:ce[0]}function o(ce){if(ce.length===0)return null;var re=ce[0],ue=ce.pop();if(ue!==re){ce[0]=ue;e:for(var _e=0,fe=ce.length,He=fe>>>1;_e<He;){var Oe=2*(_e+1)-1,ke=ce[Oe],Ve=Oe+1,ie=ce[Ve];if(0>d(ke,ue))Ve<fe&&0>d(ie,ke)?(ce[_e]=ie,ce[Ve]=ue,_e=Ve):(ce[_e]=ke,ce[Oe]=ue,_e=Oe);else if(Ve<fe&&0>d(ie,ue))ce[_e]=ie,ce[Ve]=ue,_e=Ve;else break e}}return re}function d(ce,re){var ue=ce.sortIndex-re.sortIndex;return ue!==0?ue:ce.id-re.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;e.unstable_now=function(){return p.now()}}else{var m=Date,g=m.now();e.unstable_now=function(){return m.now()-g}}var b=[],S=[],j=1,A=null,k=3,T=!1,M=!1,I=!1,q=!1,G=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function L(ce){for(var re=s(S);re!==null;){if(re.callback===null)o(S);else if(re.startTime<=ce)o(S),re.sortIndex=re.expirationTime,r(b,re);else break;re=s(S)}}function ee(ce){if(I=!1,L(ce),!M)if(s(b)!==null)M=!0,oe||(oe=!0,le());else{var re=s(S);re!==null&&Ke(ee,re.startTime-ce)}}var oe=!1,Q=-1,ne=5,de=-1;function je(){return q?!0:!(e.unstable_now()-de<ne)}function ve(){if(q=!1,oe){var ce=e.unstable_now();de=ce;var re=!0;try{e:{M=!1,I&&(I=!1,K(Q),Q=-1),T=!0;var ue=k;try{t:{for(L(ce),A=s(b);A!==null&&!(A.expirationTime>ce&&je());){var _e=A.callback;if(typeof _e=="function"){A.callback=null,k=A.priorityLevel;var fe=_e(A.expirationTime<=ce);if(ce=e.unstable_now(),typeof fe=="function"){A.callback=fe,L(ce),re=!0;break t}A===s(b)&&o(b),L(ce)}else o(b);A=s(b)}if(A!==null)re=!0;else{var He=s(S);He!==null&&Ke(ee,He.startTime-ce),re=!1}}break e}finally{A=null,k=ue,T=!1}re=void 0}}finally{re?le():oe=!1}}}var le;if(typeof X=="function")le=function(){X(ve)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,Ce=be.port2;be.port1.onmessage=ve,le=function(){Ce.postMessage(null)}}else le=function(){G(ve,0)};function Ke(ce,re){Q=G(function(){ce(e.unstable_now())},re)}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(ce){ce.callback=null},e.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<ce?Math.floor(1e3/ce):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(ce){switch(k){case 1:case 2:case 3:var re=3;break;default:re=k}var ue=k;k=re;try{return ce()}finally{k=ue}},e.unstable_requestPaint=function(){q=!0},e.unstable_runWithPriority=function(ce,re){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var ue=k;k=ce;try{return re()}finally{k=ue}},e.unstable_scheduleCallback=function(ce,re,ue){var _e=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?_e+ue:_e):ue=_e,ce){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ue+fe,ce={id:j++,callback:re,priorityLevel:ce,startTime:ue,expirationTime:fe,sortIndex:-1},ue>_e?(ce.sortIndex=ue,r(S,ce),s(b)===null&&ce===s(S)&&(I?(K(Q),Q=-1):I=!0,Ke(ee,ue-_e))):(ce.sortIndex=fe,r(b,ce),M||T||(M=!0,oe||(oe=!0,le()))),ce},e.unstable_shouldYield=je,e.unstable_wrapCallback=function(ce){var re=k;return function(){var ue=k;k=re;try{return ce.apply(this,arguments)}finally{k=ue}}}})(_R)),_R}var $M;function dJ(){return $M||($M=1,TR.exports=uJ()),TR.exports}var NM;function hJ(){if(NM)return rb;NM=1;var e=dJ(),r=U3(),s=pY();function o(a){var c="https://react.dev/errors/"+a;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function p(a){var c=a,f=a;if(a.alternate)for(;c.return;)c=c.return;else{a=c;do c=a,(c.flags&4098)!==0&&(f=c.return),a=c.return;while(a)}return c.tag===3?f:null}function m(a){if(a.tag===13){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function g(a){if(a.tag===31){var c=a.memoizedState;if(c===null&&(a=a.alternate,a!==null&&(c=a.memoizedState)),c!==null)return c.dehydrated}return null}function b(a){if(p(a)!==a)throw Error(o(188))}function S(a){var c=a.alternate;if(!c){if(c=p(a),c===null)throw Error(o(188));return c!==a?null:a}for(var f=a,y=c;;){var E=f.return;if(E===null)break;var O=E.alternate;if(O===null){if(y=E.return,y!==null){f=y;continue}break}if(E.child===O.child){for(O=E.child;O;){if(O===f)return b(E),a;if(O===y)return b(E),c;O=O.sibling}throw Error(o(188))}if(f.return!==y.return)f=E,y=O;else{for(var B=!1,te=E.child;te;){if(te===f){B=!0,f=E,y=O;break}if(te===y){B=!0,y=E,f=O;break}te=te.sibling}if(!B){for(te=O.child;te;){if(te===f){B=!0,f=O,y=E;break}if(te===y){B=!0,y=O,f=E;break}te=te.sibling}if(!B)throw Error(o(189))}}if(f.alternate!==y)throw Error(o(190))}if(f.tag!==3)throw Error(o(188));return f.stateNode.current===f?a:c}function j(a){var c=a.tag;if(c===5||c===26||c===27||c===6)return a;for(a=a.child;a!==null;){if(c=j(a),c!==null)return c;a=a.sibling}return null}var A=Object.assign,k=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),X=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),ve=Symbol.iterator;function le(a){return a===null||typeof a!="object"?null:(a=ve&&a[ve]||a["@@iterator"],typeof a=="function"?a:null)}var be=Symbol.for("react.client.reference");function Ce(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===be?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case I:return"Fragment";case G:return"Profiler";case q:return"StrictMode";case ee:return"Suspense";case oe:return"SuspenseList";case de:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case M:return"Portal";case X:return a.displayName||"Context";case K:return(a._context.displayName||"Context")+".Consumer";case L:var c=a.render;return a=a.displayName,a||(a=c.displayName||c.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return c=a.displayName||null,c!==null?c:Ce(a.type)||"Memo";case ne:c=a._payload,a=a._init;try{return Ce(a(c))}catch{}}return null}var Ke=Array.isArray,ce=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},_e=[],fe=-1;function He(a){return{current:a}}function Oe(a){0>fe||(a.current=_e[fe],_e[fe]=null,fe--)}function ke(a,c){fe++,_e[fe]=a.current,a.current=c}var Ve=He(null),ie=He(null),De=He(null),Le=He(null);function tt(a,c){switch(ke(De,c),ke(ie,a),ke(Ve,null),c.nodeType){case 9:case 11:a=(a=c.documentElement)&&(a=a.namespaceURI)?gd(a):0;break;default:if(a=c.tagName,c=c.namespaceURI)c=gd(c),a=qh(c,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Oe(Ve),ke(Ve,a)}function yt(){Oe(Ve),Oe(ie),Oe(De)}function Ot(a){a.memoizedState!==null&&ke(Le,a);var c=Ve.current,f=qh(c,a.type);c!==f&&(ke(ie,a),ke(Ve,f))}function Ft(a){ie.current===a&&(Oe(Ve),Oe(ie)),Le.current===a&&(Oe(Le),bd._currentValue=ue)}var kt,Jt;function ze(a){if(kt===void 0)try{throw Error()}catch(f){var c=f.stack.trim().match(/\n( *(at )?)/);kt=c&&c[1]||"",Jt=-1<f.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+kt+a+Jt}var zt=!1;function Rt(a,c){if(!a||zt)return"";zt=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(c){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Xe){var Ue=Xe}Reflect.construct(a,[],rt)}else{try{rt.call()}catch(Xe){Ue=Xe}a.call(rt.prototype)}}else{try{throw Error()}catch(Xe){Ue=Xe}(rt=a())&&typeof rt.catch=="function"&&rt.catch(function(){})}}catch(Xe){if(Xe&&Ue&&typeof Xe.stack=="string")return[Xe.stack,Ue.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=y.DetermineComponentFrameRoot(),B=O[0],te=O[1];if(B&&te){var ye=B.split(`
|
||
`),Be=te.split(`
|
||
`);for(E=y=0;y<ye.length&&!ye[y].includes("DetermineComponentFrameRoot");)y++;for(;E<Be.length&&!Be[E].includes("DetermineComponentFrameRoot");)E++;if(y===ye.length||E===Be.length)for(y=ye.length-1,E=Be.length-1;1<=y&&0<=E&&ye[y]!==Be[E];)E--;for(;1<=y&&0<=E;y--,E--)if(ye[y]!==Be[E]){if(y!==1||E!==1)do if(y--,E--,0>E||ye[y]!==Be[E]){var We=`
|
||
`+ye[y].replace(" at new "," at ");return a.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",a.displayName)),We}while(1<=y&&0<=E);break}}}finally{zt=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?ze(f):""}function V(a,c){switch(a.tag){case 26:case 27:case 5:return ze(a.type);case 16:return ze("Lazy");case 13:return a.child!==c&&c!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return Rt(a.type,!1);case 11:return Rt(a.type.render,!1);case 1:return Rt(a.type,!0);case 31:return ze("Activity");default:return""}}function Dn(a){try{var c="",f=null;do c+=V(a,f),f=a,a=a.return;while(a);return c}catch(y){return`
|
||
Error generating stack: `+y.message+`
|
||
`+y.stack}}var cn=Object.prototype.hasOwnProperty,xe=e.unstable_scheduleCallback,Ne=e.unstable_cancelCallback,Ge=e.unstable_shouldYield,D=e.unstable_requestPaint,z=e.unstable_now,H=e.unstable_getCurrentPriorityLevel,Z=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,st=e.unstable_LowPriority,Kt=e.unstable_IdlePriority,Qt=e.log,Fn=e.unstable_setDisableYieldValue,dn=null,Ht=null;function wi(a){if(typeof Qt=="function"&&Fn(a),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(dn,a)}catch{}}var Xr=Math.clz32?Math.clz32:Ma,fa=Math.log,uo=Math.LN2;function Ma(a){return a>>>=0,a===0?32:31-(fa(a)/uo|0)|0}var cc=256,xu=262144,uc=4194304;function ma(a){var c=a&42;if(c!==0)return c;switch(a&-a){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Lt(a,c,f){var y=a.pendingLanes;if(y===0)return 0;var E=0,O=a.suspendedLanes,B=a.pingedLanes;a=a.warmLanes;var te=y&134217727;return te!==0?(y=te&~O,y!==0?E=ma(y):(B&=te,B!==0?E=ma(B):f||(f=te&~a,f!==0&&(E=ma(f))))):(te=y&~O,te!==0?E=ma(te):B!==0?E=ma(B):f||(f=y&~a,f!==0&&(E=ma(f)))),E===0?0:c!==0&&c!==E&&(c&O)===0&&(O=E&-E,f=c&-c,O>=f||O===32&&(f&4194048)!==0)?c:E}function vr(a,c){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&c)===0}function Yr(a,c){switch(a){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32: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 c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Os(){var a=uc;return uc<<=1,(uc&62914560)===0&&(uc=4194304),a}function Pn(a){for(var c=[],f=0;31>f;f++)c.push(a);return c}function Er(a,c){a.pendingLanes|=c,c!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ys(a,c,f,y,E,O){var B=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var te=a.entanglements,ye=a.expirationTimes,Be=a.hiddenUpdates;for(f=B&~f;0<f;){var We=31-Xr(f),rt=1<<We;te[We]=0,ye[We]=-1;var Ue=Be[We];if(Ue!==null)for(Be[We]=null,We=0;We<Ue.length;We++){var Xe=Ue[We];Xe!==null&&(Xe.lane&=-536870913)}f&=~rt}y!==0&&ll(a,y,0),O!==0&&E===0&&a.tag!==0&&(a.suspendedLanes|=O&~(B&~c))}function ll(a,c,f){a.pendingLanes|=c,a.suspendedLanes&=~c;var y=31-Xr(c);a.entangledLanes|=c,a.entanglements[y]=a.entanglements[y]|1073741824|f&261930}function gs(a,c){var f=a.entangledLanes|=c;for(a=a.entanglements;f;){var y=31-Xr(f),E=1<<y;E&c|a[y]&c&&(a[y]|=c),f&=~E}}function Zs(a,c){var f=c&-c;return f=(f&42)!==0?1:bu(f),(f&(a.suspendedLanes|c))!==0?0:f}function bu(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function ga(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function wu(){var a=re.p;return a!==0?a:(a=window.event,a===void 0?32:US(a.type))}function Lg(a,c){var f=re.p;try{return re.p=a,c()}finally{re.p=f}}var ya=Math.random().toString(36).slice(2),ss="__reactFiber$"+ya,Ps="__reactProps$"+ya,cl="__reactContainer$"+ya,Gt="__reactEvents$"+ya,Nt="__reactListeners$"+ya,eA="__reactHandles$"+ya,zg="__reactResources$"+ya,Vi="__reactMarker$"+ya;function Qd(a){delete a[ss],delete a[Ps],delete a[Gt],delete a[Nt],delete a[eA]}function dc(a){var c=a[ss];if(c)return c;for(var f=a.parentNode;f;){if(c=f[cl]||f[ss]){if(f=c.alternate,c.child!==null||f!==null&&f.child!==null)for(a=kS(a);a!==null;){if(f=a[ss])return f;a=kS(a)}return c}a=f,f=a.parentNode}return null}function hc(a){if(a=a[ss]||a[cl]){var c=a.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return a}return null}function Hi(a){var c=a.tag;if(c===5||c===26||c===27||c===6)return a.stateNode;throw Error(o(33))}function ul(a){var c=a[zg];return c||(c=a[zg]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function Zr(a){a[Vi]=!0}var ht=new Set,vw={};function sr(a,c){Si(a,c),Si(a+"Capture",c)}function Si(a,c){for(vw[a]=c,a=0;a<c.length;a++)ht.add(c[a])}var Su=RegExp("^[: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]*$"),Eu={},ju={};function Fg(a){return cn.call(ju,a)?!0:cn.call(Eu,a)?!1:Su.test(a)?ju[a]=!0:(Eu[a]=!0,!1)}function pc(a,c,f){if(Fg(c))if(f===null)a.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(c);return;case"boolean":var y=c.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){a.removeAttribute(c);return}}a.setAttribute(c,""+f)}}function dl(a,c,f){if(f===null)a.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttribute(c,""+f)}}function va(a,c,f,y){if(y===null)a.removeAttribute(f);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(c,f,""+y)}}function Ws(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function fc(a){var c=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function eh(a,c,f){var y=Object.getOwnPropertyDescriptor(a.constructor.prototype,c);if(!a.hasOwnProperty(c)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var E=y.get,O=y.set;return Object.defineProperty(a,c,{configurable:!0,get:function(){return E.call(this)},set:function(B){f=""+B,O.call(this,B)}}),Object.defineProperty(a,c,{enumerable:y.enumerable}),{getValue:function(){return f},setValue:function(B){f=""+B},stopTracking:function(){a._valueTracker=null,delete a[c]}}}}function ho(a){if(!a._valueTracker){var c=fc(a)?"checked":"value";a._valueTracker=eh(a,c,""+a[c])}}function Cu(a){if(!a)return!1;var c=a._valueTracker;if(!c)return!0;var f=c.getValue(),y="";return a&&(y=fc(a)?a.checked?"true":"false":a.value),a=y,a!==f?(c.setValue(a),!0):!1}function hl(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var th=/[\n"\\]/g;function Js(a){return a.replace(th,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function Lp(a,c,f,y,E,O,B,te){a.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?a.type=B:a.removeAttribute("type"),c!=null?B==="number"?(c===0&&a.value===""||a.value!=c)&&(a.value=""+Ws(c)):a.value!==""+Ws(c)&&(a.value=""+Ws(c)):B!=="submit"&&B!=="reset"||a.removeAttribute("value"),c!=null?zp(a,B,Ws(c)):f!=null?zp(a,B,Ws(f)):y!=null&&a.removeAttribute("value"),E==null&&O!=null&&(a.defaultChecked=!!O),E!=null&&(a.checked=E&&typeof E!="function"&&typeof E!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?a.name=""+Ws(te):a.removeAttribute("name")}function qg(a,c,f,y,E,O,B,te){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.type=O),c!=null||f!=null){if(!(O!=="submit"&&O!=="reset"||c!=null)){ho(a);return}f=f!=null?""+Ws(f):"",c=c!=null?""+Ws(c):f,te||c===a.value||(a.value=c),a.defaultValue=c}y=y??E,y=typeof y!="function"&&typeof y!="symbol"&&!!y,a.checked=te?a.checked:!!y,a.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(a.name=B),ho(a)}function zp(a,c,f){c==="number"&&hl(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function Au(a,c,f,y){if(a=a.options,c){c={};for(var E=0;E<f.length;E++)c["$"+f[E]]=!0;for(f=0;f<a.length;f++)E=c.hasOwnProperty("$"+a[f].value),a[f].selected!==E&&(a[f].selected=E),E&&y&&(a[f].defaultSelected=!0)}else{for(f=""+Ws(f),c=null,E=0;E<a.length;E++){if(a[E].value===f){a[E].selected=!0,y&&(a[E].defaultSelected=!0);return}c!==null||a[E].disabled||(c=a[E])}c!==null&&(c.selected=!0)}}function xw(a,c,f){if(c!=null&&(c=""+Ws(c),c!==a.value&&(a.value=c),f==null)){a.defaultValue!==c&&(a.defaultValue=c);return}a.defaultValue=f!=null?""+Ws(f):""}function bw(a,c,f,y){if(c==null){if(y!=null){if(f!=null)throw Error(o(92));if(Ke(y)){if(1<y.length)throw Error(o(93));y=y[0]}f=y}f==null&&(f=""),c=f}f=Ws(c),a.defaultValue=f,y=a.textContent,y===f&&y!==""&&y!==null&&(a.value=y),ho(a)}function Ou(a,c){if(c){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=c;return}}a.textContent=c}var tA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ww(a,c,f){var y=c.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?y?a.setProperty(c,""):c==="float"?a.cssFloat="":a[c]="":y?a.setProperty(c,f):typeof f!="number"||f===0||tA.has(c)?c==="float"?a.cssFloat=f:a[c]=(""+f).trim():a[c]=f+"px"}function Sw(a,c,f){if(c!=null&&typeof c!="object")throw Error(o(62));if(a=a.style,f!=null){for(var y in f)!f.hasOwnProperty(y)||c!=null&&c.hasOwnProperty(y)||(y.indexOf("--")===0?a.setProperty(y,""):y==="float"?a.cssFloat="":a[y]="");for(var E in c)y=c[E],c.hasOwnProperty(E)&&f[E]!==y&&ww(a,E,y)}else for(var O in c)c.hasOwnProperty(O)&&ww(a,O,c[O])}function nh(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Ew=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Bg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rh(a){return Bg.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function xa(){}var is=null;function Ug(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ku=null,mc=null;function Kg(a){var c=hc(a);if(c&&(a=c.stateNode)){var f=a[Ps]||null;e:switch(a=c.stateNode,c.type){case"input":if(Lp(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),c=f.name,f.type==="radio"&&c!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Js(""+c)+'"][type="radio"]'),c=0;c<f.length;c++){var y=f[c];if(y!==a&&y.form===a.form){var E=y[Ps]||null;if(!E)throw Error(o(90));Lp(y,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(c=0;c<f.length;c++)y=f[c],y.form===a.form&&Cu(y)}break e;case"textarea":xw(a,f.value,f.defaultValue);break e;case"select":c=f.value,c!=null&&Au(a,!!f.multiple,c,!1)}}}var Fp=!1;function qp(a,c,f){if(Fp)return a(c,f);Fp=!0;try{var y=a(c);return y}finally{if(Fp=!1,(ku!==null||mc!==null)&&(Lf(),ku&&(c=ku,a=mc,mc=ku=null,Kg(c),a)))for(c=0;c<a.length;c++)Kg(a[c])}}function Ru(a,c){var f=a.stateNode;if(f===null)return null;var y=f[Ps]||null;if(y===null)return null;f=y[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(o(231,c,typeof f));return f}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bp=!1;if(ar)try{var po={};Object.defineProperty(po,"passive",{get:function(){Bp=!0}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{Bp=!1}var Rr=null,sh=null,Tu=null;function jw(){if(Tu)return Tu;var a,c=sh,f=c.length,y,E="value"in Rr?Rr.value:Rr.textContent,O=E.length;for(a=0;a<f&&c[a]===E[a];a++);var B=f-a;for(y=1;y<=B&&c[f-y]===E[O-y];y++);return Tu=E.slice(a,1<y?1-y:void 0)}function Up(a){var c=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&c===13&&(a=13)):a=c,a===10&&(a=13),32<=a||a===13?a:0}function Kp(){return!0}function as(){return!1}function Ms(a){function c(f,y,E,O,B){this._reactName=f,this._targetInst=E,this.type=y,this.nativeEvent=O,this.target=B,this.currentTarget=null;for(var te in a)a.hasOwnProperty(te)&&(f=a[te],this[te]=f?f(O):O[te]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?Kp:as,this.isPropagationStopped=as,this}return A(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Kp)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Kp)},persist:function(){},isPersistent:Kp}),c}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ih=Ms(fo),_u=A({},fo,{view:0,detail:0}),Cw=Ms(_u),Vp,Hp,$u,ah=A({},_u,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xg,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==$u&&($u&&a.type==="mousemove"?(Vp=a.screenX-$u.screenX,Hp=a.screenY-$u.screenY):Hp=Vp=0,$u=a),Vp)},movementY:function(a){return"movementY"in a?a.movementY:Hp}}),Aw=Ms(ah),nA=A({},ah,{dataTransfer:0}),Ow=Ms(nA),rA=A({},_u,{relatedTarget:0}),Vg=Ms(rA),kw=A({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Rw=Ms(kw),Tw=A({},fo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),_w=Ms(Tw),$w=A({},fo,{data:0}),Hg=Ms($w),Nw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gg={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"},Dw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sA(a){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(a):(a=Dw[a])?!!c[a]:!1}function Xg(){return sA}var Pw=A({},_u,{key:function(a){if(a.key){var c=Nw[a.key]||a.key;if(c!=="Unidentified")return c}return a.type==="keypress"?(a=Up(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Gg[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xg,charCode:function(a){return a.type==="keypress"?Up(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Up(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),iA=Ms(Pw),Mw=A({},ah,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Iw=Ms(Mw),Lw=A({},_u,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xg}),Yg=Ms(Lw),pl=A({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),aA=Ms(pl),oA=A({},ah,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),lA=Ms(oA),zw=A({},fo,{newState:0,oldState:0}),Fw=Ms(zw),qw=[9,13,27,32],Gi=ar&&"CompositionEvent"in window,ba=null;ar&&"documentMode"in document&&(ba=document.documentMode);var Qs=ar&&"TextEvent"in window&&!ba,gc=ar&&(!Gi||ba&&8<ba&&11>=ba),Bw=" ",Zg=!1;function Uw(a,c){switch(a){case"keyup":return qw.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wg(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var yc=!1;function Nu(a,c){switch(a){case"compositionend":return Wg(c);case"keypress":return c.which!==32?null:(Zg=!0,Bw);case"textInput":return a=c.data,a===Bw&&Zg?null:a;default:return null}}function cA(a,c){if(yc)return a==="compositionend"||!Gi&&Uw(a,c)?(a=jw(),Tu=sh=Rr=null,yc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return gc&&c.locale!=="ko"?null:c.data;default:return null}}var Kw={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 Bt(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c==="input"?!!Kw[a.type]:c==="textarea"}function oh(a,c,f,y){ku?mc?mc.push(y):mc=[y]:ku=y,c=Yf(c,"onChange"),0<c.length&&(f=new ih("onChange","change",null,f,y),a.push({event:f,listeners:c}))}var Du=null,Xi=null;function Vw(a){wS(a,0)}function mo(a){var c=Hi(a);if(Cu(c))return a}function Gp(a,c){if(a==="change")return c}var Nr=!1;if(ar){var Pu;if(ar){var lh="oninput"in document;if(!lh){var Jg=document.createElement("div");Jg.setAttribute("oninput","return;"),lh=typeof Jg.oninput=="function"}Pu=lh}else Pu=!1;Nr=Pu&&(!document.documentMode||9<document.documentMode)}function Hw(){Du&&(Du.detachEvent("onpropertychange",Gw),Xi=Du=null)}function Gw(a){if(a.propertyName==="value"&&mo(Xi)){var c=[];oh(c,Xi,a,Ug(a)),qp(Vw,c)}}function Mu(a,c,f){a==="focusin"?(Hw(),Du=c,Xi=f,Du.attachEvent("onpropertychange",Gw)):a==="focusout"&&Hw()}function uA(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return mo(Xi)}function Xw(a,c){if(a==="click")return mo(c)}function dA(a,c){if(a==="input"||a==="change")return mo(c)}function hA(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var ei=typeof Object.is=="function"?Object.is:hA;function Iu(a,c){if(ei(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var f=Object.keys(a),y=Object.keys(c);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var E=f[y];if(!cn.call(c,E)||!ei(a[E],c[E]))return!1}return!0}function Yw(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Zw(a,c){var f=Yw(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=c&&y>=c)return{node:f,offset:c-a};a=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Yw(f)}}function Ww(a,c){return a&&c?a===c?!0:a&&a.nodeType===3?!1:c&&c.nodeType===3?Ww(a,c.parentNode):"contains"in a?a.contains(c):a.compareDocumentPosition?!!(a.compareDocumentPosition(c)&16):!1:!1}function Jw(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var c=hl(a.document);c instanceof a.HTMLIFrameElement;){try{var f=typeof c.contentWindow.location.href=="string"}catch{f=!1}if(f)a=c.contentWindow;else break;c=hl(a.document)}return c}function Qg(a){var c=a&&a.nodeName&&a.nodeName.toLowerCase();return c&&(c==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||c==="textarea"||a.contentEditable==="true")}var Qw=ar&&"documentMode"in document&&11>=document.documentMode,fl=null,Lu=null,go=null,Xp=!1;function ey(a,c,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Xp||fl==null||fl!==hl(y)||(y=fl,"selectionStart"in y&&Qg(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),go&&Iu(go,y)||(go=y,y=Yf(Lu,"onSelect"),0<y.length&&(c=new ih("onSelect","select",null,c,f),a.push({event:c,listeners:y}),c.target=fl)))}function wa(a,c){var f={};return f[a.toLowerCase()]=c.toLowerCase(),f["Webkit"+a]="webkit"+c,f["Moz"+a]="moz"+c,f}var vc={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},ty={},ny={};ar&&(ny=document.createElement("div").style,"AnimationEvent"in window||(delete vc.animationend.animation,delete vc.animationiteration.animation,delete vc.animationstart.animation),"TransitionEvent"in window||delete vc.transitionend.transition);function ml(a){if(ty[a])return ty[a];if(!vc[a])return a;var c=vc[a],f;for(f in c)if(c.hasOwnProperty(f)&&f in ny)return ty[a]=c[f];return a}var ry=ml("animationend"),sy=ml("animationiteration"),iy=ml("animationstart"),yo=ml("transitionrun"),pA=ml("transitionstart"),ay=ml("transitioncancel"),Yp=ml("transitionend"),e0=new Map,oy="abort auxClick beforeToggle 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(" ");oy.push("scrollEnd");function Sa(a,c){e0.set(a,c),sr(c,[a])}var xc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yi=[],zu=0,ly=0;function Zp(){for(var a=zu,c=ly=zu=0;c<a;){var f=Yi[c];Yi[c++]=null;var y=Yi[c];Yi[c++]=null;var E=Yi[c];Yi[c++]=null;var O=Yi[c];if(Yi[c++]=null,y!==null&&E!==null){var B=y.pending;B===null?E.next=E:(E.next=B.next,B.next=E),y.pending=E}O!==0&&t0(f,E,O)}}function Wp(a,c,f,y){Yi[zu++]=a,Yi[zu++]=c,Yi[zu++]=f,Yi[zu++]=y,ly|=y,a.lanes|=y,a=a.alternate,a!==null&&(a.lanes|=y)}function cy(a,c,f,y){return Wp(a,c,f,y),Jp(a)}function bc(a,c){return Wp(a,null,null,c),Jp(a)}function t0(a,c,f){a.lanes|=f;var y=a.alternate;y!==null&&(y.lanes|=f);for(var E=!1,O=a.return;O!==null;)O.childLanes|=f,y=O.alternate,y!==null&&(y.childLanes|=f),O.tag===22&&(a=O.stateNode,a===null||a._visibility&1||(E=!0)),a=O,O=O.return;return a.tag===3?(O=a.stateNode,E&&c!==null&&(E=31-Xr(f),a=O.hiddenUpdates,y=a[E],y===null?a[E]=[c]:y.push(c),c.lane=f|536870912),O):null}function Jp(a){if(50<Dh)throw Dh=0,wv=null,Error(o(185));for(var c=a.return;c!==null;)a=c,c=a.return;return a.tag===3?a.stateNode:null}var Fu={};function qu(a,c,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(a,c,f,y){return new qu(a,c,f,y)}function Qp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ni(a,c){var f=a.alternate;return f===null?(f=ti(a.tag,c,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=c,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,c=a.dependencies,f.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function uy(a,c){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=c,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,c=f.dependencies,a.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),a}function Bu(a,c,f,y,E,O){var B=0;if(y=a,typeof a=="function")Qp(a)&&(B=1);else if(typeof a=="string")B=BA(a,f,Ve.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case de:return a=ti(31,f,c,E),a.elementType=de,a.lanes=O,a;case I:return gl(f.children,E,O,c);case q:B=8,E|=24;break;case G:return a=ti(12,f,c,E|2),a.elementType=G,a.lanes=O,a;case ee:return a=ti(13,f,c,E),a.elementType=ee,a.lanes=O,a;case oe:return a=ti(19,f,c,E),a.elementType=oe,a.lanes=O,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case X:B=10;break e;case K:B=9;break e;case L:B=11;break e;case Q:B=14;break e;case ne:B=16,y=null;break e}B=29,f=Error(o(130,a===null?"null":typeof a,"")),y=null}return c=ti(B,f,c,E),c.elementType=a,c.type=y,c.lanes=O,c}function gl(a,c,f,y){return a=ti(7,a,y,c),a.lanes=f,a}function Uu(a,c,f){return a=ti(6,a,null,c),a.lanes=f,a}function n0(a){var c=ti(18,null,null,0);return c.stateNode=a,c}function dy(a,c,f){return c=ti(4,a.children!==null?a.children:[],a.key,c),c.lanes=f,c.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},c}var ef=new WeakMap;function ri(a,c){if(typeof a=="object"&&a!==null){var f=ef.get(a);return f!==void 0?f:(c={value:a,source:c,stack:Dn(c)},ef.set(a,c),c)}return{value:a,source:c,stack:Dn(c)}}var os=[],yl=0,Ia=null,Ku=0,si=[],Ei=0,vo=null,Kn=1,La="";function ii(a,c){os[yl++]=Ku,os[yl++]=Ia,Ia=a,Ku=c}function r0(a,c,f){si[Ei++]=Kn,si[Ei++]=La,si[Ei++]=vo,vo=a;var y=Kn;a=La;var E=32-Xr(y)-1;y&=~(1<<E),f+=1;var O=32-Xr(c)+E;if(30<O){var B=E-E%5;O=(y&(1<<B)-1).toString(32),y>>=B,E-=B,Kn=1<<32-Xr(c)+E|f<<E|y,La=O+a}else Kn=1<<O|f<<E|y,La=a}function wc(a){a.return!==null&&(ii(a,1),r0(a,1,0))}function xo(a){for(;a===Ia;)Ia=os[--yl],os[yl]=null,Ku=os[--yl],os[yl]=null;for(;a===vo;)vo=si[--Ei],si[Ei]=null,La=si[--Ei],si[Ei]=null,Kn=si[--Ei],si[Ei]=null}function bo(a,c){si[Ei++]=Kn,si[Ei++]=La,si[Ei++]=vo,Kn=c.id,La=c.overflow,vo=a}var Fr=null,hr=null,vn=!1,vl=null,ai=!1,hy=Error(o(519));function xl(a){var c=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ch(ri(c,a)),hy}function tf(a){var c=a.stateNode,f=a.type,y=a.memoizedProps;switch(c[ss]=a,c[Ps]=y,f){case"dialog":En("cancel",c),En("close",c);break;case"iframe":case"object":case"embed":En("load",c);break;case"video":case"audio":for(f=0;f<md.length;f++)En(md[f],c);break;case"source":En("error",c);break;case"img":case"image":case"link":En("error",c),En("load",c);break;case"details":En("toggle",c);break;case"input":En("invalid",c),qg(c,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":En("invalid",c);break;case"textarea":En("invalid",c),bw(c,y.value,y.defaultValue,y.children)}f=y.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||c.textContent===""+f||y.suppressHydrationWarning===!0||zh(c.textContent,f)?(y.popover!=null&&(En("beforetoggle",c),En("toggle",c)),y.onScroll!=null&&En("scroll",c),y.onScrollEnd!=null&&En("scrollend",c),y.onClick!=null&&(c.onclick=xa),c=!0):c=!1,c||xl(a,!0)}function nf(a){for(Fr=a.return;Fr;)switch(Fr.tag){case 5:case 31:case 13:ai=!1;return;case 27:case 3:ai=!0;return;default:Fr=Fr.return}}function Vu(a){if(a!==Fr)return!1;if(!vn)return nf(a),vn=!0,!1;var c=a.tag,f;if((f=c!==3&&c!==27)&&((f=c===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||zv(a.type,a.memoizedProps)),f=!f),f&&hr&&xl(a),nf(a),c===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));hr=Vv(a)}else if(c===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));hr=Vv(a)}else c===27?(c=hr,Il(a.type)?(a=Kv,Kv=null,hr=a):hr=c):hr=Fr?hi(a.stateNode.nextSibling):null;return!0}function za(){hr=Fr=null,vn=!1}function py(){var a=vl;return a!==null&&(di===null?di=a:di.push.apply(di,a),vl=null),a}function ch(a){vl===null?vl=[a]:vl.push(a)}var Sc=He(null),Ec=null,Fa=null;function wo(a,c,f){ke(Sc,c._currentValue),c._currentValue=f}function oi(a){a._currentValue=Sc.current,Oe(Sc)}function fy(a,c,f){for(;a!==null;){var y=a.alternate;if((a.childLanes&c)!==c?(a.childLanes|=c,y!==null&&(y.childLanes|=c)):y!==null&&(y.childLanes&c)!==c&&(y.childLanes|=c),a===f)break;a=a.return}}function qn(a,c,f,y){var E=a.child;for(E!==null&&(E.return=a);E!==null;){var O=E.dependencies;if(O!==null){var B=E.child;O=O.firstContext;e:for(;O!==null;){var te=O;O=E;for(var ye=0;ye<c.length;ye++)if(te.context===c[ye]){O.lanes|=f,te=O.alternate,te!==null&&(te.lanes|=f),fy(O.return,f,a),y||(B=null);break e}O=te.next}}else if(E.tag===18){if(B=E.return,B===null)throw Error(o(341));B.lanes|=f,O=B.alternate,O!==null&&(O.lanes|=f),fy(B,f,a),B=null}else B=E.child;if(B!==null)B.return=E;else for(B=E;B!==null;){if(B===a){B=null;break}if(E=B.sibling,E!==null){E.return=B.return,B=E;break}B=B.return}E=B}}function jc(a,c,f,y){a=null;for(var E=c,O=!1;E!==null;){if(!O){if((E.flags&524288)!==0)O=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var B=E.alternate;if(B===null)throw Error(o(387));if(B=B.memoizedProps,B!==null){var te=E.type;ei(E.pendingProps.value,B.value)||(a!==null?a.push(te):a=[te])}}else if(E===Le.current){if(B=E.alternate,B===null)throw Error(o(387));B.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(a!==null?a.push(bd):a=[bd])}E=E.return}a!==null&&qn(c,a,f,y),c.flags|=262144}function Cc(a){for(a=a.firstContext;a!==null;){if(!ei(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function bl(a){Ec=a,Fa=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Wr(a){return my(Ec,a)}function Hu(a,c){return Ec===null&&bl(a),my(a,c)}function my(a,c){var f=c._currentValue;if(c={context:c,memoizedValue:f,next:null},Fa===null){if(a===null)throw Error(o(308));Fa=c,a.dependencies={lanes:0,firstContext:c},a.flags|=524288}else Fa=Fa.next=c;return f}var uh=typeof AbortController<"u"?AbortController:function(){var a=[],c=this.signal={aborted:!1,addEventListener:function(f,y){a.push(y)}};this.abort=function(){c.aborted=!0,a.forEach(function(f){return f()})}},s0=e.unstable_scheduleCallback,Ac=e.unstable_NormalPriority,Dr={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rf(){return{controller:new uh,data:new Map,refCount:0}}function Gu(a){a.refCount--,a.refCount===0&&s0(Ac,function(){a.controller.abort()})}var wl=null,Xu=0,Sl=0,qa=null;function ji(a,c){if(wl===null){var f=wl=[];Xu=0,Sl=Nv(),qa={status:"pending",value:void 0,then:function(y){f.push(y)}}}return Xu++,c.then(Zi,Zi),c}function Zi(){if(--Xu===0&&wl!==null){qa!==null&&(qa.status="fulfilled");var a=wl;wl=null,Sl=0,qa=null;for(var c=0;c<a.length;c++)(0,a[c])()}}function sf(a,c){var f=[],y={status:"pending",value:null,reason:null,then:function(E){f.push(E)}};return a.then(function(){y.status="fulfilled",y.value=c;for(var E=0;E<f.length;E++)(0,f[E])(c)},function(E){for(y.status="rejected",y.reason=E,E=0;E<f.length;E++)(0,f[E])(void 0)}),y}var i0=ce.S;ce.S=function(a,c){nS=z(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&ji(a,c),i0!==null&&i0(a,c)};var El=He(null);function af(){var a=El.current;return a!==null?a:lr.pooledCache}function dh(a,c){c===null?ke(El,El.current):ke(El,c.pool)}function of(){var a=af();return a===null?null:{parent:Dr._currentValue,pool:a}}var Oc=Error(o(460)),lf=Error(o(474)),Yu=Error(o(542)),cf={then:function(){}};function Wi(a){return a=a.status,a==="fulfilled"||a==="rejected"}function gy(a,c,f){switch(f=a[f],f===void 0?a.push(c):f!==c&&(c.then(xa,xa),c=f),c.status){case"fulfilled":return c.value;case"rejected":throw a=c.reason,a0(a),a;default:if(typeof c.status=="string")c.then(xa,xa);else{if(a=lr,a!==null&&100<a.shellSuspendCounter)throw Error(o(482));a=c,a.status="pending",a.then(function(y){if(c.status==="pending"){var E=c;E.status="fulfilled",E.value=y}},function(y){if(c.status==="pending"){var E=c;E.status="rejected",E.reason=y}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw a=c.reason,a0(a),a}throw Rc=c,Oc}}function kc(a){try{var c=a._init;return c(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Rc=f,Oc):f}}var Rc=null;function uf(){if(Rc===null)throw Error(o(459));var a=Rc;return Rc=null,a}function a0(a){if(a===Oc||a===Yu)throw Error(o(483))}var Zu=null,Tc=0;function Wu(a){var c=Tc;return Tc+=1,Zu===null&&(Zu=[]),gy(Zu,a,c)}function ks(a,c){c=c.props.ref,a.ref=c!==void 0?c:null}function Ju(a,c){throw c.$$typeof===k?Error(o(525)):(a=Object.prototype.toString.call(c),Error(o(31,a==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":a)))}function So(a){function c($e,Ee){if(a){var Pe=$e.deletions;Pe===null?($e.deletions=[Ee],$e.flags|=16):Pe.push(Ee)}}function f($e,Ee){if(!a)return null;for(;Ee!==null;)c($e,Ee),Ee=Ee.sibling;return null}function y($e){for(var Ee=new Map;$e!==null;)$e.key!==null?Ee.set($e.key,$e):Ee.set($e.index,$e),$e=$e.sibling;return Ee}function E($e,Ee){return $e=ni($e,Ee),$e.index=0,$e.sibling=null,$e}function O($e,Ee,Pe){return $e.index=Pe,a?(Pe=$e.alternate,Pe!==null?(Pe=Pe.index,Pe<Ee?($e.flags|=67108866,Ee):Pe):($e.flags|=67108866,Ee)):($e.flags|=1048576,Ee)}function B($e){return a&&$e.alternate===null&&($e.flags|=67108866),$e}function te($e,Ee,Pe,nt){return Ee===null||Ee.tag!==6?(Ee=Uu(Pe,$e.mode,nt),Ee.return=$e,Ee):(Ee=E(Ee,Pe),Ee.return=$e,Ee)}function ye($e,Ee,Pe,nt){var Ut=Pe.type;return Ut===I?We($e,Ee,Pe.props.children,nt,Pe.key):Ee!==null&&(Ee.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===ne&&kc(Ut)===Ee.type)?(Ee=E(Ee,Pe.props),ks(Ee,Pe),Ee.return=$e,Ee):(Ee=Bu(Pe.type,Pe.key,Pe.props,null,$e.mode,nt),ks(Ee,Pe),Ee.return=$e,Ee)}function Be($e,Ee,Pe,nt){return Ee===null||Ee.tag!==4||Ee.stateNode.containerInfo!==Pe.containerInfo||Ee.stateNode.implementation!==Pe.implementation?(Ee=dy(Pe,$e.mode,nt),Ee.return=$e,Ee):(Ee=E(Ee,Pe.children||[]),Ee.return=$e,Ee)}function We($e,Ee,Pe,nt,Ut){return Ee===null||Ee.tag!==7?(Ee=gl(Pe,$e.mode,nt,Ut),Ee.return=$e,Ee):(Ee=E(Ee,Pe),Ee.return=$e,Ee)}function rt($e,Ee,Pe){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return Ee=Uu(""+Ee,$e.mode,Pe),Ee.return=$e,Ee;if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case T:return Pe=Bu(Ee.type,Ee.key,Ee.props,null,$e.mode,Pe),ks(Pe,Ee),Pe.return=$e,Pe;case M:return Ee=dy(Ee,$e.mode,Pe),Ee.return=$e,Ee;case ne:return Ee=kc(Ee),rt($e,Ee,Pe)}if(Ke(Ee)||le(Ee))return Ee=gl(Ee,$e.mode,Pe,null),Ee.return=$e,Ee;if(typeof Ee.then=="function")return rt($e,Wu(Ee),Pe);if(Ee.$$typeof===X)return rt($e,Hu($e,Ee),Pe);Ju($e,Ee)}return null}function Ue($e,Ee,Pe,nt){var Ut=Ee!==null?Ee.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return Ut!==null?null:te($e,Ee,""+Pe,nt);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case T:return Pe.key===Ut?ye($e,Ee,Pe,nt):null;case M:return Pe.key===Ut?Be($e,Ee,Pe,nt):null;case ne:return Pe=kc(Pe),Ue($e,Ee,Pe,nt)}if(Ke(Pe)||le(Pe))return Ut!==null?null:We($e,Ee,Pe,nt,null);if(typeof Pe.then=="function")return Ue($e,Ee,Wu(Pe),nt);if(Pe.$$typeof===X)return Ue($e,Ee,Hu($e,Pe),nt);Ju($e,Pe)}return null}function Xe($e,Ee,Pe,nt,Ut){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return $e=$e.get(Pe)||null,te(Ee,$e,""+nt,Ut);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case T:return $e=$e.get(nt.key===null?Pe:nt.key)||null,ye(Ee,$e,nt,Ut);case M:return $e=$e.get(nt.key===null?Pe:nt.key)||null,Be(Ee,$e,nt,Ut);case ne:return nt=kc(nt),Xe($e,Ee,Pe,nt,Ut)}if(Ke(nt)||le(nt))return $e=$e.get(Pe)||null,We(Ee,$e,nt,Ut,null);if(typeof nt.then=="function")return Xe($e,Ee,Pe,Wu(nt),Ut);if(nt.$$typeof===X)return Xe($e,Ee,Pe,Hu(Ee,nt),Ut);Ju(Ee,nt)}return null}function Dt($e,Ee,Pe,nt){for(var Ut=null,pn=null,Pt=Ee,rn=Ee=0,wn=null;Pt!==null&&rn<Pe.length;rn++){Pt.index>rn?(wn=Pt,Pt=null):wn=Pt.sibling;var On=Ue($e,Pt,Pe[rn],nt);if(On===null){Pt===null&&(Pt=wn);break}a&&Pt&&On.alternate===null&&c($e,Pt),Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On,Pt=wn}if(rn===Pe.length)return f($e,Pt),vn&&ii($e,rn),Ut;if(Pt===null){for(;rn<Pe.length;rn++)Pt=rt($e,Pe[rn],nt),Pt!==null&&(Ee=O(Pt,Ee,rn),pn===null?Ut=Pt:pn.sibling=Pt,pn=Pt);return vn&&ii($e,rn),Ut}for(Pt=y(Pt);rn<Pe.length;rn++)wn=Xe(Pt,$e,rn,Pe[rn],nt),wn!==null&&(a&&wn.alternate!==null&&Pt.delete(wn.key===null?rn:wn.key),Ee=O(wn,Ee,rn),pn===null?Ut=wn:pn.sibling=wn,pn=wn);return a&&Pt.forEach(function(Bl){return c($e,Bl)}),vn&&ii($e,rn),Ut}function Xt($e,Ee,Pe,nt){if(Pe==null)throw Error(o(151));for(var Ut=null,pn=null,Pt=Ee,rn=Ee=0,wn=null,On=Pe.next();Pt!==null&&!On.done;rn++,On=Pe.next()){Pt.index>rn?(wn=Pt,Pt=null):wn=Pt.sibling;var Bl=Ue($e,Pt,On.value,nt);if(Bl===null){Pt===null&&(Pt=wn);break}a&&Pt&&Bl.alternate===null&&c($e,Pt),Ee=O(Bl,Ee,rn),pn===null?Ut=Bl:pn.sibling=Bl,pn=Bl,Pt=wn}if(On.done)return f($e,Pt),vn&&ii($e,rn),Ut;if(Pt===null){for(;!On.done;rn++,On=Pe.next())On=rt($e,On.value,nt),On!==null&&(Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On);return vn&&ii($e,rn),Ut}for(Pt=y(Pt);!On.done;rn++,On=Pe.next())On=Xe(Pt,$e,rn,On.value,nt),On!==null&&(a&&On.alternate!==null&&Pt.delete(On.key===null?rn:On.key),Ee=O(On,Ee,rn),pn===null?Ut=On:pn.sibling=On,pn=On);return a&&Pt.forEach(function(HS){return c($e,HS)}),vn&&ii($e,rn),Ut}function Qn($e,Ee,Pe,nt){if(typeof Pe=="object"&&Pe!==null&&Pe.type===I&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case T:e:{for(var Ut=Pe.key;Ee!==null;){if(Ee.key===Ut){if(Ut=Pe.type,Ut===I){if(Ee.tag===7){f($e,Ee.sibling),nt=E(Ee,Pe.props.children),nt.return=$e,$e=nt;break e}}else if(Ee.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===ne&&kc(Ut)===Ee.type){f($e,Ee.sibling),nt=E(Ee,Pe.props),ks(nt,Pe),nt.return=$e,$e=nt;break e}f($e,Ee);break}else c($e,Ee);Ee=Ee.sibling}Pe.type===I?(nt=gl(Pe.props.children,$e.mode,nt,Pe.key),nt.return=$e,$e=nt):(nt=Bu(Pe.type,Pe.key,Pe.props,null,$e.mode,nt),ks(nt,Pe),nt.return=$e,$e=nt)}return B($e);case M:e:{for(Ut=Pe.key;Ee!==null;){if(Ee.key===Ut)if(Ee.tag===4&&Ee.stateNode.containerInfo===Pe.containerInfo&&Ee.stateNode.implementation===Pe.implementation){f($e,Ee.sibling),nt=E(Ee,Pe.children||[]),nt.return=$e,$e=nt;break e}else{f($e,Ee);break}else c($e,Ee);Ee=Ee.sibling}nt=dy(Pe,$e.mode,nt),nt.return=$e,$e=nt}return B($e);case ne:return Pe=kc(Pe),Qn($e,Ee,Pe,nt)}if(Ke(Pe))return Dt($e,Ee,Pe,nt);if(le(Pe)){if(Ut=le(Pe),typeof Ut!="function")throw Error(o(150));return Pe=Ut.call(Pe),Xt($e,Ee,Pe,nt)}if(typeof Pe.then=="function")return Qn($e,Ee,Wu(Pe),nt);if(Pe.$$typeof===X)return Qn($e,Ee,Hu($e,Pe),nt);Ju($e,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint"?(Pe=""+Pe,Ee!==null&&Ee.tag===6?(f($e,Ee.sibling),nt=E(Ee,Pe),nt.return=$e,$e=nt):(f($e,Ee),nt=Uu(Pe,$e.mode,nt),nt.return=$e,$e=nt),B($e)):f($e,Ee)}return function($e,Ee,Pe,nt){try{Tc=0;var Ut=Qn($e,Ee,Pe,nt);return Zu=null,Ut}catch(Pt){if(Pt===Oc||Pt===Yu)throw Pt;var pn=ti(29,Pt,null,$e.mode);return pn.lanes=nt,pn.return=$e,pn}finally{}}}var _c=So(!0),hh=So(!1),li=!1;function df(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hf(a,c){a=a.updateQueue,c.updateQueue===a&&(c.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Eo(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function jl(a,c,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Hn&2)!==0){var E=y.pending;return E===null?c.next=c:(c.next=E.next,E.next=c),y.pending=c,c=Jp(a),t0(a,null,f),c}return Wp(a,y,c,f),Jp(a)}function Ji(a,c,f){if(c=c.updateQueue,c!==null&&(c=c.shared,(f&4194048)!==0)){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,gs(a,f)}}function Qu(a,c){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var E=null,O=null;if(f=f.firstBaseUpdate,f!==null){do{var B={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};O===null?E=O=B:O=O.next=B,f=f.next}while(f!==null);O===null?E=O=c:O=O.next=c}else E=O=c;f={baseState:y.baseState,firstBaseUpdate:E,lastBaseUpdate:O,shared:y.shared,callbacks:y.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=c}var $c=!1;function ph(){if($c){var a=qa;if(a!==null)throw a}}function fh(a,c,f,y){$c=!1;var E=a.updateQueue;li=!1;var O=E.firstBaseUpdate,B=E.lastBaseUpdate,te=E.shared.pending;if(te!==null){E.shared.pending=null;var ye=te,Be=ye.next;ye.next=null,B===null?O=Be:B.next=Be,B=ye;var We=a.alternate;We!==null&&(We=We.updateQueue,te=We.lastBaseUpdate,te!==B&&(te===null?We.firstBaseUpdate=Be:te.next=Be,We.lastBaseUpdate=ye))}if(O!==null){var rt=E.baseState;B=0,We=Be=ye=null,te=O;do{var Ue=te.lane&-536870913,Xe=Ue!==te.lane;if(Xe?(An&Ue)===Ue:(y&Ue)===Ue){Ue!==0&&Ue===Sl&&($c=!0),We!==null&&(We=We.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var Dt=a,Xt=te;Ue=c;var Qn=f;switch(Xt.tag){case 1:if(Dt=Xt.payload,typeof Dt=="function"){rt=Dt.call(Qn,rt,Ue);break e}rt=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=Xt.payload,Ue=typeof Dt=="function"?Dt.call(Qn,rt,Ue):Dt,Ue==null)break e;rt=A({},rt,Ue);break e;case 2:li=!0}}Ue=te.callback,Ue!==null&&(a.flags|=64,Xe&&(a.flags|=8192),Xe=E.callbacks,Xe===null?E.callbacks=[Ue]:Xe.push(Ue))}else Xe={lane:Ue,tag:te.tag,payload:te.payload,callback:te.callback,next:null},We===null?(Be=We=Xe,ye=rt):We=We.next=Xe,B|=Ue;if(te=te.next,te===null){if(te=E.shared.pending,te===null)break;Xe=te,te=Xe.next,Xe.next=null,E.lastBaseUpdate=Xe,E.shared.pending=null}}while(!0);We===null&&(ye=rt),E.baseState=ye,E.firstBaseUpdate=Be,E.lastBaseUpdate=We,O===null&&(E.shared.lanes=0),Ga|=B,a.lanes=B,a.memoizedState=rt}}function pf(a,c){if(typeof a!="function")throw Error(o(191,a));a.call(c)}function o0(a,c){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)pf(f[a],c)}var ed=He(null),td=He(0);function l0(a,c){a=$o,ke(td,a),ke(ed,c),$o=a|c.baseLanes}function yy(){ke(td,$o),ke(ed,ed.current)}function nd(){$o=td.current,Oe(ed),Oe(td)}var Ci=He(null),Qi=null;function ea(a){var c=a.alternate;ke(jr,jr.current&1),ke(Ci,a),Qi===null&&(c===null||ed.current!==null||c.memoizedState!==null)&&(Qi=a)}function vy(a){ke(jr,jr.current),ke(Ci,a),Qi===null&&(Qi=a)}function Ea(a){a.tag===22?(ke(jr,jr.current),ke(Ci,a),Qi===null&&(Qi=a)):Ba()}function Ba(){ke(jr,jr.current),ke(Ci,Ci.current)}function Is(a){Oe(Ci),Qi===a&&(Qi=null),Oe(jr)}var jr=He(0);function ff(a){for(var c=a;c!==null;){if(c.tag===13){var f=c.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||em(f)||tm(f)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Ua=0,en=null,Vn=null,Pr=null,mh=!1,Nc=!1,jo=!1,gh=0,rd=0,Dc=null,c0=0;function Cr(){throw Error(o(321))}function xy(a,c){if(c===null)return!1;for(var f=0;f<c.length&&f<a.length;f++)if(!ei(a[f],c[f]))return!1;return!0}function by(a,c,f,y,E,O){return Ua=O,en=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,ce.H=a===null||a.memoizedState===null?O0:bf,jo=!1,O=f(y,E),jo=!1,Nc&&(O=Sy(c,f,y,E)),wy(a),O}function wy(a){ce.H=Sh;var c=Vn!==null&&Vn.next!==null;if(Ua=0,Pr=Vn=en=null,mh=!1,rd=0,Dc=null,c)throw Error(o(300));a===null||qr||(a=a.dependencies,a!==null&&Cc(a)&&(qr=!0))}function Sy(a,c,f,y){en=a;var E=0;do{if(Nc&&(Dc=null),rd=0,Nc=!1,25<=E)throw Error(o(301));if(E+=1,Pr=Vn=null,a.updateQueue!=null){var O=a.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}ce.H=k0,O=c(f,y)}while(Nc);return O}function fA(){var a=ce.H,c=a.useState()[0];return c=typeof c.then=="function"?yh(c):c,a=a.useState()[0],(Vn!==null?Vn.memoizedState:null)!==a&&(en.flags|=1024),c}function Ey(){var a=gh!==0;return gh=0,a}function jy(a,c,f){c.updateQueue=a.updateQueue,c.flags&=-2053,a.lanes&=~f}function Cy(a){if(mh){for(a=a.memoizedState;a!==null;){var c=a.queue;c!==null&&(c.pending=null),a=a.next}mh=!1}Ua=0,Pr=Vn=en=null,Nc=!1,rd=gh=0,Dc=null}function Rs(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pr===null?en.memoizedState=Pr=a:Pr=Pr.next=a,Pr}function Mr(){if(Vn===null){var a=en.alternate;a=a!==null?a.memoizedState:null}else a=Vn.next;var c=Pr===null?en.memoizedState:Pr.next;if(c!==null)Pr=c,Vn=a;else{if(a===null)throw en.alternate===null?Error(o(467)):Error(o(310));Vn=a,a={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},Pr===null?en.memoizedState=Pr=a:Pr=Pr.next=a}return Pr}function sd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yh(a){var c=rd;return rd+=1,Dc===null&&(Dc=[]),a=gy(Dc,a,c),c=en,(Pr===null?c.memoizedState:Pr.next)===null&&(c=c.alternate,ce.H=c===null||c.memoizedState===null?O0:bf),a}function mf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return yh(a);if(a.$$typeof===X)return Wr(a)}throw Error(o(438,String(a)))}function Ay(a){var c=null,f=en.updateQueue;if(f!==null&&(c=f.memoCache),c==null){var y=en.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(c={data:y.data.map(function(E){return E.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),f===null&&(f=sd(),en.updateQueue=f),f.memoCache=c,f=c.data[c.index],f===void 0)for(f=c.data[c.index]=Array(a),y=0;y<a;y++)f[y]=je;return c.index++,f}function ta(a,c){return typeof c=="function"?c(a):c}function gf(a){var c=Mr();return Oy(c,Vn,a)}function Oy(a,c,f){var y=a.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=f;var E=a.baseQueue,O=y.pending;if(O!==null){if(E!==null){var B=E.next;E.next=O.next,O.next=B}c.baseQueue=E=O,y.pending=null}if(O=a.baseState,E===null)a.memoizedState=O;else{c=E.next;var te=B=null,ye=null,Be=c,We=!1;do{var rt=Be.lane&-536870913;if(rt!==Be.lane?(An&rt)===rt:(Ua&rt)===rt){var Ue=Be.revertLane;if(Ue===0)ye!==null&&(ye=ye.next={lane:0,revertLane:0,gesture:null,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null}),rt===Sl&&(We=!0);else if((Ua&Ue)===Ue){Be=Be.next,Ue===Sl&&(We=!0);continue}else rt={lane:0,revertLane:Be.revertLane,gesture:null,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null},ye===null?(te=ye=rt,B=O):ye=ye.next=rt,en.lanes|=Ue,Ga|=Ue;rt=Be.action,jo&&f(O,rt),O=Be.hasEagerState?Be.eagerState:f(O,rt)}else Ue={lane:rt,revertLane:Be.revertLane,gesture:Be.gesture,action:Be.action,hasEagerState:Be.hasEagerState,eagerState:Be.eagerState,next:null},ye===null?(te=ye=Ue,B=O):ye=ye.next=Ue,en.lanes|=rt,Ga|=rt;Be=Be.next}while(Be!==null&&Be!==c);if(ye===null?B=O:ye.next=te,!ei(O,a.memoizedState)&&(qr=!0,We&&(f=qa,f!==null)))throw f;a.memoizedState=O,a.baseState=B,a.baseQueue=ye,y.lastRenderedState=O}return E===null&&(y.lanes=0),[a.memoizedState,y.dispatch]}function vh(a){var c=Mr(),f=c.queue;if(f===null)throw Error(o(311));f.lastRenderedReducer=a;var y=f.dispatch,E=f.pending,O=c.memoizedState;if(E!==null){f.pending=null;var B=E=E.next;do O=a(O,B.action),B=B.next;while(B!==E);ei(O,c.memoizedState)||(qr=!0),c.memoizedState=O,c.baseQueue===null&&(c.baseState=O),f.lastRenderedState=O}return[O,y]}function ky(a,c,f){var y=en,E=Mr(),O=vn;if(O){if(f===void 0)throw Error(o(407));f=f()}else f=c();var B=!ei((Vn||E).memoizedState,f);if(B&&(E.memoizedState=f,qr=!0),E=E.queue,Fy(u0.bind(null,y,E,a),[a]),E.getSnapshot!==c||B||Pr!==null&&Pr.memoizedState.tag&1){if(y.flags|=2048,id(9,{destroy:void 0},Ty.bind(null,y,E,f,c),null),lr===null)throw Error(o(349));O||(Ua&127)!==0||Ry(y,c,f)}return f}function Ry(a,c,f){a.flags|=16384,a={getSnapshot:c,value:f},c=en.updateQueue,c===null?(c=sd(),en.updateQueue=c,c.stores=[a]):(f=c.stores,f===null?c.stores=[a]:f.push(a))}function Ty(a,c,f,y){c.value=f,c.getSnapshot=y,_y(c)&&$y(a)}function u0(a,c,f){return f(function(){_y(c)&&$y(a)})}function _y(a){var c=a.getSnapshot;a=a.value;try{var f=c();return!ei(a,f)}catch{return!0}}function $y(a){var c=bc(a,2);c!==null&&_s(c,a,2)}function Ny(a){var c=Rs();if(typeof a=="function"){var f=a;if(a=f(),jo){wi(!0);try{f()}finally{wi(!1)}}}return c.memoizedState=c.baseState=a,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},c}function d0(a,c,f,y){return a.baseState=f,Oy(a,Vn,typeof y=="function"?y:ta)}function h0(a,c,f,y,E){if(xf(a))throw Error(o(485));if(a=c.action,a!==null){var O={payload:E,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){O.listeners.push(B)}};ce.T!==null?f(!0):O.isTransition=!1,y(O),f=c.pending,f===null?(O.next=c.pending=O,Dy(c,O)):(O.next=f.next,c.pending=f.next=O)}}function Dy(a,c){var f=c.action,y=c.payload,E=a.state;if(c.isTransition){var O=ce.T,B={};ce.T=B;try{var te=f(E,y),ye=ce.S;ye!==null&&ye(B,te),Py(a,c,te)}catch(Be){Iy(a,c,Be)}finally{O!==null&&B.types!==null&&(O.types=B.types),ce.T=O}}else try{O=f(E,y),Py(a,c,O)}catch(Be){Iy(a,c,Be)}}function Py(a,c,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(y){My(a,c,y)},function(y){return Iy(a,c,y)}):My(a,c,f)}function My(a,c,f){c.status="fulfilled",c.value=f,p0(c),a.state=f,c=a.pending,c!==null&&(f=c.next,f===c?a.pending=null:(f=f.next,c.next=f,Dy(a,f)))}function Iy(a,c,f){var y=a.pending;if(a.pending=null,y!==null){y=y.next;do c.status="rejected",c.reason=f,p0(c),c=c.next;while(c!==y)}a.action=null}function p0(a){a=a.listeners;for(var c=0;c<a.length;c++)(0,a[c])()}function Ly(a,c){return c}function f0(a,c){if(vn){var f=lr.formState;if(f!==null){e:{var y=en;if(vn){if(hr){t:{for(var E=hr,O=ai;E.nodeType!==8;){if(!O){E=null;break t}if(E=hi(E.nextSibling),E===null){E=null;break t}}O=E.data,E=O==="F!"||O==="F"?E:null}if(E){hr=hi(E.nextSibling),y=E.data==="F!";break e}}xl(y)}y=!1}y&&(c=f[0])}}return f=Rs(),f.memoizedState=f.baseState=c,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ly,lastRenderedState:c},f.queue=y,f=j0.bind(null,en,y),y.dispatch=f,y=Ny(!1),O=Yy.bind(null,en,!1,y.queue),y=Rs(),E={state:c,dispatch:null,action:a,pending:null},y.queue=E,f=h0.bind(null,en,E,O,f),E.dispatch=f,y.memoizedState=a,[c,f,!1]}function m0(a){var c=Mr();return Ka(c,Vn,a)}function Ka(a,c,f){if(c=Oy(a,c,Ly)[0],a=gf(ta)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var y=yh(c)}catch(B){throw B===Oc?Yu:B}else y=c;c=Mr();var E=c.queue,O=E.dispatch;return f!==c.memoizedState&&(en.flags|=2048,id(9,{destroy:void 0},mA.bind(null,E,f),null)),[y,O,a]}function mA(a,c){a.action=c}function g0(a){var c=Mr(),f=Vn;if(f!==null)return Ka(c,f,a);Mr(),c=c.memoizedState,f=Mr();var y=f.queue.dispatch;return f.memoizedState=a,[c,y,!1]}function id(a,c,f,y){return a={tag:a,create:f,deps:y,inst:c,next:null},c=en.updateQueue,c===null&&(c=sd(),en.updateQueue=c),f=c.lastEffect,f===null?c.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,c.lastEffect=a),a}function y0(){return Mr().memoizedState}function xh(a,c,f,y){var E=Rs();en.flags|=a,E.memoizedState=id(1|c,{destroy:void 0},f,y===void 0?null:y)}function yf(a,c,f,y){var E=Mr();y=y===void 0?null:y;var O=E.memoizedState.inst;Vn!==null&&y!==null&&xy(y,Vn.memoizedState.deps)?E.memoizedState=id(c,O,f,y):(en.flags|=a,E.memoizedState=id(1|c,O,f,y))}function zy(a,c){xh(8390656,8,a,c)}function Fy(a,c){yf(2048,8,a,c)}function gA(a){en.flags|=4;var c=en.updateQueue;if(c===null)c=sd(),en.updateQueue=c,c.events=[a];else{var f=c.events;f===null?c.events=[a]:f.push(a)}}function v0(a){var c=Mr().memoizedState;return gA({ref:c,nextImpl:a}),function(){if((Hn&2)!==0)throw Error(o(440));return c.impl.apply(void 0,arguments)}}function Pc(a,c){return yf(4,2,a,c)}function vf(a,c){return yf(4,4,a,c)}function x0(a,c){if(typeof c=="function"){a=a();var f=c(a);return function(){typeof f=="function"?f():c(null)}}if(c!=null)return a=a(),c.current=a,function(){c.current=null}}function Va(a,c,f){f=f!=null?f.concat([a]):null,yf(4,4,x0.bind(null,c,a),f)}function qy(){}function By(a,c){var f=Mr();c=c===void 0?null:c;var y=f.memoizedState;return c!==null&&xy(c,y[1])?y[0]:(f.memoizedState=[a,c],a)}function Uy(a,c){var f=Mr();c=c===void 0?null:c;var y=f.memoizedState;if(c!==null&&xy(c,y[1]))return y[0];if(y=a(),jo){wi(!0);try{a()}finally{wi(!1)}}return f.memoizedState=[y,c],y}function Ky(a,c,f){return f===void 0||(Ua&1073741824)!==0&&(An&261930)===0?a.memoizedState=c:(a.memoizedState=f,a=Sv(),en.lanes|=a,Ga|=a,f)}function b0(a,c,f,y){return ei(f,c)?f:ed.current!==null?(a=Ky(a,f,y),ei(a,c)||(qr=!0),a):(Ua&42)===0||(Ua&1073741824)!==0&&(An&261930)===0?(qr=!0,a.memoizedState=f):(a=Sv(),en.lanes|=a,Ga|=a,c)}function w0(a,c,f,y,E){var O=re.p;re.p=O!==0&&8>O?O:8;var B=ce.T,te={};ce.T=te,Yy(a,!1,c,f);try{var ye=E(),Be=ce.S;if(Be!==null&&Be(te,ye),ye!==null&&typeof ye=="object"&&typeof ye.then=="function"){var We=sf(ye,y);wh(a,c,We,ki(a))}else wh(a,c,y,ki(a))}catch(rt){wh(a,c,{then:function(){},status:"rejected",reason:rt},ki())}finally{re.p=O,B!==null&&te.types!==null&&(B.types=te.types),ce.T=B}}function yA(){}function Vy(a,c,f,y){if(a.tag!==5)throw Error(o(476));var E=Hy(a).queue;w0(a,E,c,ue,f===null?yA:function(){return Gy(a),f(y)})}function Hy(a){var c=a.memoizedState;if(c!==null)return c;c={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:ue},next:null};var f={};return c.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:f},next:null},a.memoizedState=c,a=a.alternate,a!==null&&(a.memoizedState=c),c}function Gy(a){var c=Hy(a);c.next===null&&(c=a.alternate.memoizedState),wh(a,c.next.queue,{},ki())}function bh(){return Wr(bd)}function S0(){return Mr().memoizedState}function Xy(){return Mr().memoizedState}function vA(a){for(var c=a.return;c!==null;){switch(c.tag){case 24:case 3:var f=ki();a=Eo(f);var y=jl(c,a,f);y!==null&&(_s(y,c,f),Ji(y,c,f)),c={cache:rf()},a.payload=c;return}c=c.return}}function E0(a,c,f){var y=ki();f={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},xf(a)?C0(c,f):(f=cy(a,c,f,y),f!==null&&(_s(f,a,y),A0(f,c,y)))}function j0(a,c,f){var y=ki();wh(a,c,f,y)}function wh(a,c,f,y){var E={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(xf(a))C0(c,E);else{var O=a.alternate;if(a.lanes===0&&(O===null||O.lanes===0)&&(O=c.lastRenderedReducer,O!==null))try{var B=c.lastRenderedState,te=O(B,f);if(E.hasEagerState=!0,E.eagerState=te,ei(te,B))return Wp(a,c,E,0),lr===null&&Zp(),!1}catch{}finally{}if(f=cy(a,c,E,y),f!==null)return _s(f,a,y),A0(f,c,y),!0}return!1}function Yy(a,c,f,y){if(y={lane:2,revertLane:Nv(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},xf(a)){if(c)throw Error(o(479))}else c=cy(a,f,y,2),c!==null&&_s(c,a,2)}function xf(a){var c=a.alternate;return a===en||c!==null&&c===en}function C0(a,c){Nc=mh=!0;var f=a.pending;f===null?c.next=c:(c.next=f.next,f.next=c),a.pending=c}function A0(a,c,f){if((f&4194048)!==0){var y=c.lanes;y&=a.pendingLanes,f|=y,c.lanes=f,gs(a,f)}}var Sh={readContext:Wr,use:mf,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useLayoutEffect:Cr,useInsertionEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useSyncExternalStore:Cr,useId:Cr,useHostTransitionStatus:Cr,useFormState:Cr,useActionState:Cr,useOptimistic:Cr,useMemoCache:Cr,useCacheRefresh:Cr};Sh.useEffectEvent=Cr;var O0={readContext:Wr,use:mf,useCallback:function(a,c){return Rs().memoizedState=[a,c===void 0?null:c],a},useContext:Wr,useEffect:zy,useImperativeHandle:function(a,c,f){f=f!=null?f.concat([a]):null,xh(4194308,4,x0.bind(null,c,a),f)},useLayoutEffect:function(a,c){return xh(4194308,4,a,c)},useInsertionEffect:function(a,c){xh(4,2,a,c)},useMemo:function(a,c){var f=Rs();c=c===void 0?null:c;var y=a();if(jo){wi(!0);try{a()}finally{wi(!1)}}return f.memoizedState=[y,c],y},useReducer:function(a,c,f){var y=Rs();if(f!==void 0){var E=f(c);if(jo){wi(!0);try{f(c)}finally{wi(!1)}}}else E=c;return y.memoizedState=y.baseState=E,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:E},y.queue=a,a=a.dispatch=E0.bind(null,en,a),[y.memoizedState,a]},useRef:function(a){var c=Rs();return a={current:a},c.memoizedState=a},useState:function(a){a=Ny(a);var c=a.queue,f=j0.bind(null,en,c);return c.dispatch=f,[a.memoizedState,f]},useDebugValue:qy,useDeferredValue:function(a,c){var f=Rs();return Ky(f,a,c)},useTransition:function(){var a=Ny(!1);return a=w0.bind(null,en,a.queue,!0,!1),Rs().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,c,f){var y=en,E=Rs();if(vn){if(f===void 0)throw Error(o(407));f=f()}else{if(f=c(),lr===null)throw Error(o(349));(An&127)!==0||Ry(y,c,f)}E.memoizedState=f;var O={value:f,getSnapshot:c};return E.queue=O,zy(u0.bind(null,y,O,a),[a]),y.flags|=2048,id(9,{destroy:void 0},Ty.bind(null,y,O,f,c),null),f},useId:function(){var a=Rs(),c=lr.identifierPrefix;if(vn){var f=La,y=Kn;f=(y&~(1<<32-Xr(y)-1)).toString(32)+f,c="_"+c+"R_"+f,f=gh++,0<f&&(c+="H"+f.toString(32)),c+="_"}else f=c0++,c="_"+c+"r_"+f.toString(32)+"_";return a.memoizedState=c},useHostTransitionStatus:bh,useFormState:f0,useActionState:f0,useOptimistic:function(a){var c=Rs();c.memoizedState=c.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=f,c=Yy.bind(null,en,!0,f),f.dispatch=c,[a,c]},useMemoCache:Ay,useCacheRefresh:function(){return Rs().memoizedState=vA.bind(null,en)},useEffectEvent:function(a){var c=Rs(),f={impl:a};return c.memoizedState=f,function(){if((Hn&2)!==0)throw Error(o(440));return f.impl.apply(void 0,arguments)}}},bf={readContext:Wr,use:mf,useCallback:By,useContext:Wr,useEffect:Fy,useImperativeHandle:Va,useInsertionEffect:Pc,useLayoutEffect:vf,useMemo:Uy,useReducer:gf,useRef:y0,useState:function(){return gf(ta)},useDebugValue:qy,useDeferredValue:function(a,c){var f=Mr();return b0(f,Vn.memoizedState,a,c)},useTransition:function(){var a=gf(ta)[0],c=Mr().memoizedState;return[typeof a=="boolean"?a:yh(a),c]},useSyncExternalStore:ky,useId:S0,useHostTransitionStatus:bh,useFormState:m0,useActionState:m0,useOptimistic:function(a,c){var f=Mr();return d0(f,Vn,a,c)},useMemoCache:Ay,useCacheRefresh:Xy};bf.useEffectEvent=v0;var k0={readContext:Wr,use:mf,useCallback:By,useContext:Wr,useEffect:Fy,useImperativeHandle:Va,useInsertionEffect:Pc,useLayoutEffect:vf,useMemo:Uy,useReducer:vh,useRef:y0,useState:function(){return vh(ta)},useDebugValue:qy,useDeferredValue:function(a,c){var f=Mr();return Vn===null?Ky(f,a,c):b0(f,Vn.memoizedState,a,c)},useTransition:function(){var a=vh(ta)[0],c=Mr().memoizedState;return[typeof a=="boolean"?a:yh(a),c]},useSyncExternalStore:ky,useId:S0,useHostTransitionStatus:bh,useFormState:g0,useActionState:g0,useOptimistic:function(a,c){var f=Mr();return Vn!==null?d0(f,Vn,a,c):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Ay,useCacheRefresh:Xy};k0.useEffectEvent=v0;function Zy(a,c,f,y){c=a.memoizedState,f=f(y,c),f=f==null?c:A({},c,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var Wy={enqueueSetState:function(a,c,f){a=a._reactInternals;var y=ki(),E=Eo(y);E.payload=c,f!=null&&(E.callback=f),c=jl(a,E,y),c!==null&&(_s(c,a,y),Ji(c,a,y))},enqueueReplaceState:function(a,c,f){a=a._reactInternals;var y=ki(),E=Eo(y);E.tag=1,E.payload=c,f!=null&&(E.callback=f),c=jl(a,E,y),c!==null&&(_s(c,a,y),Ji(c,a,y))},enqueueForceUpdate:function(a,c){a=a._reactInternals;var f=ki(),y=Eo(f);y.tag=2,c!=null&&(y.callback=c),c=jl(a,y,f),c!==null&&(_s(c,a,f),Ji(c,a,f))}};function ad(a,c,f,y,E,O,B){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,O,B):c.prototype&&c.prototype.isPureReactComponent?!Iu(f,y)||!Iu(E,O):!0}function R0(a,c,f,y){a=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(f,y),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(f,y),c.state!==a&&Wy.enqueueReplaceState(c,c.state,null)}function Mc(a,c){var f=c;if("ref"in c){f={};for(var y in c)y!=="ref"&&(f[y]=c[y])}if(a=a.defaultProps){f===c&&(f=A({},f));for(var E in a)f[E]===void 0&&(f[E]=a[E])}return f}function T0(a){xc(a)}function _0(a){console.error(a)}function $0(a){xc(a)}function wf(a,c){try{var f=a.onUncaughtError;f(c.value,{componentStack:c.stack})}catch(y){setTimeout(function(){throw y})}}function N0(a,c,f){try{var y=a.onCaughtError;y(f.value,{componentStack:f.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Jy(a,c,f){return f=Eo(f),f.tag=3,f.payload={element:null},f.callback=function(){wf(a,c)},f}function Qy(a){return a=Eo(a),a.tag=3,a}function Cl(a,c,f,y){var E=f.type.getDerivedStateFromError;if(typeof E=="function"){var O=y.value;a.payload=function(){return E(O)},a.callback=function(){N0(c,f,y)}}var B=f.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(a.callback=function(){N0(c,f,y),typeof E!="function"&&(Nl===null?Nl=new Set([this]):Nl.add(this));var te=y.stack;this.componentDidCatch(y.value,{componentStack:te!==null?te:""})})}function D0(a,c,f,y,E){if(f.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(c=f.alternate,c!==null&&jc(c,f,E,!0),f=Ci.current,f!==null){switch(f.tag){case 31:case 13:return Qi===null?zf():f.alternate===null&&Ar===0&&(Ar=3),f.flags&=-257,f.flags|=65536,f.lanes=E,y===cf?f.flags|=16384:(c=f.updateQueue,c===null?f.updateQueue=new Set([y]):c.add(y),Ov(a,y,E)),!1;case 22:return f.flags|=65536,y===cf?f.flags|=16384:(c=f.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([y])},f.updateQueue=c):(f=c.retryQueue,f===null?c.retryQueue=new Set([y]):f.add(y)),Ov(a,y,E)),!1}throw Error(o(435,f.tag))}return Ov(a,y,E),zf(),!1}if(vn)return c=Ci.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=E,y!==hy&&(a=Error(o(422),{cause:y}),ch(ri(a,f)))):(y!==hy&&(c=Error(o(423),{cause:y}),ch(ri(c,f))),a=a.current.alternate,a.flags|=65536,E&=-E,a.lanes|=E,y=ri(y,f),E=Jy(a.stateNode,y,E),Qu(a,E),Ar!==4&&(Ar=2)),!1;var O=Error(o(520),{cause:y});if(O=ri(O,f),_h===null?_h=[O]:_h.push(O),Ar!==4&&(Ar=2),c===null)return!0;y=ri(y,f),f=c;do{switch(f.tag){case 3:return f.flags|=65536,a=E&-E,f.lanes|=a,a=Jy(f.stateNode,y,a),Qu(f,a),!1;case 1:if(c=f.type,O=f.stateNode,(f.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Nl===null||!Nl.has(O))))return f.flags|=65536,E&=-E,f.lanes|=E,E=Qy(E),Cl(E,a,f,y),Qu(f,E),!1}f=f.return}while(f!==null);return!1}var ev=Error(o(461)),qr=!1;function ys(a,c,f,y){c.child=a===null?hh(c,null,f,y):_c(c,a.child,f,y)}function Al(a,c,f,y,E){f=f.render;var O=c.ref;if("ref"in y){var B={};for(var te in y)te!=="ref"&&(B[te]=y[te])}else B=y;return bl(c),y=by(a,c,f,B,O,E),te=Ey(),a!==null&&!qr?(jy(a,c,E),Ao(a,c,E)):(vn&&te&&wc(c),c.flags|=1,ys(a,c,y,E),c.child)}function P0(a,c,f,y,E){if(a===null){var O=f.type;return typeof O=="function"&&!Qp(O)&&O.defaultProps===void 0&&f.compare===null?(c.tag=15,c.type=O,M0(a,c,O,y,E)):(a=Bu(f.type,null,y,c,c.mode,E),a.ref=c.ref,a.return=c,c.child=a)}if(O=a.child,!Af(a,E)){var B=O.memoizedProps;if(f=f.compare,f=f!==null?f:Iu,f(B,y)&&a.ref===c.ref)return Ao(a,c,E)}return c.flags|=1,a=ni(O,y),a.ref=c.ref,a.return=c,c.child=a}function M0(a,c,f,y,E){if(a!==null){var O=a.memoizedProps;if(Iu(O,y)&&a.ref===c.ref)if(qr=!1,c.pendingProps=y=O,Af(a,E))(a.flags&131072)!==0&&(qr=!0);else return c.lanes=a.lanes,Ao(a,c,E)}return nv(a,c,f,y,E)}function I0(a,c,f,y){var E=y.children,O=a!==null?a.memoizedState:null;if(a===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((c.flags&128)!==0){if(O=O!==null?O.baseLanes|f:f,a!==null){for(y=c.child=a.child,E=0;y!==null;)E=E|y.lanes|y.childLanes,y=y.sibling;y=E&~O}else y=0,c.child=null;return tv(a,c,O,f,y)}if((f&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},a!==null&&dh(c,O!==null?O.cachePool:null),O!==null?l0(c,O):yy(),Ea(c);else return y=c.lanes=536870912,tv(a,c,O!==null?O.baseLanes|f:f,f,y)}else O!==null?(dh(c,O.cachePool),l0(c,O),Ba(),c.memoizedState=null):(a!==null&&dh(c,null),yy(),Ba());return ys(a,c,E,f),c.child}function Ol(a,c){return a!==null&&a.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function tv(a,c,f,y,E){var O=af();return O=O===null?null:{parent:Dr._currentValue,pool:O},c.memoizedState={baseLanes:f,cachePool:O},a!==null&&dh(c,null),yy(),Ea(c),a!==null&&jc(a,c,y,!0),c.childLanes=E,null}function Sf(a,c){return c=Cf({mode:c.mode,children:c.children},a.mode),c.ref=a.ref,a.child=c,c.return=a,c}function Ef(a,c,f){return _c(c,a.child,null,f),a=Sf(c,c.pendingProps),a.flags|=2,Is(c),c.memoizedState=null,a}function xA(a,c,f){var y=c.pendingProps,E=(c.flags&128)!==0;if(c.flags&=-129,a===null){if(vn){if(y.mode==="hidden")return a=Sf(c,y),c.lanes=536870912,Ol(null,a);if(vy(c),(a=hr)?(a=Ll(a,ai),a=a!==null&&a.data==="&"?a:null,a!==null&&(c.memoizedState={dehydrated:a,treeContext:vo!==null?{id:Kn,overflow:La}:null,retryLane:536870912,hydrationErrors:null},f=n0(a),f.return=c,c.child=f,Fr=c,hr=null)):a=null,a===null)throw xl(c);return c.lanes=536870912,null}return Sf(c,y)}var O=a.memoizedState;if(O!==null){var B=O.dehydrated;if(vy(c),E)if(c.flags&256)c.flags&=-257,c=Ef(a,c,f);else if(c.memoizedState!==null)c.child=a.child,c.flags|=128,c=null;else throw Error(o(558));else if(qr||jc(a,c,f,!1),E=(f&a.childLanes)!==0,qr||E){if(y=lr,y!==null&&(B=Zs(y,f),B!==0&&B!==O.retryLane))throw O.retryLane=B,bc(a,B),_s(y,a,B),ev;zf(),c=Ef(a,c,f)}else a=O.treeContext,hr=hi(B.nextSibling),Fr=c,vn=!0,vl=null,ai=!1,a!==null&&bo(c,a),c=Sf(c,y),c.flags|=4096;return c}return a=ni(a.child,{mode:y.mode,children:y.children}),a.ref=c.ref,c.child=a,a.return=c,a}function jf(a,c){var f=c.ref;if(f===null)a!==null&&a.ref!==null&&(c.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(o(284));(a===null||a.ref!==f)&&(c.flags|=4194816)}}function nv(a,c,f,y,E){return bl(c),f=by(a,c,f,y,void 0,E),y=Ey(),a!==null&&!qr?(jy(a,c,E),Ao(a,c,E)):(vn&&y&&wc(c),c.flags|=1,ys(a,c,f,E),c.child)}function Co(a,c,f,y,E,O){return bl(c),c.updateQueue=null,f=Sy(c,y,f,E),wy(a),y=Ey(),a!==null&&!qr?(jy(a,c,O),Ao(a,c,O)):(vn&&y&&wc(c),c.flags|=1,ys(a,c,f,O),c.child)}function od(a,c,f,y,E){if(bl(c),c.stateNode===null){var O=Fu,B=f.contextType;typeof B=="object"&&B!==null&&(O=Wr(B)),O=new f(y,O),c.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=Wy,c.stateNode=O,O._reactInternals=c,O=c.stateNode,O.props=y,O.state=c.memoizedState,O.refs={},df(c),B=f.contextType,O.context=typeof B=="object"&&B!==null?Wr(B):Fu,O.state=c.memoizedState,B=f.getDerivedStateFromProps,typeof B=="function"&&(Zy(c,f,B,y),O.state=c.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(B=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),B!==O.state&&Wy.enqueueReplaceState(O,O.state,null),fh(c,y,O,E),ph(),O.state=c.memoizedState),typeof O.componentDidMount=="function"&&(c.flags|=4194308),y=!0}else if(a===null){O=c.stateNode;var te=c.memoizedProps,ye=Mc(f,te);O.props=ye;var Be=O.context,We=f.contextType;B=Fu,typeof We=="object"&&We!==null&&(B=Wr(We));var rt=f.getDerivedStateFromProps;We=typeof rt=="function"||typeof O.getSnapshotBeforeUpdate=="function",te=c.pendingProps!==te,We||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(te||Be!==B)&&R0(c,O,y,B),li=!1;var Ue=c.memoizedState;O.state=Ue,fh(c,y,O,E),ph(),Be=c.memoizedState,te||Ue!==Be||li?(typeof rt=="function"&&(Zy(c,f,rt,y),Be=c.memoizedState),(ye=li||ad(c,f,ye,y,Ue,Be,B))?(We||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(c.flags|=4194308)):(typeof O.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=y,c.memoizedState=Be),O.props=y,O.state=Be,O.context=B,y=ye):(typeof O.componentDidMount=="function"&&(c.flags|=4194308),y=!1)}else{O=c.stateNode,hf(a,c),B=c.memoizedProps,We=Mc(f,B),O.props=We,rt=c.pendingProps,Ue=O.context,Be=f.contextType,ye=Fu,typeof Be=="object"&&Be!==null&&(ye=Wr(Be)),te=f.getDerivedStateFromProps,(Be=typeof te=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(B!==rt||Ue!==ye)&&R0(c,O,y,ye),li=!1,Ue=c.memoizedState,O.state=Ue,fh(c,y,O,E),ph();var Xe=c.memoizedState;B!==rt||Ue!==Xe||li||a!==null&&a.dependencies!==null&&Cc(a.dependencies)?(typeof te=="function"&&(Zy(c,f,te,y),Xe=c.memoizedState),(We=li||ad(c,f,We,y,Ue,Xe,ye)||a!==null&&a.dependencies!==null&&Cc(a.dependencies))?(Be||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(y,Xe,ye),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(y,Xe,ye)),typeof O.componentDidUpdate=="function"&&(c.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=1024),c.memoizedProps=y,c.memoizedState=Xe),O.props=y,O.state=Xe,O.context=ye,y=We):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ue===a.memoizedState||(c.flags|=1024),y=!1)}return O=y,jf(a,c),y=(c.flags&128)!==0,O||y?(O=c.stateNode,f=y&&typeof f.getDerivedStateFromError!="function"?null:O.render(),c.flags|=1,a!==null&&y?(c.child=_c(c,a.child,null,E),c.child=_c(c,null,f,E)):ys(a,c,f,E),c.memoizedState=O.state,a=c.child):a=Ao(a,c,E),a}function L0(a,c,f,y){return za(),c.flags|=256,ys(a,c,f,y),c.child}var rv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sv(a){return{baseLanes:a,cachePool:of()}}function iv(a,c,f){return a=a!==null?a.childLanes&~f:0,c&&(a|=Ts),a}function z0(a,c,f){var y=c.pendingProps,E=!1,O=(c.flags&128)!==0,B;if((B=O)||(B=a!==null&&a.memoizedState===null?!1:(jr.current&2)!==0),B&&(E=!0,c.flags&=-129),B=(c.flags&32)!==0,c.flags&=-33,a===null){if(vn){if(E?ea(c):Ba(),(a=hr)?(a=Ll(a,ai),a=a!==null&&a.data!=="&"?a:null,a!==null&&(c.memoizedState={dehydrated:a,treeContext:vo!==null?{id:Kn,overflow:La}:null,retryLane:536870912,hydrationErrors:null},f=n0(a),f.return=c,c.child=f,Fr=c,hr=null)):a=null,a===null)throw xl(c);return tm(a)?c.lanes=32:c.lanes=536870912,null}var te=y.children;return y=y.fallback,E?(Ba(),E=c.mode,te=Cf({mode:"hidden",children:te},E),y=gl(y,E,f,null),te.return=c,y.return=c,te.sibling=y,c.child=te,y=c.child,y.memoizedState=sv(f),y.childLanes=iv(a,B,f),c.memoizedState=rv,Ol(null,y)):(ea(c),kl(c,te))}var ye=a.memoizedState;if(ye!==null&&(te=ye.dehydrated,te!==null)){if(O)c.flags&256?(ea(c),c.flags&=-257,c=Rl(a,c,f)):c.memoizedState!==null?(Ba(),c.child=a.child,c.flags|=128,c=null):(Ba(),te=y.fallback,E=c.mode,y=Cf({mode:"visible",children:y.children},E),te=gl(te,E,f,null),te.flags|=2,y.return=c,te.return=c,y.sibling=te,c.child=y,_c(c,a.child,null,f),y=c.child,y.memoizedState=sv(f),y.childLanes=iv(a,B,f),c.memoizedState=rv,c=Ol(null,y));else if(ea(c),tm(te)){if(B=te.nextSibling&&te.nextSibling.dataset,B)var Be=B.dgst;B=Be,y=Error(o(419)),y.stack="",y.digest=B,ch({value:y,source:null,stack:null}),c=Rl(a,c,f)}else if(qr||jc(a,c,f,!1),B=(f&a.childLanes)!==0,qr||B){if(B=lr,B!==null&&(y=Zs(B,f),y!==0&&y!==ye.retryLane))throw ye.retryLane=y,bc(a,y),_s(B,a,y),ev;em(te)||zf(),c=Rl(a,c,f)}else em(te)?(c.flags|=192,c.child=a.child,c=null):(a=ye.treeContext,hr=hi(te.nextSibling),Fr=c,vn=!0,vl=null,ai=!1,a!==null&&bo(c,a),c=kl(c,y.children),c.flags|=4096);return c}return E?(Ba(),te=y.fallback,E=c.mode,ye=a.child,Be=ye.sibling,y=ni(ye,{mode:"hidden",children:y.children}),y.subtreeFlags=ye.subtreeFlags&65011712,Be!==null?te=ni(Be,te):(te=gl(te,E,f,null),te.flags|=2),te.return=c,y.return=c,y.sibling=te,c.child=y,Ol(null,y),y=c.child,te=a.child.memoizedState,te===null?te=sv(f):(E=te.cachePool,E!==null?(ye=Dr._currentValue,E=E.parent!==ye?{parent:ye,pool:ye}:E):E=of(),te={baseLanes:te.baseLanes|f,cachePool:E}),y.memoizedState=te,y.childLanes=iv(a,B,f),c.memoizedState=rv,Ol(a.child,y)):(ea(c),f=a.child,a=f.sibling,f=ni(f,{mode:"visible",children:y.children}),f.return=c,f.sibling=null,a!==null&&(B=c.deletions,B===null?(c.deletions=[a],c.flags|=16):B.push(a)),c.child=f,c.memoizedState=null,f)}function kl(a,c){return c=Cf({mode:"visible",children:c},a.mode),c.return=a,a.child=c}function Cf(a,c){return a=ti(22,a,null,c),a.lanes=0,a}function Rl(a,c,f){return _c(c,a.child,null,f),a=kl(c,c.pendingProps.children),a.flags|=2,c.memoizedState=null,a}function av(a,c,f){a.lanes|=c;var y=a.alternate;y!==null&&(y.lanes|=c),fy(a.return,c,f)}function ov(a,c,f,y,E,O){var B=a.memoizedState;B===null?a.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:E,treeForkCount:O}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=f,B.tailMode=E,B.treeForkCount=O)}function Eh(a,c,f){var y=c.pendingProps,E=y.revealOrder,O=y.tail;y=y.children;var B=jr.current,te=(B&2)!==0;if(te?(B=B&1|2,c.flags|=128):B&=1,ke(jr,B),ys(a,c,y,f),y=vn?Ku:0,!te&&a!==null&&(a.flags&128)!==0)e:for(a=c.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&av(a,f,c);else if(a.tag===19)av(a,f,c);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===c)break e;for(;a.sibling===null;){if(a.return===null||a.return===c)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(E){case"forwards":for(f=c.child,E=null;f!==null;)a=f.alternate,a!==null&&ff(a)===null&&(E=f),f=f.sibling;f=E,f===null?(E=c.child,c.child=null):(E=f.sibling,f.sibling=null),ov(c,!1,E,f,O,y);break;case"backwards":case"unstable_legacy-backwards":for(f=null,E=c.child,c.child=null;E!==null;){if(a=E.alternate,a!==null&&ff(a)===null){c.child=E;break}a=E.sibling,E.sibling=f,f=E,E=a}ov(c,!0,f,null,O,y);break;case"together":ov(c,!1,null,null,void 0,y);break;default:c.memoizedState=null}return c.child}function Ao(a,c,f){if(a!==null&&(c.dependencies=a.dependencies),Ga|=c.lanes,(f&c.childLanes)===0)if(a!==null){if(jc(a,c,f,!1),(f&c.childLanes)===0)return null}else return null;if(a!==null&&c.child!==a.child)throw Error(o(153));if(c.child!==null){for(a=c.child,f=ni(a,a.pendingProps),c.child=f,f.return=c;a.sibling!==null;)a=a.sibling,f=f.sibling=ni(a,a.pendingProps),f.return=c;f.sibling=null}return c.child}function Af(a,c){return(a.lanes&c)!==0?!0:(a=a.dependencies,!!(a!==null&&Cc(a)))}function lv(a,c,f){switch(c.tag){case 3:tt(c,c.stateNode.containerInfo),wo(c,Dr,a.memoizedState.cache),za();break;case 27:case 5:Ot(c);break;case 4:tt(c,c.stateNode.containerInfo);break;case 10:wo(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,vy(c),null;break;case 13:var y=c.memoizedState;if(y!==null)return y.dehydrated!==null?(ea(c),c.flags|=128,null):(f&c.child.childLanes)!==0?z0(a,c,f):(ea(c),a=Ao(a,c,f),a!==null?a.sibling:null);ea(c);break;case 19:var E=(a.flags&128)!==0;if(y=(f&c.childLanes)!==0,y||(jc(a,c,f,!1),y=(f&c.childLanes)!==0),E){if(y)return Eh(a,c,f);c.flags|=128}if(E=c.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ke(jr,jr.current),y)break;return null;case 22:return c.lanes=0,I0(a,c,f,c.pendingProps);case 24:wo(c,Dr,a.memoizedState.cache)}return Ao(a,c,f)}function F0(a,c,f){if(a!==null)if(a.memoizedProps!==c.pendingProps)qr=!0;else{if(!Af(a,f)&&(c.flags&128)===0)return qr=!1,lv(a,c,f);qr=(a.flags&131072)!==0}else qr=!1,vn&&(c.flags&1048576)!==0&&r0(c,Ku,c.index);switch(c.lanes=0,c.tag){case 16:e:{var y=c.pendingProps;if(a=kc(c.elementType),c.type=a,typeof a=="function")Qp(a)?(y=Mc(a,y),c.tag=1,c=od(null,c,a,y,f)):(c.tag=0,c=nv(null,c,a,y,f));else{if(a!=null){var E=a.$$typeof;if(E===L){c.tag=11,c=Al(null,c,a,y,f);break e}else if(E===Q){c.tag=14,c=P0(null,c,a,y,f);break e}}throw c=Ce(a)||a,Error(o(306,c,""))}}return c;case 0:return nv(a,c,c.type,c.pendingProps,f);case 1:return y=c.type,E=Mc(y,c.pendingProps),od(a,c,y,E,f);case 3:e:{if(tt(c,c.stateNode.containerInfo),a===null)throw Error(o(387));y=c.pendingProps;var O=c.memoizedState;E=O.element,hf(a,c),fh(c,y,null,f);var B=c.memoizedState;if(y=B.cache,wo(c,Dr,y),y!==O.cache&&qn(c,[Dr],f,!0),ph(),y=B.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:B.cache},c.updateQueue.baseState=O,c.memoizedState=O,c.flags&256){c=L0(a,c,y,f);break e}else if(y!==E){E=ri(Error(o(424)),c),ch(E),c=L0(a,c,y,f);break e}else{switch(a=c.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(hr=hi(a.firstChild),Fr=c,vn=!0,vl=null,ai=!0,f=hh(c,null,y,f),c.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(za(),y===E){c=Ao(a,c,f);break e}ys(a,c,y,f)}c=c.child}return c;case 26:return jf(a,c),a===null?(f=$S(c.type,null,c.pendingProps,null))?c.memoizedState=f:vn||(f=c.type,a=c.pendingProps,y=qc(De.current).createElement(f),y[ss]=c,y[Ps]=a,vs(y,f,a),Zr(y),c.stateNode=y):c.memoizedState=$S(c.type,a.memoizedProps,c.pendingProps,a.memoizedState),null;case 27:return Ot(c),a===null&&vn&&(y=c.stateNode=Hv(c.type,c.pendingProps,De.current),Fr=c,ai=!0,E=hr,Il(c.type)?(Kv=E,hr=hi(y.firstChild)):hr=E),ys(a,c,c.pendingProps.children,f),jf(a,c),a===null&&(c.flags|=4194304),c.child;case 5:return a===null&&vn&&((E=y=hr)&&(y=Za(y,c.type,c.pendingProps,ai),y!==null?(c.stateNode=y,Fr=c,hr=hi(y.firstChild),ai=!1,E=!0):E=!1),E||xl(c)),Ot(c),E=c.type,O=c.pendingProps,B=a!==null?a.memoizedProps:null,y=O.children,zv(E,O)?y=null:B!==null&&zv(E,B)&&(c.flags|=32),c.memoizedState!==null&&(E=by(a,c,fA,null,null,f),bd._currentValue=E),jf(a,c),ys(a,c,y,f),c.child;case 6:return a===null&&vn&&((a=f=hr)&&(f=yd(f,c.pendingProps,ai),f!==null?(c.stateNode=f,Fr=c,hr=null,a=!0):a=!1),a||xl(c)),null;case 13:return z0(a,c,f);case 4:return tt(c,c.stateNode.containerInfo),y=c.pendingProps,a===null?c.child=_c(c,null,y,f):ys(a,c,y,f),c.child;case 11:return Al(a,c,c.type,c.pendingProps,f);case 7:return ys(a,c,c.pendingProps,f),c.child;case 8:return ys(a,c,c.pendingProps.children,f),c.child;case 12:return ys(a,c,c.pendingProps.children,f),c.child;case 10:return y=c.pendingProps,wo(c,c.type,y.value),ys(a,c,y.children,f),c.child;case 9:return E=c.type._context,y=c.pendingProps.children,bl(c),E=Wr(E),y=y(E),c.flags|=1,ys(a,c,y,f),c.child;case 14:return P0(a,c,c.type,c.pendingProps,f);case 15:return M0(a,c,c.type,c.pendingProps,f);case 19:return Eh(a,c,f);case 31:return xA(a,c,f);case 22:return I0(a,c,f,c.pendingProps);case 24:return bl(c),y=Wr(Dr),a===null?(E=af(),E===null&&(E=lr,O=rf(),E.pooledCache=O,O.refCount++,O!==null&&(E.pooledCacheLanes|=f),E=O),c.memoizedState={parent:y,cache:E},df(c),wo(c,Dr,E)):((a.lanes&f)!==0&&(hf(a,c),fh(c,null,null,f),ph()),E=a.memoizedState,O=c.memoizedState,E.parent!==y?(E={parent:y,cache:y},c.memoizedState=E,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=E),wo(c,Dr,y)):(y=O.cache,wo(c,Dr,y),y!==E.cache&&qn(c,[Dr],f,!0))),ys(a,c,c.pendingProps.children,f),c.child;case 29:throw c.pendingProps}throw Error(o(156,c.tag))}function Oo(a){a.flags|=4}function cv(a,c,f,y,E){if((c=(a.mode&32)!==0)&&(c=!1),c){if(a.flags|=16777216,(E&335544128)===E)if(a.stateNode.complete)a.flags|=8192;else if(jv())a.flags|=8192;else throw Rc=cf,lf}else a.flags&=-16777217}function q0(a,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!LS(c))if(jv())a.flags|=8192;else throw Rc=cf,lf}function Of(a,c){c!==null&&(a.flags|=4),a.flags&16384&&(c=a.tag!==22?Os():536870912,a.lanes|=c,$l|=c)}function ld(a,c){if(!vn)switch(a.tailMode){case"hidden":c=a.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?c||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function or(a){var c=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(c)for(var E=a.child;E!==null;)f|=E.lanes|E.childLanes,y|=E.subtreeFlags&65011712,y|=E.flags&65011712,E.return=a,E=E.sibling;else for(E=a.child;E!==null;)f|=E.lanes|E.childLanes,y|=E.subtreeFlags,y|=E.flags,E.return=a,E=E.sibling;return a.subtreeFlags|=y,a.childLanes=f,c}function bA(a,c,f){var y=c.pendingProps;switch(xo(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(c),null;case 1:return or(c),null;case 3:return f=c.stateNode,y=null,a!==null&&(y=a.memoizedState.cache),c.memoizedState.cache!==y&&(c.flags|=2048),oi(Dr),yt(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Vu(c)?Oo(c):a===null||a.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,py())),or(c),null;case 26:var E=c.type,O=c.memoizedState;return a===null?(Oo(c),O!==null?(or(c),q0(c,O)):(or(c),cv(c,E,null,y,f))):O?O!==a.memoizedState?(Oo(c),or(c),q0(c,O)):(or(c),c.flags&=-16777217):(a=a.memoizedProps,a!==y&&Oo(c),or(c),cv(c,E,a,y,f)),null;case 27:if(Ft(c),f=De.current,E=c.type,a!==null&&c.stateNode!=null)a.memoizedProps!==y&&Oo(c);else{if(!y){if(c.stateNode===null)throw Error(o(166));return or(c),null}a=Ve.current,Vu(c)?tf(c):(a=Hv(E,y,f),c.stateNode=a,Oo(c))}return or(c),null;case 5:if(Ft(c),E=c.type,a!==null&&c.stateNode!=null)a.memoizedProps!==y&&Oo(c);else{if(!y){if(c.stateNode===null)throw Error(o(166));return or(c),null}if(O=Ve.current,Vu(c))tf(c);else{var B=qc(De.current);switch(O){case 1:O=B.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:O=B.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":O=B.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":O=B.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":O=B.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?O.multiple=!0:y.size&&(O.size=y.size);break;default:O=typeof y.is=="string"?B.createElement(E,{is:y.is}):B.createElement(E)}}O[ss]=c,O[Ps]=y;e:for(B=c.child;B!==null;){if(B.tag===5||B.tag===6)O.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===c)break e;for(;B.sibling===null;){if(B.return===null||B.return===c)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}c.stateNode=O;e:switch(vs(O,E,y),E){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&Oo(c)}}return or(c),cv(c,c.type,a===null?null:a.memoizedProps,c.pendingProps,f),null;case 6:if(a&&c.stateNode!=null)a.memoizedProps!==y&&Oo(c);else{if(typeof y!="string"&&c.stateNode===null)throw Error(o(166));if(a=De.current,Vu(c)){if(a=c.stateNode,f=c.memoizedProps,y=null,E=Fr,E!==null)switch(E.tag){case 27:case 5:y=E.memoizedProps}a[ss]=c,a=!!(a.nodeValue===f||y!==null&&y.suppressHydrationWarning===!0||zh(a.nodeValue,f)),a||xl(c,!0)}else a=qc(a).createTextNode(y),a[ss]=c,c.stateNode=a}return or(c),null;case 31:if(f=c.memoizedState,a===null||a.memoizedState!==null){if(y=Vu(c),f!==null){if(a===null){if(!y)throw Error(o(318));if(a=c.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(557));a[ss]=c}else za(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;or(c),a=!1}else f=py(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return c.flags&256?(Is(c),c):(Is(c),null);if((c.flags&128)!==0)throw Error(o(558))}return or(c),null;case 13:if(y=c.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(E=Vu(c),y!==null&&y.dehydrated!==null){if(a===null){if(!E)throw Error(o(318));if(E=c.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(o(317));E[ss]=c}else za(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;or(c),E=!1}else E=py(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=E),E=!0;if(!E)return c.flags&256?(Is(c),c):(Is(c),null)}return Is(c),(c.flags&128)!==0?(c.lanes=f,c):(f=y!==null,a=a!==null&&a.memoizedState!==null,f&&(y=c.child,E=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(E=y.alternate.memoizedState.cachePool.pool),O=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(O=y.memoizedState.cachePool.pool),O!==E&&(y.flags|=2048)),f!==a&&f&&(c.child.flags|=8192),Of(c,c.updateQueue),or(c),null);case 4:return yt(),a===null&&Xf(c.stateNode.containerInfo),or(c),null;case 10:return oi(c.type),or(c),null;case 19:if(Oe(jr),y=c.memoizedState,y===null)return or(c),null;if(E=(c.flags&128)!==0,O=y.rendering,O===null)if(E)ld(y,!1);else{if(Ar!==0||a!==null&&(a.flags&128)!==0)for(a=c.child;a!==null;){if(O=ff(a),O!==null){for(c.flags|=128,ld(y,!1),a=O.updateQueue,c.updateQueue=a,Of(c,a),c.subtreeFlags=0,a=f,f=c.child;f!==null;)uy(f,a),f=f.sibling;return ke(jr,jr.current&1|2),vn&&ii(c,y.treeForkCount),c.child}a=a.sibling}y.tail!==null&&z()>Df&&(c.flags|=128,E=!0,ld(y,!1),c.lanes=4194304)}else{if(!E)if(a=ff(O),a!==null){if(c.flags|=128,E=!0,a=a.updateQueue,c.updateQueue=a,Of(c,a),ld(y,!0),y.tail===null&&y.tailMode==="hidden"&&!O.alternate&&!vn)return or(c),null}else 2*z()-y.renderingStartTime>Df&&f!==536870912&&(c.flags|=128,E=!0,ld(y,!1),c.lanes=4194304);y.isBackwards?(O.sibling=c.child,c.child=O):(a=y.last,a!==null?a.sibling=O:c.child=O,y.last=O)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=z(),a.sibling=null,f=jr.current,ke(jr,E?f&1|2:f&1),vn&&ii(c,y.treeForkCount),a):(or(c),null);case 22:case 23:return Is(c),nd(),y=c.memoizedState!==null,a!==null?a.memoizedState!==null!==y&&(c.flags|=8192):y&&(c.flags|=8192),y?(f&536870912)!==0&&(c.flags&128)===0&&(or(c),c.subtreeFlags&6&&(c.flags|=8192)):or(c),f=c.updateQueue,f!==null&&Of(c,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==f&&(c.flags|=2048),a!==null&&Oe(El),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),c.memoizedState.cache!==f&&(c.flags|=2048),oi(Dr),or(c),null;case 25:return null;case 30:return null}throw Error(o(156,c.tag))}function uv(a,c){switch(xo(c),c.tag){case 1:return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 3:return oi(Dr),yt(),a=c.flags,(a&65536)!==0&&(a&128)===0?(c.flags=a&-65537|128,c):null;case 26:case 27:case 5:return Ft(c),null;case 31:if(c.memoizedState!==null){if(Is(c),c.alternate===null)throw Error(o(340));za()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 13:if(Is(c),a=c.memoizedState,a!==null&&a.dehydrated!==null){if(c.alternate===null)throw Error(o(340));za()}return a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 19:return Oe(jr),null;case 4:return yt(),null;case 10:return oi(c.type),null;case 22:case 23:return Is(c),nd(),a!==null&&Oe(El),a=c.flags,a&65536?(c.flags=a&-65537|128,c):null;case 24:return oi(Dr),null;case 25:return null;default:return null}}function B0(a,c){switch(xo(c),c.tag){case 3:oi(Dr),yt();break;case 26:case 27:case 5:Ft(c);break;case 4:yt();break;case 31:c.memoizedState!==null&&Is(c);break;case 13:Is(c);break;case 19:Oe(jr);break;case 10:oi(c.type);break;case 22:case 23:Is(c),nd(),a!==null&&Oe(El);break;case 24:oi(Dr)}}function jh(a,c){try{var f=c.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var E=y.next;f=E;do{if((f.tag&a)===a){y=void 0;var O=f.create,B=f.inst;y=O(),B.destroy=y}f=f.next}while(f!==E)}}catch(te){Xn(c,c.return,te)}}function Tl(a,c,f){try{var y=c.updateQueue,E=y!==null?y.lastEffect:null;if(E!==null){var O=E.next;y=O;do{if((y.tag&a)===a){var B=y.inst,te=B.destroy;if(te!==void 0){B.destroy=void 0,E=c;var ye=f,Be=te;try{Be()}catch(We){Xn(E,ye,We)}}}y=y.next}while(y!==O)}}catch(We){Xn(c,c.return,We)}}function U0(a){var c=a.updateQueue;if(c!==null){var f=a.stateNode;try{o0(c,f)}catch(y){Xn(a,a.return,y)}}}function K0(a,c,f){f.props=Mc(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(y){Xn(a,c,y)}}function Ch(a,c){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var y=a.stateNode;break;case 30:y=a.stateNode;break;default:y=a.stateNode}typeof f=="function"?a.refCleanup=f(y):f.current=y}}catch(E){Xn(a,c,E)}}function Ha(a,c){var f=a.ref,y=a.refCleanup;if(f!==null)if(typeof y=="function")try{y()}catch(E){Xn(a,c,E)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(E){Xn(a,c,E)}else f.current=null}function V0(a){var c=a.type,f=a.memoizedProps,y=a.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":f.autoFocus&&y.focus();break e;case"img":f.src?y.src=f.src:f.srcSet&&(y.srcset=f.srcSet)}}catch(E){Xn(a,a.return,E)}}function Ah(a,c,f){try{var y=a.stateNode;$A(y,a.type,f,c),y[Ps]=c}catch(E){Xn(a,a.return,E)}}function dv(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Il(a.type)||a.tag===4}function hv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||dv(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Il(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function pv(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,c):(c=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,c.appendChild(a),f=f._reactRootContainer,f!=null||c.onclick!==null||(c.onclick=xa));else if(y!==4&&(y===27&&Il(a.type)&&(f=a.stateNode,c=null),a=a.child,a!==null))for(pv(a,c,f),a=a.sibling;a!==null;)pv(a,c,f),a=a.sibling}function kf(a,c,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,c?f.insertBefore(a,c):f.appendChild(a);else if(y!==4&&(y===27&&Il(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(kf(a,c,f),a=a.sibling;a!==null;)kf(a,c,f),a=a.sibling}function Rf(a){var c=a.stateNode,f=a.memoizedProps;try{for(var y=a.type,E=c.attributes;E.length;)c.removeAttributeNode(E[0]);vs(c,y,f),c[ss]=a,c[Ps]=f}catch(O){Xn(a,a.return,O)}}var ko=!1,Br=!1,fv=!1,H0=typeof WeakSet=="function"?WeakSet:Set,ls=null;function G0(a,c){if(a=a.containerInfo,Zf=lm,a=Jw(a),Qg(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var E=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{f.nodeType,O.nodeType}catch{f=null;break e}var B=0,te=-1,ye=-1,Be=0,We=0,rt=a,Ue=null;t:for(;;){for(var Xe;rt!==f||E!==0&&rt.nodeType!==3||(te=B+E),rt!==O||y!==0&&rt.nodeType!==3||(ye=B+y),rt.nodeType===3&&(B+=rt.nodeValue.length),(Xe=rt.firstChild)!==null;)Ue=rt,rt=Xe;for(;;){if(rt===a)break t;if(Ue===f&&++Be===E&&(te=B),Ue===O&&++We===y&&(ye=B),(Xe=rt.nextSibling)!==null)break;rt=Ue,Ue=rt.parentNode}rt=Xe}f=te===-1||ye===-1?null:{start:te,end:ye}}else f=null}f=f||{start:0,end:0}}else f=null;for(Wf={focusedElem:a,selectionRange:f},lm=!1,ls=c;ls!==null;)if(c=ls,a=c.child,(c.subtreeFlags&1028)!==0&&a!==null)a.return=c,ls=a;else for(;ls!==null;){switch(c=ls,O=c.alternate,a=c.flags,c.tag){case 0:if((a&4)!==0&&(a=c.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)E=a[f],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&O!==null){a=void 0,f=c,E=O.memoizedProps,O=O.memoizedState,y=f.stateNode;try{var Dt=Mc(f.type,E);a=y.getSnapshotBeforeUpdate(Dt,O),y.__reactInternalSnapshotBeforeUpdate=a}catch(Xt){Xn(f,f.return,Xt)}}break;case 3:if((a&1024)!==0){if(a=c.stateNode.containerInfo,f=a.nodeType,f===9)Uv(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Uv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(o(163))}if(a=c.sibling,a!==null){a.return=c.return,ls=a;break}ls=c.return}}function X0(a,c,f){var y=f.flags;switch(f.tag){case 0:case 11:case 15:Ro(a,f),y&4&&jh(5,f);break;case 1:if(Ro(a,f),y&4)if(a=f.stateNode,c===null)try{a.componentDidMount()}catch(B){Xn(f,f.return,B)}else{var E=Mc(f.type,c.memoizedProps);c=c.memoizedState;try{a.componentDidUpdate(E,c,a.__reactInternalSnapshotBeforeUpdate)}catch(B){Xn(f,f.return,B)}}y&64&&U0(f),y&512&&Ch(f,f.return);break;case 3:if(Ro(a,f),y&64&&(a=f.updateQueue,a!==null)){if(c=null,f.child!==null)switch(f.child.tag){case 27:case 5:c=f.child.stateNode;break;case 1:c=f.child.stateNode}try{o0(a,c)}catch(B){Xn(f,f.return,B)}}break;case 27:c===null&&y&4&&Rf(f);case 26:case 5:Ro(a,f),c===null&&y&4&&V0(f),y&512&&Ch(f,f.return);break;case 12:Ro(a,f);break;case 31:Ro(a,f),y&4&&Z0(a,f);break;case 13:Ro(a,f),y&4&&W0(a,f),y&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=OA.bind(null,f),OS(a,f))));break;case 22:if(y=f.memoizedState!==null||ko,!y){c=c!==null&&c.memoizedState!==null||Br,E=ko;var O=Br;ko=y,(Br=c)&&!O?To(a,f,(f.subtreeFlags&8772)!==0):Ro(a,f),ko=E,Br=O}break;case 30:break;default:Ro(a,f)}}function Y0(a){var c=a.alternate;c!==null&&(a.alternate=null,Y0(c)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(c=a.stateNode,c!==null&&Qd(c)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var xr=null,ci=!1;function ja(a,c,f){for(f=f.child;f!==null;)Tf(a,c,f),f=f.sibling}function Tf(a,c,f){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(dn,f)}catch{}switch(f.tag){case 26:Br||Ha(f,c),ja(a,c,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Br||Ha(f,c);var y=xr,E=ci;Il(f.type)&&(xr=f.stateNode,ci=!1),ja(a,c,f),Bh(f.stateNode),xr=y,ci=E;break;case 5:Br||Ha(f,c);case 6:if(y=xr,E=ci,xr=null,ja(a,c,f),xr=y,ci=E,xr!==null)if(ci)try{(xr.nodeType===9?xr.body:xr.nodeName==="HTML"?xr.ownerDocument.body:xr).removeChild(f.stateNode)}catch(O){Xn(f,c,O)}else try{xr.removeChild(f.stateNode)}catch(O){Xn(f,c,O)}break;case 18:xr!==null&&(ci?(a=xr,AS(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),pi(a)):AS(xr,f.stateNode));break;case 4:y=xr,E=ci,xr=f.stateNode.containerInfo,ci=!0,ja(a,c,f),xr=y,ci=E;break;case 0:case 11:case 14:case 15:Tl(2,f,c),Br||Tl(4,f,c),ja(a,c,f);break;case 1:Br||(Ha(f,c),y=f.stateNode,typeof y.componentWillUnmount=="function"&&K0(f,c,y)),ja(a,c,f);break;case 21:ja(a,c,f);break;case 22:Br=(y=Br)||f.memoizedState!==null,ja(a,c,f),Br=y;break;default:ja(a,c,f)}}function Z0(a,c){if(c.memoizedState===null&&(a=c.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{pi(a)}catch(f){Xn(c,c.return,f)}}}function W0(a,c){if(c.memoizedState===null&&(a=c.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{pi(a)}catch(f){Xn(c,c.return,f)}}function wA(a){switch(a.tag){case 31:case 13:case 19:var c=a.stateNode;return c===null&&(c=a.stateNode=new H0),c;case 22:return a=a.stateNode,c=a._retryCache,c===null&&(c=a._retryCache=new H0),c;default:throw Error(o(435,a.tag))}}function Oh(a,c){var f=wA(a);c.forEach(function(y){if(!f.has(y)){f.add(y);var E=kA.bind(null,a,y);y.then(E,E)}})}function Ls(a,c){var f=c.deletions;if(f!==null)for(var y=0;y<f.length;y++){var E=f[y],O=a,B=c,te=B;e:for(;te!==null;){switch(te.tag){case 27:if(Il(te.type)){xr=te.stateNode,ci=!1;break e}break;case 5:xr=te.stateNode,ci=!1;break e;case 3:case 4:xr=te.stateNode.containerInfo,ci=!0;break e}te=te.return}if(xr===null)throw Error(o(160));Tf(O,B,E),xr=null,ci=!1,O=E.alternate,O!==null&&(O.return=null),E.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)J0(c,a),c=c.sibling}var Ai=null;function J0(a,c){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Ls(c,a),ui(a),y&4&&(Tl(3,a,a.return),jh(3,a),Tl(5,a,a.return));break;case 1:Ls(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),y&64&&ko&&(a=a.updateQueue,a!==null&&(y=a.callbacks,y!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?y:f.concat(y))));break;case 26:var E=Ai;if(Ls(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),y&4){var O=f!==null?f.memoizedState:null;if(y=a.memoizedState,f===null)if(y===null)if(a.stateNode===null){e:{y=a.type,f=a.memoizedProps,E=E.ownerDocument||E;t:switch(y){case"title":O=E.getElementsByTagName("title")[0],(!O||O[Vi]||O[ss]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=E.createElement(y),E.head.insertBefore(O,E.querySelector("head > title"))),vs(O,y,f),O[ss]=a,Zr(O),y=O;break e;case"link":var B=MS("link","href",E).get(y+(f.href||""));if(B){for(var te=0;te<B.length;te++)if(O=B[te],O.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&O.getAttribute("rel")===(f.rel==null?null:f.rel)&&O.getAttribute("title")===(f.title==null?null:f.title)&&O.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){B.splice(te,1);break t}}O=E.createElement(y),vs(O,y,f),E.head.appendChild(O);break;case"meta":if(B=MS("meta","content",E).get(y+(f.content||""))){for(te=0;te<B.length;te++)if(O=B[te],O.getAttribute("content")===(f.content==null?null:""+f.content)&&O.getAttribute("name")===(f.name==null?null:f.name)&&O.getAttribute("property")===(f.property==null?null:f.property)&&O.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&O.getAttribute("charset")===(f.charSet==null?null:f.charSet)){B.splice(te,1);break t}}O=E.createElement(y),vs(O,y,f),E.head.appendChild(O);break;default:throw Error(o(468,y))}O[ss]=a,Zr(O),y=O}a.stateNode=y}else IS(E,a.type,a.stateNode);else a.stateNode=PS(E,y,a.memoizedProps);else O!==y?(O===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):O.count--,y===null?IS(E,a.type,a.stateNode):PS(E,y,a.memoizedProps)):y===null&&a.stateNode!==null&&Ah(a,a.memoizedProps,f.memoizedProps)}break;case 27:Ls(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),f!==null&&y&4&&Ah(a,a.memoizedProps,f.memoizedProps);break;case 5:if(Ls(c,a),ui(a),y&512&&(Br||f===null||Ha(f,f.return)),a.flags&32){E=a.stateNode;try{Ou(E,"")}catch(Dt){Xn(a,a.return,Dt)}}y&4&&a.stateNode!=null&&(E=a.memoizedProps,Ah(a,E,f!==null?f.memoizedProps:E)),y&1024&&(fv=!0);break;case 6:if(Ls(c,a),ui(a),y&4){if(a.stateNode===null)throw Error(o(162));y=a.memoizedProps,f=a.stateNode;try{f.nodeValue=y}catch(Dt){Xn(a,a.return,Dt)}}break;case 3:if(sm=null,E=Ai,Ai=nm(c.containerInfo),Ls(c,a),Ai=E,ui(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{pi(c.containerInfo)}catch(Dt){Xn(a,a.return,Dt)}fv&&(fv=!1,mv(a));break;case 4:y=Ai,Ai=nm(a.stateNode.containerInfo),Ls(c,a),ui(a),Ai=y;break;case 12:Ls(c,a),ui(a);break;case 31:Ls(c,a),ui(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 13:Ls(c,a),ui(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&($h=z()),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 22:E=a.memoizedState!==null;var ye=f!==null&&f.memoizedState!==null,Be=ko,We=Br;if(ko=Be||E,Br=We||ye,Ls(c,a),Br=We,ko=Be,ui(a),y&8192)e:for(c=a.stateNode,c._visibility=E?c._visibility&-2:c._visibility|1,E&&(f===null||ye||ko||Br||Ic(a)),f=null,c=a;;){if(c.tag===5||c.tag===26){if(f===null){ye=f=c;try{if(O=ye.stateNode,E)B=O.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{te=ye.stateNode;var rt=ye.memoizedProps.style,Ue=rt!=null&&rt.hasOwnProperty("display")?rt.display:null;te.style.display=Ue==null||typeof Ue=="boolean"?"":(""+Ue).trim()}}catch(Dt){Xn(ye,ye.return,Dt)}}}else if(c.tag===6){if(f===null){ye=c;try{ye.stateNode.nodeValue=E?"":ye.memoizedProps}catch(Dt){Xn(ye,ye.return,Dt)}}}else if(c.tag===18){if(f===null){ye=c;try{var Xe=ye.stateNode;E?Qf(Xe,!0):Qf(ye.stateNode,!1)}catch(Dt){Xn(ye,ye.return,Dt)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===a)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)break e;for(;c.sibling===null;){if(c.return===null||c.return===a)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}y&4&&(y=a.updateQueue,y!==null&&(f=y.retryQueue,f!==null&&(y.retryQueue=null,Oh(a,f))));break;case 19:Ls(c,a),ui(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,Oh(a,y)));break;case 30:break;case 21:break;default:Ls(c,a),ui(a)}}function ui(a){var c=a.flags;if(c&2){try{for(var f,y=a.return;y!==null;){if(dv(y)){f=y;break}y=y.return}if(f==null)throw Error(o(160));switch(f.tag){case 27:var E=f.stateNode,O=hv(a);kf(a,O,E);break;case 5:var B=f.stateNode;f.flags&32&&(Ou(B,""),f.flags&=-33);var te=hv(a);kf(a,te,B);break;case 3:case 4:var ye=f.stateNode.containerInfo,Be=hv(a);pv(a,Be,ye);break;default:throw Error(o(161))}}catch(We){Xn(a,a.return,We)}a.flags&=-3}c&4096&&(a.flags&=-4097)}function mv(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var c=a;mv(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),a=a.sibling}}function Ro(a,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)X0(a,c.alternate,c),c=c.sibling}function Ic(a){for(a=a.child;a!==null;){var c=a;switch(c.tag){case 0:case 11:case 14:case 15:Tl(4,c,c.return),Ic(c);break;case 1:Ha(c,c.return);var f=c.stateNode;typeof f.componentWillUnmount=="function"&&K0(c,c.return,f),Ic(c);break;case 27:Bh(c.stateNode);case 26:case 5:Ha(c,c.return),Ic(c);break;case 22:c.memoizedState===null&&Ic(c);break;case 30:Ic(c);break;default:Ic(c)}a=a.sibling}}function To(a,c,f){for(f=f&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var y=c.alternate,E=a,O=c,B=O.flags;switch(O.tag){case 0:case 11:case 15:To(E,O,f),jh(4,O);break;case 1:if(To(E,O,f),y=O,E=y.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(Be){Xn(y,y.return,Be)}if(y=O,E=y.updateQueue,E!==null){var te=y.stateNode;try{var ye=E.shared.hiddenCallbacks;if(ye!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ye.length;E++)pf(ye[E],te)}catch(Be){Xn(y,y.return,Be)}}f&&B&64&&U0(O),Ch(O,O.return);break;case 27:Rf(O);case 26:case 5:To(E,O,f),f&&y===null&&B&4&&V0(O),Ch(O,O.return);break;case 12:To(E,O,f);break;case 31:To(E,O,f),f&&B&4&&Z0(E,O);break;case 13:To(E,O,f),f&&B&4&&W0(E,O);break;case 22:O.memoizedState===null&&To(E,O,f),Ch(O,O.return);break;case 30:break;default:To(E,O,f)}c=c.sibling}}function gv(a,c){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(a=c.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Gu(f))}function yv(a,c){a=null,c.alternate!==null&&(a=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==a&&(c.refCount++,a!=null&&Gu(a))}function Ca(a,c,f,y){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)vv(a,c,f,y),c=c.sibling}function vv(a,c,f,y){var E=c.flags;switch(c.tag){case 0:case 11:case 15:Ca(a,c,f,y),E&2048&&jh(9,c);break;case 1:Ca(a,c,f,y);break;case 3:Ca(a,c,f,y),E&2048&&(a=null,c.alternate!==null&&(a=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==a&&(c.refCount++,a!=null&&Gu(a)));break;case 12:if(E&2048){Ca(a,c,f,y),a=c.stateNode;try{var O=c.memoizedProps,B=O.id,te=O.onPostCommit;typeof te=="function"&&te(B,c.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(ye){Xn(c,c.return,ye)}}else Ca(a,c,f,y);break;case 31:Ca(a,c,f,y);break;case 13:Ca(a,c,f,y);break;case 23:break;case 22:O=c.stateNode,B=c.alternate,c.memoizedState!==null?O._visibility&2?Ca(a,c,f,y):kh(a,c):O._visibility&2?Ca(a,c,f,y):(O._visibility|=2,cd(a,c,f,y,(c.subtreeFlags&10256)!==0||!1)),E&2048&&gv(B,c);break;case 24:Ca(a,c,f,y),E&2048&&yv(c.alternate,c);break;default:Ca(a,c,f,y)}}function cd(a,c,f,y,E){for(E=E&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var O=a,B=c,te=f,ye=y,Be=B.flags;switch(B.tag){case 0:case 11:case 15:cd(O,B,te,ye,E),jh(8,B);break;case 23:break;case 22:var We=B.stateNode;B.memoizedState!==null?We._visibility&2?cd(O,B,te,ye,E):kh(O,B):(We._visibility|=2,cd(O,B,te,ye,E)),E&&Be&2048&&gv(B.alternate,B);break;case 24:cd(O,B,te,ye,E),E&&Be&2048&&yv(B.alternate,B);break;default:cd(O,B,te,ye,E)}c=c.sibling}}function kh(a,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var f=a,y=c,E=y.flags;switch(y.tag){case 22:kh(f,y),E&2048&&gv(y.alternate,y);break;case 24:kh(f,y),E&2048&&yv(y.alternate,y);break;default:kh(f,y)}c=c.sibling}}var Rh=8192;function Lc(a,c,f){if(a.subtreeFlags&Rh)for(a=a.child;a!==null;)xv(a,c,f),a=a.sibling}function xv(a,c,f){switch(a.tag){case 26:Lc(a,c,f),a.flags&Rh&&a.memoizedState!==null&&zS(f,Ai,a.memoizedState,a.memoizedProps);break;case 5:Lc(a,c,f);break;case 3:case 4:var y=Ai;Ai=nm(a.stateNode.containerInfo),Lc(a,c,f),Ai=y;break;case 22:a.memoizedState===null&&(y=a.alternate,y!==null&&y.memoizedState!==null?(y=Rh,Rh=16777216,Lc(a,c,f),Rh=y):Lc(a,c,f));break;default:Lc(a,c,f)}}function Q0(a){var c=a.alternate;if(c!==null&&(a=c.child,a!==null)){c.child=null;do c=a.sibling,a.sibling=null,a=c;while(a!==null)}}function Th(a){var c=a.deletions;if((a.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];ls=y,tS(y,a)}Q0(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)eS(a),a=a.sibling}function eS(a){switch(a.tag){case 0:case 11:case 15:Th(a),a.flags&2048&&Tl(9,a,a.return);break;case 3:Th(a);break;case 12:Th(a);break;case 22:var c=a.stateNode;a.memoizedState!==null&&c._visibility&2&&(a.return===null||a.return.tag!==13)?(c._visibility&=-3,_f(a)):Th(a);break;default:Th(a)}}function _f(a){var c=a.deletions;if((a.flags&16)!==0){if(c!==null)for(var f=0;f<c.length;f++){var y=c[f];ls=y,tS(y,a)}Q0(a)}for(a=a.child;a!==null;){switch(c=a,c.tag){case 0:case 11:case 15:Tl(8,c,c.return),_f(c);break;case 22:f=c.stateNode,f._visibility&2&&(f._visibility&=-3,_f(c));break;default:_f(c)}a=a.sibling}}function tS(a,c){for(;ls!==null;){var f=ls;switch(f.tag){case 0:case 11:case 15:Tl(8,f,c);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var y=f.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Gu(f.memoizedState.cache)}if(y=f.child,y!==null)y.return=f,ls=y;else e:for(f=a;ls!==null;){y=ls;var E=y.sibling,O=y.return;if(Y0(y),y===f){ls=null;break e}if(E!==null){E.return=O,ls=E;break e}ls=O}}}var SA={getCacheForType:function(a){var c=Wr(Dr),f=c.data.get(a);return f===void 0&&(f=a(),c.data.set(a,f)),f},cacheSignal:function(){return Wr(Dr).controller.signal}},EA=typeof WeakMap=="function"?WeakMap:Map,Hn=0,lr=null,hn=null,An=0,Wn=0,Oi=null,_o=!1,ud=!1,bv=!1,$o=0,Ar=0,Ga=0,_l=0,$f=0,Ts=0,$l=0,_h=null,di=null,Nf=!1,$h=0,nS=0,Df=1/0,Nh=null,Nl=null,Jr=0,Dl=null,dd=null,No=0,Pf=0,Mf=null,zc=null,Dh=0,wv=null;function ki(){return(Hn&2)!==0&&An!==0?An&-An:ce.T!==null?Nv():wu()}function Sv(){if(Ts===0)if((An&536870912)===0||vn){var a=xu;xu<<=1,(xu&3932160)===0&&(xu=262144),Ts=a}else Ts=536870912;return a=Ci.current,a!==null&&(a.flags|=32),Ts}function _s(a,c,f){(a===lr&&(Wn===2||Wn===9)||a.cancelPendingCommit!==null)&&(Ml(a,0),Pl(a,An,Ts,!1)),Er(a,f),((Hn&2)===0||a!==lr)&&(a===lr&&((Hn&2)===0&&(_l|=f),Ar===4&&Pl(a,An,Ts,!1)),Xa(a))}function rS(a,c,f){if((Hn&6)!==0)throw Error(o(327));var y=!f&&(c&127)===0&&(c&a.expiredLanes)===0||vr(a,c),E=y?CA(a,c):Ff(a,c,!0),O=y;do{if(E===0){ud&&!y&&Pl(a,c,0,!1);break}else{if(f=a.current.alternate,O&&!If(f)){E=Ff(a,c,!1),O=!1;continue}if(E===2){if(O=c,a.errorRecoveryDisabledLanes&O)var B=0;else B=a.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){c=B;e:{var te=a;E=_h;var ye=te.current.memoizedState.isDehydrated;if(ye&&(Ml(te,B).flags|=256),B=Ff(te,B,!1),B!==2){if(bv&&!ye){te.errorRecoveryDisabledLanes|=O,_l|=O,E=4;break e}O=di,di=E,O!==null&&(di===null?di=O:di.push.apply(di,O))}E=B}if(O=!1,E!==2)continue}}if(E===1){Ml(a,0),Pl(a,c,0,!0);break}e:{switch(y=a,O=E,O){case 0:case 1:throw Error(o(345));case 4:if((c&4194048)!==c)break;case 6:Pl(y,c,Ts,!_o);break e;case 2:di=null;break;case 3:case 5:break;default:throw Error(o(329))}if((c&62914560)===c&&(E=$h+300-z(),10<E)){if(Pl(y,c,Ts,!_o),Lt(y,0,!0)!==0)break e;No=c,y.timeoutHandle=Fv(sS.bind(null,y,f,di,Nh,Nf,c,Ts,_l,$l,_o,O,"Throttled",-0,0),E);break e}sS(y,f,di,Nh,Nf,c,Ts,_l,$l,_o,O,null,-0,0)}}break}while(!0);Xa(a)}function sS(a,c,f,y,E,O,B,te,ye,Be,We,rt,Ue,Xe){if(a.timeoutHandle=-1,rt=c.subtreeFlags,rt&8192||(rt&16785408)===16785408){rt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xa},xv(c,O,rt);var Dt=(O&62914560)===O?$h-z():(O&4194048)===O?nS-z():0;if(Dt=UA(rt,Dt),Dt!==null){No=O,a.cancelPendingCommit=Dt(uS.bind(null,a,c,O,f,y,E,B,te,ye,We,rt,null,Ue,Xe)),Pl(a,O,B,!Be);return}}uS(a,c,O,f,y,E,B,te,ye)}function If(a){for(var c=a;;){var f=c.tag;if((f===0||f===11||f===15)&&c.flags&16384&&(f=c.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var y=0;y<f.length;y++){var E=f[y],O=E.getSnapshot;E=E.value;try{if(!ei(O(),E))return!1}catch{return!1}}if(f=c.child,c.subtreeFlags&16384&&f!==null)f.return=c,c=f;else{if(c===a)break;for(;c.sibling===null;){if(c.return===null||c.return===a)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Pl(a,c,f,y){c&=~$f,c&=~_l,a.suspendedLanes|=c,a.pingedLanes&=~c,y&&(a.warmLanes|=c),y=a.expirationTimes;for(var E=c;0<E;){var O=31-Xr(E),B=1<<O;y[O]=-1,E&=~B}f!==0&&ll(a,f,c)}function Lf(){return(Hn&6)===0?(pd(0),!1):!0}function Ev(){if(hn!==null){if(Wn===0)var a=hn.return;else a=hn,Fa=Ec=null,Cy(a),Zu=null,Tc=0,a=hn;for(;a!==null;)B0(a.alternate,a),a=a.return;hn=null}}function Ml(a,c){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,PA(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),No=0,Ev(),lr=a,hn=f=ni(a.current,null),An=c,Wn=0,Oi=null,_o=!1,ud=vr(a,c),bv=!1,$l=Ts=$f=_l=Ga=Ar=0,di=_h=null,Nf=!1,(c&8)!==0&&(c|=c&32);var y=a.entangledLanes;if(y!==0)for(a=a.entanglements,y&=c;0<y;){var E=31-Xr(y),O=1<<E;c|=a[E],y&=~O}return $o=c,Zp(),f}function iS(a,c){en=null,ce.H=Sh,c===Oc||c===Yu?(c=uf(),Wn=3):c===lf?(c=uf(),Wn=4):Wn=c===ev?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Oi=c,hn===null&&(Ar=1,wf(a,ri(c,a.current)))}function jv(){var a=Ci.current;return a===null?!0:(An&4194048)===An?Qi===null:(An&62914560)===An||(An&536870912)!==0?a===Qi:!1}function aS(){var a=ce.H;return ce.H=Sh,a===null?Sh:a}function oS(){var a=ce.A;return ce.A=SA,a}function zf(){Ar=4,_o||(An&4194048)!==An&&Ci.current!==null||(ud=!0),(Ga&134217727)===0&&(_l&134217727)===0||lr===null||Pl(lr,An,Ts,!1)}function Ff(a,c,f){var y=Hn;Hn|=2;var E=aS(),O=oS();(lr!==a||An!==c)&&(Nh=null,Ml(a,c)),c=!1;var B=Ar;e:do try{if(Wn!==0&&hn!==null){var te=hn,ye=Oi;switch(Wn){case 8:Ev(),B=6;break e;case 3:case 2:case 9:case 6:Ci.current===null&&(c=!0);var Be=Wn;if(Wn=0,Oi=null,hd(a,te,ye,Be),f&&ud){B=0;break e}break;default:Be=Wn,Wn=0,Oi=null,hd(a,te,ye,Be)}}jA(),B=Ar;break}catch(We){iS(a,We)}while(!0);return c&&a.shellSuspendCounter++,Fa=Ec=null,Hn=y,ce.H=E,ce.A=O,hn===null&&(lr=null,An=0,Zp()),B}function jA(){for(;hn!==null;)lS(hn)}function CA(a,c){var f=Hn;Hn|=2;var y=aS(),E=oS();lr!==a||An!==c?(Nh=null,Df=z()+500,Ml(a,c)):ud=vr(a,c);e:do try{if(Wn!==0&&hn!==null){c=hn;var O=Oi;t:switch(Wn){case 1:Wn=0,Oi=null,hd(a,c,O,1);break;case 2:case 9:if(Wi(O)){Wn=0,Oi=null,cS(c);break}c=function(){Wn!==2&&Wn!==9||lr!==a||(Wn=7),Xa(a)},O.then(c,c);break e;case 3:Wn=7;break e;case 4:Wn=5;break e;case 7:Wi(O)?(Wn=0,Oi=null,cS(c)):(Wn=0,Oi=null,hd(a,c,O,7));break;case 5:var B=null;switch(hn.tag){case 26:B=hn.memoizedState;case 5:case 27:var te=hn;if(B?LS(B):te.stateNode.complete){Wn=0,Oi=null;var ye=te.sibling;if(ye!==null)hn=ye;else{var Be=te.return;Be!==null?(hn=Be,qf(Be)):hn=null}break t}}Wn=0,Oi=null,hd(a,c,O,5);break;case 6:Wn=0,Oi=null,hd(a,c,O,6);break;case 8:Ev(),Ar=6;break e;default:throw Error(o(462))}}AA();break}catch(We){iS(a,We)}while(!0);return Fa=Ec=null,ce.H=y,ce.A=E,Hn=f,hn!==null?0:(lr=null,An=0,Zp(),Ar)}function AA(){for(;hn!==null&&!Ge();)lS(hn)}function lS(a){var c=F0(a.alternate,a,$o);a.memoizedProps=a.pendingProps,c===null?qf(a):hn=c}function cS(a){var c=a,f=c.alternate;switch(c.tag){case 15:case 0:c=Co(f,c,c.pendingProps,c.type,void 0,An);break;case 11:c=Co(f,c,c.pendingProps,c.type.render,c.ref,An);break;case 5:Cy(c);default:B0(f,c),c=hn=uy(c,$o),c=F0(f,c,$o)}a.memoizedProps=a.pendingProps,c===null?qf(a):hn=c}function hd(a,c,f,y){Fa=Ec=null,Cy(c),Zu=null,Tc=0;var E=c.return;try{if(D0(a,E,c,f,An)){Ar=1,wf(a,ri(f,a.current)),hn=null;return}}catch(O){if(E!==null)throw hn=E,O;Ar=1,wf(a,ri(f,a.current)),hn=null;return}c.flags&32768?(vn||y===1?a=!0:ud||(An&536870912)!==0?a=!1:(_o=a=!0,(y===2||y===9||y===3||y===6)&&(y=Ci.current,y!==null&&y.tag===13&&(y.flags|=16384))),Cv(c,a)):qf(c)}function qf(a){var c=a;do{if((c.flags&32768)!==0){Cv(c,_o);return}a=c.return;var f=bA(c.alternate,c,$o);if(f!==null){hn=f;return}if(c=c.sibling,c!==null){hn=c;return}hn=c=a}while(c!==null);Ar===0&&(Ar=5)}function Cv(a,c){do{var f=uv(a.alternate,a);if(f!==null){f.flags&=32767,hn=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!c&&(a=a.sibling,a!==null)){hn=a;return}hn=a=f}while(a!==null);Ar=6,hn=null}function uS(a,c,f,y,E,O,B,te,ye){a.cancelPendingCommit=null;do Bf();while(Jr!==0);if((Hn&6)!==0)throw Error(o(327));if(c!==null){if(c===a.current)throw Error(o(177));if(O=c.lanes|c.childLanes,O|=ly,Ys(a,f,O,B,te,ye),a===lr&&(hn=lr=null,An=0),dd=c,Dl=a,No=f,Pf=O,Mf=E,zc=y,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Rv(Re,function(){return Av(),null})):(a.callbackNode=null,a.callbackPriority=0),y=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||y){y=ce.T,ce.T=null,E=re.p,re.p=2,B=Hn,Hn|=4;try{G0(a,c,f)}finally{Hn=B,re.p=E,ce.T=y}}Jr=1,dS(),hS(),pS()}}function dS(){if(Jr===1){Jr=0;var a=Dl,c=dd,f=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||f){f=ce.T,ce.T=null;var y=re.p;re.p=2;var E=Hn;Hn|=4;try{J0(c,a);var O=Wf,B=Jw(a.containerInfo),te=O.focusedElem,ye=O.selectionRange;if(B!==te&&te&&te.ownerDocument&&Ww(te.ownerDocument.documentElement,te)){if(ye!==null&&Qg(te)){var Be=ye.start,We=ye.end;if(We===void 0&&(We=Be),"selectionStart"in te)te.selectionStart=Be,te.selectionEnd=Math.min(We,te.value.length);else{var rt=te.ownerDocument||document,Ue=rt&&rt.defaultView||window;if(Ue.getSelection){var Xe=Ue.getSelection(),Dt=te.textContent.length,Xt=Math.min(ye.start,Dt),Qn=ye.end===void 0?Xt:Math.min(ye.end,Dt);!Xe.extend&&Xt>Qn&&(B=Qn,Qn=Xt,Xt=B);var $e=Zw(te,Xt),Ee=Zw(te,Qn);if($e&&Ee&&(Xe.rangeCount!==1||Xe.anchorNode!==$e.node||Xe.anchorOffset!==$e.offset||Xe.focusNode!==Ee.node||Xe.focusOffset!==Ee.offset)){var Pe=rt.createRange();Pe.setStart($e.node,$e.offset),Xe.removeAllRanges(),Xt>Qn?(Xe.addRange(Pe),Xe.extend(Ee.node,Ee.offset)):(Pe.setEnd(Ee.node,Ee.offset),Xe.addRange(Pe))}}}}for(rt=[],Xe=te;Xe=Xe.parentNode;)Xe.nodeType===1&&rt.push({element:Xe,left:Xe.scrollLeft,top:Xe.scrollTop});for(typeof te.focus=="function"&&te.focus(),te=0;te<rt.length;te++){var nt=rt[te];nt.element.scrollLeft=nt.left,nt.element.scrollTop=nt.top}}lm=!!Zf,Wf=Zf=null}finally{Hn=E,re.p=y,ce.T=f}}a.current=c,Jr=2}}function hS(){if(Jr===2){Jr=0;var a=Dl,c=dd,f=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||f){f=ce.T,ce.T=null;var y=re.p;re.p=2;var E=Hn;Hn|=4;try{X0(a,c.alternate,c)}finally{Hn=E,re.p=y,ce.T=f}}Jr=3}}function pS(){if(Jr===4||Jr===3){Jr=0,D();var a=Dl,c=dd,f=No,y=zc;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?Jr=5:(Jr=0,dd=Dl=null,fS(a,a.pendingLanes));var E=a.pendingLanes;if(E===0&&(Nl=null),ga(f),c=c.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(dn,c,void 0,(c.current.flags&128)===128)}catch{}if(y!==null){c=ce.T,E=re.p,re.p=2,ce.T=null;try{for(var O=a.onRecoverableError,B=0;B<y.length;B++){var te=y[B];O(te.value,{componentStack:te.stack})}}finally{ce.T=c,re.p=E}}(No&3)!==0&&Bf(),Xa(a),E=a.pendingLanes,(f&261930)!==0&&(E&42)!==0?a===wv?Dh++:(Dh=0,wv=a):Dh=0,pd(0)}}function fS(a,c){(a.pooledCacheLanes&=c)===0&&(c=a.pooledCache,c!=null&&(a.pooledCache=null,Gu(c)))}function Bf(){return dS(),hS(),pS(),Av()}function Av(){if(Jr!==5)return!1;var a=Dl,c=Pf;Pf=0;var f=ga(No),y=ce.T,E=re.p;try{re.p=32>f?32:f,ce.T=null,f=Mf,Mf=null;var O=Dl,B=No;if(Jr=0,dd=Dl=null,No=0,(Hn&6)!==0)throw Error(o(331));var te=Hn;if(Hn|=4,eS(O.current),vv(O,O.current,B,f),Hn=te,pd(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(dn,O)}catch{}return!0}finally{re.p=E,ce.T=y,fS(a,c)}}function mS(a,c,f){c=ri(f,c),c=Jy(a.stateNode,c,2),a=jl(a,c,2),a!==null&&(Er(a,2),Xa(a))}function Xn(a,c,f){if(a.tag===3)mS(a,a,f);else for(;c!==null;){if(c.tag===3){mS(c,a,f);break}else if(c.tag===1){var y=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Nl===null||!Nl.has(y))){a=ri(f,a),f=Qy(2),y=jl(c,f,2),y!==null&&(Cl(f,y,c,a),Er(y,2),Xa(y));break}}c=c.return}}function Ov(a,c,f){var y=a.pingCache;if(y===null){y=a.pingCache=new EA;var E=new Set;y.set(c,E)}else E=y.get(c),E===void 0&&(E=new Set,y.set(c,E));E.has(f)||(bv=!0,E.add(f),a=Uf.bind(null,a,c,f),c.then(a,a))}function Uf(a,c,f){var y=a.pingCache;y!==null&&y.delete(c),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,lr===a&&(An&f)===f&&(Ar===4||Ar===3&&(An&62914560)===An&&300>z()-$h?(Hn&2)===0&&Ml(a,0):$f|=f,$l===An&&($l=0)),Xa(a)}function kv(a,c){c===0&&(c=Os()),a=bc(a,c),a!==null&&(Er(a,c),Xa(a))}function OA(a){var c=a.memoizedState,f=0;c!==null&&(f=c.retryLane),kv(a,f)}function kA(a,c){var f=0;switch(a.tag){case 31:case 13:var y=a.stateNode,E=a.memoizedState;E!==null&&(f=E.retryLane);break;case 19:y=a.stateNode;break;case 22:y=a.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(c),kv(a,f)}function Rv(a,c){return xe(a,c)}var Kf=null,Fc=null,Tv=!1,Vf=!1,_v=!1,Aa=0;function Xa(a){a!==Fc&&a.next===null&&(Fc===null?Kf=Fc=a:Fc=Fc.next=a),Vf=!0,Tv||(Tv=!0,RA())}function pd(a,c){if(!_v&&Vf){_v=!0;do for(var f=!1,y=Kf;y!==null;){if(a!==0){var E=y.pendingLanes;if(E===0)var O=0;else{var B=y.suspendedLanes,te=y.pingedLanes;O=(1<<31-Xr(42|a)+1)-1,O&=E&~(B&~te),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(f=!0,vS(y,O))}else O=An,O=Lt(y,y===lr?O:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(O&3)===0||vr(y,O)||(f=!0,vS(y,O));y=y.next}while(f);_v=!1}}function $v(){Hf()}function Hf(){Vf=Tv=!1;var a=0;Aa!==0&&DA()&&(a=Aa);for(var c=z(),f=null,y=Kf;y!==null;){var E=y.next,O=gS(y,c);O===0?(y.next=null,f===null?Kf=E:f.next=E,E===null&&(Fc=f)):(f=y,(a!==0||(O&3)!==0)&&(Vf=!0)),y=E}Jr!==0&&Jr!==5||pd(a),Aa!==0&&(Aa=0)}function gS(a,c){for(var f=a.suspendedLanes,y=a.pingedLanes,E=a.expirationTimes,O=a.pendingLanes&-62914561;0<O;){var B=31-Xr(O),te=1<<B,ye=E[B];ye===-1?((te&f)===0||(te&y)!==0)&&(E[B]=Yr(te,c)):ye<=c&&(a.expiredLanes|=te),O&=~te}if(c=lr,f=An,f=Lt(a,a===c?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y=a.callbackNode,f===0||a===c&&(Wn===2||Wn===9)||a.cancelPendingCommit!==null)return y!==null&&y!==null&&Ne(y),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||vr(a,f)){if(c=f&-f,c===a.callbackPriority)return c;switch(y!==null&&Ne(y),ga(f)){case 2:case 8:f=we;break;case 32:f=Re;break;case 268435456:f=Kt;break;default:f=Re}return y=yS.bind(null,a),f=xe(f,y),a.callbackPriority=c,a.callbackNode=f,c}return y!==null&&y!==null&&Ne(y),a.callbackPriority=2,a.callbackNode=null,2}function yS(a,c){if(Jr!==0&&Jr!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Bf()&&a.callbackNode!==f)return null;var y=An;return y=Lt(a,a===lr?y:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y===0?null:(rS(a,y,c),gS(a,z()),a.callbackNode!=null&&a.callbackNode===f?yS.bind(null,a):null)}function vS(a,c){if(Bf())return null;rS(a,c,!0)}function RA(){qv(function(){(Hn&6)!==0?xe(Z,$v):Hf()})}function Nv(){if(Aa===0){var a=Sl;a===0&&(a=cc,cc<<=1,(cc&261888)===0&&(cc=256)),Aa=a}return Aa}function Ph(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:rh(""+a)}function xS(a,c){var f=c.ownerDocument.createElement("input");return f.name=c.name,f.value=c.value,a.id&&f.setAttribute("form",a.id),c.parentNode.insertBefore(f,c),a=new FormData(a),f.parentNode.removeChild(f),a}function fd(a,c,f,y,E){if(c==="submit"&&f&&f.stateNode===E){var O=Ph((E[Ps]||null).action),B=y.submitter;B&&(c=(c=B[Ps]||null)?Ph(c.formAction):B.getAttribute("formAction"),c!==null&&(O=c,B=null));var te=new ih("action","action",null,y,E);a.push({event:te,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Aa!==0){var ye=B?xS(E,B):new FormData(E);Vy(f,{pending:!0,data:ye,method:E.method,action:O},null,ye)}}else typeof O=="function"&&(te.preventDefault(),ye=B?xS(E,B):new FormData(E),Vy(f,{pending:!0,data:ye,method:E.method,action:O},O,ye))},currentTarget:E}]})}}for(var Mh=0;Mh<oy.length;Mh++){var Dv=oy[Mh],TA=Dv.toLowerCase(),_A=Dv[0].toUpperCase()+Dv.slice(1);Sa(TA,"on"+_A)}Sa(ry,"onAnimationEnd"),Sa(sy,"onAnimationIteration"),Sa(iy,"onAnimationStart"),Sa("dblclick","onDoubleClick"),Sa("focusin","onFocus"),Sa("focusout","onBlur"),Sa(yo,"onTransitionRun"),Sa(pA,"onTransitionStart"),Sa(ay,"onTransitionCancel"),Sa(Yp,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var md="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(" "),bS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(md));function wS(a,c){c=(c&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],E=y.event;y=y.listeners;e:{var O=void 0;if(c)for(var B=y.length-1;0<=B;B--){var te=y[B],ye=te.instance,Be=te.currentTarget;if(te=te.listener,ye!==O&&E.isPropagationStopped())break e;O=te,E.currentTarget=Be;try{O(E)}catch(We){xc(We)}E.currentTarget=null,O=ye}else for(B=0;B<y.length;B++){if(te=y[B],ye=te.instance,Be=te.currentTarget,te=te.listener,ye!==O&&E.isPropagationStopped())break e;O=te,E.currentTarget=Be;try{O(E)}catch(We){xc(We)}E.currentTarget=null,O=ye}}}}function En(a,c){var f=c[Gt];f===void 0&&(f=c[Gt]=new Set);var y=a+"__bubble";f.has(y)||(SS(c,a,2,!1),f.add(y))}function Gf(a,c,f){var y=0;c&&(y|=4),SS(f,a,y,c)}var Ih="_reactListening"+Math.random().toString(36).slice(2);function Xf(a){if(!a[Ih]){a[Ih]=!0,ht.forEach(function(f){f!=="selectionchange"&&(bS.has(f)||Gf(f,!1,a),Gf(f,!0,a))});var c=a.nodeType===9?a:a.ownerDocument;c===null||c[Ih]||(c[Ih]=!0,Gf("selectionchange",!1,c))}}function SS(a,c,f,y){switch(US(c)){case 2:var E=VA;break;case 8:E=HA;break;default:E=ex}f=E.bind(null,c,f,a),E=void 0,!Bp||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(E=!0),y?E!==void 0?a.addEventListener(c,f,{capture:!0,passive:E}):a.addEventListener(c,f,!0):E!==void 0?a.addEventListener(c,f,{passive:E}):a.addEventListener(c,f,!1)}function Pv(a,c,f,y,E){var O=y;if((c&1)===0&&(c&2)===0&&y!==null)e:for(;;){if(y===null)return;var B=y.tag;if(B===3||B===4){var te=y.stateNode.containerInfo;if(te===E)break;if(B===4)for(B=y.return;B!==null;){var ye=B.tag;if((ye===3||ye===4)&&B.stateNode.containerInfo===E)return;B=B.return}for(;te!==null;){if(B=dc(te),B===null)return;if(ye=B.tag,ye===5||ye===6||ye===26||ye===27){y=O=B;continue e}te=te.parentNode}}y=y.return}qp(function(){var Be=O,We=Ug(f),rt=[];e:{var Ue=e0.get(a);if(Ue!==void 0){var Xe=ih,Dt=a;switch(a){case"keypress":if(Up(f)===0)break e;case"keydown":case"keyup":Xe=iA;break;case"focusin":Dt="focus",Xe=Vg;break;case"focusout":Dt="blur",Xe=Vg;break;case"beforeblur":case"afterblur":Xe=Vg;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Xe=Aw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Xe=Ow;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Xe=Yg;break;case ry:case sy:case iy:Xe=Rw;break;case Yp:Xe=aA;break;case"scroll":case"scrollend":Xe=Cw;break;case"wheel":Xe=lA;break;case"copy":case"cut":case"paste":Xe=_w;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Xe=Iw;break;case"toggle":case"beforetoggle":Xe=Fw}var Xt=(c&4)!==0,Qn=!Xt&&(a==="scroll"||a==="scrollend"),$e=Xt?Ue!==null?Ue+"Capture":null:Ue;Xt=[];for(var Ee=Be,Pe;Ee!==null;){var nt=Ee;if(Pe=nt.stateNode,nt=nt.tag,nt!==5&&nt!==26&&nt!==27||Pe===null||$e===null||(nt=Ru(Ee,$e),nt!=null&&Xt.push(Lh(Ee,nt,Pe))),Qn)break;Ee=Ee.return}0<Xt.length&&(Ue=new Xe(Ue,Dt,null,f,We),rt.push({event:Ue,listeners:Xt}))}}if((c&7)===0){e:{if(Ue=a==="mouseover"||a==="pointerover",Xe=a==="mouseout"||a==="pointerout",Ue&&f!==is&&(Dt=f.relatedTarget||f.fromElement)&&(dc(Dt)||Dt[cl]))break e;if((Xe||Ue)&&(Ue=We.window===We?We:(Ue=We.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,Xe?(Dt=f.relatedTarget||f.toElement,Xe=Be,Dt=Dt?dc(Dt):null,Dt!==null&&(Qn=p(Dt),Xt=Dt.tag,Dt!==Qn||Xt!==5&&Xt!==27&&Xt!==6)&&(Dt=null)):(Xe=null,Dt=Be),Xe!==Dt)){if(Xt=Aw,nt="onMouseLeave",$e="onMouseEnter",Ee="mouse",(a==="pointerout"||a==="pointerover")&&(Xt=Iw,nt="onPointerLeave",$e="onPointerEnter",Ee="pointer"),Qn=Xe==null?Ue:Hi(Xe),Pe=Dt==null?Ue:Hi(Dt),Ue=new Xt(nt,Ee+"leave",Xe,f,We),Ue.target=Qn,Ue.relatedTarget=Pe,nt=null,dc(We)===Be&&(Xt=new Xt($e,Ee+"enter",Dt,f,We),Xt.target=Pe,Xt.relatedTarget=Qn,nt=Xt),Qn=nt,Xe&&Dt)t:{for(Xt=ES,$e=Xe,Ee=Dt,Pe=0,nt=$e;nt;nt=Xt(nt))Pe++;nt=0;for(var Ut=Ee;Ut;Ut=Xt(Ut))nt++;for(;0<Pe-nt;)$e=Xt($e),Pe--;for(;0<nt-Pe;)Ee=Xt(Ee),nt--;for(;Pe--;){if($e===Ee||Ee!==null&&$e===Ee.alternate){Xt=$e;break t}$e=Xt($e),Ee=Xt(Ee)}Xt=null}else Xt=null;Xe!==null&&Mv(rt,Ue,Xe,Xt,!1),Dt!==null&&Qn!==null&&Mv(rt,Qn,Dt,Xt,!0)}}e:{if(Ue=Be?Hi(Be):window,Xe=Ue.nodeName&&Ue.nodeName.toLowerCase(),Xe==="select"||Xe==="input"&&Ue.type==="file")var pn=Gp;else if(Bt(Ue))if(Nr)pn=dA;else{pn=uA;var Pt=Mu}else Xe=Ue.nodeName,!Xe||Xe.toLowerCase()!=="input"||Ue.type!=="checkbox"&&Ue.type!=="radio"?Be&&nh(Be.elementType)&&(pn=Gp):pn=Xw;if(pn&&(pn=pn(a,Be))){oh(rt,pn,f,We);break e}Pt&&Pt(a,Ue,Be),a==="focusout"&&Be&&Ue.type==="number"&&Be.memoizedProps.value!=null&&zp(Ue,"number",Ue.value)}switch(Pt=Be?Hi(Be):window,a){case"focusin":(Bt(Pt)||Pt.contentEditable==="true")&&(fl=Pt,Lu=Be,go=null);break;case"focusout":go=Lu=fl=null;break;case"mousedown":Xp=!0;break;case"contextmenu":case"mouseup":case"dragend":Xp=!1,ey(rt,f,We);break;case"selectionchange":if(Qw)break;case"keydown":case"keyup":ey(rt,f,We)}var rn;if(Gi)e:{switch(a){case"compositionstart":var wn="onCompositionStart";break e;case"compositionend":wn="onCompositionEnd";break e;case"compositionupdate":wn="onCompositionUpdate";break e}wn=void 0}else yc?Uw(a,f)&&(wn="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(wn="onCompositionStart");wn&&(gc&&f.locale!=="ko"&&(yc||wn!=="onCompositionStart"?wn==="onCompositionEnd"&&yc&&(rn=jw()):(Rr=We,sh="value"in Rr?Rr.value:Rr.textContent,yc=!0)),Pt=Yf(Be,wn),0<Pt.length&&(wn=new Hg(wn,a,null,f,We),rt.push({event:wn,listeners:Pt}),rn?wn.data=rn:(rn=Wg(f),rn!==null&&(wn.data=rn)))),(rn=Qs?Nu(a,f):cA(a,f))&&(wn=Yf(Be,"onBeforeInput"),0<wn.length&&(Pt=new Hg("onBeforeInput","beforeinput",null,f,We),rt.push({event:Pt,listeners:wn}),Pt.data=rn)),fd(rt,a,Be,f,We)}wS(rt,c)})}function Lh(a,c,f){return{instance:a,listener:c,currentTarget:f}}function Yf(a,c){for(var f=c+"Capture",y=[];a!==null;){var E=a,O=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||O===null||(E=Ru(a,f),E!=null&&y.unshift(Lh(a,E,O)),E=Ru(a,c),E!=null&&y.push(Lh(a,E,O))),a.tag===3)return y;a=a.return}return[]}function ES(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Mv(a,c,f,y,E){for(var O=c._reactName,B=[];f!==null&&f!==y;){var te=f,ye=te.alternate,Be=te.stateNode;if(te=te.tag,ye!==null&&ye===y)break;te!==5&&te!==26&&te!==27||Be===null||(ye=Be,E?(Be=Ru(f,O),Be!=null&&B.unshift(Lh(f,Be,ye))):E||(Be=Ru(f,O),Be!=null&&B.push(Lh(f,Be,ye)))),f=f.return}B.length!==0&&a.push({event:c,listeners:B})}var Ya=/\r\n?/g,jS=/\u0000|\uFFFD/g;function Iv(a){return(typeof a=="string"?a:""+a).replace(Ya,`
|
||
`).replace(jS,"")}function zh(a,c){return c=Iv(c),Iv(a)===c}function Mn(a,c,f,y,E,O){switch(f){case"children":typeof y=="string"?c==="body"||c==="textarea"&&y===""||Ou(a,y):(typeof y=="number"||typeof y=="bigint")&&c!=="body"&&Ou(a,""+y);break;case"className":dl(a,"class",y);break;case"tabIndex":dl(a,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":dl(a,f,y);break;case"style":Sw(a,y,O);break;case"data":if(c!=="object"){dl(a,"data",y);break}case"src":case"href":if(y===""&&(c!=="a"||f!=="href")){a.removeAttribute(f);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=rh(""+y),a.setAttribute(f,y);break;case"action":case"formAction":if(typeof y=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof O=="function"&&(f==="formAction"?(c!=="input"&&Mn(a,c,"name",E.name,E,null),Mn(a,c,"formEncType",E.formEncType,E,null),Mn(a,c,"formMethod",E.formMethod,E,null),Mn(a,c,"formTarget",E.formTarget,E,null)):(Mn(a,c,"encType",E.encType,E,null),Mn(a,c,"method",E.method,E,null),Mn(a,c,"target",E.target,E,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=rh(""+y),a.setAttribute(f,y);break;case"onClick":y!=null&&(a.onclick=xa);break;case"onScroll":y!=null&&En("scroll",a);break;case"onScrollEnd":y!=null&&En("scrollend",a);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(E.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"multiple":a.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":a.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){a.removeAttribute("xlink:href");break}f=rh(""+y),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""+y):a.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":y===!0?a.setAttribute(f,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,y):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?a.setAttribute(f,y):a.removeAttribute(f);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?a.removeAttribute(f):a.setAttribute(f,y);break;case"popover":En("beforetoggle",a),En("toggle",a),pc(a,"popover",y);break;case"xlinkActuate":va(a,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":va(a,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":va(a,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":va(a,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":va(a,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":va(a,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":va(a,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":va(a,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":va(a,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":pc(a,"is",y);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Ew.get(f)||f,pc(a,f,y))}}function Fh(a,c,f,y,E,O){switch(f){case"style":Sw(a,y,O);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(E.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"children":typeof y=="string"?Ou(a,y):(typeof y=="number"||typeof y=="bigint")&&Ou(a,""+y);break;case"onScroll":y!=null&&En("scroll",a);break;case"onScrollEnd":y!=null&&En("scrollend",a);break;case"onClick":y!=null&&(a.onclick=xa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vw.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(E=f.endsWith("Capture"),c=f.slice(2,E?f.length-7:void 0),O=a[Ps]||null,O=O!=null?O[f]:null,typeof O=="function"&&a.removeEventListener(c,O,E),typeof y=="function")){typeof O!="function"&&O!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(c,y,E);break e}f in a?a[f]=y:y===!0?a.setAttribute(f,""):pc(a,f,y)}}}function vs(a,c,f){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":En("error",a),En("load",a);var y=!1,E=!1,O;for(O in f)if(f.hasOwnProperty(O)){var B=f[O];if(B!=null)switch(O){case"src":y=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,c));default:Mn(a,c,O,B,f,null)}}E&&Mn(a,c,"srcSet",f.srcSet,f,null),y&&Mn(a,c,"src",f.src,f,null);return;case"input":En("invalid",a);var te=O=B=E=null,ye=null,Be=null;for(y in f)if(f.hasOwnProperty(y)){var We=f[y];if(We!=null)switch(y){case"name":E=We;break;case"type":B=We;break;case"checked":ye=We;break;case"defaultChecked":Be=We;break;case"value":O=We;break;case"defaultValue":te=We;break;case"children":case"dangerouslySetInnerHTML":if(We!=null)throw Error(o(137,c));break;default:Mn(a,c,y,We,f,null)}}qg(a,O,te,ye,Be,B,E,!1);return;case"select":En("invalid",a),y=B=O=null;for(E in f)if(f.hasOwnProperty(E)&&(te=f[E],te!=null))switch(E){case"value":O=te;break;case"defaultValue":B=te;break;case"multiple":y=te;default:Mn(a,c,E,te,f,null)}c=O,f=B,a.multiple=!!y,c!=null?Au(a,!!y,c,!1):f!=null&&Au(a,!!y,f,!0);return;case"textarea":En("invalid",a),O=E=y=null;for(B in f)if(f.hasOwnProperty(B)&&(te=f[B],te!=null))switch(B){case"value":y=te;break;case"defaultValue":E=te;break;case"children":O=te;break;case"dangerouslySetInnerHTML":if(te!=null)throw Error(o(91));break;default:Mn(a,c,B,te,f,null)}bw(a,y,E,O);return;case"option":for(ye in f)if(f.hasOwnProperty(ye)&&(y=f[ye],y!=null))switch(ye){case"selected":a.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Mn(a,c,ye,y,f,null)}return;case"dialog":En("beforetoggle",a),En("toggle",a),En("cancel",a),En("close",a);break;case"iframe":case"object":En("load",a);break;case"video":case"audio":for(y=0;y<md.length;y++)En(md[y],a);break;case"image":En("error",a),En("load",a);break;case"details":En("toggle",a);break;case"embed":case"source":case"link":En("error",a),En("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Be in f)if(f.hasOwnProperty(Be)&&(y=f[Be],y!=null))switch(Be){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,c));default:Mn(a,c,Be,y,f,null)}return;default:if(nh(c)){for(We in f)f.hasOwnProperty(We)&&(y=f[We],y!==void 0&&Fh(a,c,We,y,f,void 0));return}}for(te in f)f.hasOwnProperty(te)&&(y=f[te],y!=null&&Mn(a,c,te,y,f,null))}function $A(a,c,f,y){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,O=null,B=null,te=null,ye=null,Be=null,We=null;for(Xe in f){var rt=f[Xe];if(f.hasOwnProperty(Xe)&&rt!=null)switch(Xe){case"checked":break;case"value":break;case"defaultValue":ye=rt;default:y.hasOwnProperty(Xe)||Mn(a,c,Xe,null,y,rt)}}for(var Ue in y){var Xe=y[Ue];if(rt=f[Ue],y.hasOwnProperty(Ue)&&(Xe!=null||rt!=null))switch(Ue){case"type":O=Xe;break;case"name":E=Xe;break;case"checked":Be=Xe;break;case"defaultChecked":We=Xe;break;case"value":B=Xe;break;case"defaultValue":te=Xe;break;case"children":case"dangerouslySetInnerHTML":if(Xe!=null)throw Error(o(137,c));break;default:Xe!==rt&&Mn(a,c,Ue,Xe,y,rt)}}Lp(a,B,te,ye,Be,We,O,E);return;case"select":Xe=B=te=Ue=null;for(O in f)if(ye=f[O],f.hasOwnProperty(O)&&ye!=null)switch(O){case"value":break;case"multiple":Xe=ye;default:y.hasOwnProperty(O)||Mn(a,c,O,null,y,ye)}for(E in y)if(O=y[E],ye=f[E],y.hasOwnProperty(E)&&(O!=null||ye!=null))switch(E){case"value":Ue=O;break;case"defaultValue":te=O;break;case"multiple":B=O;default:O!==ye&&Mn(a,c,E,O,y,ye)}c=te,f=B,y=Xe,Ue!=null?Au(a,!!f,Ue,!1):!!y!=!!f&&(c!=null?Au(a,!!f,c,!0):Au(a,!!f,f?[]:"",!1));return;case"textarea":Xe=Ue=null;for(te in f)if(E=f[te],f.hasOwnProperty(te)&&E!=null&&!y.hasOwnProperty(te))switch(te){case"value":break;case"children":break;default:Mn(a,c,te,null,y,E)}for(B in y)if(E=y[B],O=f[B],y.hasOwnProperty(B)&&(E!=null||O!=null))switch(B){case"value":Ue=E;break;case"defaultValue":Xe=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:E!==O&&Mn(a,c,B,E,y,O)}xw(a,Ue,Xe);return;case"option":for(var Dt in f)if(Ue=f[Dt],f.hasOwnProperty(Dt)&&Ue!=null&&!y.hasOwnProperty(Dt))switch(Dt){case"selected":a.selected=!1;break;default:Mn(a,c,Dt,null,y,Ue)}for(ye in y)if(Ue=y[ye],Xe=f[ye],y.hasOwnProperty(ye)&&Ue!==Xe&&(Ue!=null||Xe!=null))switch(ye){case"selected":a.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:Mn(a,c,ye,Ue,y,Xe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Xt in f)Ue=f[Xt],f.hasOwnProperty(Xt)&&Ue!=null&&!y.hasOwnProperty(Xt)&&Mn(a,c,Xt,null,y,Ue);for(Be in y)if(Ue=y[Be],Xe=f[Be],y.hasOwnProperty(Be)&&Ue!==Xe&&(Ue!=null||Xe!=null))switch(Be){case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(o(137,c));break;default:Mn(a,c,Be,Ue,y,Xe)}return;default:if(nh(c)){for(var Qn in f)Ue=f[Qn],f.hasOwnProperty(Qn)&&Ue!==void 0&&!y.hasOwnProperty(Qn)&&Fh(a,c,Qn,void 0,y,Ue);for(We in y)Ue=y[We],Xe=f[We],!y.hasOwnProperty(We)||Ue===Xe||Ue===void 0&&Xe===void 0||Fh(a,c,We,Ue,y,Xe);return}}for(var $e in f)Ue=f[$e],f.hasOwnProperty($e)&&Ue!=null&&!y.hasOwnProperty($e)&&Mn(a,c,$e,null,y,Ue);for(rt in y)Ue=y[rt],Xe=f[rt],!y.hasOwnProperty(rt)||Ue===Xe||Ue==null&&Xe==null||Mn(a,c,rt,Ue,y,Xe)}function Lv(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NA(){if(typeof performance.getEntriesByType=="function"){for(var a=0,c=0,f=performance.getEntriesByType("resource"),y=0;y<f.length;y++){var E=f[y],O=E.transferSize,B=E.initiatorType,te=E.duration;if(O&&te&&Lv(B)){for(B=0,te=E.responseEnd,y+=1;y<f.length;y++){var ye=f[y],Be=ye.startTime;if(Be>te)break;var We=ye.transferSize,rt=ye.initiatorType;We&&Lv(rt)&&(ye=ye.responseEnd,B+=We*(ye<te?1:(te-Be)/(ye-Be)))}if(--y,c+=8*(O+B)/(E.duration/1e3),a++,10<a)break}}if(0<a)return c/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Zf=null,Wf=null;function qc(a){return a.nodeType===9?a:a.ownerDocument}function gd(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qh(a,c){if(a===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&c==="foreignObject"?0:a}function zv(a,c){return a==="textarea"||a==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var Jf=null;function DA(){var a=window.event;return a&&a.type==="popstate"?a===Jf?!1:(Jf=a,!0):(Jf=null,!1)}var Fv=typeof setTimeout=="function"?setTimeout:void 0,PA=typeof clearTimeout=="function"?clearTimeout:void 0,CS=typeof Promise=="function"?Promise:void 0,qv=typeof queueMicrotask=="function"?queueMicrotask:typeof CS<"u"?function(a){return CS.resolve(null).then(a).catch(Bv)}:Fv;function Bv(a){setTimeout(function(){throw a})}function Il(a){return a==="head"}function AS(a,c){var f=c,y=0;do{var E=f.nextSibling;if(a.removeChild(f),E&&E.nodeType===8)if(f=E.data,f==="/$"||f==="/&"){if(y===0){a.removeChild(E),pi(c);return}y--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")y++;else if(f==="html")Bh(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Bh(f);for(var O=f.firstChild;O;){var B=O.nextSibling,te=O.nodeName;O[Vi]||te==="SCRIPT"||te==="STYLE"||te==="LINK"&&O.rel.toLowerCase()==="stylesheet"||f.removeChild(O),O=B}}else f==="body"&&Bh(a.ownerDocument.body);f=E}while(f);pi(c)}function Qf(a,c){var f=a;a=0;do{var y=f.nextSibling;if(f.nodeType===1?c?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(c?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=y}while(f)}function Uv(a){var c=a.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var f=c;switch(c=c.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Uv(f),Qd(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function Za(a,c,f,y){for(;a.nodeType===1;){var E=f;if(a.nodeName.toLowerCase()!==c.toLowerCase()){if(!y&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(y){if(!a[Vi])switch(c){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(O=a.getAttribute("rel"),O==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(O!==E.rel||a.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||a.getAttribute("title")!==(E.title==null?null:E.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(O=a.getAttribute("src"),(O!==(E.src==null?null:E.src)||a.getAttribute("type")!==(E.type==null?null:E.type)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&O&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(c==="input"&&a.type==="hidden"){var O=E.name==null?null:""+E.name;if(E.type==="hidden"&&a.getAttribute("name")===O)return a}else return a;if(a=hi(a.nextSibling),a===null)break}return null}function yd(a,c,f){if(c==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=hi(a.nextSibling),a===null))return null;return a}function Ll(a,c){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!c||(a=hi(a.nextSibling),a===null))return null;return a}function em(a){return a.data==="$?"||a.data==="$~"}function tm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function OS(a,c){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=c;else if(a.data!=="$?"||f.readyState!=="loading")c();else{var y=function(){c(),f.removeEventListener("DOMContentLoaded",y)};f.addEventListener("DOMContentLoaded",y),a._reactRetry=y}}function hi(a){for(;a!=null;a=a.nextSibling){var c=a.nodeType;if(c===1||c===3)break;if(c===8){if(c=a.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return a}var Kv=null;function Vv(a){a=a.nextSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(c===0)return hi(a.nextSibling);c--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||c++}a=a.nextSibling}return null}function kS(a){a=a.previousSibling;for(var c=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(c===0)return a;c--}else f!=="/$"&&f!=="/&"||c++}a=a.previousSibling}return null}function Hv(a,c,f){switch(c=qc(f),a){case"html":if(a=c.documentElement,!a)throw Error(o(452));return a;case"head":if(a=c.head,!a)throw Error(o(453));return a;case"body":if(a=c.body,!a)throw Error(o(454));return a;default:throw Error(o(451))}}function Bh(a){for(var c=a.attributes;c.length;)a.removeAttributeNode(c[0]);Qd(a)}var na=new Map,Gv=new Set;function nm(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Do=re.d;re.d={f:MA,r:IA,D:Xv,C:TS,L:LA,m:_S,X:FA,S:zA,M:qA};function MA(){var a=Do.f(),c=Lf();return a||c}function IA(a){var c=hc(a);c!==null&&c.tag===5&&c.type==="form"?Gy(c):Do.r(a)}var Bc=typeof document>"u"?null:document;function RS(a,c,f){var y=Bc;if(y&&typeof c=="string"&&c){var E=Js(c);E='link[rel="'+a+'"][href="'+E+'"]',typeof f=="string"&&(E+='[crossorigin="'+f+'"]'),Gv.has(E)||(Gv.add(E),a={rel:a,crossOrigin:f,href:c},y.querySelector(E)===null&&(c=y.createElement("link"),vs(c,"link",a),Zr(c),y.head.appendChild(c)))}}function Xv(a){Do.D(a),RS("dns-prefetch",a,null)}function TS(a,c){Do.C(a,c),RS("preconnect",a,c)}function LA(a,c,f){Do.L(a,c,f);var y=Bc;if(y&&a&&c){var E='link[rel="preload"][as="'+Js(c)+'"]';c==="image"&&f&&f.imageSrcSet?(E+='[imagesrcset="'+Js(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(E+='[imagesizes="'+Js(f.imageSizes)+'"]')):E+='[href="'+Js(a)+'"]';var O=E;switch(c){case"style":O=vd(a);break;case"script":O=zl(a)}na.has(O)||(a=A({rel:"preload",href:c==="image"&&f&&f.imageSrcSet?void 0:a,as:c},f),na.set(O,a),y.querySelector(E)!==null||c==="style"&&y.querySelector(Uh(O))||c==="script"&&y.querySelector(Kh(O))||(c=y.createElement("link"),vs(c,"link",a),Zr(c),y.head.appendChild(c)))}}function _S(a,c){Do.m(a,c);var f=Bc;if(f&&a){var y=c&&typeof c.as=="string"?c.as:"script",E='link[rel="modulepreload"][as="'+Js(y)+'"][href="'+Js(a)+'"]',O=E;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=zl(a)}if(!na.has(O)&&(a=A({rel:"modulepreload",href:a},c),na.set(O,a),f.querySelector(E)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Kh(O)))return}y=f.createElement("link"),vs(y,"link",a),Zr(y),f.head.appendChild(y)}}}function zA(a,c,f){Do.S(a,c,f);var y=Bc;if(y&&a){var E=ul(y).hoistableStyles,O=vd(a);c=c||"default";var B=E.get(O);if(!B){var te={loading:0,preload:null};if(B=y.querySelector(Uh(O)))te.loading=5;else{a=A({rel:"stylesheet",href:a,"data-precedence":c},f),(f=na.get(O))&&Yv(a,f);var ye=B=y.createElement("link");Zr(ye),vs(ye,"link",a),ye._p=new Promise(function(Be,We){ye.onload=Be,ye.onerror=We}),ye.addEventListener("load",function(){te.loading|=1}),ye.addEventListener("error",function(){te.loading|=2}),te.loading|=4,rm(B,c,y)}B={type:"stylesheet",instance:B,count:1,state:te},E.set(O,B)}}}function FA(a,c){Do.X(a,c);var f=Bc;if(f&&a){var y=ul(f).hoistableScripts,E=zl(a),O=y.get(E);O||(O=f.querySelector(Kh(E)),O||(a=A({src:a,async:!0},c),(c=na.get(E))&&Zv(a,c),O=f.createElement("script"),Zr(O),vs(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(E,O))}}function qA(a,c){Do.M(a,c);var f=Bc;if(f&&a){var y=ul(f).hoistableScripts,E=zl(a),O=y.get(E);O||(O=f.querySelector(Kh(E)),O||(a=A({src:a,async:!0,type:"module"},c),(c=na.get(E))&&Zv(a,c),O=f.createElement("script"),Zr(O),vs(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(E,O))}}function $S(a,c,f,y){var E=(E=De.current)?nm(E):null;if(!E)throw Error(o(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(c=vd(f.href),f=ul(E).hoistableStyles,y=f.get(c),y||(y={type:"style",instance:null,count:0,state:null},f.set(c,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=vd(f.href);var O=ul(E).hoistableStyles,B=O.get(a);if(B||(E=E.ownerDocument||E,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(a,B),(O=E.querySelector(Uh(a)))&&!O._p&&(B.instance=O,B.state.loading=5),na.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},na.set(a,f),O||DS(E,a,f,B.state))),c&&y===null)throw Error(o(528,""));return B}if(c&&y!==null)throw Error(o(529,""));return null;case"script":return c=f.async,f=f.src,typeof f=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=zl(f),f=ul(E).hoistableScripts,y=f.get(c),y||(y={type:"script",instance:null,count:0,state:null},f.set(c,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,a))}}function vd(a){return'href="'+Js(a)+'"'}function Uh(a){return'link[rel="stylesheet"]['+a+"]"}function NS(a){return A({},a,{"data-precedence":a.precedence,precedence:null})}function DS(a,c,f,y){a.querySelector('link[rel="preload"][as="style"]['+c+"]")?y.loading=1:(c=a.createElement("link"),y.preload=c,c.addEventListener("load",function(){return y.loading|=1}),c.addEventListener("error",function(){return y.loading|=2}),vs(c,"link",f),Zr(c),a.head.appendChild(c))}function zl(a){return'[src="'+Js(a)+'"]'}function Kh(a){return"script[async]"+a}function PS(a,c,f){if(c.count++,c.instance===null)switch(c.type){case"style":var y=a.querySelector('style[data-href~="'+Js(f.href)+'"]');if(y)return c.instance=y,Zr(y),y;var E=A({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return y=(a.ownerDocument||a).createElement("style"),Zr(y),vs(y,"style",E),rm(y,f.precedence,a),c.instance=y;case"stylesheet":E=vd(f.href);var O=a.querySelector(Uh(E));if(O)return c.state.loading|=4,c.instance=O,Zr(O),O;y=NS(f),(E=na.get(E))&&Yv(y,E),O=(a.ownerDocument||a).createElement("link"),Zr(O);var B=O;return B._p=new Promise(function(te,ye){B.onload=te,B.onerror=ye}),vs(O,"link",y),c.state.loading|=4,rm(O,f.precedence,a),c.instance=O;case"script":return O=zl(f.src),(E=a.querySelector(Kh(O)))?(c.instance=E,Zr(E),E):(y=f,(E=na.get(O))&&(y=A({},f),Zv(y,E)),a=a.ownerDocument||a,E=a.createElement("script"),Zr(E),vs(E,"link",y),a.head.appendChild(E),c.instance=E);case"void":return null;default:throw Error(o(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(y=c.instance,c.state.loading|=4,rm(y,f.precedence,a));return c.instance}function rm(a,c,f){for(var y=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=y.length?y[y.length-1]:null,O=E,B=0;B<y.length;B++){var te=y[B];if(te.dataset.precedence===c)O=te;else if(O!==E)break}O?O.parentNode.insertBefore(a,O.nextSibling):(c=f.nodeType===9?f.head:f,c.insertBefore(a,c.firstChild))}function Yv(a,c){a.crossOrigin==null&&(a.crossOrigin=c.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=c.referrerPolicy),a.title==null&&(a.title=c.title)}function Zv(a,c){a.crossOrigin==null&&(a.crossOrigin=c.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=c.referrerPolicy),a.integrity==null&&(a.integrity=c.integrity)}var sm=null;function MS(a,c,f){if(sm===null){var y=new Map,E=sm=new Map;E.set(f,y)}else E=sm,y=E.get(f),y||(y=new Map,E.set(f,y));if(y.has(a))return y;for(y.set(a,null),f=f.getElementsByTagName(a),E=0;E<f.length;E++){var O=f[E];if(!(O[Vi]||O[ss]||a==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var B=O.getAttribute(c)||"";B=a+B;var te=y.get(B);te?te.push(O):y.set(B,[O])}}return y}function IS(a,c,f){a=a.ownerDocument||a,a.head.insertBefore(f,c==="title"?a.querySelector("head > title"):null)}function BA(a,c,f){if(f===1||c.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return a=c.disabled,typeof c.precedence=="string"&&a==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function LS(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function zS(a,c,f,y){if(f.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var E=vd(y.href),O=c.querySelector(Uh(E));if(O){c=O._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(a.count++,a=Uc.bind(a),c.then(a,a)),f.state.loading|=4,f.instance=O,Zr(O);return}O=c.ownerDocument||c,y=NS(y),(E=na.get(E))&&Yv(y,E),O=O.createElement("link"),Zr(O);var B=O;B._p=new Promise(function(te,ye){B.onload=te,B.onerror=ye}),vs(O,"link",y),f.instance=O}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,c),(c=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=Uc.bind(a),c.addEventListener("load",f),c.addEventListener("error",f))}}var im=0;function UA(a,c){return a.stylesheets&&a.count===0&&am(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var y=setTimeout(function(){if(a.stylesheets&&am(a,a.stylesheets),a.unsuspend){var O=a.unsuspend;a.unsuspend=null,O()}},6e4+c);0<a.imgBytes&&im===0&&(im=62500*NA());var E=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&am(a,a.stylesheets),a.unsuspend)){var O=a.unsuspend;a.unsuspend=null,O()}},(a.imgBytes>im?50:800)+c);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(y),clearTimeout(E)}}:null}function Uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)am(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var xd=null;function am(a,c){a.stylesheets=null,a.unsuspend!==null&&(a.count++,xd=new Map,c.forEach(FS,a),xd=null,Uc.call(a))}function FS(a,c){if(!(c.state.loading&4)){var f=xd.get(a);if(f)var y=f.get(null);else{f=new Map,xd.set(a,f);for(var E=a.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<E.length;O++){var B=E[O];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(f.set(B.dataset.precedence,B),y=B)}y&&f.set(null,y)}E=c.instance,B=E.getAttribute("data-precedence"),O=f.get(B)||y,O===y&&f.set(null,E),f.set(B,E),this.count++,y=Uc.bind(this),E.addEventListener("load",y),E.addEventListener("error",y),O?O.parentNode.insertBefore(E,O.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(E,a.firstChild)),c.state.loading|=4}}var bd={$$typeof:X,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function KA(a,c,f,y,E,O,B,te,ye){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pn(0),this.hiddenUpdates=Pn(null),this.identifierPrefix=y,this.onUncaughtError=E,this.onCaughtError=O,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ye,this.incompleteTransitions=new Map}function Wv(a,c,f,y,E,O,B,te,ye,Be,We,rt){return a=new KA(a,c,f,B,ye,Be,We,rt,te),c=1,O===!0&&(c|=24),O=ti(3,null,null,c),a.current=O,O.stateNode=a,c=rf(),c.refCount++,a.pooledCache=c,c.refCount++,O.memoizedState={element:y,isDehydrated:f,cache:c},df(O),a}function Jv(a){return a?(a=Fu,a):Fu}function qS(a,c,f,y,E,O){E=Jv(E),y.context===null?y.context=E:y.pendingContext=E,y=Eo(c),y.payload={element:f},O=O===void 0?null:O,O!==null&&(y.callback=O),f=jl(a,y,c),f!==null&&(_s(f,a,c),Ji(f,a,c))}function Vh(a,c){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<c?f:c}}function Qv(a,c){Vh(a,c),(a=a.alternate)&&Vh(a,c)}function BS(a){if(a.tag===13||a.tag===31){var c=bc(a,67108864);c!==null&&_s(c,a,67108864),Qv(a,67108864)}}function om(a){if(a.tag===13||a.tag===31){var c=ki();c=bu(c);var f=bc(a,c);f!==null&&_s(f,a,c),Qv(a,c)}}var lm=!0;function VA(a,c,f,y){var E=ce.T;ce.T=null;var O=re.p;try{re.p=2,ex(a,c,f,y)}finally{re.p=O,ce.T=E}}function HA(a,c,f,y){var E=ce.T;ce.T=null;var O=re.p;try{re.p=8,ex(a,c,f,y)}finally{re.p=O,ce.T=E}}function ex(a,c,f,y){if(lm){var E=cm(y);if(E===null)Pv(a,c,y,um,f),KS(a,y);else if(rx(E,a,c,f,y))y.stopPropagation();else if(KS(a,y),c&4&&-1<GA.indexOf(a)){for(;E!==null;){var O=hc(E);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var B=ma(O.pendingLanes);if(B!==0){var te=O;for(te.pendingLanes|=2,te.entangledLanes|=2;B;){var ye=1<<31-Xr(B);te.entanglements[1]|=ye,B&=~ye}Xa(O),(Hn&6)===0&&(Df=z()+500,pd(0))}}break;case 31:case 13:te=bc(O,2),te!==null&&_s(te,O,2),Lf(),Qv(O,2)}if(O=cm(y),O===null&&Pv(a,c,y,um,f),O===E)break;E=O}E!==null&&y.stopPropagation()}else Pv(a,c,y,null,f)}}function cm(a){return a=Ug(a),tx(a)}var um=null;function tx(a){if(um=null,a=dc(a),a!==null){var c=p(a);if(c===null)a=null;else{var f=c.tag;if(f===13){if(a=m(c),a!==null)return a;a=null}else if(f===31){if(a=g(c),a!==null)return a;a=null}else if(f===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;a=null}else c!==a&&(a=null)}}return um=a,null}function US(a){switch(a){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(H()){case Z:return 2;case we:return 8;case Re:case st:return 32;case Kt:return 268435456;default:return 32}default:return 32}}var nx=!1,Po=null,Fl=null,Mo=null,Hh=new Map,Gh=new Map,ql=[],GA="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".split(" ");function KS(a,c){switch(a){case"focusin":case"focusout":Po=null;break;case"dragenter":case"dragleave":Fl=null;break;case"mouseover":case"mouseout":Mo=null;break;case"pointerover":case"pointerout":Hh.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gh.delete(c.pointerId)}}function wd(a,c,f,y,E,O){return a===null||a.nativeEvent!==O?(a={blockedOn:c,domEventName:f,eventSystemFlags:y,nativeEvent:O,targetContainers:[E]},c!==null&&(c=hc(c),c!==null&&BS(c)),a):(a.eventSystemFlags|=y,c=a.targetContainers,E!==null&&c.indexOf(E)===-1&&c.push(E),a)}function rx(a,c,f,y,E){switch(c){case"focusin":return Po=wd(Po,a,c,f,y,E),!0;case"dragenter":return Fl=wd(Fl,a,c,f,y,E),!0;case"mouseover":return Mo=wd(Mo,a,c,f,y,E),!0;case"pointerover":var O=E.pointerId;return Hh.set(O,wd(Hh.get(O)||null,a,c,f,y,E)),!0;case"gotpointercapture":return O=E.pointerId,Gh.set(O,wd(Gh.get(O)||null,a,c,f,y,E)),!0}return!1}function VS(a){var c=dc(a.target);if(c!==null){var f=p(c);if(f!==null){if(c=f.tag,c===13){if(c=m(f),c!==null){a.blockedOn=c,Lg(a.priority,function(){om(f)});return}}else if(c===31){if(c=g(f),c!==null){a.blockedOn=c,Lg(a.priority,function(){om(f)});return}}else if(c===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function dm(a){if(a.blockedOn!==null)return!1;for(var c=a.targetContainers;0<c.length;){var f=cm(a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);is=y,f.target.dispatchEvent(y),is=null}else return c=hc(f),c!==null&&BS(c),a.blockedOn=f,!1;c.shift()}return!0}function br(a,c,f){dm(a)&&f.delete(c)}function Oa(){nx=!1,Po!==null&&dm(Po)&&(Po=null),Fl!==null&&dm(Fl)&&(Fl=null),Mo!==null&&dm(Mo)&&(Mo=null),Hh.forEach(br),Gh.forEach(br)}function Ur(a,c){a.blockedOn===c&&(a.blockedOn=null,nx||(nx=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Oa)))}var Sd=null;function hm(a){Sd!==a&&(Sd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sd===a&&(Sd=null);for(var c=0;c<a.length;c+=3){var f=a[c],y=a[c+1],E=a[c+2];if(typeof y!="function"){if(tx(y||f)===null)continue;break}var O=hc(f);O!==null&&(a.splice(c,3),c-=3,Vy(O,{pending:!0,data:E,method:f.method,action:y},y,E))}}))}function pi(a){function c(ye){return Ur(ye,a)}Po!==null&&Ur(Po,a),Fl!==null&&Ur(Fl,a),Mo!==null&&Ur(Mo,a),Hh.forEach(c),Gh.forEach(c);for(var f=0;f<ql.length;f++){var y=ql[f];y.blockedOn===a&&(y.blockedOn=null)}for(;0<ql.length&&(f=ql[0],f.blockedOn===null);)VS(f),f.blockedOn===null&&ql.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(y=0;y<f.length;y+=3){var E=f[y],O=f[y+1],B=E[Ps]||null;if(typeof O=="function")B||hm(f);else if(B){var te=null;if(O&&O.hasAttribute("formAction")){if(E=O,B=O[Ps]||null)te=B.formAction;else if(tx(E)!==null)continue}else te=B.action;typeof te=="function"?f[y+1]=te:(f.splice(y,3),y-=3),hm(f)}}}function pr(){function a(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(B){return E=B})},focusReset:"manual",scroll:"manual"})}function c(){E!==null&&(E(),E=null),y||setTimeout(f,20)}function f(){if(!y&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,E=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(f,100),function(){y=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),E!==null&&(E(),E=null)}}}function Bn(a){this._internalRoot=a}Zt.prototype.render=Bn.prototype.render=function(a){var c=this._internalRoot;if(c===null)throw Error(o(409));var f=c.current,y=ki();qS(f,y,a,c,null,null)},Zt.prototype.unmount=Bn.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var c=a.containerInfo;qS(a.current,2,null,a,null,null),Lf(),c[cl]=null}};function Zt(a){this._internalRoot=a}Zt.prototype.unstable_scheduleHydration=function(a){if(a){var c=wu();a={blockedOn:null,target:a,priority:c};for(var f=0;f<ql.length&&c!==0&&c<ql[f].priority;f++);ql.splice(f,0,a),f===0&&VS(a)}};var Xh=r.version;if(Xh!=="19.2.1")throw Error(o(527,Xh,"19.2.1"));re.findDOMNode=function(a){var c=a._reactInternals;if(c===void 0)throw typeof a.render=="function"?Error(o(188)):(a=Object.keys(a).join(","),Error(o(268,a)));return a=S(c),a=a!==null?j(a):null,a=a===null?null:a.stateNode,a};var sx={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jn.isDisabled&&Jn.supportsFiber)try{dn=Jn.inject(sx),Ht=Jn}catch{}}return rb.createRoot=function(a,c){if(!d(a))throw Error(o(299));var f=!1,y="",E=T0,O=_0,B=$0;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(E=c.onUncaughtError),c.onCaughtError!==void 0&&(O=c.onCaughtError),c.onRecoverableError!==void 0&&(B=c.onRecoverableError)),c=Wv(a,1,!1,null,null,f,y,null,E,O,B,pr),a[cl]=c.current,Xf(a),new Bn(c)},rb.hydrateRoot=function(a,c,f){if(!d(a))throw Error(o(299));var y=!1,E="",O=T0,B=_0,te=$0,ye=null;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(E=f.identifierPrefix),f.onUncaughtError!==void 0&&(O=f.onUncaughtError),f.onCaughtError!==void 0&&(B=f.onCaughtError),f.onRecoverableError!==void 0&&(te=f.onRecoverableError),f.formState!==void 0&&(ye=f.formState)),c=Wv(a,1,!0,c,f??null,y,E,ye,O,B,te,pr),c.context=Jv(null),f=c.current,y=ki(),y=bu(y),E=Eo(y),E.callback=null,jl(f,E,y),f=y,c.current.lanes=f,Er(c,f),Xa(c),a[cl]=c.current,Xf(a),new Zt(c)},rb.version="19.2.1",rb}var DM;function pJ(){if(DM)return RR.exports;DM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),RR.exports=hJ(),RR.exports}var fJ=pJ();const Rj="autoglue.tokens",TT="autoglue.auth-change";let Jl=_T();function _T(){try{const e=localStorage.getItem(Rj);return e?JSON.parse(e):null}catch{return null}}function mJ(e){e?localStorage.setItem(Rj,JSON.stringify(e)):localStorage.removeItem(Rj)}function gJ(e){window.dispatchEvent(new CustomEvent(TT,{detail:e}))}const Ks={get(){return Jl},set(e){Jl=e,mJ(e),gJ(e)},reload(){return Jl=_T(),Jl},isAuthed(){return!!Jl?.access_token},getAccessToken(){return Jl?.access_token??null},isExpired(e=Math.floor(Date.now()/1e3)){const r=PM(Jl?.access_token);return r!==null?e>=r:!0},willExpireSoon(e=60,r=Math.floor(Date.now()/1e3)){const s=PM(Jl?.access_token);return s!==null?s-r<=e:!0},logout(){Ks.set(null)},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===Rj&&(Jl=_T(),e(Jl))};return window.addEventListener(TT,r),window.addEventListener("storage",s),()=>{window.removeEventListener(TT,r),window.removeEventListener("storage",s)}}};function PM(e){if(!e)return null;const r=e.split(".");if(r.length<2)return null;try{const s=JSON.parse(atob(yJ(r[1])));return(typeof s?.exp=="number"?s.exp:null)??null}catch{return null}}function yJ(e){return e.replace(/-/g,"+").replace(/_/g,"/")+"==".slice((2-e.length*3%4)%4)}const $T="autoglue.org";let FE=localStorage.getItem($T);const Qo={get(){return FE},set(e){FE=e,localStorage.setItem($T,e),window.dispatchEvent(new CustomEvent("autoglue:org-change",{detail:e}))},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===$T&&(FE=o.newValue,e(FE))};return window.addEventListener("autoglue:org-change",r),window.addEventListener("storage",s),()=>{window.removeEventListener("autoglue:org-change",r),window.removeEventListener("storage",s)}}},vJ="https://autoglue.glueopshosted.com/api/v1".replace(/\/+$/,"");class cL{constructor(r={}){this.configuration=r}set config(r){this.configuration=r}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:vJ}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||uL}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const r=this.configuration.apiKey;if(r)return typeof r=="function"?r:()=>r}get accessToken(){const r=this.configuration.accessToken;if(r)return typeof r=="function"?r:async()=>r}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const xJ=new cL;class Gs{constructor(r=xJ){this.configuration=r,this.middleware=r.middleware}static jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");middleware;withMiddleware(...r){const s=this.clone();return s.middleware=s.middleware.concat(...r),s}withPreMiddleware(...r){const s=r.map(o=>({pre:o}));return this.withMiddleware(...s)}withPostMiddleware(...r){const s=r.map(o=>({post:o}));return this.withMiddleware(...s)}isJsonMime(r){return r?Gs.jsonRegex.test(r):!1}async request(r,s){const{url:o,init:d}=await this.createFetchParams(r,s),p=await this.fetchApi(o,d);if(p&&p.status>=200&&p.status<300)return p;throw new SJ(p,"Response returned an error code")}async createFetchParams(r,s){let o=this.configuration.basePath+r.path;r.query!==void 0&&Object.keys(r.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(r.query));const d=Object.assign({},this.configuration.headers,r.headers);Object.keys(d).forEach(j=>d[j]===void 0?delete d[j]:{});const p=typeof s=="function"?s:async()=>s,m={method:r.method,headers:d,body:r.body,credentials:this.configuration.credentials},g={...m,...await p({init:m,context:r})};let b;wJ(g.body)||g.body instanceof URLSearchParams||bJ(g.body)?b=g.body:this.isJsonMime(d["Content-Type"])?b=JSON.stringify(g.body):b=g.body;const S={...g,body:b};return{url:o,init:S}}fetchApi=async(r,s)=>{let o={url:r,init:s};for(const p of this.middleware)p.pre&&(o=await p.pre({fetch:this.fetchApi,...o})||o);let d;try{d=await(this.configuration.fetchApi||fetch)(o.url,o.init)}catch(p){for(const m of this.middleware)m.onError&&(d=await m.onError({fetch:this.fetchApi,url:o.url,init:o.init,error:p,response:d?d.clone():void 0})||d);if(d===void 0)throw p instanceof Error?new EJ(p,"The request failed and the interceptors did not return an alternative response"):p}for(const p of this.middleware)p.post&&(d=await p.post({fetch:this.fetchApi,url:o.url,init:o.init,response:d.clone()})||d);return d};clone(){const r=this.constructor,s=new r(this.configuration);return s.middleware=this.middleware.slice(),s}}function bJ(e){return typeof Blob<"u"&&e instanceof Blob}function wJ(e){return typeof FormData<"u"&&e instanceof FormData}class SJ extends Error{constructor(r,s){super(s),this.response=r}name="ResponseError"}class EJ extends Error{constructor(r,s){super(s),this.cause=r}name="FetchError"}class et extends Error{constructor(r,s){super(s),this.field=r}name="RequiredError"}function uL(e,r=""){return Object.keys(e).map(s=>dL(s,e[s],r)).filter(s=>s.length>0).join("&")}function dL(e,r,s=""){const o=s+(s.length?`[${e}]`:e);if(r instanceof Array){const d=r.map(p=>encodeURIComponent(String(p))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${d}`}if(r instanceof Set){const d=Array.from(r);return dL(e,d,s)}return r instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(r.toISOString())}`:r instanceof Object?uL(r,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(r))}`}class mt{constructor(r,s=o=>o){this.raw=r,this.transformer=s}async value(){return this.transformer(await this.raw.json())}}class Ii{constructor(r){this.raw=r}async value(){}}class ec{constructor(r){this.raw=r}async value(){return await this.raw.text()}}function tg(e){return jJ(e)}function jJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function CJ(e){return AJ(e,!1)}function AJ(e,r=!1){return e==null?e:{annotation_ids:e.annotation_ids}}function OJ(e){return kJ(e,!1)}function kJ(e,r=!1){return e==null?e:{server_id:e.server_id}}function RJ(e){return TJ(e,!1)}function TJ(e,r=!1){return e==null?e:{domain_id:e.domain_id}}function _J(e){return $J(e,!1)}function $J(e,r=!1){return e==null?e:{label_ids:e.label_ids}}function MM(e){return NJ(e,!1)}function NJ(e,r=!1){return e==null?e:{load_balancer_id:e.load_balancer_id}}function DJ(e){return PJ(e,!1)}function PJ(e,r=!1){return e==null?e:{node_pool_id:e.node_pool_id}}function MJ(e){return IJ(e,!1)}function IJ(e,r=!1){return e==null?e:{record_set_id:e.record_set_id}}function LJ(e){return zJ(e,!1)}function zJ(e,r=!1){return e==null?e:{server_ids:e.server_ids}}function FJ(e){return qJ(e,!1)}function qJ(e,r=!1){return e==null?e:{taint_ids:e.taint_ids}}function BJ(e){return UJ(e)}function UJ(e,r){return e==null?e:{auth_url:e.auth_url==null?void 0:e.auth_url}}function yb(e){return KJ(e)}function KJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,credential_id:e.credential_id==null?void 0:e.credential_id,domain_name:e.domain_name==null?void 0:e.domain_name,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,organization_id:e.organization_id==null?void 0:e.organization_id,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at,zone_id:e.zone_id==null?void 0:e.zone_id}}function ng(e){return VJ(e)}function VJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,updated_at:e.updated_at==null?void 0:e.updated_at}}function rg(e){return HJ(e)}function HJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,effect:e.effect==null?void 0:e.effect,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function sg(e){return GJ(e)}function GJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function Id(e){return XJ(e)}function XJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,hostname:e.hostname==null?void 0:e.hostname,id:e.id==null?void 0:e.id,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,role:e.role==null?void 0:e.role,ssh_key_id:e.ssh_key_id==null?void 0:e.ssh_key_id,ssh_user:e.ssh_user==null?void 0:e.ssh_user,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function vb(e){return YJ(e)}function YJ(e,r){return e==null?e:{annotations:e.annotations==null?void 0:e.annotations.map(tg),created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,labels:e.labels==null?void 0:e.labels.map(sg),name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,role:e.role==null?void 0:e.role,servers:e.servers==null?void 0:e.servers.map(Id),taints:e.taints==null?void 0:e.taints.map(rg),updated_at:e.updated_at==null?void 0:e.updated_at}}function pj(e){return ZJ(e)}function ZJ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,domain_id:e.domain_id==null?void 0:e.domain_id,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,owner:e.owner==null?void 0:e.owner,status:e.status==null?void 0:e.status,ttl:e.ttl==null?void 0:e.ttl,type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at,values:e.values==null?void 0:e.values}}function Ns(e){return WJ(e)}function WJ(e,r){return e==null?e:{apps_load_balancer:e.apps_load_balancer==null?void 0:ng(e.apps_load_balancer),bastion_server:e.bastion_server==null?void 0:Id(e.bastion_server),captain_domain:e.captain_domain==null?void 0:yb(e.captain_domain),certificate_key:e.certificate_key==null?void 0:e.certificate_key,cluster_provider:e.cluster_provider==null?void 0:e.cluster_provider,control_plane_fqdn:e.control_plane_fqdn==null?void 0:e.control_plane_fqdn,control_plane_record_set:e.control_plane_record_set==null?void 0:pj(e.control_plane_record_set),created_at:e.created_at==null?void 0:e.created_at,docker_image:e.docker_image==null?void 0:e.docker_image,docker_tag:e.docker_tag==null?void 0:e.docker_tag,glueops_load_balancer:e.glueops_load_balancer==null?void 0:ng(e.glueops_load_balancer),id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,node_pools:e.node_pools==null?void 0:e.node_pools.map(vb),random_token:e.random_token==null?void 0:e.random_token,region:e.region==null?void 0:e.region,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function JJ(e){return QJ(e,!1)}function QJ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function eQ(e){return tQ(e,!1)}function tQ(e,r=!1){return e==null?e:{cluster_provider:e.cluster_provider,docker_image:e.docker_image,docker_tag:e.docker_tag,name:e.name,region:e.region}}function nQ(e){return rQ(e,!1)}function rQ(e,r=!1){return e==null?e:{account_id:e.account_id,credential_provider:e.credential_provider,kind:e.kind,name:e.name,region:e.region,schema_version:e.schema_version,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function sQ(e){return iQ(e,!1)}function iQ(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,zone_id:e.zone_id}}function aQ(e){return oQ(e,!1)}function oQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function lQ(e){return cQ(e,!1)}function cQ(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function uQ(e){return dQ(e,!1)}function dQ(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function hQ(e){return pQ(e,!1)}function pQ(e,r=!1){return e==null?e:{name:e.name,ttl:e.ttl,type:e.type,values:e.values}}function fQ(e){return mQ(e,!1)}function mQ(e,r=!1){return e==null?e:{bits:e.bits,comment:e.comment,name:e.name,type:e.type}}function gQ(e){return yQ(e,!1)}function yQ(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function vQ(e){return xQ(e,!1)}function xQ(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function qE(e){return bQ(e)}function bQ(e,r){return e==null?e:{account_id:e.account_id==null?void 0:e.account_id,created_at:e.created_at==null?void 0:e.created_at,credential_provider:e.credential_provider==null?void 0:e.credential_provider,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,region:e.region==null?void 0:e.region,schema_version:e.schema_version==null?void 0:e.schema_version,scope:e.scope==null?void 0:e.scope,scope_kind:e.scope_kind==null?void 0:e.scope_kind,scope_version:e.scope_version==null?void 0:e.scope_version,updated_at:e.updated_at==null?void 0:e.updated_at}}function wQ(e){return SQ(e,!1)}function SQ(e,r=!1){return e==null?e:{payload:e.payload,queue:e.queue,run_at:e.run_at,type:e.type}}function EQ(e){return jQ(e)}function jQ(e,r){return e==null?e:{alg:e.alg==null?void 0:e.alg,e:e.e==null?void 0:e.e,kid:e.kid==null?void 0:e.kid,kty:e.kty==null?void 0:e.kty,n:e.n==null?void 0:e.n,use:e.use==null?void 0:e.use,x:e.x==null?void 0:e.x}}function CQ(e){return AQ(e)}function AQ(e,r){return e==null?e:{keys:e.keys==null?void 0:e.keys.map(EQ)}}function OQ(e){return kQ(e)}function kQ(e,r){return e}function fj(e){return RQ(e)}function RQ(e,r){return e==null?e:{attempts:e.attempts==null?void 0:e.attempts,created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,max_attempts:e.max_attempts==null?void 0:e.max_attempts,payload:e.payload==null?void 0:e.payload,queue:e.queue==null?void 0:e.queue,run_at:e.run_at==null?void 0:e.run_at,status:e.status==null?void 0:OQ(e.status),type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at}}function TQ(e){return _Q(e,!1)}function _Q(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function $Q(e){return NQ(e)}function NQ(e,r){return e==null?e:{items:e.items==null?void 0:e.items.map(fj),page:e.page==null?void 0:e.page,page_size:e.page_size==null?void 0:e.page_size,total:e.total==null?void 0:e.total}}function DQ(e){return PQ(e)}function PQ(e,r){return e==null?e:{failed:e.failed==null?void 0:e.failed,name:e.name==null?void 0:e.name,pending:e.pending==null?void 0:e.pending,running:e.running==null?void 0:e.running,scheduled:e.scheduled==null?void 0:e.scheduled}}function MQ(e){return IQ(e,!1)}function IQ(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function LQ(e){return zQ(e,!1)}function zQ(e,r=!1){return e==null?e:{kubeconfig:e.kubeconfig}}function IM(e){return hL(e)}function hL(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,public_key:e.public_key==null?void 0:e.public_key,updated_at:e.updated_at==null?void 0:e.updated_at}}function LM(e){return FQ(e)}function FQ(e,r){return e==null?e:{access_token:e.access_token==null?void 0:e.access_token,expires_in:e.expires_in==null?void 0:e.expires_in,refresh_token:e.refresh_token==null?void 0:e.refresh_token,token_type:e.token_type==null?void 0:e.token_type}}function qQ(e){return BQ(e,!1)}function BQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function UQ(e){return KQ(e,!1)}function KQ(e,r=!1){return e==null?e:{cluster_provider:e.cluster_provider,docker_image:e.docker_image,docker_tag:e.docker_tag,name:e.name,region:e.region}}function VQ(e){return HQ(e,!1)}function HQ(e,r=!1){return e==null?e:{account_id:e.account_id,name:e.name,region:e.region,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function GQ(e){return XQ(e,!1)}function XQ(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,status:e.status,zone_id:e.zone_id}}function YQ(e){return ZQ(e,!1)}function ZQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function WQ(e){return JQ(e,!1)}function JQ(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function QQ(e){return eee(e,!1)}function eee(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function tee(e){return nee(e,!1)}function nee(e,r=!1){return e==null?e:{name:e.name,status:e.status,ttl:e.ttl,type:e.type,values:e.values}}function ree(e){return see(e,!1)}function see(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function iee(e){return aee(e,!1)}function aee(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function oee(e){return lee(e)}function lee(e,r){return e==null||typeof e!="object"?e:hL(e)}function cee(e){return uee(e,!1)}function uee(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function pL(e){return dee(e)}function dee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function hee(e){return pee(e)}function pee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),email:e.email==null?void 0:e.email,id:e.id==null?void 0:e.id,is_primary:e.is_primary==null?void 0:e.is_primary,is_verified:e.is_verified==null?void 0:e.is_verified,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user:e.user==null?void 0:pL(e.user),user_id:e.user_id==null?void 0:e.user_id}}function xb(e){return fee(e)}function fee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),domain:e.domain==null?void 0:e.domain,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function mee(e){return gee(e)}function gee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,emails:e.emails==null?void 0:e.emails.map(hee),id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,organizations:e.organizations==null?void 0:e.organizations.map(xb),primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function zM(e){return yee(e)}function yee(e,r){return e==null?e:{email:e.email==null?void 0:e.email,role:e.role==null?void 0:e.role,user_id:e.user_id==null?void 0:e.user_id}}function vee(e){return xee(e,!1)}function xee(e,r=!1){return e==null?e:{role:e.role,user_id:e.user_id}}function bee(e){return wee(e,!1)}function wee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function See(e){return Eee(e,!1)}function Eee(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function jee(e){return Cee(e)}function Cee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,org_key:e.org_key==null?void 0:e.org_key,org_secret:e.org_secret==null?void 0:e.org_secret,scope:e.scope==null?void 0:e.scope}}function Aee(e){return Oee(e,!1)}function Oee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function kee(e){return Ree(e,!1)}function Ree(e,r=!1){return e==null?e:{display_name:e.display_name}}function FM(e){return Tee(e)}function Tee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,last_used_at:e.last_used_at==null?void 0:e.last_used_at,name:e.name==null?void 0:e.name,plain:e.plain==null?void 0:e.plain,scope:e.scope==null?void 0:e.scope}}function _ee(e){return $ee(e)}function $ee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),expires_at:e.expires_at==null?void 0:new Date(e.expires_at),id:e.id==null?void 0:e.id,last_used_at:e.last_used_at==null?void 0:new Date(e.last_used_at),name:e.name==null?void 0:e.name,org_id:e.org_id==null?void 0:e.org_id,prefix:e.prefix==null?void 0:e.prefix,revoked:e.revoked==null?void 0:e.revoked,scope:e.scope==null?void 0:e.scope,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user_id:e.user_id==null?void 0:e.user_id}}class Nee extends Gs{async createAnnotationRaw(r,s){if(r.dtoCreateAnnotationRequest==null)throw new et("dtoCreateAnnotationRequest",'Required parameter "dtoCreateAnnotationRequest" was null or undefined when calling createAnnotation().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"POST",headers:d,query:o,body:JJ(r.dtoCreateAnnotationRequest)},s);return new mt(m,g=>tg(g))}async createAnnotation(r,s){return await(await this.createAnnotationRaw(r,s)).value()}async deleteAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteAnnotation(r,s){await this.deleteAnnotationRaw(r,s)}async getAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>tg(g))}async getAnnotation(r,s){return await(await this.getAnnotationRaw(r,s)).value()}async listAnnotationsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(tg))}async listAnnotations(r={},s){return await(await this.listAnnotationsRaw(r,s)).value()}async updateAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateAnnotation().');if(r.dtoUpdateAnnotationRequest==null)throw new et("dtoUpdateAnnotationRequest",'Required parameter "dtoUpdateAnnotationRequest" was null or undefined when calling updateAnnotation().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/annotations/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:qQ(r.dtoUpdateAnnotationRequest)},s);return new mt(m,g=>tg(g))}async updateAnnotation(r,s){return await(await this.updateAnnotationRaw(r,s)).value()}}class Dee extends Gs{async adminCancelArcherJobRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling adminCancelArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/admin/archer/jobs/{id}/cancel";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new mt(m,g=>fj(g))}async adminCancelArcherJob(r,s){return await(await this.adminCancelArcherJobRaw(r,s)).value()}async adminEnqueueArcherJobRaw(r,s){if(r.dtoEnqueueRequest==null)throw new et("dtoEnqueueRequest",'Required parameter "dtoEnqueueRequest" was null or undefined when calling adminEnqueueArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"POST",headers:d,query:o,body:wQ(r.dtoEnqueueRequest)},s);return new mt(m,g=>fj(g))}async adminEnqueueArcherJob(r,s){return await(await this.adminEnqueueArcherJobRaw(r,s)).value()}async adminListArcherJobsRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.queue!=null&&(o.queue=r.queue),r.q!=null&&(o.q=r.q),r.page!=null&&(o.page=r.page),r.pageSize!=null&&(o.page_size=r.pageSize);const d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"GET",headers:d,query:o},s);return new mt(m,g=>$Q(g))}async adminListArcherJobs(r={},s){return await(await this.adminListArcherJobsRaw(r,s)).value()}async adminListArcherQueuesRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/admin/archer/queues",method:"GET",headers:o,query:s},r);return new mt(p,m=>m.map(DQ))}async adminListArcherQueues(r){return await(await this.adminListArcherQueuesRaw(r)).value()}async adminRetryArcherJobRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling adminRetryArcherJob().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/admin/archer/jobs/{id}/retry";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new mt(m,g=>fj(g))}async adminRetryArcherJob(r,s){return await(await this.adminRetryArcherJobRaw(r,s)).value()}}const Ra={queued:"queued",running:"running",succeeded:"succeeded",failed:"failed",canceled:"canceled",retrying:"retrying",scheduled:"scheduled"};class Pee extends Gs{async authCallbackRaw(r,s){if(r.provider==null)throw new et("provider",'Required parameter "provider" was null or undefined when calling authCallback().');const o={},d={};let p="/auth/{provider}/callback";p=p.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>LM(g))}async authCallback(r,s){return await(await this.authCallbackRaw(r,s)).value()}async authStartRaw(r,s){if(r.provider==null)throw new et("provider",'Required parameter "provider" was null or undefined when calling authStart().');const o={},d={};let p="/auth/{provider}/start";p=p.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:p,method:"POST",headers:d,query:o},s);return new mt(m,g=>BJ(g))}async authStart(r,s){return await(await this.authStartRaw(r,s)).value()}async getJWKSRaw(r){const s={},o={},p=await this.request({path:"/.well-known/jwks.json",method:"GET",headers:o,query:s},r);return new mt(p,m=>CQ(m))}async getJWKS(r){return await(await this.getJWKSRaw(r)).value()}async logoutRaw(r,s){if(r.dtoLogoutRequest==null)throw new et("dtoLogoutRequest",'Required parameter "dtoLogoutRequest" was null or undefined when calling logout().');const o={},d={};d["Content-Type"]="application/json";const m=await this.request({path:"/auth/logout",method:"POST",headers:d,query:o,body:TQ(r.dtoLogoutRequest)},s);return new Ii(m)}async logout(r,s){await this.logoutRaw(r,s)}async refreshRaw(r,s){if(r.dtoRefreshRequest==null)throw new et("dtoRefreshRequest",'Required parameter "dtoRefreshRequest" was null or undefined when calling refresh().');const o={},d={};d["Content-Type"]="application/json";const m=await this.request({path:"/auth/refresh",method:"POST",headers:d,query:o,body:MQ(r.dtoRefreshRequest)},s);return new mt(m,g=>LM(g))}async refresh(r,s){return await(await this.refreshRaw(r,s)).value()}}class Mee extends Gs{async attachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachAppsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new et("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachAppsLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/apps-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:MM(r.dtoAttachLoadBalancerRequest)},s);return new mt(m,g=>Ns(g))}async attachAppsLoadBalancer(r,s){return await(await this.attachAppsLoadBalancerRaw(r,s)).value()}async attachBastionServerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachBastionServer().');if(r.dtoAttachBastionRequest==null)throw new et("dtoAttachBastionRequest",'Required parameter "dtoAttachBastionRequest" was null or undefined when calling attachBastionServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/bastion";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:OJ(r.dtoAttachBastionRequest)},s);return new mt(m,g=>Ns(g))}async attachBastionServer(r,s){return await(await this.attachBastionServerRaw(r,s)).value()}async attachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachCaptainDomain().');if(r.dtoAttachCaptainDomainRequest==null)throw new et("dtoAttachCaptainDomainRequest",'Required parameter "dtoAttachCaptainDomainRequest" was null or undefined when calling attachCaptainDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/captain-domain";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:RJ(r.dtoAttachCaptainDomainRequest)},s);return new mt(m,g=>Ns(g))}async attachCaptainDomain(r,s){return await(await this.attachCaptainDomainRaw(r,s)).value()}async attachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachControlPlaneRecordSet().');if(r.dtoAttachRecordSetRequest==null)throw new et("dtoAttachRecordSetRequest",'Required parameter "dtoAttachRecordSetRequest" was null or undefined when calling attachControlPlaneRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/control-plane-record-set";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:MJ(r.dtoAttachRecordSetRequest)},s);return new mt(m,g=>Ns(g))}async attachControlPlaneRecordSet(r,s){return await(await this.attachControlPlaneRecordSetRaw(r,s)).value()}async attachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachGlueOpsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new et("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachGlueOpsLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/glueops-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:MM(r.dtoAttachLoadBalancerRequest)},s);return new mt(m,g=>Ns(g))}async attachGlueOpsLoadBalancer(r,s){return await(await this.attachGlueOpsLoadBalancerRaw(r,s)).value()}async attachNodePoolRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling attachNodePool().');if(r.dtoAttachNodePoolRequest==null)throw new et("dtoAttachNodePoolRequest",'Required parameter "dtoAttachNodePoolRequest" was null or undefined when calling attachNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/node-pools";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:DJ(r.dtoAttachNodePoolRequest)},s);return new mt(m,g=>Ns(g))}async attachNodePool(r,s){return await(await this.attachNodePoolRaw(r,s)).value()}async clearClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling clearClusterKubeconfig().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/kubeconfig";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async clearClusterKubeconfig(r,s){return await(await this.clearClusterKubeconfigRaw(r,s)).value()}async createClusterRaw(r,s){if(r.dtoCreateClusterRequest==null)throw new et("dtoCreateClusterRequest",'Required parameter "dtoCreateClusterRequest" was null or undefined when calling createCluster().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"POST",headers:d,query:o,body:eQ(r.dtoCreateClusterRequest)},s);return new mt(m,g=>Ns(g))}async createCluster(r,s){return await(await this.createClusterRaw(r,s)).value()}async deleteClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling deleteCluster().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async deleteCluster(r,s){return await(await this.deleteClusterRaw(r,s)).value()}async detachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachAppsLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/apps-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachAppsLoadBalancer(r,s){return await(await this.detachAppsLoadBalancerRaw(r,s)).value()}async detachBastionServerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachBastionServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/bastion";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachBastionServer(r,s){return await(await this.detachBastionServerRaw(r,s)).value()}async detachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachCaptainDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/captain-domain";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachCaptainDomain(r,s){return await(await this.detachCaptainDomainRaw(r,s)).value()}async detachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachControlPlaneRecordSet().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/control-plane-record-set";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachControlPlaneRecordSet(r,s){return await(await this.detachControlPlaneRecordSetRaw(r,s)).value()}async detachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachGlueOpsLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/glueops-load-balancer";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachGlueOpsLoadBalancer(r,s){return await(await this.detachGlueOpsLoadBalancerRaw(r,s)).value()}async detachNodePoolRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling detachNodePool().');if(r.nodePoolID==null)throw new et("nodePoolID",'Required parameter "nodePoolID" was null or undefined when calling detachNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/node-pools/{nodePoolID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID))),p=p.replace("{nodePoolID}",encodeURIComponent(String(r.nodePoolID)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async detachNodePool(r,s){return await(await this.detachNodePoolRaw(r,s)).value()}async getClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling getCluster().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>Ns(g))}async getCluster(r,s){return await(await this.getClusterRaw(r,s)).value()}async listClustersRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(Ns))}async listClusters(r={},s){return await(await this.listClustersRaw(r,s)).value()}async setClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling setClusterKubeconfig().');if(r.dtoSetKubeconfigRequest==null)throw new et("dtoSetKubeconfigRequest",'Required parameter "dtoSetKubeconfigRequest" was null or undefined when calling setClusterKubeconfig().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}/kubeconfig";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:LQ(r.dtoSetKubeconfigRequest)},s);return new mt(m,g=>Ns(g))}async setClusterKubeconfig(r,s){return await(await this.setClusterKubeconfigRaw(r,s)).value()}async updateClusterRaw(r,s){if(r.clusterID==null)throw new et("clusterID",'Required parameter "clusterID" was null or undefined when calling updateCluster().');if(r.dtoUpdateClusterRequest==null)throw new et("dtoUpdateClusterRequest",'Required parameter "dtoUpdateClusterRequest" was null or undefined when calling updateCluster().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/clusters/{clusterID}";p=p.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:UQ(r.dtoUpdateClusterRequest)},s);return new mt(m,g=>Ns(g))}async updateCluster(r,s){return await(await this.updateClusterRaw(r,s)).value()}}class Iee extends Gs{async createCredentialRaw(r,s){if(r.dtoCreateCredentialRequest==null)throw new et("dtoCreateCredentialRequest",'Required parameter "dtoCreateCredentialRequest" was null or undefined when calling createCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"POST",headers:d,query:o,body:nQ(r.dtoCreateCredentialRequest)},s);return new mt(m,g=>qE(g))}async createCredential(r,s){return await(await this.createCredentialRaw(r,s)).value()}async deleteCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteCredential().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteCredential(r,s){await this.deleteCredentialRaw(r,s)}async getCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getCredential().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>qE(g))}async getCredential(r,s){return await(await this.getCredentialRaw(r,s)).value()}async listCredentialsRaw(r,s){const o={};r.credentialProvider!=null&&(o.credential_provider=r.credentialProvider),r.kind!=null&&(o.kind=r.kind),r.scopeKind!=null&&(o.scope_kind=r.scopeKind);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(qE))}async listCredentials(r={},s){return await(await this.listCredentialsRaw(r,s)).value()}async revealCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling revealCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}/reveal";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new mt(m)}async revealCredential(r,s){return await(await this.revealCredentialRaw(r,s)).value()}async updateCredentialRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateCredential().');if(r.dtoUpdateCredentialRequest==null)throw new et("dtoUpdateCredentialRequest",'Required parameter "dtoUpdateCredentialRequest" was null or undefined when calling updateCredential().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/credentials/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:VQ(r.dtoUpdateCredentialRequest)},s);return new mt(m,g=>qE(g))}async updateCredential(r,s){return await(await this.updateCredentialRaw(r,s)).value()}}class Lee extends Gs{async createDomainRaw(r,s){if(r.dtoCreateDomainRequest==null)throw new et("dtoCreateDomainRequest",'Required parameter "dtoCreateDomainRequest" was null or undefined when calling createDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"POST",headers:d,query:o,body:sQ(r.dtoCreateDomainRequest)},s);return new mt(m,g=>yb(g))}async createDomain(r,s){return await(await this.createDomainRaw(r,s)).value()}async createRecordSetRaw(r,s){if(r.domainId==null)throw new et("domainId",'Required parameter "domainId" was null or undefined when calling createRecordSet().');if(r.dtoCreateRecordSetRequest==null)throw new et("dtoCreateRecordSetRequest",'Required parameter "dtoCreateRecordSetRequest" was null or undefined when calling createRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{domain_id}/records";p=p.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:hQ(r.dtoCreateRecordSetRequest)},s);return new mt(m,g=>pj(g))}async createRecordSet(r,s){return await(await this.createRecordSetRaw(r,s)).value()}async deleteDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteDomain(r,s){await this.deleteDomainRaw(r,s)}async deleteRecordSetRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteRecordSet().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/records/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteRecordSet(r,s){await this.deleteRecordSetRaw(r,s)}async getDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getDomain().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>yb(g))}async getDomain(r,s){return await(await this.getDomainRaw(r,s)).value()}async listDomainsRaw(r,s){const o={};r.domainName!=null&&(o.domain_name=r.domainName),r.status!=null&&(o.status=r.status),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(yb))}async listDomains(r={},s){return await(await this.listDomainsRaw(r,s)).value()}async listRecordSetsRaw(r,s){if(r.domainId==null)throw new et("domainId",'Required parameter "domainId" was null or undefined when calling listRecordSets().');const o={};r.name!=null&&(o.name=r.name),r.type!=null&&(o.type=r.type),r.status!=null&&(o.status=r.status);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{domain_id}/records";p=p.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(pj))}async listRecordSets(r,s){return await(await this.listRecordSetsRaw(r,s)).value()}async updateDomainRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateDomain().');if(r.dtoUpdateDomainRequest==null)throw new et("dtoUpdateDomainRequest",'Required parameter "dtoUpdateDomainRequest" was null or undefined when calling updateDomain().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/domains/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:GQ(r.dtoUpdateDomainRequest)},s);return new mt(m,g=>yb(g))}async updateDomain(r,s){return await(await this.updateDomainRaw(r,s)).value()}async updateRecordSetRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateRecordSet().');if(r.dtoUpdateRecordSetRequest==null)throw new et("dtoUpdateRecordSetRequest",'Required parameter "dtoUpdateRecordSetRequest" was null or undefined when calling updateRecordSet().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/dns/records/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:tee(r.dtoUpdateRecordSetRequest)},s);return new mt(m,g=>pj(g))}async updateRecordSet(r,s){return await(await this.updateRecordSetRaw(r,s)).value()}}class zee extends Gs{async createLabelRaw(r,s){if(r.dtoCreateLabelRequest==null)throw new et("dtoCreateLabelRequest",'Required parameter "dtoCreateLabelRequest" was null or undefined when calling createLabel().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"POST",headers:d,query:o,body:aQ(r.dtoCreateLabelRequest)},s);return new mt(m,g=>sg(g))}async createLabel(r,s){return await(await this.createLabelRaw(r,s)).value()}async deleteLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteLabel(r,s){await this.deleteLabelRaw(r,s)}async getLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>sg(g))}async getLabel(r,s){return await(await this.getLabelRaw(r,s)).value()}async listLabelsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(sg))}async listLabels(r={},s){return await(await this.listLabelsRaw(r,s)).value()}async updateLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateLabel().');if(r.dtoUpdateLabelRequest==null)throw new et("dtoUpdateLabelRequest",'Required parameter "dtoUpdateLabelRequest" was null or undefined when calling updateLabel().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/labels/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:YQ(r.dtoUpdateLabelRequest)},s);return new mt(m,g=>sg(g))}async updateLabel(r,s){return await(await this.updateLabelRaw(r,s)).value()}}class Fee extends Gs{async createLoadBalancerRaw(r,s){if(r.dtoCreateLoadBalancerRequest==null)throw new et("dtoCreateLoadBalancerRequest",'Required parameter "dtoCreateLoadBalancerRequest" was null or undefined when calling createLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"POST",headers:d,query:o,body:lQ(r.dtoCreateLoadBalancerRequest)},s);return new mt(m,g=>ng(g))}async createLoadBalancer(r,s){return await(await this.createLoadBalancerRaw(r,s)).value()}async deleteLoadBalancerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteLoadBalancer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteLoadBalancer(r,s){await this.deleteLoadBalancerRaw(r,s)}async getLoadBalancersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getLoadBalancers().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(ng))}async getLoadBalancers(r,s){return await(await this.getLoadBalancersRaw(r,s)).value()}async listLoadBalancersRaw(r,s){const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(ng))}async listLoadBalancers(r={},s){return await(await this.listLoadBalancersRaw(r,s)).value()}async updateLoadBalancerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateLoadBalancer().');if(r.dtoUpdateLoadBalancerRequest==null)throw new et("dtoUpdateLoadBalancerRequest",'Required parameter "dtoUpdateLoadBalancerRequest" was null or undefined when calling updateLoadBalancer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/load-balancers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:WQ(r.dtoUpdateLoadBalancerRequest)},s);return new mt(m,g=>ng(g))}async updateLoadBalancer(r,s){return await(await this.updateLoadBalancerRaw(r,s)).value()}}class qee extends Gs{async getMeRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/me",method:"GET",headers:o,query:s},r);return new mt(p,m=>mee(m))}async getMe(r){return await(await this.getMeRaw(r)).value()}async updateMeRaw(r,s){if(r.handlersUpdateMeRequest==null)throw new et("handlersUpdateMeRequest",'Required parameter "handlersUpdateMeRequest" was null or undefined when calling updateMe().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me",method:"PATCH",headers:d,query:o,body:kee(r.handlersUpdateMeRequest)},s);return new mt(m,g=>pL(g))}async updateMe(r,s){return await(await this.updateMeRaw(r,s)).value()}}class Bee extends Gs{async createUserAPIKeyRaw(r,s){if(r.handlersCreateUserKeyRequest==null)throw new et("handlersCreateUserKeyRequest",'Required parameter "handlersCreateUserKeyRequest" was null or undefined when calling createUserAPIKey().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me/api-keys",method:"POST",headers:d,query:o,body:cee(r.handlersCreateUserKeyRequest)},s);return new mt(m,g=>FM(g))}async createUserAPIKey(r,s){return await(await this.createUserAPIKeyRaw(r,s)).value()}async deleteUserAPIKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteUserAPIKey().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/me/api-keys/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteUserAPIKey(r,s){await this.deleteUserAPIKeyRaw(r,s)}async listUserAPIKeysRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/me/api-keys",method:"GET",headers:o,query:s},r);return new mt(p,m=>m.map(FM))}async listUserAPIKeys(r){return await(await this.listUserAPIKeysRaw(r)).value()}}class Uee extends Gs{async attachNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolAnnotations().');if(r.dtoAttachAnnotationsRequest==null)throw new et("dtoAttachAnnotationsRequest",'Required parameter "dtoAttachAnnotationsRequest" was null or undefined when calling attachNodePoolAnnotations().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:CJ(r.dtoAttachAnnotationsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async attachNodePoolAnnotations(r,s){return await(await this.attachNodePoolAnnotationsRaw(r,s)).value()}async attachNodePoolLabelsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolLabels().');if(r.dtoAttachLabelsRequest==null)throw new et("dtoAttachLabelsRequest",'Required parameter "dtoAttachLabelsRequest" was null or undefined when calling attachNodePoolLabels().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:_J(r.dtoAttachLabelsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async attachNodePoolLabels(r,s){return await(await this.attachNodePoolLabelsRaw(r,s)).value()}async attachNodePoolServersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolServers().');if(r.dtoAttachServersRequest==null)throw new et("dtoAttachServersRequest",'Required parameter "dtoAttachServersRequest" was null or undefined when calling attachNodePoolServers().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:LJ(r.dtoAttachServersRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async attachNodePoolServers(r,s){return await(await this.attachNodePoolServersRaw(r,s)).value()}async attachNodePoolTaintsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling attachNodePoolTaints().');if(r.dtoAttachTaintsRequest==null)throw new et("dtoAttachTaintsRequest",'Required parameter "dtoAttachTaintsRequest" was null or undefined when calling attachNodePoolTaints().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:FJ(r.dtoAttachTaintsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async attachNodePoolTaints(r,s){return await(await this.attachNodePoolTaintsRaw(r,s)).value()}async createNodePoolRaw(r,s){if(r.dtoCreateNodePoolRequest==null)throw new et("dtoCreateNodePoolRequest",'Required parameter "dtoCreateNodePoolRequest" was null or undefined when calling createNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"POST",headers:d,query:o,body:uQ(r.dtoCreateNodePoolRequest)},s);return new mt(m,g=>vb(g))}async createNodePool(r,s){return await(await this.createNodePoolRaw(r,s)).value()}async deleteNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteNodePool(r,s){await this.deleteNodePoolRaw(r,s)}async detachNodePoolAnnotationRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolAnnotation().');if(r.annotationId==null)throw new et("annotationId",'Required parameter "annotationId" was null or undefined when calling detachNodePoolAnnotation().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations/{annotationId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{annotationId}",encodeURIComponent(String(r.annotationId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async detachNodePoolAnnotation(r,s){return await(await this.detachNodePoolAnnotationRaw(r,s)).value()}async detachNodePoolLabelRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolLabel().');if(r.labelId==null)throw new et("labelId",'Required parameter "labelId" was null or undefined when calling detachNodePoolLabel().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels/{labelId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{labelId}",encodeURIComponent(String(r.labelId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async detachNodePoolLabel(r,s){return await(await this.detachNodePoolLabelRaw(r,s)).value()}async detachNodePoolServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolServer().');if(r.serverId==null)throw new et("serverId",'Required parameter "serverId" was null or undefined when calling detachNodePoolServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers/{serverId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{serverId}",encodeURIComponent(String(r.serverId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async detachNodePoolServer(r,s){return await(await this.detachNodePoolServerRaw(r,s)).value()}async detachNodePoolTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling detachNodePoolTaint().');if(r.taintId==null)throw new et("taintId",'Required parameter "taintId" was null or undefined when calling detachNodePoolTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints/{taintId}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{taintId}",encodeURIComponent(String(r.taintId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async detachNodePoolTaint(r,s){return await(await this.detachNodePoolTaintRaw(r,s)).value()}async getNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getNodePool().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>vb(g))}async getNodePool(r,s){return await(await this.getNodePoolRaw(r,s)).value()}async listNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolAnnotations().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/annotations";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(tg))}async listNodePoolAnnotations(r,s){return await(await this.listNodePoolAnnotationsRaw(r,s)).value()}async listNodePoolLabelsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolLabels().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/labels";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(sg))}async listNodePoolLabels(r,s){return await(await this.listNodePoolLabelsRaw(r,s)).value()}async listNodePoolServersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolServers().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/servers";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(Id))}async listNodePoolServers(r,s){return await(await this.listNodePoolServersRaw(r,s)).value()}async listNodePoolTaintsRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listNodePoolTaints().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}/taints";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(rg))}async listNodePoolTaints(r,s){return await(await this.listNodePoolTaintsRaw(r,s)).value()}async listNodePoolsRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(vb))}async listNodePools(r={},s){return await(await this.listNodePoolsRaw(r,s)).value()}async updateNodePoolRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateNodePool().');if(r.dtoUpdateNodePoolRequest==null)throw new et("dtoUpdateNodePoolRequest",'Required parameter "dtoUpdateNodePoolRequest" was null or undefined when calling updateNodePool().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/node-pools/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:QQ(r.dtoUpdateNodePoolRequest)},s);return new mt(m,g=>vb(g))}async updateNodePool(r,s){return await(await this.updateNodePoolRaw(r,s)).value()}}class Kee extends Gs{async addOrUpdateMemberRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling addOrUpdateMember().');if(r.handlersMemberUpsertReq==null)throw new et("handlersMemberUpsertReq",'Required parameter "handlersMemberUpsertReq" was null or undefined when calling addOrUpdateMember().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:vee(r.handlersMemberUpsertReq)},s);return new mt(m,g=>zM(g))}async addOrUpdateMember(r,s){return await(await this.addOrUpdateMemberRaw(r,s)).value()}async createOrgRaw(r,s){if(r.handlersOrgCreateReq==null)throw new et("handlersOrgCreateReq",'Required parameter "handlersOrgCreateReq" was null or undefined when calling createOrg().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/orgs",method:"POST",headers:d,query:o,body:bee(r.handlersOrgCreateReq)},s);return new mt(m,g=>xb(g))}async createOrg(r,s){return await(await this.createOrgRaw(r,s)).value()}async createOrgKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling createOrgKey().');if(r.handlersOrgKeyCreateReq==null)throw new et("handlersOrgKeyCreateReq",'Required parameter "handlersOrgKeyCreateReq" was null or undefined when calling createOrgKey().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:See(r.handlersOrgKeyCreateReq)},s);return new mt(m,g=>jee(g))}async createOrgKey(r,s){return await(await this.createOrgKeyRaw(r,s)).value()}async deleteOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteOrg().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteOrg(r,s){await this.deleteOrgRaw(r,s)}async deleteOrgKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteOrgKey().');if(r.keyId==null)throw new et("keyId",'Required parameter "keyId" was null or undefined when calling deleteOrgKey().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys/{key_id}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{key_id}",encodeURIComponent(String(r.keyId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteOrgKey(r,s){await this.deleteOrgKeyRaw(r,s)}async getOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getOrg().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>xb(g))}async getOrg(r,s){return await(await this.getOrgRaw(r,s)).value()}async listMembersRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listMembers().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(zM))}async listMembers(r,s){return await(await this.listMembersRaw(r,s)).value()}async listMyOrgsRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const p=await this.request({path:"/orgs",method:"GET",headers:o,query:s},r);return new mt(p,m=>m.map(xb))}async listMyOrgs(r){return await(await this.listMyOrgsRaw(r)).value()}async listOrgKeysRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling listOrgKeys().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/api-keys";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(_ee))}async listOrgKeys(r,s){return await(await this.listOrgKeysRaw(r,s)).value()}async removeMemberRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling removeMember().');if(r.userId==null)throw new et("userId",'Required parameter "userId" was null or undefined when calling removeMember().');const o={},d={};this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}/members/{user_id}";p=p.replace("{id}",encodeURIComponent(String(r.id))),p=p.replace("{user_id}",encodeURIComponent(String(r.userId)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async removeMember(r,s){await this.removeMemberRaw(r,s)}async updateOrgRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateOrg().');if(r.handlersOrgUpdateReq==null)throw new et("handlersOrgUpdateReq",'Required parameter "handlersOrgUpdateReq" was null or undefined when calling updateOrg().');const o={},d={};d["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/orgs/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:Aee(r.handlersOrgUpdateReq)},s);return new mt(m,g=>xb(g))}async updateOrg(r,s){return await(await this.updateOrgRaw(r,s)).value()}}class Vee extends Gs{async createServerRaw(r,s){if(r.dtoCreateServerRequest==null)throw new et("dtoCreateServerRequest",'Required parameter "dtoCreateServerRequest" was null or undefined when calling createServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"POST",headers:d,query:o,body:gQ(r.dtoCreateServerRequest)},s);return new mt(m,g=>Id(g))}async createServer(r,s){return await(await this.createServerRaw(r,s)).value()}async deleteServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteServer(r,s){await this.deleteServerRaw(r,s)}async getServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getServer().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>Id(g))}async getServer(r,s){return await(await this.getServerRaw(r,s)).value()}async listServersRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.role!=null&&(o.role=r.role);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(Id))}async listServers(r={},s){return await(await this.listServersRaw(r,s)).value()}async resetServerHostKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling resetServerHostKey().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}/reset-hostkey";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"POST",headers:d,query:o,body:r.body},s);return new mt(m,g=>Id(g))}async resetServerHostKey(r,s){return await(await this.resetServerHostKeyRaw(r,s)).value()}async updateServerRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateServer().');if(r.dtoUpdateServerRequest==null)throw new et("dtoUpdateServerRequest",'Required parameter "dtoUpdateServerRequest" was null or undefined when calling updateServer().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/servers/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:ree(r.dtoUpdateServerRequest)},s);return new mt(m,g=>Id(g))}async updateServer(r,s){return await(await this.updateServerRaw(r,s)).value()}}class Hee extends Gs{async createSSHKeyRaw(r,s){if(r.dtoCreateSSHRequest==null)throw new et("dtoCreateSSHRequest",'Required parameter "dtoCreateSSHRequest" was null or undefined when calling createSSHKey().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"POST",headers:d,query:o,body:fQ(r.dtoCreateSSHRequest)},s);return new mt(m,g=>IM(g))}async createSSHKey(r,s){return await(await this.createSSHKeyRaw(r,s)).value()}async deleteSSHKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteSSHKey().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteSSHKey(r,s){await this.deleteSSHKeyRaw(r,s)}async downloadSSHKeyRaw(r,s){if(r.xOrgID==null)throw new et("xOrgID",'Required parameter "xOrgID" was null or undefined when calling downloadSSHKey().');if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling downloadSSHKey().');if(r.part==null)throw new et("part",'Required parameter "part" was null or undefined when calling downloadSSHKey().');const o={};r.part!=null&&(o.part=r.part);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}/download";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new mt(m):new ec(m)}async downloadSSHKey(r,s){return await(await this.downloadSSHKeyRaw(r,s)).value()}async getSSHKeyRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getSSHKey().');const o={};r.reveal!=null&&(o.reveal=r.reveal);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/ssh/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>oee(g))}async getSSHKey(r,s){return await(await this.getSSHKeyRaw(r,s)).value()}async listPublicSshKeysRaw(r,s){const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(IM))}async listPublicSshKeys(r={},s){return await(await this.listPublicSshKeysRaw(r,s)).value()}}class Gee extends Gs{async createTaintRaw(r,s){if(r.dtoCreateTaintRequest==null)throw new et("dtoCreateTaintRequest",'Required parameter "dtoCreateTaintRequest" was null or undefined when calling createTaint().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"POST",headers:d,query:o,body:vQ(r.dtoCreateTaintRequest)},s);return new mt(m,g=>rg(g))}async createTaint(r,s){return await(await this.createTaintRaw(r,s)).value()}async deleteTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling deleteTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"DELETE",headers:d,query:o},s);return new Ii(m)}async deleteTaint(r,s){await this.deleteTaintRaw(r,s)}async getTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling getTaint().');const o={},d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"GET",headers:d,query:o},s);return new mt(m,g=>rg(g))}async getTaint(r,s){return await(await this.getTaintRaw(r,s)).value()}async listTaintsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const d={};r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"GET",headers:d,query:o},s);return new mt(m,g=>g.map(rg))}async listTaints(r={},s){return await(await this.listTaintsRaw(r,s)).value()}async updateTaintRaw(r,s){if(r.id==null)throw new et("id",'Required parameter "id" was null or undefined when calling updateTaint().');if(r.dtoUpdateTaintRequest==null)throw new et("dtoUpdateTaintRequest",'Required parameter "dtoUpdateTaintRequest" was null or undefined when calling updateTaint().');const o={},d={};d["Content-Type"]="application/json",r.xOrgID!=null&&(d["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(d["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(d["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(d.Authorization=await this.configuration.apiKey("Authorization"));let p="/taints/{id}";p=p.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:p,method:"PATCH",headers:d,query:o,body:iee(r.dtoUpdateTaintRequest)},s);return new mt(m,g=>rg(g))}async updateTaint(r,s){return await(await this.updateTaintRaw(r,s)).value()}}const B_="/api/v1";function Xee(){return new cL({basePath:B_,accessToken:async()=>Ks.getAccessToken()??"",middleware:[{async pre(e){const r=new Headers(e.init?.headers??{});e.init?.body!=null&&!(e.init.body instanceof FormData)&&!(e.init.body instanceof Blob)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");const o=Ks.getAccessToken();o&&r.set("Authorization",`Bearer ${o}`);const d=Qo.get();return d&&r.set("X-Org-ID",d),{...e,init:{...e.init,headers:r}}},async post(e){return e.response}}]})}function Ui(e){return new e(Xee())}function Yee(){return Ui(Pee)}function Zee(){return Ui(qee)}function Wee(){return Ui(Bee)}function gC(){return Ui(Kee)}function Jee(){return Ui(Hee)}function Qee(){return Ui(Vee)}function ete(){return Ui(Gee)}function tte(){return Ui(zee)}function nte(){return Ui(Nee)}function rte(){return Ui(Dee)}function ste(){return Ui(Uee)}function ite(){return Ui(Iee)}function ate(){return Ui(Lee)}function ote(){return Ui(Fee)}function lte(){return Ui(Mee)}let BE=null;async function cte(){const e=Ks.get();if(!e?.refresh_token)return!1;try{const r=await fetch(`${B_}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token})});if(!r.ok)return!1;const s=await r.json();return Ks.set(s),!0}catch{return!1}}async function qM(){return BE||(BE=cte().finally(()=>{BE=null})),BE}function ute(e){return e?.status===401||e?.cause?.status===401||e?.response?.status===401||e instanceof Response&&e.status===401}async function ut(e){Ks.willExpireSoon?.(30)&&await qM();try{return await e()}catch(r){if(!ute(r)||!await qM())throw r;return await e()}}const BM=Zee(),$R=Wee(),yp={getMe:()=>ut(async()=>await BM.getMe()),updateMe:e=>ut(async()=>await BM.updateMe({handlersUpdateMeRequest:e})),listKeys:()=>ut(async()=>await $R.listUserAPIKeys()),createKey:e=>ut(async()=>await $R.createUserAPIKey({handlersCreateUserKeyRequest:e})),deleteKey:e=>ut(async()=>(await $R.deleteUserAPIKey({id:e}),!0))},dte={footer:async()=>{const e=await fetch("/api/v1/version",{cache:"no-store"});if(!e.ok)throw new Error("failed to fetch version");return await e.json()}};function UM(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Li(...e){return r=>{let s=!1;const o=e.map(d=>{const p=UM(d,r);return!s&&typeof p=="function"&&(s=!0),p});if(s)return()=>{for(let d=0;d<o.length;d++){const p=o[d];typeof p=="function"?p():UM(e[d],null)}}}}function zn(...e){return R.useCallback(Li(...e),e)}var hte=Symbol.for("react.lazy"),Tj=T_[" use ".trim().toString()];function pte(e){return typeof e=="object"&&e!==null&&"then"in e}function fL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===hte&&"_payload"in e&&pte(e._payload)}function Qb(e){const r=fte(e),s=R.forwardRef((o,d)=>{let{children:p,...m}=o;fL(p)&&typeof Tj=="function"&&(p=Tj(p._payload));const g=R.Children.toArray(p),b=g.find(gte);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}var Cg=Qb("Slot");function fte(e){const r=R.forwardRef((s,o)=>{let{children:d,...p}=s;if(fL(d)&&typeof Tj=="function"&&(d=Tj(d._payload)),R.isValidElement(d)){const m=vte(d),g=yte(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var mte=Symbol("radix.slottable");function gte(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mte}function yte(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function vte(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function mL(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(r=0;r<d;r++)e[r]&&(s=mL(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function gL(){for(var e,r,s=0,o="",d=arguments.length;s<d;s++)(e=arguments[s])&&(r=mL(e))&&(o&&(o+=" "),o+=r);return o}const KM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,VM=gL,U_=(e,r)=>s=>{var o;if(r?.variants==null)return VM(e,s?.class,s?.className);const{variants:d,defaultVariants:p}=r,m=Object.keys(d).map(S=>{const j=s?.[S],A=p?.[S];if(j===null)return null;const k=KM(j)||KM(A);return d[S][k]}),g=s&&Object.entries(s).reduce((S,j)=>{let[A,k]=j;return k===void 0||(S[A]=k),S},{}),b=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((S,j)=>{let{class:A,className:k,...T}=j;return Object.entries(T).every(M=>{let[I,q]=M;return Array.isArray(q)?q.includes({...p,...g}[I]):{...p,...g}[I]===q})?[...S,A,k]:S},[]);return VM(e,m,b,s?.class,s?.className)},xte=(e,r)=>{const s=new Array(e.length+r.length);for(let o=0;o<e.length;o++)s[o]=e[o];for(let o=0;o<r.length;o++)s[e.length+o]=r[o];return s},bte=(e,r)=>({classGroupId:e,validator:r}),yL=(e=new Map,r=null,s)=>({nextPart:e,validators:r,classGroupId:s}),_j="-",HM=[],wte="arbitrary..",Ste=e=>{const r=jte(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Ete(m);const g=m.split(_j),b=g[0]===""&&g.length>1?1:0;return vL(g,b,r)},getConflictingClassGroupIds:(m,g)=>{if(g){const b=o[m],S=s[m];return b?S?xte(S,b):b:S||HM}return s[m]||HM}}},vL=(e,r,s)=>{if(e.length-r===0)return s.classGroupId;const d=e[r],p=s.nextPart.get(d);if(p){const S=vL(e,r+1,p);if(S)return S}const m=s.validators;if(m===null)return;const g=r===0?e.join(_j):e.slice(r).join(_j),b=m.length;for(let S=0;S<b;S++){const j=m[S];if(j.validator(g))return j.classGroupId}},Ete=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),s=r.indexOf(":"),o=r.slice(0,s);return o?wte+o:void 0})(),jte=e=>{const{theme:r,classGroups:s}=e;return Cte(s,r)},Cte=(e,r)=>{const s=yL();for(const o in e){const d=e[o];K_(d,s,o,r)}return s},K_=(e,r,s,o)=>{const d=e.length;for(let p=0;p<d;p++){const m=e[p];Ate(m,r,s,o)}},Ate=(e,r,s,o)=>{if(typeof e=="string"){Ote(e,r,s);return}if(typeof e=="function"){kte(e,r,s,o);return}Rte(e,r,s,o)},Ote=(e,r,s)=>{const o=e===""?r:xL(r,e);o.classGroupId=s},kte=(e,r,s,o)=>{if(Tte(e)){K_(e(o),r,s,o);return}r.validators===null&&(r.validators=[]),r.validators.push(bte(s,e))},Rte=(e,r,s,o)=>{const d=Object.entries(e),p=d.length;for(let m=0;m<p;m++){const[g,b]=d[m];K_(b,xL(r,g),s,o)}},xL=(e,r)=>{let s=e;const o=r.split(_j),d=o.length;for(let p=0;p<d;p++){const m=o[p];let g=s.nextPart.get(m);g||(g=yL(),s.nextPart.set(m,g)),s=g}return s},Tte=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_te=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),o=Object.create(null);const d=(p,m)=>{s[p]=m,r++,r>e&&(r=0,o=s,s=Object.create(null))};return{get(p){let m=s[p];if(m!==void 0)return m;if((m=o[p])!==void 0)return d(p,m),m},set(p,m){p in s?s[p]=m:d(p,m)}}},NT="!",GM=":",$te=[],XM=(e,r,s,o,d)=>({modifiers:e,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:o,isExternal:d}),Nte=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=d=>{const p=[];let m=0,g=0,b=0,S;const j=d.length;for(let I=0;I<j;I++){const q=d[I];if(m===0&&g===0){if(q===GM){p.push(d.slice(b,I)),b=I+1;continue}if(q==="/"){S=I;continue}}q==="["?m++:q==="]"?m--:q==="("?g++:q===")"&&g--}const A=p.length===0?d:d.slice(b);let k=A,T=!1;A.endsWith(NT)?(k=A.slice(0,-1),T=!0):A.startsWith(NT)&&(k=A.slice(1),T=!0);const M=S&&S>b?S-b:void 0;return XM(p,T,k,M)};if(r){const d=r+GM,p=o;o=m=>m.startsWith(d)?p(m.slice(d.length)):XM($te,!1,m,void 0,!0)}if(s){const d=o;o=p=>s({className:p,parseClassName:d})}return o},Dte=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((s,o)=>{r.set(s,1e6+o)}),s=>{const o=[];let d=[];for(let p=0;p<s.length;p++){const m=s[p],g=m[0]==="[",b=r.has(m);g||b?(d.length>0&&(d.sort(),o.push(...d),d=[]),o.push(m)):d.push(m)}return d.length>0&&(d.sort(),o.push(...d)),o}},Pte=e=>({cache:_te(e.cacheSize),parseClassName:Nte(e),sortModifiers:Dte(e),...Ste(e)}),Mte=/\s+/,Ite=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:p}=r,m=[],g=e.trim().split(Mte);let b="";for(let S=g.length-1;S>=0;S-=1){const j=g[S],{isExternal:A,modifiers:k,hasImportantModifier:T,baseClassName:M,maybePostfixModifierPosition:I}=s(j);if(A){b=j+(b.length>0?" "+b:b);continue}let q=!!I,G=o(q?M.substring(0,I):M);if(!G){if(!q){b=j+(b.length>0?" "+b:b);continue}if(G=o(M),!G){b=j+(b.length>0?" "+b:b);continue}q=!1}const K=k.length===0?"":k.length===1?k[0]:p(k).join(":"),X=T?K+NT:K,L=X+G;if(m.indexOf(L)>-1)continue;m.push(L);const ee=d(G,q);for(let oe=0;oe<ee.length;++oe){const Q=ee[oe];m.push(X+Q)}b=j+(b.length>0?" "+b:b)}return b},Lte=(...e)=>{let r=0,s,o,d="";for(;r<e.length;)(s=e[r++])&&(o=bL(s))&&(d&&(d+=" "),d+=o);return d},bL=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=bL(e[o]))&&(s&&(s+=" "),s+=r);return s},zte=(e,...r)=>{let s,o,d,p;const m=b=>{const S=r.reduce((j,A)=>A(j),e());return s=Pte(S),o=s.cache.get,d=s.cache.set,p=g,g(b)},g=b=>{const S=o(b);if(S)return S;const j=Ite(b,s);return d(b,j),j};return p=m,(...b)=>p(Lte(...b))},Fte=[],bs=e=>{const r=s=>s[e]||Fte;return r.isThemeGetter=!0,r},wL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,SL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qte=/^\d+\/\d+$/,Bte=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ute=/\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$/,Kte=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vte=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hte=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Km=e=>qte.test(e),jn=e=>!!e&&!Number.isNaN(Number(e)),Nd=e=>!!e&&Number.isInteger(Number(e)),NR=e=>e.endsWith("%")&&jn(e.slice(0,-1)),lu=e=>Bte.test(e),Gte=()=>!0,Xte=e=>Ute.test(e)&&!Kte.test(e),EL=()=>!1,Yte=e=>Vte.test(e),Zte=e=>Hte.test(e),Wte=e=>!Mt(e)&&!It(e),Jte=e=>Ag(e,AL,EL),Mt=e=>wL.test(e),fp=e=>Ag(e,OL,Xte),DR=e=>Ag(e,rne,jn),YM=e=>Ag(e,jL,EL),Qte=e=>Ag(e,CL,Zte),UE=e=>Ag(e,kL,Yte),It=e=>SL.test(e),sb=e=>Og(e,OL),ene=e=>Og(e,sne),ZM=e=>Og(e,jL),tne=e=>Og(e,AL),nne=e=>Og(e,CL),KE=e=>Og(e,kL,!0),Ag=(e,r,s)=>{const o=wL.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},Og=(e,r,s=!1)=>{const o=SL.exec(e);return o?o[1]?r(o[1]):s:!1},jL=e=>e==="position"||e==="percentage",CL=e=>e==="image"||e==="url",AL=e=>e==="length"||e==="size"||e==="bg-size",OL=e=>e==="length",rne=e=>e==="number",sne=e=>e==="family-name",kL=e=>e==="shadow",ine=()=>{const e=bs("color"),r=bs("font"),s=bs("text"),o=bs("font-weight"),d=bs("tracking"),p=bs("leading"),m=bs("breakpoint"),g=bs("container"),b=bs("spacing"),S=bs("radius"),j=bs("shadow"),A=bs("inset-shadow"),k=bs("text-shadow"),T=bs("drop-shadow"),M=bs("blur"),I=bs("perspective"),q=bs("aspect"),G=bs("ease"),K=bs("animate"),X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ee=()=>[...L(),It,Mt],oe=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],ne=()=>[It,Mt,b],de=()=>[Km,"full","auto",...ne()],je=()=>[Nd,"none","subgrid",It,Mt],ve=()=>["auto",{span:["full",Nd,It,Mt]},Nd,It,Mt],le=()=>[Nd,"auto",It,Mt],be=()=>["auto","min","max","fr",It,Mt],Ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ke=()=>["start","end","center","stretch","center-safe","end-safe"],ce=()=>["auto",...ne()],re=()=>[Km,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...ne()],ue=()=>[e,It,Mt],_e=()=>[...L(),ZM,YM,{position:[It,Mt]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],He=()=>["auto","cover","contain",tne,Jte,{size:[It,Mt]}],Oe=()=>[NR,sb,fp],ke=()=>["","none","full",S,It,Mt],Ve=()=>["",jn,sb,fp],ie=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[jn,NR,ZM,YM],tt=()=>["","none",M,It,Mt],yt=()=>["none",jn,It,Mt],Ot=()=>["none",jn,It,Mt],Ft=()=>[jn,It,Mt],kt=()=>[Km,"full",...ne()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lu],breakpoint:[lu],color:[Gte],container:[lu],"drop-shadow":[lu],ease:["in","out","in-out"],font:[Wte],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lu],shadow:[lu],spacing:["px",jn],text:[lu],"text-shadow":[lu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Km,Mt,It,q]}],container:["container"],columns:[{columns:[jn,Mt,It,g]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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"],sr:["sr-only","not-sr-only"],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:ee()}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:de()}],"inset-x":[{"inset-x":de()}],"inset-y":[{"inset-y":de()}],start:[{start:de()}],end:[{end:de()}],top:[{top:de()}],right:[{right:de()}],bottom:[{bottom:de()}],left:[{left:de()}],visibility:["visible","invisible","collapse"],z:[{z:[Nd,"auto",It,Mt]}],basis:[{basis:[Km,"full","auto",g,...ne()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[jn,Km,"auto","initial","none",Mt]}],grow:[{grow:["",jn,It,Mt]}],shrink:[{shrink:["",jn,It,Mt]}],order:[{order:[Nd,"first","last","none",It,Mt]}],"grid-cols":[{"grid-cols":je()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":je()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:ne()}],"gap-x":[{"gap-x":ne()}],"gap-y":[{"gap-y":ne()}],"justify-content":[{justify:[...Ce(),"normal"]}],"justify-items":[{"justify-items":[...Ke(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ke()]}],"align-content":[{content:["normal",...Ce()]}],"align-items":[{items:[...Ke(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ke(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ce()}],"place-items":[{"place-items":[...Ke(),"baseline"]}],"place-self":[{"place-self":["auto",...Ke()]}],p:[{p:ne()}],px:[{px:ne()}],py:[{py:ne()}],ps:[{ps:ne()}],pe:[{pe:ne()}],pt:[{pt:ne()}],pr:[{pr:ne()}],pb:[{pb:ne()}],pl:[{pl:ne()}],m:[{m:ce()}],mx:[{mx:ce()}],my:[{my:ce()}],ms:[{ms:ce()}],me:[{me:ce()}],mt:[{mt:ce()}],mr:[{mr:ce()}],mb:[{mb:ce()}],ml:[{ml:ce()}],"space-x":[{"space-x":ne()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":ne()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[g,"screen",...re()]}],"min-w":[{"min-w":[g,"screen","none",...re()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",s,sb,fp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,It,DR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",NR,Mt]}],"font-family":[{font:[ene,Mt,r]}],"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:[d,It,Mt]}],"line-clamp":[{"line-clamp":[jn,"none",It,DR]}],leading:[{leading:[p,...ne()]}],"list-image":[{"list-image":["none",It,Mt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",It,Mt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ue()}],"text-color":[{text:ue()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[jn,"from-font","auto",It,fp]}],"text-decoration-color":[{decoration:ue()}],"underline-offset":[{"underline-offset":[jn,"auto",It,Mt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ne()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",It,Mt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",It,Mt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_e()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:He()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nd,It,Mt],radial:["",It,Mt],conic:[Nd,It,Mt]},nne,Qte]}],"bg-color":[{bg:ue()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:ue()}],"gradient-via":[{via:ue()}],"gradient-to":[{to:ue()}],rounded:[{rounded:ke()}],"rounded-s":[{"rounded-s":ke()}],"rounded-e":[{"rounded-e":ke()}],"rounded-t":[{"rounded-t":ke()}],"rounded-r":[{"rounded-r":ke()}],"rounded-b":[{"rounded-b":ke()}],"rounded-l":[{"rounded-l":ke()}],"rounded-ss":[{"rounded-ss":ke()}],"rounded-se":[{"rounded-se":ke()}],"rounded-ee":[{"rounded-ee":ke()}],"rounded-es":[{"rounded-es":ke()}],"rounded-tl":[{"rounded-tl":ke()}],"rounded-tr":[{"rounded-tr":ke()}],"rounded-br":[{"rounded-br":ke()}],"rounded-bl":[{"rounded-bl":ke()}],"border-w":[{border:Ve()}],"border-w-x":[{"border-x":Ve()}],"border-w-y":[{"border-y":Ve()}],"border-w-s":[{"border-s":Ve()}],"border-w-e":[{"border-e":Ve()}],"border-w-t":[{"border-t":Ve()}],"border-w-r":[{"border-r":Ve()}],"border-w-b":[{"border-b":Ve()}],"border-w-l":[{"border-l":Ve()}],"divide-x":[{"divide-x":Ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:ue()}],"border-color-x":[{"border-x":ue()}],"border-color-y":[{"border-y":ue()}],"border-color-s":[{"border-s":ue()}],"border-color-e":[{"border-e":ue()}],"border-color-t":[{"border-t":ue()}],"border-color-r":[{"border-r":ue()}],"border-color-b":[{"border-b":ue()}],"border-color-l":[{"border-l":ue()}],"divide-color":[{divide:ue()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[jn,It,Mt]}],"outline-w":[{outline:["",jn,sb,fp]}],"outline-color":[{outline:ue()}],shadow:[{shadow:["","none",j,KE,UE]}],"shadow-color":[{shadow:ue()}],"inset-shadow":[{"inset-shadow":["none",A,KE,UE]}],"inset-shadow-color":[{"inset-shadow":ue()}],"ring-w":[{ring:Ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ue()}],"ring-offset-w":[{"ring-offset":[jn,fp]}],"ring-offset-color":[{"ring-offset":ue()}],"inset-ring-w":[{"inset-ring":Ve()}],"inset-ring-color":[{"inset-ring":ue()}],"text-shadow":[{"text-shadow":["none",k,KE,UE]}],"text-shadow-color":[{"text-shadow":ue()}],opacity:[{opacity:[jn,It,Mt]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[jn]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":ue()}],"mask-image-linear-to-color":[{"mask-linear-to":ue()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":ue()}],"mask-image-t-to-color":[{"mask-t-to":ue()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":ue()}],"mask-image-r-to-color":[{"mask-r-to":ue()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":ue()}],"mask-image-b-to-color":[{"mask-b-to":ue()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":ue()}],"mask-image-l-to-color":[{"mask-l-to":ue()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":ue()}],"mask-image-x-to-color":[{"mask-x-to":ue()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":ue()}],"mask-image-y-to-color":[{"mask-y-to":ue()}],"mask-image-radial":[{"mask-radial":[It,Mt]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":ue()}],"mask-image-radial-to-color":[{"mask-radial-to":ue()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[jn]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":ue()}],"mask-image-conic-to-color":[{"mask-conic-to":ue()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_e()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:He()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",It,Mt]}],filter:[{filter:["","none",It,Mt]}],blur:[{blur:tt()}],brightness:[{brightness:[jn,It,Mt]}],contrast:[{contrast:[jn,It,Mt]}],"drop-shadow":[{"drop-shadow":["","none",T,KE,UE]}],"drop-shadow-color":[{"drop-shadow":ue()}],grayscale:[{grayscale:["",jn,It,Mt]}],"hue-rotate":[{"hue-rotate":[jn,It,Mt]}],invert:[{invert:["",jn,It,Mt]}],saturate:[{saturate:[jn,It,Mt]}],sepia:[{sepia:["",jn,It,Mt]}],"backdrop-filter":[{"backdrop-filter":["","none",It,Mt]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[jn,It,Mt]}],"backdrop-contrast":[{"backdrop-contrast":[jn,It,Mt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",jn,It,Mt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[jn,It,Mt]}],"backdrop-invert":[{"backdrop-invert":["",jn,It,Mt]}],"backdrop-opacity":[{"backdrop-opacity":[jn,It,Mt]}],"backdrop-saturate":[{"backdrop-saturate":[jn,It,Mt]}],"backdrop-sepia":[{"backdrop-sepia":["",jn,It,Mt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":ne()}],"border-spacing-x":[{"border-spacing-x":ne()}],"border-spacing-y":[{"border-spacing-y":ne()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",It,Mt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[jn,"initial",It,Mt]}],ease:[{ease:["linear","initial",G,It,Mt]}],delay:[{delay:[jn,It,Mt]}],animate:[{animate:["none",K,It,Mt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,It,Mt]}],"perspective-origin":[{"perspective-origin":ee()}],rotate:[{rotate:yt()}],"rotate-x":[{"rotate-x":yt()}],"rotate-y":[{"rotate-y":yt()}],"rotate-z":[{"rotate-z":yt()}],scale:[{scale:Ot()}],"scale-x":[{"scale-x":Ot()}],"scale-y":[{"scale-y":Ot()}],"scale-z":[{"scale-z":Ot()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[It,Mt,"","none","gpu","cpu"]}],"transform-origin":[{origin:ee()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:kt()}],"translate-x":[{"translate-x":kt()}],"translate-y":[{"translate-y":kt()}],"translate-z":[{"translate-z":kt()}],"translate-none":["translate-none"],accent:[{accent:ue()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ue()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",It,Mt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ne()}],"scroll-mx":[{"scroll-mx":ne()}],"scroll-my":[{"scroll-my":ne()}],"scroll-ms":[{"scroll-ms":ne()}],"scroll-me":[{"scroll-me":ne()}],"scroll-mt":[{"scroll-mt":ne()}],"scroll-mr":[{"scroll-mr":ne()}],"scroll-mb":[{"scroll-mb":ne()}],"scroll-ml":[{"scroll-ml":ne()}],"scroll-p":[{"scroll-p":ne()}],"scroll-px":[{"scroll-px":ne()}],"scroll-py":[{"scroll-py":ne()}],"scroll-ps":[{"scroll-ps":ne()}],"scroll-pe":[{"scroll-pe":ne()}],"scroll-pt":[{"scroll-pt":ne()}],"scroll-pr":[{"scroll-pr":ne()}],"scroll-pb":[{"scroll-pb":ne()}],"scroll-pl":[{"scroll-pl":ne()}],"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",It,Mt]}],fill:[{fill:["none",...ue()]}],"stroke-w":[{stroke:[jn,sb,fp,DR]}],stroke:[{stroke:["none",...ue()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ane=zte(ine);function ft(...e){return ane(gL(e))}function el(e,r=24){return!e||e.length<=r*2+3?e:`${e.slice(0,r)}…${e.slice(-r)}`}const one=U_("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ns({className:e,variant:r,asChild:s=!1,...o}){const d=s?Cg:"span";return u.jsx(d,{"data-slot":"badge",className:ft(one({variant:r}),e),...o})}const V_=U_("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Fe({className:e,variant:r,size:s,asChild:o=!1,...d}){const p=o?Cg:"button";return u.jsx(p,{"data-slot":"button",className:ft(V_({variant:r,size:s,className:e})),...d})}var lne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cne=lne.reduce((e,r)=>{const s=Qb(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),une="Separator",WM="horizontal",dne=["horizontal","vertical"],RL=R.forwardRef((e,r)=>{const{decorative:s,orientation:o=WM,...d}=e,p=hne(o)?o:WM,g=s?{role:"none"}:{"aria-orientation":p==="vertical"?p:void 0,role:"separator"};return u.jsx(cne.div,{"data-orientation":p,...g,...d,ref:r})});RL.displayName=une;function hne(e){return dne.includes(e)}var pne=RL;function bb({className:e,orientation:r="horizontal",decorative:s=!0,...o}){return u.jsx(pne,{"data-slot":"separator",decorative:s,orientation:r,className:ft("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function $t(e,r,{checkForDefaultPrevented:s=!0}={}){return function(d){if(e?.(d),s===!1||!d.defaultPrevented)return r?.(d)}}function fne(e,r){const s=R.createContext(r),o=p=>{const{children:m,...g}=p,b=R.useMemo(()=>g,Object.values(g));return u.jsx(s.Provider,{value:b,children:m})};o.displayName=e+"Provider";function d(p){const m=R.useContext(s);if(m)return m;if(r!==void 0)return r;throw new Error(`\`${p}\` must be used within \`${e}\``)}return[o,d]}function al(e,r=[]){let s=[];function o(p,m){const g=R.createContext(m),b=s.length;s=[...s,m];const S=A=>{const{scope:k,children:T,...M}=A,I=k?.[e]?.[b]||g,q=R.useMemo(()=>M,Object.values(M));return u.jsx(I.Provider,{value:q,children:T})};S.displayName=p+"Provider";function j(A,k){const T=k?.[e]?.[b]||g,M=R.useContext(T);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${p}\``)}return[S,j]}const d=()=>{const p=s.map(m=>R.createContext(m));return function(g){const b=g?.[e]||p;return R.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return d.scopeName=e,[o,mne(d,...r)]}function mne(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const m=o.reduce((g,{useScope:b,scopeName:S})=>{const A=b(p)[`__scope${S}`];return{...g,...A}},{});return R.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}function gne(e){const r=yne(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(xne);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function yne(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=wne(d),g=bne(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var vne=Symbol("radix.slottable");function xne(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vne}function bne(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function wne(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var Sne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cn=Sne.reduce((e,r)=>{const s=gne(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});function TL(e,r){e&&fC.flushSync(()=>e.dispatchEvent(r))}function tl(e){const r=R.useRef(e);return R.useEffect(()=>{r.current=e}),R.useMemo(()=>(...s)=>r.current?.(...s),[])}function Ene(e,r=globalThis?.document){const s=tl(e);R.useEffect(()=>{const o=d=>{d.key==="Escape"&&s(d)};return r.addEventListener("keydown",o,{capture:!0}),()=>r.removeEventListener("keydown",o,{capture:!0})},[s,r])}var jne="DismissableLayer",DT="dismissableLayer.update",Cne="dismissableLayer.pointerDownOutside",Ane="dismissableLayer.focusOutside",JM,_L=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kg=R.forwardRef((e,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:g,...b}=e,S=R.useContext(_L),[j,A]=R.useState(null),k=j?.ownerDocument??globalThis?.document,[,T]=R.useState({}),M=zn(r,Q=>A(Q)),I=Array.from(S.layers),[q]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),G=I.indexOf(q),K=j?I.indexOf(j):-1,X=S.layersWithOutsidePointerEventsDisabled.size>0,L=K>=G,ee=Rne(Q=>{const ne=Q.target,de=[...S.branches].some(je=>je.contains(ne));!L||de||(d?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k),oe=Tne(Q=>{const ne=Q.target;[...S.branches].some(je=>je.contains(ne))||(p?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k);return Ene(Q=>{K===S.layers.size-1&&(o?.(Q),!Q.defaultPrevented&&g&&(Q.preventDefault(),g()))},k),R.useEffect(()=>{if(j)return s&&(S.layersWithOutsidePointerEventsDisabled.size===0&&(JM=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(j)),S.layers.add(j),QM(),()=>{s&&S.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=JM)}},[j,k,s,S]),R.useEffect(()=>()=>{j&&(S.layers.delete(j),S.layersWithOutsidePointerEventsDisabled.delete(j),QM())},[j,S]),R.useEffect(()=>{const Q=()=>T({});return document.addEventListener(DT,Q),()=>document.removeEventListener(DT,Q)},[]),u.jsx(Cn.div,{...b,ref:M,style:{pointerEvents:X?L?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,oe.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,oe.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,ee.onPointerDownCapture)})});kg.displayName=jne;var One="DismissableLayerBranch",kne=R.forwardRef((e,r)=>{const s=R.useContext(_L),o=R.useRef(null),d=zn(r,o);return R.useEffect(()=>{const p=o.current;if(p)return s.branches.add(p),()=>{s.branches.delete(p)}},[s.branches]),u.jsx(Cn.div,{...e,ref:d})});kne.displayName=One;function Rne(e,r=globalThis?.document){const s=tl(e),o=R.useRef(!1),d=R.useRef(()=>{});return R.useEffect(()=>{const p=g=>{if(g.target&&!o.current){let b=function(){$L(Cne,s,S,{discrete:!0})};const S={originalEvent:g};g.pointerType==="touch"?(r.removeEventListener("click",d.current),d.current=b,r.addEventListener("click",d.current,{once:!0})):b()}else r.removeEventListener("click",d.current);o.current=!1},m=window.setTimeout(()=>{r.addEventListener("pointerdown",p)},0);return()=>{window.clearTimeout(m),r.removeEventListener("pointerdown",p),r.removeEventListener("click",d.current)}},[r,s]),{onPointerDownCapture:()=>o.current=!0}}function Tne(e,r=globalThis?.document){const s=tl(e),o=R.useRef(!1);return R.useEffect(()=>{const d=p=>{p.target&&!o.current&&$L(Ane,s,{originalEvent:p},{discrete:!1})};return r.addEventListener("focusin",d),()=>r.removeEventListener("focusin",d)},[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function QM(){const e=new CustomEvent(DT);document.dispatchEvent(e)}function $L(e,r,s,{discrete:o}){const d=s.originalEvent.target,p=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});r&&d.addEventListener(e,r,{once:!0}),o?TL(d,p):d.dispatchEvent(p)}var As=globalThis?.document?R.useLayoutEffect:()=>{},_ne=T_[" useId ".trim().toString()]||(()=>{}),$ne=0;function Vs(e){const[r,s]=R.useState(_ne());return As(()=>{s(o=>o??String($ne++))},[e]),r?`radix-${r}`:""}const Nne=["top","right","bottom","left"],zd=Math.min,_a=Math.max,$j=Math.round,VE=Math.floor,sc=e=>({x:e,y:e}),Dne={left:"right",right:"left",bottom:"top",top:"bottom"},Pne={start:"end",end:"start"};function PT(e,r,s){return _a(e,zd(r,s))}function fu(e,r){return typeof e=="function"?e(r):e}function mu(e){return e.split("-")[0]}function Rg(e){return e.split("-")[1]}function H_(e){return e==="x"?"y":"x"}function G_(e){return e==="y"?"height":"width"}const Mne=new Set(["top","bottom"]);function rc(e){return Mne.has(mu(e))?"y":"x"}function X_(e){return H_(rc(e))}function Ine(e,r,s){s===void 0&&(s=!1);const o=Rg(e),d=X_(e),p=G_(d);let m=d==="x"?o===(s?"end":"start")?"right":"left":o==="start"?"bottom":"top";return r.reference[p]>r.floating[p]&&(m=Nj(m)),[m,Nj(m)]}function Lne(e){const r=Nj(e);return[MT(e),r,MT(r)]}function MT(e){return e.replace(/start|end/g,r=>Pne[r])}const eI=["left","right"],tI=["right","left"],zne=["top","bottom"],Fne=["bottom","top"];function qne(e,r,s){switch(e){case"top":case"bottom":return s?r?tI:eI:r?eI:tI;case"left":case"right":return r?zne:Fne;default:return[]}}function Bne(e,r,s,o){const d=Rg(e);let p=qne(mu(e),s==="start",o);return d&&(p=p.map(m=>m+"-"+d),r&&(p=p.concat(p.map(MT)))),p}function Nj(e){return e.replace(/left|right|bottom|top/g,r=>Dne[r])}function Une(e){return{top:0,right:0,bottom:0,left:0,...e}}function NL(e){return typeof e!="number"?Une(e):{top:e,right:e,bottom:e,left:e}}function Dj(e){const{x:r,y:s,width:o,height:d}=e;return{width:o,height:d,top:s,left:r,right:r+o,bottom:s+d,x:r,y:s}}function nI(e,r,s){let{reference:o,floating:d}=e;const p=rc(r),m=X_(r),g=G_(m),b=mu(r),S=p==="y",j=o.x+o.width/2-d.width/2,A=o.y+o.height/2-d.height/2,k=o[g]/2-d[g]/2;let T;switch(b){case"top":T={x:j,y:o.y-d.height};break;case"bottom":T={x:j,y:o.y+o.height};break;case"right":T={x:o.x+o.width,y:A};break;case"left":T={x:o.x-d.width,y:A};break;default:T={x:o.x,y:o.y}}switch(Rg(r)){case"start":T[m]-=k*(s&&S?-1:1);break;case"end":T[m]+=k*(s&&S?-1:1);break}return T}const Kne=async(e,r,s)=>{const{placement:o="bottom",strategy:d="absolute",middleware:p=[],platform:m}=s,g=p.filter(Boolean),b=await(m.isRTL==null?void 0:m.isRTL(r));let S=await m.getElementRects({reference:e,floating:r,strategy:d}),{x:j,y:A}=nI(S,o,b),k=o,T={},M=0;for(let I=0;I<g.length;I++){const{name:q,fn:G}=g[I],{x:K,y:X,data:L,reset:ee}=await G({x:j,y:A,initialPlacement:o,placement:k,strategy:d,middlewareData:T,rects:S,platform:m,elements:{reference:e,floating:r}});j=K??j,A=X??A,T={...T,[q]:{...T[q],...L}},ee&&M<=50&&(M++,typeof ee=="object"&&(ee.placement&&(k=ee.placement),ee.rects&&(S=ee.rects===!0?await m.getElementRects({reference:e,floating:r,strategy:d}):ee.rects),{x:j,y:A}=nI(S,k,b)),I=-1)}return{x:j,y:A,placement:k,strategy:d,middlewareData:T}};async function Lb(e,r){var s;r===void 0&&(r={});const{x:o,y:d,platform:p,rects:m,elements:g,strategy:b}=e,{boundary:S="clippingAncestors",rootBoundary:j="viewport",elementContext:A="floating",altBoundary:k=!1,padding:T=0}=fu(r,e),M=NL(T),q=g[k?A==="floating"?"reference":"floating":A],G=Dj(await p.getClippingRect({element:(s=await(p.isElement==null?void 0:p.isElement(q)))==null||s?q:q.contextElement||await(p.getDocumentElement==null?void 0:p.getDocumentElement(g.floating)),boundary:S,rootBoundary:j,strategy:b})),K=A==="floating"?{x:o,y:d,width:m.floating.width,height:m.floating.height}:m.reference,X=await(p.getOffsetParent==null?void 0:p.getOffsetParent(g.floating)),L=await(p.isElement==null?void 0:p.isElement(X))?await(p.getScale==null?void 0:p.getScale(X))||{x:1,y:1}:{x:1,y:1},ee=Dj(p.convertOffsetParentRelativeRectToViewportRelativeRect?await p.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:K,offsetParent:X,strategy:b}):K);return{top:(G.top-ee.top+M.top)/L.y,bottom:(ee.bottom-G.bottom+M.bottom)/L.y,left:(G.left-ee.left+M.left)/L.x,right:(ee.right-G.right+M.right)/L.x}}const Vne=e=>({name:"arrow",options:e,async fn(r){const{x:s,y:o,placement:d,rects:p,platform:m,elements:g,middlewareData:b}=r,{element:S,padding:j=0}=fu(e,r)||{};if(S==null)return{};const A=NL(j),k={x:s,y:o},T=X_(d),M=G_(T),I=await m.getDimensions(S),q=T==="y",G=q?"top":"left",K=q?"bottom":"right",X=q?"clientHeight":"clientWidth",L=p.reference[M]+p.reference[T]-k[T]-p.floating[M],ee=k[T]-p.reference[T],oe=await(m.getOffsetParent==null?void 0:m.getOffsetParent(S));let Q=oe?oe[X]:0;(!Q||!await(m.isElement==null?void 0:m.isElement(oe)))&&(Q=g.floating[X]||p.floating[M]);const ne=L/2-ee/2,de=Q/2-I[M]/2-1,je=zd(A[G],de),ve=zd(A[K],de),le=je,be=Q-I[M]-ve,Ce=Q/2-I[M]/2+ne,Ke=PT(le,Ce,be),ce=!b.arrow&&Rg(d)!=null&&Ce!==Ke&&p.reference[M]/2-(Ce<le?je:ve)-I[M]/2<0,re=ce?Ce<le?Ce-le:Ce-be:0;return{[T]:k[T]+re,data:{[T]:Ke,centerOffset:Ce-Ke-re,...ce&&{alignmentOffset:re}},reset:ce}}}),Hne=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var s,o;const{placement:d,middlewareData:p,rects:m,initialPlacement:g,platform:b,elements:S}=r,{mainAxis:j=!0,crossAxis:A=!0,fallbackPlacements:k,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:I=!0,...q}=fu(e,r);if((s=p.arrow)!=null&&s.alignmentOffset)return{};const G=mu(d),K=rc(g),X=mu(g)===g,L=await(b.isRTL==null?void 0:b.isRTL(S.floating)),ee=k||(X||!I?[Nj(g)]:Lne(g)),oe=M!=="none";!k&&oe&&ee.push(...Bne(g,I,M,L));const Q=[g,...ee],ne=await Lb(r,q),de=[];let je=((o=p.flip)==null?void 0:o.overflows)||[];if(j&&de.push(ne[G]),A){const Ce=Ine(d,m,L);de.push(ne[Ce[0]],ne[Ce[1]])}if(je=[...je,{placement:d,overflows:de}],!de.every(Ce=>Ce<=0)){var ve,le;const Ce=(((ve=p.flip)==null?void 0:ve.index)||0)+1,Ke=Q[Ce];if(Ke&&(!(A==="alignment"?K!==rc(Ke):!1)||je.every(ue=>rc(ue.placement)===K?ue.overflows[0]>0:!0)))return{data:{index:Ce,overflows:je},reset:{placement:Ke}};let ce=(le=je.filter(re=>re.overflows[0]<=0).sort((re,ue)=>re.overflows[1]-ue.overflows[1])[0])==null?void 0:le.placement;if(!ce)switch(T){case"bestFit":{var be;const re=(be=je.filter(ue=>{if(oe){const _e=rc(ue.placement);return _e===K||_e==="y"}return!0}).map(ue=>[ue.placement,ue.overflows.filter(_e=>_e>0).reduce((_e,fe)=>_e+fe,0)]).sort((ue,_e)=>ue[1]-_e[1])[0])==null?void 0:be[0];re&&(ce=re);break}case"initialPlacement":ce=g;break}if(d!==ce)return{reset:{placement:ce}}}return{}}}};function rI(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function sI(e){return Nne.some(r=>e[r]>=0)}const Gne=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:s}=r,{strategy:o="referenceHidden",...d}=fu(e,r);switch(o){case"referenceHidden":{const p=await Lb(r,{...d,elementContext:"reference"}),m=rI(p,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:sI(m)}}}case"escaped":{const p=await Lb(r,{...d,altBoundary:!0}),m=rI(p,s.floating);return{data:{escapedOffsets:m,escaped:sI(m)}}}default:return{}}}}},DL=new Set(["left","top"]);async function Xne(e,r){const{placement:s,platform:o,elements:d}=e,p=await(o.isRTL==null?void 0:o.isRTL(d.floating)),m=mu(s),g=Rg(s),b=rc(s)==="y",S=DL.has(m)?-1:1,j=p&&b?-1:1,A=fu(r,e);let{mainAxis:k,crossAxis:T,alignmentAxis:M}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return g&&typeof M=="number"&&(T=g==="end"?M*-1:M),b?{x:T*j,y:k*S}:{x:k*S,y:T*j}}const Yne=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var s,o;const{x:d,y:p,placement:m,middlewareData:g}=r,b=await Xne(r,e);return m===((s=g.offset)==null?void 0:s.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:d+b.x,y:p+b.y,data:{...b,placement:m}}}}},Zne=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:s,y:o,placement:d}=r,{mainAxis:p=!0,crossAxis:m=!1,limiter:g={fn:q=>{let{x:G,y:K}=q;return{x:G,y:K}}},...b}=fu(e,r),S={x:s,y:o},j=await Lb(r,b),A=rc(mu(d)),k=H_(A);let T=S[k],M=S[A];if(p){const q=k==="y"?"top":"left",G=k==="y"?"bottom":"right",K=T+j[q],X=T-j[G];T=PT(K,T,X)}if(m){const q=A==="y"?"top":"left",G=A==="y"?"bottom":"right",K=M+j[q],X=M-j[G];M=PT(K,M,X)}const I=g.fn({...r,[k]:T,[A]:M});return{...I,data:{x:I.x-s,y:I.y-o,enabled:{[k]:p,[A]:m}}}}}},Wne=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:s,y:o,placement:d,rects:p,middlewareData:m}=r,{offset:g=0,mainAxis:b=!0,crossAxis:S=!0}=fu(e,r),j={x:s,y:o},A=rc(d),k=H_(A);let T=j[k],M=j[A];const I=fu(g,r),q=typeof I=="number"?{mainAxis:I,crossAxis:0}:{mainAxis:0,crossAxis:0,...I};if(b){const X=k==="y"?"height":"width",L=p.reference[k]-p.floating[X]+q.mainAxis,ee=p.reference[k]+p.reference[X]-q.mainAxis;T<L?T=L:T>ee&&(T=ee)}if(S){var G,K;const X=k==="y"?"width":"height",L=DL.has(mu(d)),ee=p.reference[A]-p.floating[X]+(L&&((G=m.offset)==null?void 0:G[A])||0)+(L?0:q.crossAxis),oe=p.reference[A]+p.reference[X]+(L?0:((K=m.offset)==null?void 0:K[A])||0)-(L?q.crossAxis:0);M<ee?M=ee:M>oe&&(M=oe)}return{[k]:T,[A]:M}}}},Jne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var s,o;const{placement:d,rects:p,platform:m,elements:g}=r,{apply:b=()=>{},...S}=fu(e,r),j=await Lb(r,S),A=mu(d),k=Rg(d),T=rc(d)==="y",{width:M,height:I}=p.floating;let q,G;A==="top"||A==="bottom"?(q=A,G=k===(await(m.isRTL==null?void 0:m.isRTL(g.floating))?"start":"end")?"left":"right"):(G=A,q=k==="end"?"top":"bottom");const K=I-j.top-j.bottom,X=M-j.left-j.right,L=zd(I-j[q],K),ee=zd(M-j[G],X),oe=!r.middlewareData.shift;let Q=L,ne=ee;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(ne=X),(o=r.middlewareData.shift)!=null&&o.enabled.y&&(Q=K),oe&&!k){const je=_a(j.left,0),ve=_a(j.right,0),le=_a(j.top,0),be=_a(j.bottom,0);T?ne=M-2*(je!==0||ve!==0?je+ve:_a(j.left,j.right)):Q=I-2*(le!==0||be!==0?le+be:_a(j.top,j.bottom))}await b({...r,availableWidth:ne,availableHeight:Q});const de=await m.getDimensions(g.floating);return M!==de.width||I!==de.height?{reset:{rects:!0}}:{}}}};function yC(){return typeof window<"u"}function Tg(e){return PL(e)?(e.nodeName||"").toLowerCase():"#document"}function Na(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function lc(e){var r;return(r=(PL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function PL(e){return yC()?e instanceof Node||e instanceof Na(e).Node:!1}function nl(e){return yC()?e instanceof Element||e instanceof Na(e).Element:!1}function oc(e){return yC()?e instanceof HTMLElement||e instanceof Na(e).HTMLElement:!1}function iI(e){return!yC()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Na(e).ShadowRoot}const Qne=new Set(["inline","contents"]);function ew(e){const{overflow:r,overflowX:s,overflowY:o,display:d}=rl(e);return/auto|scroll|overlay|hidden|clip/.test(r+o+s)&&!Qne.has(d)}const ere=new Set(["table","td","th"]);function tre(e){return ere.has(Tg(e))}const nre=[":popover-open",":modal"];function vC(e){return nre.some(r=>{try{return e.matches(r)}catch{return!1}})}const rre=["transform","translate","scale","rotate","perspective"],sre=["transform","translate","scale","rotate","perspective","filter"],ire=["paint","layout","strict","content"];function Y_(e){const r=Z_(),s=nl(e)?rl(e):e;return rre.some(o=>s[o]?s[o]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||sre.some(o=>(s.willChange||"").includes(o))||ire.some(o=>(s.contain||"").includes(o))}function are(e){let r=Fd(e);for(;oc(r)&&!vg(r);){if(Y_(r))return r;if(vC(r))return null;r=Fd(r)}return null}function Z_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ore=new Set(["html","body","#document"]);function vg(e){return ore.has(Tg(e))}function rl(e){return Na(e).getComputedStyle(e)}function xC(e){return nl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fd(e){if(Tg(e)==="html")return e;const r=e.assignedSlot||e.parentNode||iI(e)&&e.host||lc(e);return iI(r)?r.host:r}function ML(e){const r=Fd(e);return vg(r)?e.ownerDocument?e.ownerDocument.body:e.body:oc(r)&&ew(r)?r:ML(r)}function zb(e,r,s){var o;r===void 0&&(r=[]),s===void 0&&(s=!0);const d=ML(e),p=d===((o=e.ownerDocument)==null?void 0:o.body),m=Na(d);if(p){const g=IT(m);return r.concat(m,m.visualViewport||[],ew(d)?d:[],g&&s?zb(g):[])}return r.concat(d,zb(d,[],s))}function IT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IL(e){const r=rl(e);let s=parseFloat(r.width)||0,o=parseFloat(r.height)||0;const d=oc(e),p=d?e.offsetWidth:s,m=d?e.offsetHeight:o,g=$j(s)!==p||$j(o)!==m;return g&&(s=p,o=m),{width:s,height:o,$:g}}function W_(e){return nl(e)?e:e.contextElement}function pg(e){const r=W_(e);if(!oc(r))return sc(1);const s=r.getBoundingClientRect(),{width:o,height:d,$:p}=IL(r);let m=(p?$j(s.width):s.width)/o,g=(p?$j(s.height):s.height)/d;return(!m||!Number.isFinite(m))&&(m=1),(!g||!Number.isFinite(g))&&(g=1),{x:m,y:g}}const lre=sc(0);function LL(e){const r=Na(e);return!Z_()||!r.visualViewport?lre:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function cre(e,r,s){return r===void 0&&(r=!1),!s||r&&s!==Na(e)?!1:r}function Op(e,r,s,o){r===void 0&&(r=!1),s===void 0&&(s=!1);const d=e.getBoundingClientRect(),p=W_(e);let m=sc(1);r&&(o?nl(o)&&(m=pg(o)):m=pg(e));const g=cre(p,s,o)?LL(p):sc(0);let b=(d.left+g.x)/m.x,S=(d.top+g.y)/m.y,j=d.width/m.x,A=d.height/m.y;if(p){const k=Na(p),T=o&&nl(o)?Na(o):o;let M=k,I=IT(M);for(;I&&o&&T!==M;){const q=pg(I),G=I.getBoundingClientRect(),K=rl(I),X=G.left+(I.clientLeft+parseFloat(K.paddingLeft))*q.x,L=G.top+(I.clientTop+parseFloat(K.paddingTop))*q.y;b*=q.x,S*=q.y,j*=q.x,A*=q.y,b+=X,S+=L,M=Na(I),I=IT(M)}}return Dj({width:j,height:A,x:b,y:S})}function bC(e,r){const s=xC(e).scrollLeft;return r?r.left+s:Op(lc(e)).left+s}function zL(e,r){const s=e.getBoundingClientRect(),o=s.left+r.scrollLeft-bC(e,s),d=s.top+r.scrollTop;return{x:o,y:d}}function ure(e){let{elements:r,rect:s,offsetParent:o,strategy:d}=e;const p=d==="fixed",m=lc(o),g=r?vC(r.floating):!1;if(o===m||g&&p)return s;let b={scrollLeft:0,scrollTop:0},S=sc(1);const j=sc(0),A=oc(o);if((A||!A&&!p)&&((Tg(o)!=="body"||ew(m))&&(b=xC(o)),oc(o))){const T=Op(o);S=pg(o),j.x=T.x+o.clientLeft,j.y=T.y+o.clientTop}const k=m&&!A&&!p?zL(m,b):sc(0);return{width:s.width*S.x,height:s.height*S.y,x:s.x*S.x-b.scrollLeft*S.x+j.x+k.x,y:s.y*S.y-b.scrollTop*S.y+j.y+k.y}}function dre(e){return Array.from(e.getClientRects())}function hre(e){const r=lc(e),s=xC(e),o=e.ownerDocument.body,d=_a(r.scrollWidth,r.clientWidth,o.scrollWidth,o.clientWidth),p=_a(r.scrollHeight,r.clientHeight,o.scrollHeight,o.clientHeight);let m=-s.scrollLeft+bC(e);const g=-s.scrollTop;return rl(o).direction==="rtl"&&(m+=_a(r.clientWidth,o.clientWidth)-d),{width:d,height:p,x:m,y:g}}const aI=25;function pre(e,r){const s=Na(e),o=lc(e),d=s.visualViewport;let p=o.clientWidth,m=o.clientHeight,g=0,b=0;if(d){p=d.width,m=d.height;const j=Z_();(!j||j&&r==="fixed")&&(g=d.offsetLeft,b=d.offsetTop)}const S=bC(o);if(S<=0){const j=o.ownerDocument,A=j.body,k=getComputedStyle(A),T=j.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,M=Math.abs(o.clientWidth-A.clientWidth-T);M<=aI&&(p-=M)}else S<=aI&&(p+=S);return{width:p,height:m,x:g,y:b}}const fre=new Set(["absolute","fixed"]);function mre(e,r){const s=Op(e,!0,r==="fixed"),o=s.top+e.clientTop,d=s.left+e.clientLeft,p=oc(e)?pg(e):sc(1),m=e.clientWidth*p.x,g=e.clientHeight*p.y,b=d*p.x,S=o*p.y;return{width:m,height:g,x:b,y:S}}function oI(e,r,s){let o;if(r==="viewport")o=pre(e,s);else if(r==="document")o=hre(lc(e));else if(nl(r))o=mre(r,s);else{const d=LL(e);o={x:r.x-d.x,y:r.y-d.y,width:r.width,height:r.height}}return Dj(o)}function FL(e,r){const s=Fd(e);return s===r||!nl(s)||vg(s)?!1:rl(s).position==="fixed"||FL(s,r)}function gre(e,r){const s=r.get(e);if(s)return s;let o=zb(e,[],!1).filter(g=>nl(g)&&Tg(g)!=="body"),d=null;const p=rl(e).position==="fixed";let m=p?Fd(e):e;for(;nl(m)&&!vg(m);){const g=rl(m),b=Y_(m);!b&&g.position==="fixed"&&(d=null),(p?!b&&!d:!b&&g.position==="static"&&!!d&&fre.has(d.position)||ew(m)&&!b&&FL(e,m))?o=o.filter(j=>j!==m):d=g,m=Fd(m)}return r.set(e,o),o}function yre(e){let{element:r,boundary:s,rootBoundary:o,strategy:d}=e;const m=[...s==="clippingAncestors"?vC(r)?[]:gre(r,this._c):[].concat(s),o],g=m[0],b=m.reduce((S,j)=>{const A=oI(r,j,d);return S.top=_a(A.top,S.top),S.right=zd(A.right,S.right),S.bottom=zd(A.bottom,S.bottom),S.left=_a(A.left,S.left),S},oI(r,g,d));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function vre(e){const{width:r,height:s}=IL(e);return{width:r,height:s}}function xre(e,r,s){const o=oc(r),d=lc(r),p=s==="fixed",m=Op(e,!0,p,r);let g={scrollLeft:0,scrollTop:0};const b=sc(0);function S(){b.x=bC(d)}if(o||!o&&!p)if((Tg(r)!=="body"||ew(d))&&(g=xC(r)),o){const T=Op(r,!0,p,r);b.x=T.x+r.clientLeft,b.y=T.y+r.clientTop}else d&&S();p&&!o&&d&&S();const j=d&&!o&&!p?zL(d,g):sc(0),A=m.left+g.scrollLeft-b.x-j.x,k=m.top+g.scrollTop-b.y-j.y;return{x:A,y:k,width:m.width,height:m.height}}function PR(e){return rl(e).position==="static"}function lI(e,r){if(!oc(e)||rl(e).position==="fixed")return null;if(r)return r(e);let s=e.offsetParent;return lc(e)===s&&(s=s.ownerDocument.body),s}function qL(e,r){const s=Na(e);if(vC(e))return s;if(!oc(e)){let d=Fd(e);for(;d&&!vg(d);){if(nl(d)&&!PR(d))return d;d=Fd(d)}return s}let o=lI(e,r);for(;o&&tre(o)&&PR(o);)o=lI(o,r);return o&&vg(o)&&PR(o)&&!Y_(o)?s:o||are(e)||s}const bre=async function(e){const r=this.getOffsetParent||qL,s=this.getDimensions,o=await s(e.floating);return{reference:xre(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function wre(e){return rl(e).direction==="rtl"}const Sre={convertOffsetParentRelativeRectToViewportRelativeRect:ure,getDocumentElement:lc,getClippingRect:yre,getOffsetParent:qL,getElementRects:bre,getClientRects:dre,getDimensions:vre,getScale:pg,isElement:nl,isRTL:wre};function BL(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Ere(e,r){let s=null,o;const d=lc(e);function p(){var g;clearTimeout(o),(g=s)==null||g.disconnect(),s=null}function m(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),p();const S=e.getBoundingClientRect(),{left:j,top:A,width:k,height:T}=S;if(g||r(),!k||!T)return;const M=VE(A),I=VE(d.clientWidth-(j+k)),q=VE(d.clientHeight-(A+T)),G=VE(j),X={rootMargin:-M+"px "+-I+"px "+-q+"px "+-G+"px",threshold:_a(0,zd(1,b))||1};let L=!0;function ee(oe){const Q=oe[0].intersectionRatio;if(Q!==b){if(!L)return m();Q?m(!1,Q):o=setTimeout(()=>{m(!1,1e-7)},1e3)}Q===1&&!BL(S,e.getBoundingClientRect())&&m(),L=!1}try{s=new IntersectionObserver(ee,{...X,root:d.ownerDocument})}catch{s=new IntersectionObserver(ee,X)}s.observe(e)}return m(!0),p}function jre(e,r,s,o){o===void 0&&(o={});const{ancestorScroll:d=!0,ancestorResize:p=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,S=W_(e),j=d||p?[...S?zb(S):[],...zb(r)]:[];j.forEach(G=>{d&&G.addEventListener("scroll",s,{passive:!0}),p&&G.addEventListener("resize",s)});const A=S&&g?Ere(S,s):null;let k=-1,T=null;m&&(T=new ResizeObserver(G=>{let[K]=G;K&&K.target===S&&T&&(T.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var X;(X=T)==null||X.observe(r)})),s()}),S&&!b&&T.observe(S),T.observe(r));let M,I=b?Op(e):null;b&&q();function q(){const G=Op(e);I&&!BL(I,G)&&s(),I=G,M=requestAnimationFrame(q)}return s(),()=>{var G;j.forEach(K=>{d&&K.removeEventListener("scroll",s),p&&K.removeEventListener("resize",s)}),A?.(),(G=T)==null||G.disconnect(),T=null,b&&cancelAnimationFrame(M)}}const Cre=Yne,Are=Zne,Ore=Hne,kre=Jne,Rre=Gne,cI=Vne,Tre=Wne,_re=(e,r,s)=>{const o=new Map,d={platform:Sre,...s},p={...d.platform,_c:o};return Kne(e,r,{...d,platform:p})};var $re=typeof document<"u",Nre=function(){},mj=$re?R.useLayoutEffect:Nre;function Pj(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let s,o,d;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==r.length)return!1;for(o=s;o--!==0;)if(!Pj(e[o],r[o]))return!1;return!0}if(d=Object.keys(e),s=d.length,s!==Object.keys(r).length)return!1;for(o=s;o--!==0;)if(!{}.hasOwnProperty.call(r,d[o]))return!1;for(o=s;o--!==0;){const p=d[o];if(!(p==="_owner"&&e.$$typeof)&&!Pj(e[p],r[p]))return!1}return!0}return e!==e&&r!==r}function UL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uI(e,r){const s=UL(e);return Math.round(r*s)/s}function MR(e){const r=R.useRef(e);return mj(()=>{r.current=e}),r}function Dre(e){e===void 0&&(e={});const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:d,elements:{reference:p,floating:m}={},transform:g=!0,whileElementsMounted:b,open:S}=e,[j,A]=R.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[k,T]=R.useState(o);Pj(k,o)||T(o);const[M,I]=R.useState(null),[q,G]=R.useState(null),K=R.useCallback(ue=>{ue!==oe.current&&(oe.current=ue,I(ue))},[]),X=R.useCallback(ue=>{ue!==Q.current&&(Q.current=ue,G(ue))},[]),L=p||M,ee=m||q,oe=R.useRef(null),Q=R.useRef(null),ne=R.useRef(j),de=b!=null,je=MR(b),ve=MR(d),le=MR(S),be=R.useCallback(()=>{if(!oe.current||!Q.current)return;const ue={placement:r,strategy:s,middleware:k};ve.current&&(ue.platform=ve.current),_re(oe.current,Q.current,ue).then(_e=>{const fe={..._e,isPositioned:le.current!==!1};Ce.current&&!Pj(ne.current,fe)&&(ne.current=fe,fC.flushSync(()=>{A(fe)}))})},[k,r,s,ve,le]);mj(()=>{S===!1&&ne.current.isPositioned&&(ne.current.isPositioned=!1,A(ue=>({...ue,isPositioned:!1})))},[S]);const Ce=R.useRef(!1);mj(()=>(Ce.current=!0,()=>{Ce.current=!1}),[]),mj(()=>{if(L&&(oe.current=L),ee&&(Q.current=ee),L&&ee){if(je.current)return je.current(L,ee,be);be()}},[L,ee,be,je,de]);const Ke=R.useMemo(()=>({reference:oe,floating:Q,setReference:K,setFloating:X}),[K,X]),ce=R.useMemo(()=>({reference:L,floating:ee}),[L,ee]),re=R.useMemo(()=>{const ue={position:s,left:0,top:0};if(!ce.floating)return ue;const _e=uI(ce.floating,j.x),fe=uI(ce.floating,j.y);return g?{...ue,transform:"translate("+_e+"px, "+fe+"px)",...UL(ce.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:_e,top:fe}},[s,g,ce.floating,j.x,j.y]);return R.useMemo(()=>({...j,update:be,refs:Ke,elements:ce,floatingStyles:re}),[j,be,Ke,ce,re])}const Pre=e=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:o,padding:d}=typeof e=="function"?e(s):e;return o&&r(o)?o.current!=null?cI({element:o.current,padding:d}).fn(s):{}:o?cI({element:o,padding:d}).fn(s):{}}}},Mre=(e,r)=>({...Cre(e),options:[e,r]}),Ire=(e,r)=>({...Are(e),options:[e,r]}),Lre=(e,r)=>({...Tre(e),options:[e,r]}),zre=(e,r)=>({...Ore(e),options:[e,r]}),Fre=(e,r)=>({...kre(e),options:[e,r]}),qre=(e,r)=>({...Rre(e),options:[e,r]}),Bre=(e,r)=>({...Pre(e),options:[e,r]});var Ure="Arrow",KL=R.forwardRef((e,r)=>{const{children:s,width:o=10,height:d=5,...p}=e;return u.jsx(Cn.svg,{...p,ref:r,width:o,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});KL.displayName=Ure;var Kre=KL;function VL(e){const[r,s]=R.useState(void 0);return As(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const p=d[0];let m,g;if("borderBoxSize"in p){const b=p.borderBoxSize,S=Array.isArray(b)?b[0]:b;m=S.inlineSize,g=S.blockSize}else m=e.offsetWidth,g=e.offsetHeight;s({width:m,height:g})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else s(void 0)},[e]),r}var J_="Popper",[HL,Hd]=al(J_),[Vre,GL]=HL(J_),XL=e=>{const{__scopePopper:r,children:s}=e,[o,d]=R.useState(null);return u.jsx(Vre,{scope:r,anchor:o,onAnchorChange:d,children:s})};XL.displayName=J_;var YL="PopperAnchor",ZL=R.forwardRef((e,r)=>{const{__scopePopper:s,virtualRef:o,...d}=e,p=GL(YL,s),m=R.useRef(null),g=zn(r,m),b=R.useRef(null);return R.useEffect(()=>{const S=b.current;b.current=o?.current||m.current,S!==b.current&&p.onAnchorChange(b.current)}),o?null:u.jsx(Cn.div,{...d,ref:g})});ZL.displayName=YL;var Q_="PopperContent",[Hre,Gre]=HL(Q_),WL=R.forwardRef((e,r)=>{const{__scopePopper:s,side:o="bottom",sideOffset:d=0,align:p="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:S=[],collisionPadding:j=0,sticky:A="partial",hideWhenDetached:k=!1,updatePositionStrategy:T="optimized",onPlaced:M,...I}=e,q=GL(Q_,s),[G,K]=R.useState(null),X=zn(r,Le=>K(Le)),[L,ee]=R.useState(null),oe=VL(L),Q=oe?.width??0,ne=oe?.height??0,de=o+(p!=="center"?"-"+p:""),je=typeof j=="number"?j:{top:0,right:0,bottom:0,left:0,...j},ve=Array.isArray(S)?S:[S],le=ve.length>0,be={padding:je,boundary:ve.filter(Yre),altBoundary:le},{refs:Ce,floatingStyles:Ke,placement:ce,isPositioned:re,middlewareData:ue}=Dre({strategy:"fixed",placement:de,whileElementsMounted:(...Le)=>jre(...Le,{animationFrame:T==="always"}),elements:{reference:q.anchor},middleware:[Mre({mainAxis:d+ne,alignmentAxis:m}),b&&Ire({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?Lre():void 0,...be}),b&&zre({...be}),Fre({...be,apply:({elements:Le,rects:tt,availableWidth:yt,availableHeight:Ot})=>{const{width:Ft,height:kt}=tt.reference,Jt=Le.floating.style;Jt.setProperty("--radix-popper-available-width",`${yt}px`),Jt.setProperty("--radix-popper-available-height",`${Ot}px`),Jt.setProperty("--radix-popper-anchor-width",`${Ft}px`),Jt.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),L&&Bre({element:L,padding:g}),Zre({arrowWidth:Q,arrowHeight:ne}),k&&qre({strategy:"referenceHidden",...be})]}),[_e,fe]=ez(ce),He=tl(M);As(()=>{re&&He?.()},[re,He]);const Oe=ue.arrow?.x,ke=ue.arrow?.y,Ve=ue.arrow?.centerOffset!==0,[ie,De]=R.useState();return As(()=>{G&&De(window.getComputedStyle(G).zIndex)},[G]),u.jsx("div",{ref:Ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ke,transform:re?Ke.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[ue.transformOrigin?.x,ue.transformOrigin?.y].join(" "),...ue.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Hre,{scope:s,placedSide:_e,onArrowChange:ee,arrowX:Oe,arrowY:ke,shouldHideArrow:Ve,children:u.jsx(Cn.div,{"data-side":_e,"data-align":fe,...I,ref:X,style:{...I.style,animation:re?void 0:"none"}})})})});WL.displayName=Q_;var JL="PopperArrow",Xre={top:"bottom",right:"left",bottom:"top",left:"right"},QL=R.forwardRef(function(r,s){const{__scopePopper:o,...d}=r,p=Gre(JL,o),m=Xre[p.placedSide];return u.jsx("span",{ref:p.onArrowChange,style:{position:"absolute",left:p.arrowX,top:p.arrowY,[m]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[p.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[p.placedSide],visibility:p.shouldHideArrow?"hidden":void 0},children:u.jsx(Kre,{...d,ref:s,style:{...d.style,display:"block"}})})});QL.displayName=JL;function Yre(e){return e!==null}var Zre=e=>({name:"transformOrigin",options:e,fn(r){const{placement:s,rects:o,middlewareData:d}=r,m=d.arrow?.centerOffset!==0,g=m?0:e.arrowWidth,b=m?0:e.arrowHeight,[S,j]=ez(s),A={start:"0%",center:"50%",end:"100%"}[j],k=(d.arrow?.x??0)+g/2,T=(d.arrow?.y??0)+b/2;let M="",I="";return S==="bottom"?(M=m?A:`${k}px`,I=`${-b}px`):S==="top"?(M=m?A:`${k}px`,I=`${o.floating.height+b}px`):S==="right"?(M=`${-b}px`,I=m?A:`${T}px`):S==="left"&&(M=`${o.floating.width+b}px`,I=m?A:`${T}px`),{data:{x:M,y:I}}}});function ez(e){const[r,s="center"]=e.split("-");return[r,s]}var wC=XL,tw=ZL,SC=WL,EC=QL,Wre="Portal",_g=R.forwardRef((e,r)=>{const{container:s,...o}=e,[d,p]=R.useState(!1);As(()=>p(!0),[]);const m=s||d&&globalThis?.document?.body;return m?B3.createPortal(u.jsx(Cn.div,{...o,ref:r}),m):null});_g.displayName=Wre;function Jre(e,r){return R.useReducer((s,o)=>r[s][o]??s,e)}var lo=e=>{const{present:r,children:s}=e,o=Qre(r),d=typeof s=="function"?s({present:o.isPresent}):R.Children.only(s),p=zn(o.ref,ese(d));return typeof s=="function"||o.isPresent?R.cloneElement(d,{ref:p}):null};lo.displayName="Presence";function Qre(e){const[r,s]=R.useState(),o=R.useRef(null),d=R.useRef(e),p=R.useRef("none"),m=e?"mounted":"unmounted",[g,b]=Jre(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const S=HE(o.current);p.current=g==="mounted"?S:"none"},[g]),As(()=>{const S=o.current,j=d.current;if(j!==e){const k=p.current,T=HE(S);e?b("MOUNT"):T==="none"||S?.display==="none"?b("UNMOUNT"):b(j&&k!==T?"ANIMATION_OUT":"UNMOUNT"),d.current=e}},[e,b]),As(()=>{if(r){let S;const j=r.ownerDocument.defaultView??window,A=T=>{const I=HE(o.current).includes(CSS.escape(T.animationName));if(T.target===r&&I&&(b("ANIMATION_END"),!d.current)){const q=r.style.animationFillMode;r.style.animationFillMode="forwards",S=j.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=q)})}},k=T=>{T.target===r&&(p.current=HE(o.current))};return r.addEventListener("animationstart",k),r.addEventListener("animationcancel",A),r.addEventListener("animationend",A),()=>{j.clearTimeout(S),r.removeEventListener("animationstart",k),r.removeEventListener("animationcancel",A),r.removeEventListener("animationend",A)}}else b("ANIMATION_END")},[r,b]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:R.useCallback(S=>{o.current=S?getComputedStyle(S):null,s(S)},[])}}function HE(e){return e?.animationName||"none"}function ese(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var tse=Symbol("radix.slottable");function nse(e){const r=({children:s})=>u.jsx(u.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=tse,r}var rse=T_[" useInsertionEffect ".trim().toString()]||As;function qd({prop:e,defaultProp:r,onChange:s=()=>{},caller:o}){const[d,p,m]=sse({defaultProp:r,onChange:s}),g=e!==void 0,b=g?e:d;{const j=R.useRef(e!==void 0);R.useEffect(()=>{const A=j.current;A!==g&&console.warn(`${o} is changing from ${A?"controlled":"uncontrolled"} to ${g?"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.`),j.current=g},[g,o])}const S=R.useCallback(j=>{if(g){const A=ise(j)?j(e):j;A!==e&&m.current?.(A)}else p(j)},[g,e,p,m]);return[b,S]}function sse({defaultProp:e,onChange:r}){const[s,o]=R.useState(e),d=R.useRef(s),p=R.useRef(r);return rse(()=>{p.current=r},[r]),R.useEffect(()=>{d.current!==s&&(p.current?.(s),d.current=s)},[s,d]),[s,o,p]}function ise(e){return typeof e=="function"}var tz=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"}),ase="VisuallyHidden",nz=R.forwardRef((e,r)=>u.jsx(Cn.span,{...e,ref:r,style:{...tz,...e.style}}));nz.displayName=ase;var ose=nz,[jC]=al("Tooltip",[Hd]),CC=Hd(),rz="TooltipProvider",lse=700,LT="tooltip.open",[cse,e2]=jC(rz),sz=e=>{const{__scopeTooltip:r,delayDuration:s=lse,skipDelayDuration:o=300,disableHoverableContent:d=!1,children:p}=e,m=R.useRef(!0),g=R.useRef(!1),b=R.useRef(0);return R.useEffect(()=>{const S=b.current;return()=>window.clearTimeout(S)},[]),u.jsx(cse,{scope:r,isOpenDelayedRef:m,delayDuration:s,onOpen:R.useCallback(()=>{window.clearTimeout(b.current),m.current=!1},[]),onClose:R.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>m.current=!0,o)},[o]),isPointerInTransitRef:g,onPointerInTransitChange:R.useCallback(S=>{g.current=S},[]),disableHoverableContent:d,children:p})};sz.displayName=rz;var Fb="Tooltip",[use,nw]=jC(Fb),iz=e=>{const{__scopeTooltip:r,children:s,open:o,defaultOpen:d,onOpenChange:p,disableHoverableContent:m,delayDuration:g}=e,b=e2(Fb,e.__scopeTooltip),S=CC(r),[j,A]=R.useState(null),k=Vs(),T=R.useRef(0),M=m??b.disableHoverableContent,I=g??b.delayDuration,q=R.useRef(!1),[G,K]=qd({prop:o,defaultProp:d??!1,onChange:Q=>{Q?(b.onOpen(),document.dispatchEvent(new CustomEvent(LT))):b.onClose(),p?.(Q)},caller:Fb}),X=R.useMemo(()=>G?q.current?"delayed-open":"instant-open":"closed",[G]),L=R.useCallback(()=>{window.clearTimeout(T.current),T.current=0,q.current=!1,K(!0)},[K]),ee=R.useCallback(()=>{window.clearTimeout(T.current),T.current=0,K(!1)},[K]),oe=R.useCallback(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{q.current=!0,K(!0),T.current=0},I)},[I,K]);return R.useEffect(()=>()=>{T.current&&(window.clearTimeout(T.current),T.current=0)},[]),u.jsx(wC,{...S,children:u.jsx(use,{scope:r,contentId:k,open:G,stateAttribute:X,trigger:j,onTriggerChange:A,onTriggerEnter:R.useCallback(()=>{b.isOpenDelayedRef.current?oe():L()},[b.isOpenDelayedRef,oe,L]),onTriggerLeave:R.useCallback(()=>{M?ee():(window.clearTimeout(T.current),T.current=0)},[ee,M]),onOpen:L,onClose:ee,disableHoverableContent:M,children:s})})};iz.displayName=Fb;var zT="TooltipTrigger",az=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,d=nw(zT,s),p=e2(zT,s),m=CC(s),g=R.useRef(null),b=zn(r,g,d.onTriggerChange),S=R.useRef(!1),j=R.useRef(!1),A=R.useCallback(()=>S.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",A),[A]),u.jsx(tw,{asChild:!0,...m,children:u.jsx(Cn.button,{"aria-describedby":d.open?d.contentId:void 0,"data-state":d.stateAttribute,...o,ref:b,onPointerMove:$t(e.onPointerMove,k=>{k.pointerType!=="touch"&&!j.current&&!p.isPointerInTransitRef.current&&(d.onTriggerEnter(),j.current=!0)}),onPointerLeave:$t(e.onPointerLeave,()=>{d.onTriggerLeave(),j.current=!1}),onPointerDown:$t(e.onPointerDown,()=>{d.open&&d.onClose(),S.current=!0,document.addEventListener("pointerup",A,{once:!0})}),onFocus:$t(e.onFocus,()=>{S.current||d.onOpen()}),onBlur:$t(e.onBlur,d.onClose),onClick:$t(e.onClick,d.onClose)})})});az.displayName=zT;var t2="TooltipPortal",[dse,hse]=jC(t2,{forceMount:void 0}),oz=e=>{const{__scopeTooltip:r,forceMount:s,children:o,container:d}=e,p=nw(t2,r);return u.jsx(dse,{scope:r,forceMount:s,children:u.jsx(lo,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};oz.displayName=t2;var xg="TooltipContent",lz=R.forwardRef((e,r)=>{const s=hse(xg,e.__scopeTooltip),{forceMount:o=s.forceMount,side:d="top",...p}=e,m=nw(xg,e.__scopeTooltip);return u.jsx(lo,{present:o||m.open,children:m.disableHoverableContent?u.jsx(cz,{side:d,...p,ref:r}):u.jsx(pse,{side:d,...p,ref:r})})}),pse=R.forwardRef((e,r)=>{const s=nw(xg,e.__scopeTooltip),o=e2(xg,e.__scopeTooltip),d=R.useRef(null),p=zn(r,d),[m,g]=R.useState(null),{trigger:b,onClose:S}=s,j=d.current,{onPointerInTransitChange:A}=o,k=R.useCallback(()=>{g(null),A(!1)},[A]),T=R.useCallback((M,I)=>{const q=M.currentTarget,G={x:M.clientX,y:M.clientY},K=yse(G,q.getBoundingClientRect()),X=vse(G,K),L=xse(I.getBoundingClientRect()),ee=wse([...X,...L]);g(ee),A(!0)},[A]);return R.useEffect(()=>()=>k(),[k]),R.useEffect(()=>{if(b&&j){const M=q=>T(q,j),I=q=>T(q,b);return b.addEventListener("pointerleave",M),j.addEventListener("pointerleave",I),()=>{b.removeEventListener("pointerleave",M),j.removeEventListener("pointerleave",I)}}},[b,j,T,k]),R.useEffect(()=>{if(m){const M=I=>{const q=I.target,G={x:I.clientX,y:I.clientY},K=b?.contains(q)||j?.contains(q),X=!bse(G,m);K?k():X&&(k(),S())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[b,j,m,S,k]),u.jsx(cz,{...e,ref:p})}),[fse,mse]=jC(Fb,{isInside:!1}),gse=nse("TooltipContent"),cz=R.forwardRef((e,r)=>{const{__scopeTooltip:s,children:o,"aria-label":d,onEscapeKeyDown:p,onPointerDownOutside:m,...g}=e,b=nw(xg,s),S=CC(s),{onClose:j}=b;return R.useEffect(()=>(document.addEventListener(LT,j),()=>document.removeEventListener(LT,j)),[j]),R.useEffect(()=>{if(b.trigger){const A=k=>{k.target?.contains(b.trigger)&&j()};return window.addEventListener("scroll",A,{capture:!0}),()=>window.removeEventListener("scroll",A,{capture:!0})}},[b.trigger,j]),u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:A=>A.preventDefault(),onDismiss:j,children:u.jsxs(SC,{"data-state":b.stateAttribute,...S,...g,ref:r,style:{...g.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:[u.jsx(gse,{children:o}),u.jsx(fse,{scope:s,isInside:!0,children:u.jsx(ose,{id:b.contentId,role:"tooltip",children:d||o})})]})})});lz.displayName=xg;var uz="TooltipArrow",dz=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,d=CC(s);return mse(uz,s).isInside?null:u.jsx(EC,{...d,...o,ref:r})});dz.displayName=uz;function yse(e,r){const s=Math.abs(r.top-e.y),o=Math.abs(r.bottom-e.y),d=Math.abs(r.right-e.x),p=Math.abs(r.left-e.x);switch(Math.min(s,o,d,p)){case p:return"left";case d:return"right";case s:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function vse(e,r,s=5){const o=[];switch(r){case"top":o.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":o.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":o.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":o.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return o}function xse(e){const{top:r,right:s,bottom:o,left:d}=e;return[{x:d,y:r},{x:s,y:r},{x:s,y:o},{x:d,y:o}]}function bse(e,r){const{x:s,y:o}=e;let d=!1;for(let p=0,m=r.length-1;p<r.length;m=p++){const g=r[p],b=r[m],S=g.x,j=g.y,A=b.x,k=b.y;j>o!=k>o&&s<(A-S)*(o-j)/(k-j)+S&&(d=!d)}return d}function wse(e){const r=e.slice();return r.sort((s,o)=>s.x<o.x?-1:s.x>o.x?1:s.y<o.y?-1:s.y>o.y?1:0),Sse(r)}function Sse(e){if(e.length<=1)return e.slice();const r=[];for(let o=0;o<e.length;o++){const d=e[o];for(;r.length>=2;){const p=r[r.length-1],m=r[r.length-2];if((p.x-m.x)*(d.y-m.y)>=(p.y-m.y)*(d.x-m.x))r.pop();else break}r.push(d)}r.pop();const s=[];for(let o=e.length-1;o>=0;o--){const d=e[o];for(;s.length>=2;){const p=s[s.length-1],m=s[s.length-2];if((p.x-m.x)*(d.y-m.y)>=(p.y-m.y)*(d.x-m.x))s.pop();else break}s.push(d)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var Ese=sz,jse=iz,Cse=az,Ase=oz,Ose=lz,kse=dz;function rw({delayDuration:e=0,...r}){return u.jsx(Ese,{"data-slot":"tooltip-provider",delayDuration:e,...r})}function Mj({...e}){return u.jsx(rw,{children:u.jsx(jse,{"data-slot":"tooltip",...e})})}function Ij({...e}){return u.jsx(Cse,{"data-slot":"tooltip-trigger",...e})}function Lj({className:e,sideOffset:r=0,children:s,...o}){return u.jsx(Ase,{children:u.jsxs(Ose,{"data-slot":"tooltip-content",sideOffset:r,className:ft("bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[s,u.jsx(kse,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function hz(e){return e&&e!=="none"?e.slice(0,7):"none"}function Rse(e){if(!e||e==="unknown")return"unknown";const r=new Date(e);return isNaN(+r)?e:r.toLocaleString()}function Tse(e){return e?`v${e.version} (${hz(e.commit)}) • built ${e.built} • ${e.go} ${e.goOS}/${e.goArch}`:""}const _se=R.memo(function(){const r=rr({queryKey:["footer"],queryFn:()=>dte.footer(),staleTime:6e4,refetchOnWindowFocus:!1}),s=r.data,o=R.useMemo(()=>Tse(s),[s]);return u.jsx("footer",{className:"bg-background text-muted-foreground w-full border-t px-3 py-2 text-xs sm:text-sm",children:u.jsxs("div",{className:"mx-auto flex max-w-screen-2xl items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[u.jsxs("span",{children:["© ",new Date().getFullYear()," GlueOps"]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsx("span",{className:"hidden sm:block",children:"All systems nominal."})]}),u.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs sm:text-sm",children:r.isLoading?u.jsx("span",{className:"animate-pulse",children:"loading version…"}):r.isError?u.jsx("span",{className:"text-destructive",children:"version unavailable"}):s?u.jsx(rw,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(ns,{variant:"secondary",className:"font-mono",children:s.version}),u.jsxs(Mj,{children:[u.jsx(Ij,{asChild:!0,children:u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(YZ,{className:"h-3.5 w-3.5"}),u.jsx("span",{className:"font-mono",children:hz(s.commit)})]})}),u.jsx(Lj,{side:"top",children:u.jsx("div",{className:"font-mono text-xs",children:s.commit})})]}),u.jsx(bb,{orientation:"vertical",className:"h-4"}),u.jsxs(Mj,{children:[u.jsx(Ij,{asChild:!0,children:u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(oL,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:s.go})]})}),u.jsx(Lj,{side:"top",children:u.jsxs("div",{className:"font-mono text-xs",children:[s.goOS,"/",s.goArch]})})]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsxs("span",{className:"hidden sm:inline",children:["built ",u.jsx("span",{className:"font-mono",children:Rse(s.built)})]}),u.jsx(bb,{orientation:"vertical",className:"hidden h-4 sm:block"}),u.jsx(Fe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{navigator.clipboard?.writeText(o).catch(()=>{})},title:"Copy version details",children:u.jsx(NZ,{className:"h-4 w-4"})}),u.jsxs("a",{href:"/api/v1/version",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs underline-offset-4 hover:underline",title:"Open raw version JSON",children:["JSON ",u.jsx(BZ,{className:"h-3.5 w-3.5"})]})]})}):null})]})})});var pz={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dI=Je.createContext&&Je.createContext(pz),$se=["attr","size","title"];function Nse(e,r){if(e==null)return{};var s=Dse(e,r),o,d;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(d=0;d<p.length;d++)o=p[d],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function Dse(e,r){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r.indexOf(o)>=0)continue;s[o]=e[o]}return s}function zj(){return zj=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},zj.apply(this,arguments)}function hI(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),s.push.apply(s,o)}return s}function Fj(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?hI(Object(s),!0).forEach(function(o){Pse(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):hI(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function Pse(e,r,s){return r=Mse(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function Mse(e){var r=Ise(e,"string");return typeof r=="symbol"?r:r+""}function Ise(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,r);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fz(e){return e&&e.map((r,s)=>Je.createElement(r.tag,Fj({key:s},r.attr),fz(r.child)))}function sw(e){return r=>Je.createElement(Lse,zj({attr:Fj({},e.attr)},r),fz(e.child))}function Lse(e){var r=s=>{var{attr:o,size:d,title:p}=e,m=Nse(e,$se),g=d||s.size||"1em",b;return s.className&&(b=s.className),e.className&&(b=(b?b+" ":"")+e.className),Je.createElement("svg",zj({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,m,{className:b,style:Fj(Fj({color:e.color||s.color},s.style),e.style),height:g,width:g,xmlns:"http://www.w3.org/2000/svg"}),p&&Je.createElement("title",null,p),e.children)};return dI!==void 0?Je.createElement(dI.Consumer,null,s=>r(s)):r(pz)}function zse(e){return sw({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"},child:[]}]})(e)}function Fse(e){return sw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M3,6 L21,6 L3,6 Z M10,2 L10,4 M14,2 L14,4 M16,12 C18.3736719,13.1826446 20,15.6506255 20,19 L20,23 L4,23 L4,19 C4,15.6457258 5.6310898,13.1754259 8,12 M12,16.5 L12,23 M12,13 C15.3137085,13 18,10.3137085 18,7 C18,3.6862915 15.3137085,1 12,1 C8.6862915,1 6,3.6862915 6,7 C6,10.3137085 8.6862915,13 12,13 Z M8,12 C8,14.209139 9.790861,16 12,16 L12,16 C14.209139,16 16,14.209139 16,12"},child:[]}]})(e)}function qse(e){return sw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"},child:[]}]})(e)}function Bse(e){return sw({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"},child:[]}]})(e)}function Use(e){return sw({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 13m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M12 20m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 16v3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M14.894 12.227l6.11 -2.224"},child:[]},{tag:"path",attr:{d:"M17.159 8.21l3.845 1.793l-1.793 3.845"},child:[]},{tag:"path",attr:{d:"M9.101 12.214l-6.075 -2.211"},child:[]},{tag:"path",attr:{d:"M6.871 8.21l-3.845 1.793l1.793 3.845"},child:[]}]})(e)}const Kse=[{to:"/clusters",label:"Clusters",icon:zse},{to:"/load-balancers",label:"Load Balancers",icon:Use},{to:"/dns",label:"DNS",icon:qse},{to:"/node-pools",label:"Node Pools",icon:yZ},{to:"/annotations",label:"Annotations",icon:PZ},{to:"/labels",label:"Labels",icon:mC},{to:"/taints",label:"Taints",icon:SW},{to:"/servers",label:"Servers",icon:F_},{to:"/ssh",label:"SSH Keys",icon:GZ},{to:"/credentials",label:"Credentials",icon:nW}],Vse=[{to:"/org/members",label:"Members",icon:lL},{to:"/org/api-keys",label:"Org API Keys",icon:JZ},{to:"/org/settings",label:"Org Settings",icon:sL}],Hse=[{to:"/me",label:"Profile",icon:RW}],Gse=[{to:"/admin/users",label:"Users Admin",icon:lL},{to:"/admin/jobs",label:"Jobs Admin",icon:Fse},{to:"/docs",label:"API Docs ",icon:Bse,target:"_blank"}];var pI=1,Xse=.9,Yse=.8,Zse=.17,IR=.1,LR=.999,Wse=.9999,Jse=.99,Qse=/[\\\/_+.#"@\[\(\{&]/,eie=/[\\\/_+.#"@\[\(\{&]/g,tie=/[\s-]/,mz=/[\s-]/g;function FT(e,r,s,o,d,p,m){if(p===r.length)return d===e.length?pI:Jse;var g=`${d},${p}`;if(m[g]!==void 0)return m[g];for(var b=o.charAt(p),S=s.indexOf(b,d),j=0,A,k,T,M;S>=0;)A=FT(e,r,s,o,S+1,p+1,m),A>j&&(S===d?A*=pI:Qse.test(e.charAt(S-1))?(A*=Yse,T=e.slice(d,S-1).match(eie),T&&d>0&&(A*=Math.pow(LR,T.length))):tie.test(e.charAt(S-1))?(A*=Xse,M=e.slice(d,S-1).match(mz),M&&d>0&&(A*=Math.pow(LR,M.length))):(A*=Zse,d>0&&(A*=Math.pow(LR,S-d))),e.charAt(S)!==r.charAt(p)&&(A*=Wse)),(A<IR&&s.charAt(S-1)===o.charAt(p+1)||o.charAt(p+1)===o.charAt(p)&&s.charAt(S-1)!==o.charAt(p))&&(k=FT(e,r,s,o,S+1,p+2,m),k*IR>A&&(A=k*IR)),A>j&&(j=A),S=s.indexOf(b,S+1);return m[g]=j,j}function fI(e){return e.toLowerCase().replace(mz," ")}function nie(e,r,s){return e=s&&s.length>0?`${e+" "+s.join(" ")}`:e,FT(e,r,fI(e),fI(r),0,0,{})}var zR="focusScope.autoFocusOnMount",FR="focusScope.autoFocusOnUnmount",mI={bubbles:!1,cancelable:!0},rie="FocusScope",iw=R.forwardRef((e,r)=>{const{loop:s=!1,trapped:o=!1,onMountAutoFocus:d,onUnmountAutoFocus:p,...m}=e,[g,b]=R.useState(null),S=tl(d),j=tl(p),A=R.useRef(null),k=zn(r,I=>b(I)),T=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(o){let I=function(X){if(T.paused||!g)return;const L=X.target;g.contains(L)?A.current=L:Pd(A.current,{select:!0})},q=function(X){if(T.paused||!g)return;const L=X.relatedTarget;L!==null&&(g.contains(L)||Pd(A.current,{select:!0}))},G=function(X){if(document.activeElement===document.body)for(const ee of X)ee.removedNodes.length>0&&Pd(g)};document.addEventListener("focusin",I),document.addEventListener("focusout",q);const K=new MutationObserver(G);return g&&K.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",I),document.removeEventListener("focusout",q),K.disconnect()}}},[o,g,T.paused]),R.useEffect(()=>{if(g){yI.add(T);const I=document.activeElement;if(!g.contains(I)){const G=new CustomEvent(zR,mI);g.addEventListener(zR,S),g.dispatchEvent(G),G.defaultPrevented||(sie(cie(gz(g)),{select:!0}),document.activeElement===I&&Pd(g))}return()=>{g.removeEventListener(zR,S),setTimeout(()=>{const G=new CustomEvent(FR,mI);g.addEventListener(FR,j),g.dispatchEvent(G),G.defaultPrevented||Pd(I??document.body,{select:!0}),g.removeEventListener(FR,j),yI.remove(T)},0)}}},[g,S,j,T]);const M=R.useCallback(I=>{if(!s&&!o||T.paused)return;const q=I.key==="Tab"&&!I.altKey&&!I.ctrlKey&&!I.metaKey,G=document.activeElement;if(q&&G){const K=I.currentTarget,[X,L]=iie(K);X&&L?!I.shiftKey&&G===L?(I.preventDefault(),s&&Pd(X,{select:!0})):I.shiftKey&&G===X&&(I.preventDefault(),s&&Pd(L,{select:!0})):G===K&&I.preventDefault()}},[s,o,T.paused]);return u.jsx(Cn.div,{tabIndex:-1,...m,ref:k,onKeyDown:M})});iw.displayName=rie;function sie(e,{select:r=!1}={}){const s=document.activeElement;for(const o of e)if(Pd(o,{select:r}),document.activeElement!==s)return}function iie(e){const r=gz(e),s=gI(r,e),o=gI(r.reverse(),e);return[s,o]}function gz(e){const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const d=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||d?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function gI(e,r){for(const s of e)if(!aie(s,{upTo:r}))return s}function aie(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oie(e){return e instanceof HTMLInputElement&&"select"in e}function Pd(e,{select:r=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&oie(e)&&r&&e.select()}}var yI=lie();function lie(){let e=[];return{add(r){const s=e[0];r!==s&&s?.pause(),e=vI(e,r),e.unshift(r)},remove(r){e=vI(e,r),e[0]?.resume()}}}function vI(e,r){const s=[...e],o=s.indexOf(r);return o!==-1&&s.splice(o,1),s}function cie(e){return e.filter(r=>r.tagName!=="A")}var qR=0;function AC(){R.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xI()),document.body.insertAdjacentElement("beforeend",e[1]??xI()),qR++,()=>{qR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),qR--}},[])}function xI(){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 nc=function(){return nc=Object.assign||function(r){for(var s,o=1,d=arguments.length;o<d;o++){s=arguments[o];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(r[p]=s[p])}return r},nc.apply(this,arguments)};function yz(e,r){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,o=Object.getOwnPropertySymbols(e);d<o.length;d++)r.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(e,o[d])&&(s[o[d]]=e[o[d]]);return s}function uie(e,r,s){if(s||arguments.length===2)for(var o=0,d=r.length,p;o<d;o++)(p||!(o in r))&&(p||(p=Array.prototype.slice.call(r,0,o)),p[o]=r[o]);return e.concat(p||Array.prototype.slice.call(r))}var gj="right-scroll-bar-position",yj="width-before-scroll-bar",die="with-scroll-bars-hidden",hie="--removed-body-scroll-bar-size";function BR(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function pie(e,r){var s=R.useState(function(){return{value:e,callback:r,facade:{get current(){return s.value},set current(o){var d=s.value;d!==o&&(s.value=o,s.callback(o,d))}}}})[0];return s.callback=r,s.facade}var fie=typeof window<"u"?R.useLayoutEffect:R.useEffect,bI=new WeakMap;function mie(e,r){var s=pie(null,function(o){return e.forEach(function(d){return BR(d,o)})});return fie(function(){var o=bI.get(s);if(o){var d=new Set(o),p=new Set(e),m=s.current;d.forEach(function(g){p.has(g)||BR(g,null)}),p.forEach(function(g){d.has(g)||BR(g,m)})}bI.set(s,e)},[e]),s}function gie(e){return e}function yie(e,r){r===void 0&&(r=gie);var s=[],o=!1,d={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(p){var m=r(p,o);return s.push(m),function(){s=s.filter(function(g){return g!==m})}},assignSyncMedium:function(p){for(o=!0;s.length;){var m=s;s=[],m.forEach(p)}s={push:function(g){return p(g)},filter:function(){return s}}},assignMedium:function(p){o=!0;var m=[];if(s.length){var g=s;s=[],g.forEach(p),m=s}var b=function(){var j=m;m=[],j.forEach(p)},S=function(){return Promise.resolve().then(b)};S(),s={push:function(j){m.push(j),S()},filter:function(j){return m=m.filter(j),s}}}};return d}function vie(e){e===void 0&&(e={});var r=yie(null);return r.options=nc({async:!0,ssr:!1},e),r}var vz=function(e){var r=e.sideCar,s=yz(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return R.createElement(o,nc({},s))};vz.isSideCarExport=!0;function xie(e,r){return e.useMedium(r),vz}var xz=vie(),UR=function(){},OC=R.forwardRef(function(e,r){var s=R.useRef(null),o=R.useState({onScrollCapture:UR,onWheelCapture:UR,onTouchMoveCapture:UR}),d=o[0],p=o[1],m=e.forwardProps,g=e.children,b=e.className,S=e.removeScrollBar,j=e.enabled,A=e.shards,k=e.sideCar,T=e.noRelative,M=e.noIsolation,I=e.inert,q=e.allowPinchZoom,G=e.as,K=G===void 0?"div":G,X=e.gapMode,L=yz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ee=k,oe=mie([s,r]),Q=nc(nc({},L),d);return R.createElement(R.Fragment,null,j&&R.createElement(ee,{sideCar:xz,removeScrollBar:S,shards:A,noRelative:T,noIsolation:M,inert:I,setCallbacks:p,allowPinchZoom:!!q,lockRef:s,gapMode:X}),m?R.cloneElement(R.Children.only(g),nc(nc({},Q),{ref:oe})):R.createElement(K,nc({},Q,{className:b,ref:oe}),g))});OC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};OC.classNames={fullWidth:yj,zeroRight:gj};var bie=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=bie();return r&&e.setAttribute("nonce",r),e}function Sie(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Eie(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var jie=function(){var e=0,r=null;return{add:function(s){e==0&&(r=wie())&&(Sie(r,s),Eie(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Cie=function(){var e=jie();return function(r,s){R.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&s])}},bz=function(){var e=Cie(),r=function(s){var o=s.styles,d=s.dynamic;return e(o,d),null};return r},Aie={left:0,top:0,right:0,gap:0},KR=function(e){return parseInt(e||"",10)||0},Oie=function(e){var r=window.getComputedStyle(document.body),s=r[e==="padding"?"paddingLeft":"marginLeft"],o=r[e==="padding"?"paddingTop":"marginTop"],d=r[e==="padding"?"paddingRight":"marginRight"];return[KR(s),KR(o),KR(d)]},kie=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Aie;var r=Oie(e),s=document.documentElement.clientWidth,o=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,o-s+r[2]-r[0])}},Rie=bz(),fg="data-scroll-locked",Tie=function(e,r,s,o){var d=e.left,p=e.top,m=e.right,g=e.gap;return s===void 0&&(s="margin"),`
|
||
.`.concat(die,` {
|
||
overflow: hidden `).concat(o,`;
|
||
padding-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
body[`).concat(fg,`] {
|
||
overflow: hidden `).concat(o,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([r&&"position: relative ".concat(o,";"),s==="margin"&&`
|
||
padding-left: `.concat(d,`px;
|
||
padding-top: `).concat(p,`px;
|
||
padding-right: `).concat(m,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
`),s==="padding"&&"padding-right: ".concat(g,"px ").concat(o,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(gj,` {
|
||
right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(yj,` {
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(gj," .").concat(gj,` {
|
||
right: 0 `).concat(o,`;
|
||
}
|
||
|
||
.`).concat(yj," .").concat(yj,` {
|
||
margin-right: 0 `).concat(o,`;
|
||
}
|
||
|
||
body[`).concat(fg,`] {
|
||
`).concat(hie,": ").concat(g,`px;
|
||
}
|
||
`)},wI=function(){var e=parseInt(document.body.getAttribute(fg)||"0",10);return isFinite(e)?e:0},_ie=function(){R.useEffect(function(){return document.body.setAttribute(fg,(wI()+1).toString()),function(){var e=wI()-1;e<=0?document.body.removeAttribute(fg):document.body.setAttribute(fg,e.toString())}},[])},$ie=function(e){var r=e.noRelative,s=e.noImportant,o=e.gapMode,d=o===void 0?"margin":o;_ie();var p=R.useMemo(function(){return kie(d)},[d]);return R.createElement(Rie,{styles:Tie(p,!r,d,s?"":"!important")})},qT=!1;if(typeof window<"u")try{var GE=Object.defineProperty({},"passive",{get:function(){return qT=!0,!0}});window.addEventListener("test",GE,GE),window.removeEventListener("test",GE,GE)}catch{qT=!1}var Vm=qT?{passive:!1}:!1,Nie=function(e){return e.tagName==="TEXTAREA"},wz=function(e,r){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!Nie(e)&&s[r]==="visible")},Die=function(e){return wz(e,"overflowY")},Pie=function(e){return wz(e,"overflowX")},SI=function(e,r){var s=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var d=Sz(e,o);if(d){var p=Ez(e,o),m=p[1],g=p[2];if(m>g)return!0}o=o.parentNode}while(o&&o!==s.body);return!1},Mie=function(e){var r=e.scrollTop,s=e.scrollHeight,o=e.clientHeight;return[r,s,o]},Iie=function(e){var r=e.scrollLeft,s=e.scrollWidth,o=e.clientWidth;return[r,s,o]},Sz=function(e,r){return e==="v"?Die(r):Pie(r)},Ez=function(e,r){return e==="v"?Mie(r):Iie(r)},Lie=function(e,r){return e==="h"&&r==="rtl"?-1:1},zie=function(e,r,s,o,d){var p=Lie(e,window.getComputedStyle(r).direction),m=p*o,g=s.target,b=r.contains(g),S=!1,j=m>0,A=0,k=0;do{if(!g)break;var T=Ez(e,g),M=T[0],I=T[1],q=T[2],G=I-q-p*M;(M||G)&&Sz(e,g)&&(A+=G,k+=M);var K=g.parentNode;g=K&&K.nodeType===Node.DOCUMENT_FRAGMENT_NODE?K.host:K}while(!b&&g!==document.body||b&&(r.contains(g)||r===g));return(j&&Math.abs(A)<1||!j&&Math.abs(k)<1)&&(S=!0),S},XE=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},EI=function(e){return[e.deltaX,e.deltaY]},jI=function(e){return e&&"current"in e?e.current:e},Fie=function(e,r){return e[0]===r[0]&&e[1]===r[1]},qie=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},Bie=0,Hm=[];function Uie(e){var r=R.useRef([]),s=R.useRef([0,0]),o=R.useRef(),d=R.useState(Bie++)[0],p=R.useState(bz)[0],m=R.useRef(e);R.useEffect(function(){m.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(d));var I=uie([e.lockRef.current],(e.shards||[]).map(jI),!0).filter(Boolean);return I.forEach(function(q){return q.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),I.forEach(function(q){return q.classList.remove("allow-interactivity-".concat(d))})}}},[e.inert,e.lockRef.current,e.shards]);var g=R.useCallback(function(I,q){if("touches"in I&&I.touches.length===2||I.type==="wheel"&&I.ctrlKey)return!m.current.allowPinchZoom;var G=XE(I),K=s.current,X="deltaX"in I?I.deltaX:K[0]-G[0],L="deltaY"in I?I.deltaY:K[1]-G[1],ee,oe=I.target,Q=Math.abs(X)>Math.abs(L)?"h":"v";if("touches"in I&&Q==="h"&&oe.type==="range")return!1;var ne=window.getSelection(),de=ne&&ne.anchorNode,je=de?de===oe||de.contains(oe):!1;if(je)return!1;var ve=SI(Q,oe);if(!ve)return!0;if(ve?ee=Q:(ee=Q==="v"?"h":"v",ve=SI(Q,oe)),!ve)return!1;if(!o.current&&"changedTouches"in I&&(X||L)&&(o.current=ee),!ee)return!0;var le=o.current||ee;return zie(le,q,I,le==="h"?X:L)},[]),b=R.useCallback(function(I){var q=I;if(!(!Hm.length||Hm[Hm.length-1]!==p)){var G="deltaY"in q?EI(q):XE(q),K=r.current.filter(function(ee){return ee.name===q.type&&(ee.target===q.target||q.target===ee.shadowParent)&&Fie(ee.delta,G)})[0];if(K&&K.should){q.cancelable&&q.preventDefault();return}if(!K){var X=(m.current.shards||[]).map(jI).filter(Boolean).filter(function(ee){return ee.contains(q.target)}),L=X.length>0?g(q,X[0]):!m.current.noIsolation;L&&q.cancelable&&q.preventDefault()}}},[]),S=R.useCallback(function(I,q,G,K){var X={name:I,delta:q,target:G,should:K,shadowParent:Kie(G)};r.current.push(X),setTimeout(function(){r.current=r.current.filter(function(L){return L!==X})},1)},[]),j=R.useCallback(function(I){s.current=XE(I),o.current=void 0},[]),A=R.useCallback(function(I){S(I.type,EI(I),I.target,g(I,e.lockRef.current))},[]),k=R.useCallback(function(I){S(I.type,XE(I),I.target,g(I,e.lockRef.current))},[]);R.useEffect(function(){return Hm.push(p),e.setCallbacks({onScrollCapture:A,onWheelCapture:A,onTouchMoveCapture:k}),document.addEventListener("wheel",b,Vm),document.addEventListener("touchmove",b,Vm),document.addEventListener("touchstart",j,Vm),function(){Hm=Hm.filter(function(I){return I!==p}),document.removeEventListener("wheel",b,Vm),document.removeEventListener("touchmove",b,Vm),document.removeEventListener("touchstart",j,Vm)}},[]);var T=e.removeScrollBar,M=e.inert;return R.createElement(R.Fragment,null,M?R.createElement(p,{styles:qie(d)}):null,T?R.createElement($ie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Kie(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const Vie=xie(xz,Uie);var aw=R.forwardRef(function(e,r){return R.createElement(OC,nc({},e,{ref:r,sideCar:Vie}))});aw.classNames=OC.classNames;var Hie=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Gm=new WeakMap,YE=new WeakMap,ZE={},VR=0,jz=function(e){return e&&(e.host||jz(e.parentNode))},Gie=function(e,r){return r.map(function(s){if(e.contains(s))return s;var o=jz(s);return o&&e.contains(o)?o:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},Xie=function(e,r,s,o){var d=Gie(r,Array.isArray(e)?e:[e]);ZE[s]||(ZE[s]=new WeakMap);var p=ZE[s],m=[],g=new Set,b=new Set(d),S=function(A){!A||g.has(A)||(g.add(A),S(A.parentNode))};d.forEach(S);var j=function(A){!A||b.has(A)||Array.prototype.forEach.call(A.children,function(k){if(g.has(k))j(k);else try{var T=k.getAttribute(o),M=T!==null&&T!=="false",I=(Gm.get(k)||0)+1,q=(p.get(k)||0)+1;Gm.set(k,I),p.set(k,q),m.push(k),I===1&&M&&YE.set(k,!0),q===1&&k.setAttribute(s,"true"),M||k.setAttribute(o,"true")}catch(G){console.error("aria-hidden: cannot operate on ",k,G)}})};return j(r),g.clear(),VR++,function(){m.forEach(function(A){var k=Gm.get(A)-1,T=p.get(A)-1;Gm.set(A,k),p.set(A,T),k||(YE.has(A)||A.removeAttribute(o),YE.delete(A)),T||A.removeAttribute(s)}),VR--,VR||(Gm=new WeakMap,Gm=new WeakMap,YE=new WeakMap,ZE={})}},kC=function(e,r,s){s===void 0&&(s="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),d=Hie(e);return d?(o.push.apply(o,Array.from(d.querySelectorAll("[aria-live], script"))),Xie(o,d,s,"aria-hidden")):function(){return null}};function Yie(e){const r=Zie(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(Jie);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Zie(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=eae(d),g=Qie(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Wie=Symbol("radix.slottable");function Jie(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wie}function Qie(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function eae(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var RC="Dialog",[Cz,Az]=al(RC),[tae,ol]=Cz(RC),Oz=e=>{const{__scopeDialog:r,children:s,open:o,defaultOpen:d,onOpenChange:p,modal:m=!0}=e,g=R.useRef(null),b=R.useRef(null),[S,j]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:RC});return u.jsx(tae,{scope:r,triggerRef:g,contentRef:b,contentId:Vs(),titleId:Vs(),descriptionId:Vs(),open:S,onOpenChange:j,onOpenToggle:R.useCallback(()=>j(A=>!A),[j]),modal:m,children:s})};Oz.displayName=RC;var kz="DialogTrigger",Rz=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(kz,s),p=zn(r,d.triggerRef);return u.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.contentId,"data-state":s2(d.open),...o,ref:p,onClick:$t(e.onClick,d.onOpenToggle)})});Rz.displayName=kz;var n2="DialogPortal",[nae,Tz]=Cz(n2,{forceMount:void 0}),_z=e=>{const{__scopeDialog:r,forceMount:s,children:o,container:d}=e,p=ol(n2,r);return u.jsx(nae,{scope:r,forceMount:s,children:R.Children.map(o,m=>u.jsx(lo,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:m})}))})};_z.displayName=n2;var qj="DialogOverlay",$z=R.forwardRef((e,r)=>{const s=Tz(qj,e.__scopeDialog),{forceMount:o=s.forceMount,...d}=e,p=ol(qj,e.__scopeDialog);return p.modal?u.jsx(lo,{present:o||p.open,children:u.jsx(sae,{...d,ref:r})}):null});$z.displayName=qj;var rae=Yie("DialogOverlay.RemoveScroll"),sae=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(qj,s);return u.jsx(aw,{as:rae,allowPinchZoom:!0,shards:[d.contentRef],children:u.jsx(Cn.div,{"data-state":s2(d.open),...o,ref:r,style:{pointerEvents:"auto",...o.style}})})}),kp="DialogContent",Nz=R.forwardRef((e,r)=>{const s=Tz(kp,e.__scopeDialog),{forceMount:o=s.forceMount,...d}=e,p=ol(kp,e.__scopeDialog);return u.jsx(lo,{present:o||p.open,children:p.modal?u.jsx(iae,{...d,ref:r}):u.jsx(aae,{...d,ref:r})})});Nz.displayName=kp;var iae=R.forwardRef((e,r)=>{const s=ol(kp,e.__scopeDialog),o=R.useRef(null),d=zn(r,s.contentRef,o);return R.useEffect(()=>{const p=o.current;if(p)return kC(p)},[]),u.jsx(Dz,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,p=>{p.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,p=>{const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0;(m.button===2||g)&&p.preventDefault()}),onFocusOutside:$t(e.onFocusOutside,p=>p.preventDefault())})}),aae=R.forwardRef((e,r)=>{const s=ol(kp,e.__scopeDialog),o=R.useRef(!1),d=R.useRef(!1);return u.jsx(Dz,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{e.onCloseAutoFocus?.(p),p.defaultPrevented||(o.current||s.triggerRef.current?.focus(),p.preventDefault()),o.current=!1,d.current=!1},onInteractOutside:p=>{e.onInteractOutside?.(p),p.defaultPrevented||(o.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const m=p.target;s.triggerRef.current?.contains(m)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),Dz=R.forwardRef((e,r)=>{const{__scopeDialog:s,trapFocus:o,onOpenAutoFocus:d,onCloseAutoFocus:p,...m}=e,g=ol(kp,s),b=R.useRef(null),S=zn(r,b);return AC(),u.jsxs(u.Fragment,{children:[u.jsx(iw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:d,onUnmountAutoFocus:p,children:u.jsx(kg,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionId,"aria-labelledby":g.titleId,"data-state":s2(g.open),...m,ref:S,onDismiss:()=>g.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(lae,{titleId:g.titleId}),u.jsx(uae,{contentRef:b,descriptionId:g.descriptionId})]})]})}),r2="DialogTitle",Pz=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(r2,s);return u.jsx(Cn.h2,{id:d.titleId,...o,ref:r})});Pz.displayName=r2;var Mz="DialogDescription",Iz=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(Mz,s);return u.jsx(Cn.p,{id:d.descriptionId,...o,ref:r})});Iz.displayName=Mz;var Lz="DialogClose",zz=R.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,d=ol(Lz,s);return u.jsx(Cn.button,{type:"button",...o,ref:r,onClick:$t(e.onClick,()=>d.onOpenChange(!1))})});zz.displayName=Lz;function s2(e){return e?"open":"closed"}var Fz="DialogTitleWarning",[oae,qz]=fne(Fz,{contentName:kp,titleName:r2,docsSlug:"dialog"}),lae=({titleId:e})=>{const r=qz(Fz),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return R.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},cae="DialogDescriptionWarning",uae=({contentRef:e,descriptionId:r})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qz(cae).contentName}}.`;return R.useEffect(()=>{const d=e.current?.getAttribute("aria-describedby");r&&d&&(document.getElementById(r)||console.warn(o))},[o,e,r]),null},TC=Oz,Bz=Rz,_C=_z,$C=$z,NC=Nz,i2=Pz,a2=Iz,ow=zz,dae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gd=dae.reduce((e,r)=>{const s=Qb(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),ib='[cmdk-group=""]',HR='[cmdk-group-items=""]',hae='[cmdk-group-heading=""]',Uz='[cmdk-item=""]',CI=`${Uz}:not([aria-disabled="true"])`,BT="cmdk-item-select",Zm="data-value",pae=(e,r,s)=>nie(e,r,s),Kz=R.createContext(void 0),lw=()=>R.useContext(Kz),Vz=R.createContext(void 0),o2=()=>R.useContext(Vz),Hz=R.createContext(void 0),Gz=R.forwardRef((e,r)=>{let s=Wm(()=>{var Oe,ke;return{search:"",value:(ke=(Oe=e.value)!=null?Oe:e.defaultValue)!=null?ke:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Wm(()=>new Set),d=Wm(()=>new Map),p=Wm(()=>new Map),m=Wm(()=>new Set),g=Xz(e),{label:b,children:S,value:j,onValueChange:A,filter:k,shouldFilter:T,loop:M,disablePointerSelection:I=!1,vimBindings:q=!0,...G}=e,K=Vs(),X=Vs(),L=Vs(),ee=R.useRef(null),oe=jae();Rp(()=>{if(j!==void 0){let Oe=j.trim();s.current.value=Oe,Q.emit()}},[j]),Rp(()=>{oe(6,be)},[]);let Q=R.useMemo(()=>({subscribe:Oe=>(m.current.add(Oe),()=>m.current.delete(Oe)),snapshot:()=>s.current,setState:(Oe,ke,Ve)=>{var ie,De,Le,tt;if(!Object.is(s.current[Oe],ke)){if(s.current[Oe]=ke,Oe==="search")le(),je(),oe(1,ve);else if(Oe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let yt=document.getElementById(L);yt?yt.focus():(ie=document.getElementById(K))==null||ie.focus()}if(oe(7,()=>{var yt;s.current.selectedItemId=(yt=Ce())==null?void 0:yt.id,Q.emit()}),Ve||oe(5,be),((De=g.current)==null?void 0:De.value)!==void 0){let yt=ke??"";(tt=(Le=g.current).onValueChange)==null||tt.call(Le,yt);return}}Q.emit()}},emit:()=>{m.current.forEach(Oe=>Oe())}}),[]),ne=R.useMemo(()=>({value:(Oe,ke,Ve)=>{var ie;ke!==((ie=p.current.get(Oe))==null?void 0:ie.value)&&(p.current.set(Oe,{value:ke,keywords:Ve}),s.current.filtered.items.set(Oe,de(ke,Ve)),oe(2,()=>{je(),Q.emit()}))},item:(Oe,ke)=>(o.current.add(Oe),ke&&(d.current.has(ke)?d.current.get(ke).add(Oe):d.current.set(ke,new Set([Oe]))),oe(3,()=>{le(),je(),s.current.value||ve(),Q.emit()}),()=>{p.current.delete(Oe),o.current.delete(Oe),s.current.filtered.items.delete(Oe);let Ve=Ce();oe(4,()=>{le(),Ve?.getAttribute("id")===Oe&&ve(),Q.emit()})}),group:Oe=>(d.current.has(Oe)||d.current.set(Oe,new Set),()=>{p.current.delete(Oe),d.current.delete(Oe)}),filter:()=>g.current.shouldFilter,label:b||e["aria-label"],getDisablePointerSelection:()=>g.current.disablePointerSelection,listId:K,inputId:L,labelId:X,listInnerRef:ee}),[]);function de(Oe,ke){var Ve,ie;let De=(ie=(Ve=g.current)==null?void 0:Ve.filter)!=null?ie:pae;return Oe?De(Oe,s.current.search,ke):0}function je(){if(!s.current.search||g.current.shouldFilter===!1)return;let Oe=s.current.filtered.items,ke=[];s.current.filtered.groups.forEach(ie=>{let De=d.current.get(ie),Le=0;De.forEach(tt=>{let yt=Oe.get(tt);Le=Math.max(yt,Le)}),ke.push([ie,Le])});let Ve=ee.current;Ke().sort((ie,De)=>{var Le,tt;let yt=ie.getAttribute("id"),Ot=De.getAttribute("id");return((Le=Oe.get(Ot))!=null?Le:0)-((tt=Oe.get(yt))!=null?tt:0)}).forEach(ie=>{let De=ie.closest(HR);De?De.appendChild(ie.parentElement===De?ie:ie.closest(`${HR} > *`)):Ve.appendChild(ie.parentElement===Ve?ie:ie.closest(`${HR} > *`))}),ke.sort((ie,De)=>De[1]-ie[1]).forEach(ie=>{var De;let Le=(De=ee.current)==null?void 0:De.querySelector(`${ib}[${Zm}="${encodeURIComponent(ie[0])}"]`);Le?.parentElement.appendChild(Le)})}function ve(){let Oe=Ke().find(Ve=>Ve.getAttribute("aria-disabled")!=="true"),ke=Oe?.getAttribute(Zm);Q.setState("value",ke||void 0)}function le(){var Oe,ke,Ve,ie;if(!s.current.search||g.current.shouldFilter===!1){s.current.filtered.count=o.current.size;return}s.current.filtered.groups=new Set;let De=0;for(let Le of o.current){let tt=(ke=(Oe=p.current.get(Le))==null?void 0:Oe.value)!=null?ke:"",yt=(ie=(Ve=p.current.get(Le))==null?void 0:Ve.keywords)!=null?ie:[],Ot=de(tt,yt);s.current.filtered.items.set(Le,Ot),Ot>0&&De++}for(let[Le,tt]of d.current)for(let yt of tt)if(s.current.filtered.items.get(yt)>0){s.current.filtered.groups.add(Le);break}s.current.filtered.count=De}function be(){var Oe,ke,Ve;let ie=Ce();ie&&(((Oe=ie.parentElement)==null?void 0:Oe.firstChild)===ie&&((Ve=(ke=ie.closest(ib))==null?void 0:ke.querySelector(hae))==null||Ve.scrollIntoView({block:"nearest"})),ie.scrollIntoView({block:"nearest"}))}function Ce(){var Oe;return(Oe=ee.current)==null?void 0:Oe.querySelector(`${Uz}[aria-selected="true"]`)}function Ke(){var Oe;return Array.from(((Oe=ee.current)==null?void 0:Oe.querySelectorAll(CI))||[])}function ce(Oe){let ke=Ke()[Oe];ke&&Q.setState("value",ke.getAttribute(Zm))}function re(Oe){var ke;let Ve=Ce(),ie=Ke(),De=ie.findIndex(tt=>tt===Ve),Le=ie[De+Oe];(ke=g.current)!=null&&ke.loop&&(Le=De+Oe<0?ie[ie.length-1]:De+Oe===ie.length?ie[0]:ie[De+Oe]),Le&&Q.setState("value",Le.getAttribute(Zm))}function ue(Oe){let ke=Ce(),Ve=ke?.closest(ib),ie;for(;Ve&&!ie;)Ve=Oe>0?Sae(Ve,ib):Eae(Ve,ib),ie=Ve?.querySelector(CI);ie?Q.setState("value",ie.getAttribute(Zm)):re(Oe)}let _e=()=>ce(Ke().length-1),fe=Oe=>{Oe.preventDefault(),Oe.metaKey?_e():Oe.altKey?ue(1):re(1)},He=Oe=>{Oe.preventDefault(),Oe.metaKey?ce(0):Oe.altKey?ue(-1):re(-1)};return R.createElement(Gd.div,{ref:r,tabIndex:-1,...G,"cmdk-root":"",onKeyDown:Oe=>{var ke;(ke=G.onKeyDown)==null||ke.call(G,Oe);let Ve=Oe.nativeEvent.isComposing||Oe.keyCode===229;if(!(Oe.defaultPrevented||Ve))switch(Oe.key){case"n":case"j":{q&&Oe.ctrlKey&&fe(Oe);break}case"ArrowDown":{fe(Oe);break}case"p":case"k":{q&&Oe.ctrlKey&&He(Oe);break}case"ArrowUp":{He(Oe);break}case"Home":{Oe.preventDefault(),ce(0);break}case"End":{Oe.preventDefault(),_e();break}case"Enter":{Oe.preventDefault();let ie=Ce();if(ie){let De=new Event(BT);ie.dispatchEvent(De)}}}}},R.createElement("label",{"cmdk-label":"",htmlFor:ne.inputId,id:ne.labelId,style:Aae},b),DC(e,Oe=>R.createElement(Vz.Provider,{value:Q},R.createElement(Kz.Provider,{value:ne},Oe))))}),fae=R.forwardRef((e,r)=>{var s,o;let d=Vs(),p=R.useRef(null),m=R.useContext(Hz),g=lw(),b=Xz(e),S=(o=(s=b.current)==null?void 0:s.forceMount)!=null?o:m?.forceMount;Rp(()=>{if(!S)return g.item(d,m?.id)},[S]);let j=Yz(d,p,[e.value,e.children,p],e.keywords),A=o2(),k=Bd(oe=>oe.value&&oe.value===j.current),T=Bd(oe=>S||g.filter()===!1?!0:oe.search?oe.filtered.items.get(d)>0:!0);R.useEffect(()=>{let oe=p.current;if(!(!oe||e.disabled))return oe.addEventListener(BT,M),()=>oe.removeEventListener(BT,M)},[T,e.onSelect,e.disabled]);function M(){var oe,Q;I(),(Q=(oe=b.current).onSelect)==null||Q.call(oe,j.current)}function I(){A.setState("value",j.current,!0)}if(!T)return null;let{disabled:q,value:G,onSelect:K,forceMount:X,keywords:L,...ee}=e;return R.createElement(Gd.div,{ref:Li(p,r),...ee,id:d,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!k,"data-disabled":!!q,"data-selected":!!k,onPointerMove:q||g.getDisablePointerSelection()?void 0:I,onClick:q?void 0:M},e.children)}),mae=R.forwardRef((e,r)=>{let{heading:s,children:o,forceMount:d,...p}=e,m=Vs(),g=R.useRef(null),b=R.useRef(null),S=Vs(),j=lw(),A=Bd(T=>d||j.filter()===!1?!0:T.search?T.filtered.groups.has(m):!0);Rp(()=>j.group(m),[]),Yz(m,g,[e.value,e.heading,b]);let k=R.useMemo(()=>({id:m,forceMount:d}),[d]);return R.createElement(Gd.div,{ref:Li(g,r),...p,"cmdk-group":"",role:"presentation",hidden:A?void 0:!0},s&&R.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:S},s),DC(e,T=>R.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?S:void 0},R.createElement(Hz.Provider,{value:k},T))))}),gae=R.forwardRef((e,r)=>{let{alwaysRender:s,...o}=e,d=R.useRef(null),p=Bd(m=>!m.search);return!s&&!p?null:R.createElement(Gd.div,{ref:Li(d,r),...o,"cmdk-separator":"",role:"separator"})}),yae=R.forwardRef((e,r)=>{let{onValueChange:s,...o}=e,d=e.value!=null,p=o2(),m=Bd(S=>S.search),g=Bd(S=>S.selectedItemId),b=lw();return R.useEffect(()=>{e.value!=null&&p.setState("search",e.value)},[e.value]),R.createElement(Gd.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":g,id:b.inputId,type:"text",value:d?e.value:m,onChange:S=>{d||p.setState("search",S.target.value),s?.(S.target.value)}})}),vae=R.forwardRef((e,r)=>{let{children:s,label:o="Suggestions",...d}=e,p=R.useRef(null),m=R.useRef(null),g=Bd(S=>S.selectedItemId),b=lw();return R.useEffect(()=>{if(m.current&&p.current){let S=m.current,j=p.current,A,k=new ResizeObserver(()=>{A=requestAnimationFrame(()=>{let T=S.offsetHeight;j.style.setProperty("--cmdk-list-height",T.toFixed(1)+"px")})});return k.observe(S),()=>{cancelAnimationFrame(A),k.unobserve(S)}}},[]),R.createElement(Gd.div,{ref:Li(p,r),...d,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":g,"aria-label":o,id:b.listId},DC(e,S=>R.createElement("div",{ref:Li(m,b.listInnerRef),"cmdk-list-sizer":""},S)))}),xae=R.forwardRef((e,r)=>{let{open:s,onOpenChange:o,overlayClassName:d,contentClassName:p,container:m,...g}=e;return R.createElement(TC,{open:s,onOpenChange:o},R.createElement(_C,{container:m},R.createElement($C,{"cmdk-overlay":"",className:d}),R.createElement(NC,{"aria-label":e.label,"cmdk-dialog":"",className:p},R.createElement(Gz,{ref:r,...g}))))}),bae=R.forwardRef((e,r)=>Bd(s=>s.filtered.count===0)?R.createElement(Gd.div,{ref:r,...e,"cmdk-empty":"",role:"presentation"}):null),wae=R.forwardRef((e,r)=>{let{progress:s,children:o,label:d="Loading...",...p}=e;return R.createElement(Gd.div,{ref:r,...p,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":d},DC(e,m=>R.createElement("div",{"aria-hidden":!0},m)))}),$g=Object.assign(Gz,{List:vae,Item:fae,Input:yae,Group:mae,Separator:gae,Dialog:xae,Empty:bae,Loading:wae});function Sae(e,r){let s=e.nextElementSibling;for(;s;){if(s.matches(r))return s;s=s.nextElementSibling}}function Eae(e,r){let s=e.previousElementSibling;for(;s;){if(s.matches(r))return s;s=s.previousElementSibling}}function Xz(e){let r=R.useRef(e);return Rp(()=>{r.current=e}),r}var Rp=typeof window>"u"?R.useEffect:R.useLayoutEffect;function Wm(e){let r=R.useRef();return r.current===void 0&&(r.current=e()),r}function Bd(e){let r=o2(),s=()=>e(r.snapshot());return R.useSyncExternalStore(r.subscribe,s,s)}function Yz(e,r,s,o=[]){let d=R.useRef(),p=lw();return Rp(()=>{var m;let g=(()=>{var S;for(let j of s){if(typeof j=="string")return j.trim();if(typeof j=="object"&&"current"in j)return j.current?(S=j.current.textContent)==null?void 0:S.trim():d.current}})(),b=o.map(S=>S.trim());p.value(e,g,b),(m=r.current)==null||m.setAttribute(Zm,g),d.current=g}),d}var jae=()=>{let[e,r]=R.useState(),s=Wm(()=>new Map);return Rp(()=>{s.current.forEach(o=>o()),s.current=new Map},[e]),(o,d)=>{s.current.set(o,d),r({})}};function Cae(e){let r=e.type;return typeof r=="function"?r(e.props):"render"in r?r.render(e.props):e}function DC({asChild:e,children:r},s){return e&&R.isValidElement(r)?R.cloneElement(Cae(r),{ref:r.ref},s(r.props.children)):s(r)}var Aae={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function fn({...e}){return u.jsx(TC,{"data-slot":"dialog",...e})}function zi({...e}){return u.jsx(Bz,{"data-slot":"dialog-trigger",...e})}function Oae({...e}){return u.jsx(_C,{"data-slot":"dialog-portal",...e})}function Bj({...e}){return u.jsx(ow,{"data-slot":"dialog-close",...e})}function kae({className:e,...r}){return u.jsx($C,{"data-slot":"dialog-overlay",className:ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function mn({className:e,children:r,showCloseButton:s=!0,...o}){return u.jsxs(Oae,{"data-slot":"dialog-portal",children:[u.jsx(kae,{}),u.jsxs(NC,{"data-slot":"dialog-content",className:ft("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...o,children:[r,s&&u.jsxs(ow,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(q_,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function gn({className:e,...r}){return u.jsx("div",{"data-slot":"dialog-header",className:ft("flex flex-col gap-2 text-center sm:text-left",e),...r})}function Sn({className:e,...r}){return u.jsx("div",{"data-slot":"dialog-footer",className:ft("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function yn({className:e,...r}){return u.jsx(i2,{"data-slot":"dialog-title",className:ft("text-lg leading-none font-semibold",e),...r})}function GR({className:e,...r}){return u.jsx(a2,{"data-slot":"dialog-description",className:ft("text-muted-foreground text-sm",e),...r})}function Rae({className:e,...r}){return u.jsx($g,{"data-slot":"command",className:ft("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r})}function Tae({className:e,...r}){return u.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[u.jsx(Pa,{className:"size-4 shrink-0 opacity-50"}),u.jsx($g.Input,{"data-slot":"command-input",className:ft("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...r})]})}function _ae({className:e,...r}){return u.jsx($g.List,{"data-slot":"command-list",className:ft("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...r})}function $ae({...e}){return u.jsx($g.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Nae({className:e,...r}){return u.jsx($g.Group,{"data-slot":"command-group",className:ft("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...r})}function Dae({className:e,...r}){return u.jsx($g.Item,{"data-slot":"command-item",className:ft("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Pae(e){const r=Mae(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(Lae);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Mae(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Fae(d),g=zae(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Iae=Symbol("radix.slottable");function Lae(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Iae}function zae(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Fae(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var PC="Popover",[Zz]=al(PC,[Hd]),cw=Hd(),[qae,Xd]=Zz(PC),Wz=e=>{const{__scopePopover:r,children:s,open:o,defaultOpen:d,onOpenChange:p,modal:m=!1}=e,g=cw(r),b=R.useRef(null),[S,j]=R.useState(!1),[A,k]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:PC});return u.jsx(wC,{...g,children:u.jsx(qae,{scope:r,contentId:Vs(),triggerRef:b,open:A,onOpenChange:k,onOpenToggle:R.useCallback(()=>k(T=>!T),[k]),hasCustomAnchor:S,onCustomAnchorAdd:R.useCallback(()=>j(!0),[]),onCustomAnchorRemove:R.useCallback(()=>j(!1),[]),modal:m,children:s})})};Wz.displayName=PC;var Jz="PopoverAnchor",Bae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(Jz,s),p=cw(s),{onCustomAnchorAdd:m,onCustomAnchorRemove:g}=d;return R.useEffect(()=>(m(),()=>g()),[m,g]),u.jsx(tw,{...p,...o,ref:r})});Bae.displayName=Jz;var Qz="PopoverTrigger",e5=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(Qz,s),p=cw(s),m=zn(r,d.triggerRef),g=u.jsx(Cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d.open,"aria-controls":d.contentId,"data-state":i5(d.open),...o,ref:m,onClick:$t(e.onClick,d.onOpenToggle)});return d.hasCustomAnchor?g:u.jsx(tw,{asChild:!0,...p,children:g})});e5.displayName=Qz;var l2="PopoverPortal",[Uae,Kae]=Zz(l2,{forceMount:void 0}),t5=e=>{const{__scopePopover:r,forceMount:s,children:o,container:d}=e,p=Xd(l2,r);return u.jsx(Uae,{scope:r,forceMount:s,children:u.jsx(lo,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};t5.displayName=l2;var bg="PopoverContent",n5=R.forwardRef((e,r)=>{const s=Kae(bg,e.__scopePopover),{forceMount:o=s.forceMount,...d}=e,p=Xd(bg,e.__scopePopover);return u.jsx(lo,{present:o||p.open,children:p.modal?u.jsx(Hae,{...d,ref:r}):u.jsx(Gae,{...d,ref:r})})});n5.displayName=bg;var Vae=Pae("PopoverContent.RemoveScroll"),Hae=R.forwardRef((e,r)=>{const s=Xd(bg,e.__scopePopover),o=R.useRef(null),d=zn(r,o),p=R.useRef(!1);return R.useEffect(()=>{const m=o.current;if(m)return kC(m)},[]),u.jsx(aw,{as:Vae,allowPinchZoom:!0,children:u.jsx(r5,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,m=>{m.preventDefault(),p.current||s.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,m=>{const g=m.detail.originalEvent,b=g.button===0&&g.ctrlKey===!0,S=g.button===2||b;p.current=S},{checkForDefaultPrevented:!1}),onFocusOutside:$t(e.onFocusOutside,m=>m.preventDefault(),{checkForDefaultPrevented:!1})})})}),Gae=R.forwardRef((e,r)=>{const s=Xd(bg,e.__scopePopover),o=R.useRef(!1),d=R.useRef(!1);return u.jsx(r5,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:p=>{e.onCloseAutoFocus?.(p),p.defaultPrevented||(o.current||s.triggerRef.current?.focus(),p.preventDefault()),o.current=!1,d.current=!1},onInteractOutside:p=>{e.onInteractOutside?.(p),p.defaultPrevented||(o.current=!0,p.detail.originalEvent.type==="pointerdown"&&(d.current=!0));const m=p.target;s.triggerRef.current?.contains(m)&&p.preventDefault(),p.detail.originalEvent.type==="focusin"&&d.current&&p.preventDefault()}})}),r5=R.forwardRef((e,r)=>{const{__scopePopover:s,trapFocus:o,onOpenAutoFocus:d,onCloseAutoFocus:p,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:S,onInteractOutside:j,...A}=e,k=Xd(bg,s),T=cw(s);return AC(),u.jsx(iw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:d,onUnmountAutoFocus:p,children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:m,onInteractOutside:j,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:S,onDismiss:()=>k.onOpenChange(!1),children:u.jsx(SC,{"data-state":i5(k.open),role:"dialog",id:k.contentId,...T,...A,ref:r,style:{...A.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),s5="PopoverClose",Xae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=Xd(s5,s);return u.jsx(Cn.button,{type:"button",...o,ref:r,onClick:$t(e.onClick,()=>d.onOpenChange(!1))})});Xae.displayName=s5;var Yae="PopoverArrow",Zae=R.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,d=cw(s);return u.jsx(EC,{...d,...o,ref:r})});Zae.displayName=Yae;function i5(e){return e?"open":"closed"}var Wae=Wz,Jae=e5,Qae=t5,eoe=n5;function toe({...e}){return u.jsx(Wae,{"data-slot":"popover",...e})}function noe({...e}){return u.jsx(Jae,{"data-slot":"popover-trigger",...e})}function roe({className:e,align:r="center",sideOffset:s=4,...o}){return u.jsx(Qae,{children:u.jsx(eoe,{"data-slot":"popover-content",align:r,sideOffset:s,className:ft("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}const soe=({orgs:e})=>{const[r,s]=R.useState(!1),[o,d]=R.useState(Qo.get()??"");R.useEffect(()=>Qo.subscribe(m=>d(m??"")),[]);const p=e.find(m=>m.id===o);return u.jsxs(toe,{open:r,onOpenChange:s,children:[u.jsx(noe,{asChild:!0,children:u.jsxs(Fe,{variant:"ghost",className:"h-9 w-full justify-between px-2","aria-label":"Switch organization",children:[u.jsxs("span",{className:"flex items-center gap-2 truncate",children:[u.jsx(sL,{className:"h-4 w-4"}),u.jsx("span",{className:"truncate",children:p?.name??"Select org"})]}),u.jsx(AZ,{className:"ml-2 h-4 w-4 opacity-50"})]})}),u.jsx(roe,{className:"w-[280px] p-0",align:"start",children:u.jsxs(Rae,{children:[u.jsx(Tae,{placeholder:"Search orgs..."}),u.jsxs(_ae,{children:[u.jsx($ae,{children:"No orgs found."}),u.jsx(Nae,{heading:"Organizations",children:e.map(m=>u.jsxs(Dae,{value:m.id,onSelect:g=>{Qo.set(g),s(!1)},children:[u.jsx(iL,{className:ft("mr-2 h-4 w-4",o===m.id?"opacity-100":"opacity-0")}),u.jsx("span",{className:"truncate",children:m.name})]},m.id))})]})]})})]})},a5=R.createContext({});function ioe(e){const r=R.useRef(null);return r.current===null&&(r.current=e()),r.current}const c2=typeof window<"u",aoe=c2?R.useLayoutEffect:R.useEffect,u2=R.createContext(null);function d2(e,r){e.indexOf(r)===-1&&e.push(r)}function h2(e,r){const s=e.indexOf(r);s>-1&&e.splice(s,1)}const gu=(e,r,s)=>s>r?r:s<e?e:s;let p2=()=>{};const yu={},o5=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function l5(e){return typeof e=="object"&&e!==null}const c5=e=>/^0[^.\s]+$/u.test(e);function f2(e){let r;return()=>(r===void 0&&(r=e()),r)}const so=e=>e,ooe=(e,r)=>s=>r(e(s)),uw=(...e)=>e.reduce(ooe),qb=(e,r,s)=>{const o=r-e;return o===0?1:(s-e)/o};class m2{constructor(){this.subscriptions=[]}add(r){return d2(this.subscriptions,r),()=>h2(this.subscriptions,r)}notify(r,s,o){const d=this.subscriptions.length;if(d)if(d===1)this.subscriptions[0](r,s,o);else for(let p=0;p<d;p++){const m=this.subscriptions[p];m&&m(r,s,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ic=e=>e*1e3,ro=e=>e/1e3;function u5(e,r){return r?e*(1e3/r):0}const d5=(e,r,s)=>(((1-3*s+3*r)*e+(3*s-6*r))*e+3*r)*e,loe=1e-7,coe=12;function uoe(e,r,s,o,d){let p,m,g=0;do m=r+(s-r)/2,p=d5(m,o,d)-e,p>0?s=m:r=m;while(Math.abs(p)>loe&&++g<coe);return m}function dw(e,r,s,o){if(e===r&&s===o)return so;const d=p=>uoe(p,0,1,e,s);return p=>p===0||p===1?p:d5(d(p),r,o)}const h5=e=>r=>r<=.5?e(2*r)/2:(2-e(2*(1-r)))/2,p5=e=>r=>1-e(1-r),f5=dw(.33,1.53,.69,.99),g2=p5(f5),m5=h5(g2),g5=e=>(e*=2)<1?.5*g2(e):.5*(2-Math.pow(2,-10*(e-1))),y2=e=>1-Math.sin(Math.acos(e)),y5=p5(y2),v5=h5(y2),doe=dw(.42,0,1,1),hoe=dw(0,0,.58,1),x5=dw(.42,0,.58,1),poe=e=>Array.isArray(e)&&typeof e[0]!="number",b5=e=>Array.isArray(e)&&typeof e[0]=="number",foe={linear:so,easeIn:doe,easeInOut:x5,easeOut:hoe,circIn:y2,circInOut:v5,circOut:y5,backIn:g2,backInOut:m5,backOut:f5,anticipate:g5},moe=e=>typeof e=="string",AI=e=>{if(b5(e)){p2(e.length===4);const[r,s,o,d]=e;return dw(r,s,o,d)}else if(moe(e))return foe[e];return e},WE=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function goe(e,r){let s=new Set,o=new Set,d=!1,p=!1;const m=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function b(j){m.has(j)&&(S.schedule(j),e()),j(g)}const S={schedule:(j,A=!1,k=!1)=>{const M=k&&d?s:o;return A&&m.add(j),M.has(j)||M.add(j),j},cancel:j=>{o.delete(j),m.delete(j)},process:j=>{if(g=j,d){p=!0;return}d=!0,[s,o]=[o,s],s.forEach(b),s.clear(),d=!1,p&&(p=!1,S.process(j))}};return S}const yoe=40;function w5(e,r){let s=!1,o=!0;const d={delta:0,timestamp:0,isProcessing:!1},p=()=>s=!0,m=WE.reduce((X,L)=>(X[L]=goe(p),X),{}),{setup:g,read:b,resolveKeyframes:S,preUpdate:j,update:A,preRender:k,render:T,postRender:M}=m,I=()=>{const X=yu.useManualTiming?d.timestamp:performance.now();s=!1,yu.useManualTiming||(d.delta=o?1e3/60:Math.max(Math.min(X-d.timestamp,yoe),1)),d.timestamp=X,d.isProcessing=!0,g.process(d),b.process(d),S.process(d),j.process(d),A.process(d),k.process(d),T.process(d),M.process(d),d.isProcessing=!1,s&&r&&(o=!1,e(I))},q=()=>{s=!0,o=!0,d.isProcessing||e(I)};return{schedule:WE.reduce((X,L)=>{const ee=m[L];return X[L]=(oe,Q=!1,ne=!1)=>(s||q(),ee.schedule(oe,Q,ne)),X},{}),cancel:X=>{for(let L=0;L<WE.length;L++)m[WE[L]].cancel(X)},state:d,steps:m}}const{schedule:_r,cancel:Ud,state:Us,steps:XR}=w5(typeof requestAnimationFrame<"u"?requestAnimationFrame:so,!0);let vj;function voe(){vj=void 0}const da={now:()=>(vj===void 0&&da.set(Us.isProcessing||yu.useManualTiming?Us.timestamp:performance.now()),vj),set:e=>{vj=e,queueMicrotask(voe)}},S5=e=>r=>typeof r=="string"&&r.startsWith(e),E5=S5("--"),xoe=S5("var(--"),v2=e=>xoe(e)?boe.test(e.split("/*")[0].trim()):!1,boe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ng={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Bb={...Ng,transform:e=>gu(0,1,e)},JE={...Ng,default:1},Tb=e=>Math.round(e*1e5)/1e5,x2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function woe(e){return e==null}const Soe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,b2=(e,r)=>s=>!!(typeof s=="string"&&Soe.test(s)&&s.startsWith(e)||r&&!woe(s)&&Object.prototype.hasOwnProperty.call(s,r)),j5=(e,r,s)=>o=>{if(typeof o!="string")return o;const[d,p,m,g]=o.match(x2);return{[e]:parseFloat(d),[r]:parseFloat(p),[s]:parseFloat(m),alpha:g!==void 0?parseFloat(g):1}},Eoe=e=>gu(0,255,e),YR={...Ng,transform:e=>Math.round(Eoe(e))},xp={test:b2("rgb","red"),parse:j5("red","green","blue"),transform:({red:e,green:r,blue:s,alpha:o=1})=>"rgba("+YR.transform(e)+", "+YR.transform(r)+", "+YR.transform(s)+", "+Tb(Bb.transform(o))+")"};function joe(e){let r="",s="",o="",d="";return e.length>5?(r=e.substring(1,3),s=e.substring(3,5),o=e.substring(5,7),d=e.substring(7,9)):(r=e.substring(1,2),s=e.substring(2,3),o=e.substring(3,4),d=e.substring(4,5),r+=r,s+=s,o+=o,d+=d),{red:parseInt(r,16),green:parseInt(s,16),blue:parseInt(o,16),alpha:d?parseInt(d,16)/255:1}}const UT={test:b2("#"),parse:joe,transform:xp.transform},hw=e=>({test:r=>typeof r=="string"&&r.endsWith(e)&&r.split(" ").length===1,parse:parseFloat,transform:r=>`${r}${e}`}),Md=hw("deg"),ac=hw("%"),tn=hw("px"),Coe=hw("vh"),Aoe=hw("vw"),OI={...ac,parse:e=>ac.parse(e)/100,transform:e=>ac.transform(e*100)},ig={test:b2("hsl","hue"),parse:j5("hue","saturation","lightness"),transform:({hue:e,saturation:r,lightness:s,alpha:o=1})=>"hsla("+Math.round(e)+", "+ac.transform(Tb(r))+", "+ac.transform(Tb(s))+", "+Tb(Bb.transform(o))+")"},fs={test:e=>xp.test(e)||UT.test(e)||ig.test(e),parse:e=>xp.test(e)?xp.parse(e):ig.test(e)?ig.parse(e):UT.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xp.transform(e):ig.transform(e),getAnimatableNone:e=>{const r=fs.parse(e);return r.alpha=0,fs.transform(r)}},Ooe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function koe(e){return isNaN(e)&&typeof e=="string"&&(e.match(x2)?.length||0)+(e.match(Ooe)?.length||0)>0}const C5="number",A5="color",Roe="var",Toe="var(",kI="${}",_oe=/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 Ub(e){const r=e.toString(),s=[],o={color:[],number:[],var:[]},d=[];let p=0;const g=r.replace(_oe,b=>(fs.test(b)?(o.color.push(p),d.push(A5),s.push(fs.parse(b))):b.startsWith(Toe)?(o.var.push(p),d.push(Roe),s.push(b)):(o.number.push(p),d.push(C5),s.push(parseFloat(b))),++p,kI)).split(kI);return{values:s,split:g,indexes:o,types:d}}function O5(e){return Ub(e).values}function k5(e){const{split:r,types:s}=Ub(e),o=r.length;return d=>{let p="";for(let m=0;m<o;m++)if(p+=r[m],d[m]!==void 0){const g=s[m];g===C5?p+=Tb(d[m]):g===A5?p+=fs.transform(d[m]):p+=d[m]}return p}}const $oe=e=>typeof e=="number"?0:fs.test(e)?fs.getAnimatableNone(e):e;function Noe(e){const r=O5(e);return k5(e)(r.map($oe))}const Kd={test:koe,parse:O5,createTransformer:k5,getAnimatableNone:Noe};function ZR(e,r,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(r-e)*6*s:s<1/2?r:s<2/3?e+(r-e)*(2/3-s)*6:e}function Doe({hue:e,saturation:r,lightness:s,alpha:o}){e/=360,r/=100,s/=100;let d=0,p=0,m=0;if(!r)d=p=m=s;else{const g=s<.5?s*(1+r):s+r-s*r,b=2*s-g;d=ZR(b,g,e+1/3),p=ZR(b,g,e),m=ZR(b,g,e-1/3)}return{red:Math.round(d*255),green:Math.round(p*255),blue:Math.round(m*255),alpha:o}}function Uj(e,r){return s=>s>0?r:e}const Lr=(e,r,s)=>e+(r-e)*s,WR=(e,r,s)=>{const o=e*e,d=s*(r*r-o)+o;return d<0?0:Math.sqrt(d)},Poe=[UT,xp,ig],Moe=e=>Poe.find(r=>r.test(e));function RI(e){const r=Moe(e);if(!r)return!1;let s=r.parse(e);return r===ig&&(s=Doe(s)),s}const TI=(e,r)=>{const s=RI(e),o=RI(r);if(!s||!o)return Uj(e,r);const d={...s};return p=>(d.red=WR(s.red,o.red,p),d.green=WR(s.green,o.green,p),d.blue=WR(s.blue,o.blue,p),d.alpha=Lr(s.alpha,o.alpha,p),xp.transform(d))},KT=new Set(["none","hidden"]);function Ioe(e,r){return KT.has(e)?s=>s<=0?e:r:s=>s>=1?r:e}function Loe(e,r){return s=>Lr(e,r,s)}function w2(e){return typeof e=="number"?Loe:typeof e=="string"?v2(e)?Uj:fs.test(e)?TI:qoe:Array.isArray(e)?R5:typeof e=="object"?fs.test(e)?TI:zoe:Uj}function R5(e,r){const s=[...e],o=s.length,d=e.map((p,m)=>w2(p)(p,r[m]));return p=>{for(let m=0;m<o;m++)s[m]=d[m](p);return s}}function zoe(e,r){const s={...e,...r},o={};for(const d in s)e[d]!==void 0&&r[d]!==void 0&&(o[d]=w2(e[d])(e[d],r[d]));return d=>{for(const p in o)s[p]=o[p](d);return s}}function Foe(e,r){const s=[],o={color:0,var:0,number:0};for(let d=0;d<r.values.length;d++){const p=r.types[d],m=e.indexes[p][o[p]],g=e.values[m]??0;s[d]=g,o[p]++}return s}const qoe=(e,r)=>{const s=Kd.createTransformer(r),o=Ub(e),d=Ub(r);return o.indexes.var.length===d.indexes.var.length&&o.indexes.color.length===d.indexes.color.length&&o.indexes.number.length>=d.indexes.number.length?KT.has(e)&&!d.values.length||KT.has(r)&&!o.values.length?Ioe(e,r):uw(R5(Foe(o,d),d.values),s):Uj(e,r)};function T5(e,r,s){return typeof e=="number"&&typeof r=="number"&&typeof s=="number"?Lr(e,r,s):w2(e)(e,r)}const Boe=e=>{const r=({timestamp:s})=>e(s);return{start:(s=!0)=>_r.update(r,s),stop:()=>Ud(r),now:()=>Us.isProcessing?Us.timestamp:da.now()}},_5=(e,r,s=10)=>{let o="";const d=Math.max(Math.round(r/s),2);for(let p=0;p<d;p++)o+=Math.round(e(p/(d-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Kj=2e4;function S2(e){let r=0;const s=50;let o=e.next(r);for(;!o.done&&r<Kj;)r+=s,o=e.next(r);return r>=Kj?1/0:r}function Uoe(e,r=100,s){const o=s({...e,keyframes:[0,r]}),d=Math.min(S2(o),Kj);return{type:"keyframes",ease:p=>o.next(d*p).value/r,duration:ro(d)}}const Koe=5;function $5(e,r,s){const o=Math.max(r-Koe,0);return u5(s-e(o),r-o)}const Vr={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},JR=.001;function Voe({duration:e=Vr.duration,bounce:r=Vr.bounce,velocity:s=Vr.velocity,mass:o=Vr.mass}){let d,p,m=1-r;m=gu(Vr.minDamping,Vr.maxDamping,m),e=gu(Vr.minDuration,Vr.maxDuration,ro(e)),m<1?(d=S=>{const j=S*m,A=j*e,k=j-s,T=VT(S,m),M=Math.exp(-A);return JR-k/T*M},p=S=>{const A=S*m*e,k=A*s+s,T=Math.pow(m,2)*Math.pow(S,2)*e,M=Math.exp(-A),I=VT(Math.pow(S,2),m);return(-d(S)+JR>0?-1:1)*((k-T)*M)/I}):(d=S=>{const j=Math.exp(-S*e),A=(S-s)*e+1;return-JR+j*A},p=S=>{const j=Math.exp(-S*e),A=(s-S)*(e*e);return j*A});const g=5/e,b=Goe(d,p,g);if(e=ic(e),isNaN(b))return{stiffness:Vr.stiffness,damping:Vr.damping,duration:e};{const S=Math.pow(b,2)*o;return{stiffness:S,damping:m*2*Math.sqrt(o*S),duration:e}}}const Hoe=12;function Goe(e,r,s){let o=s;for(let d=1;d<Hoe;d++)o=o-e(o)/r(o);return o}function VT(e,r){return e*Math.sqrt(1-r*r)}const Xoe=["duration","bounce"],Yoe=["stiffness","damping","mass"];function _I(e,r){return r.some(s=>e[s]!==void 0)}function Zoe(e){let r={velocity:Vr.velocity,stiffness:Vr.stiffness,damping:Vr.damping,mass:Vr.mass,isResolvedFromDuration:!1,...e};if(!_I(e,Yoe)&&_I(e,Xoe))if(e.visualDuration){const s=e.visualDuration,o=2*Math.PI/(s*1.2),d=o*o,p=2*gu(.05,1,1-(e.bounce||0))*Math.sqrt(d);r={...r,mass:Vr.mass,stiffness:d,damping:p}}else{const s=Voe(e);r={...r,...s,mass:Vr.mass},r.isResolvedFromDuration=!0}return r}function Vj(e=Vr.visualDuration,r=Vr.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:r}:e;let{restSpeed:o,restDelta:d}=s;const p=s.keyframes[0],m=s.keyframes[s.keyframes.length-1],g={done:!1,value:p},{stiffness:b,damping:S,mass:j,duration:A,velocity:k,isResolvedFromDuration:T}=Zoe({...s,velocity:-ro(s.velocity||0)}),M=k||0,I=S/(2*Math.sqrt(b*j)),q=m-p,G=ro(Math.sqrt(b/j)),K=Math.abs(q)<5;o||(o=K?Vr.restSpeed.granular:Vr.restSpeed.default),d||(d=K?Vr.restDelta.granular:Vr.restDelta.default);let X;if(I<1){const ee=VT(G,I);X=oe=>{const Q=Math.exp(-I*G*oe);return m-Q*((M+I*G*q)/ee*Math.sin(ee*oe)+q*Math.cos(ee*oe))}}else if(I===1)X=ee=>m-Math.exp(-G*ee)*(q+(M+G*q)*ee);else{const ee=G*Math.sqrt(I*I-1);X=oe=>{const Q=Math.exp(-I*G*oe),ne=Math.min(ee*oe,300);return m-Q*((M+I*G*q)*Math.sinh(ne)+ee*q*Math.cosh(ne))/ee}}const L={calculatedDuration:T&&A||null,next:ee=>{const oe=X(ee);if(T)g.done=ee>=A;else{let Q=ee===0?M:0;I<1&&(Q=ee===0?ic(M):$5(X,ee,oe));const ne=Math.abs(Q)<=o,de=Math.abs(m-oe)<=d;g.done=ne&&de}return g.value=g.done?m:oe,g},toString:()=>{const ee=Math.min(S2(L),Kj),oe=_5(Q=>L.next(ee*Q).value,ee,30);return ee+"ms "+oe},toTransition:()=>{}};return L}Vj.applyToOptions=e=>{const r=Uoe(e,100,Vj);return e.ease=r.ease,e.duration=ic(r.duration),e.type="keyframes",e};function HT({keyframes:e,velocity:r=0,power:s=.8,timeConstant:o=325,bounceDamping:d=10,bounceStiffness:p=500,modifyTarget:m,min:g,max:b,restDelta:S=.5,restSpeed:j}){const A=e[0],k={done:!1,value:A},T=ne=>g!==void 0&&ne<g||b!==void 0&&ne>b,M=ne=>g===void 0?b:b===void 0||Math.abs(g-ne)<Math.abs(b-ne)?g:b;let I=s*r;const q=A+I,G=m===void 0?q:m(q);G!==q&&(I=G-A);const K=ne=>-I*Math.exp(-ne/o),X=ne=>G+K(ne),L=ne=>{const de=K(ne),je=X(ne);k.done=Math.abs(de)<=S,k.value=k.done?G:je};let ee,oe;const Q=ne=>{T(k.value)&&(ee=ne,oe=Vj({keyframes:[k.value,M(k.value)],velocity:$5(X,ne,k.value),damping:d,stiffness:p,restDelta:S,restSpeed:j}))};return Q(0),{calculatedDuration:null,next:ne=>{let de=!1;return!oe&&ee===void 0&&(de=!0,L(ne),Q(ne)),ee!==void 0&&ne>=ee?oe.next(ne-ee):(!de&&L(ne),k)}}}function Woe(e,r,s){const o=[],d=s||yu.mix||T5,p=e.length-1;for(let m=0;m<p;m++){let g=d(e[m],e[m+1]);if(r){const b=Array.isArray(r)?r[m]||so:r;g=uw(b,g)}o.push(g)}return o}function Joe(e,r,{clamp:s=!0,ease:o,mixer:d}={}){const p=e.length;if(p2(p===r.length),p===1)return()=>r[0];if(p===2&&r[0]===r[1])return()=>r[1];const m=e[0]===e[1];e[0]>e[p-1]&&(e=[...e].reverse(),r=[...r].reverse());const g=Woe(r,o,d),b=g.length,S=j=>{if(m&&j<e[0])return r[0];let A=0;if(b>1)for(;A<e.length-2&&!(j<e[A+1]);A++);const k=qb(e[A],e[A+1],j);return g[A](k)};return s?j=>S(gu(e[0],e[p-1],j)):S}function Qoe(e,r){const s=e[e.length-1];for(let o=1;o<=r;o++){const d=qb(0,r,o);e.push(Lr(s,1,d))}}function ele(e){const r=[0];return Qoe(r,e.length-1),r}function tle(e,r){return e.map(s=>s*r)}function nle(e,r){return e.map(()=>r||x5).splice(0,e.length-1)}function _b({duration:e=300,keyframes:r,times:s,ease:o="easeInOut"}){const d=poe(o)?o.map(AI):AI(o),p={done:!1,value:r[0]},m=tle(s&&s.length===r.length?s:ele(r),e),g=Joe(m,r,{ease:Array.isArray(d)?d:nle(r,d)});return{calculatedDuration:e,next:b=>(p.value=g(b),p.done=b>=e,p)}}const rle=e=>e!==null;function E2(e,{repeat:r,repeatType:s="loop"},o,d=1){const p=e.filter(rle),g=d<0||r&&s!=="loop"&&r%2===1?0:p.length-1;return!g||o===void 0?p[g]:o}const sle={decay:HT,inertia:HT,tween:_b,keyframes:_b,spring:Vj};function N5(e){typeof e.type=="string"&&(e.type=sle[e.type])}class j2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(r=>{this.resolve=r})}notifyFinished(){this.resolve()}then(r,s){return this.finished.then(r,s)}}const ile=e=>e/100;class C2 extends j2{constructor(r){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==da.now()&&this.tick(da.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=r,this.initAnimation(),this.play(),r.autoplay===!1&&this.pause()}initAnimation(){const{options:r}=this;N5(r);const{type:s=_b,repeat:o=0,repeatDelay:d=0,repeatType:p,velocity:m=0}=r;let{keyframes:g}=r;const b=s||_b;b!==_b&&typeof g[0]!="number"&&(this.mixKeyframes=uw(ile,T5(g[0],g[1])),g=[0,100]);const S=b({...r,keyframes:g});p==="mirror"&&(this.mirroredGenerator=b({...r,keyframes:[...g].reverse(),velocity:-m})),S.calculatedDuration===null&&(S.calculatedDuration=S2(S));const{calculatedDuration:j}=S;this.calculatedDuration=j,this.resolvedDuration=j+d,this.totalDuration=this.resolvedDuration*(o+1)-d,this.generator=S}updateTime(r){const s=Math.round(r-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(r,s=!1){const{generator:o,totalDuration:d,mixKeyframes:p,mirroredGenerator:m,resolvedDuration:g,calculatedDuration:b}=this;if(this.startTime===null)return o.next(0);const{delay:S=0,keyframes:j,repeat:A,repeatType:k,repeatDelay:T,type:M,onUpdate:I,finalKeyframe:q}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,r):this.speed<0&&(this.startTime=Math.min(r-d/this.speed,this.startTime)),s?this.currentTime=r:this.updateTime(r);const G=this.currentTime-S*(this.playbackSpeed>=0?1:-1),K=this.playbackSpeed>=0?G<0:G>d;this.currentTime=Math.max(G,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let X=this.currentTime,L=o;if(A){const ne=Math.min(this.currentTime,d)/g;let de=Math.floor(ne),je=ne%1;!je&&ne>=1&&(je=1),je===1&&de--,de=Math.min(de,A+1),!!(de%2)&&(k==="reverse"?(je=1-je,T&&(je-=T/g)):k==="mirror"&&(L=m)),X=gu(0,1,je)*g}const ee=K?{done:!1,value:j[0]}:L.next(X);p&&(ee.value=p(ee.value));let{done:oe}=ee;!K&&b!==null&&(oe=this.playbackSpeed>=0?this.currentTime>=d:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&oe);return Q&&M!==HT&&(ee.value=E2(j,this.options,q,this.speed)),I&&I(ee.value),Q&&this.finish(),ee}then(r,s){return this.finished.then(r,s)}get duration(){return ro(this.calculatedDuration)}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+ro(r)}get time(){return ro(this.currentTime)}set time(r){r=ic(r),this.currentTime=r,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=r:this.driver&&(this.startTime=this.driver.now()-r/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(r){this.updateTime(da.now());const s=this.playbackSpeed!==r;this.playbackSpeed=r,s&&(this.time=ro(this.currentTime))}play(){if(this.isStopped)return;const{driver:r=Boe,startTime:s}=this.options;this.driver||(this.driver=r(d=>this.tick(d))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=s??o),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(da.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(r){return this.startTime=0,this.tick(r,!0)}attachTimeline(r){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),r.observe(this)}}function ale(e){for(let r=1;r<e.length;r++)e[r]??(e[r]=e[r-1])}const bp=e=>e*180/Math.PI,GT=e=>{const r=bp(Math.atan2(e[1],e[0]));return XT(r)},ole={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:GT,rotateZ:GT,skewX:e=>bp(Math.atan(e[1])),skewY:e=>bp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},XT=e=>(e=e%360,e<0&&(e+=360),e),$I=GT,NI=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),DI=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lle={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:NI,scaleY:DI,scale:e=>(NI(e)+DI(e))/2,rotateX:e=>XT(bp(Math.atan2(e[6],e[5]))),rotateY:e=>XT(bp(Math.atan2(-e[2],e[0]))),rotateZ:$I,rotate:$I,skewX:e=>bp(Math.atan(e[4])),skewY:e=>bp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function YT(e){return e.includes("scale")?1:0}function ZT(e,r){if(!e||e==="none")return YT(r);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,d;if(s)o=lle,d=s;else{const g=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=ole,d=g}if(!d)return YT(r);const p=o[r],m=d[1].split(",").map(ule);return typeof p=="function"?p(m):m[p]}const cle=(e,r)=>{const{transform:s="none"}=getComputedStyle(e);return ZT(s,r)};function ule(e){return parseFloat(e.trim())}const Dg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pg=new Set(Dg),PI=e=>e===Ng||e===tn,dle=new Set(["x","y","z"]),hle=Dg.filter(e=>!dle.has(e));function ple(e){const r=[];return hle.forEach(s=>{const o=e.getValue(s);o!==void 0&&(r.push([s,o.get()]),o.set(s.startsWith("scale")?1:0))}),r}const Sp={width:({x:e},{paddingLeft:r="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),height:({y:e},{paddingTop:r="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),top:(e,{top:r})=>parseFloat(r),left:(e,{left:r})=>parseFloat(r),bottom:({y:e},{top:r})=>parseFloat(r)+(e.max-e.min),right:({x:e},{left:r})=>parseFloat(r)+(e.max-e.min),x:(e,{transform:r})=>ZT(r,"x"),y:(e,{transform:r})=>ZT(r,"y")};Sp.translateX=Sp.x;Sp.translateY=Sp.y;const Ep=new Set;let WT=!1,JT=!1,QT=!1;function D5(){if(JT){const e=Array.from(Ep).filter(o=>o.needsMeasurement),r=new Set(e.map(o=>o.element)),s=new Map;r.forEach(o=>{const d=ple(o);d.length&&(s.set(o,d),o.render())}),e.forEach(o=>o.measureInitialState()),r.forEach(o=>{o.render();const d=s.get(o);d&&d.forEach(([p,m])=>{o.getValue(p)?.set(m)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}JT=!1,WT=!1,Ep.forEach(e=>e.complete(QT)),Ep.clear()}function P5(){Ep.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(JT=!0)})}function fle(){QT=!0,P5(),D5(),QT=!1}class A2{constructor(r,s,o,d,p,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...r],this.onComplete=s,this.name=o,this.motionValue=d,this.element=p,this.isAsync=m}scheduleResolve(){this.state="scheduled",this.isAsync?(Ep.add(this),WT||(WT=!0,_r.read(P5),_r.resolveKeyframes(D5))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:r,name:s,element:o,motionValue:d}=this;if(r[0]===null){const p=d?.get(),m=r[r.length-1];if(p!==void 0)r[0]=p;else if(o&&s){const g=o.readValue(s,m);g!=null&&(r[0]=g)}r[0]===void 0&&(r[0]=m),d&&p===void 0&&d.set(r[0])}ale(r)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(r=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,r),Ep.delete(this)}cancel(){this.state==="scheduled"&&(Ep.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const mle=e=>e.startsWith("--");function gle(e,r,s){mle(r)?e.style.setProperty(r,s):e.style[r]=s}const yle=f2(()=>window.ScrollTimeline!==void 0),vle={};function xle(e,r){const s=f2(e);return()=>vle[r]??s()}const M5=xle(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wb=([e,r,s,o])=>`cubic-bezier(${e}, ${r}, ${s}, ${o})`,MI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wb([0,.65,.55,1]),circOut:wb([.55,0,1,.45]),backIn:wb([.31,.01,.66,-.59]),backOut:wb([.33,1.53,.69,.99])};function I5(e,r){if(e)return typeof e=="function"?M5()?_5(e,r):"ease-out":b5(e)?wb(e):Array.isArray(e)?e.map(s=>I5(s,r)||MI.easeOut):MI[e]}function ble(e,r,s,{delay:o=0,duration:d=300,repeat:p=0,repeatType:m="loop",ease:g="easeOut",times:b}={},S=void 0){const j={[r]:s};b&&(j.offset=b);const A=I5(g,d);Array.isArray(A)&&(j.easing=A);const k={delay:o,duration:d,easing:Array.isArray(A)?"linear":A,fill:"both",iterations:p+1,direction:m==="reverse"?"alternate":"normal"};return S&&(k.pseudoElement=S),e.animate(j,k)}function L5(e){return typeof e=="function"&&"applyToOptions"in e}function wle({type:e,...r}){return L5(e)&&M5()?e.applyToOptions(r):(r.duration??(r.duration=300),r.ease??(r.ease="easeOut"),r)}class Sle extends j2{constructor(r){if(super(),this.finishedTime=null,this.isStopped=!1,!r)return;const{element:s,name:o,keyframes:d,pseudoElement:p,allowFlatten:m=!1,finalKeyframe:g,onComplete:b}=r;this.isPseudoElement=!!p,this.allowFlatten=m,this.options=r,p2(typeof r.type!="string");const S=wle(r);this.animation=ble(s,o,d,S,p),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!p){const j=E2(d,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(j):gle(s,o,j),this.animation.cancel()}b?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:r}=this;r==="idle"||r==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const r=this.animation.effect?.getComputedTiming?.().duration||0;return ro(Number(r))}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+ro(r)}get time(){return ro(Number(this.animation.currentTime)||0)}set time(r){this.finishedTime=null,this.animation.currentTime=ic(r)}get speed(){return this.animation.playbackRate}set speed(r){r<0&&(this.finishedTime=null),this.animation.playbackRate=r}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(r){this.animation.startTime=r}attachTimeline({timeline:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,r&&yle()?(this.animation.timeline=r,so):s(this)}}const z5={anticipate:g5,backInOut:m5,circInOut:v5};function Ele(e){return e in z5}function jle(e){typeof e.ease=="string"&&Ele(e.ease)&&(e.ease=z5[e.ease])}const II=10;class Cle extends Sle{constructor(r){jle(r),N5(r),super(r),r.startTime&&(this.startTime=r.startTime),this.options=r}updateMotionValue(r){const{motionValue:s,onUpdate:o,onComplete:d,element:p,...m}=this.options;if(!s)return;if(r!==void 0){s.set(r);return}const g=new C2({...m,autoplay:!1}),b=ic(this.finishedTime??this.time);s.setWithVelocity(g.sample(b-II).value,g.sample(b).value,II),g.stop()}}const LI=(e,r)=>r==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Kd.test(e)||e==="0")&&!e.startsWith("url("));function Ale(e){const r=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==r)return!0}function Ole(e,r,s,o){const d=e[0];if(d===null)return!1;if(r==="display"||r==="visibility")return!0;const p=e[e.length-1],m=LI(d,r),g=LI(p,r);return!m||!g?!1:Ale(e)||(s==="spring"||L5(s))&&o}function e_(e){e.duration=0,e.type="keyframes"}const kle=new Set(["opacity","clipPath","filter","transform"]),Rle=f2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tle(e){const{motionValue:r,name:s,repeatDelay:o,repeatType:d,damping:p,type:m}=e;if(!(r?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:b,transformTemplate:S}=r.owner.getProps();return Rle()&&s&&kle.has(s)&&(s!=="transform"||!S)&&!b&&!o&&d!=="mirror"&&p!==0&&m!=="inertia"}const _le=40;class $le extends j2{constructor({autoplay:r=!0,delay:s=0,type:o="keyframes",repeat:d=0,repeatDelay:p=0,repeatType:m="loop",keyframes:g,name:b,motionValue:S,element:j,...A}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=da.now();const k={autoplay:r,delay:s,type:o,repeat:d,repeatDelay:p,repeatType:m,name:b,motionValue:S,element:j,...A},T=j?.KeyframeResolver||A2;this.keyframeResolver=new T(g,(M,I,q)=>this.onKeyframesResolved(M,I,k,!q),b,S,j),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(r,s,o,d){this.keyframeResolver=void 0;const{name:p,type:m,velocity:g,delay:b,isHandoff:S,onUpdate:j}=o;this.resolvedAt=da.now(),Ole(r,p,m,g)||((yu.instantAnimations||!b)&&j?.(E2(r,o,s)),r[0]=r[r.length-1],e_(o),o.repeat=0);const k={startTime:d?this.resolvedAt?this.resolvedAt-this.createdAt>_le?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...o,keyframes:r},T=!S&&Tle(k)?new Cle({...k,element:k.motionValue.owner.current}):new C2(k);T.finished.then(()=>this.notifyFinished()).catch(so),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(r,s){return this.finished.finally(r).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),fle()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(r){this.animation.time=r}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(r){this.animation.speed=r}get startTime(){return this.animation.startTime}attachTimeline(r){return this._animation?this.stopTimeline=this.animation.attachTimeline(r):this.pendingTimeline=r,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Nle=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dle(e){const r=Nle.exec(e);if(!r)return[,];const[,s,o,d]=r;return[`--${s??o}`,d]}function F5(e,r,s=1){const[o,d]=Dle(e);if(!o)return;const p=window.getComputedStyle(r).getPropertyValue(o);if(p){const m=p.trim();return o5(m)?parseFloat(m):m}return v2(d)?F5(d,r,s+1):d}function O2(e,r){return e?.[r]??e?.default??e}const q5=new Set(["width","height","top","left","right","bottom",...Dg]),Ple={test:e=>e==="auto",parse:e=>e},B5=e=>r=>r.test(e),U5=[Ng,tn,ac,Md,Aoe,Coe,Ple],zI=e=>U5.find(B5(e));function Mle(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||c5(e):!0}const Ile=new Set(["brightness","contrast","saturate","opacity"]);function Lle(e){const[r,s]=e.slice(0,-1).split("(");if(r==="drop-shadow")return e;const[o]=s.match(x2)||[];if(!o)return e;const d=s.replace(o,"");let p=Ile.has(r)?1:0;return o!==s&&(p*=100),r+"("+p+d+")"}const zle=/\b([a-z-]*)\(.*?\)/gu,t_={...Kd,getAnimatableNone:e=>{const r=e.match(zle);return r?r.map(Lle).join(" "):e}},FI={...Ng,transform:Math.round},Fle={rotate:Md,rotateX:Md,rotateY:Md,rotateZ:Md,scale:JE,scaleX:JE,scaleY:JE,scaleZ:JE,skew:Md,skewX:Md,skewY:Md,distance:tn,translateX:tn,translateY:tn,translateZ:tn,x:tn,y:tn,z:tn,perspective:tn,transformPerspective:tn,opacity:Bb,originX:OI,originY:OI,originZ:tn},k2={borderWidth:tn,borderTopWidth:tn,borderRightWidth:tn,borderBottomWidth:tn,borderLeftWidth:tn,borderRadius:tn,radius:tn,borderTopLeftRadius:tn,borderTopRightRadius:tn,borderBottomRightRadius:tn,borderBottomLeftRadius:tn,width:tn,maxWidth:tn,height:tn,maxHeight:tn,top:tn,right:tn,bottom:tn,left:tn,padding:tn,paddingTop:tn,paddingRight:tn,paddingBottom:tn,paddingLeft:tn,margin:tn,marginTop:tn,marginRight:tn,marginBottom:tn,marginLeft:tn,backgroundPositionX:tn,backgroundPositionY:tn,...Fle,zIndex:FI,fillOpacity:Bb,strokeOpacity:Bb,numOctaves:FI},qle={...k2,color:fs,backgroundColor:fs,outlineColor:fs,fill:fs,stroke:fs,borderColor:fs,borderTopColor:fs,borderRightColor:fs,borderBottomColor:fs,borderLeftColor:fs,filter:t_,WebkitFilter:t_},K5=e=>qle[e];function V5(e,r){let s=K5(e);return s!==t_&&(s=Kd),s.getAnimatableNone?s.getAnimatableNone(r):void 0}const Ble=new Set(["auto","none","0"]);function Ule(e,r,s){let o=0,d;for(;o<e.length&&!d;){const p=e[o];typeof p=="string"&&!Ble.has(p)&&Ub(p).values.length&&(d=e[o]),o++}if(d&&s)for(const p of r)e[p]=V5(s,d)}class Kle extends A2{constructor(r,s,o,d,p){super(r,s,o,d,p,!0)}readKeyframes(){const{unresolvedKeyframes:r,element:s,name:o}=this;if(!s||!s.current)return;super.readKeyframes();for(let b=0;b<r.length;b++){let S=r[b];if(typeof S=="string"&&(S=S.trim(),v2(S))){const j=F5(S,s.current);j!==void 0&&(r[b]=j),b===r.length-1&&(this.finalKeyframe=S)}}if(this.resolveNoneKeyframes(),!q5.has(o)||r.length!==2)return;const[d,p]=r,m=zI(d),g=zI(p);if(m!==g)if(PI(m)&&PI(g))for(let b=0;b<r.length;b++){const S=r[b];typeof S=="string"&&(r[b]=parseFloat(S))}else Sp[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:r,name:s}=this,o=[];for(let d=0;d<r.length;d++)(r[d]===null||Mle(r[d]))&&o.push(d);o.length&&Ule(r,o,s)}measureInitialState(){const{element:r,unresolvedKeyframes:s,name:o}=this;if(!r||!r.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sp[o](r.measureViewportBox(),window.getComputedStyle(r.current)),s[0]=this.measuredOrigin;const d=s[s.length-1];d!==void 0&&r.getValue(o,d).jump(d,!1)}measureEndState(){const{element:r,name:s,unresolvedKeyframes:o}=this;if(!r||!r.current)return;const d=r.getValue(s);d&&d.jump(this.measuredOrigin,!1);const p=o.length-1,m=o[p];o[p]=Sp[s](r.measureViewportBox(),window.getComputedStyle(r.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),this.removedTransforms?.length&&this.removedTransforms.forEach(([g,b])=>{r.getValue(g).set(b)}),this.resolveNoneKeyframes()}}function Vle(e,r,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const d=s?.[e]??o.querySelectorAll(e);return d?Array.from(d):[]}return Array.from(e)}const H5=(e,r)=>r&&typeof e=="number"?r.transform(e):e;function Hle(e){return l5(e)&&"offsetHeight"in e}const qI=30,Gle=e=>!isNaN(parseFloat(e));class Xle{constructor(r,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const d=da.now();if(this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const p of this.dependents)p.dirty()},this.hasAnimated=!1,this.setCurrent(r),this.owner=s.owner}setCurrent(r){this.current=r,this.updatedAt=da.now(),this.canTrackVelocity===null&&r!==void 0&&(this.canTrackVelocity=Gle(this.current))}setPrevFrameValue(r=this.current){this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt}onChange(r){return this.on("change",r)}on(r,s){this.events[r]||(this.events[r]=new m2);const o=this.events[r].add(s);return r==="change"?()=>{o(),_r.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const r in this.events)this.events[r].clear()}attach(r,s){this.passiveEffect=r,this.stopPassiveEffect=s}set(r){this.passiveEffect?this.passiveEffect(r,this.updateAndNotify):this.updateAndNotify(r)}setWithVelocity(r,s,o){this.set(s),this.prev=void 0,this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt-o}jump(r,s=!0){this.updateAndNotify(r),this.prev=r,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(r){this.dependents||(this.dependents=new Set),this.dependents.add(r)}removeDependent(r){this.dependents&&this.dependents.delete(r)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const r=da.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||r-this.updatedAt>qI)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,qI);return u5(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(r){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=r(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wg(e,r){return new Xle(e,r)}const{schedule:R2}=w5(queueMicrotask,!1),Xo={x:!1,y:!1};function G5(){return Xo.x||Xo.y}function Yle(e){return e==="x"||e==="y"?Xo[e]?null:(Xo[e]=!0,()=>{Xo[e]=!1}):Xo.x||Xo.y?null:(Xo.x=Xo.y=!0,()=>{Xo.x=Xo.y=!1})}function X5(e,r){const s=Vle(e),o=new AbortController,d={passive:!0,...r,signal:o.signal};return[s,d,()=>o.abort()]}function BI(e){return!(e.pointerType==="touch"||G5())}function Zle(e,r,s={}){const[o,d,p]=X5(e,s),m=g=>{if(!BI(g))return;const{target:b}=g,S=r(b,g);if(typeof S!="function"||!b)return;const j=A=>{BI(A)&&(S(A),b.removeEventListener("pointerleave",j))};b.addEventListener("pointerleave",j,d)};return o.forEach(g=>{g.addEventListener("pointerenter",m,d)}),p}const Y5=(e,r)=>r?e===r?!0:Y5(e,r.parentElement):!1,T2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Wle=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jle(e){return Wle.has(e.tagName)||e.tabIndex!==-1}const xj=new WeakSet;function UI(e){return r=>{r.key==="Enter"&&e(r)}}function QR(e,r){e.dispatchEvent(new PointerEvent("pointer"+r,{isPrimary:!0,bubbles:!0}))}const Qle=(e,r)=>{const s=e.currentTarget;if(!s)return;const o=UI(()=>{if(xj.has(s))return;QR(s,"down");const d=UI(()=>{QR(s,"up")}),p=()=>QR(s,"cancel");s.addEventListener("keyup",d,r),s.addEventListener("blur",p,r)});s.addEventListener("keydown",o,r),s.addEventListener("blur",()=>s.removeEventListener("keydown",o),r)};function KI(e){return T2(e)&&!G5()}function ece(e,r,s={}){const[o,d,p]=X5(e,s),m=g=>{const b=g.currentTarget;if(!KI(g))return;xj.add(b);const S=r(b,g),j=(T,M)=>{window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",k),xj.has(b)&&xj.delete(b),KI(T)&&typeof S=="function"&&S(T,{success:M})},A=T=>{j(T,b===window||b===document||s.useGlobalTarget||Y5(b,T.target))},k=T=>{j(T,!1)};window.addEventListener("pointerup",A,d),window.addEventListener("pointercancel",k,d)};return o.forEach(g=>{(s.useGlobalTarget?window:g).addEventListener("pointerdown",m,d),Hle(g)&&(g.addEventListener("focus",S=>Qle(S,d)),!Jle(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),p}function Z5(e){return l5(e)&&"ownerSVGElement"in e}function tce(e){return Z5(e)&&e.tagName==="svg"}const bi=e=>!!(e&&e.getVelocity),nce=[...U5,fs,Kd],rce=e=>nce.find(B5(e)),W5=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sce(e=!0){const r=R.useContext(u2);if(r===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:d}=r,p=R.useId();R.useEffect(()=>{if(e)return d(p)},[e]);const m=R.useCallback(()=>e&&o&&o(p),[p,o,e]);return!s&&o?[!1,m]:[!0]}const J5=R.createContext({strict:!1}),VI={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"]},Sg={};for(const e in VI)Sg[e]={isEnabled:r=>VI[e].some(s=>!!r[s])};function ice(e){for(const r in e)Sg[r]={...Sg[r],...e[r]}}const ace=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hj(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ace.has(e)}let Q5=e=>!Hj(e);function oce(e){typeof e=="function"&&(Q5=r=>r.startsWith("on")?!Hj(r):e(r))}try{oce(require("@emotion/is-prop-valid").default)}catch{}function lce(e,r,s){const o={};for(const d in e)d==="values"&&typeof e.values=="object"||(Q5(d)||s===!0&&Hj(d)||!r&&!Hj(d)||e.draggable&&d.startsWith("onDrag"))&&(o[d]=e[d]);return o}const MC=R.createContext({});function IC(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Kb(e){return typeof e=="string"||Array.isArray(e)}const _2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$2=["initial",..._2];function LC(e){return IC(e.animate)||$2.some(r=>Kb(e[r]))}function eF(e){return!!(LC(e)||e.variants)}function cce(e,r){if(LC(e)){const{initial:s,animate:o}=e;return{initial:s===!1||Kb(s)?s:void 0,animate:Kb(o)?o:void 0}}return e.inherit!==!1?r:{}}function uce(e){const{initial:r,animate:s}=cce(e,R.useContext(MC));return R.useMemo(()=>({initial:r,animate:s}),[HI(r),HI(s)])}function HI(e){return Array.isArray(e)?e.join(" "):e}function GI(e,r){return r.max===r.min?0:e/(r.max-r.min)*100}const ab={correct:(e,r)=>{if(!r.target)return e;if(typeof e=="string")if(tn.test(e))e=parseFloat(e);else return e;const s=GI(e,r.target.x),o=GI(e,r.target.y);return`${s}% ${o}%`}},dce={correct:(e,{treeScale:r,projectionDelta:s})=>{const o=e,d=Kd.parse(e);if(d.length>5)return o;const p=Kd.createTransformer(e),m=typeof d[0]!="number"?1:0,g=s.x.scale*r.x,b=s.y.scale*r.y;d[0+m]/=g,d[1+m]/=b;const S=Lr(g,b,.5);return typeof d[2+m]=="number"&&(d[2+m]/=S),typeof d[3+m]=="number"&&(d[3+m]/=S),p(d)}},n_={borderRadius:{...ab,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ab,borderTopRightRadius:ab,borderBottomLeftRadius:ab,borderBottomRightRadius:ab,boxShadow:dce};function tF(e,{layout:r,layoutId:s}){return Pg.has(e)||e.startsWith("origin")||(r||s!==void 0)&&(!!n_[e]||e==="opacity")}const hce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pce=Dg.length;function fce(e,r,s){let o="",d=!0;for(let p=0;p<pce;p++){const m=Dg[p],g=e[m];if(g===void 0)continue;let b=!0;if(typeof g=="number"?b=g===(m.startsWith("scale")?1:0):b=parseFloat(g)===0,!b||s){const S=H5(g,k2[m]);if(!b){d=!1;const j=hce[m]||m;o+=`${j}(${S}) `}s&&(r[m]=S)}}return o=o.trim(),s?o=s(r,d?"":o):d&&(o="none"),o}function N2(e,r,s){const{style:o,vars:d,transformOrigin:p}=e;let m=!1,g=!1;for(const b in r){const S=r[b];if(Pg.has(b)){m=!0;continue}else if(E5(b)){d[b]=S;continue}else{const j=H5(S,k2[b]);b.startsWith("origin")?(g=!0,p[b]=j):o[b]=j}}if(r.transform||(m||s?o.transform=fce(r,e.transform,s):o.transform&&(o.transform="none")),g){const{originX:b="50%",originY:S="50%",originZ:j=0}=p;o.transformOrigin=`${b} ${S} ${j}`}}const D2=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nF(e,r,s){for(const o in r)!bi(r[o])&&!tF(o,s)&&(e[o]=r[o])}function mce({transformTemplate:e},r){return R.useMemo(()=>{const s=D2();return N2(s,r,e),Object.assign({},s.vars,s.style)},[r])}function gce(e,r){const s=e.style||{},o={};return nF(o,s,e),Object.assign(o,mce(e,r)),o}function yce(e,r){const s={},o=gce(e,r);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=o,s}const vce={offset:"stroke-dashoffset",array:"stroke-dasharray"},xce={offset:"strokeDashoffset",array:"strokeDasharray"};function bce(e,r,s=1,o=0,d=!0){e.pathLength=1;const p=d?vce:xce;e[p.offset]=tn.transform(-o);const m=tn.transform(r),g=tn.transform(s);e[p.array]=`${m} ${g}`}function rF(e,{attrX:r,attrY:s,attrScale:o,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},b,S,j){if(N2(e,g,S),b){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:A,style:k}=e;A.transform&&(k.transform=A.transform,delete A.transform),(k.transform||A.transformOrigin)&&(k.transformOrigin=A.transformOrigin??"50% 50%",delete A.transformOrigin),k.transform&&(k.transformBox=j?.transformBox??"fill-box",delete A.transformBox),r!==void 0&&(A.x=r),s!==void 0&&(A.y=s),o!==void 0&&(A.scale=o),d!==void 0&&bce(A,d,p,m,!1)}const sF=()=>({...D2(),attrs:{}}),iF=e=>typeof e=="string"&&e.toLowerCase()==="svg";function wce(e,r,s,o){const d=R.useMemo(()=>{const p=sF();return rF(p,r,iF(o),e.transformTemplate,e.style),{...p.attrs,style:{...p.style}}},[r]);if(e.style){const p={};nF(p,e.style,e),d.style={...p,...d.style}}return d}const Sce=["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 P2(e){return typeof e!="string"||e.includes("-")?!1:!!(Sce.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ece(e,r,s,{latestValues:o},d,p=!1){const g=(P2(e)?wce:yce)(r,o,d,e),b=lce(r,typeof e=="string",p),S=e!==R.Fragment?{...b,...g,ref:s}:{},{children:j}=r,A=R.useMemo(()=>bi(j)?j.get():j,[j]);return R.createElement(e,{...S,children:A})}function XI(e){const r=[{},{}];return e?.values.forEach((s,o)=>{r[0][o]=s.get(),r[1][o]=s.getVelocity()}),r}function M2(e,r,s,o){if(typeof r=="function"){const[d,p]=XI(o);r=r(s!==void 0?s:e.custom,d,p)}if(typeof r=="string"&&(r=e.variants&&e.variants[r]),typeof r=="function"){const[d,p]=XI(o);r=r(s!==void 0?s:e.custom,d,p)}return r}function bj(e){return bi(e)?e.get():e}function jce({scrapeMotionValuesFromProps:e,createRenderState:r},s,o,d){return{latestValues:Cce(s,o,d,e),renderState:r()}}function Cce(e,r,s,o){const d={},p=o(e,{});for(const k in p)d[k]=bj(p[k]);let{initial:m,animate:g}=e;const b=LC(e),S=eF(e);r&&S&&!b&&e.inherit!==!1&&(m===void 0&&(m=r.initial),g===void 0&&(g=r.animate));let j=s?s.initial===!1:!1;j=j||m===!1;const A=j?g:m;if(A&&typeof A!="boolean"&&!IC(A)){const k=Array.isArray(A)?A:[A];for(let T=0;T<k.length;T++){const M=M2(e,k[T]);if(M){const{transitionEnd:I,transition:q,...G}=M;for(const K in G){let X=G[K];if(Array.isArray(X)){const L=j?X.length-1:0;X=X[L]}X!==null&&(d[K]=X)}for(const K in I)d[K]=I[K]}}}return d}const aF=e=>(r,s)=>{const o=R.useContext(MC),d=R.useContext(u2),p=()=>jce(e,r,o,d);return s?p():ioe(p)};function I2(e,r,s){const{style:o}=e,d={};for(const p in o)(bi(o[p])||r.style&&bi(r.style[p])||tF(p,e)||s?.getValue(p)?.liveStyle!==void 0)&&(d[p]=o[p]);return d}const Ace=aF({scrapeMotionValuesFromProps:I2,createRenderState:D2});function oF(e,r,s){const o=I2(e,r,s);for(const d in e)if(bi(e[d])||bi(r[d])){const p=Dg.indexOf(d)!==-1?"attr"+d.charAt(0).toUpperCase()+d.substring(1):d;o[p]=e[d]}return o}const Oce=aF({scrapeMotionValuesFromProps:oF,createRenderState:sF}),kce=Symbol.for("motionComponentSymbol");function ag(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rce(e,r,s){return R.useCallback(o=>{o&&e.onMount&&e.onMount(o),r&&(o?r.mount(o):r.unmount()),s&&(typeof s=="function"?s(o):ag(s)&&(s.current=o))},[r])}const L2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tce="framerAppearId",lF="data-"+L2(Tce),cF=R.createContext({});function _ce(e,r,s,o,d){const{visualElement:p}=R.useContext(MC),m=R.useContext(J5),g=R.useContext(u2),b=R.useContext(W5).reducedMotion,S=R.useRef(null);o=o||m.renderer,!S.current&&o&&(S.current=o(e,{visualState:r,parent:p,props:s,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const j=S.current,A=R.useContext(cF);j&&!j.projection&&d&&(j.type==="html"||j.type==="svg")&&$ce(S.current,s,d,A);const k=R.useRef(!1);R.useInsertionEffect(()=>{j&&k.current&&j.update(s,g)});const T=s[lF],M=R.useRef(!!T&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return aoe(()=>{j&&(k.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),M.current&&j.animationState&&j.animationState.animateChanges())}),R.useEffect(()=>{j&&(!M.current&&j.animationState&&j.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),M.current=!1),j.enteringChildren=void 0)}),j}function $ce(e,r,s,o){const{layoutId:d,layout:p,drag:m,dragConstraints:g,layoutScroll:b,layoutRoot:S,layoutCrossfade:j}=r;e.projection=new s(e.latestValues,r["data-framer-portal-id"]?void 0:uF(e.parent)),e.projection.setOptions({layoutId:d,layout:p,alwaysMeasureLayout:!!m||g&&ag(g),visualElement:e,animationType:typeof p=="string"?p:"both",initialPromotionConfig:o,crossfade:j,layoutScroll:b,layoutRoot:S})}function uF(e){if(e)return e.options.allowProjection!==!1?e.projection:uF(e.parent)}function eT(e,{forwardMotionProps:r=!1}={},s,o){s&&ice(s);const d=P2(e)?Oce:Ace;function p(g,b){let S;const j={...R.useContext(W5),...g,layoutId:Nce(g)},{isStatic:A}=j,k=uce(g),T=d(g,A);if(!A&&c2){Dce();const M=Pce(j);S=M.MeasureLayout,k.visualElement=_ce(e,T,j,o,M.ProjectionNode)}return u.jsxs(MC.Provider,{value:k,children:[S&&k.visualElement?u.jsx(S,{visualElement:k.visualElement,...j}):null,Ece(e,g,Rce(T,k.visualElement,b),T,A,r)]})}p.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=R.forwardRef(p);return m[kce]=e,m}function Nce({layoutId:e}){const r=R.useContext(a5).id;return r&&e!==void 0?r+"-"+e:e}function Dce(e,r){R.useContext(J5).strict}function Pce(e){const{drag:r,layout:s}=Sg;if(!r&&!s)return{};const o={...r,...s};return{MeasureLayout:r?.isEnabled(e)||s?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Mce(e,r){if(typeof Proxy>"u")return eT;const s=new Map,o=(p,m)=>eT(p,m,e,r),d=(p,m)=>o(p,m);return new Proxy(d,{get:(p,m)=>m==="create"?o:(s.has(m)||s.set(m,eT(m,void 0,e,r)),s.get(m))})}function dF({top:e,left:r,right:s,bottom:o}){return{x:{min:r,max:s},y:{min:e,max:o}}}function Ice({x:e,y:r}){return{top:r.min,right:e.max,bottom:r.max,left:e.min}}function Lce(e,r){if(!r)return e;const s=r({x:e.left,y:e.top}),o=r({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:o.y,right:o.x}}function tT(e){return e===void 0||e===1}function r_({scale:e,scaleX:r,scaleY:s}){return!tT(e)||!tT(r)||!tT(s)}function gp(e){return r_(e)||hF(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hF(e){return YI(e.x)||YI(e.y)}function YI(e){return e&&e!=="0%"}function Gj(e,r,s){const o=e-s,d=r*o;return s+d}function ZI(e,r,s,o,d){return d!==void 0&&(e=Gj(e,d,o)),Gj(e,s,o)+r}function s_(e,r=0,s=1,o,d){e.min=ZI(e.min,r,s,o,d),e.max=ZI(e.max,r,s,o,d)}function pF(e,{x:r,y:s}){s_(e.x,r.translate,r.scale,r.originPoint),s_(e.y,s.translate,s.scale,s.originPoint)}const WI=.999999999999,JI=1.0000000000001;function zce(e,r,s,o=!1){const d=s.length;if(!d)return;r.x=r.y=1;let p,m;for(let g=0;g<d;g++){p=s[g],m=p.projectionDelta;const{visualElement:b}=p.options;b&&b.props.style&&b.props.style.display==="contents"||(o&&p.options.layoutScroll&&p.scroll&&p!==p.root&&lg(e,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),m&&(r.x*=m.x.scale,r.y*=m.y.scale,pF(e,m)),o&&gp(p.latestValues)&&lg(e,p.latestValues))}r.x<JI&&r.x>WI&&(r.x=1),r.y<JI&&r.y>WI&&(r.y=1)}function og(e,r){e.min=e.min+r,e.max=e.max+r}function QI(e,r,s,o,d=.5){const p=Lr(e.min,e.max,d);s_(e,r,s,p,o)}function lg(e,r){QI(e.x,r.x,r.scaleX,r.scale,r.originX),QI(e.y,r.y,r.scaleY,r.scale,r.originY)}function fF(e,r){return dF(Lce(e.getBoundingClientRect(),r))}function Fce(e,r,s){const o=fF(e,s),{scroll:d}=r;return d&&(og(o.x,d.offset.x),og(o.y,d.offset.y)),o}const e4=()=>({translate:0,scale:1,origin:0,originPoint:0}),cg=()=>({x:e4(),y:e4()}),t4=()=>({min:0,max:0}),js=()=>({x:t4(),y:t4()}),i_={current:null},mF={current:!1};function qce(){if(mF.current=!0,!!c2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),r=()=>i_.current=e.matches;e.addEventListener("change",r),r()}else i_.current=!1}const Bce=new WeakMap;function Uce(e,r,s){for(const o in r){const d=r[o],p=s[o];if(bi(d))e.addValue(o,d);else if(bi(p))e.addValue(o,wg(d,{owner:e}));else if(p!==d)if(e.hasValue(o)){const m=e.getValue(o);m.liveStyle===!0?m.jump(d):m.hasAnimated||m.set(d)}else{const m=e.getStaticValue(o);e.addValue(o,wg(m!==void 0?m:d,{owner:e}))}}for(const o in s)r[o]===void 0&&e.removeValue(o);return r}const n4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kce{scrapeMotionValuesFromProps(r,s,o){return{}}constructor({parent:r,props:s,presenceContext:o,reducedMotionConfig:d,blockInitialAnimation:p,visualState:m},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=A2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const k=da.now();this.renderScheduledAt<k&&(this.renderScheduledAt=k,_r.render(this.render,!1,!0))};const{latestValues:b,renderState:S}=m;this.latestValues=b,this.baseTarget={...b},this.initialValues=s.initial?{...b}:{},this.renderState=S,this.parent=r,this.props=s,this.presenceContext=o,this.depth=r?r.depth+1:0,this.reducedMotionConfig=d,this.options=g,this.blockInitialAnimation=!!p,this.isControllingVariants=LC(s),this.isVariantNode=eF(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(r&&r.current);const{willChange:j,...A}=this.scrapeMotionValuesFromProps(s,{},this);for(const k in A){const T=A[k];b[k]!==void 0&&bi(T)&&T.set(b[k])}}mount(r){this.current=r,Bce.set(r,this),this.projection&&!this.projection.instance&&this.projection.mount(r),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),mF.current||qce(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:i_.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ud(this.notifyUpdate),Ud(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const s=this.features[r];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(r){this.children.add(r),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(r)}removeChild(r){this.children.delete(r),this.enteringChildren&&this.enteringChildren.delete(r)}bindToMotionValue(r,s){this.valueSubscriptions.has(r)&&this.valueSubscriptions.get(r)();const o=Pg.has(r);o&&this.onBindTransform&&this.onBindTransform();const d=s.on("change",m=>{this.latestValues[r]=m,this.props.onUpdate&&_r.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let p;window.MotionCheckAppearSync&&(p=window.MotionCheckAppearSync(this,r,s)),this.valueSubscriptions.set(r,()=>{d(),p&&p(),s.owner&&s.stop()})}sortNodePosition(r){return!this.current||!this.sortInstanceNodePosition||this.type!==r.type?0:this.sortInstanceNodePosition(this.current,r.current)}updateFeatures(){let r="animation";for(r in Sg){const s=Sg[r];if(!s)continue;const{isEnabled:o,Feature:d}=s;if(!this.features[r]&&d&&o(this.props)&&(this.features[r]=new d(this)),this.features[r]){const p=this.features[r];p.isMounted?p.update():(p.mount(),p.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):js()}getStaticValue(r){return this.latestValues[r]}setStaticValue(r,s){this.latestValues[r]=s}update(r,s){(r.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=r,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let o=0;o<n4.length;o++){const d=n4[o];this.propEventSubscriptions[d]&&(this.propEventSubscriptions[d](),delete this.propEventSubscriptions[d]);const p="on"+d,m=r[p];m&&(this.propEventSubscriptions[d]=this.on(d,m))}this.prevMotionValues=Uce(this,this.scrapeMotionValuesFromProps(r,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(r){return this.props.variants?this.props.variants[r]: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(r){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(r),()=>s.variantChildren.delete(r)}addValue(r,s){const o=this.values.get(r);s!==o&&(o&&this.removeValue(r),this.bindToMotionValue(r,s),this.values.set(r,s),this.latestValues[r]=s.get())}removeValue(r){this.values.delete(r);const s=this.valueSubscriptions.get(r);s&&(s(),this.valueSubscriptions.delete(r)),delete this.latestValues[r],this.removeValueFromRenderState(r,this.renderState)}hasValue(r){return this.values.has(r)}getValue(r,s){if(this.props.values&&this.props.values[r])return this.props.values[r];let o=this.values.get(r);return o===void 0&&s!==void 0&&(o=wg(s===null?void 0:s,{owner:this}),this.addValue(r,o)),o}readValue(r,s){let o=this.latestValues[r]!==void 0||!this.current?this.latestValues[r]:this.getBaseTargetFromProps(this.props,r)??this.readValueFromInstance(this.current,r,this.options);return o!=null&&(typeof o=="string"&&(o5(o)||c5(o))?o=parseFloat(o):!rce(o)&&Kd.test(s)&&(o=V5(r,s)),this.setBaseTarget(r,bi(o)?o.get():o)),bi(o)?o.get():o}setBaseTarget(r,s){this.baseTarget[r]=s}getBaseTarget(r){const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const p=M2(this.props,s,this.presenceContext?.custom);p&&(o=p[r])}if(s&&o!==void 0)return o;const d=this.getBaseTargetFromProps(this.props,r);return d!==void 0&&!bi(d)?d:this.initialValues[r]!==void 0&&o===void 0?void 0:this.baseTarget[r]}on(r,s){return this.events[r]||(this.events[r]=new m2),this.events[r].add(s)}notify(r,...s){this.events[r]&&this.events[r].notify(...s)}scheduleRenderMicrotask(){R2.render(this.render)}}class gF extends Kce{constructor(){super(...arguments),this.KeyframeResolver=Kle}sortInstanceNodePosition(r,s){return r.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(r,s){return r.style?r.style[s]:void 0}removeValueFromRenderState(r,{vars:s,style:o}){delete s[r],delete o[r]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:r}=this.props;bi(r)&&(this.childSubscription=r.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function yF(e,{style:r,vars:s},o,d){const p=e.style;let m;for(m in r)p[m]=r[m];d?.applyProjectionStyles(p,o);for(m in s)p.setProperty(m,s[m])}function Vce(e){return window.getComputedStyle(e)}class Hce extends gF{constructor(){super(...arguments),this.type="html",this.renderInstance=yF}readValueFromInstance(r,s){if(Pg.has(s))return this.projection?.isProjecting?YT(s):cle(r,s);{const o=Vce(r),d=(E5(s)?o.getPropertyValue(s):o[s])||0;return typeof d=="string"?d.trim():d}}measureInstanceViewportBox(r,{transformPagePoint:s}){return fF(r,s)}build(r,s,o){N2(r,s,o.transformTemplate)}scrapeMotionValuesFromProps(r,s,o){return I2(r,s,o)}}const vF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Gce(e,r,s,o){yF(e,r,void 0,o);for(const d in r.attrs)e.setAttribute(vF.has(d)?d:L2(d),r.attrs[d])}class Xce extends gF{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=js}getBaseTargetFromProps(r,s){return r[s]}readValueFromInstance(r,s){if(Pg.has(s)){const o=K5(s);return o&&o.default||0}return s=vF.has(s)?s:L2(s),r.getAttribute(s)}scrapeMotionValuesFromProps(r,s,o){return oF(r,s,o)}build(r,s,o){rF(r,s,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(r,s,o,d){Gce(r,s,o,d)}mount(r){this.isSVGTag=iF(r.tagName),super.mount(r)}}const Yce=(e,r)=>P2(e)?new Xce(r):new Hce(r,{allowProjection:e!==R.Fragment});function mg(e,r,s){const o=e.getProps();return M2(o,r,s!==void 0?s:o.custom,e)}const a_=e=>Array.isArray(e);function Zce(e,r,s){e.hasValue(r)?e.getValue(r).set(s):e.addValue(r,wg(s))}function Wce(e){return a_(e)?e[e.length-1]||0:e}function Jce(e,r){const s=mg(e,r);let{transitionEnd:o={},transition:d={},...p}=s||{};p={...p,...o};for(const m in p){const g=Wce(p[m]);Zce(e,m,g)}}function Qce(e){return!!(bi(e)&&e.add)}function o_(e,r){const s=e.getValue("willChange");if(Qce(s))return s.add(r);if(!s&&yu.WillChange){const o=new yu.WillChange("auto");e.addValue("willChange",o),o.add(r)}}function xF(e){return e.props[lF]}const eue=e=>e!==null;function tue(e,{repeat:r,repeatType:s="loop"},o){const d=e.filter(eue),p=r&&s!=="loop"&&r%2===1?0:d.length-1;return d[p]}const nue={type:"spring",stiffness:500,damping:25,restSpeed:10},rue=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sue={type:"keyframes",duration:.8},iue={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aue=(e,{keyframes:r})=>r.length>2?sue:Pg.has(e)?e.startsWith("scale")?rue(r[1]):nue:iue;function oue({when:e,delay:r,delayChildren:s,staggerChildren:o,staggerDirection:d,repeat:p,repeatType:m,repeatDelay:g,from:b,elapsed:S,...j}){return!!Object.keys(j).length}const z2=(e,r,s,o={},d,p)=>m=>{const g=O2(o,e)||{},b=g.delay||o.delay||0;let{elapsed:S=0}=o;S=S-ic(b);const j={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:r.getVelocity(),...g,delay:-S,onUpdate:k=>{r.set(k),g.onUpdate&&g.onUpdate(k)},onComplete:()=>{m(),g.onComplete&&g.onComplete()},name:e,motionValue:r,element:p?void 0:d};oue(g)||Object.assign(j,aue(e,j)),j.duration&&(j.duration=ic(j.duration)),j.repeatDelay&&(j.repeatDelay=ic(j.repeatDelay)),j.from!==void 0&&(j.keyframes[0]=j.from);let A=!1;if((j.type===!1||j.duration===0&&!j.repeatDelay)&&(e_(j),j.delay===0&&(A=!0)),(yu.instantAnimations||yu.skipAnimations)&&(A=!0,e_(j),j.delay=0),j.allowFlatten=!g.type&&!g.ease,A&&!p&&r.get()!==void 0){const k=tue(j.keyframes,g);if(k!==void 0){_r.update(()=>{j.onUpdate(k),j.onComplete()});return}}return g.isSync?new C2(j):new $le(j)};function lue({protectedKeys:e,needsAnimating:r},s){const o=e.hasOwnProperty(s)&&r[s]!==!0;return r[s]=!1,o}function bF(e,r,{delay:s=0,transitionOverride:o,type:d}={}){let{transition:p=e.getDefaultTransition(),transitionEnd:m,...g}=r;o&&(p=o);const b=[],S=d&&e.animationState&&e.animationState.getState()[d];for(const j in g){const A=e.getValue(j,e.latestValues[j]??null),k=g[j];if(k===void 0||S&&lue(S,j))continue;const T={delay:s,...O2(p||{},j)},M=A.get();if(M!==void 0&&!A.isAnimating&&!Array.isArray(k)&&k===M&&!T.velocity)continue;let I=!1;if(window.MotionHandoffAnimation){const G=xF(e);if(G){const K=window.MotionHandoffAnimation(G,j,_r);K!==null&&(T.startTime=K,I=!0)}}o_(e,j),A.start(z2(j,A,k,e.shouldReduceMotion&&q5.has(j)?{type:!1}:T,e,I));const q=A.animation;q&&b.push(q)}return m&&Promise.all(b).then(()=>{_r.update(()=>{m&&Jce(e,m)})}),b}function wF(e,r,s,o=0,d=1){const p=Array.from(e).sort((S,j)=>S.sortNodePosition(j)).indexOf(r),m=e.size,g=(m-1)*o;return typeof s=="function"?s(p,m):d===1?p*o:g-p*o}function l_(e,r,s={}){const o=mg(e,r,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:d=e.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(d=s.transitionOverride);const p=o?()=>Promise.all(bF(e,o,s)):()=>Promise.resolve(),m=e.variantChildren&&e.variantChildren.size?(b=0)=>{const{delayChildren:S=0,staggerChildren:j,staggerDirection:A}=d;return cue(e,r,b,S,j,A,s)}:()=>Promise.resolve(),{when:g}=d;if(g){const[b,S]=g==="beforeChildren"?[p,m]:[m,p];return b().then(()=>S())}else return Promise.all([p(),m(s.delay)])}function cue(e,r,s=0,o=0,d=0,p=1,m){const g=[];for(const b of e.variantChildren)b.notify("AnimationStart",r),g.push(l_(b,r,{...m,delay:s+(typeof o=="function"?0:o)+wF(e.variantChildren,b,o,d,p)}).then(()=>b.notify("AnimationComplete",r)));return Promise.all(g)}function uue(e,r,s={}){e.notify("AnimationStart",r);let o;if(Array.isArray(r)){const d=r.map(p=>l_(e,p,s));o=Promise.all(d)}else if(typeof r=="string")o=l_(e,r,s);else{const d=typeof r=="function"?mg(e,r,s.custom):r;o=Promise.all(bF(e,d,s))}return o.then(()=>{e.notify("AnimationComplete",r)})}function SF(e,r){if(!Array.isArray(r))return!1;const s=r.length;if(s!==e.length)return!1;for(let o=0;o<s;o++)if(r[o]!==e[o])return!1;return!0}const due=$2.length;function EF(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?EF(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const r={};for(let s=0;s<due;s++){const o=$2[s],d=e.props[o];(Kb(d)||d===!1)&&(r[o]=d)}return r}const hue=[..._2].reverse(),pue=_2.length;function fue(e){return r=>Promise.all(r.map(({animation:s,options:o})=>uue(e,s,o)))}function mue(e){let r=fue(e),s=r4(),o=!0;const d=b=>(S,j)=>{const A=mg(e,j,b==="exit"?e.presenceContext?.custom:void 0);if(A){const{transition:k,transitionEnd:T,...M}=A;S={...S,...M,...T}}return S};function p(b){r=b(e)}function m(b){const{props:S}=e,j=EF(e.parent)||{},A=[],k=new Set;let T={},M=1/0;for(let q=0;q<pue;q++){const G=hue[q],K=s[G],X=S[G]!==void 0?S[G]:j[G],L=Kb(X),ee=G===b?K.isActive:null;ee===!1&&(M=q);let oe=X===j[G]&&X!==S[G]&&L;if(oe&&o&&e.manuallyAnimateOnMount&&(oe=!1),K.protectedKeys={...T},!K.isActive&&ee===null||!X&&!K.prevProp||IC(X)||typeof X=="boolean")continue;const Q=gue(K.prevProp,X);let ne=Q||G===b&&K.isActive&&!oe&&L||q>M&&L,de=!1;const je=Array.isArray(X)?X:[X];let ve=je.reduce(d(G),{});ee===!1&&(ve={});const{prevResolvedValues:le={}}=K,be={...le,...ve},Ce=re=>{ne=!0,k.has(re)&&(de=!0,k.delete(re)),K.needsAnimating[re]=!0;const ue=e.getValue(re);ue&&(ue.liveStyle=!1)};for(const re in be){const ue=ve[re],_e=le[re];if(T.hasOwnProperty(re))continue;let fe=!1;a_(ue)&&a_(_e)?fe=!SF(ue,_e):fe=ue!==_e,fe?ue!=null?Ce(re):k.add(re):ue!==void 0&&k.has(re)?Ce(re):K.protectedKeys[re]=!0}K.prevProp=X,K.prevResolvedValues=ve,K.isActive&&(T={...T,...ve}),o&&e.blockInitialAnimation&&(ne=!1);const Ke=oe&&Q;ne&&(!Ke||de)&&A.push(...je.map(re=>{const ue={type:G};if(typeof re=="string"&&o&&!Ke&&e.manuallyAnimateOnMount&&e.parent){const{parent:_e}=e,fe=mg(_e,re);if(_e.enteringChildren&&fe){const{delayChildren:He}=fe.transition||{};ue.delay=wF(_e.enteringChildren,e,He)}}return{animation:re,options:ue}}))}if(k.size){const q={};if(typeof S.initial!="boolean"){const G=mg(e,Array.isArray(S.initial)?S.initial[0]:S.initial);G&&G.transition&&(q.transition=G.transition)}k.forEach(G=>{const K=e.getBaseTarget(G),X=e.getValue(G);X&&(X.liveStyle=!0),q[G]=K??null}),A.push({animation:q})}let I=!!A.length;return o&&(S.initial===!1||S.initial===S.animate)&&!e.manuallyAnimateOnMount&&(I=!1),o=!1,I?r(A):Promise.resolve()}function g(b,S){if(s[b].isActive===S)return Promise.resolve();e.variantChildren?.forEach(A=>A.animationState?.setActive(b,S)),s[b].isActive=S;const j=m(b);for(const A in s)s[A].protectedKeys={};return j}return{animateChanges:m,setActive:g,setAnimateFunction:p,getState:()=>s,reset:()=>{s=r4()}}}function gue(e,r){return typeof r=="string"?r!==e:Array.isArray(r)?!SF(r,e):!1}function mp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function r4(){return{animate:mp(!0),whileInView:mp(),whileHover:mp(),whileTap:mp(),whileDrag:mp(),whileFocus:mp(),exit:mp()}}class Yd{constructor(r){this.isMounted=!1,this.node=r}update(){}}class yue extends Yd{constructor(r){super(r),r.animationState||(r.animationState=mue(r))}updateAnimationControlsSubscription(){const{animate:r}=this.node.getProps();IC(r)&&(this.unmountControls=r.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:r}=this.node.getProps(),{animate:s}=this.node.prevProps||{};r!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let vue=0;class xue extends Yd{constructor(){super(...arguments),this.id=vue++}update(){if(!this.node.presenceContext)return;const{isPresent:r,onExitComplete:s}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||r===o)return;const d=this.node.animationState.setActive("exit",!r);s&&!r&&d.then(()=>{s(this.id)})}mount(){const{register:r,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),r&&(this.unmount=r(this.id))}unmount(){}}const bue={animation:{Feature:yue},exit:{Feature:xue}};function Vb(e,r,s,o={passive:!0}){return e.addEventListener(r,s,o),()=>e.removeEventListener(r,s)}function pw(e){return{point:{x:e.pageX,y:e.pageY}}}const wue=e=>r=>T2(r)&&e(r,pw(r));function $b(e,r,s,o){return Vb(e,r,wue(s),o)}const jF=1e-4,Sue=1-jF,Eue=1+jF,CF=.01,jue=0-CF,Cue=0+CF;function Mi(e){return e.max-e.min}function Aue(e,r,s){return Math.abs(e-r)<=s}function s4(e,r,s,o=.5){e.origin=o,e.originPoint=Lr(r.min,r.max,e.origin),e.scale=Mi(s)/Mi(r),e.translate=Lr(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Sue&&e.scale<=Eue||isNaN(e.scale))&&(e.scale=1),(e.translate>=jue&&e.translate<=Cue||isNaN(e.translate))&&(e.translate=0)}function Nb(e,r,s,o){s4(e.x,r.x,s.x,o?o.originX:void 0),s4(e.y,r.y,s.y,o?o.originY:void 0)}function i4(e,r,s){e.min=s.min+r.min,e.max=e.min+Mi(r)}function Oue(e,r,s){i4(e.x,r.x,s.x),i4(e.y,r.y,s.y)}function a4(e,r,s){e.min=r.min-s.min,e.max=e.min+Mi(r)}function Xj(e,r,s){a4(e.x,r.x,s.x),a4(e.y,r.y,s.y)}function to(e){return[e("x"),e("y")]}const AF=({current:e})=>e?e.ownerDocument.defaultView:null,o4=(e,r)=>Math.abs(e-r);function kue(e,r){const s=o4(e.x,r.x),o=o4(e.y,r.y);return Math.sqrt(s**2+o**2)}class OF{constructor(r,s,{transformPagePoint:o,contextWindow:d=window,dragSnapToOrigin:p=!1,distanceThreshold:m=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=rT(this.lastMoveEventInfo,this.history),T=this.startEvent!==null,M=kue(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!T&&!M)return;const{point:I}=k,{timestamp:q}=Us;this.history.push({...I,timestamp:q});const{onStart:G,onMove:K}=this.handlers;T||(G&&G(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),K&&K(this.lastMoveEvent,k)},this.handlePointerMove=(k,T)=>{this.lastMoveEvent=k,this.lastMoveEventInfo=nT(T,this.transformPagePoint),_r.update(this.updatePoint,!0)},this.handlePointerUp=(k,T)=>{this.end();const{onEnd:M,onSessionEnd:I,resumeAnimation:q}=this.handlers;if(this.dragSnapToOrigin&&q&&q(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const G=rT(k.type==="pointercancel"?this.lastMoveEventInfo:nT(T,this.transformPagePoint),this.history);this.startEvent&&M&&M(k,G),I&&I(k,G)},!T2(r))return;this.dragSnapToOrigin=p,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=m,this.contextWindow=d||window;const g=pw(r),b=nT(g,this.transformPagePoint),{point:S}=b,{timestamp:j}=Us;this.history=[{...S,timestamp:j}];const{onSessionStart:A}=s;A&&A(r,rT(b,this.history)),this.removeListeners=uw($b(this.contextWindow,"pointermove",this.handlePointerMove),$b(this.contextWindow,"pointerup",this.handlePointerUp),$b(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(r){this.handlers=r}end(){this.removeListeners&&this.removeListeners(),Ud(this.updatePoint)}}function nT(e,r){return r?{point:r(e.point)}:e}function l4(e,r){return{x:e.x-r.x,y:e.y-r.y}}function rT({point:e},r){return{point:e,delta:l4(e,kF(r)),offset:l4(e,Rue(r)),velocity:Tue(r,.1)}}function Rue(e){return e[0]}function kF(e){return e[e.length-1]}function Tue(e,r){if(e.length<2)return{x:0,y:0};let s=e.length-1,o=null;const d=kF(e);for(;s>=0&&(o=e[s],!(d.timestamp-o.timestamp>ic(r)));)s--;if(!o)return{x:0,y:0};const p=ro(d.timestamp-o.timestamp);if(p===0)return{x:0,y:0};const m={x:(d.x-o.x)/p,y:(d.y-o.y)/p};return m.x===1/0&&(m.x=0),m.y===1/0&&(m.y=0),m}function _ue(e,{min:r,max:s},o){return r!==void 0&&e<r?e=o?Lr(r,e,o.min):Math.max(e,r):s!==void 0&&e>s&&(e=o?Lr(s,e,o.max):Math.min(e,s)),e}function c4(e,r,s){return{min:r!==void 0?e.min+r:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function $ue(e,{top:r,left:s,bottom:o,right:d}){return{x:c4(e.x,s,d),y:c4(e.y,r,o)}}function u4(e,r){let s=r.min-e.min,o=r.max-e.max;return r.max-r.min<e.max-e.min&&([s,o]=[o,s]),{min:s,max:o}}function Nue(e,r){return{x:u4(e.x,r.x),y:u4(e.y,r.y)}}function Due(e,r){let s=.5;const o=Mi(e),d=Mi(r);return d>o?s=qb(r.min,r.max-o,e.min):o>d&&(s=qb(e.min,e.max-d,r.min)),gu(0,1,s)}function Pue(e,r){const s={};return r.min!==void 0&&(s.min=r.min-e.min),r.max!==void 0&&(s.max=r.max-e.min),s}const c_=.35;function Mue(e=c_){return e===!1?e=0:e===!0&&(e=c_),{x:d4(e,"left","right"),y:d4(e,"top","bottom")}}function d4(e,r,s){return{min:h4(e,r),max:h4(e,s)}}function h4(e,r){return typeof e=="number"?e:e[r]||0}const Iue=new WeakMap;class Lue{constructor(r){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=js(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=r}start(r,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:d}=this.visualElement;if(d&&d.isPresent===!1)return;const p=A=>{const{dragSnapToOrigin:k}=this.getProps();k?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(pw(A).point)},m=(A,k)=>{const{drag:T,dragPropagation:M,onDragStart:I}=this.getProps();if(T&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yle(T),!this.openDragLock))return;this.latestPointerEvent=A,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),to(G=>{let K=this.getAxisMotionValue(G).get()||0;if(ac.test(K)){const{projection:X}=this.visualElement;if(X&&X.layout){const L=X.layout.layoutBox[G];L&&(K=Mi(L)*(parseFloat(K)/100))}}this.originPoint[G]=K}),I&&_r.postRender(()=>I(A,k)),o_(this.visualElement,"transform");const{animationState:q}=this.visualElement;q&&q.setActive("whileDrag",!0)},g=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k;const{dragPropagation:T,dragDirectionLock:M,onDirectionLock:I,onDrag:q}=this.getProps();if(!T&&!this.openDragLock)return;const{offset:G}=k;if(M&&this.currentDirection===null){this.currentDirection=zue(G),this.currentDirection!==null&&I&&I(this.currentDirection);return}this.updateAxis("x",k.point,G),this.updateAxis("y",k.point,G),this.visualElement.render(),q&&q(A,k)},b=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k,this.stop(A,k),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>to(A=>this.getAnimationState(A)==="paused"&&this.getAxisMotionValue(A).animation?.play()),{dragSnapToOrigin:j}=this.getProps();this.panSession=new OF(r,{onSessionStart:p,onStart:m,onMove:g,onSessionEnd:b,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:j,distanceThreshold:o,contextWindow:AF(this.visualElement)})}stop(r,s){const o=r||this.latestPointerEvent,d=s||this.latestPanInfo,p=this.isDragging;if(this.cancel(),!p||!d||!o)return;const{velocity:m}=d;this.startAnimation(m);const{onDragEnd:g}=this.getProps();g&&_r.postRender(()=>g(o,d))}cancel(){this.isDragging=!1;const{projection:r,animationState:s}=this.visualElement;r&&(r.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(r,s,o){const{drag:d}=this.getProps();if(!o||!QE(r,d,this.currentDirection))return;const p=this.getAxisMotionValue(r);let m=this.originPoint[r]+o[r];this.constraints&&this.constraints[r]&&(m=_ue(m,this.constraints[r],this.elastic[r])),p.set(m)}resolveConstraints(){const{dragConstraints:r,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,d=this.constraints;r&&ag(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=$ue(o.layoutBox,r):this.constraints=!1,this.elastic=Mue(s),d!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&to(p=>{this.constraints!==!1&&this.getAxisMotionValue(p)&&(this.constraints[p]=Pue(o.layoutBox[p],this.constraints[p]))})}resolveRefConstraints(){const{dragConstraints:r,onMeasureDragConstraints:s}=this.getProps();if(!r||!ag(r))return!1;const o=r.current,{projection:d}=this.visualElement;if(!d||!d.layout)return!1;const p=Fce(o,d.root,this.visualElement.getTransformPagePoint());let m=Nue(d.layout.layoutBox,p);if(s){const g=s(Ice(m));this.hasMutatedConstraints=!!g,g&&(m=dF(g))}return m}startAnimation(r){const{drag:s,dragMomentum:o,dragElastic:d,dragTransition:p,dragSnapToOrigin:m,onDragTransitionEnd:g}=this.getProps(),b=this.constraints||{},S=to(j=>{if(!QE(j,s,this.currentDirection))return;let A=b&&b[j]||{};m&&(A={min:0,max:0});const k=d?200:1e6,T=d?40:1e7,M={type:"inertia",velocity:o?r[j]:0,bounceStiffness:k,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...p,...A};return this.startAxisValueAnimation(j,M)});return Promise.all(S).then(g)}startAxisValueAnimation(r,s){const o=this.getAxisMotionValue(r);return o_(this.visualElement,r),o.start(z2(r,o,0,s,this.visualElement,!1))}stopAnimation(){to(r=>this.getAxisMotionValue(r).stop())}pauseAnimation(){to(r=>this.getAxisMotionValue(r).animation?.pause())}getAnimationState(r){return this.getAxisMotionValue(r).animation?.state}getAxisMotionValue(r){const s=`_drag${r.toUpperCase()}`,o=this.visualElement.getProps(),d=o[s];return d||this.visualElement.getValue(r,(o.initial?o.initial[r]:void 0)||0)}snapToCursor(r){to(s=>{const{drag:o}=this.getProps();if(!QE(s,o,this.currentDirection))return;const{projection:d}=this.visualElement,p=this.getAxisMotionValue(s);if(d&&d.layout){const{min:m,max:g}=d.layout.layoutBox[s];p.set(r[s]-Lr(m,g,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:r,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!ag(s)||!o||!this.constraints)return;this.stopAnimation();const d={x:0,y:0};to(m=>{const g=this.getAxisMotionValue(m);if(g&&this.constraints!==!1){const b=g.get();d[m]=Due({min:b,max:b},this.constraints[m])}});const{transformTemplate:p}=this.visualElement.getProps();this.visualElement.current.style.transform=p?p({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),to(m=>{if(!QE(m,r,null))return;const g=this.getAxisMotionValue(m),{min:b,max:S}=this.constraints[m];g.set(Lr(b,S,d[m]))})}addListeners(){if(!this.visualElement.current)return;Iue.set(this.visualElement,this);const r=this.visualElement.current,s=$b(r,"pointerdown",b=>{const{drag:S,dragListener:j=!0}=this.getProps();S&&j&&this.start(b)}),o=()=>{const{dragConstraints:b}=this.getProps();ag(b)&&b.current&&(this.constraints=this.resolveRefConstraints())},{projection:d}=this.visualElement,p=d.addEventListener("measure",o);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),_r.read(o);const m=Vb(window,"resize",()=>this.scalePositionWithinConstraints()),g=d.addEventListener("didUpdate",(({delta:b,hasLayoutChanged:S})=>{this.isDragging&&S&&(to(j=>{const A=this.getAxisMotionValue(j);A&&(this.originPoint[j]+=b[j].translate,A.set(A.get()+b[j].translate))}),this.visualElement.render())}));return()=>{m(),s(),p(),g&&g()}}getProps(){const r=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:d=!1,dragConstraints:p=!1,dragElastic:m=c_,dragMomentum:g=!0}=r;return{...r,drag:s,dragDirectionLock:o,dragPropagation:d,dragConstraints:p,dragElastic:m,dragMomentum:g}}}function QE(e,r,s){return(r===!0||r===e)&&(s===null||s===e)}function zue(e,r=10){let s=null;return Math.abs(e.y)>r?s="y":Math.abs(e.x)>r&&(s="x"),s}class Fue extends Yd{constructor(r){super(r),this.removeGroupControls=so,this.removeListeners=so,this.controls=new Lue(r)}mount(){const{dragControls:r}=this.node.getProps();r&&(this.removeGroupControls=r.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||so}unmount(){this.removeGroupControls(),this.removeListeners()}}const p4=e=>(r,s)=>{e&&_r.postRender(()=>e(r,s))};class que extends Yd{constructor(){super(...arguments),this.removePointerDownListener=so}onPointerDown(r){this.session=new OF(r,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AF(this.node)})}createPanHandlers(){const{onPanSessionStart:r,onPanStart:s,onPan:o,onPanEnd:d}=this.node.getProps();return{onSessionStart:p4(r),onStart:p4(s),onMove:o,onEnd:(p,m)=>{delete this.session,d&&_r.postRender(()=>d(p,m))}}}mount(){this.removePointerDownListener=$b(this.node.current,"pointerdown",r=>this.onPointerDown(r))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wj={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let sT=!1;class Bue extends R.Component{componentDidMount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o,layoutId:d}=this.props,{projection:p}=r;p&&(s.group&&s.group.add(p),o&&o.register&&d&&o.register(p),sT&&p.root.didUpdate(),p.addEventListener("animationComplete",()=>{this.safeToRemove()}),p.setOptions({...p.options,onExitComplete:()=>this.safeToRemove()})),wj.hasEverUpdated=!0}getSnapshotBeforeUpdate(r){const{layoutDependency:s,visualElement:o,drag:d,isPresent:p}=this.props,{projection:m}=o;return m&&(m.isPresent=p,sT=!0,d||r.layoutDependency!==s||s===void 0||r.isPresent!==p?m.willUpdate():this.safeToRemove(),r.isPresent!==p&&(p?m.promote():m.relegate()||_r.postRender(()=>{const g=m.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:r}=this.props.visualElement;r&&(r.root.didUpdate(),R2.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:d}=r;sT=!0,d&&(d.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(d),o&&o.deregister&&o.deregister(d))}safeToRemove(){const{safeToRemove:r}=this.props;r&&r()}render(){return null}}function RF(e){const[r,s]=sce(),o=R.useContext(a5);return u.jsx(Bue,{...e,layoutGroup:o,switchLayoutGroup:R.useContext(cF),isPresent:r,safeToRemove:s})}function Uue(e,r,s){const o=bi(e)?e:wg(e);return o.start(z2("",o,r,s)),o.animation}const Kue=(e,r)=>e.depth-r.depth;class Vue{constructor(){this.children=[],this.isDirty=!1}add(r){d2(this.children,r),this.isDirty=!0}remove(r){h2(this.children,r),this.isDirty=!0}forEach(r){this.isDirty&&this.children.sort(Kue),this.isDirty=!1,this.children.forEach(r)}}function Hue(e,r){const s=da.now(),o=({timestamp:d})=>{const p=d-s;p>=r&&(Ud(o),e(p-r))};return _r.setup(o,!0),()=>Ud(o)}const TF=["TopLeft","TopRight","BottomLeft","BottomRight"],Gue=TF.length,f4=e=>typeof e=="string"?parseFloat(e):e,m4=e=>typeof e=="number"||tn.test(e);function Xue(e,r,s,o,d,p){d?(e.opacity=Lr(0,s.opacity??1,Yue(o)),e.opacityExit=Lr(r.opacity??1,0,Zue(o))):p&&(e.opacity=Lr(r.opacity??1,s.opacity??1,o));for(let m=0;m<Gue;m++){const g=`border${TF[m]}Radius`;let b=g4(r,g),S=g4(s,g);if(b===void 0&&S===void 0)continue;b||(b=0),S||(S=0),b===0||S===0||m4(b)===m4(S)?(e[g]=Math.max(Lr(f4(b),f4(S),o),0),(ac.test(S)||ac.test(b))&&(e[g]+="%")):e[g]=S}(r.rotate||s.rotate)&&(e.rotate=Lr(r.rotate||0,s.rotate||0,o))}function g4(e,r){return e[r]!==void 0?e[r]:e.borderRadius}const Yue=_F(0,.5,y5),Zue=_F(.5,.95,so);function _F(e,r,s){return o=>o<e?0:o>r?1:s(qb(e,r,o))}function y4(e,r){e.min=r.min,e.max=r.max}function Ho(e,r){y4(e.x,r.x),y4(e.y,r.y)}function v4(e,r){e.translate=r.translate,e.scale=r.scale,e.originPoint=r.originPoint,e.origin=r.origin}function x4(e,r,s,o,d){return e-=r,e=Gj(e,1/s,o),d!==void 0&&(e=Gj(e,1/d,o)),e}function Wue(e,r=0,s=1,o=.5,d,p=e,m=e){if(ac.test(r)&&(r=parseFloat(r),r=Lr(m.min,m.max,r/100)-m.min),typeof r!="number")return;let g=Lr(p.min,p.max,o);e===p&&(g-=r),e.min=x4(e.min,r,s,g,d),e.max=x4(e.max,r,s,g,d)}function b4(e,r,[s,o,d],p,m){Wue(e,r[s],r[o],r[d],r.scale,p,m)}const Jue=["x","scaleX","originX"],Que=["y","scaleY","originY"];function w4(e,r,s,o){b4(e.x,r,Jue,s?s.x:void 0,o?o.x:void 0),b4(e.y,r,Que,s?s.y:void 0,o?o.y:void 0)}function S4(e){return e.translate===0&&e.scale===1}function $F(e){return S4(e.x)&&S4(e.y)}function E4(e,r){return e.min===r.min&&e.max===r.max}function ede(e,r){return E4(e.x,r.x)&&E4(e.y,r.y)}function j4(e,r){return Math.round(e.min)===Math.round(r.min)&&Math.round(e.max)===Math.round(r.max)}function NF(e,r){return j4(e.x,r.x)&&j4(e.y,r.y)}function C4(e){return Mi(e.x)/Mi(e.y)}function A4(e,r){return e.translate===r.translate&&e.scale===r.scale&&e.originPoint===r.originPoint}class tde{constructor(){this.members=[]}add(r){d2(this.members,r),r.scheduleRender()}remove(r){if(h2(this.members,r),r===this.prevLead&&(this.prevLead=void 0),r===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(r){const s=this.members.findIndex(d=>r===d);if(s===0)return!1;let o;for(let d=s;d>=0;d--){const p=this.members[d];if(p.isPresent!==!1){o=p;break}}return o?(this.promote(o),!0):!1}promote(r,s){const o=this.lead;if(r!==o&&(this.prevLead=o,this.lead=r,r.show(),o)){o.instance&&o.scheduleRender(),r.scheduleRender(),r.resumeFrom=o,s&&(r.resumeFrom.preserveOpacity=!0),o.snapshot&&(r.snapshot=o.snapshot,r.snapshot.latestValues=o.animationValues||o.latestValues),r.root&&r.root.isUpdating&&(r.isLayoutDirty=!0);const{crossfade:d}=r.options;d===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(r=>{const{options:s,resumingFrom:o}=r;s.onExitComplete&&s.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(r=>{r.instance&&r.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function nde(e,r,s){let o="";const d=e.x.translate/r.x,p=e.y.translate/r.y,m=s?.z||0;if((d||p||m)&&(o=`translate3d(${d}px, ${p}px, ${m}px) `),(r.x!==1||r.y!==1)&&(o+=`scale(${1/r.x}, ${1/r.y}) `),s){const{transformPerspective:S,rotate:j,rotateX:A,rotateY:k,skewX:T,skewY:M}=s;S&&(o=`perspective(${S}px) ${o}`),j&&(o+=`rotate(${j}deg) `),A&&(o+=`rotateX(${A}deg) `),k&&(o+=`rotateY(${k}deg) `),T&&(o+=`skewX(${T}deg) `),M&&(o+=`skewY(${M}deg) `)}const g=e.x.scale*r.x,b=e.y.scale*r.y;return(g!==1||b!==1)&&(o+=`scale(${g}, ${b})`),o||"none"}const iT=["","X","Y","Z"],rde=1e3;let sde=0;function aT(e,r,s,o){const{latestValues:d}=r;d[e]&&(s[e]=d[e],r.setStaticValue(e,0),o&&(o[e]=0))}function DF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:r}=e.options;if(!r)return;const s=xF(r);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:d,layoutId:p}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",_r,!(d||p))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&DF(o)}function PF({attachResizeListener:e,defaultParent:r,measureScroll:s,checkIsScrollRoot:o,resetTransform:d}){return class{constructor(m={},g=r?.()){this.id=sde++,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(ode),this.nodes.forEach(dde),this.nodes.forEach(hde),this.nodes.forEach(lde)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=m,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let b=0;b<this.path.length;b++)this.path[b].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vue)}addEventListener(m,g){return this.eventHandlers.has(m)||this.eventHandlers.set(m,new m2),this.eventHandlers.get(m).add(g)}notifyListeners(m,...g){const b=this.eventHandlers.get(m);b&&b.notify(...g)}hasListeners(m){return this.eventHandlers.has(m)}mount(m){if(this.instance)return;this.isSVG=Z5(m)&&!tce(m),this.instance=m;const{layoutId:g,layout:b,visualElement:S}=this.options;if(S&&!S.current&&S.mount(m),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(b||g)&&(this.isLayoutDirty=!0),e){let j,A=0;const k=()=>this.root.updateBlockedByResize=!1;_r.read(()=>{A=window.innerWidth}),e(m,()=>{const T=window.innerWidth;T!==A&&(A=T,this.root.updateBlockedByResize=!0,j&&j(),j=Hue(k,250),wj.hasAnimatedSinceResize&&(wj.hasAnimatedSinceResize=!1,this.nodes.forEach(R4)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&S&&(g||b)&&this.addEventListener("didUpdate",({delta:j,hasLayoutChanged:A,hasRelativeLayoutChanged:k,layout:T})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||S.getDefaultTransition()||yde,{onLayoutAnimationStart:I,onLayoutAnimationComplete:q}=S.getProps(),G=!this.targetLayout||!NF(this.targetLayout,T),K=!A&&k;if(this.options.layoutRoot||this.resumeFrom||K||A&&(G||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const X={...O2(M,"layout"),onPlay:I,onComplete:q};(S.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X),this.setAnimationOrigin(j,K)}else A||R4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=T})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const m=this.getStack();m&&m.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ud(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(pde),this.animationId++)}getTransformTemplate(){const{visualElement:m}=this.options;return m&&m.getProps().transformTemplate}willUpdate(m=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&DF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let j=0;j<this.path.length;j++){const A=this.path[j];A.shouldResetTransform=!0,A.updateScroll("snapshot"),A.options.layoutRoot&&A.willUpdate(!1)}const{layoutId:g,layout:b}=this.options;if(g===void 0&&!b)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),m&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(O4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(k4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ude),this.nodes.forEach(ide),this.nodes.forEach(ade)):this.nodes.forEach(k4),this.clearAllSnapshots();const g=da.now();Us.delta=gu(0,1e3/60,g-Us.timestamp),Us.timestamp=g,Us.isProcessing=!0,XR.update.process(Us),XR.preRender.process(Us),XR.render.process(Us),Us.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,R2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cde),this.sharedNodes.forEach(fde)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_r.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_r.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mi(this.snapshot.measuredBox.x)&&!Mi(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 b=0;b<this.path.length;b++)this.path[b].updateScroll();const m=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=js(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,m?m.layoutBox:void 0)}updateScroll(m="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===m&&(g=!1),g&&this.instance){const b=o(this.instance);this.scroll={animationId:this.root.animationId,phase:m,isRoot:b,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:b}}}resetTransform(){if(!d)return;const m=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!$F(this.projectionDelta),b=this.getTransformTemplate(),S=b?b(this.latestValues,""):void 0,j=S!==this.prevTransformTemplateValue;m&&this.instance&&(g||gp(this.latestValues)||j)&&(d(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(m=!0){const g=this.measurePageBox();let b=this.removeElementScroll(g);return m&&(b=this.removeTransform(b)),vde(b),{animationId:this.root.animationId,measuredBox:g,layoutBox:b,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:m}=this.options;if(!m)return js();const g=m.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xde))){const{scroll:S}=this.root;S&&(og(g.x,S.offset.x),og(g.y,S.offset.y))}return g}removeElementScroll(m){const g=js();if(Ho(g,m),this.scroll?.wasRoot)return g;for(let b=0;b<this.path.length;b++){const S=this.path[b],{scroll:j,options:A}=S;S!==this.root&&j&&A.layoutScroll&&(j.wasRoot&&Ho(g,m),og(g.x,j.offset.x),og(g.y,j.offset.y))}return g}applyTransform(m,g=!1){const b=js();Ho(b,m);for(let S=0;S<this.path.length;S++){const j=this.path[S];!g&&j.options.layoutScroll&&j.scroll&&j!==j.root&&lg(b,{x:-j.scroll.offset.x,y:-j.scroll.offset.y}),gp(j.latestValues)&&lg(b,j.latestValues)}return gp(this.latestValues)&&lg(b,this.latestValues),b}removeTransform(m){const g=js();Ho(g,m);for(let b=0;b<this.path.length;b++){const S=this.path[b];if(!S.instance||!gp(S.latestValues))continue;r_(S.latestValues)&&S.updateSnapshot();const j=js(),A=S.measurePageBox();Ho(j,A),w4(g,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,j)}return gp(this.latestValues)&&w4(g,this.latestValues),g}setTargetDelta(m){this.targetDelta=m,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(m){this.options={...this.options,...m,crossfade:m.crossfade!==void 0?m.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!==Us.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(m=!1){const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const b=!!this.resumingFrom||this!==g;if(!(m||b&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:j,layoutId:A}=this.options;if(!this.layout||!(j||A))return;this.resolvedRelativeTargetAt=Us.timestamp;const k=this.getClosestProjectingParent();k&&this.linkedParentVersion!==k.layoutVersion&&!k.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(k&&k.layout?this.createRelativeTarget(k,this.layout.layoutBox,k.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=js(),this.targetWithTransforms=js()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Oue(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ho(this.target,this.layout.layoutBox),pF(this.target,this.targetDelta)):Ho(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,k&&!!k.resumingFrom==!!this.resumingFrom&&!k.options.layoutScroll&&k.target&&this.animationProgress!==1?this.createRelativeTarget(k,this.target,k.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||r_(this.parent.latestValues)||hF(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(m,g,b){this.relativeParent=m,this.linkedParentVersion=m.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=js(),this.relativeTargetOrigin=js(),Xj(this.relativeTargetOrigin,g,b),Ho(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const m=this.getLead(),g=!!this.resumingFrom||this!==m;let b=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(b=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(b=!1),this.resolvedRelativeTargetAt===Us.timestamp&&(b=!1),b)return;const{layout:S,layoutId:j}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||j))return;Ho(this.layoutCorrected,this.layout.layoutBox);const A=this.treeScale.x,k=this.treeScale.y;zce(this.layoutCorrected,this.treeScale,this.path,g),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=js());const{target:T}=m;if(!T){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(v4(this.prevProjectionDelta.x,this.projectionDelta.x),v4(this.prevProjectionDelta.y,this.projectionDelta.y)),Nb(this.projectionDelta,this.layoutCorrected,T,this.latestValues),(this.treeScale.x!==A||this.treeScale.y!==k||!A4(this.projectionDelta.x,this.prevProjectionDelta.x)||!A4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",T))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(m=!0){if(this.options.visualElement?.scheduleRender(),m){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cg(),this.projectionDelta=cg(),this.projectionDeltaWithTransform=cg()}setAnimationOrigin(m,g=!1){const b=this.snapshot,S=b?b.latestValues:{},j={...this.latestValues},A=cg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const k=js(),T=b?b.source:void 0,M=this.layout?this.layout.source:void 0,I=T!==M,q=this.getStack(),G=!q||q.members.length<=1,K=!!(I&&!G&&this.options.crossfade===!0&&!this.path.some(gde));this.animationProgress=0;let X;this.mixTargetDelta=L=>{const ee=L/1e3;T4(A.x,m.x,ee),T4(A.y,m.y,ee),this.setTargetDelta(A),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xj(k,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mde(this.relativeTarget,this.relativeTargetOrigin,k,ee),X&&ede(this.relativeTarget,X)&&(this.isProjectionDirty=!1),X||(X=js()),Ho(X,this.relativeTarget)),I&&(this.animationValues=j,Xue(j,S,this.latestValues,ee,K,G)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=ee},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(m){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ud(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_r.update(()=>{wj.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wg(0)),this.currentAnimation=Uue(this.motionValue,[0,1e3],{...m,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),m.onUpdate&&m.onUpdate(g)},onStop:()=>{},onComplete:()=>{m.onComplete&&m.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 m=this.getStack();m&&m.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rde),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const m=this.getLead();let{targetWithTransforms:g,target:b,layout:S,latestValues:j}=m;if(!(!g||!b||!S)){if(this!==m&&this.layout&&S&&MF(this.options.animationType,this.layout.layoutBox,S.layoutBox)){b=this.target||js();const A=Mi(this.layout.layoutBox.x);b.x.min=m.target.x.min,b.x.max=b.x.min+A;const k=Mi(this.layout.layoutBox.y);b.y.min=m.target.y.min,b.y.max=b.y.min+k}Ho(g,b),lg(g,j),Nb(this.projectionDeltaWithTransform,this.layoutCorrected,g,j)}}registerSharedNode(m,g){this.sharedNodes.has(m)||this.sharedNodes.set(m,new tde),this.sharedNodes.get(m).add(g);const S=g.options.initialPromotionConfig;g.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(g):void 0})}isLead(){const m=this.getStack();return m?m.lead===this:!0}getLead(){const{layoutId:m}=this.options;return m?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:m}=this.options;return m?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:m}=this.options;if(m)return this.root.sharedNodes.get(m)}promote({needsReset:m,transition:g,preserveFollowOpacity:b}={}){const S=this.getStack();S&&S.promote(this,b),m&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const m=this.getStack();return m?m.relegate(this):!1}resetSkewAndRotation(){const{visualElement:m}=this.options;if(!m)return;let g=!1;const{latestValues:b}=m;if((b.z||b.rotate||b.rotateX||b.rotateY||b.rotateZ||b.skewX||b.skewY)&&(g=!0),!g)return;const S={};b.z&&aT("z",m,S,this.animationValues);for(let j=0;j<iT.length;j++)aT(`rotate${iT[j]}`,m,S,this.animationValues),aT(`skew${iT[j]}`,m,S,this.animationValues);m.render();for(const j in S)m.setStaticValue(j,S[j]),this.animationValues&&(this.animationValues[j]=S[j]);m.scheduleRender()}applyProjectionStyles(m,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){m.visibility="hidden";return}const b=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,m.visibility="",m.opacity="",m.pointerEvents=bj(g?.pointerEvents)||"",m.transform=b?b(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=bj(g?.pointerEvents)||""),this.hasProjected&&!gp(this.latestValues)&&(m.transform=b?b({},""):"none",this.hasProjected=!1);return}m.visibility="";const j=S.animationValues||S.latestValues;this.applyTransformsToTarget();let A=nde(this.projectionDeltaWithTransform,this.treeScale,j);b&&(A=b(j,A)),m.transform=A;const{x:k,y:T}=this.projectionDelta;m.transformOrigin=`${k.origin*100}% ${T.origin*100}% 0`,S.animationValues?m.opacity=S===this?j.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:j.opacityExit:m.opacity=S===this?j.opacity!==void 0?j.opacity:"":j.opacityExit!==void 0?j.opacityExit:0;for(const M in n_){if(j[M]===void 0)continue;const{correct:I,applyTo:q,isCSSVariable:G}=n_[M],K=A==="none"?j[M]:I(j[M],S);if(q){const X=q.length;for(let L=0;L<X;L++)m[q[L]]=K}else G?this.options.visualElement.renderState.vars[M]=K:m[M]=K}this.options.layoutId&&(m.pointerEvents=S===this?bj(g?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(m=>m.currentAnimation?.stop()),this.root.nodes.forEach(O4),this.root.sharedNodes.clear()}}}function ide(e){e.updateLayout()}function ade(e){const r=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:d}=e.options,p=r.source!==e.layout.source;d==="size"?to(j=>{const A=p?r.measuredBox[j]:r.layoutBox[j],k=Mi(A);A.min=s[j].min,A.max=A.min+k}):MF(d,r.layoutBox,s)&&to(j=>{const A=p?r.measuredBox[j]:r.layoutBox[j],k=Mi(s[j]);A.max=A.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[j].max=e.relativeTarget[j].min+k)});const m=cg();Nb(m,s,r.layoutBox);const g=cg();p?Nb(g,e.applyTransform(o,!0),r.measuredBox):Nb(g,s,r.layoutBox);const b=!$F(m);let S=!1;if(!e.resumeFrom){const j=e.getClosestProjectingParent();if(j&&!j.resumeFrom){const{snapshot:A,layout:k}=j;if(A&&k){const T=js();Xj(T,r.layoutBox,A.layoutBox);const M=js();Xj(M,s,k.layoutBox),NF(T,M)||(S=!0),j.options.layoutRoot&&(e.relativeTarget=M,e.relativeTargetOrigin=T,e.relativeParent=j)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:r,delta:g,layoutDelta:m,hasLayoutChanged:b,hasRelativeLayoutChanged:S})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ode(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 lde(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cde(e){e.clearSnapshot()}function O4(e){e.clearMeasurements()}function k4(e){e.isLayoutDirty=!1}function ude(e){const{visualElement:r}=e.options;r&&r.getProps().onBeforeLayoutMeasure&&r.notify("BeforeLayoutMeasure"),e.resetTransform()}function R4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dde(e){e.resolveTargetDelta()}function hde(e){e.calcProjection()}function pde(e){e.resetSkewAndRotation()}function fde(e){e.removeLeadSnapshot()}function T4(e,r,s){e.translate=Lr(r.translate,0,s),e.scale=Lr(r.scale,1,s),e.origin=r.origin,e.originPoint=r.originPoint}function _4(e,r,s,o){e.min=Lr(r.min,s.min,o),e.max=Lr(r.max,s.max,o)}function mde(e,r,s,o){_4(e.x,r.x,s.x,o),_4(e.y,r.y,s.y,o)}function gde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yde={duration:.45,ease:[.4,0,.1,1]},$4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N4=$4("applewebkit/")&&!$4("chrome/")?Math.round:so;function D4(e){e.min=N4(e.min),e.max=N4(e.max)}function vde(e){D4(e.x),D4(e.y)}function MF(e,r,s){return e==="position"||e==="preserve-aspect"&&!Aue(C4(r),C4(s),.2)}function xde(e){return e!==e.root&&e.scroll?.wasRoot}const bde=PF({attachResizeListener:(e,r)=>Vb(e,"resize",r),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oT={current:void 0},IF=PF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oT.current){const e=new bde({});e.mount(window),e.setOptions({layoutScroll:!0}),oT.current=e}return oT.current},resetTransform:(e,r)=>{e.style.transform=r!==void 0?r:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wde={pan:{Feature:que},drag:{Feature:Fue,ProjectionNode:IF,MeasureLayout:RF}};function P4(e,r,s){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",s==="Start");const d="onHover"+s,p=o[d];p&&_r.postRender(()=>p(r,pw(r)))}class Sde extends Yd{mount(){const{current:r}=this.node;r&&(this.unmount=Zle(r,(s,o)=>(P4(this.node,o,"Start"),d=>P4(this.node,d,"End"))))}unmount(){}}class Ede extends Yd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let r=!1;try{r=this.node.current.matches(":focus-visible")}catch{r=!0}!r||!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=uw(Vb(this.node.current,"focus",()=>this.onFocus()),Vb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function M4(e,r,s){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",s==="Start");const d="onTap"+(s==="End"?"":s),p=o[d];p&&_r.postRender(()=>p(r,pw(r)))}class jde extends Yd{mount(){const{current:r}=this.node;r&&(this.unmount=ece(r,(s,o)=>(M4(this.node,o,"Start"),(d,{success:p})=>M4(this.node,d,p?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const u_=new WeakMap,lT=new WeakMap,Cde=e=>{const r=u_.get(e.target);r&&r(e)},Ade=e=>{e.forEach(Cde)};function Ode({root:e,...r}){const s=e||document;lT.has(s)||lT.set(s,{});const o=lT.get(s),d=JSON.stringify(r);return o[d]||(o[d]=new IntersectionObserver(Ade,{root:e,...r})),o[d]}function kde(e,r,s){const o=Ode(r);return u_.set(e,s),o.observe(e),()=>{u_.delete(e),o.unobserve(e)}}const Rde={some:0,all:1};class Tde extends Yd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:r={}}=this.node.getProps(),{root:s,margin:o,amount:d="some",once:p}=r,m={root:s?s.current:void 0,rootMargin:o,threshold:typeof d=="number"?d:Rde[d]},g=b=>{const{isIntersecting:S}=b;if(this.isInView===S||(this.isInView=S,p&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:j,onViewportLeave:A}=this.node.getProps(),k=S?j:A;k&&k(b)};return kde(this.node.current,m,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:r,prevProps:s}=this.node;["amount","margin","root"].some(_de(r,s))&&this.startObserver()}unmount(){}}function _de({viewport:e={}},{viewport:r={}}={}){return s=>e[s]!==r[s]}const $de={inView:{Feature:Tde},tap:{Feature:jde},focus:{Feature:Ede},hover:{Feature:Sde}},Nde={layout:{ProjectionNode:IF,MeasureLayout:RF}},Dde={...bue,...$de,...wde,...Nde},Pde=Mce(Dde,Yce),Mde=[{id:"light",icon:jW,label:"Light"},{id:"dark",icon:lW,label:"Dark"},{id:"system",icon:aW,label:"System"}],LF=({className:e="",variant:r="pill",ariaLabel:s="Toggle theme"})=>{const{theme:o,setTheme:d}=N_(),p=o??"system",m=r==="pill";return u.jsx("div",{className:ft("inline-flex items-center",m&&"bg-muted/70 rounded-full p-1 text-xs shadow-sm",!m&&"gap-2",e),"aria-label":s,role:"radiogroup",children:Mde.map(({id:g,icon:b,label:S})=>{const j=p===g;return u.jsxs("button",{type:"button",role:"radio","aria-checked":j,onClick:()=>d(g),"aria-label":m?S:void 0,className:ft("focus-visible:ring-ring focus-visible:ring-offset-background relative flex items-center justify-center rounded-full transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",j?"text-foreground border":"text-muted-foreground hover:text-foreground",m&&"h-8 w-8",!m&&"h-8 gap-2 px-3 text-sm font-medium"),children:[j&&u.jsx(Pde.span,{layoutId:"theme-switcher-pill",className:"bg-background absolute inset-0 rounded-full shadow-sm",transition:{type:"spring",stiffness:350,damping:26}}),u.jsx(b,{className:"relative z-10 h-4 w-4"}),!m&&u.jsx("span",{className:"relative z-10",children:S})]},g)})})};function Ide(){return rr({queryKey:["me"],queryFn:()=>yp.getMe(),staleTime:300*1e3})}function Lde(e,r=[]){let s=[];function o(p,m){const g=R.createContext(m);g.displayName=p+"Context";const b=s.length;s=[...s,m];const S=A=>{const{scope:k,children:T,...M}=A,I=k?.[e]?.[b]||g,q=R.useMemo(()=>M,Object.values(M));return u.jsx(I.Provider,{value:q,children:T})};S.displayName=p+"Provider";function j(A,k){const T=k?.[e]?.[b]||g,M=R.useContext(T);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${p}\``)}return[S,j]}const d=()=>{const p=s.map(m=>R.createContext(m));return function(g){const b=g?.[e]||p;return R.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return d.scopeName=e,[o,zde(d,...r)]}function zde(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(p){const m=o.reduce((g,{useScope:b,scopeName:S})=>{const A=b(p)[`__scope${S}`];return{...g,...A}},{});return R.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}var Fde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],F2=Fde.reduce((e,r)=>{const s=Qb(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),cT={exports:{}},uT={};var I4;function qde(){if(I4)return uT;I4=1;var e=U3();function r(A,k){return A===k&&(A!==0||1/A===1/k)||A!==A&&k!==k}var s=typeof Object.is=="function"?Object.is:r,o=e.useState,d=e.useEffect,p=e.useLayoutEffect,m=e.useDebugValue;function g(A,k){var T=k(),M=o({inst:{value:T,getSnapshot:k}}),I=M[0].inst,q=M[1];return p(function(){I.value=T,I.getSnapshot=k,b(I)&&q({inst:I})},[A,T,k]),d(function(){return b(I)&&q({inst:I}),A(function(){b(I)&&q({inst:I})})},[A]),m(T),T}function b(A){var k=A.getSnapshot;A=A.value;try{var T=k();return!s(A,T)}catch{return!0}}function S(A,k){return k()}var j=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:g;return uT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:j,uT}var L4;function Bde(){return L4||(L4=1,cT.exports=qde()),cT.exports}var Ude=Bde();function Kde(){return Ude.useSyncExternalStore(Vde,()=>!0,()=>!1)}function Vde(){return()=>{}}var q2="Avatar",[Hde]=Lde(q2),[Gde,zF]=Hde(q2),FF=R.forwardRef((e,r)=>{const{__scopeAvatar:s,...o}=e,[d,p]=R.useState("idle");return u.jsx(Gde,{scope:s,imageLoadingStatus:d,onImageLoadingStatusChange:p,children:u.jsx(F2.span,{...o,ref:r})})});FF.displayName=q2;var qF="AvatarImage",Xde=R.forwardRef((e,r)=>{const{__scopeAvatar:s,src:o,onLoadingStatusChange:d=()=>{},...p}=e,m=zF(qF,s),g=Yde(o,p),b=tl(S=>{d(S),m.onImageLoadingStatusChange(S)});return As(()=>{g!=="idle"&&b(g)},[g,b]),g==="loaded"?u.jsx(F2.img,{...p,ref:r,src:o}):null});Xde.displayName=qF;var BF="AvatarFallback",UF=R.forwardRef((e,r)=>{const{__scopeAvatar:s,delayMs:o,...d}=e,p=zF(BF,s),[m,g]=R.useState(o===void 0);return R.useEffect(()=>{if(o!==void 0){const b=window.setTimeout(()=>g(!0),o);return()=>window.clearTimeout(b)}},[o]),m&&p.imageLoadingStatus!=="loaded"?u.jsx(F2.span,{...d,ref:r}):null});UF.displayName=BF;function z4(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Yde(e,{referrerPolicy:r,crossOrigin:s}){const o=Kde(),d=R.useRef(null),p=o?(d.current||(d.current=new window.Image),d.current):null,[m,g]=R.useState(()=>z4(p,e));return As(()=>{g(z4(p,e))},[p,e]),As(()=>{const b=A=>()=>{g(A)};if(!p)return;const S=b("loaded"),j=b("error");return p.addEventListener("load",S),p.addEventListener("error",j),r&&(p.referrerPolicy=r),typeof s=="string"&&(p.crossOrigin=s),()=>{p.removeEventListener("load",S),p.removeEventListener("error",j)}},[p,s,r]),m}var Zde=FF,Wde=UF;function Jde({className:e,...r}){return u.jsx(Zde,{"data-slot":"avatar",className:ft("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...r})}function Qde({className:e,...r}){return u.jsx(Wde,{"data-slot":"avatar-fallback",className:ft("bg-muted flex size-full items-center justify-center rounded-full",e),...r})}function ehe({...e}){return u.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function the({className:e,...r}){return u.jsx("ol",{"data-slot":"breadcrumb-list",className:ft("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...r})}function F4({className:e,...r}){return u.jsx("li",{"data-slot":"breadcrumb-item",className:ft("inline-flex items-center gap-1.5",e),...r})}function q4({asChild:e,className:r,...s}){const o=e?Cg:"a";return u.jsx(o,{"data-slot":"breadcrumb-link",className:ft("hover:text-foreground transition-colors",r),...s})}function nhe({className:e,...r}){return u.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ft("text-foreground font-normal",e),...r})}function rhe({children:e,className:r,...s}){return u.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ft("[&>svg]:size-3.5",r),...s,children:e??u.jsx(SZ,{})})}const dT=768;function she(){const[e,r]=R.useState(void 0);return R.useEffect(()=>{const s=window.matchMedia(`(max-width: ${dT-1}px)`),o=()=>{r(window.innerWidth<dT)};return s.addEventListener("change",o),r(window.innerWidth<dT),()=>s.removeEventListener("change",o)},[]),!!e}function gt({className:e,type:r,...s}){return u.jsx("input",{type:r,"data-slot":"input",className:ft("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}function ihe({...e}){return u.jsx(TC,{"data-slot":"sheet",...e})}function ahe({...e}){return u.jsx(_C,{"data-slot":"sheet-portal",...e})}function ohe({className:e,...r}){return u.jsx($C,{"data-slot":"sheet-overlay",className:ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function lhe({className:e,children:r,side:s="right",...o}){return u.jsxs(ahe,{children:[u.jsx(ohe,{}),u.jsxs(NC,{"data-slot":"sheet-content",className:ft("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[r,u.jsxs(ow,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[u.jsx(q_,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function che({className:e,...r}){return u.jsx("div",{"data-slot":"sheet-header",className:ft("flex flex-col gap-1.5 p-4",e),...r})}function uhe({className:e,...r}){return u.jsx(i2,{"data-slot":"sheet-title",className:ft("text-foreground font-semibold",e),...r})}function dhe({className:e,...r}){return u.jsx(a2,{"data-slot":"sheet-description",className:ft("text-muted-foreground text-sm",e),...r})}const hhe="sidebar_state",phe=3600*24*7,fhe="16rem",mhe="18rem",ghe="3rem",yhe="b",KF=R.createContext(null);function B2(){const e=R.useContext(KF);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function vhe({defaultOpen:e=!0,open:r,onOpenChange:s,className:o,style:d,children:p,...m}){const g=she(),[b,S]=R.useState(!1),[j,A]=R.useState(e),k=r??j,T=R.useCallback(G=>{const K=typeof G=="function"?G(k):G;s?s(K):A(K),document.cookie=`${hhe}=${K}; path=/; max-age=${phe}`},[s,k]),M=R.useCallback(()=>g?S(G=>!G):T(G=>!G),[g,T,S]);R.useEffect(()=>{const G=K=>{K.key===yhe&&(K.metaKey||K.ctrlKey)&&(K.preventDefault(),M())};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[M]);const I=k?"expanded":"collapsed",q=R.useMemo(()=>({state:I,open:k,setOpen:T,isMobile:g,openMobile:b,setOpenMobile:S,toggleSidebar:M}),[I,k,T,g,b,S,M]);return u.jsx(KF.Provider,{value:q,children:u.jsx(rw,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":fhe,"--sidebar-width-icon":ghe,...d},className:ft("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...m,children:p})})})}function xhe({side:e="left",variant:r="sidebar",collapsible:s="offcanvas",className:o,children:d,...p}){const{isMobile:m,state:g,openMobile:b,setOpenMobile:S}=B2();return s==="none"?u.jsx("div",{"data-slot":"sidebar",className:ft("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...p,children:d}):m?u.jsx(ihe,{open:b,onOpenChange:S,...p,children:u.jsxs(lhe,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":mhe},side:e,children:[u.jsxs(che,{className:"sr-only",children:[u.jsx(uhe,{children:"Sidebar"}),u.jsx(dhe,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:d})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":g,"data-collapsible":g==="collapsed"?s:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:ft("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:ft("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...p,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:d})})]})}function bhe({className:e,onClick:r,...s}){const{toggleSidebar:o}=B2();return u.jsxs(Fe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ft("size-7",e),onClick:d=>{r?.(d),o()},...s,children:[u.jsx(fW,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function whe({className:e,...r}){return u.jsx("main",{"data-slot":"sidebar-inset",className:ft("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...r})}function She({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ft("flex flex-col gap-2 p-2",e),...r})}function Ehe({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ft("flex flex-col gap-2 p-2",e),...r})}function jhe({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ft("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})}function ej({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ft("relative flex w-full min-w-0 flex-col p-2",e),...r})}function tj({className:e,asChild:r=!1,...s}){const o=r?Cg:"div";return u.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:ft("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...s})}function nj({className:e,...r}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ft("w-full text-sm",e),...r})}function rj({className:e,...r}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ft("flex w-full min-w-0 flex-col gap-1",e),...r})}function sj({className:e,...r}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ft("group/menu-item relative",e),...r})}const Che=U_("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ij({asChild:e=!1,isActive:r=!1,variant:s="default",size:o="default",tooltip:d,className:p,...m}){const g=e?Cg:"button",{isMobile:b,state:S}=B2(),j=u.jsx(g,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":r,className:ft(Che({variant:s,size:o}),p),...m});return d?(typeof d=="string"&&(d={children:d}),u.jsxs(Mj,{children:[u.jsx(Ij,{asChild:!0,children:j}),u.jsx(Lj,{side:"right",align:"center",hidden:S!=="collapsed"||b,...d})]})):j}const Ahe=()=>{const e=__(),{data:r,isLoading:s}=Ide(),o=R.useMemo(()=>{const p=e.pathname.split("/").filter(Boolean),m=[];let g="";for(const b of p)g+=`/${b}`,m.push({to:g,label:b});return m},[e.pathname]),d=R.useMemo(()=>{if(!r)return"U";const m=(r.display_name||r.primary_email||"").trim().split(/\s+/);return m.length>=2?(m[0][0]+m[1][0]).toUpperCase():m.length===1&&m[0]?m[0][0].toUpperCase():"U"},[r]);return u.jsxs("div",{className:"flex h-12 items-center gap-2 border-b px-3",children:[u.jsx(bhe,{}),u.jsx("div",{className:"flex-1",children:u.jsx(ehe,{children:u.jsxs(the,{children:[u.jsx(F4,{children:u.jsx(q4,{asChild:!0,children:u.jsx(AR,{to:"/",children:"Home"})})}),o.map((p,m)=>u.jsxs("span",{className:"flex items-center",children:[u.jsx(rhe,{}),u.jsx(F4,{children:m===o.length-1?u.jsx(nhe,{className:"capitalize",children:p.label}):u.jsx(q4,{asChild:!0,children:u.jsx(AR,{to:p.to,className:"capitalize",children:p.label})})})]},p.to))]})})}),u.jsx(LF,{variant:"wide"}),u.jsx(Fe,{variant:"ghost",size:"sm",asChild:!0,children:u.jsx(AR,{to:"/me",children:s?"…":r?.display_name||"Profile"})}),u.jsx(Jde,{className:"h-7 w-7",children:u.jsx(Qde,{children:d})})]})};async function Ohe(){const e=Ks.get();if(!e?.refresh_token){Ks.logout();return}try{const r={refresh_token:e.refresh_token};await Yee().logout({dtoLogoutRequest:r})}catch(r){console.warn("Logout API failed; clearing local state anyway",r)}finally{Ks.logout()}}function khe(){return{logout:R.useCallback(()=>Ohe(),[])}}const Rhe=()=>{const[e,r]=R.useState([]),{logout:s}=khe();return R.useEffect(()=>{let o=!0;return(async()=>{try{const p=((await yp.getMe()).organizations??[]).map(m=>({id:m.id,name:m.name??m.id}));if(!o)return;r(p),!Qo.get()&&p.length>0&&Qo.set(p[0].id)}catch{}})(),()=>{o=!1}},[]),u.jsxs(vhe,{defaultOpen:!0,children:[u.jsxs(xhe,{collapsible:"icon",variant:"floating",children:[u.jsx(She,{children:u.jsx("div",{className:"px-2 py-2",children:u.jsx(soe,{orgs:e})})}),u.jsxs(jhe,{children:[u.jsxs(ej,{children:[u.jsx(tj,{children:"Navigation"}),u.jsx(nj,{children:u.jsx(rj,{children:Kse.map(o=>u.jsx(sj,{children:u.jsx(ij,{asChild:!0,tooltip:o.label,children:u.jsxs(ME,{to:o.to,className:({isActive:d})=>ft("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(ej,{children:[u.jsx(tj,{children:"Organization"}),u.jsx(nj,{children:u.jsx(rj,{children:Vse.map(o=>u.jsx(sj,{children:u.jsx(ij,{asChild:!0,tooltip:o.label,children:u.jsxs(ME,{to:o.to,className:({isActive:d})=>ft("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(ej,{children:[u.jsx(tj,{children:"User"}),u.jsx(nj,{children:u.jsx(rj,{children:Hse.map(o=>u.jsx(sj,{children:u.jsx(ij,{asChild:!0,tooltip:o.label,children:u.jsxs(ME,{to:o.to,className:({isActive:d})=>ft("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsxs(ej,{children:[u.jsx(tj,{children:"Admin"}),u.jsx(nj,{children:u.jsx(rj,{children:Gse.map(o=>u.jsx(sj,{children:u.jsx(ij,{asChild:!0,tooltip:o.label,children:u.jsxs(ME,{to:o.to,target:o.target?o.target:"_self",className:({isActive:d})=>ft("flex items-center gap-2",d&&"text-primary"),children:[u.jsx(o.icon,{className:"h-4 w-4"}),u.jsx("span",{children:o.label})]})})},o.to))})})]}),u.jsx("div",{className:"mt-auto flex items-center justify-center p-3",children:u.jsx(LF,{})})]}),u.jsx(Ehe,{children:u.jsx("div",{className:"px-2 py-2",children:u.jsx(Fe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>void s(),children:"Sign out"})})})]}),u.jsxs(whe,{className:"flex min-h-screen flex-col",children:[u.jsx(Ahe,{}),u.jsx("main",{className:"p-4",children:u.jsx(K3,{})}),u.jsx(_se,{})]})]})},The=()=>{const e=R.useSyncExternalStore(r=>Ks.subscribe(r),()=>Ks.get(),()=>Ks.get());return{tokens:e,authed:!!e?.access_token,isExpired:Ks.isExpired(),willExpireSoon:Ks.willExpireSoon()}},_he=()=>{const{authed:e}=The(),r=__();return e?u.jsx(K3,{}):u.jsx(fY,{to:`/login?to=${encodeURIComponent(r.pathname+r.search)}`,replace:!0})},ob=nte(),Sb={listAnnotations:()=>ut(async()=>await ob.listAnnotations()),createAnnotation:e=>ut(async()=>await ob.createAnnotation({dtoCreateAnnotationRequest:e})),getAnnotation:e=>ut(async()=>await ob.getAnnotation({id:e})),deleteAnnotation:e=>ut(async()=>{await ob.deleteAnnotation({id:e})}),updateAnnotation:(e,r)=>ut(async()=>await ob.updateAnnotation({id:e,dtoUpdateAnnotationRequest:r}))};var fw=e=>e.type==="checkbox",wp=e=>e instanceof Date,ua=e=>e==null;const VF=e=>typeof e=="object";var ms=e=>!ua(e)&&!Array.isArray(e)&&VF(e)&&!wp(e),HF=e=>ms(e)&&e.target?fw(e.target)?e.target.checked:e.target.value:e,$he=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,GF=(e,r)=>e.has($he(r)),Nhe=e=>{const r=e.constructor&&e.constructor.prototype;return ms(r)&&r.hasOwnProperty("isPrototypeOf")},U2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Es(e){let r;const s=Array.isArray(e),o=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(U2&&(e instanceof Blob||o))&&(s||ms(e)))if(r=s?[]:Object.create(Object.getPrototypeOf(e)),!s&&!Nhe(e))r=e;else for(const d in e)e.hasOwnProperty(d)&&(r[d]=Es(e[d]));else return e;return r}var zC=e=>/^\w*$/.test(e),Hr=e=>e===void 0,K2=e=>Array.isArray(e)?e.filter(Boolean):[],V2=e=>K2(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Et=(e,r,s)=>{if(!r||!ms(e))return s;const o=(zC(r)?[r]:V2(r)).reduce((d,p)=>ua(d)?d:d[p],e);return Hr(o)||o===e?Hr(e[r])?s:e[r]:o},Ta=e=>typeof e=="boolean",dr=(e,r,s)=>{let o=-1;const d=zC(r)?[r]:V2(r),p=d.length,m=p-1;for(;++o<p;){const g=d[o];let b=s;if(o!==m){const S=e[g];b=ms(S)||Array.isArray(S)?S:isNaN(+d[o+1])?{}:[]}if(g==="__proto__"||g==="constructor"||g==="prototype")return;e[g]=b,e=e[g]}};const Yj={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Zo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},cu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},H2=Je.createContext(null);H2.displayName="HookFormContext";const FC=()=>Je.useContext(H2),Dhe=e=>{const{children:r,...s}=e;return Je.createElement(H2.Provider,{value:s},r)};var XF=(e,r,s,o=!0)=>{const d={defaultValues:r._defaultValues};for(const p in e)Object.defineProperty(d,p,{get:()=>{const m=p;return r._proxyFormState[m]!==Zo.all&&(r._proxyFormState[m]=!o||Zo.all),s&&(s[m]=!0),e[m]}});return d};const G2=typeof window<"u"?Je.useLayoutEffect:Je.useEffect;function YF(e){const r=FC(),{control:s=r.control,disabled:o,name:d,exact:p}=e||{},[m,g]=Je.useState(s._formState),b=Je.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return G2(()=>s._subscribe({name:d,formState:b.current,exact:p,callback:S=>{!o&&g({...s._formState,...S})}}),[d,o,p]),Je.useEffect(()=>{b.current.isValid&&s._setValid(!0)},[s]),Je.useMemo(()=>XF(m,s,b.current,!1),[m,s])}var $a=e=>typeof e=="string",d_=(e,r,s,o,d)=>$a(e)?(o&&r.watch.add(e),Et(s,e,d)):Array.isArray(e)?e.map(p=>(o&&r.watch.add(p),Et(s,p))):(o&&(r.watchAll=!0),s),h_=e=>ua(e)||!VF(e);function Wo(e,r,s=new WeakSet){if(h_(e)||h_(r))return Object.is(e,r);if(wp(e)&&wp(r))return e.getTime()===r.getTime();const o=Object.keys(e),d=Object.keys(r);if(o.length!==d.length)return!1;if(s.has(e)||s.has(r))return!0;s.add(e),s.add(r);for(const p of o){const m=e[p];if(!d.includes(p))return!1;if(p!=="ref"){const g=r[p];if(wp(m)&&wp(g)||ms(m)&&ms(g)||Array.isArray(m)&&Array.isArray(g)?!Wo(m,g,s):!Object.is(m,g))return!1}}return!0}function ug(e){const r=FC(),{control:s=r.control,name:o,defaultValue:d,disabled:p,exact:m,compute:g}=e||{},b=Je.useRef(d),S=Je.useRef(g),j=Je.useRef(void 0),A=Je.useRef(s),k=Je.useRef(o);S.current=g;const[T,M]=Je.useState(()=>{const L=s._getWatch(o,b.current);return S.current?S.current(L):L}),I=Je.useCallback(L=>{const ee=d_(o,s._names,L||s._formValues,!1,b.current);return S.current?S.current(ee):ee},[s._formValues,s._names,o]),q=Je.useCallback(L=>{if(!p){const ee=d_(o,s._names,L||s._formValues,!1,b.current);if(S.current){const oe=S.current(ee);Wo(oe,j.current)||(M(oe),j.current=oe)}else M(ee)}},[s._formValues,s._names,p,o]);G2(()=>((A.current!==s||!Wo(k.current,o))&&(A.current=s,k.current=o,q()),s._subscribe({name:o,formState:{values:!0},exact:m,callback:L=>{q(L.values)}})),[s,m,o,q]),Je.useEffect(()=>s._removeUnmounted());const G=A.current!==s,K=k.current,X=Je.useMemo(()=>{if(p)return null;const L=!G&&!Wo(K,o);return G||L?I():null},[p,G,o,K,I]);return X!==null?X:T}function Phe(e){const r=FC(),{name:s,disabled:o,control:d=r.control,shouldUnregister:p,defaultValue:m,exact:g=!0}=e,b=GF(d._names.array,s),S=Je.useMemo(()=>Et(d._formValues,s,Et(d._defaultValues,s,m)),[d,s,m]),j=ug({control:d,name:s,defaultValue:S,exact:g}),A=YF({control:d,name:s,exact:g}),k=Je.useRef(e),T=Je.useRef(void 0),M=Je.useRef(d.register(s,{...e.rules,value:j,...Ta(e.disabled)?{disabled:e.disabled}:{}}));k.current=e;const I=Je.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Et(A.errors,s)},isDirty:{enumerable:!0,get:()=>!!Et(A.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!Et(A.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!Et(A.validatingFields,s)},error:{enumerable:!0,get:()=>Et(A.errors,s)}}),[A,s]),q=Je.useCallback(L=>M.current.onChange({target:{value:HF(L),name:s},type:Yj.CHANGE}),[s]),G=Je.useCallback(()=>M.current.onBlur({target:{value:Et(d._formValues,s),name:s},type:Yj.BLUR}),[s,d._formValues]),K=Je.useCallback(L=>{const ee=Et(d._fields,s);ee&&L&&(ee._f.ref={focus:()=>L.focus&&L.focus(),select:()=>L.select&&L.select(),setCustomValidity:oe=>L.setCustomValidity(oe),reportValidity:()=>L.reportValidity()})},[d._fields,s]),X=Je.useMemo(()=>({name:s,value:j,...Ta(o)||A.disabled?{disabled:A.disabled||o}:{},onChange:q,onBlur:G,ref:K}),[s,o,A.disabled,q,G,K,j]);return Je.useEffect(()=>{const L=d._options.shouldUnregister||p,ee=T.current;ee&&ee!==s&&!b&&d.unregister(ee),d.register(s,{...k.current.rules,...Ta(k.current.disabled)?{disabled:k.current.disabled}:{}});const oe=(Q,ne)=>{const de=Et(d._fields,Q);de&&de._f&&(de._f.mount=ne)};if(oe(s,!0),L){const Q=Es(Et(d._options.defaultValues,s,k.current.defaultValue));dr(d._defaultValues,s,Q),Hr(Et(d._formValues,s))&&dr(d._formValues,s,Q)}return!b&&d.register(s),T.current=s,()=>{(b?L&&!d._state.action:L)?d.unregister(s):oe(s,!1)}},[s,d,b,p]),Je.useEffect(()=>{d._setDisabledField({disabled:o,name:s})},[o,s,d]),Je.useMemo(()=>({field:X,formState:A,fieldState:I}),[X,A,I])}const Go=e=>e.render(Phe(e));var X2=(e,r,s,o,d)=>r?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[o]:d||!0}}:{},Db=e=>Array.isArray(e)?e:[e],B4=()=>{let e=[];return{get observers(){return e},next:d=>{for(const p of e)p.next&&p.next(d)},subscribe:d=>(e.push(d),{unsubscribe:()=>{e=e.filter(p=>p!==d)}}),unsubscribe:()=>{e=[]}}};function ZF(e,r){const s={};for(const o in e)if(e.hasOwnProperty(o)){const d=e[o],p=r[o];if(d&&ms(d)&&p){const m=ZF(d,p);ms(m)&&(s[o]=m)}else e[o]&&(s[o]=p)}return s}var Di=e=>ms(e)&&!Object.keys(e).length,Y2=e=>e.type==="file",Jo=e=>typeof e=="function",Zj=e=>{if(!U2)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},WF=e=>e.type==="select-multiple",Z2=e=>e.type==="radio",Mhe=e=>Z2(e)||fw(e),hT=e=>Zj(e)&&e.isConnected;function Ihe(e,r){const s=r.slice(0,-1).length;let o=0;for(;o<s;)e=Hr(e)?o++:e[r[o++]];return e}function Lhe(e){for(const r in e)if(e.hasOwnProperty(r)&&!Hr(e[r]))return!1;return!0}function ps(e,r){const s=Array.isArray(r)?r:zC(r)?[r]:V2(r),o=s.length===1?e:Ihe(e,s),d=s.length-1,p=s[d];return o&&delete o[p],d!==0&&(ms(o)&&Di(o)||Array.isArray(o)&&Lhe(o))&&ps(e,s.slice(0,-1)),e}var zhe=e=>{for(const r in e)if(Jo(e[r]))return!0;return!1};function JF(e){return Array.isArray(e)||ms(e)&&!zhe(e)}function p_(e,r={}){for(const s in e){const o=e[s];JF(o)?(r[s]=Array.isArray(o)?[]:{},p_(o,r[s])):Hr(o)||(r[s]=!0)}return r}function Jm(e,r,s){s||(s=p_(r));for(const o in e){const d=e[o];if(JF(d))Hr(r)||h_(s[o])?s[o]=p_(d,Array.isArray(d)?[]:{}):Jm(d,ua(r)?{}:r[o],s[o]);else{const p=r[o];s[o]=!Wo(d,p)}}return s}const U4={value:!1,isValid:!1},K4={value:!0,isValid:!0};var QF=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Hr(e[0].attributes.value)?Hr(e[0].value)||e[0].value===""?K4:{value:e[0].value,isValid:!0}:K4:U4}return U4},e6=(e,{valueAsNumber:r,valueAsDate:s,setValueAs:o})=>Hr(e)?e:r?e===""?NaN:e&&+e:s&&$a(e)?new Date(e):o?o(e):e;const V4={isValid:!1,value:null};var t6=e=>Array.isArray(e)?e.reduce((r,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:r,V4):V4;function H4(e){const r=e.ref;return Y2(r)?r.files:Z2(r)?t6(e.refs).value:WF(r)?[...r.selectedOptions].map(({value:s})=>s):fw(r)?QF(e.refs).value:e6(Hr(r.value)?e.ref.value:r.value,e)}var Fhe=(e,r,s,o)=>{const d={};for(const p of e){const m=Et(r,p);m&&dr(d,p,m._f)}return{criteriaMode:s,names:[...e],fields:d,shouldUseNativeValidation:o}},Wj=e=>e instanceof RegExp,lb=e=>Hr(e)?e:Wj(e)?e.source:ms(e)?Wj(e.value)?e.value.source:e.value:e,G4=e=>({isOnSubmit:!e||e===Zo.onSubmit,isOnBlur:e===Zo.onBlur,isOnChange:e===Zo.onChange,isOnAll:e===Zo.all,isOnTouch:e===Zo.onTouched});const X4="AsyncFunction";var qhe=e=>!!e&&!!e.validate&&!!(Jo(e.validate)&&e.validate.constructor.name===X4||ms(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===X4)),Bhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Y4=(e,r,s)=>!s&&(r.watchAll||r.watch.has(e)||[...r.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const Pb=(e,r,s,o)=>{for(const d of s||Object.keys(e)){const p=Et(e,d);if(p){const{_f:m,...g}=p;if(m){if(m.refs&&m.refs[0]&&r(m.refs[0],d)&&!o)return!0;if(m.ref&&r(m.ref,m.name)&&!o)return!0;if(Pb(g,r))break}else if(ms(g)&&Pb(g,r))break}}};function Z4(e,r,s){const o=Et(e,s);if(o||zC(s))return{error:o,name:s};const d=s.split(".");for(;d.length;){const p=d.join("."),m=Et(r,p),g=Et(e,p);if(m&&!Array.isArray(m)&&s!==p)return{name:s};if(g&&g.type)return{name:p,error:g};if(g&&g.root&&g.root.type)return{name:`${p}.root`,error:g.root};d.pop()}return{name:s}}var Uhe=(e,r,s,o)=>{s(e);const{name:d,...p}=e;return Di(p)||Object.keys(p).length>=Object.keys(r).length||Object.keys(p).find(m=>r[m]===(!o||Zo.all))},Khe=(e,r,s)=>!e||!r||e===r||Db(e).some(o=>o&&(s?o===r:o.startsWith(r)||r.startsWith(o))),Vhe=(e,r,s,o,d)=>d.isOnAll?!1:!s&&d.isOnTouch?!(r||e):(s?o.isOnBlur:d.isOnBlur)?!e:(s?o.isOnChange:d.isOnChange)?e:!0,Hhe=(e,r)=>!K2(Et(e,r)).length&&ps(e,r),Ghe=(e,r,s)=>{const o=Db(Et(e,s));return dr(o,"root",r[s]),dr(e,s,o),e};function W4(e,r,s="validate"){if($a(e)||Array.isArray(e)&&e.every($a)||Ta(e)&&!e)return{type:s,message:$a(e)?e:"",ref:r}}var Xm=e=>ms(e)&&!Wj(e)?e:{value:e,message:""},J4=async(e,r,s,o,d,p)=>{const{ref:m,refs:g,required:b,maxLength:S,minLength:j,min:A,max:k,pattern:T,validate:M,name:I,valueAsNumber:q,mount:G}=e._f,K=Et(s,I);if(!G||r.has(I))return{};const X=g?g[0]:m,L=le=>{d&&X.reportValidity&&(X.setCustomValidity(Ta(le)?"":le||""),X.reportValidity())},ee={},oe=Z2(m),Q=fw(m),ne=oe||Q,de=(q||Y2(m))&&Hr(m.value)&&Hr(K)||Zj(m)&&m.value===""||K===""||Array.isArray(K)&&!K.length,je=X2.bind(null,I,o,ee),ve=(le,be,Ce,Ke=cu.maxLength,ce=cu.minLength)=>{const re=le?be:Ce;ee[I]={type:le?Ke:ce,message:re,ref:m,...je(le?Ke:ce,re)}};if(p?!Array.isArray(K)||!K.length:b&&(!ne&&(de||ua(K))||Ta(K)&&!K||Q&&!QF(g).isValid||oe&&!t6(g).isValid)){const{value:le,message:be}=$a(b)?{value:!!b,message:b}:Xm(b);if(le&&(ee[I]={type:cu.required,message:be,ref:X,...je(cu.required,be)},!o))return L(be),ee}if(!de&&(!ua(A)||!ua(k))){let le,be;const Ce=Xm(k),Ke=Xm(A);if(!ua(K)&&!isNaN(K)){const ce=m.valueAsNumber||K&&+K;ua(Ce.value)||(le=ce>Ce.value),ua(Ke.value)||(be=ce<Ke.value)}else{const ce=m.valueAsDate||new Date(K),re=fe=>new Date(new Date().toDateString()+" "+fe),ue=m.type=="time",_e=m.type=="week";$a(Ce.value)&&K&&(le=ue?re(K)>re(Ce.value):_e?K>Ce.value:ce>new Date(Ce.value)),$a(Ke.value)&&K&&(be=ue?re(K)<re(Ke.value):_e?K<Ke.value:ce<new Date(Ke.value))}if((le||be)&&(ve(!!le,Ce.message,Ke.message,cu.max,cu.min),!o))return L(ee[I].message),ee}if((S||j)&&!de&&($a(K)||p&&Array.isArray(K))){const le=Xm(S),be=Xm(j),Ce=!ua(le.value)&&K.length>+le.value,Ke=!ua(be.value)&&K.length<+be.value;if((Ce||Ke)&&(ve(Ce,le.message,be.message),!o))return L(ee[I].message),ee}if(T&&!de&&$a(K)){const{value:le,message:be}=Xm(T);if(Wj(le)&&!K.match(le)&&(ee[I]={type:cu.pattern,message:be,ref:m,...je(cu.pattern,be)},!o))return L(be),ee}if(M){if(Jo(M)){const le=await M(K,s),be=W4(le,X);if(be&&(ee[I]={...be,...je(cu.validate,be.message)},!o))return L(be.message),ee}else if(ms(M)){let le={};for(const be in M){if(!Di(le)&&!o)break;const Ce=W4(await M[be](K,s),X,be);Ce&&(le={...Ce,...je(be,Ce.message)},L(Ce.message),o&&(ee[I]=le))}if(!Di(le)&&(ee[I]={ref:X,...le},!o))return ee}}return L(!0),ee};const Xhe={mode:Zo.onSubmit,reValidateMode:Zo.onChange,shouldFocusError:!0};function Yhe(e={}){let r={...Xhe,...e},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:Jo(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},d=ms(r.defaultValues)||ms(r.values)?Es(r.defaultValues||r.values)||{}:{},p=r.shouldUnregister?{}:Es(d),m={action:!1,mount:!1,watch:!1},g={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,S=0;const j={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let A={...j};const k={array:B4(),state:B4()},T=r.criteriaMode===Zo.all,M=xe=>Ne=>{clearTimeout(S),S=setTimeout(xe,Ne)},I=async xe=>{if(!r.disabled&&(j.isValid||A.isValid||xe)){const Ne=r.resolver?Di((await Q()).errors):await de(o,!0);Ne!==s.isValid&&k.state.next({isValid:Ne})}},q=(xe,Ne)=>{!r.disabled&&(j.isValidating||j.validatingFields||A.isValidating||A.validatingFields)&&((xe||Array.from(g.mount)).forEach(Ge=>{Ge&&(Ne?dr(s.validatingFields,Ge,Ne):ps(s.validatingFields,Ge))}),k.state.next({validatingFields:s.validatingFields,isValidating:!Di(s.validatingFields)}))},G=(xe,Ne=[],Ge,D,z=!0,H=!0)=>{if(D&&Ge&&!r.disabled){if(m.action=!0,H&&Array.isArray(Et(o,xe))){const Z=Ge(Et(o,xe),D.argA,D.argB);z&&dr(o,xe,Z)}if(H&&Array.isArray(Et(s.errors,xe))){const Z=Ge(Et(s.errors,xe),D.argA,D.argB);z&&dr(s.errors,xe,Z),Hhe(s.errors,xe)}if((j.touchedFields||A.touchedFields)&&H&&Array.isArray(Et(s.touchedFields,xe))){const Z=Ge(Et(s.touchedFields,xe),D.argA,D.argB);z&&dr(s.touchedFields,xe,Z)}(j.dirtyFields||A.dirtyFields)&&(s.dirtyFields=Jm(d,p)),k.state.next({name:xe,isDirty:ve(xe,Ne),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else dr(p,xe,Ne)},K=(xe,Ne)=>{dr(s.errors,xe,Ne),k.state.next({errors:s.errors})},X=xe=>{s.errors=xe,k.state.next({errors:s.errors,isValid:!1})},L=(xe,Ne,Ge,D)=>{const z=Et(o,xe);if(z){const H=Et(p,xe,Hr(Ge)?Et(d,xe):Ge);Hr(H)||D&&D.defaultChecked||Ne?dr(p,xe,Ne?H:H4(z._f)):Ce(xe,H),m.mount&&!m.action&&I()}},ee=(xe,Ne,Ge,D,z)=>{let H=!1,Z=!1;const we={name:xe};if(!r.disabled){if(!Ge||D){(j.isDirty||A.isDirty)&&(Z=s.isDirty,s.isDirty=we.isDirty=ve(),H=Z!==we.isDirty);const Re=Wo(Et(d,xe),Ne);Z=!!Et(s.dirtyFields,xe),Re?ps(s.dirtyFields,xe):dr(s.dirtyFields,xe,!0),we.dirtyFields=s.dirtyFields,H=H||(j.dirtyFields||A.dirtyFields)&&Z!==!Re}if(Ge){const Re=Et(s.touchedFields,xe);Re||(dr(s.touchedFields,xe,Ge),we.touchedFields=s.touchedFields,H=H||(j.touchedFields||A.touchedFields)&&Re!==Ge)}H&&z&&k.state.next(we)}return H?we:{}},oe=(xe,Ne,Ge,D)=>{const z=Et(s.errors,xe),H=(j.isValid||A.isValid)&&Ta(Ne)&&s.isValid!==Ne;if(r.delayError&&Ge?(b=M(()=>K(xe,Ge)),b(r.delayError)):(clearTimeout(S),b=null,Ge?dr(s.errors,xe,Ge):ps(s.errors,xe)),(Ge?!Wo(z,Ge):z)||!Di(D)||H){const Z={...D,...H&&Ta(Ne)?{isValid:Ne}:{},errors:s.errors,name:xe};s={...s,...Z},k.state.next(Z)}},Q=async xe=>{q(xe,!0);const Ne=await r.resolver(p,r.context,Fhe(xe||g.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return q(xe),Ne},ne=async xe=>{const{errors:Ne}=await Q(xe);if(xe)for(const Ge of xe){const D=Et(Ne,Ge);D?dr(s.errors,Ge,D):ps(s.errors,Ge)}else s.errors=Ne;return Ne},de=async(xe,Ne,Ge={valid:!0})=>{for(const D in xe){const z=xe[D];if(z){const{_f:H,...Z}=z;if(H){const we=g.array.has(H.name),Re=z._f&&qhe(z._f);Re&&j.validatingFields&&q([H.name],!0);const st=await J4(z,g.disabled,p,T,r.shouldUseNativeValidation&&!Ne,we);if(Re&&j.validatingFields&&q([H.name]),st[H.name]&&(Ge.valid=!1,Ne))break;!Ne&&(Et(st,H.name)?we?Ghe(s.errors,st,H.name):dr(s.errors,H.name,st[H.name]):ps(s.errors,H.name))}!Di(Z)&&await de(Z,Ne,Ge)}}return Ge.valid},je=()=>{for(const xe of g.unMount){const Ne=Et(o,xe);Ne&&(Ne._f.refs?Ne._f.refs.every(Ge=>!hT(Ge)):!hT(Ne._f.ref))&&Le(xe)}g.unMount=new Set},ve=(xe,Ne)=>!r.disabled&&(xe&&Ne&&dr(p,xe,Ne),!Wo(fe(),d)),le=(xe,Ne,Ge)=>d_(xe,g,{...m.mount?p:Hr(Ne)?d:$a(xe)?{[xe]:Ne}:Ne},Ge,Ne),be=xe=>K2(Et(m.mount?p:d,xe,r.shouldUnregister?Et(d,xe,[]):[])),Ce=(xe,Ne,Ge={})=>{const D=Et(o,xe);let z=Ne;if(D){const H=D._f;H&&(!H.disabled&&dr(p,xe,e6(Ne,H)),z=Zj(H.ref)&&ua(Ne)?"":Ne,WF(H.ref)?[...H.ref.options].forEach(Z=>Z.selected=z.includes(Z.value)):H.refs?fw(H.ref)?H.refs.forEach(Z=>{(!Z.defaultChecked||!Z.disabled)&&(Array.isArray(z)?Z.checked=!!z.find(we=>we===Z.value):Z.checked=z===Z.value||!!z)}):H.refs.forEach(Z=>Z.checked=Z.value===z):Y2(H.ref)?H.ref.value="":(H.ref.value=z,H.ref.type||k.state.next({name:xe,values:Es(p)})))}(Ge.shouldDirty||Ge.shouldTouch)&&ee(xe,z,Ge.shouldTouch,Ge.shouldDirty,!0),Ge.shouldValidate&&_e(xe)},Ke=(xe,Ne,Ge)=>{for(const D in Ne){if(!Ne.hasOwnProperty(D))return;const z=Ne[D],H=xe+"."+D,Z=Et(o,H);(g.array.has(xe)||ms(z)||Z&&!Z._f)&&!wp(z)?Ke(H,z,Ge):Ce(H,z,Ge)}},ce=(xe,Ne,Ge={})=>{const D=Et(o,xe),z=g.array.has(xe),H=Es(Ne);dr(p,xe,H),z?(k.array.next({name:xe,values:Es(p)}),(j.isDirty||j.dirtyFields||A.isDirty||A.dirtyFields)&&Ge.shouldDirty&&k.state.next({name:xe,dirtyFields:Jm(d,p),isDirty:ve(xe,H)})):D&&!D._f&&!ua(H)?Ke(xe,H,Ge):Ce(xe,H,Ge),Y4(xe,g)&&k.state.next({...s,name:xe}),k.state.next({name:m.mount?xe:void 0,values:Es(p)})},re=async xe=>{m.mount=!0;const Ne=xe.target;let Ge=Ne.name,D=!0;const z=Et(o,Ge),H=Re=>{D=Number.isNaN(Re)||wp(Re)&&isNaN(Re.getTime())||Wo(Re,Et(p,Ge,Re))},Z=G4(r.mode),we=G4(r.reValidateMode);if(z){let Re,st;const Kt=Ne.type?H4(z._f):HF(xe),Qt=xe.type===Yj.BLUR||xe.type===Yj.FOCUS_OUT,Fn=!Bhe(z._f)&&!r.resolver&&!Et(s.errors,Ge)&&!z._f.deps||Vhe(Qt,Et(s.touchedFields,Ge),s.isSubmitted,we,Z),dn=Y4(Ge,g,Qt);dr(p,Ge,Kt),Qt?(!Ne||!Ne.readOnly)&&(z._f.onBlur&&z._f.onBlur(xe),b&&b(0)):z._f.onChange&&z._f.onChange(xe);const Ht=ee(Ge,Kt,Qt),wi=!Di(Ht)||dn;if(!Qt&&k.state.next({name:Ge,type:xe.type,values:Es(p)}),Fn)return(j.isValid||A.isValid)&&(r.mode==="onBlur"?Qt&&I():Qt||I()),wi&&k.state.next({name:Ge,...dn?{}:Ht});if(!Qt&&dn&&k.state.next({...s}),r.resolver){const{errors:Xr}=await Q([Ge]);if(H(Kt),D){const fa=Z4(s.errors,o,Ge),uo=Z4(Xr,o,fa.name||Ge);Re=uo.error,Ge=uo.name,st=Di(Xr)}}else q([Ge],!0),Re=(await J4(z,g.disabled,p,T,r.shouldUseNativeValidation))[Ge],q([Ge]),H(Kt),D&&(Re?st=!1:(j.isValid||A.isValid)&&(st=await de(o,!0)));D&&(z._f.deps&&(!Array.isArray(z._f.deps)||z._f.deps.length>0)&&_e(z._f.deps),oe(Ge,st,Re,Ht))}},ue=(xe,Ne)=>{if(Et(s.errors,Ne)&&xe.focus)return xe.focus(),1},_e=async(xe,Ne={})=>{let Ge,D;const z=Db(xe);if(r.resolver){const H=await ne(Hr(xe)?xe:z);Ge=Di(H),D=xe?!z.some(Z=>Et(H,Z)):Ge}else xe?(D=(await Promise.all(z.map(async H=>{const Z=Et(o,H);return await de(Z&&Z._f?{[H]:Z}:Z)}))).every(Boolean),!(!D&&!s.isValid)&&I()):D=Ge=await de(o);return k.state.next({...!$a(xe)||(j.isValid||A.isValid)&&Ge!==s.isValid?{}:{name:xe},...r.resolver||!xe?{isValid:Ge}:{},errors:s.errors}),Ne.shouldFocus&&!D&&Pb(o,ue,xe?z:g.mount),D},fe=(xe,Ne)=>{let Ge={...m.mount?p:d};return Ne&&(Ge=ZF(Ne.dirtyFields?s.dirtyFields:s.touchedFields,Ge)),Hr(xe)?Ge:$a(xe)?Et(Ge,xe):xe.map(D=>Et(Ge,D))},He=(xe,Ne)=>({invalid:!!Et((Ne||s).errors,xe),isDirty:!!Et((Ne||s).dirtyFields,xe),error:Et((Ne||s).errors,xe),isValidating:!!Et(s.validatingFields,xe),isTouched:!!Et((Ne||s).touchedFields,xe)}),Oe=xe=>{xe&&Db(xe).forEach(Ne=>ps(s.errors,Ne)),k.state.next({errors:xe?s.errors:{}})},ke=(xe,Ne,Ge)=>{const D=(Et(o,xe,{_f:{}})._f||{}).ref,z=Et(s.errors,xe)||{},{ref:H,message:Z,type:we,...Re}=z;dr(s.errors,xe,{...Re,...Ne,ref:D}),k.state.next({name:xe,errors:s.errors,isValid:!1}),Ge&&Ge.shouldFocus&&D&&D.focus&&D.focus()},Ve=(xe,Ne)=>Jo(xe)?k.state.subscribe({next:Ge=>"values"in Ge&&xe(le(void 0,Ne),Ge)}):le(xe,Ne,!0),ie=xe=>k.state.subscribe({next:Ne=>{Khe(xe.name,Ne.name,xe.exact)&&Uhe(Ne,xe.formState||j,V,xe.reRenderRoot)&&xe.callback({values:{...p},...s,...Ne,defaultValues:d})}}).unsubscribe,De=xe=>(m.mount=!0,A={...A,...xe.formState},ie({...xe,formState:A})),Le=(xe,Ne={})=>{for(const Ge of xe?Db(xe):g.mount)g.mount.delete(Ge),g.array.delete(Ge),Ne.keepValue||(ps(o,Ge),ps(p,Ge)),!Ne.keepError&&ps(s.errors,Ge),!Ne.keepDirty&&ps(s.dirtyFields,Ge),!Ne.keepTouched&&ps(s.touchedFields,Ge),!Ne.keepIsValidating&&ps(s.validatingFields,Ge),!r.shouldUnregister&&!Ne.keepDefaultValue&&ps(d,Ge);k.state.next({values:Es(p)}),k.state.next({...s,...Ne.keepDirty?{isDirty:ve()}:{}}),!Ne.keepIsValid&&I()},tt=({disabled:xe,name:Ne})=>{(Ta(xe)&&m.mount||xe||g.disabled.has(Ne))&&(xe?g.disabled.add(Ne):g.disabled.delete(Ne))},yt=(xe,Ne={})=>{let Ge=Et(o,xe);const D=Ta(Ne.disabled)||Ta(r.disabled);return dr(o,xe,{...Ge||{},_f:{...Ge&&Ge._f?Ge._f:{ref:{name:xe}},name:xe,mount:!0,...Ne}}),g.mount.add(xe),Ge?tt({disabled:Ta(Ne.disabled)?Ne.disabled:r.disabled,name:xe}):L(xe,!0,Ne.value),{...D?{disabled:Ne.disabled||r.disabled}:{},...r.progressive?{required:!!Ne.required,min:lb(Ne.min),max:lb(Ne.max),minLength:lb(Ne.minLength),maxLength:lb(Ne.maxLength),pattern:lb(Ne.pattern)}:{},name:xe,onChange:re,onBlur:re,ref:z=>{if(z){yt(xe,Ne),Ge=Et(o,xe);const H=Hr(z.value)&&z.querySelectorAll&&z.querySelectorAll("input,select,textarea")[0]||z,Z=Mhe(H),we=Ge._f.refs||[];if(Z?we.find(Re=>Re===H):H===Ge._f.ref)return;dr(o,xe,{_f:{...Ge._f,...Z?{refs:[...we.filter(hT),H,...Array.isArray(Et(d,xe))?[{}]:[]],ref:{type:H.type,name:xe}}:{ref:H}}}),L(xe,!1,void 0,H)}else Ge=Et(o,xe,{}),Ge._f&&(Ge._f.mount=!1),(r.shouldUnregister||Ne.shouldUnregister)&&!(GF(g.array,xe)&&m.action)&&g.unMount.add(xe)}}},Ot=()=>r.shouldFocusError&&Pb(o,ue,g.mount),Ft=xe=>{Ta(xe)&&(k.state.next({disabled:xe}),Pb(o,(Ne,Ge)=>{const D=Et(o,Ge);D&&(Ne.disabled=D._f.disabled||xe,Array.isArray(D._f.refs)&&D._f.refs.forEach(z=>{z.disabled=D._f.disabled||xe}))},0,!1))},kt=(xe,Ne)=>async Ge=>{let D;Ge&&(Ge.preventDefault&&Ge.preventDefault(),Ge.persist&&Ge.persist());let z=Es(p);if(k.state.next({isSubmitting:!0}),r.resolver){const{errors:H,values:Z}=await Q();s.errors=H,z=Es(Z)}else await de(o);if(g.disabled.size)for(const H of g.disabled)ps(z,H);if(ps(s.errors,"root"),Di(s.errors)){k.state.next({errors:{}});try{await xe(z,Ge)}catch(H){D=H}}else Ne&&await Ne({...s.errors},Ge),Ot(),setTimeout(Ot);if(k.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Di(s.errors)&&!D,submitCount:s.submitCount+1,errors:s.errors}),D)throw D},Jt=(xe,Ne={})=>{Et(o,xe)&&(Hr(Ne.defaultValue)?ce(xe,Es(Et(d,xe))):(ce(xe,Ne.defaultValue),dr(d,xe,Es(Ne.defaultValue))),Ne.keepTouched||ps(s.touchedFields,xe),Ne.keepDirty||(ps(s.dirtyFields,xe),s.isDirty=Ne.defaultValue?ve(xe,Es(Et(d,xe))):ve()),Ne.keepError||(ps(s.errors,xe),j.isValid&&I()),k.state.next({...s}))},ze=(xe,Ne={})=>{const Ge=xe?Es(xe):d,D=Es(Ge),z=Di(xe),H=z?d:D;if(Ne.keepDefaultValues||(d=Ge),!Ne.keepValues){if(Ne.keepDirtyValues){const Z=new Set([...g.mount,...Object.keys(Jm(d,p))]);for(const we of Array.from(Z))Et(s.dirtyFields,we)?dr(H,we,Et(p,we)):ce(we,Et(H,we))}else{if(U2&&Hr(xe))for(const Z of g.mount){const we=Et(o,Z);if(we&&we._f){const Re=Array.isArray(we._f.refs)?we._f.refs[0]:we._f.ref;if(Zj(Re)){const st=Re.closest("form");if(st){st.reset();break}}}}if(Ne.keepFieldsRef)for(const Z of g.mount)ce(Z,Et(H,Z));else o={}}p=r.shouldUnregister?Ne.keepDefaultValues?Es(d):{}:Es(H),k.array.next({values:{...H}}),k.state.next({values:{...H}})}g={mount:Ne.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},m.mount=!j.isValid||!!Ne.keepIsValid||!!Ne.keepDirtyValues||!r.shouldUnregister&&!Di(H),m.watch=!!r.shouldUnregister,m.action=!1,Ne.keepErrors||(s.errors={}),k.state.next({submitCount:Ne.keepSubmitCount?s.submitCount:0,isDirty:z?!1:Ne.keepDirty?s.isDirty:!!(Ne.keepDefaultValues&&!Wo(xe,d)),isSubmitted:Ne.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:z?{}:Ne.keepDirtyValues?Ne.keepDefaultValues&&p?Jm(d,p):s.dirtyFields:Ne.keepDefaultValues&&xe?Jm(d,xe):Ne.keepDirty?s.dirtyFields:{},touchedFields:Ne.keepTouched?s.touchedFields:{},errors:Ne.keepErrors?s.errors:{},isSubmitSuccessful:Ne.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:d})},zt=(xe,Ne)=>ze(Jo(xe)?xe(p):xe,Ne),Rt=(xe,Ne={})=>{const Ge=Et(o,xe),D=Ge&&Ge._f;if(D){const z=D.refs?D.refs[0]:D.ref;z.focus&&(z.focus(),Ne.shouldSelect&&Jo(z.select)&&z.select())}},V=xe=>{s={...s,...xe}},cn={control:{register:yt,unregister:Le,getFieldState:He,handleSubmit:kt,setError:ke,_subscribe:ie,_runSchema:Q,_focusError:Ot,_getWatch:le,_getDirty:ve,_setValid:I,_setFieldArray:G,_setDisabledField:tt,_setErrors:X,_getFieldArray:be,_reset:ze,_resetDefaultValues:()=>Jo(r.defaultValues)&&r.defaultValues().then(xe=>{zt(xe,r.resetOptions),k.state.next({isLoading:!1})}),_removeUnmounted:je,_disableForm:Ft,_subjects:k,_proxyFormState:j,get _fields(){return o},get _formValues(){return p},get _state(){return m},set _state(xe){m=xe},get _defaultValues(){return d},get _names(){return g},set _names(xe){g=xe},get _formState(){return s},get _options(){return r},set _options(xe){r={...r,...xe}}},subscribe:De,trigger:_e,register:yt,handleSubmit:kt,watch:Ve,setValue:ce,getValues:fe,reset:zt,resetField:Jt,clearErrors:Oe,unregister:Le,setError:ke,setFocus:Rt,getFieldState:He};return{...cn,formControl:cn}}function mr(e={}){const r=Je.useRef(void 0),s=Je.useRef(void 0),[o,d]=Je.useState({isDirty:!1,isValidating:!1,isLoading:Jo(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:Jo(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:o},e.defaultValues&&!Jo(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:m,...g}=Yhe(e);r.current={...g,formState:o}}const p=r.current.control;return p._options=e,G2(()=>{const m=p._subscribe({formState:p._proxyFormState,callback:()=>d({...p._formState}),reRenderRoot:!0});return d(g=>({...g,isReady:!0})),p._formState.isReady=!0,m},[p]),Je.useEffect(()=>p._disableForm(e.disabled),[p,e.disabled]),Je.useEffect(()=>{e.mode&&(p._options.mode=e.mode),e.reValidateMode&&(p._options.reValidateMode=e.reValidateMode)},[p,e.mode,e.reValidateMode]),Je.useEffect(()=>{e.errors&&(p._setErrors(e.errors),p._focusError())},[p,e.errors]),Je.useEffect(()=>{e.shouldUnregister&&p._subjects.state.next({values:p._getWatch()})},[p,e.shouldUnregister]),Je.useEffect(()=>{if(p._proxyFormState.isDirty){const m=p._getDirty();m!==o.isDirty&&p._subjects.state.next({isDirty:m})}},[p,o.isDirty]),Je.useEffect(()=>{var m;e.values&&!Wo(e.values,s.current)?(p._reset(e.values,{keepFieldsRef:!0,...p._options.resetOptions}),!((m=p._options.resetOptions)===null||m===void 0)&&m.keepIsValid||p._setValid(),s.current=e.values,d(g=>({...g}))):p._resetDefaultValues()},[p,e.values]),Je.useEffect(()=>{p._state.mount||(p._setValid(),p._state.mount=!0),p._state.watch&&(p._state.watch=!1,p._subjects.state.next({...p._formState})),p._removeUnmounted()}),r.current.formState=XF(o,p),r.current}const Q4=(e,r,s)=>{if(e&&"reportValidity"in e){const o=Et(s,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},f_=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&"reportValidity"in o.ref?Q4(o.ref,s,e):o&&o.refs&&o.refs.forEach(d=>Q4(d,s,e))}},e3=(e,r)=>{r.shouldUseNativeValidation&&f_(e,r);const s={};for(const o in e){const d=Et(r.fields,o),p=Object.assign(e[o]||{},{ref:d&&d.ref});if(Zhe(r.names||Object.keys(e),o)){const m=Object.assign({},Et(s,o));dr(m,"root",p),dr(s,o,m)}else dr(s,o,p)}return s},Zhe=(e,r)=>{const s=t3(r);return e.some(o=>t3(o).match(`^${s}\\.\\d+`))};function t3(e){return e.replace(/\]|\[/g,"")}function at(e,r,s){function o(g,b){if(g._zod||Object.defineProperty(g,"_zod",{value:{def:b,constr:m,traits:new Set},enumerable:!1}),g._zod.traits.has(e))return;g._zod.traits.add(e),r(g,b);const S=m.prototype,j=Object.keys(S);for(let A=0;A<j.length;A++){const k=j[A];k in g||(g[k]=S[k].bind(g))}}const d=s?.Parent??Object;class p extends d{}Object.defineProperty(p,"name",{value:e});function m(g){var b;const S=s?.Parent?new p:this;o(S,g),(b=S._zod).deferred??(b.deferred=[]);for(const j of S._zod.deferred)j();return S}return Object.defineProperty(m,"init",{value:o}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>s?.Parent&&g instanceof s.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class gg extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class n6 extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const r6={};function Tp(e){return r6}function Whe(e){const r=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,d])=>r.indexOf(+o)===-1).map(([o,d])=>d)}function m_(e,r){return typeof r=="bigint"?r.toString():r}function W2(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function J2(e){return e==null}function Q2(e){const r=e.startsWith("^")?1:0,s=e.endsWith("$")?e.length-1:e.length;return e.slice(r,s)}function Jhe(e,r){const s=(e.toString().split(".")[1]||"").length,o=r.toString();let d=(o.split(".")[1]||"").length;if(d===0&&/\d?e-\d?/.test(o)){const b=o.match(/\d?e-(\d?)/);b?.[1]&&(d=Number.parseInt(b[1]))}const p=s>d?s:d,m=Number.parseInt(e.toFixed(p).replace(".","")),g=Number.parseInt(r.toFixed(p).replace(".",""));return m%g/10**p}const n3=Symbol("evaluating");function Sr(e,r,s){let o;Object.defineProperty(e,r,{get(){if(o!==n3)return o===void 0&&(o=n3,o=s()),o},set(d){Object.defineProperty(e,r,{value:d})},configurable:!0})}function Dp(e,r,s){Object.defineProperty(e,r,{value:s,writable:!0,enumerable:!0,configurable:!0})}function Pp(...e){const r={};for(const s of e){const o=Object.getOwnPropertyDescriptors(s);Object.assign(r,o)}return Object.defineProperties({},r)}function r3(e){return JSON.stringify(e)}function Qhe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const s6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Jj(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const epe=W2(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Hb(e){if(Jj(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const s=r.prototype;return!(Jj(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function i6(e){return Hb(e)?{...e}:Array.isArray(e)?[...e]:e}const tpe=new Set(["string","number","symbol"]);function Eg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zd(e,r,s){const o=new e._zod.constr(r??e._zod.def);return(!r||s?.parent)&&(o._zod.parent=e),o}function Yt(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function npe(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const rpe={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 spe(e,r){const s=e._zod.def,o=Pp(e._zod.def,{get shape(){const d={};for(const p in r){if(!(p in s.shape))throw new Error(`Unrecognized key: "${p}"`);r[p]&&(d[p]=s.shape[p])}return Dp(this,"shape",d),d},checks:[]});return Zd(e,o)}function ipe(e,r){const s=e._zod.def,o=Pp(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const p in r){if(!(p in s.shape))throw new Error(`Unrecognized key: "${p}"`);r[p]&&delete d[p]}return Dp(this,"shape",d),d},checks:[]});return Zd(e,o)}function ape(e,r){if(!Hb(r))throw new Error("Invalid input to extend: expected a plain object");const s=e._zod.def.checks;if(s&&s.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const d=Pp(e._zod.def,{get shape(){const p={...e._zod.def.shape,...r};return Dp(this,"shape",p),p},checks:[]});return Zd(e,d)}function ope(e,r){if(!Hb(r))throw new Error("Invalid input to safeExtend: expected a plain object");const s={...e._zod.def,get shape(){const o={...e._zod.def.shape,...r};return Dp(this,"shape",o),o},checks:e._zod.def.checks};return Zd(e,s)}function lpe(e,r){const s=Pp(e._zod.def,{get shape(){const o={...e._zod.def.shape,...r._zod.def.shape};return Dp(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:[]});return Zd(e,s)}function cpe(e,r,s){const o=Pp(r._zod.def,{get shape(){const d=r._zod.def.shape,p={...d};if(s)for(const m in s){if(!(m in d))throw new Error(`Unrecognized key: "${m}"`);s[m]&&(p[m]=e?new e({type:"optional",innerType:d[m]}):d[m])}else for(const m in d)p[m]=e?new e({type:"optional",innerType:d[m]}):d[m];return Dp(this,"shape",p),p},checks:[]});return Zd(r,o)}function upe(e,r,s){const o=Pp(r._zod.def,{get shape(){const d=r._zod.def.shape,p={...d};if(s)for(const m in s){if(!(m in p))throw new Error(`Unrecognized key: "${m}"`);s[m]&&(p[m]=new e({type:"nonoptional",innerType:d[m]}))}else for(const m in d)p[m]=new e({type:"nonoptional",innerType:d[m]});return Dp(this,"shape",p),p},checks:[]});return Zd(r,o)}function dg(e,r=0){if(e.aborted===!0)return!0;for(let s=r;s<e.issues.length;s++)if(e.issues[s]?.continue!==!0)return!0;return!1}function a6(e,r){return r.map(s=>{var o;return(o=s).path??(o.path=[]),s.path.unshift(e),s})}function aj(e){return typeof e=="string"?e:e?.message}function _p(e,r,s){const o={...e,path:e.path??[]};if(!e.message){const d=aj(e.inst?._zod.def?.error?.(e))??aj(r?.error?.(e))??aj(s.customError?.(e))??aj(s.localeError?.(e))??"Invalid input";o.message=d}return delete o.inst,delete o.continue,r?.reportInput||delete o.input,o}function e$(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gb(...e){const[r,s,o]=e;return typeof r=="string"?{message:r,code:"custom",input:s,inst:o}:{...r}}const o6=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,m_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},t$=at("$ZodError",o6),qC=at("$ZodError",o6,{Parent:Error});function dpe(e,r=s=>s.message){const s={},o=[];for(const d of e.issues)d.path.length>0?(s[d.path[0]]=s[d.path[0]]||[],s[d.path[0]].push(r(d))):o.push(r(d));return{formErrors:o,fieldErrors:s}}function hpe(e,r=s=>s.message){const s={_errors:[]},o=d=>{for(const p of d.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(m=>o({issues:m}));else if(p.code==="invalid_key")o({issues:p.issues});else if(p.code==="invalid_element")o({issues:p.issues});else if(p.path.length===0)s._errors.push(r(p));else{let m=s,g=0;for(;g<p.path.length;){const b=p.path[g];g===p.path.length-1?(m[b]=m[b]||{_errors:[]},m[b]._errors.push(r(p))):m[b]=m[b]||{_errors:[]},m=m[b],g++}}};return o(e),s}const BC=e=>(r,s,o,d)=>{const p=o?Object.assign(o,{async:!1}):{async:!1},m=r._zod.run({value:s,issues:[]},p);if(m instanceof Promise)throw new gg;if(m.issues.length){const g=new(d?.Err??e)(m.issues.map(b=>_p(b,p,Tp())));throw s6(g,d?.callee),g}return m.value},ppe=BC(qC),UC=e=>async(r,s,o,d)=>{const p=o?Object.assign(o,{async:!0}):{async:!0};let m=r._zod.run({value:s,issues:[]},p);if(m instanceof Promise&&(m=await m),m.issues.length){const g=new(d?.Err??e)(m.issues.map(b=>_p(b,p,Tp())));throw s6(g,d?.callee),g}return m.value},fpe=UC(qC),KC=e=>(r,s,o)=>{const d=o?{...o,async:!1}:{async:!1},p=r._zod.run({value:s,issues:[]},d);if(p instanceof Promise)throw new gg;return p.issues.length?{success:!1,error:new(e??t$)(p.issues.map(m=>_p(m,d,Tp())))}:{success:!0,data:p.value}},mpe=KC(qC),VC=e=>async(r,s,o)=>{const d=o?Object.assign(o,{async:!0}):{async:!0};let p=r._zod.run({value:s,issues:[]},d);return p instanceof Promise&&(p=await p),p.issues.length?{success:!1,error:new e(p.issues.map(m=>_p(m,d,Tp())))}:{success:!0,data:p.value}},gpe=VC(qC),ype=e=>(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return BC(e)(r,s,d)},vpe=e=>(r,s,o)=>BC(e)(r,s,o),xpe=e=>async(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return UC(e)(r,s,d)},bpe=e=>async(r,s,o)=>UC(e)(r,s,o),wpe=e=>(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return KC(e)(r,s,d)},Spe=e=>(r,s,o)=>KC(e)(r,s,o),Epe=e=>async(r,s,o)=>{const d=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return VC(e)(r,s,d)},jpe=e=>async(r,s,o)=>VC(e)(r,s,o),Cpe=/^[cC][^\s-]{8,}$/,Ape=/^[0-9a-z]+$/,Ope=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kpe=/^[0-9a-vA-V]{20}$/,Rpe=/^[A-Za-z0-9]{27}$/,Tpe=/^[a-zA-Z0-9_-]{21}$/,_pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$pe=/^([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})$/,s3=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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Npe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dpe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ppe(){return new RegExp(Dpe,"u")}const Mpe=/^(?:(?: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])$/,Ipe=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Lpe=/^((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])$/,zpe=/^(([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])$/,Fpe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,l6=/^[A-Za-z0-9_-]*$/,qpe=/^\+(?:[0-9]){6,14}[0-9]$/,c6="(?:(?:\\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])))",Bpe=new RegExp(`^${c6}$`);function u6(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Upe(e){return new RegExp(`^${u6(e)}$`)}function Kpe(e){const r=u6({precision:e.precision}),s=["Z"];e.local&&s.push(""),e.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${r}(?:${s.join("|")})`;return new RegExp(`^${c6}T(?:${o})$`)}const Vpe=e=>{const r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Hpe=/^-?\d+$/,Gpe=/^-?\d+(?:\.\d+)?/,Xpe=/^[^A-Z]*$/,Ype=/^[^a-z]*$/,pa=at("$ZodCheck",(e,r)=>{var s;e._zod??(e._zod={}),e._zod.def=r,(s=e._zod).onattach??(s.onattach=[])}),d6={number:"number",bigint:"bigint",object:"date"},h6=at("$ZodCheckLessThan",(e,r)=>{pa.init(e,r);const s=d6[typeof r.value];e._zod.onattach.push(o=>{const d=o._zod.bag,p=(r.inclusive?d.maximum:d.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<p&&(r.inclusive?d.maximum=r.value:d.exclusiveMaximum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:s,code:"too_big",maximum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),p6=at("$ZodCheckGreaterThan",(e,r)=>{pa.init(e,r);const s=d6[typeof r.value];e._zod.onattach.push(o=>{const d=o._zod.bag,p=(r.inclusive?d.minimum:d.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>p&&(r.inclusive?d.minimum=r.value:d.exclusiveMinimum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:s,code:"too_small",minimum:r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Zpe=at("$ZodCheckMultipleOf",(e,r)=>{pa.init(e,r),e._zod.onattach.push(s=>{var o;(o=s._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=s=>{if(typeof s.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?s.value%r.value===BigInt(0):Jhe(s.value,r.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:r.value,input:s.value,inst:e,continue:!r.abort})}}),Wpe=at("$ZodCheckNumberFormat",(e,r)=>{pa.init(e,r),r.format=r.format||"float64";const s=r.format?.includes("int"),o=s?"int":"number",[d,p]=rpe[r.format];e._zod.onattach.push(m=>{const g=m._zod.bag;g.format=r.format,g.minimum=d,g.maximum=p,s&&(g.pattern=Hpe)}),e._zod.check=m=>{const g=m.value;if(s){if(!Number.isInteger(g)){m.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?m.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort}):m.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!r.abort});return}}g<d&&m.issues.push({origin:"number",input:g,code:"too_small",minimum:d,inclusive:!0,inst:e,continue:!r.abort}),g>p&&m.issues.push({origin:"number",input:g,code:"too_big",maximum:p,inst:e})}}),Jpe=at("$ZodCheckMaxLength",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<d&&(o._zod.bag.maximum=r.maximum)}),e._zod.check=o=>{const d=o.value;if(d.length<=r.maximum)return;const m=e$(d);o.issues.push({origin:m,code:"too_big",maximum:r.maximum,inclusive:!0,input:d,inst:e,continue:!r.abort})}}),Qpe=at("$ZodCheckMinLength",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>d&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{const d=o.value;if(d.length>=r.minimum)return;const m=e$(d);o.issues.push({origin:m,code:"too_small",minimum:r.minimum,inclusive:!0,input:d,inst:e,continue:!r.abort})}}),efe=at("$ZodCheckLengthEquals",(e,r)=>{var s;pa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const d=o.value;return!J2(d)&&d.length!==void 0}),e._zod.onattach.push(o=>{const d=o._zod.bag;d.minimum=r.length,d.maximum=r.length,d.length=r.length}),e._zod.check=o=>{const d=o.value,p=d.length;if(p===r.length)return;const m=e$(d),g=p>r.length;o.issues.push({origin:m,...g?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),HC=at("$ZodCheckStringFormat",(e,r)=>{var s,o;pa.init(e,r),e._zod.onattach.push(d=>{const p=d._zod.bag;p.format=r.format,r.pattern&&(p.patterns??(p.patterns=new Set),p.patterns.add(r.pattern))}),r.pattern?(s=e._zod).check??(s.check=d=>{r.pattern.lastIndex=0,!r.pattern.test(d.value)&&d.issues.push({origin:"string",code:"invalid_format",format:r.format,input:d.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(o=e._zod).check??(o.check=()=>{})}),tfe=at("$ZodCheckRegex",(e,r)=>{HC.init(e,r),e._zod.check=s=>{r.pattern.lastIndex=0,!r.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),nfe=at("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=Xpe),HC.init(e,r)}),rfe=at("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=Ype),HC.init(e,r)}),sfe=at("$ZodCheckIncludes",(e,r)=>{pa.init(e,r);const s=Eg(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${s}`:s);r.pattern=o,e._zod.onattach.push(d=>{const p=d._zod.bag;p.patterns??(p.patterns=new Set),p.patterns.add(o)}),e._zod.check=d=>{d.value.includes(r.includes,r.position)||d.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:d.value,inst:e,continue:!r.abort})}}),ife=at("$ZodCheckStartsWith",(e,r)=>{pa.init(e,r);const s=new RegExp(`^${Eg(r.prefix)}.*`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(s)}),e._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),afe=at("$ZodCheckEndsWith",(e,r)=>{pa.init(e,r);const s=new RegExp(`.*${Eg(r.suffix)}$`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const d=o._zod.bag;d.patterns??(d.patterns=new Set),d.patterns.add(s)}),e._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}}),ofe=at("$ZodCheckOverwrite",(e,r)=>{pa.init(e,r),e._zod.check=s=>{s.value=r.tx(s.value)}});class lfe{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const o=r.split(`
|
||
`).filter(m=>m),d=Math.min(...o.map(m=>m.length-m.trimStart().length)),p=o.map(m=>m.slice(d)).map(m=>" ".repeat(this.indent*2)+m);for(const m of p)this.content.push(m)}compile(){const r=Function,s=this?.args,d=[...(this?.content??[""]).map(p=>` ${p}`)];return new r(...s,d.join(`
|
||
`))}}const cfe={major:4,minor:1,patch:13},Gr=at("$ZodType",(e,r)=>{var s;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=cfe;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const d of o)for(const p of d._zod.onattach)p(e);if(o.length===0)(s=e._zod).deferred??(s.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const d=(m,g,b)=>{let S=dg(m),j;for(const A of g){if(A._zod.def.when){if(!A._zod.def.when(m))continue}else if(S)continue;const k=m.issues.length,T=A._zod.check(m);if(T instanceof Promise&&b?.async===!1)throw new gg;if(j||T instanceof Promise)j=(j??Promise.resolve()).then(async()=>{await T,m.issues.length!==k&&(S||(S=dg(m,k)))});else{if(m.issues.length===k)continue;S||(S=dg(m,k))}}return j?j.then(()=>m):m},p=(m,g,b)=>{if(dg(m))return m.aborted=!0,m;const S=d(g,o,b);if(S instanceof Promise){if(b.async===!1)throw new gg;return S.then(j=>e._zod.parse(j,b))}return e._zod.parse(S,b)};e._zod.run=(m,g)=>{if(g.skipChecks)return e._zod.parse(m,g);if(g.direction==="backward"){const S=e._zod.parse({value:m.value,issues:[]},{...g,skipChecks:!0});return S instanceof Promise?S.then(j=>p(j,m,g)):p(S,m,g)}const b=e._zod.parse(m,g);if(b instanceof Promise){if(g.async===!1)throw new gg;return b.then(S=>d(S,o,g))}return d(b,o,g)}}e["~standard"]={validate:d=>{try{const p=mpe(e,d);return p.success?{value:p.data}:{issues:p.error?.issues}}catch{return gpe(e,d).then(m=>m.success?{value:m.data}:{issues:m.error?.issues})}},vendor:"zod",version:1}}),n$=at("$ZodString",(e,r)=>{Gr.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vpe(e._zod.bag),e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),$r=at("$ZodStringFormat",(e,r)=>{HC.init(e,r),n$.init(e,r)}),ufe=at("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=$pe),$r.init(e,r)}),dfe=at("$ZodUUID",(e,r)=>{if(r.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=s3(o))}else r.pattern??(r.pattern=s3());$r.init(e,r)}),hfe=at("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Npe),$r.init(e,r)}),pfe=at("$ZodURL",(e,r)=>{$r.init(e,r),e._zod.check=s=>{try{const o=s.value.trim(),d=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(d.hostname)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:s.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(d.protocol.endsWith(":")?d.protocol.slice(0,-1):d.protocol)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:s.value,inst:e,continue:!r.abort})),r.normalize?s.value=d.href:s.value=o;return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:e,continue:!r.abort})}}}),ffe=at("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Ppe()),$r.init(e,r)}),mfe=at("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=Tpe),$r.init(e,r)}),gfe=at("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Cpe),$r.init(e,r)}),yfe=at("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Ape),$r.init(e,r)}),vfe=at("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Ope),$r.init(e,r)}),xfe=at("$ZodXID",(e,r)=>{r.pattern??(r.pattern=kpe),$r.init(e,r)}),bfe=at("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Rpe),$r.init(e,r)}),wfe=at("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=Kpe(r)),$r.init(e,r)}),Sfe=at("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Bpe),$r.init(e,r)}),Efe=at("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=Upe(r)),$r.init(e,r)}),jfe=at("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=_pe),$r.init(e,r)}),Cfe=at("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=Mpe),$r.init(e,r),e._zod.bag.format="ipv4"}),Afe=at("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Ipe),$r.init(e,r),e._zod.bag.format="ipv6",e._zod.check=s=>{try{new URL(`http://[${s.value}]`)}catch{s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:e,continue:!r.abort})}}}),Ofe=at("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=Lpe),$r.init(e,r)}),kfe=at("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=zpe),$r.init(e,r),e._zod.check=s=>{const o=s.value.split("/");try{if(o.length!==2)throw new Error;const[d,p]=o;if(!p)throw new Error;const m=Number(p);if(`${m}`!==p)throw new Error;if(m<0||m>128)throw new Error;new URL(`http://[${d}]`)}catch{s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:e,continue:!r.abort})}}});function f6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Rfe=at("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Fpe),$r.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=s=>{f6(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:e,continue:!r.abort})}});function Tfe(e){if(!l6.test(e))return!1;const r=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),s=r.padEnd(Math.ceil(r.length/4)*4,"=");return f6(s)}const _fe=at("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=l6),$r.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=s=>{Tfe(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:e,continue:!r.abort})}}),$fe=at("$ZodE164",(e,r)=>{r.pattern??(r.pattern=qpe),$r.init(e,r)});function Nfe(e,r=null){try{const s=e.split(".");if(s.length!==3)return!1;const[o]=s;if(!o)return!1;const d=JSON.parse(atob(o));return!("typ"in d&&d?.typ!=="JWT"||!d.alg||r&&(!("alg"in d)||d.alg!==r))}catch{return!1}}const Dfe=at("$ZodJWT",(e,r)=>{$r.init(e,r),e._zod.check=s=>{Nfe(s.value,r.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:e,continue:!r.abort})}}),m6=at("$ZodNumber",(e,r)=>{Gr.init(e,r),e._zod.pattern=e._zod.bag.pattern??Gpe,e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=Number(s.value)}catch{}const d=s.value;if(typeof d=="number"&&!Number.isNaN(d)&&Number.isFinite(d))return s;const p=typeof d=="number"?Number.isNaN(d)?"NaN":Number.isFinite(d)?void 0:"Infinity":void 0;return s.issues.push({expected:"number",code:"invalid_type",input:d,inst:e,...p?{received:p}:{}}),s}}),Pfe=at("$ZodNumberFormat",(e,r)=>{Wpe.init(e,r),m6.init(e,r)}),Mfe=at("$ZodAny",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),Ife=at("$ZodUnknown",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),Lfe=at("$ZodNever",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:e}),s)});function i3(e,r,s){e.issues.length&&r.issues.push(...a6(s,e.issues)),r.value[s]=e.value}const zfe=at("$ZodArray",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const d=s.value;if(!Array.isArray(d))return s.issues.push({expected:"array",code:"invalid_type",input:d,inst:e}),s;s.value=Array(d.length);const p=[];for(let m=0;m<d.length;m++){const g=d[m],b=r.element._zod.run({value:g,issues:[]},o);b instanceof Promise?p.push(b.then(S=>i3(S,s,m))):i3(b,s,m)}return p.length?Promise.all(p).then(()=>s):s}});function Qj(e,r,s,o){e.issues.length&&r.issues.push(...a6(s,e.issues)),e.value===void 0?s in o&&(r.value[s]=void 0):r.value[s]=e.value}function g6(e){const r=Object.keys(e.shape);for(const o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const s=npe(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function y6(e,r,s,o,d,p){const m=[],g=d.keySet,b=d.catchall._zod,S=b.def.type;for(const j in r){if(g.has(j))continue;if(S==="never"){m.push(j);continue}const A=b.run({value:r[j],issues:[]},o);A instanceof Promise?e.push(A.then(k=>Qj(k,s,j,r))):Qj(A,s,j,r)}return m.length&&s.issues.push({code:"unrecognized_keys",keys:m,input:r,inst:p}),e.length?Promise.all(e).then(()=>s):s}const Ffe=at("$ZodObject",(e,r)=>{if(Gr.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){const g=r.shape;Object.defineProperty(r,"shape",{get:()=>{const b={...g};return Object.defineProperty(r,"shape",{value:b}),b}})}const o=W2(()=>g6(r));Sr(e._zod,"propValues",()=>{const g=r.shape,b={};for(const S in g){const j=g[S]._zod;if(j.values){b[S]??(b[S]=new Set);for(const A of j.values)b[S].add(A)}}return b});const d=Jj,p=r.catchall;let m;e._zod.parse=(g,b)=>{m??(m=o.value);const S=g.value;if(!d(S))return g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g;g.value={};const j=[],A=m.shape;for(const k of m.keys){const M=A[k]._zod.run({value:S[k],issues:[]},b);M instanceof Promise?j.push(M.then(I=>Qj(I,g,k,S))):Qj(M,g,k,S)}return p?y6(j,S,g,b,o.value,e):j.length?Promise.all(j).then(()=>g):g}}),qfe=at("$ZodObjectJIT",(e,r)=>{Ffe.init(e,r);const s=e._zod.parse,o=W2(()=>g6(r)),d=k=>{const T=new lfe(["shape","payload","ctx"]),M=o.value,I=X=>{const L=r3(X);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};T.write("const input = payload.value;");const q=Object.create(null);let G=0;for(const X of M.keys)q[X]=`key_${G++}`;T.write("const newResult = {};");for(const X of M.keys){const L=q[X],ee=r3(X);T.write(`const ${L} = ${I(X)};`),T.write(`
|
||
if (${L}.issues.length) {
|
||
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
||
...iss,
|
||
path: iss.path ? [${ee}, ...iss.path] : [${ee}]
|
||
})));
|
||
}
|
||
|
||
|
||
if (${L}.value === undefined) {
|
||
if (${ee} in input) {
|
||
newResult[${ee}] = undefined;
|
||
}
|
||
} else {
|
||
newResult[${ee}] = ${L}.value;
|
||
}
|
||
|
||
`)}T.write("payload.value = newResult;"),T.write("return payload;");const K=T.compile();return(X,L)=>K(k,X,L)};let p;const m=Jj,g=!r6.jitless,S=g&&epe.value,j=r.catchall;let A;e._zod.parse=(k,T)=>{A??(A=o.value);const M=k.value;return m(M)?g&&S&&T?.async===!1&&T.jitless!==!0?(p||(p=d(r.shape)),k=p(k,T),j?y6([],M,k,T,A,e):k):s(k,T):(k.issues.push({expected:"object",code:"invalid_type",input:M,inst:e}),k)}});function a3(e,r,s,o){for(const p of e)if(p.issues.length===0)return r.value=p.value,r;const d=e.filter(p=>!dg(p));return d.length===1?(r.value=d[0].value,d[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:s,errors:e.map(p=>p.issues.map(m=>_p(m,o,Tp())))}),r)}const Bfe=at("$ZodUnion",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.options.some(d=>d._zod.optin==="optional")?"optional":void 0),Sr(e._zod,"optout",()=>r.options.some(d=>d._zod.optout==="optional")?"optional":void 0),Sr(e._zod,"values",()=>{if(r.options.every(d=>d._zod.values))return new Set(r.options.flatMap(d=>Array.from(d._zod.values)))}),Sr(e._zod,"pattern",()=>{if(r.options.every(d=>d._zod.pattern)){const d=r.options.map(p=>p._zod.pattern);return new RegExp(`^(${d.map(p=>Q2(p.source)).join("|")})$`)}});const s=r.options.length===1,o=r.options[0]._zod.run;e._zod.parse=(d,p)=>{if(s)return o(d,p);let m=!1;const g=[];for(const b of r.options){const S=b._zod.run({value:d.value,issues:[]},p);if(S instanceof Promise)g.push(S),m=!0;else{if(S.issues.length===0)return S;g.push(S)}}return m?Promise.all(g).then(b=>a3(b,d,e,p)):a3(g,d,e,p)}}),Ufe=at("$ZodIntersection",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const d=s.value,p=r.left._zod.run({value:d,issues:[]},o),m=r.right._zod.run({value:d,issues:[]},o);return p instanceof Promise||m instanceof Promise?Promise.all([p,m]).then(([b,S])=>o3(s,b,S)):o3(s,p,m)}});function g_(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(Hb(e)&&Hb(r)){const s=Object.keys(r),o=Object.keys(e).filter(p=>s.indexOf(p)!==-1),d={...e,...r};for(const p of o){const m=g_(e[p],r[p]);if(!m.valid)return{valid:!1,mergeErrorPath:[p,...m.mergeErrorPath]};d[p]=m.data}return{valid:!0,data:d}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let o=0;o<e.length;o++){const d=e[o],p=r[o],m=g_(d,p);if(!m.valid)return{valid:!1,mergeErrorPath:[o,...m.mergeErrorPath]};s.push(m.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function o3(e,r,s){if(r.issues.length&&e.issues.push(...r.issues),s.issues.length&&e.issues.push(...s.issues),dg(e))return e;const o=g_(r.value,s.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Kfe=at("$ZodEnum",(e,r)=>{Gr.init(e,r);const s=Whe(r.entries),o=new Set(s);e._zod.values=o,e._zod.pattern=new RegExp(`^(${s.filter(d=>tpe.has(typeof d)).map(d=>typeof d=="string"?Eg(d):d.toString()).join("|")})$`),e._zod.parse=(d,p)=>{const m=d.value;return o.has(m)||d.issues.push({code:"invalid_value",values:s,input:m,inst:e}),d}}),Vfe=at("$ZodLiteral",(e,r)=>{if(Gr.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const s=new Set(r.values);e._zod.values=s,e._zod.pattern=new RegExp(`^(${r.values.map(o=>typeof o=="string"?Eg(o):o?Eg(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,d)=>{const p=o.value;return s.has(p)||o.issues.push({code:"invalid_value",values:r.values,input:p,inst:e}),o}}),Hfe=at("$ZodTransform",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new n6(e.constructor.name);const d=r.transform(s.value,s);if(o.async)return(d instanceof Promise?d:Promise.resolve(d)).then(m=>(s.value=m,s));if(d instanceof Promise)throw new gg;return s.value=d,s}});function l3(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const Gfe=at("$ZodOptional",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Sr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Sr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${Q2(s.source)})?$`):void 0}),e._zod.parse=(s,o)=>{if(r.innerType._zod.optin==="optional"){const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>l3(p,s.value)):l3(d,s.value)}return s.value===void 0?s:r.innerType._zod.run(s,o)}}),Xfe=at("$ZodNullable",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.innerType._zod.optin),Sr(e._zod,"optout",()=>r.innerType._zod.optout),Sr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${Q2(s.source)}|null)$`):void 0}),Sr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(s,o)=>s.value===null?s:r.innerType._zod.run(s,o)}),Yfe=at("$ZodDefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);if(s.value===void 0)return s.value=r.defaultValue,s;const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>c3(p,r)):c3(d,r)}});function c3(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const Zfe=at("$ZodPrefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>(o.direction==="backward"||s.value===void 0&&(s.value=r.defaultValue),r.innerType._zod.run(s,o))}),Wfe=at("$ZodNonOptional",(e,r)=>{Gr.init(e,r),Sr(e._zod,"values",()=>{const s=r.innerType._zod.values;return s?new Set([...s].filter(o=>o!==void 0)):void 0}),e._zod.parse=(s,o)=>{const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>u3(p,e)):u3(d,e)}});function u3(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const Jfe=at("$ZodCatch",(e,r)=>{Gr.init(e,r),Sr(e._zod,"optin",()=>r.innerType._zod.optin),Sr(e._zod,"optout",()=>r.innerType._zod.optout),Sr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(p=>(s.value=p.value,p.issues.length&&(s.value=r.catchValue({...s,error:{issues:p.issues.map(m=>_p(m,o,Tp()))},input:s.value}),s.issues=[]),s)):(s.value=d.value,d.issues.length&&(s.value=r.catchValue({...s,error:{issues:d.issues.map(p=>_p(p,o,Tp()))},input:s.value}),s.issues=[]),s)}}),Qfe=at("$ZodPipe",(e,r)=>{Gr.init(e,r),Sr(e._zod,"values",()=>r.in._zod.values),Sr(e._zod,"optin",()=>r.in._zod.optin),Sr(e._zod,"optout",()=>r.out._zod.optout),Sr(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(s,o)=>{if(o.direction==="backward"){const p=r.out._zod.run(s,o);return p instanceof Promise?p.then(m=>oj(m,r.in,o)):oj(p,r.in,o)}const d=r.in._zod.run(s,o);return d instanceof Promise?d.then(p=>oj(p,r.out,o)):oj(d,r.out,o)}});function oj(e,r,s){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},s)}const eme=at("$ZodReadonly",(e,r)=>{Gr.init(e,r),Sr(e._zod,"propValues",()=>r.innerType._zod.propValues),Sr(e._zod,"values",()=>r.innerType._zod.values),Sr(e._zod,"optin",()=>r.innerType?._zod?.optin),Sr(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const d=r.innerType._zod.run(s,o);return d instanceof Promise?d.then(d3):d3(d)}});function d3(e){return e.value=Object.freeze(e.value),e}const tme=at("$ZodCustom",(e,r)=>{pa.init(e,r),Gr.init(e,r),e._zod.parse=(s,o)=>s,e._zod.check=s=>{const o=s.value,d=r.fn(o);if(d instanceof Promise)return d.then(p=>h3(p,s,o,e));h3(d,s,o,e)}});function h3(e,r,s,o){if(!e){const d={code:"custom",input:s,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(d.params=o._zod.def.params),r.issues.push(Gb(d))}}var p3;class nme{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...s){const o=s[0];if(this._map.set(r,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,r)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const s=this._map.get(r);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(r),this}get(r){const s=r._zod.parent;if(s){const o={...this.get(s)??{}};delete o.id;const d={...o,...this._map.get(r)};return Object.keys(d).length?d:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function rme(){return new nme}(p3=globalThis).__zod_globalRegistry??(p3.__zod_globalRegistry=rme());const lj=globalThis.__zod_globalRegistry;function sme(e,r){return new e({type:"string",...Yt(r)})}function ime(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Yt(r)})}function f3(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Yt(r)})}function v6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Yt(r)})}function ame(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Yt(r)})}function ome(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Yt(r)})}function lme(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Yt(r)})}function cme(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Yt(r)})}function ume(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Yt(r)})}function dme(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Yt(r)})}function hme(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Yt(r)})}function pme(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Yt(r)})}function fme(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Yt(r)})}function mme(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Yt(r)})}function gme(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Yt(r)})}function yme(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Yt(r)})}function vme(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Yt(r)})}function xme(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Yt(r)})}function bme(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Yt(r)})}function wme(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Yt(r)})}function Sme(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Yt(r)})}function Eme(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Yt(r)})}function jme(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Yt(r)})}function Cme(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Yt(r)})}function Ame(e,r){return new e({type:"string",format:"date",check:"string_format",...Yt(r)})}function Ome(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...Yt(r)})}function kme(e,r){return new e({type:"string",format:"duration",check:"string_format",...Yt(r)})}function Rme(e,r){return new e({type:"number",checks:[],...Yt(r)})}function Tme(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Yt(r)})}function _me(e){return new e({type:"any"})}function $me(e){return new e({type:"unknown"})}function Nme(e,r){return new e({type:"never",...Yt(r)})}function m3(e,r){return new h6({check:"less_than",...Yt(r),value:e,inclusive:!1})}function pT(e,r){return new h6({check:"less_than",...Yt(r),value:e,inclusive:!0})}function g3(e,r){return new p6({check:"greater_than",...Yt(r),value:e,inclusive:!1})}function fT(e,r){return new p6({check:"greater_than",...Yt(r),value:e,inclusive:!0})}function y3(e,r){return new Zpe({check:"multiple_of",...Yt(r),value:e})}function x6(e,r){return new Jpe({check:"max_length",...Yt(r),maximum:e})}function eC(e,r){return new Qpe({check:"min_length",...Yt(r),minimum:e})}function b6(e,r){return new efe({check:"length_equals",...Yt(r),length:e})}function Dme(e,r){return new tfe({check:"string_format",format:"regex",...Yt(r),pattern:e})}function Pme(e){return new nfe({check:"string_format",format:"lowercase",...Yt(e)})}function Mme(e){return new rfe({check:"string_format",format:"uppercase",...Yt(e)})}function Ime(e,r){return new sfe({check:"string_format",format:"includes",...Yt(r),includes:e})}function Lme(e,r){return new ife({check:"string_format",format:"starts_with",...Yt(r),prefix:e})}function zme(e,r){return new afe({check:"string_format",format:"ends_with",...Yt(r),suffix:e})}function Mg(e){return new ofe({check:"overwrite",tx:e})}function Fme(e){return Mg(r=>r.normalize(e))}function qme(){return Mg(e=>e.trim())}function Bme(){return Mg(e=>e.toLowerCase())}function Ume(){return Mg(e=>e.toUpperCase())}function Kme(){return Mg(e=>Qhe(e))}function Vme(e,r,s){return new e({type:"array",element:r,...Yt(s)})}function Hme(e,r,s){return new e({type:"custom",check:"custom",fn:r,...Yt(s)})}function Gme(e){const r=Xme(s=>(s.addIssue=o=>{if(typeof o=="string")s.issues.push(Gb(o,s.value,r._zod.def));else{const d=o;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=s.value),d.inst??(d.inst=r),d.continue??(d.continue=!r._zod.def.abort),s.issues.push(Gb(d))}},e(s.value,s)));return r}function Xme(e,r){const s=new pa({check:"custom",...Yt(r)});return s._zod.check=e,s}function v3(e,r){try{var s=e()}catch(o){return r(o)}return s&&s.then?s.then(void 0,r):s}function Yme(e,r){for(var s={};e.length;){var o=e[0],d=o.code,p=o.message,m=o.path.join(".");if(!s[m])if("unionErrors"in o){var g=o.unionErrors[0].errors[0];s[m]={message:g.message,type:g.code}}else s[m]={message:p,type:d};if("unionErrors"in o&&o.unionErrors.forEach(function(j){return j.errors.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,S=b&&b[o.code];s[m]=X2(m,r,s,d,S?[].concat(S,o.message):o.message)}e.shift()}return s}function Zme(e,r){for(var s={};e.length;){var o=e[0],d=o.code,p=o.message,m=o.path.join(".");if(!s[m])if(o.code==="invalid_union"&&o.errors.length>0){var g=o.errors[0][0];s[m]={message:g.message,type:g.code}}else s[m]={message:p,type:d};if(o.code==="invalid_union"&&o.errors.forEach(function(j){return j.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,S=b&&b[o.code];s[m]=X2(m,r,s,d,S?[].concat(S,o.message):o.message)}e.shift()}return s}function gr(e,r,s){if(s===void 0&&(s={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,d,p){try{return Promise.resolve(v3(function(){return Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](o,r)).then(function(m){return p.shouldUseNativeValidation&&f_({},p),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return Array.isArray(g?.issues)})(m))return{values:{},errors:e3(Yme(m.errors,!p.shouldUseNativeValidation&&p.criteriaMode==="all"),p)};throw m}))}catch(m){return Promise.reject(m)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,d,p){try{return Promise.resolve(v3(function(){return Promise.resolve((s.mode==="sync"?ppe:fpe)(e,o,r)).then(function(m){return p.shouldUseNativeValidation&&f_({},p),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return g instanceof t$})(m))return{values:{},errors:e3(Zme(m.issues,!p.shouldUseNativeValidation&&p.criteriaMode==="all"),p)};throw m}))}catch(m){return Promise.reject(m)}};throw new Error("Invalid input: not a Zod schema")}const Wme=at("ZodISODateTime",(e,r)=>{wfe.init(e,r),zr.init(e,r)});function Jme(e){return Cme(Wme,e)}const Qme=at("ZodISODate",(e,r)=>{Sfe.init(e,r),zr.init(e,r)});function ege(e){return Ame(Qme,e)}const tge=at("ZodISOTime",(e,r)=>{Efe.init(e,r),zr.init(e,r)});function nge(e){return Ome(tge,e)}const rge=at("ZodISODuration",(e,r)=>{jfe.init(e,r),zr.init(e,r)});function sge(e){return kme(rge,e)}const ige=(e,r)=>{t$.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:s=>hpe(e,s)},flatten:{value:s=>dpe(e,s)},addIssue:{value:s=>{e.issues.push(s),e.message=JSON.stringify(e.issues,m_,2)}},addIssues:{value:s=>{e.issues.push(...s),e.message=JSON.stringify(e.issues,m_,2)}},isEmpty:{get(){return e.issues.length===0}}})},co=at("ZodError",ige,{Parent:Error}),age=BC(co),oge=UC(co),lge=KC(co),cge=VC(co),uge=ype(co),dge=vpe(co),hge=xpe(co),pge=bpe(co),fge=wpe(co),mge=Spe(co),gge=Epe(co),yge=jpe(co),rs=at("ZodType",(e,r)=>(Gr.init(e,r),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...s)=>e.clone(Pp(r,{checks:[...r.checks??[],...s.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(s,o)=>Zd(e,s,o),e.brand=()=>e,e.register=((s,o)=>(s.add(e,o),e)),e.parse=(s,o)=>age(e,s,o,{callee:e.parse}),e.safeParse=(s,o)=>lge(e,s,o),e.parseAsync=async(s,o)=>oge(e,s,o,{callee:e.parseAsync}),e.safeParseAsync=async(s,o)=>cge(e,s,o),e.spa=e.safeParseAsync,e.encode=(s,o)=>uge(e,s,o),e.decode=(s,o)=>dge(e,s,o),e.encodeAsync=async(s,o)=>hge(e,s,o),e.decodeAsync=async(s,o)=>pge(e,s,o),e.safeEncode=(s,o)=>fge(e,s,o),e.safeDecode=(s,o)=>mge(e,s,o),e.safeEncodeAsync=async(s,o)=>gge(e,s,o),e.safeDecodeAsync=async(s,o)=>yge(e,s,o),e.refine=(s,o)=>e.check(lye(s,o)),e.superRefine=s=>e.check(cye(s)),e.overwrite=s=>e.check(Mg(s)),e.optional=()=>E3(e),e.nullable=()=>j3(e),e.nullish=()=>E3(j3(e)),e.nonoptional=s=>tye(e,s),e.array=()=>Bge(e),e.or=s=>j6([e,s]),e.and=s=>Hge(e,s),e.transform=s=>C3(e,Yge(s)),e.default=s=>Jge(e,s),e.prefault=s=>eye(e,s),e.catch=s=>rye(e,s),e.pipe=s=>C3(e,s),e.readonly=()=>aye(e),e.describe=s=>{const o=e.clone();return lj.add(o,{description:s}),o},Object.defineProperty(e,"description",{get(){return lj.get(e)?.description},configurable:!0}),e.meta=(...s)=>{if(s.length===0)return lj.get(e);const o=e.clone();return lj.add(o,s[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),w6=at("_ZodString",(e,r)=>{n$.init(e,r),rs.init(e,r);const s=e._zod.bag;e.format=s.format??null,e.minLength=s.minimum??null,e.maxLength=s.maximum??null,e.regex=(...o)=>e.check(Dme(...o)),e.includes=(...o)=>e.check(Ime(...o)),e.startsWith=(...o)=>e.check(Lme(...o)),e.endsWith=(...o)=>e.check(zme(...o)),e.min=(...o)=>e.check(eC(...o)),e.max=(...o)=>e.check(x6(...o)),e.length=(...o)=>e.check(b6(...o)),e.nonempty=(...o)=>e.check(eC(1,...o)),e.lowercase=o=>e.check(Pme(o)),e.uppercase=o=>e.check(Mme(o)),e.trim=()=>e.check(qme()),e.normalize=(...o)=>e.check(Fme(...o)),e.toLowerCase=()=>e.check(Bme()),e.toUpperCase=()=>e.check(Ume()),e.slugify=()=>e.check(Kme())}),vge=at("ZodString",(e,r)=>{n$.init(e,r),w6.init(e,r),e.email=s=>e.check(ime(xge,s)),e.url=s=>e.check(cme(bge,s)),e.jwt=s=>e.check(jme(Pge,s)),e.emoji=s=>e.check(ume(wge,s)),e.guid=s=>e.check(f3(x3,s)),e.uuid=s=>e.check(v6(Eb,s)),e.uuidv4=s=>e.check(ame(Eb,s)),e.uuidv6=s=>e.check(ome(Eb,s)),e.uuidv7=s=>e.check(lme(Eb,s)),e.nanoid=s=>e.check(dme(Sge,s)),e.guid=s=>e.check(f3(x3,s)),e.cuid=s=>e.check(hme(Ege,s)),e.cuid2=s=>e.check(pme(jge,s)),e.ulid=s=>e.check(fme(Cge,s)),e.base64=s=>e.check(wme($ge,s)),e.base64url=s=>e.check(Sme(Nge,s)),e.xid=s=>e.check(mme(Age,s)),e.ksuid=s=>e.check(gme(Oge,s)),e.ipv4=s=>e.check(yme(kge,s)),e.ipv6=s=>e.check(vme(Rge,s)),e.cidrv4=s=>e.check(xme(Tge,s)),e.cidrv6=s=>e.check(bme(_ge,s)),e.e164=s=>e.check(Eme(Dge,s)),e.datetime=s=>e.check(Jme(s)),e.date=s=>e.check(ege(s)),e.time=s=>e.check(nge(s)),e.duration=s=>e.check(sge(s))});function Nn(e){return sme(vge,e)}const zr=at("ZodStringFormat",(e,r)=>{$r.init(e,r),w6.init(e,r)}),xge=at("ZodEmail",(e,r)=>{hfe.init(e,r),zr.init(e,r)}),x3=at("ZodGUID",(e,r)=>{ufe.init(e,r),zr.init(e,r)}),Eb=at("ZodUUID",(e,r)=>{dfe.init(e,r),zr.init(e,r)});function S6(e){return v6(Eb,e)}const bge=at("ZodURL",(e,r)=>{pfe.init(e,r),zr.init(e,r)}),wge=at("ZodEmoji",(e,r)=>{ffe.init(e,r),zr.init(e,r)}),Sge=at("ZodNanoID",(e,r)=>{mfe.init(e,r),zr.init(e,r)}),Ege=at("ZodCUID",(e,r)=>{gfe.init(e,r),zr.init(e,r)}),jge=at("ZodCUID2",(e,r)=>{yfe.init(e,r),zr.init(e,r)}),Cge=at("ZodULID",(e,r)=>{vfe.init(e,r),zr.init(e,r)}),Age=at("ZodXID",(e,r)=>{xfe.init(e,r),zr.init(e,r)}),Oge=at("ZodKSUID",(e,r)=>{bfe.init(e,r),zr.init(e,r)}),kge=at("ZodIPv4",(e,r)=>{Cfe.init(e,r),zr.init(e,r)}),Rge=at("ZodIPv6",(e,r)=>{Afe.init(e,r),zr.init(e,r)}),Tge=at("ZodCIDRv4",(e,r)=>{Ofe.init(e,r),zr.init(e,r)}),_ge=at("ZodCIDRv6",(e,r)=>{kfe.init(e,r),zr.init(e,r)}),$ge=at("ZodBase64",(e,r)=>{Rfe.init(e,r),zr.init(e,r)}),Nge=at("ZodBase64URL",(e,r)=>{_fe.init(e,r),zr.init(e,r)}),Dge=at("ZodE164",(e,r)=>{$fe.init(e,r),zr.init(e,r)}),Pge=at("ZodJWT",(e,r)=>{Dfe.init(e,r),zr.init(e,r)}),E6=at("ZodNumber",(e,r)=>{m6.init(e,r),rs.init(e,r),e.gt=(o,d)=>e.check(g3(o,d)),e.gte=(o,d)=>e.check(fT(o,d)),e.min=(o,d)=>e.check(fT(o,d)),e.lt=(o,d)=>e.check(m3(o,d)),e.lte=(o,d)=>e.check(pT(o,d)),e.max=(o,d)=>e.check(pT(o,d)),e.int=o=>e.check(b3(o)),e.safe=o=>e.check(b3(o)),e.positive=o=>e.check(g3(0,o)),e.nonnegative=o=>e.check(fT(0,o)),e.negative=o=>e.check(m3(0,o)),e.nonpositive=o=>e.check(pT(0,o)),e.multipleOf=(o,d)=>e.check(y3(o,d)),e.step=(o,d)=>e.check(y3(o,d)),e.finite=()=>e;const s=e._zod.bag;e.minValue=Math.max(s.minimum??Number.NEGATIVE_INFINITY,s.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(s.maximum??Number.POSITIVE_INFINITY,s.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(s.format??"").includes("int")||Number.isSafeInteger(s.multipleOf??.5),e.isFinite=!0,e.format=s.format??null});function Xb(e){return Rme(E6,e)}const Mge=at("ZodNumberFormat",(e,r)=>{Pfe.init(e,r),E6.init(e,r)});function b3(e){return Tme(Mge,e)}const Ige=at("ZodAny",(e,r)=>{Mfe.init(e,r),rs.init(e,r)});function w3(){return _me(Ige)}const Lge=at("ZodUnknown",(e,r)=>{Ife.init(e,r),rs.init(e,r)});function S3(){return $me(Lge)}const zge=at("ZodNever",(e,r)=>{Lfe.init(e,r),rs.init(e,r)});function Fge(e){return Nme(zge,e)}const qge=at("ZodArray",(e,r)=>{zfe.init(e,r),rs.init(e,r),e.element=r.element,e.min=(s,o)=>e.check(eC(s,o)),e.nonempty=s=>e.check(eC(1,s)),e.max=(s,o)=>e.check(x6(s,o)),e.length=(s,o)=>e.check(b6(s,o)),e.unwrap=()=>e.element});function Bge(e,r){return Vme(qge,e,r)}const Uge=at("ZodObject",(e,r)=>{qfe.init(e,r),rs.init(e,r),Sr(e,"shape",()=>r.shape),e.keyof=()=>Da(Object.keys(e._zod.def.shape)),e.catchall=s=>e.clone({...e._zod.def,catchall:s}),e.passthrough=()=>e.clone({...e._zod.def,catchall:S3()}),e.loose=()=>e.clone({...e._zod.def,catchall:S3()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fge()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=s=>ape(e,s),e.safeExtend=s=>ope(e,s),e.merge=s=>lpe(e,s),e.pick=s=>spe(e,s),e.omit=s=>ipe(e,s),e.partial=(...s)=>cpe(C6,e,s[0]),e.required=(...s)=>upe(A6,e,s[0])});function Xs(e,r){const s={type:"object",shape:e??{},...Yt(r)};return new Uge(s)}const Kge=at("ZodUnion",(e,r)=>{Bfe.init(e,r),rs.init(e,r),e.options=r.options});function j6(e,r){return new Kge({type:"union",options:e,...Yt(r)})}const Vge=at("ZodIntersection",(e,r)=>{Ufe.init(e,r),rs.init(e,r)});function Hge(e,r){return new Vge({type:"intersection",left:e,right:r})}const y_=at("ZodEnum",(e,r)=>{Kfe.init(e,r),rs.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);const s=new Set(Object.keys(r.entries));e.extract=(o,d)=>{const p={};for(const m of o)if(s.has(m))p[m]=r.entries[m];else throw new Error(`Key ${m} not found in enum`);return new y_({...r,checks:[],...Yt(d),entries:p})},e.exclude=(o,d)=>{const p={...r.entries};for(const m of o)if(s.has(m))delete p[m];else throw new Error(`Key ${m} not found in enum`);return new y_({...r,checks:[],...Yt(d),entries:p})}});function Da(e,r){const s=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new y_({type:"enum",entries:s,...Yt(r)})}const Gge=at("ZodLiteral",(e,r)=>{Vfe.init(e,r),rs.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Yb(e,r){return new Gge({type:"literal",values:Array.isArray(e)?e:[e],...Yt(r)})}const Xge=at("ZodTransform",(e,r)=>{Hfe.init(e,r),rs.init(e,r),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new n6(e.constructor.name);s.addIssue=p=>{if(typeof p=="string")s.issues.push(Gb(p,s.value,r));else{const m=p;m.fatal&&(m.continue=!1),m.code??(m.code="custom"),m.input??(m.input=s.value),m.inst??(m.inst=e),s.issues.push(Gb(m))}};const d=r.transform(s.value,s);return d instanceof Promise?d.then(p=>(s.value=p,s)):(s.value=d,s)}});function Yge(e){return new Xge({type:"transform",transform:e})}const C6=at("ZodOptional",(e,r)=>{Gfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType});function E3(e){return new C6({type:"optional",innerType:e})}const Zge=at("ZodNullable",(e,r)=>{Xfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType});function j3(e){return new Zge({type:"nullable",innerType:e})}const Wge=at("ZodDefault",(e,r)=>{Yfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jge(e,r){return new Wge({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():i6(r)}})}const Qge=at("ZodPrefault",(e,r)=>{Zfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType});function eye(e,r){return new Qge({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():i6(r)}})}const A6=at("ZodNonOptional",(e,r)=>{Wfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType});function tye(e,r){return new A6({type:"nonoptional",innerType:e,...Yt(r)})}const nye=at("ZodCatch",(e,r)=>{Jfe.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rye(e,r){return new nye({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const sye=at("ZodPipe",(e,r)=>{Qfe.init(e,r),rs.init(e,r),e.in=r.in,e.out=r.out});function C3(e,r){return new sye({type:"pipe",in:e,out:r})}const iye=at("ZodReadonly",(e,r)=>{eme.init(e,r),rs.init(e,r),e.unwrap=()=>e._zod.def.innerType});function aye(e){return new iye({type:"readonly",innerType:e})}const oye=at("ZodCustom",(e,r)=>{tme.init(e,r),rs.init(e,r)});function lye(e,r={}){return Hme(oye,e,r)}function cye(e){return Gme(e)}const Dd={custom:"custom"};var uye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dye=uye.reduce((e,r)=>{const s=Qb(`Primitive.${r}`),o=R.forwardRef((d,p)=>{const{asChild:m,...g}=d,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(b,{...g,ref:p})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),hye="Label",O6=R.forwardRef((e,r)=>u.jsx(dye.label,{...e,ref:r,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));O6.displayName=hye;var pye=O6;function xi({className:e,...r}){return u.jsx(pye,{"data-slot":"label",className:ft("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}const yr=Dhe,k6=R.createContext({}),pt=({...e})=>u.jsx(k6.Provider,{value:{name:e.name},children:u.jsx(Go,{...e})}),r$=()=>{const e=R.useContext(k6),r=R.useContext(R6),{getFieldState:s}=FC(),o=YF({name:e.name}),d=s(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:p}=r;return{id:p,name:e.name,formItemId:`${p}-form-item`,formDescriptionId:`${p}-form-item-description`,formMessageId:`${p}-form-item-message`,...d}},R6=R.createContext({});function ot({className:e,...r}){const s=R.useId();return u.jsx(R6.Provider,{value:{id:s},children:u.jsx("div",{"data-slot":"form-item",className:ft("grid gap-2",e),...r})})}function lt({className:e,...r}){const{error:s,formItemId:o}=r$();return u.jsx(xi,{"data-slot":"form-label","data-error":!!s,className:ft("data-[error=true]:text-destructive",e),htmlFor:o,...r})}function wt({...e}){const{error:r,formItemId:s,formDescriptionId:o,formMessageId:d}=r$();return u.jsx(Cg,{"data-slot":"form-control",id:s,"aria-describedby":r?`${o} ${d}`:`${o}`,"aria-invalid":!!r,...e})}function dt({className:e,...r}){const{error:s,formMessageId:o}=r$(),d=s?String(s?.message??""):r.children;return d?u.jsx("p",{"data-slot":"form-message",id:o,className:ft("text-destructive text-sm",e),...r,children:d}):null}function Fi({className:e,...r}){return u.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:u.jsx("table",{"data-slot":"table",className:ft("w-full caption-bottom text-sm",e),...r})})}function qi({className:e,...r}){return u.jsx("thead",{"data-slot":"table-header",className:ft("[&_tr]:border-b",e),...r})}function Bi({className:e,...r}){return u.jsx("tbody",{"data-slot":"table-body",className:ft("[&_tr:last-child]:border-0",e),...r})}function an({className:e,...r}){return u.jsx("tr",{"data-slot":"table-row",className:ft("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...r})}function At({className:e,...r}){return u.jsx("th",{"data-slot":"table-head",className:ft("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function xt({className:e,...r}){return u.jsx("td",{"data-slot":"table-cell",className:ft("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function fye({className:e,...r}){return u.jsx("caption",{"data-slot":"table-caption",className:ft("text-muted-foreground mt-4 text-sm",e),...r})}const T6=Xs({key:Nn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Nn().trim().optional()}),mye=T6.partial();function gye({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return u.jsxs(ns,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(mC,{className:"mr-1 h-3 w-3"}),r]})}const yye=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),j=Hs(),A=rr({queryKey:["annotations"],queryFn:()=>Sb.listAnnotations()}),k=mr({resolver:gr(T6),defaultValues:{key:"",value:""}}),T=nn({mutationFn:L=>Sb.createAnnotation(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["annotations"]}),k.reset(),o(!1),Ze.success("Annotation Created Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while creating Annotation")}}),M=L=>{T.mutate(L)},I=mr({resolver:gr(mye),defaultValues:{}}),q=nn({mutationFn:({id:L,values:ee})=>Sb.updateAnnotation(L,ee),onSuccess:async()=>{await j.invalidateQueries({queryKey:["annotations"]}),I.reset(),p(!1),Ze.success("Annotation Updated Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while updating Annotation")}}),G=L=>{S(L.id),I.reset({key:L.key,value:L.value}),p(!0)},K=nn({mutationFn:L=>Sb.deleteAnnotation(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["annotations"]}),g(null),Ze.success("Annotation Deleted Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while deleting Annotation")}}),X=R.useMemo(()=>{const L=A.data??[],ee=e.trim().toLowerCase();return ee?L.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)):L},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading annotations…"}):A.error?u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading annotations.",u.jsx("pre",{children:JSON.stringify(A,null,2)})]}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Annotations"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:L=>r(L.target.value),placeholder:"Search annotations",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Annotation"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Label"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(pt,{control:k.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"environment",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dev",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Key"}),u.jsx(At,{children:"Value"}),u.jsx(At,{children:"Annotation"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(L=>u.jsxs(an,{children:[u.jsx(xt,{children:L.key}),u.jsx(xt,{children:L.value}),u.jsx(xt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(gye,{t:L}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(L.id,6)})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(L),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(L.id),disabled:K.isPending&&m===L.id,children:K.isPending&&m===L.id?"Deleting…":"Delete"})]})})]},L.id)),X.length===0&&u.jsx(an,{children:u.jsxs(xt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[u.jsx(Jb,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Annotation"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(L=>{b&&q.mutate({id:b,values:L})}),children:[u.jsx(pt,{control:I.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dedicated",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"gpu",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:L=>!L&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete annotation"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this annotation?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})},ws=lte(),Ss={listClusters:e=>ut(async()=>await ws.listClusters(e?{q:e}:{})),getCluster:e=>ut(async()=>await ws.getCluster({clusterID:e})),createCluster:e=>ut(async()=>await ws.createCluster({dtoCreateClusterRequest:e})),updateCluster:(e,r)=>ut(async()=>await ws.updateCluster({clusterID:e,dtoUpdateClusterRequest:r})),deleteCluster:e=>ut(async()=>await ws.deleteCluster({clusterID:e})),setKubeconfig:(e,r)=>ut(async()=>await ws.setClusterKubeconfig({clusterID:e,dtoSetKubeconfigRequest:r})),clearKubeconfig:e=>ut(async()=>await ws.clearClusterKubeconfig({clusterID:e})),attachCaptainDomain:(e,r)=>ut(async()=>await ws.attachCaptainDomain({clusterID:e,dtoAttachCaptainDomainRequest:r})),detachCaptainDomain:e=>ut(async()=>await ws.detachCaptainDomain({clusterID:e})),attachControlPlaneRecordSet:(e,r)=>ut(async()=>await ws.attachControlPlaneRecordSet({clusterID:e,dtoAttachRecordSetRequest:r})),detachControlPlaneRecordSet:e=>ut(async()=>await ws.detachControlPlaneRecordSet({clusterID:e})),attachAppsLoadBalancer:(e,r)=>ut(async()=>await ws.attachAppsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachAppsLoadBalancer:e=>ut(async()=>await ws.detachAppsLoadBalancer({clusterID:e})),attachGlueOpsLoadBalancer:(e,r)=>ut(async()=>await ws.attachGlueOpsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachGlueOpsLoadBalancer:e=>ut(async()=>await ws.detachGlueOpsLoadBalancer({clusterID:e})),attachBastion:(e,r)=>ut(async()=>await ws.attachBastionServer({clusterID:e,dtoAttachBastionRequest:r})),detachBastion:e=>ut(async()=>await ws.detachBastionServer({clusterID:e})),attachNodePool:(e,r)=>ut(async()=>await ws.attachNodePool({clusterID:e,dtoAttachNodePoolRequest:{node_pool_id:r}})),detachNodePool:(e,r)=>ut(async()=>await ws.detachNodePool({clusterID:e,nodePoolID:r}))},uu=ate(),tc={listDomains:()=>ut(async()=>await uu.listDomains()),getDomain:e=>ut(async()=>await uu.getDomain({id:e})),createDomain:async e=>ut(async()=>await uu.createDomain({dtoCreateDomainRequest:e})),updateDomain:async(e,r)=>ut(async()=>await uu.updateDomain({id:e,dtoUpdateDomainRequest:r})),deleteDomain:async e=>ut(async()=>await uu.deleteDomain({id:e})),listRecordSetsByDomain:async e=>ut(async()=>await uu.listRecordSets({domainId:e})),createRecordSetsByDomain:async(e,r)=>ut(async()=>await uu.createRecordSet({domainId:e,dtoCreateRecordSetRequest:r})),updateRecordSetsByDomain:async(e,r)=>ut(async()=>await uu.updateRecordSet({id:e,dtoUpdateRecordSetRequest:r})),deleteRecordSetsByDomain:async e=>ut(async()=>await uu.deleteRecordSet({id:e}))},cb=ote(),jb={listLoadBalancers:()=>ut(async()=>await cb.listLoadBalancers()),getLoadBalancer:e=>ut(async()=>await cb.getLoadBalancers({id:e})),createLoadBalancer:e=>ut(async()=>await cb.createLoadBalancer({dtoCreateLoadBalancerRequest:e})),updateLoadBalancer:(e,r)=>ut(async()=>await cb.updateLoadBalancer({id:e,dtoUpdateLoadBalancerRequest:r})),deleteLoadBalancer:e=>ut(async()=>await cb.deleteLoadBalancer({id:e}))},Bs=ste(),vye=(e,r)=>e?e===r:!0,ka={listNodePools:()=>ut(async()=>await Bs.listNodePools({})),createNodePool:e=>ut(async()=>await Bs.createNodePool({dtoCreateNodePoolRequest:e})),getNodePool:e=>ut(async()=>await Bs.getNodePool({id:e})),deleteNodePool:e=>ut(async()=>{await Bs.deleteNodePool({id:e})}),updateNodePool:(e,r)=>ut(async()=>await Bs.updateNodePool({id:e,dtoUpdateNodePoolRequest:r})),listNodePoolServers:e=>ut(async()=>await Bs.listNodePoolServers({id:e})),attachNodePoolServer:(e,r)=>ut(async()=>await Bs.attachNodePoolServers({id:e,dtoAttachServersRequest:r})),detachNodePoolServers:(e,r)=>ut(async()=>await Bs.detachNodePoolServer({id:e,serverId:r})),listNodePoolTaints:e=>ut(async()=>await Bs.listNodePoolTaints({id:e})),attachNodePoolTaints:(e,r)=>ut(async()=>await Bs.attachNodePoolTaints({id:e,dtoAttachTaintsRequest:r})),detachNodePoolTaints:(e,r)=>ut(async()=>await Bs.detachNodePoolTaint({id:e,taintId:r})),listNodePoolLabels:e=>ut(async()=>await Bs.listNodePoolLabels({id:e})),attachNodePoolLabels:(e,r)=>ut(async()=>await Bs.attachNodePoolLabels({id:e,dtoAttachLabelsRequest:r})),detachNodePoolLabels:(e,r)=>ut(async()=>await Bs.detachNodePoolLabel({id:e,labelId:r})),listNodePoolAnnotations:e=>ut(async()=>await Bs.listNodePoolAnnotations({id:e})),attachNodePoolAnnotations:(e,r)=>ut(async()=>await Bs.attachNodePoolAnnotations({id:e,dtoAttachAnnotationsRequest:r})),detachNodePoolAnnotations:(e,r)=>ut(async()=>await Bs.detachNodePoolAnnotation({id:e,annotationId:r}))},ub=Qee(),hg={listServers:()=>ut(async()=>await ub.listServers()),createServer:e=>ut(async()=>await ub.createServer({dtoCreateServerRequest:e})),getServer:e=>ut(async()=>await ub.getServer({id:e})),updateServer:(e,r)=>ut(async()=>await ub.updateServer({id:e,dtoUpdateServerRequest:r})),deleteServer:e=>ut(async()=>{await ub.deleteServer({id:e})})};function A3(e,[r,s]){return Math.min(s,Math.max(r,e))}function O3(e){const r=xye(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(wye);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function xye(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Eye(d),g=Sye(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var bye=Symbol("radix.slottable");function wye(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bye}function Sye(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Eye(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function s$(e){const r=e+"CollectionProvider",[s,o]=al(r),[d,p]=s(r,{collectionRef:{current:null},itemMap:new Map}),m=I=>{const{scope:q,children:G}=I,K=Je.useRef(null),X=Je.useRef(new Map).current;return u.jsx(d,{scope:q,itemMap:X,collectionRef:K,children:G})};m.displayName=r;const g=e+"CollectionSlot",b=O3(g),S=Je.forwardRef((I,q)=>{const{scope:G,children:K}=I,X=p(g,G),L=zn(q,X.collectionRef);return u.jsx(b,{ref:L,children:K})});S.displayName=g;const j=e+"CollectionItemSlot",A="data-radix-collection-item",k=O3(j),T=Je.forwardRef((I,q)=>{const{scope:G,children:K,...X}=I,L=Je.useRef(null),ee=zn(q,L),oe=p(j,G);return Je.useEffect(()=>(oe.itemMap.set(L,{ref:L,...X}),()=>void oe.itemMap.delete(L))),u.jsx(k,{[A]:"",ref:ee,children:K})});T.displayName=j;function M(I){const q=p(e+"CollectionConsumer",I);return Je.useCallback(()=>{const K=q.collectionRef.current;if(!K)return[];const X=Array.from(K.querySelectorAll(`[${A}]`));return Array.from(q.itemMap.values()).sort((oe,Q)=>X.indexOf(oe.ref.current)-X.indexOf(Q.ref.current))},[q.collectionRef,q.itemMap])}return[{Provider:m,Slot:S,ItemSlot:T},M,o]}var jye=R.createContext(void 0);function i$(e){const r=R.useContext(jye);return e||r||"ltr"}function Cye(e){const r=Aye(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(kye);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Aye(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=Tye(d),g=Rye(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Oye=Symbol("radix.slottable");function kye(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Oye}function Rye(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function Tye(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function _6(e){const r=R.useRef({value:e,previous:e});return R.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var _ye=[" ","Enter","ArrowUp","ArrowDown"],$ye=[" ","Enter"],$p="Select",[GC,XC,Nye]=s$($p),[Ig]=al($p,[Nye,Hd]),YC=Hd(),[Dye,Wd]=Ig($p),[Pye,Mye]=Ig($p),$6=e=>{const{__scopeSelect:r,children:s,open:o,defaultOpen:d,onOpenChange:p,value:m,defaultValue:g,onValueChange:b,dir:S,name:j,autoComplete:A,disabled:k,required:T,form:M}=e,I=YC(r),[q,G]=R.useState(null),[K,X]=R.useState(null),[L,ee]=R.useState(!1),oe=i$(S),[Q,ne]=qd({prop:o,defaultProp:d??!1,onChange:p,caller:$p}),[de,je]=qd({prop:m,defaultProp:g,onChange:b,caller:$p}),ve=R.useRef(null),le=q?M||!!q.closest("form"):!0,[be,Ce]=R.useState(new Set),Ke=Array.from(be).map(ce=>ce.props.value).join(";");return u.jsx(wC,{...I,children:u.jsxs(Dye,{required:T,scope:r,trigger:q,onTriggerChange:G,valueNode:K,onValueNodeChange:X,valueNodeHasChildren:L,onValueNodeHasChildrenChange:ee,contentId:Vs(),value:de,onValueChange:je,open:Q,onOpenChange:ne,dir:oe,triggerPointerDownPosRef:ve,disabled:k,children:[u.jsx(GC.Provider,{scope:r,children:u.jsx(Pye,{scope:e.__scopeSelect,onNativeOptionAdd:R.useCallback(ce=>{Ce(re=>new Set(re).add(ce))},[]),onNativeOptionRemove:R.useCallback(ce=>{Ce(re=>{const ue=new Set(re);return ue.delete(ce),ue})},[]),children:s})}),le?u.jsxs(eq,{"aria-hidden":!0,required:T,tabIndex:-1,name:j,autoComplete:A,value:de,onChange:ce=>je(ce.target.value),disabled:k,form:M,children:[de===void 0?u.jsx("option",{value:""}):null,Array.from(be)]},Ke):null]})})};$6.displayName=$p;var N6="SelectTrigger",D6=R.forwardRef((e,r)=>{const{__scopeSelect:s,disabled:o=!1,...d}=e,p=YC(s),m=Wd(N6,s),g=m.disabled||o,b=zn(r,m.onTriggerChange),S=XC(s),j=R.useRef("touch"),[A,k,T]=nq(I=>{const q=S().filter(X=>!X.disabled),G=q.find(X=>X.value===m.value),K=rq(q,I,G);K!==void 0&&m.onValueChange(K.value)}),M=I=>{g||(m.onOpenChange(!0),T()),I&&(m.triggerPointerDownPosRef.current={x:Math.round(I.pageX),y:Math.round(I.pageY)})};return u.jsx(tw,{asChild:!0,...p,children:u.jsx(Cn.button,{type:"button",role:"combobox","aria-controls":m.contentId,"aria-expanded":m.open,"aria-required":m.required,"aria-autocomplete":"none",dir:m.dir,"data-state":m.open?"open":"closed",disabled:g,"data-disabled":g?"":void 0,"data-placeholder":tq(m.value)?"":void 0,...d,ref:b,onClick:$t(d.onClick,I=>{I.currentTarget.focus(),j.current!=="mouse"&&M(I)}),onPointerDown:$t(d.onPointerDown,I=>{j.current=I.pointerType;const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),I.button===0&&I.ctrlKey===!1&&I.pointerType==="mouse"&&(M(I),I.preventDefault())}),onKeyDown:$t(d.onKeyDown,I=>{const q=A.current!=="";!(I.ctrlKey||I.altKey||I.metaKey)&&I.key.length===1&&k(I.key),!(q&&I.key===" ")&&_ye.includes(I.key)&&(M(),I.preventDefault())})})})});D6.displayName=N6;var P6="SelectValue",M6=R.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:d,children:p,placeholder:m="",...g}=e,b=Wd(P6,s),{onValueNodeHasChildrenChange:S}=b,j=p!==void 0,A=zn(r,b.onValueNodeChange);return As(()=>{S(j)},[S,j]),u.jsx(Cn.span,{...g,ref:A,style:{pointerEvents:"none"},children:tq(b.value)?u.jsx(u.Fragment,{children:m}):p})});M6.displayName=P6;var Iye="SelectIcon",I6=R.forwardRef((e,r)=>{const{__scopeSelect:s,children:o,...d}=e;return u.jsx(Cn.span,{"aria-hidden":!0,...d,ref:r,children:o||"▼"})});I6.displayName=Iye;var Lye="SelectPortal",L6=e=>u.jsx(_g,{asChild:!0,...e});L6.displayName=Lye;var Np="SelectContent",z6=R.forwardRef((e,r)=>{const s=Wd(Np,e.__scopeSelect),[o,d]=R.useState();if(As(()=>{d(new DocumentFragment)},[]),!s.open){const p=o;return p?fC.createPortal(u.jsx(F6,{scope:e.__scopeSelect,children:u.jsx(GC.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),p):null}return u.jsx(q6,{...e,ref:r})});z6.displayName=Np;var Yo=10,[F6,Jd]=Ig(Np),zye="SelectContentImpl",Fye=Cye("SelectContent.RemoveScroll"),q6=R.forwardRef((e,r)=>{const{__scopeSelect:s,position:o="item-aligned",onCloseAutoFocus:d,onEscapeKeyDown:p,onPointerDownOutside:m,side:g,sideOffset:b,align:S,alignOffset:j,arrowPadding:A,collisionBoundary:k,collisionPadding:T,sticky:M,hideWhenDetached:I,avoidCollisions:q,...G}=e,K=Wd(Np,s),[X,L]=R.useState(null),[ee,oe]=R.useState(null),Q=zn(r,Le=>L(Le)),[ne,de]=R.useState(null),[je,ve]=R.useState(null),le=XC(s),[be,Ce]=R.useState(!1),Ke=R.useRef(!1);R.useEffect(()=>{if(X)return kC(X)},[X]),AC();const ce=R.useCallback(Le=>{const[tt,...yt]=le().map(kt=>kt.ref.current),[Ot]=yt.slice(-1),Ft=document.activeElement;for(const kt of Le)if(kt===Ft||(kt?.scrollIntoView({block:"nearest"}),kt===tt&&ee&&(ee.scrollTop=0),kt===Ot&&ee&&(ee.scrollTop=ee.scrollHeight),kt?.focus(),document.activeElement!==Ft))return},[le,ee]),re=R.useCallback(()=>ce([ne,X]),[ce,ne,X]);R.useEffect(()=>{be&&re()},[be,re]);const{onOpenChange:ue,triggerPointerDownPosRef:_e}=K;R.useEffect(()=>{if(X){let Le={x:0,y:0};const tt=Ot=>{Le={x:Math.abs(Math.round(Ot.pageX)-(_e.current?.x??0)),y:Math.abs(Math.round(Ot.pageY)-(_e.current?.y??0))}},yt=Ot=>{Le.x<=10&&Le.y<=10?Ot.preventDefault():X.contains(Ot.target)||ue(!1),document.removeEventListener("pointermove",tt),_e.current=null};return _e.current!==null&&(document.addEventListener("pointermove",tt),document.addEventListener("pointerup",yt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",tt),document.removeEventListener("pointerup",yt,{capture:!0})}}},[X,ue,_e]),R.useEffect(()=>{const Le=()=>ue(!1);return window.addEventListener("blur",Le),window.addEventListener("resize",Le),()=>{window.removeEventListener("blur",Le),window.removeEventListener("resize",Le)}},[ue]);const[fe,He]=nq(Le=>{const tt=le().filter(Ft=>!Ft.disabled),yt=tt.find(Ft=>Ft.ref.current===document.activeElement),Ot=rq(tt,Le,yt);Ot&&setTimeout(()=>Ot.ref.current.focus())}),Oe=R.useCallback((Le,tt,yt)=>{const Ot=!Ke.current&&!yt;(K.value!==void 0&&K.value===tt||Ot)&&(de(Le),Ot&&(Ke.current=!0))},[K.value]),ke=R.useCallback(()=>X?.focus(),[X]),Ve=R.useCallback((Le,tt,yt)=>{const Ot=!Ke.current&&!yt;(K.value!==void 0&&K.value===tt||Ot)&&ve(Le)},[K.value]),ie=o==="popper"?v_:B6,De=ie===v_?{side:g,sideOffset:b,align:S,alignOffset:j,arrowPadding:A,collisionBoundary:k,collisionPadding:T,sticky:M,hideWhenDetached:I,avoidCollisions:q}:{};return u.jsx(F6,{scope:s,content:X,viewport:ee,onViewportChange:oe,itemRefCallback:Oe,selectedItem:ne,onItemLeave:ke,itemTextRefCallback:Ve,focusSelectedItem:re,selectedItemText:je,position:o,isPositioned:be,searchRef:fe,children:u.jsx(aw,{as:Fye,allowPinchZoom:!0,children:u.jsx(iw,{asChild:!0,trapped:K.open,onMountAutoFocus:Le=>{Le.preventDefault()},onUnmountAutoFocus:$t(d,Le=>{K.trigger?.focus({preventScroll:!0}),Le.preventDefault()}),children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:Le=>Le.preventDefault(),onDismiss:()=>K.onOpenChange(!1),children:u.jsx(ie,{role:"listbox",id:K.contentId,"data-state":K.open?"open":"closed",dir:K.dir,onContextMenu:Le=>Le.preventDefault(),...G,...De,onPlaced:()=>Ce(!0),ref:Q,style:{display:"flex",flexDirection:"column",outline:"none",...G.style},onKeyDown:$t(G.onKeyDown,Le=>{const tt=Le.ctrlKey||Le.altKey||Le.metaKey;if(Le.key==="Tab"&&Le.preventDefault(),!tt&&Le.key.length===1&&He(Le.key),["ArrowUp","ArrowDown","Home","End"].includes(Le.key)){let Ot=le().filter(Ft=>!Ft.disabled).map(Ft=>Ft.ref.current);if(["ArrowUp","End"].includes(Le.key)&&(Ot=Ot.slice().reverse()),["ArrowUp","ArrowDown"].includes(Le.key)){const Ft=Le.target,kt=Ot.indexOf(Ft);Ot=Ot.slice(kt+1)}setTimeout(()=>ce(Ot)),Le.preventDefault()}})})})})})})});q6.displayName=zye;var qye="SelectItemAlignedPosition",B6=R.forwardRef((e,r)=>{const{__scopeSelect:s,onPlaced:o,...d}=e,p=Wd(Np,s),m=Jd(Np,s),[g,b]=R.useState(null),[S,j]=R.useState(null),A=zn(r,Q=>j(Q)),k=XC(s),T=R.useRef(!1),M=R.useRef(!0),{viewport:I,selectedItem:q,selectedItemText:G,focusSelectedItem:K}=m,X=R.useCallback(()=>{if(p.trigger&&p.valueNode&&g&&S&&I&&q&&G){const Q=p.trigger.getBoundingClientRect(),ne=S.getBoundingClientRect(),de=p.valueNode.getBoundingClientRect(),je=G.getBoundingClientRect();if(p.dir!=="rtl"){const Ft=je.left-ne.left,kt=de.left-Ft,Jt=Q.left-kt,ze=Q.width+Jt,zt=Math.max(ze,ne.width),Rt=window.innerWidth-Yo,V=A3(kt,[Yo,Math.max(Yo,Rt-zt)]);g.style.minWidth=ze+"px",g.style.left=V+"px"}else{const Ft=ne.right-je.right,kt=window.innerWidth-de.right-Ft,Jt=window.innerWidth-Q.right-kt,ze=Q.width+Jt,zt=Math.max(ze,ne.width),Rt=window.innerWidth-Yo,V=A3(kt,[Yo,Math.max(Yo,Rt-zt)]);g.style.minWidth=ze+"px",g.style.right=V+"px"}const ve=k(),le=window.innerHeight-Yo*2,be=I.scrollHeight,Ce=window.getComputedStyle(S),Ke=parseInt(Ce.borderTopWidth,10),ce=parseInt(Ce.paddingTop,10),re=parseInt(Ce.borderBottomWidth,10),ue=parseInt(Ce.paddingBottom,10),_e=Ke+ce+be+ue+re,fe=Math.min(q.offsetHeight*5,_e),He=window.getComputedStyle(I),Oe=parseInt(He.paddingTop,10),ke=parseInt(He.paddingBottom,10),Ve=Q.top+Q.height/2-Yo,ie=le-Ve,De=q.offsetHeight/2,Le=q.offsetTop+De,tt=Ke+ce+Le,yt=_e-tt;if(tt<=Ve){const Ft=ve.length>0&&q===ve[ve.length-1].ref.current;g.style.bottom="0px";const kt=S.clientHeight-I.offsetTop-I.offsetHeight,Jt=Math.max(ie,De+(Ft?ke:0)+kt+re),ze=tt+Jt;g.style.height=ze+"px"}else{const Ft=ve.length>0&&q===ve[0].ref.current;g.style.top="0px";const Jt=Math.max(Ve,Ke+I.offsetTop+(Ft?Oe:0)+De)+yt;g.style.height=Jt+"px",I.scrollTop=tt-Ve+I.offsetTop}g.style.margin=`${Yo}px 0`,g.style.minHeight=fe+"px",g.style.maxHeight=le+"px",o?.(),requestAnimationFrame(()=>T.current=!0)}},[k,p.trigger,p.valueNode,g,S,I,q,G,p.dir,o]);As(()=>X(),[X]);const[L,ee]=R.useState();As(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]);const oe=R.useCallback(Q=>{Q&&M.current===!0&&(X(),K?.(),M.current=!1)},[X,K]);return u.jsx(Uye,{scope:s,contentWrapper:g,shouldExpandOnScrollRef:T,onScrollButtonChange:oe,children:u.jsx("div",{ref:b,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:u.jsx(Cn.div,{...d,ref:A,style:{boxSizing:"border-box",maxHeight:"100%",...d.style}})})})});B6.displayName=qye;var Bye="SelectPopperPosition",v_=R.forwardRef((e,r)=>{const{__scopeSelect:s,align:o="start",collisionPadding:d=Yo,...p}=e,m=YC(s);return u.jsx(SC,{...m,...p,ref:r,align:o,collisionPadding:d,style:{boxSizing:"border-box",...p.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});v_.displayName=Bye;var[Uye,a$]=Ig(Np,{}),x_="SelectViewport",U6=R.forwardRef((e,r)=>{const{__scopeSelect:s,nonce:o,...d}=e,p=Jd(x_,s),m=a$(x_,s),g=zn(r,p.onViewportChange),b=R.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),u.jsx(GC.Slot,{scope:s,children:u.jsx(Cn.div,{"data-radix-select-viewport":"",role:"presentation",...d,ref:g,style:{position:"relative",flex:1,overflow:"hidden auto",...d.style},onScroll:$t(d.onScroll,S=>{const j=S.currentTarget,{contentWrapper:A,shouldExpandOnScrollRef:k}=m;if(k?.current&&A){const T=Math.abs(b.current-j.scrollTop);if(T>0){const M=window.innerHeight-Yo*2,I=parseFloat(A.style.minHeight),q=parseFloat(A.style.height),G=Math.max(I,q);if(G<M){const K=G+T,X=Math.min(M,K),L=K-X;A.style.height=X+"px",A.style.bottom==="0px"&&(j.scrollTop=L>0?L:0,A.style.justifyContent="flex-end")}}}b.current=j.scrollTop})})})]})});U6.displayName=x_;var K6="SelectGroup",[Kye,Vye]=Ig(K6),Hye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=Vs();return u.jsx(Kye,{scope:s,id:d,children:u.jsx(Cn.div,{role:"group","aria-labelledby":d,...o,ref:r})})});Hye.displayName=K6;var V6="SelectLabel",Gye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=Vye(V6,s);return u.jsx(Cn.div,{id:d.id,...o,ref:r})});Gye.displayName=V6;var tC="SelectItem",[Xye,H6]=Ig(tC),G6=R.forwardRef((e,r)=>{const{__scopeSelect:s,value:o,disabled:d=!1,textValue:p,...m}=e,g=Wd(tC,s),b=Jd(tC,s),S=g.value===o,[j,A]=R.useState(p??""),[k,T]=R.useState(!1),M=zn(r,K=>b.itemRefCallback?.(K,o,d)),I=Vs(),q=R.useRef("touch"),G=()=>{d||(g.onValueChange(o),g.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(Xye,{scope:s,value:o,disabled:d,textId:I,isSelected:S,onItemTextChange:R.useCallback(K=>{A(X=>X||(K?.textContent??"").trim())},[]),children:u.jsx(GC.ItemSlot,{scope:s,value:o,disabled:d,textValue:j,children:u.jsx(Cn.div,{role:"option","aria-labelledby":I,"data-highlighted":k?"":void 0,"aria-selected":S&&k,"data-state":S?"checked":"unchecked","aria-disabled":d||void 0,"data-disabled":d?"":void 0,tabIndex:d?void 0:-1,...m,ref:M,onFocus:$t(m.onFocus,()=>T(!0)),onBlur:$t(m.onBlur,()=>T(!1)),onClick:$t(m.onClick,()=>{q.current!=="mouse"&&G()}),onPointerUp:$t(m.onPointerUp,()=>{q.current==="mouse"&&G()}),onPointerDown:$t(m.onPointerDown,K=>{q.current=K.pointerType}),onPointerMove:$t(m.onPointerMove,K=>{q.current=K.pointerType,d?b.onItemLeave?.():q.current==="mouse"&&K.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$t(m.onPointerLeave,K=>{K.currentTarget===document.activeElement&&b.onItemLeave?.()}),onKeyDown:$t(m.onKeyDown,K=>{b.searchRef?.current!==""&&K.key===" "||($ye.includes(K.key)&&G(),K.key===" "&&K.preventDefault())})})})})});G6.displayName=tC;var Cb="SelectItemText",X6=R.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:d,...p}=e,m=Wd(Cb,s),g=Jd(Cb,s),b=H6(Cb,s),S=Mye(Cb,s),[j,A]=R.useState(null),k=zn(r,G=>A(G),b.onItemTextChange,G=>g.itemTextRefCallback?.(G,b.value,b.disabled)),T=j?.textContent,M=R.useMemo(()=>u.jsx("option",{value:b.value,disabled:b.disabled,children:T},b.value),[b.disabled,b.value,T]),{onNativeOptionAdd:I,onNativeOptionRemove:q}=S;return As(()=>(I(M),()=>q(M)),[I,q,M]),u.jsxs(u.Fragment,{children:[u.jsx(Cn.span,{id:b.textId,...p,ref:k}),b.isSelected&&m.valueNode&&!m.valueNodeHasChildren?fC.createPortal(p.children,m.valueNode):null]})});X6.displayName=Cb;var Y6="SelectItemIndicator",Z6=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return H6(Y6,s).isSelected?u.jsx(Cn.span,{"aria-hidden":!0,...o,ref:r}):null});Z6.displayName=Y6;var b_="SelectScrollUpButton",W6=R.forwardRef((e,r)=>{const s=Jd(b_,e.__scopeSelect),o=a$(b_,e.__scopeSelect),[d,p]=R.useState(!1),m=zn(r,o.onScrollButtonChange);return As(()=>{if(s.viewport&&s.isPositioned){let g=function(){const S=b.scrollTop>0;p(S)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),d?u.jsx(Q6,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop-b.offsetHeight)}}):null});W6.displayName=b_;var w_="SelectScrollDownButton",J6=R.forwardRef((e,r)=>{const s=Jd(w_,e.__scopeSelect),o=a$(w_,e.__scopeSelect),[d,p]=R.useState(!1),m=zn(r,o.onScrollButtonChange);return As(()=>{if(s.viewport&&s.isPositioned){let g=function(){const S=b.scrollHeight-b.clientHeight,j=Math.ceil(b.scrollTop)<S;p(j)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),d?u.jsx(Q6,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop+b.offsetHeight)}}):null});J6.displayName=w_;var Q6=R.forwardRef((e,r)=>{const{__scopeSelect:s,onAutoScroll:o,...d}=e,p=Jd("SelectScrollButton",s),m=R.useRef(null),g=XC(s),b=R.useCallback(()=>{m.current!==null&&(window.clearInterval(m.current),m.current=null)},[]);return R.useEffect(()=>()=>b(),[b]),As(()=>{g().find(j=>j.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[g]),u.jsx(Cn.div,{"aria-hidden":!0,...d,ref:r,style:{flexShrink:0,...d.style},onPointerDown:$t(d.onPointerDown,()=>{m.current===null&&(m.current=window.setInterval(o,50))}),onPointerMove:$t(d.onPointerMove,()=>{p.onItemLeave?.(),m.current===null&&(m.current=window.setInterval(o,50))}),onPointerLeave:$t(d.onPointerLeave,()=>{b()})})}),Yye="SelectSeparator",Zye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return u.jsx(Cn.div,{"aria-hidden":!0,...o,ref:r})});Zye.displayName=Yye;var S_="SelectArrow",Wye=R.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,d=YC(s),p=Wd(S_,s),m=Jd(S_,s);return p.open&&m.position==="popper"?u.jsx(EC,{...d,...o,ref:r}):null});Wye.displayName=S_;var Jye="SelectBubbleInput",eq=R.forwardRef(({__scopeSelect:e,value:r,...s},o)=>{const d=R.useRef(null),p=zn(o,d),m=_6(r);return R.useEffect(()=>{const g=d.current;if(!g)return;const b=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(b,"value").set;if(m!==r&&j){const A=new Event("change",{bubbles:!0});j.call(g,r),g.dispatchEvent(A)}},[m,r]),u.jsx(Cn.select,{...s,style:{...tz,...s.style},ref:p,defaultValue:r})});eq.displayName=Jye;function tq(e){return e===""||e===void 0}function nq(e){const r=tl(e),s=R.useRef(""),o=R.useRef(0),d=R.useCallback(m=>{const g=s.current+m;r(g),(function b(S){s.current=S,window.clearTimeout(o.current),S!==""&&(o.current=window.setTimeout(()=>b(""),1e3))})(g)},[r]),p=R.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return R.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,d,p]}function rq(e,r,s){const d=r.length>1&&Array.from(r).every(S=>S===r[0])?r[0]:r,p=s?e.indexOf(s):-1;let m=Qye(e,Math.max(p,0));d.length===1&&(m=m.filter(S=>S!==s));const b=m.find(S=>S.textValue.toLowerCase().startsWith(d.toLowerCase()));return b!==s?b:void 0}function Qye(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var eve=$6,tve=D6,nve=M6,rve=I6,sve=L6,ive=z6,ave=U6,ove=G6,lve=X6,cve=Z6,uve=W6,dve=J6;function Rn({...e}){return u.jsx(eve,{"data-slot":"select",...e})}function Tn({...e}){return u.jsx(nve,{"data-slot":"select-value",...e})}function _n({className:e,size:r="default",children:s,...o}){return u.jsxs(tve,{"data-slot":"select-trigger","data-size":r,className:ft("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[s,u.jsx(rve,{asChild:!0,children:u.jsx(aL,{className:"size-4 opacity-50"})})]})}function $n({className:e,children:r,position:s="popper",align:o="center",...d}){return u.jsx(sve,{children:u.jsxs(ive,{"data-slot":"select-content",className:ft("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,align:o,...d,children:[u.jsx(hve,{}),u.jsx(ave,{className:ft("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),u.jsx(pve,{})]})})}function jt({className:e,children:r,...s}){return u.jsxs(ove,{"data-slot":"select-item",className:ft("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[u.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:u.jsx(cve,{children:u.jsx(iL,{className:"size-4"})})}),u.jsx(lve,{children:r})]})}function hve({className:e,...r}){return u.jsx(uve,{"data-slot":"select-scroll-up-button",className:ft("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(jZ,{className:"size-4"})})}function pve({className:e,...r}){return u.jsx(dve,{"data-slot":"select-scroll-down-button",className:ft("flex cursor-default items-center justify-center py-1",e),...r,children:u.jsx(aL,{className:"size-4"})})}function hu({className:e,...r}){return u.jsx("textarea",{"data-slot":"textarea",className:ft("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})}const sq=Xs({name:Nn().trim().min(1,"Name is required").max(120,"Max 120 chars"),cluster_provider:Nn().trim().min(1,"Provider is required").max(120,"Max 120 chars"),region:Nn().trim().min(1,"Region is required").max(120,"Max 120 chars"),docker_image:Nn().trim().min(1,"Docker Image is required"),docker_tag:Nn().trim().min(1,"Docker Tag is required")}),fve=sq.partial();function mve({status:e}){const r=(e??"").toLowerCase();return r?r==="ready"?u.jsxs(ns,{variant:"default",className:"flex items-center gap-1 text-xs",children:[u.jsx(L_,{className:"h-3 w-3"}),"ready"]}):r==="failed"?u.jsxs(ns,{variant:"destructive",className:"flex items-center gap-1 text-xs",children:[u.jsx(kM,{className:"h-3 w-3"}),"failed"]}):r==="provisioning"||r==="pending"||r==="pre_pending"?u.jsxs(ns,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[u.jsx(Ds,{className:"h-3 w-3 animate-spin"}),r.replace("_"," ")]}):r==="incomplete"?u.jsxs(ns,{variant:"outline",className:"flex items-center gap-1 text-xs",children:[u.jsx(kM,{className:"h-3 w-3"}),"incomplete"]}):u.jsx(ns,{variant:"outline",className:"text-xs",children:r}):u.jsx(ns,{variant:"outline",className:"text-xs",children:"unknown"})}function gve({c:e}){return u.jsxs("div",{className:"text-muted-foreground flex flex-col gap-1 text-xs",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.cluster_provider&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(zZ,{className:"h-3 w-3"}),e.cluster_provider]}),e.region&&u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx(sW,{className:"h-3 w-3"}),e.region]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2 font-mono",children:[e.random_token&&u.jsxs("span",{children:["token: ",u.jsx("span",{className:"ml-1",children:el(e.random_token,8)})]}),e.certificate_key&&u.jsxs("span",{children:["cert: ",u.jsx("span",{className:"ml-1",children:el(e.certificate_key,8)})]})]})]})}const yve=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),[j,A]=R.useState(null),[k,T]=R.useState(""),[M,I]=R.useState(""),[q,G]=R.useState(""),[K,X]=R.useState(""),[L,ee]=R.useState(""),[oe,Q]=R.useState(""),[ne,de]=R.useState(""),[je,ve]=R.useState(null),le=Z=>je===Z,be=Hs(),Ce=rr({queryKey:["clusters"],queryFn:()=>Ss.listClusters()}),Ke=rr({queryKey:["load-balancers"],queryFn:()=>jb.listLoadBalancers()}),ce=rr({queryKey:["domains"],queryFn:()=>tc.listDomains()}),re=rr({queryKey:["record-sets",k],enabled:!!k,queryFn:()=>tc.listRecordSetsByDomain(k)}),ue=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),_e=rr({queryKey:["node-pools"],queryFn:()=>ka.listNodePools()}),fe=mr({resolver:gr(sq),defaultValues:{name:"",cluster_provider:"",region:"",docker_image:"",docker_tag:""}}),He=nn({mutationFn:Z=>Ss.createCluster(Z),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),fe.reset(),o(!1),Ze.success("Cluster created successfully.")},onError:Z=>{Ze.error(Z?.message??"There was an error while creating the cluster")}}),Oe=Z=>{He.mutate(Z)},ke=mr({resolver:gr(fve),defaultValues:{}}),Ve=nn({mutationFn:({id:Z,values:we})=>Ss.updateCluster(Z,we),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),ke.reset(),p(!1),Ze.success("Cluster updated successfully.")},onError:Z=>{Ze.error(Z?.message??"There was an error while updating the cluster")}}),ie=Z=>{Z.id&&(S(Z.id),ke.reset({name:Z.name??"",cluster_provider:Z.cluster_provider??"",region:Z.region??"",docker_image:Z.docker_image??"",docker_tag:Z.docker_tag??""}),p(!0))},De=nn({mutationFn:Z=>Ss.deleteCluster(Z),onSuccess:async()=>{await be.invalidateQueries({queryKey:["clusters"]}),g(null),Ze.success("Cluster deleted successfully.")},onError:Z=>{Ze.error(Z?.message??"There was an error while deleting the cluster")}}),Le=R.useMemo(()=>{const Z=Ce.data??[],we=e.trim().toLowerCase();return we?Z.filter(Re=>Re.name?.toLowerCase().includes(we)||Re.cluster_provider?.toLowerCase().includes(we)||Re.region?.toLowerCase().includes(we)||Re.status?.toLowerCase().includes(we)):Z},[e,Ce.data]);R.useEffect(()=>{if(!j){T(""),I(""),G(""),X(""),ee(""),Q(""),de("");return}j.captain_domain?.id&&T(j.captain_domain.id),j.control_plane_record_set?.id&&I(j.control_plane_record_set.id),j.apps_load_balancer?.id&&G(j.apps_load_balancer.id),j.glueops_load_balancer?.id&&X(j.glueops_load_balancer.id),j.bastion_server?.id&&ee(j.bastion_server.id)},[j]);async function tt(){if(j?.id)try{const Z=await Ss.getCluster(j.id);A(Z),await be.invalidateQueries({queryKey:["clusters"]})}catch{}}async function yt(){if(j?.id){if(!k){Ze.error("Domain is required");return}ve("captain");try{await Ss.attachCaptainDomain(j.id,{domain_id:k}),Ze.success("Captain domain attached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach captain domain.")}finally{ve(null)}}}async function Ot(){if(j?.id){ve("captain");try{await Ss.detachCaptainDomain(j.id),Ze.success("Captain domain detached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to detach captain domain.")}finally{ve(null)}}}async function Ft(){if(j?.id){if(!M){Ze.error("Record set is required");return}ve("recordset");try{await Ss.attachControlPlaneRecordSet(j.id,{record_set_id:M}),Ze.success("Control plane record set attached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach record set.")}finally{ve(null)}}}async function kt(){if(j?.id){ve("recordset");try{await Ss.detachControlPlaneRecordSet(j.id),Ze.success("Control plane record set detached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to detach record set.")}finally{ve(null)}}}async function Jt(){if(j?.id){if(!q){Ze.error("Load balancer is required");return}ve("apps-lb");try{await Ss.attachAppsLoadBalancer(j.id,{load_balancer_id:q}),Ze.success("Apps load balancer attached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach apps load balancer.")}finally{ve(null)}}}async function ze(){if(j?.id){ve("apps-lb");try{await Ss.detachAppsLoadBalancer(j.id),Ze.success("Apps load balancer detached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to detach apps load balancer.")}finally{ve(null)}}}async function zt(){if(j?.id){if(!K){Ze.error("Load balancer is required");return}ve("glueops-lb");try{await Ss.attachGlueOpsLoadBalancer(j.id,{load_balancer_id:K}),Ze.success("GlueOps load balancer attached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach GlueOps load balancer.")}finally{ve(null)}}}async function Rt(){if(j?.id){ve("glueops-lb");try{await Ss.detachGlueOpsLoadBalancer(j.id),Ze.success("GlueOps load balancer detached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to detach GlueOps load balancer.")}finally{ve(null)}}}async function V(){if(j?.id){if(!L){Ze.error("Server is required");return}ve("bastion");try{await Ss.attachBastion(j.id,{server_id:L}),Ze.success("Bastion server attached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach bastion server.")}finally{ve(null)}}}async function Dn(){if(j?.id){ve("bastion");try{await Ss.detachBastion(j.id),Ze.success("Bastion server detached."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to detach bastion server.")}finally{ve(null)}}}async function cn(){if(j?.id){if(!oe){Ze.error("Node pool is required");return}ve("nodepool");try{await Ss.attachNodePool(j.id,oe),Ze.success("Node pool attached."),Q(""),await tt()}catch(Z){Ze.error(Z?.message??"Failed to attach node pool.")}finally{ve(null)}}}async function xe(Z){if(j?.id){ve("nodepool");try{await Ss.detachNodePool(j.id,Z),Ze.success("Node pool detached."),await tt()}catch(we){Ze.error(we?.message??"Failed to detach node pool.")}finally{ve(null)}}}async function Ne(){if(j?.id){if(!ne.trim()){Ze.error("Kubeconfig is required");return}ve("kubeconfig");try{await Ss.setKubeconfig(j.id,{kubeconfig:ne}),Ze.success("Kubeconfig updated."),de(""),await tt()}catch(Z){Ze.error(Z?.message??"Failed to set kubeconfig.")}finally{ve(null)}}}async function Ge(){if(j?.id){ve("kubeconfig");try{await Ss.clearKubeconfig(j.id),Ze.success("Kubeconfig cleared."),await tt()}catch(Z){Ze.error(Z?.message??"Failed to clear kubeconfig.")}finally{ve(null)}}}if(Ce.isLoading)return u.jsx("div",{className:"p-6",children:"Loading clusters…"});if(Ce.error)return u.jsx("div",{className:"p-6 text-red-500",children:"Error loading clusters."});const D=Ke.data??[],z=D.filter(Z=>Z.kind==="public"),H=D.filter(Z=>Z.kind==="glueops");return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Clusters"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:Z=>r(Z.target.value),placeholder:"Search clusters",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Cluster"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Cluster"})}),u.jsx(yr,{...fe,children:u.jsxs("form",{className:"space-y-4",onSubmit:fe.handleSubmit(Oe),children:[u.jsx(pt,{control:fe.control,name:"name",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"prod-cluster-eu-west-1",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:fe.control,name:"cluster_provider",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Provider"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"aws / hetzner / baremetal",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:fe.control,name:"region",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Region"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"eu-west-1",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:fe.control,name:"docker_image",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Docker Image"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"ghcr.io/glueops/gluekube",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:fe.control,name:"docker_tag",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Docker Tag"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"v1.33",...Z})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:He.isPending,children:He.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Provider"}),u.jsx(At,{children:"Region"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Docker"}),u.jsx(At,{children:"Summary"}),u.jsx(At,{className:"w-[320px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[Le.map(Z=>u.jsxs(an,{children:[u.jsx(xt,{className:"font-medium",children:Z.name}),u.jsx(xt,{children:Z.cluster_provider}),u.jsx(xt,{children:Z.region}),u.jsxs(xt,{children:[u.jsx(mve,{status:Z.status}),Z.last_error&&u.jsx("div",{className:"mt-1 text-xs text-red-500",children:el(Z.last_error,80)})]}),u.jsx(xt,{children:Z.docker_image+":"+Z.docker_tag}),u.jsxs(xt,{children:[u.jsx(gve,{c:Z}),Z.id&&u.jsx("code",{className:"text-muted-foreground mt-1 block text-xs",children:el(Z.id,6)})]}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[u.jsxs(Fe,{variant:"ghost",size:"sm",onClick:()=>A(Z),children:[u.jsx($W,{className:"mr-1 h-4 w-4"})," Configure"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>ie(Z),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>Z.id&&g(Z.id),disabled:De.isPending&&m===Z.id,children:De.isPending&&m===Z.id?"Deleting…":"Delete"})]})})]},Z.id)),Le.length===0&&u.jsx(an,{children:u.jsxs(xt,{colSpan:6,className:"text-muted-foreground py-10 text-center",children:[u.jsx(Jb,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No clusters match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Cluster"})}),u.jsx(yr,{...ke,children:u.jsxs("form",{className:"space-y-4",onSubmit:ke.handleSubmit(Z=>{b&&Ve.mutate({id:b,values:Z})}),children:[u.jsx(pt,{control:ke.control,name:"name",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"prod-cluster-eu-west-1",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:ke.control,name:"cluster_provider",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Provider"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"aws / hetzner / baremetal",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:ke.control,name:"region",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Region"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"eu-west-1",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:ke.control,name:"docker_image",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Docker Image"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"ghcr.io/glueops/gluekube",...Z})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:ke.control,name:"docker_tag",render:({field:Z})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Docker Tag"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"v1.33",...Z})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:Ve.isPending,children:Ve.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!j,onOpenChange:Z=>!Z&&A(null),children:u.jsxs(mn,{className:"max-h-[90vh] w-full max-w-3xl overflow-y-auto",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Configure Cluster",j?.name?`: ${j.name}`:""]})}),j&&u.jsxs("div",{className:"space-y-6 py-2",children:[u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsx("div",{className:"flex items-center justify-between gap-2",children:u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(VZ,{className:"h-4 w-4"}),u.jsx("h3",{className:"text-sm font-semibold",children:"Kubeconfig"})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Paste the kubeconfig for this cluster. It will be stored encrypted and never returned by the API."})]})}),u.jsx(hu,{value:ne,onChange:Z=>de(Z.target.value),rows:6,placeholder:`apiVersion: v1
|
||
clusters:
|
||
- cluster: ...`,className:"font-mono text-xs"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Ne,disabled:le("kubeconfig"),children:le("kubeconfig")?"Saving…":"Save kubeconfig"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Ge,disabled:le("kubeconfig"),children:"Clear kubeconfig"})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold",children:"Captain Domain"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Domain used for the AutoGlue captain endpoint."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:j.captain_domain?j.captain_domain.domain_name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Domain"}),u.jsxs(Rn,{value:k,onValueChange:Z=>{T(Z),I("")},children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:ce.isLoading?"Loading domains…":"Select domain"})}),u.jsx($n,{children:(ce.data??[]).map(Z=>u.jsx(jt,{value:Z.id,children:Z.domain_name},Z.id))})]}),u.jsx("p",{className:"text-muted-foreground mt-1 text-[11px]",children:"Once a domain is attached, control plane record sets for that domain will be available below."})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:yt,disabled:le("captain")||ce.isLoading,children:le("captain")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Ot,disabled:le("captain")||!j.captain_domain,children:"Detach"})]})]})]}),k&&u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold",children:"Control Plane Record Set"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"DNS record set used for the cluster control plane endpoint."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:j.control_plane_record_set?j.control_plane_record_set.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Record Set"}),u.jsxs(Rn,{value:M,onValueChange:Z=>I(Z),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:re.isLoading?"Loading record sets…":"Select record set"})}),u.jsx($n,{children:(re.data??[]).map(Z=>u.jsxs(jt,{value:Z.id,children:[Z.name," · ",Z.type]},Z.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Ft,disabled:le("recordset")||re.isLoading,children:le("recordset")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:kt,disabled:le("recordset")||!j.control_plane_record_set,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold",children:"Apps Load Balancer"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Frontend load balancer for application traffic."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:j.apps_load_balancer?j.apps_load_balancer.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Apps Load Balancer"}),u.jsxs(Rn,{value:q,onValueChange:Z=>G(Z),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:Ke.isLoading?"Loading load balancers…":"Select apps LB"})}),u.jsx($n,{children:z.map(Z=>u.jsxs(jt,{value:Z.id,children:[Z.name," · ",Z.public_ip_address]},Z.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:Jt,disabled:le("apps-lb")||Ke.isLoading,children:le("apps-lb")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:ze,disabled:le("apps-lb")||!j.apps_load_balancer,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold",children:"GlueOps / Control-plane Load Balancer"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Load balancer for GlueOps/control-plane traffic."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:j.glueops_load_balancer?j.glueops_load_balancer.name:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"GlueOps Load Balancer"}),u.jsxs(Rn,{value:K,onValueChange:Z=>X(Z),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:Ke.isLoading?"Loading load balancers…":"Select GlueOps LB"})}),u.jsx($n,{children:H.map(Z=>u.jsxs(jt,{value:Z.id,children:[Z.name," · ",Z.private_ip_address]},Z.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:zt,disabled:le("glueops-lb")||Ke.isLoading,children:le("glueops-lb")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Rt,disabled:le("glueops-lb")||!j.glueops_load_balancer,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(F_,{className:"h-4 w-4"}),u.jsx("h3",{className:"text-sm font-semibold",children:"Bastion Server"})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"SSH bastion used to reach the cluster nodes."})]}),u.jsx("div",{className:"text-right text-xs",children:u.jsx("div",{className:"font-mono",children:j.bastion_server?j.bastion_server.hostname??j.bastion_server.id:"Not attached"})})]}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Bastion Server"}),u.jsxs(Rn,{value:L,onValueChange:Z=>ee(Z),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:ue.isLoading?"Loading servers…":"Select server"})}),u.jsx($n,{children:(ue.data??[]).map(Z=>u.jsxs(jt,{value:Z.id,children:[Z.hostname??Z.id," · ",Z.private_ip_address]},Z.id))})]})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{size:"sm",onClick:V,disabled:le("bastion")||ue.isLoading,children:le("bastion")?"Attaching…":"Attach"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:Dn,disabled:le("bastion")||!j.bastion_server,children:"Detach"})]})]})]}),u.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[u.jsx("div",{className:"flex items-center justify-between gap-2",children:u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-semibold",children:"Node Pools"}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"Attach node pools to this cluster. Each node pool may have its own labels, taints, and backing servers."})]})}),u.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(xi,{className:"text-xs",children:"Available Node Pools"}),u.jsxs(Rn,{value:oe,onValueChange:Z=>Q(Z),children:[u.jsx(_n,{className:"w-full",children:u.jsx(Tn,{placeholder:_e.isLoading?"Loading node pools…":"Select node pool"})}),u.jsx($n,{children:(_e.data??[]).map(Z=>u.jsxs(jt,{value:Z.id,children:[Z.name," · ",Z.role]},Z.id))})]})]}),u.jsx("div",{className:"flex gap-2",children:u.jsx(Fe,{size:"sm",onClick:cn,disabled:le("nodepool")||_e.isLoading,children:le("nodepool")?"Attaching…":"Attach"})})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx(xi,{className:"text-xs",children:"Attached Node Pools"}),j.node_pools&&j.node_pools.length>0?u.jsx("div",{className:"divide-border mt-1 rounded-md border",children:j.node_pools.map(Z=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-xs",children:[u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:"font-medium",children:Z.name}),u.jsxs("span",{className:"text-muted-foreground",children:["role: ",Z.role," · servers: ",Z.servers?.length??0]})]}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>Z.id&&xe(Z.id),disabled:le("nodepool"),children:"Detach"})]},Z.id))}):u.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"No node pools attached to this cluster yet."})]})]}),u.jsx(Sn,{className:"mt-2",children:u.jsx(Fe,{variant:"outline",onClick:()=>A(null),children:"Close"})})]})]})}),u.jsx(fn,{open:!!m,onOpenChange:Z=>!Z&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete cluster"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this cluster?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&De.mutate(m),disabled:De.isPending,children:De.isPending?"Deleting…":"Delete"})]})]})}),u.jsx("pre",{children:JSON.stringify(Ce.data,null,2)})]})},Ym=ite(),Qm={listCredentials:()=>ut(async()=>await Ym.listCredentials()),createCredential:async e=>ut(async()=>await Ym.createCredential({dtoCreateCredentialRequest:e})),getCredential:async e=>ut(async()=>await Ym.getCredential({id:e})),deleteCredential:async e=>ut(async()=>{await Ym.deleteCredential({id:e})}),updateCredential:async(e,r)=>ut(async()=>await Ym.updateCredential({id:e,dtoUpdateCredentialRequest:r})),revealCredential:async e=>ut(async()=>await Ym.revealCredential({id:e}))};var vve=Symbol("radix.slottable");function xve(e){const r=({children:s})=>u.jsx(u.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=vve,r}var iq="AlertDialog",[bve]=al(iq,[Az]),vu=Az(),aq=e=>{const{__scopeAlertDialog:r,...s}=e,o=vu(r);return u.jsx(TC,{...o,...s,modal:!0})};aq.displayName=iq;var wve="AlertDialogTrigger",oq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(Bz,{...d,...o,ref:r})});oq.displayName=wve;var Sve="AlertDialogPortal",lq=e=>{const{__scopeAlertDialog:r,...s}=e,o=vu(r);return u.jsx(_C,{...o,...s})};lq.displayName=Sve;var Eve="AlertDialogOverlay",cq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx($C,{...d,...o,ref:r})});cq.displayName=Eve;var yg="AlertDialogContent",[jve,Cve]=bve(yg),Ave=xve("AlertDialogContent"),uq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,children:o,...d}=e,p=vu(s),m=R.useRef(null),g=zn(r,m),b=R.useRef(null);return u.jsx(oae,{contentName:yg,titleName:dq,docsSlug:"alert-dialog",children:u.jsx(jve,{scope:s,cancelRef:b,children:u.jsxs(NC,{role:"alertdialog",...p,...d,ref:g,onOpenAutoFocus:$t(d.onOpenAutoFocus,S=>{S.preventDefault(),b.current?.focus({preventScroll:!0})}),onPointerDownOutside:S=>S.preventDefault(),onInteractOutside:S=>S.preventDefault(),children:[u.jsx(Ave,{children:o}),u.jsx(kve,{contentRef:m})]})})})});uq.displayName=yg;var dq="AlertDialogTitle",hq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(i2,{...d,...o,ref:r})});hq.displayName=dq;var pq="AlertDialogDescription",fq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(a2,{...d,...o,ref:r})});fq.displayName=pq;var Ove="AlertDialogAction",mq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,d=vu(s);return u.jsx(ow,{...d,...o,ref:r})});mq.displayName=Ove;var gq="AlertDialogCancel",yq=R.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,{cancelRef:d}=Cve(gq,s),p=vu(s),m=zn(r,d);return u.jsx(ow,{...p,...o,ref:m})});yq.displayName=gq;var kve=({contentRef:e})=>{const r=`\`${yg}\` requires a description for the component to be accessible for screen reader users.
|
||
|
||
You can add a description to the \`${yg}\` by passing a \`${pq}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||
|
||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${yg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return R.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(r)},[r,e]),null},Rve=aq,Tve=oq,_ve=lq,$ve=cq,Nve=uq,Dve=mq,Pve=yq,Mve=hq,Ive=fq;function nC({...e}){return u.jsx(Rve,{"data-slot":"alert-dialog",...e})}function rC({...e}){return u.jsx(Tve,{"data-slot":"alert-dialog-trigger",...e})}function Lve({...e}){return u.jsx(_ve,{"data-slot":"alert-dialog-portal",...e})}function zve({className:e,...r}){return u.jsx($ve,{"data-slot":"alert-dialog-overlay",className:ft("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function sC({className:e,...r}){return u.jsxs(Lve,{children:[u.jsx(zve,{}),u.jsx(Nve,{"data-slot":"alert-dialog-content",className:ft("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r})]})}function iC({className:e,...r}){return u.jsx("div",{"data-slot":"alert-dialog-header",className:ft("flex flex-col gap-2 text-center sm:text-left",e),...r})}function aC({className:e,...r}){return u.jsx("div",{"data-slot":"alert-dialog-footer",className:ft("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function oC({className:e,...r}){return u.jsx(Mve,{"data-slot":"alert-dialog-title",className:ft("text-lg font-semibold",e),...r})}function lC({className:e,...r}){return u.jsx(Ive,{"data-slot":"alert-dialog-description",className:ft("text-muted-foreground text-sm",e),...r})}function cC({className:e,...r}){return u.jsx(Dve,{className:ft(V_(),e),...r})}function uC({className:e,...r}){return u.jsx(Pve,{className:ft(V_({variant:"outline"}),e),...r})}var mT="rovingFocusGroup.onEntryFocus",Fve={bubbles:!1,cancelable:!0},mw="RovingFocusGroup",[E_,vq,qve]=s$(mw),[Bve,xq]=al(mw,[qve]),[Uve,Kve]=Bve(mw),bq=R.forwardRef((e,r)=>u.jsx(E_.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(E_.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Vve,{...e,ref:r})})}));bq.displayName=mw;var Vve=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:d=!1,dir:p,currentTabStopId:m,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:S,preventScrollOnEntryFocus:j=!1,...A}=e,k=R.useRef(null),T=zn(r,k),M=i$(p),[I,q]=qd({prop:m,defaultProp:g??null,onChange:b,caller:mw}),[G,K]=R.useState(!1),X=tl(S),L=vq(s),ee=R.useRef(!1),[oe,Q]=R.useState(0);return R.useEffect(()=>{const ne=k.current;if(ne)return ne.addEventListener(mT,X),()=>ne.removeEventListener(mT,X)},[X]),u.jsx(Uve,{scope:s,orientation:o,dir:M,loop:d,currentTabStopId:I,onItemFocus:R.useCallback(ne=>q(ne),[q]),onItemShiftTab:R.useCallback(()=>K(!0),[]),onFocusableItemAdd:R.useCallback(()=>Q(ne=>ne+1),[]),onFocusableItemRemove:R.useCallback(()=>Q(ne=>ne-1),[]),children:u.jsx(Cn.div,{tabIndex:G||oe===0?-1:0,"data-orientation":o,...A,ref:T,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{ee.current=!0}),onFocus:$t(e.onFocus,ne=>{const de=!ee.current;if(ne.target===ne.currentTarget&&de&&!G){const je=new CustomEvent(mT,Fve);if(ne.currentTarget.dispatchEvent(je),!je.defaultPrevented){const ve=L().filter(ce=>ce.focusable),le=ve.find(ce=>ce.active),be=ve.find(ce=>ce.id===I),Ke=[le,be,...ve].filter(Boolean).map(ce=>ce.ref.current);Eq(Ke,j)}}ee.current=!1}),onBlur:$t(e.onBlur,()=>K(!1))})})}),wq="RovingFocusGroupItem",Sq=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:d=!1,tabStopId:p,children:m,...g}=e,b=Vs(),S=p||b,j=Kve(wq,s),A=j.currentTabStopId===S,k=vq(s),{onFocusableItemAdd:T,onFocusableItemRemove:M,currentTabStopId:I}=j;return R.useEffect(()=>{if(o)return T(),()=>M()},[o,T,M]),u.jsx(E_.ItemSlot,{scope:s,id:S,focusable:o,active:d,children:u.jsx(Cn.span,{tabIndex:A?0:-1,"data-orientation":j.orientation,...g,ref:r,onMouseDown:$t(e.onMouseDown,q=>{o?j.onItemFocus(S):q.preventDefault()}),onFocus:$t(e.onFocus,()=>j.onItemFocus(S)),onKeyDown:$t(e.onKeyDown,q=>{if(q.key==="Tab"&&q.shiftKey){j.onItemShiftTab();return}if(q.target!==q.currentTarget)return;const G=Xve(q,j.orientation,j.dir);if(G!==void 0){if(q.metaKey||q.ctrlKey||q.altKey||q.shiftKey)return;q.preventDefault();let X=k().filter(L=>L.focusable).map(L=>L.ref.current);if(G==="last")X.reverse();else if(G==="prev"||G==="next"){G==="prev"&&X.reverse();const L=X.indexOf(q.currentTarget);X=j.loop?Yve(X,L+1):X.slice(L+1)}setTimeout(()=>Eq(X))}}),children:typeof m=="function"?m({isCurrentTabStop:A,hasTabStop:I!=null}):m})})});Sq.displayName=wq;var Hve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gve(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xve(e,r,s){const o=Gve(e.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Hve[o]}function Eq(e,r=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:r}),document.activeElement!==s))return}function Yve(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var Zve=bq,Wve=Sq;function Jve(e){const r=Qve(e),s=R.forwardRef((o,d)=>{const{children:p,...m}=o,g=R.Children.toArray(p),b=g.find(txe);if(b){const S=b.props.children,j=g.map(A=>A===b?R.Children.count(S)>1?R.Children.only(null):R.isValidElement(S)?S.props.children:null:A);return u.jsx(r,{...m,ref:d,children:R.isValidElement(S)?R.cloneElement(S,void 0,j):null})}return u.jsx(r,{...m,ref:d,children:p})});return s.displayName=`${e}.Slot`,s}function Qve(e){const r=R.forwardRef((s,o)=>{const{children:d,...p}=s;if(R.isValidElement(d)){const m=rxe(d),g=nxe(p,d.props);return d.type!==R.Fragment&&(g.ref=o?Li(o,m):m),R.cloneElement(d,g)}return R.Children.count(d)>1?R.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var exe=Symbol("radix.slottable");function txe(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===exe}function nxe(e,r){const s={...r};for(const o in r){const d=e[o],p=r[o];/^on[A-Z]/.test(o)?d&&p?s[o]=(...g)=>{const b=p(...g);return d(...g),b}:d&&(s[o]=d):o==="style"?s[o]={...d,...p}:o==="className"&&(s[o]=[d,p].filter(Boolean).join(" "))}return{...e,...s}}function rxe(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var j_=["Enter"," "],sxe=["ArrowDown","PageUp","Home"],jq=["ArrowUp","PageDown","End"],ixe=[...sxe,...jq],axe={ltr:[...j_,"ArrowRight"],rtl:[...j_,"ArrowLeft"]},oxe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gw="Menu",[Zb,lxe,cxe]=s$(gw),[Mp,Cq]=al(gw,[cxe,Hd,xq]),ZC=Hd(),Aq=xq(),[uxe,Ip]=Mp(gw),[dxe,yw]=Mp(gw),Oq=e=>{const{__scopeMenu:r,open:s=!1,children:o,dir:d,onOpenChange:p,modal:m=!0}=e,g=ZC(r),[b,S]=R.useState(null),j=R.useRef(!1),A=tl(p),k=i$(d);return R.useEffect(()=>{const T=()=>{j.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>j.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),u.jsx(wC,{...g,children:u.jsx(uxe,{scope:r,open:s,onOpenChange:A,content:b,onContentChange:S,children:u.jsx(dxe,{scope:r,onClose:R.useCallback(()=>A(!1),[A]),isUsingKeyboardRef:j,dir:k,modal:m,children:o})})})};Oq.displayName=gw;var hxe="MenuAnchor",o$=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,d=ZC(s);return u.jsx(tw,{...d,...o,ref:r})});o$.displayName=hxe;var l$="MenuPortal",[pxe,kq]=Mp(l$,{forceMount:void 0}),Rq=e=>{const{__scopeMenu:r,forceMount:s,children:o,container:d}=e,p=Ip(l$,r);return u.jsx(pxe,{scope:r,forceMount:s,children:u.jsx(lo,{present:s||p.open,children:u.jsx(_g,{asChild:!0,container:d,children:o})})})};Rq.displayName=l$;var io="MenuContent",[fxe,c$]=Mp(io),Tq=R.forwardRef((e,r)=>{const s=kq(io,e.__scopeMenu),{forceMount:o=s.forceMount,...d}=e,p=Ip(io,e.__scopeMenu),m=yw(io,e.__scopeMenu);return u.jsx(Zb.Provider,{scope:e.__scopeMenu,children:u.jsx(lo,{present:o||p.open,children:u.jsx(Zb.Slot,{scope:e.__scopeMenu,children:m.modal?u.jsx(mxe,{...d,ref:r}):u.jsx(gxe,{...d,ref:r})})})})}),mxe=R.forwardRef((e,r)=>{const s=Ip(io,e.__scopeMenu),o=R.useRef(null),d=zn(r,o);return R.useEffect(()=>{const p=o.current;if(p)return kC(p)},[]),u.jsx(u$,{...e,ref:d,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:$t(e.onFocusOutside,p=>p.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),gxe=R.forwardRef((e,r)=>{const s=Ip(io,e.__scopeMenu);return u.jsx(u$,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),yxe=Jve("MenuContent.ScrollLock"),u$=R.forwardRef((e,r)=>{const{__scopeMenu:s,loop:o=!1,trapFocus:d,onOpenAutoFocus:p,onCloseAutoFocus:m,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:S,onPointerDownOutside:j,onFocusOutside:A,onInteractOutside:k,onDismiss:T,disableOutsideScroll:M,...I}=e,q=Ip(io,s),G=yw(io,s),K=ZC(s),X=Aq(s),L=lxe(s),[ee,oe]=R.useState(null),Q=R.useRef(null),ne=zn(r,Q,q.onContentChange),de=R.useRef(0),je=R.useRef(""),ve=R.useRef(0),le=R.useRef(null),be=R.useRef("right"),Ce=R.useRef(0),Ke=M?aw:R.Fragment,ce=M?{as:yxe,allowPinchZoom:!0}:void 0,re=_e=>{const fe=je.current+_e,He=L().filter(Le=>!Le.disabled),Oe=document.activeElement,ke=He.find(Le=>Le.ref.current===Oe)?.textValue,Ve=He.map(Le=>Le.textValue),ie=Rxe(Ve,fe,ke),De=He.find(Le=>Le.textValue===ie)?.ref.current;(function Le(tt){je.current=tt,window.clearTimeout(de.current),tt!==""&&(de.current=window.setTimeout(()=>Le(""),1e3))})(fe),De&&setTimeout(()=>De.focus())};R.useEffect(()=>()=>window.clearTimeout(de.current),[]),AC();const ue=R.useCallback(_e=>be.current===le.current?.side&&_xe(_e,le.current?.area),[]);return u.jsx(fxe,{scope:s,searchRef:je,onItemEnter:R.useCallback(_e=>{ue(_e)&&_e.preventDefault()},[ue]),onItemLeave:R.useCallback(_e=>{ue(_e)||(Q.current?.focus(),oe(null))},[ue]),onTriggerLeave:R.useCallback(_e=>{ue(_e)&&_e.preventDefault()},[ue]),pointerGraceTimerRef:ve,onPointerGraceIntentChange:R.useCallback(_e=>{le.current=_e},[]),children:u.jsx(Ke,{...ce,children:u.jsx(iw,{asChild:!0,trapped:d,onMountAutoFocus:$t(p,_e=>{_e.preventDefault(),Q.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:u.jsx(kg,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:S,onPointerDownOutside:j,onFocusOutside:A,onInteractOutside:k,onDismiss:T,children:u.jsx(Zve,{asChild:!0,...X,dir:G.dir,orientation:"vertical",loop:o,currentTabStopId:ee,onCurrentTabStopIdChange:oe,onEntryFocus:$t(b,_e=>{G.isUsingKeyboardRef.current||_e.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(SC,{role:"menu","aria-orientation":"vertical","data-state":Hq(q.open),"data-radix-menu-content":"",dir:G.dir,...K,...I,ref:ne,style:{outline:"none",...I.style},onKeyDown:$t(I.onKeyDown,_e=>{const He=_e.target.closest("[data-radix-menu-content]")===_e.currentTarget,Oe=_e.ctrlKey||_e.altKey||_e.metaKey,ke=_e.key.length===1;He&&(_e.key==="Tab"&&_e.preventDefault(),!Oe&&ke&&re(_e.key));const Ve=Q.current;if(_e.target!==Ve||!ixe.includes(_e.key))return;_e.preventDefault();const De=L().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);jq.includes(_e.key)&&De.reverse(),Oxe(De)}),onBlur:$t(e.onBlur,_e=>{_e.currentTarget.contains(_e.target)||(window.clearTimeout(de.current),je.current="")}),onPointerMove:$t(e.onPointerMove,Wb(_e=>{const fe=_e.target,He=Ce.current!==_e.clientX;if(_e.currentTarget.contains(fe)&&He){const Oe=_e.clientX>Ce.current?"right":"left";be.current=Oe,Ce.current=_e.clientX}}))})})})})})})});Tq.displayName=io;var vxe="MenuGroup",d$=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{role:"group",...o,ref:r})});d$.displayName=vxe;var xxe="MenuLabel",_q=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{...o,ref:r})});_q.displayName=xxe;var dC="MenuItem",k3="menu.itemSelect",WC=R.forwardRef((e,r)=>{const{disabled:s=!1,onSelect:o,...d}=e,p=R.useRef(null),m=yw(dC,e.__scopeMenu),g=c$(dC,e.__scopeMenu),b=zn(r,p),S=R.useRef(!1),j=()=>{const A=p.current;if(!s&&A){const k=new CustomEvent(k3,{bubbles:!0,cancelable:!0});A.addEventListener(k3,T=>o?.(T),{once:!0}),TL(A,k),k.defaultPrevented?S.current=!1:m.onClose()}};return u.jsx($q,{...d,ref:b,disabled:s,onClick:$t(e.onClick,j),onPointerDown:A=>{e.onPointerDown?.(A),S.current=!0},onPointerUp:$t(e.onPointerUp,A=>{S.current||A.currentTarget?.click()}),onKeyDown:$t(e.onKeyDown,A=>{const k=g.searchRef.current!=="";s||k&&A.key===" "||j_.includes(A.key)&&(A.currentTarget.click(),A.preventDefault())})})});WC.displayName=dC;var $q=R.forwardRef((e,r)=>{const{__scopeMenu:s,disabled:o=!1,textValue:d,...p}=e,m=c$(dC,s),g=Aq(s),b=R.useRef(null),S=zn(r,b),[j,A]=R.useState(!1),[k,T]=R.useState("");return R.useEffect(()=>{const M=b.current;M&&T((M.textContent??"").trim())},[p.children]),u.jsx(Zb.ItemSlot,{scope:s,disabled:o,textValue:d??k,children:u.jsx(Wve,{asChild:!0,...g,focusable:!o,children:u.jsx(Cn.div,{role:"menuitem","data-highlighted":j?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...p,ref:S,onPointerMove:$t(e.onPointerMove,Wb(M=>{o?m.onItemLeave(M):(m.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$t(e.onPointerLeave,Wb(M=>m.onItemLeave(M))),onFocus:$t(e.onFocus,()=>A(!0)),onBlur:$t(e.onBlur,()=>A(!1))})})})}),bxe="MenuCheckboxItem",Nq=R.forwardRef((e,r)=>{const{checked:s=!1,onCheckedChange:o,...d}=e;return u.jsx(Lq,{scope:e.__scopeMenu,checked:s,children:u.jsx(WC,{role:"menuitemcheckbox","aria-checked":hC(s)?"mixed":s,...d,ref:r,"data-state":p$(s),onSelect:$t(d.onSelect,()=>o?.(hC(s)?!0:!s),{checkForDefaultPrevented:!1})})})});Nq.displayName=bxe;var Dq="MenuRadioGroup",[wxe,Sxe]=Mp(Dq,{value:void 0,onValueChange:()=>{}}),Pq=R.forwardRef((e,r)=>{const{value:s,onValueChange:o,...d}=e,p=tl(o);return u.jsx(wxe,{scope:e.__scopeMenu,value:s,onValueChange:p,children:u.jsx(d$,{...d,ref:r})})});Pq.displayName=Dq;var Mq="MenuRadioItem",Iq=R.forwardRef((e,r)=>{const{value:s,...o}=e,d=Sxe(Mq,e.__scopeMenu),p=s===d.value;return u.jsx(Lq,{scope:e.__scopeMenu,checked:p,children:u.jsx(WC,{role:"menuitemradio","aria-checked":p,...o,ref:r,"data-state":p$(p),onSelect:$t(o.onSelect,()=>d.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});Iq.displayName=Mq;var h$="MenuItemIndicator",[Lq,Exe]=Mp(h$,{checked:!1}),zq=R.forwardRef((e,r)=>{const{__scopeMenu:s,forceMount:o,...d}=e,p=Exe(h$,s);return u.jsx(lo,{present:o||hC(p.checked)||p.checked===!0,children:u.jsx(Cn.span,{...d,ref:r,"data-state":p$(p.checked)})})});zq.displayName=h$;var jxe="MenuSeparator",Fq=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return u.jsx(Cn.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});Fq.displayName=jxe;var Cxe="MenuArrow",qq=R.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,d=ZC(s);return u.jsx(EC,{...d,...o,ref:r})});qq.displayName=Cxe;var Axe="MenuSub",[E0e,Bq]=Mp(Axe),Ab="MenuSubTrigger",Uq=R.forwardRef((e,r)=>{const s=Ip(Ab,e.__scopeMenu),o=yw(Ab,e.__scopeMenu),d=Bq(Ab,e.__scopeMenu),p=c$(Ab,e.__scopeMenu),m=R.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=p,S={__scopeMenu:e.__scopeMenu},j=R.useCallback(()=>{m.current&&window.clearTimeout(m.current),m.current=null},[]);return R.useEffect(()=>j,[j]),R.useEffect(()=>{const A=g.current;return()=>{window.clearTimeout(A),b(null)}},[g,b]),u.jsx(o$,{asChild:!0,...S,children:u.jsx($q,{id:d.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":d.contentId,"data-state":Hq(s.open),...e,ref:Li(r,d.onTriggerChange),onClick:A=>{e.onClick?.(A),!(e.disabled||A.defaultPrevented)&&(A.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:$t(e.onPointerMove,Wb(A=>{p.onItemEnter(A),!A.defaultPrevented&&!e.disabled&&!s.open&&!m.current&&(p.onPointerGraceIntentChange(null),m.current=window.setTimeout(()=>{s.onOpenChange(!0),j()},100))})),onPointerLeave:$t(e.onPointerLeave,Wb(A=>{j();const k=s.content?.getBoundingClientRect();if(k){const T=s.content?.dataset.side,M=T==="right",I=M?-5:5,q=k[M?"left":"right"],G=k[M?"right":"left"];p.onPointerGraceIntentChange({area:[{x:A.clientX+I,y:A.clientY},{x:q,y:k.top},{x:G,y:k.top},{x:G,y:k.bottom},{x:q,y:k.bottom}],side:T}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>p.onPointerGraceIntentChange(null),300)}else{if(p.onTriggerLeave(A),A.defaultPrevented)return;p.onPointerGraceIntentChange(null)}})),onKeyDown:$t(e.onKeyDown,A=>{const k=p.searchRef.current!=="";e.disabled||k&&A.key===" "||axe[o.dir].includes(A.key)&&(s.onOpenChange(!0),s.content?.focus(),A.preventDefault())})})})});Uq.displayName=Ab;var Kq="MenuSubContent",Vq=R.forwardRef((e,r)=>{const s=kq(io,e.__scopeMenu),{forceMount:o=s.forceMount,...d}=e,p=Ip(io,e.__scopeMenu),m=yw(io,e.__scopeMenu),g=Bq(Kq,e.__scopeMenu),b=R.useRef(null),S=zn(r,b);return u.jsx(Zb.Provider,{scope:e.__scopeMenu,children:u.jsx(lo,{present:o||p.open,children:u.jsx(Zb.Slot,{scope:e.__scopeMenu,children:u.jsx(u$,{id:g.contentId,"aria-labelledby":g.triggerId,...d,ref:S,align:"start",side:m.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:j=>{m.isUsingKeyboardRef.current&&b.current?.focus(),j.preventDefault()},onCloseAutoFocus:j=>j.preventDefault(),onFocusOutside:$t(e.onFocusOutside,j=>{j.target!==g.trigger&&p.onOpenChange(!1)}),onEscapeKeyDown:$t(e.onEscapeKeyDown,j=>{m.onClose(),j.preventDefault()}),onKeyDown:$t(e.onKeyDown,j=>{const A=j.currentTarget.contains(j.target),k=oxe[m.dir].includes(j.key);A&&k&&(p.onOpenChange(!1),g.trigger?.focus(),j.preventDefault())})})})})})});Vq.displayName=Kq;function Hq(e){return e?"open":"closed"}function hC(e){return e==="indeterminate"}function p$(e){return hC(e)?"indeterminate":e?"checked":"unchecked"}function Oxe(e){const r=document.activeElement;for(const s of e)if(s===r||(s.focus(),document.activeElement!==r))return}function kxe(e,r){return e.map((s,o)=>e[(r+o)%e.length])}function Rxe(e,r,s){const d=r.length>1&&Array.from(r).every(S=>S===r[0])?r[0]:r,p=s?e.indexOf(s):-1;let m=kxe(e,Math.max(p,0));d.length===1&&(m=m.filter(S=>S!==s));const b=m.find(S=>S.toLowerCase().startsWith(d.toLowerCase()));return b!==s?b:void 0}function Txe(e,r){const{x:s,y:o}=e;let d=!1;for(let p=0,m=r.length-1;p<r.length;m=p++){const g=r[p],b=r[m],S=g.x,j=g.y,A=b.x,k=b.y;j>o!=k>o&&s<(A-S)*(o-j)/(k-j)+S&&(d=!d)}return d}function _xe(e,r){if(!r)return!1;const s={x:e.clientX,y:e.clientY};return Txe(s,r)}function Wb(e){return r=>r.pointerType==="mouse"?e(r):void 0}var $xe=Oq,Nxe=o$,Dxe=Rq,Pxe=Tq,Mxe=d$,Ixe=_q,Lxe=WC,zxe=Nq,Fxe=Pq,qxe=Iq,Bxe=zq,Uxe=Fq,Kxe=qq,Vxe=Uq,Hxe=Vq,JC="DropdownMenu",[Gxe]=al(JC,[Cq]),Ki=Cq(),[Xxe,Gq]=Gxe(JC),Xq=e=>{const{__scopeDropdownMenu:r,children:s,dir:o,open:d,defaultOpen:p,onOpenChange:m,modal:g=!0}=e,b=Ki(r),S=R.useRef(null),[j,A]=qd({prop:d,defaultProp:p??!1,onChange:m,caller:JC});return u.jsx(Xxe,{scope:r,triggerId:Vs(),triggerRef:S,contentId:Vs(),open:j,onOpenChange:A,onOpenToggle:R.useCallback(()=>A(k=>!k),[A]),modal:g,children:u.jsx($xe,{...b,open:j,onOpenChange:A,dir:o,modal:g,children:s})})};Xq.displayName=JC;var Yq="DropdownMenuTrigger",Zq=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...d}=e,p=Gq(Yq,s),m=Ki(s);return u.jsx(Nxe,{asChild:!0,...m,children:u.jsx(Cn.button,{type:"button",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":p.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...d,ref:Li(r,p.triggerRef),onPointerDown:$t(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(p.onOpenToggle(),p.open||g.preventDefault())}),onKeyDown:$t(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&p.onOpenToggle(),g.key==="ArrowDown"&&p.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});Zq.displayName=Yq;var Yxe="DropdownMenuPortal",Wq=e=>{const{__scopeDropdownMenu:r,...s}=e,o=Ki(r);return u.jsx(Dxe,{...o,...s})};Wq.displayName=Yxe;var Jq="DropdownMenuContent",Qq=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Gq(Jq,s),p=Ki(s),m=R.useRef(!1);return u.jsx(Pxe,{id:d.contentId,"aria-labelledby":d.triggerId,...p,...o,ref:r,onCloseAutoFocus:$t(e.onCloseAutoFocus,g=>{m.current||d.triggerRef.current?.focus(),m.current=!1,g.preventDefault()}),onInteractOutside:$t(e.onInteractOutside,g=>{const b=g.detail.originalEvent,S=b.button===0&&b.ctrlKey===!0,j=b.button===2||S;(!d.modal||j)&&(m.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qq.displayName=Jq;var Zxe="DropdownMenuGroup",Wxe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Mxe,{...d,...o,ref:r})});Wxe.displayName=Zxe;var Jxe="DropdownMenuLabel",Qxe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Ixe,{...d,...o,ref:r})});Qxe.displayName=Jxe;var ebe="DropdownMenuItem",eB=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Lxe,{...d,...o,ref:r})});eB.displayName=ebe;var tbe="DropdownMenuCheckboxItem",nbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(zxe,{...d,...o,ref:r})});nbe.displayName=tbe;var rbe="DropdownMenuRadioGroup",sbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Fxe,{...d,...o,ref:r})});sbe.displayName=rbe;var ibe="DropdownMenuRadioItem",abe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(qxe,{...d,...o,ref:r})});abe.displayName=ibe;var obe="DropdownMenuItemIndicator",lbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Bxe,{...d,...o,ref:r})});lbe.displayName=obe;var cbe="DropdownMenuSeparator",ube=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Uxe,{...d,...o,ref:r})});ube.displayName=cbe;var dbe="DropdownMenuArrow",hbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Kxe,{...d,...o,ref:r})});hbe.displayName=dbe;var pbe="DropdownMenuSubTrigger",fbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Vxe,{...d,...o,ref:r})});fbe.displayName=pbe;var mbe="DropdownMenuSubContent",gbe=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,d=Ki(s);return u.jsx(Hxe,{...d,...o,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gbe.displayName=mbe;var ybe=Xq,vbe=Zq,xbe=Wq,bbe=Qq,wbe=eB;function f$({...e}){return u.jsx(ybe,{"data-slot":"dropdown-menu",...e})}function m$({...e}){return u.jsx(vbe,{"data-slot":"dropdown-menu-trigger",...e})}function g$({className:e,sideOffset:r=4,...s}){return u.jsx(xbe,{children:u.jsx(bbe,{"data-slot":"dropdown-menu-content",sideOffset:r,className:ft("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...s})})}function jp({className:e,inset:r,variant:s="default",...o}){return u.jsx(wbe,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":s,className:ft("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}var QC="Switch",[Sbe]=al(QC),[Ebe,jbe]=Sbe(QC),tB=R.forwardRef((e,r)=>{const{__scopeSwitch:s,name:o,checked:d,defaultChecked:p,required:m,disabled:g,value:b="on",onCheckedChange:S,form:j,...A}=e,[k,T]=R.useState(null),M=zn(r,X=>T(X)),I=R.useRef(!1),q=k?j||!!k.closest("form"):!0,[G,K]=qd({prop:d,defaultProp:p??!1,onChange:S,caller:QC});return u.jsxs(Ebe,{scope:s,checked:G,disabled:g,children:[u.jsx(Cn.button,{type:"button",role:"switch","aria-checked":G,"aria-required":m,"data-state":iB(G),"data-disabled":g?"":void 0,disabled:g,value:b,...A,ref:M,onClick:$t(e.onClick,X=>{K(L=>!L),q&&(I.current=X.isPropagationStopped(),I.current||X.stopPropagation())})}),q&&u.jsx(sB,{control:k,bubbles:!I.current,name:o,value:b,checked:G,required:m,disabled:g,form:j,style:{transform:"translateX(-100%)"}})]})});tB.displayName=QC;var nB="SwitchThumb",rB=R.forwardRef((e,r)=>{const{__scopeSwitch:s,...o}=e,d=jbe(nB,s);return u.jsx(Cn.span,{"data-state":iB(d.checked),"data-disabled":d.disabled?"":void 0,...o,ref:r})});rB.displayName=nB;var Cbe="SwitchBubbleInput",sB=R.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:o=!0,...d},p)=>{const m=R.useRef(null),g=zn(m,p),b=_6(s),S=VL(r);return R.useEffect(()=>{const j=m.current;if(!j)return;const A=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(A,"checked").set;if(b!==s&&T){const M=new Event("click",{bubbles:o});T.call(j,s),j.dispatchEvent(M)}},[b,s,o]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:g,style:{...d.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});sB.displayName=Cbe;function iB(e){return e?"checked":"unchecked"}var Abe=tB,Obe=rB;function R3({className:e,...r}){return u.jsx(Abe,{"data-slot":"switch",className:ft("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:u.jsx(Obe,{"data-slot":"switch-thumb",className:ft("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const pC=["route53","s3","ec2","iam","rds","dynamodb"],Sj=Xs({credential_provider:Da(["aws","cloudflare","hetzner","digitalocean","generic"]),kind:Da(["aws_access_key","api_token","basic_auth","oauth2"]),schema_version:Xb().default(1),name:Nn().min(1,"Name is required").max(100),scope_kind:Da(["provider","service","resource"]),scope_version:Xb().default(1),scope:w3(),account_id:Nn().optional().or(Yb("")).transform(e=>e||void 0),region:Nn().optional().or(Yb("")).transform(e=>e||void 0),secret:w3()}).superRefine((e,r)=>{if(e.credential_provider==="aws"){if(e.scope_kind==="service"){const s=e.scope?.service;pC.includes(s)||r.addIssue({code:Dd.custom,path:["scope"],message:`For AWS service scope, "service" must be one of: ${pC.join(", ")}`})}if(e.scope_kind==="resource"){const s=e.scope?.arn;(typeof s!="string"||!s.startsWith("arn:"))&&r.addIssue({code:Dd.custom,path:["scope"],message:'For AWS resource scope, "arn" must start with "arn:"'})}if(e.kind==="aws_access_key"){const s=e.secret??{},o=s.access_key_id;(typeof o!="string"||!/^[A-Z0-9]{20}$/.test(o))&&r.addIssue({code:Dd.custom,path:["secret"],message:"access_key_id must be 20 chars (A-Z0-9)"}),(typeof s.secret_access_key!="string"||s.secret_access_key.length<10)&&r.addIssue({code:Dd.custom,path:["secret"],message:"secret_access_key is required"})}}if(e.kind==="api_token"&&((e.secret??{}).token||r.addIssue({code:Dd.custom,path:["secret"],message:"token is required"})),e.kind==="basic_auth"){const s=e.secret??{};(!s.username||!s.password)&&r.addIssue({code:Dd.custom,path:["secret"],message:"username and password are required"})}if(e.kind==="oauth2"){const s=e.secret??{};(!s.client_id||!s.client_secret||!s.refresh_token)&&r.addIssue({code:Dd.custom,path:["secret"],message:"client_id, client_secret, and refresh_token are required"})}e.scope_kind!=="provider"&&!e.scope&&r.addIssue({code:Dd.custom,path:["scope"],message:"scope is required"})}),gT=Sj.partial().extend({name:Nn().min(1,"Name is required").max(100).optional()});function Ql(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return""}}function cj(e){const r=e?.body??e?.response??e?.message;if(typeof r=="string")return r;try{const s=e?.response?.data?.message||e?.message;if(s)return String(s)}catch{return"Unknown error"}return"Unknown error"}function kbe({credential_provider:e,scope_kind:r}){return e==="aws"&&r==="service"}function Rbe({credential_provider:e,scope_kind:r}){return e==="aws"&&r==="resource"}function Tbe({scope_kind:e}){return e==="provider"}function T3(){return{credential_provider:"aws",kind:"aws_access_key",schema_version:1,name:"",scope_kind:"provider",scope_version:1,scope:{},account_id:"",region:"",secret:{}}}function _3(e){return{credential_provider:e.credential_provider,kind:e.kind,schema_version:e.schema_version??1,name:e.name,scope_kind:e.scope_kind,scope_version:e.scope_version??1,scope:e.scope??{},account_id:e.account_id,region:e.region,secret:e.secret??{}}}function $3(e){const r={},s=["name","account_id","region","scope_kind","scope_version","scope","secret","credential_provider","kind","schema_version"];for(const o of s)typeof e[o]<"u"&&e[o]!==""&&(r[o]=e[o]);return r}const _be=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(null),[j,A]=R.useState(null),[k,T]=R.useState(!1),[M,I]=R.useState(!1),[q,G]=R.useState(!1),[K,X]=R.useState(null),[L,ee]=R.useState(!1),[oe,Q]=R.useState(null),ne=Hs(),de=rr({queryKey:["credentials"],queryFn:()=>Qm.listCredentials()}),je=nn({mutationFn:ie=>Qm.createCredential(_3(ie)),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential created"),o(!1),Ce.reset(T3()),T(!1)},onError:ie=>{Ze.error("Failed to create credential",{description:cj(ie)})}}),ve=nn({mutationFn:ie=>Qm.updateCredential(ie.id,$3(ie.body)),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential updated"),p(!1),A(null),I(!1)},onError:ie=>{Ze.error("Failed to update credential",{description:cj(ie)})}}),le=nn({mutationFn:ie=>Qm.deleteCredential(ie),onSuccess:async()=>{await ne.invalidateQueries({queryKey:["credentials"]}),Ze.success("Credential deleted")},onError:ie=>{Ze.error("Failed to delete credential",{description:cj(ie)})}}),be=nn({mutationFn:ie=>Qm.revealCredential(ie),onSuccess:ie=>{S(ie),g(!0)},onError:ie=>{Ze.error("Failed to reveal secret",{description:cj(ie)})}}),Ce=mr({resolver:gr(Sj),defaultValues:T3(),mode:"onBlur"}),Ke=mr({resolver:gr(gT),defaultValues:{},mode:"onBlur"});function ce(ie){A(ie.id),Ke.reset({provider:ie.provider,kind:ie.kind,schema_version:ie.schema_version??1,name:ie.name,scope_kind:ie.scope_kind,scope_version:ie.scope_version??1,account_id:ie.account_id??"",region:ie.region??"",scope:ie.scope??(ie.scope_kind==="provider"?{}:void 0),secret:void 0}),I(!1),p(!0)}const re=R.useMemo(()=>{const ie=de.data??[];if(!e.trim())return ie;const De=e.toLowerCase();return ie.filter(Le=>[Le.name,Le.provider,Le.kind,Le.scope_kind,Le.account_id,Le.region,JSON.stringify(Le.scope??{})].filter(Boolean).map(tt=>String(tt).toLowerCase()).some(tt=>tt.includes(De)))},[de.data,e]);if(de.isLoading)return u.jsxs("div",{className:"flex items-center gap-2 p-6",children:[u.jsx(Ds,{className:"h-4 w-4 animate-spin"})," Loading credentials…"]});if(de.error)return u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading credentials.",u.jsx("pre",{className:"mt-2 text-xs opacity-80",children:JSON.stringify(de.error,null,2)})]});const ue=Ce.watch("credential_provider"),_e=Ce.watch("kind"),fe=Ce.watch("scope_kind"),He=ie=>Ce.setValue("scope",ie,{shouldDirty:!0,shouldValidate:!0}),Oe=ie=>Ce.setValue("secret",ie,{shouldDirty:!0,shouldValidate:!0});function ke(){if(!k){if(ue==="aws"&&_e==="aws_access_key"){const ie=Ce.getValues("secret")??{};Oe({access_key_id:ie.access_key_id??"",secret_access_key:ie.secret_access_key??""})}else if(_e==="api_token"){const ie=Ce.getValues("secret")??{};Oe({token:ie.token??""})}else if(_e==="basic_auth"){const ie=Ce.getValues("secret")??{};Oe({username:ie.username??"",password:ie.password??""})}else if(_e==="oauth2"){const ie=Ce.getValues("secret")??{};Oe({client_id:ie.client_id??"",client_secret:ie.client_secret??"",refresh_token:ie.refresh_token??""})}}}function Ve(ie){Ce.setValue("scope_kind",ie),ie==="provider"&&He({}),ie==="service"&&He({service:"route53"}),ie==="resource"&&He({arn:""})}return u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"mb-1 text-2xl font-bold",children:"Credentials"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Store provider credentials. Secrets are encrypted server-side; revealing is a one-time read."})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:ie=>r(ie.target.value),placeholder:"Search by name, provider, kind, scope…",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Credential"]})}),u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Credential"})}),u.jsx(yr,{...Ce,children:u.jsxs("form",{onSubmit:Ce.handleSubmit(ie=>{const De=Sj.safeParse(ie);if(!De.success){Ze.error("Please fix validation errors");return}je.mutate(De.data)}),className:"space-y-5 pt-2",children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:Ce.control,name:"credential_provider",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Provider"}),u.jsxs(Rn,{onValueChange:De=>{ie.onChange(De),ke()},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws",children:"AWS"}),u.jsx(jt,{value:"cloudflare",children:"Cloudflare"}),u.jsx(jt,{value:"hetzner",children:"Hetzner"}),u.jsx(jt,{value:"digitalocean",children:"DigitalOcean"}),u.jsx(jt,{value:"generic",children:"Generic"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ce.control,name:"kind",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Kind"}),u.jsxs(Rn,{onValueChange:De=>{ie.onChange(De),ke()},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws_access_key",children:"AWS Access Key"}),u.jsx(jt,{value:"api_token",children:"API Token"}),u.jsx(jt,{value:"basic_auth",children:"Basic Auth"}),u.jsx(jt,{value:"oauth2",children:"OAuth2"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ce.control,name:"scope_kind",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Scope Kind"}),u.jsxs(Rn,{onValueChange:De=>{Ve(De)},defaultValue:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"provider",children:"Provider"}),u.jsx(jt,{value:"service",children:"Service"}),u.jsx(jt,{value:"resource",children:"Resource"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ce.control,name:"name",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(gt,{...ie,placeholder:"My AWS Key"}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ce.control,name:"account_id",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Account ID (optional)"}),u.jsx(gt,{...ie,placeholder:"e.g. 123456789012"}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ce.control,name:"region",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Region (optional)"}),u.jsx(gt,{...ie,placeholder:"e.g. us-east-1"}),u.jsx(dt,{})]})})]}),!Tbe({scope_kind:fe})&&u.jsx(u.Fragment,{children:kbe({credential_provider:ue,scope_kind:fe})?u.jsxs(ot,{children:[u.jsx(lt,{children:"Service"}),u.jsx(Go,{control:Ce.control,name:"scope",render:({field:ie})=>u.jsxs(Rn,{onValueChange:De=>ie.onChange({service:De}),value:ie.value?.service??"route53",children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select an AWS service"})})}),u.jsx($n,{children:pC.map(De=>u.jsx(jt,{value:De,children:De.toUpperCase()},De))})]})}),u.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Must be one of: ",pC.join(", "),"."]})]}):Rbe({credential_provider:ue,scope_kind:fe})?u.jsxs(ot,{children:[u.jsx(lt,{children:"Resource ARN"}),u.jsx(Go,{control:Ce.control,name:"scope",render:({field:ie})=>u.jsx(gt,{value:ie.value?.arn??"",onChange:De=>ie.onChange({arn:De.target.value}),placeholder:"arn:aws:service:region:account:resource"})}),u.jsx(dt,{})]}):u.jsx(pt,{control:Ce.control,name:"scope",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Scope (JSON)"}),u.jsx(hu,{value:Ql(ie.value??{}),onChange:De=>{try{const Le=JSON.parse(De.target.value);ie.onChange(Le)}catch{ie.onChange(De.target.value)}},rows:3,placeholder:'{"service":"route53"} or {"arn":"arn:aws:..."}',className:"font-mono"}),u.jsx(dt,{})]})})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(R3,{checked:k,onCheckedChange:ie=>{T(ie),ke()},id:"raw-secret-toggle"}),u.jsx("label",{htmlFor:"raw-secret-toggle",className:"text-sm",children:"Edit secret as raw JSON"})]}),k?u.jsx(pt,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Secret (JSON)"}),u.jsx(hu,{value:Ql(ie.value??{}),onChange:De=>{try{ie.onChange(JSON.parse(De.target.value))}catch{ie.onChange(De.target.value)}},rows:6,placeholder:_e==="aws_access_key"?'{"access_key_id":"...","secret_access_key":"..."}':_e==="api_token"?'{"token":"..."}':_e==="basic_auth"?'{"username":"...","password":"..."}':'{"client_id":"...","client_secret":"...","refresh_token":"..."}',className:"font-mono"}),u.jsx(dt,{})]})}):u.jsxs(u.Fragment,{children:[ue==="aws"&&_e==="aws_access_key"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsxs(ot,{children:[u.jsx(lt,{children:"Access Key ID"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{value:(ie.value??{}).access_key_id??"",onChange:De=>Oe({...ie.value??{},access_key_id:De.target.value.trim()}),placeholder:"AKIA..."})})]}),u.jsxs(ot,{children:[u.jsx(lt,{children:"Secret Access Key"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{type:"password",value:(ie.value??{}).secret_access_key??"",onChange:De=>Oe({...ie.value??{},secret_access_key:De.target.value}),placeholder:"•••••••••••••••"})})]})]}),_e==="api_token"&&u.jsxs(ot,{children:[u.jsx(lt,{children:"API Token"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{value:(ie.value??{}).token??"",onChange:De=>Oe({...ie.value??{},token:De.target.value}),placeholder:"token..."})})]}),_e==="basic_auth"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsxs(ot,{children:[u.jsx(lt,{children:"Username"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{value:(ie.value??{}).username??"",onChange:De=>Oe({...ie.value??{},username:De.target.value})})})]}),u.jsxs(ot,{children:[u.jsx(lt,{children:"Password"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{type:"password",value:(ie.value??{}).password??"",onChange:De=>Oe({...ie.value??{},password:De.target.value})})})]})]}),_e==="oauth2"&&u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsxs(ot,{children:[u.jsx(lt,{children:"Client ID"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{value:(ie.value??{}).client_id??"",onChange:De=>Oe({...ie.value??{},client_id:De.target.value})})})]}),u.jsxs(ot,{children:[u.jsx(lt,{children:"Client Secret"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{type:"password",value:(ie.value??{}).client_secret??"",onChange:De=>Oe({...ie.value??{},client_secret:De.target.value})})})]}),u.jsxs(ot,{children:[u.jsx(lt,{children:"Refresh Token"}),u.jsx(Go,{control:Ce.control,name:"secret",render:({field:ie})=>u.jsx(gt,{value:(ie.value??{}).refresh_token??"",onChange:De=>Oe({...ie.value??{},refresh_token:De.target.value})})})]})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"secondary",onClick:()=>{const ie=Sj.safeParse(Ce.getValues());if(!ie.success){Ze.error("Fix validation errors before previewing");return}const De=_3(ie.data);X(De),G(!0)},children:"Preview request"}),u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>o(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:je.isPending,children:[je.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsx("div",{className:"overflow-x-auto rounded-xl border",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"w-[26%] px-4 py-2 text-left",children:"Name"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Provider"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Kind"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Scope"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Account"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Region"}),u.jsx("th",{className:"px-4 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[re.map(ie=>u.jsxs("tr",{className:"border-t",children:[u.jsxs("td",{className:"px-4 py-2",children:[u.jsx("div",{className:"font-medium",children:ie.name}),u.jsxs("div",{className:"text-muted-foreground text-xs",children:[u.jsx("span",{className:"mr-1",children:"id:"}),u.jsxs("code",{className:"bg-muted rounded px-1",children:[ie.id.slice(0,8),"…"]})]})]}),u.jsx("td",{className:"px-4 py-2",children:ie.credential_provider}),u.jsx("td",{className:"px-4 py-2",children:ie.kind}),u.jsx("td",{className:"px-4 py-2",children:u.jsx(ns,{variant:"secondary",children:ie.scope_kind})}),u.jsx("td",{className:"px-4 py-2",children:ie.account_id??"—"}),u.jsx("td",{className:"px-4 py-2",children:ie.region??"—"}),u.jsx("td",{className:"px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",title:"Reveal secret (one-time read)",onClick:()=>be.mutate(ie.id),children:u.jsx(kT,{className:"h-4 w-4"})}),u.jsx(Fe,{size:"icon",variant:"ghost",title:"Edit",onClick:()=>ce(ie),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(nC,{children:[u.jsx(rC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",title:"Delete",children:u.jsx(Ib,{className:"h-4 w-4"})})}),u.jsxs(sC,{children:[u.jsxs(iC,{children:[u.jsxs(oC,{children:["Delete “",ie.name,"”?"]}),u.jsx(lC,{children:"This will permanently remove the credential metadata. Secrets are not recoverable."})]}),u.jsxs(aC,{children:[u.jsx(uC,{disabled:le.isPending,children:"Cancel"}),u.jsxs(cC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>le.mutate(ie.id),disabled:le.isPending,children:[le.isPending&&u.jsx(Ds,{className:"mr-2 inline h-4 w-4 animate-spin"}),"Delete"]})]})]})]}),u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsx(jp,{onClick:()=>ce(ie),children:"Edit"}),u.jsx(jp,{onClick:()=>be.mutate(ie.id),children:"Reveal secret"}),u.jsx(jp,{className:"text-destructive",onClick:()=>le.mutate(ie.id),children:"Delete"})]})]})]})})]},ie.id)),re.length===0&&u.jsx("tr",{children:u.jsx("td",{colSpan:7,className:"px-4 py-12 text-center",children:u.jsxs("div",{className:"mx-auto max-w-md",children:[u.jsx("div",{className:"mb-2 flex items-center justify-center",children:u.jsx(kj,{className:"text-muted-foreground h-5 w-5"})}),u.jsx("p",{className:"text-muted-foreground",children:"No credentials match your search."})]})})})]})]})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Credential"})}),u.jsx(yr,{...Ke,children:u.jsxs("form",{onSubmit:Ke.handleSubmit(ie=>{if(!j)return;const De=gT.safeParse(ie);if(!De.success){Ze.error("Please fix validation errors");return}ve.mutate({id:j,body:De.data})}),className:"space-y-5 pt-2",children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:Ke.control,name:"credential_provider",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Provider"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws",children:"AWS"}),u.jsx(jt,{value:"cloudflare",children:"Cloudflare"}),u.jsx(jt,{value:"hetzner",children:"Hetzner"}),u.jsx(jt,{value:"digitalocean",children:"DigitalOcean"}),u.jsx(jt,{value:"generic",children:"Generic"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ke.control,name:"kind",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Kind"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"aws_access_key",children:"AWS Access Key"}),u.jsx(jt,{value:"api_token",children:"API Token"}),u.jsx(jt,{value:"basic_auth",children:"Basic Auth"}),u.jsx(jt,{value:"oauth2",children:"OAuth2"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ke.control,name:"scope_kind",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Scope Kind"}),u.jsxs(Rn,{onValueChange:ie.onChange,value:ie.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"provider",children:"Provider"}),u.jsx(jt,{value:"service",children:"Service"}),u.jsx(jt,{value:"resource",children:"Resource"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ke.control,name:"name",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(gt,{...ie}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ke.control,name:"account_id",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Account ID"}),u.jsx(gt,{...ie,placeholder:"optional"}),u.jsx(dt,{})]})}),u.jsx(pt,{control:Ke.control,name:"region",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Region"}),u.jsx(gt,{...ie,placeholder:"optional"}),u.jsx(dt,{})]})})]}),u.jsx(pt,{control:Ke.control,name:"scope",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Scope (JSON)"}),u.jsx(hu,{value:Ql(ie.value??(Ke.getValues("scope_kind")==="provider"?{}:void 0)),onChange:De=>{try{ie.onChange(JSON.parse(De.target.value))}catch{ie.onChange(De.target.value)}},rows:3,className:"font-mono"}),u.jsx(dt,{})]})}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(R3,{checked:M,onCheckedChange:I,id:"raw-edit-secret-toggle"}),u.jsx("label",{htmlFor:"raw-edit-secret-toggle",className:"text-sm",children:"Rotate secret with raw JSON (leave empty to keep existing)"})]}),M&&u.jsx(pt,{control:Ke.control,name:"secret",render:({field:ie})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Rotate Secret (JSON)"}),u.jsx(hu,{value:typeof ie.value=="string"?ie.value:Ql(ie.value??{}),onChange:De=>{try{ie.onChange(JSON.parse(De.target.value))}catch{ie.onChange(De.target.value)}},rows:6,className:"font-mono",placeholder:'{"access_key_id":"...","secret_access_key":"..."}'}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"secondary",onClick:()=>{const ie=gT.safeParse(Ke.getValues());if(!ie.success){Ze.error("Fix validation errors before previewing");return}const De=$3(ie.data);Q(De),ee(!0)},children:"Preview request"}),u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>p(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:ve.isPending,children:[ve.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save changes"]})]})]})})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsxs(yn,{className:"flex items-center gap-2",children:[u.jsx(kT,{className:"h-4 w-4"})," Decrypted Secret"]})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(b??{})})}),u.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-xs",children:[u.jsx(kj,{className:"h-3.5 w-3.5"}),"One-time read. Close this dialog to hide the secret."]}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(b??{})),Ze.success("Copied to clipboard")},children:"Copy"}),u.jsx(Fe,{onClick:()=>g(!1),children:"Close"})]})]})}),u.jsx(fn,{open:q,onOpenChange:G,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Preview: POST /api/v1/credentials"})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(K??{})})}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(K??{})),Ze.success("Copied body")},children:"Copy body"}),u.jsx(Fe,{onClick:()=>G(!1),children:"Close"})]})]})}),u.jsx(fn,{open:L,onOpenChange:ee,children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Preview: PATCH /api/v1/credentials/:id"})}),u.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:u.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:Ql(oe??{})})}),u.jsxs(Sn,{children:[u.jsx(Fe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(Ql(oe??{})),Ze.success("Copied body")},children:"Copy body"}),u.jsx(Fe,{onClick:()=>ee(!1),children:"Close"})]})]})})]})};function ha({className:e,...r}){return u.jsx("div",{"data-slot":"card",className:ft("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})}function sl({className:e,...r}){return u.jsx("div",{"data-slot":"card-header",className:ft("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})}function il({className:e,...r}){return u.jsx("div",{"data-slot":"card-title",className:ft("leading-none font-semibold",e),...r})}function C_({className:e,...r}){return u.jsx("div",{"data-slot":"card-description",className:ft("text-muted-foreground text-sm",e),...r})}function ao({className:e,...r}){return u.jsx("div",{"data-slot":"card-content",className:ft("px-6",e),...r})}const $be=e=>{switch(e){case"ready":return u.jsx(L_,{className:"h-4 w-4 text-emerald-600"});case"provisioning":return u.jsx(Ds,{className:"h-4 w-4 animate-spin text-blue-600"});case"failed":return u.jsx(kj,{className:"h-4 w-4 text-red-600"});default:return u.jsx(_Z,{className:"text-muted-foreground h-4 w-4"})}},yT=({s:e})=>u.jsxs(ns,{variant:e==="failed"?"destructive":e==="ready"?"default":"secondary",className:"gap-1",title:e,children:[$be(e),u.jsx("span",{className:"capitalize",children:e??"pending"})]}),A_=e=>e.split(",").map(r=>r.trim()).filter(Boolean),Nbe=e=>e&&e.length?e.join(","):"",O_=["A","AAAA","CNAME","TXT","MX","NS","SRV","CAA"],Dbe=e=>e.credential_provider==="aws"&&e.scope_kind==="service"&&(()=>{const r=e.scope;try{return(typeof r=="string"?JSON.parse(r):r||{})?.service==="route53"}catch{return!1}})(),N3=e=>[e.name||"Unnamed",e.account_id,e.region].filter(Boolean).join(" · "),aB=Xs({domain_name:Nn().min(1,"Domain is required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),credential_id:Nn().uuid("Pick a credential"),zone_id:Nn().optional().or(Yb("")).transform(e=>e?e.trim():void 0)}),Pbe=aB.partial(),Mbe=j6([Xb(),Nn().regex(/^\d+$/).transform(e=>Number(e))]).optional().refine(e=>e===void 0||e>=1&&e<=86400,{message:"TTL must be between 1 and 86400"}),oB=Xs({name:Nn().min(1,"Name required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),type:Da(O_),ttl:Mbe,valuesCsv:Nn().optional()}).superRefine((e,r)=>{const s=A_(e.valuesCsv??"");s.length===0&&r.addIssue({code:"custom",message:"At least one value is required"}),e.type==="CNAME"&&s.length!==1&&r.addIssue({code:"custom",message:"CNAME requires exactly one value"})}),Ibe=oB.partial(),Lbe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(null),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(!1),[j,A]=R.useState(!1),[k,T]=R.useState(null),M=Hs(),I=rr({queryKey:["dns","domains"],queryFn:()=>tc.listDomains()}),q=rr({queryKey:["dns","records",s?.id],queryFn:async()=>s?await tc.listRecordSetsByDomain(s.id):[],enabled:!!s?.id}),G=rr({queryKey:["credentials","r53"],queryFn:()=>Qm.listCredentials()}),K=R.useMemo(()=>(G.data??[]).filter(Dbe),[G.data]);R.useEffect(()=>{(()=>{!s&&I.data&&I.data.length&&o(I.data[0])})()},[I.data,s]);const X=R.useMemo(()=>{const re=I.data??[];if(!e.trim())return re;const ue=e.toLowerCase();return re.filter(_e=>[_e.domain_name,_e.zone_id,_e.status,_e.domain_name].filter(Boolean).map(fe=>String(fe).toLowerCase()).some(fe=>fe.includes(ue)))},[I.data,e]),L=mr({resolver:gr(aB),defaultValues:{domain_name:"",credential_id:"",zone_id:""}}),ee=nn({mutationFn:re=>tc.createDomain(re),onSuccess:async re=>{Ze.success("Domain created"),p(!1),L.reset(),await M.invalidateQueries({queryKey:["dns","domains"]}),o(re)},onError:re=>Ze.error("Failed to create domain",{description:re?.message??"Unknown error"})}),oe=mr({resolver:gr(Pbe)}),Q=re=>{o(re),oe.reset({domain_name:re.domain_name,credential_id:re.credential_id,zone_id:re.zone_id||""}),g(!0)},ne=nn({mutationFn:re=>{if(!s)throw new Error("No domain selected");return tc.updateDomain(s.id,re)},onSuccess:async()=>{Ze.success("Domain updated"),g(!1),await M.invalidateQueries({queryKey:["dns","domains"]}),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to update domain",{description:re?.message??"Unknown error"})}),de=nn({mutationFn:re=>tc.deleteDomain(re),onSuccess:async()=>{Ze.success("Domain deleted"),await M.invalidateQueries({queryKey:["dns","domains"]}),o(null)},onError:re=>Ze.error("Failed to delete domain",{description:re?.message??"Unknown error"})}),je=mr({resolver:gr(oB),defaultValues:{name:"",type:"A",ttl:300,valuesCsv:""}}),ve=re=>{const ue=re?.response?.data?.error||re?.message||"Unknown error";return ue.includes("ownership_conflict")?"Ownership conflict: this (name,type) exists but isn’t owned by autoglue.":ue.includes("already_exists")?"A record with this (name,type) already exists. Use Edit instead.":ue},le=nn({mutationFn:async re=>{if(!s)throw new Error("No domain selected");const ue={name:re.name,type:re.type,...re.ttl?{ttl:re.ttl}:{},values:A_(re.valuesCsv??"")};return tc.createRecordSetsByDomain(s.id,ue)},onSuccess:async()=>{Ze.success("Record set created"),S(!1),je.reset(),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to create record set",{description:ve(re)})}),be=mr({resolver:gr(Ibe)}),Ce=re=>{T(re);const ue=re.values||[];be.reset({name:re.name,type:re.type,ttl:re.ttl?Number(re.ttl):void 0,valuesCsv:Nbe(ue)}),A(!0)},Ke=nn({mutationFn:async re=>{if(!k)throw new Error("No record selected");const ue={};return re.name!==void 0&&(ue.name=re.name),re.type!==void 0&&(ue.type=re.type),re.ttl!==void 0&&re.ttl!==null&&(ue.ttl=re.ttl),re.valuesCsv!==void 0&&(ue.values=A_(re.valuesCsv)),tc.updateRecordSetsByDomain(k.id,ue)},onSuccess:async()=>{Ze.success("Record set updated"),A(!1),T(null),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to update record set",{description:ve(re)})}),ce=nn({mutationFn:re=>tc.deleteRecordSetsByDomain(re),onSuccess:async()=>{Ze.success("Record set deleted"),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:re=>Ze.error("Failed to delete record set",{description:re?.message??"Unknown error"})});return u.jsxs("div",{className:"space-y-5 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"text-2xl font-bold",children:"DNS"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:re=>r(re.target.value),placeholder:"Search domains…",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:d,onOpenChange:p,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>p(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Add Domain"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Add Domain"})}),u.jsx(yr,{...L,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:L.handleSubmit(re=>ee.mutate(re)),children:[u.jsx(pt,{control:L.control,name:"domain_name",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Domain"}),u.jsx(wt,{children:u.jsx(gt,{...re,placeholder:"example.com"})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:L.control,name:"credential_id",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Route53 Credential"}),u.jsxs(Rn,{onValueChange:re.onChange,value:re.value,disabled:G.isLoading||(K?.length??0)===0,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:G.isLoading?"Loading…":(K?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),u.jsx($n,{children:(K??[]).map(ue=>u.jsx(jt,{value:ue.id,children:N3(ue)},ue.id))})]}),G.error&&u.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),u.jsx(dt,{})]})}),u.jsx(pt,{control:L.control,name:"zone_id",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Zone ID (optional)"}),u.jsx(wt,{children:u.jsx(gt,{...re,placeholder:"/hostedzone/Z123…"})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:ee.isPending,children:[ee.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsx("div",{children:u.jsxs(ha,{className:"p-3 md:col-span-5",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[u.jsx("div",{className:"text-sm font-semibold",children:"Domains"}),I.isFetching&&u.jsx(Ds,{className:"h-4 w-4 animate-spin"})]}),u.jsx("div",{className:"max-h-[60vh] overflow-auto rounded-md border",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2 text-left",children:"Domain"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Zone"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[(X??[]).map(re=>u.jsxs("tr",{className:`hover:bg-muted/30 border-t ${s?.id===re.id?"bg-muted/40":""}`,onClick:()=>o(re),children:[u.jsx("td",{className:"cursor-pointer px-3 py-2 font-medium",children:re.domain_name}),u.jsx("td",{className:"px-3 py-2",children:re.zone_id||"—"}),u.jsx("td",{className:"px-3 py-2",children:u.jsx(yT,{s:re.status})}),u.jsx("td",{className:"px-3 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",onClick:()=>Q(re),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(nC,{children:[u.jsx(rC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",onClick:ue=>ue.stopPropagation(),children:u.jsx(Ib,{className:"h-4 w-4"})})}),u.jsxs(sC,{children:[u.jsxs(iC,{children:[u.jsxs(oC,{children:["Delete “",re.domain_name,"”?"]}),u.jsx(lC,{children:"This deletes the domain metadata. External DNS records are not touched."})]}),u.jsxs(aC,{children:[u.jsx(uC,{children:"Cancel"}),u.jsx(cC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>de.mutate(re.id),children:"Delete"})]})]})]})]})})]},re.id)),(!X||X.length===0)&&u.jsx("tr",{children:u.jsx("td",{colSpan:4,className:"text-muted-foreground px-3 py-8 text-center",children:"No domains yet."})})]})]})})]})}),u.jsx("div",{children:u.jsxs(ha,{className:"p-3 md:col-span-7",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[u.jsxs("div",{className:"text-sm font-semibold",children:["Records ",s?`— ${s.domain_name}`:""]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(yT,{s:s?.status}),u.jsxs(fn,{open:b,onOpenChange:S,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{disabled:!s,children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Add Record"]})}),u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Add Record"})}),u.jsx(yr,{...je,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:je.handleSubmit(re=>le.mutate(re)),children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsx(pt,{control:je.control,name:"name",render:({field:re})=>u.jsxs(ot,{className:"md:col-span-1",children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{...re,placeholder:"endpoint (or @)"})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:je.control,name:"type",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Type"}),u.jsxs(Rn,{onValueChange:re.onChange,defaultValue:re.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsx($n,{children:O_.map(ue=>u.jsx(jt,{value:ue,children:ue},ue))})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:je.control,name:"ttl",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"TTL (sec, optional)"}),u.jsx(wt,{children:u.jsx(gt,{type:"number",value:re.value,onChange:ue=>re.onChange(ue.target.value===""?void 0:Number(ue.target.value)),placeholder:"300"})}),u.jsx(dt,{})]})})]}),u.jsx(pt,{control:je.control,name:"valuesCsv",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Values (comma-separated)"}),u.jsx(wt,{children:u.jsx(hu,{...re,rows:3,placeholder:'e.g. 10.0.30.1, 10.0.30.2 or "v=spf1 ~all"',className:"font-mono"})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>S(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:le.isPending,children:[le.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),u.jsxs("div",{className:"overflow-x-auto rounded-md border",children:[q.isLoading&&u.jsxs("div",{className:"flex items-center gap-2 p-4",children:[u.jsx(Ds,{className:"h-4 w-4 animate-spin"})," Loading records…"]}),!q.isLoading&&u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2 text-left",children:"Name"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Type"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"TTL"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Values"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),u.jsx("th",{className:"px-3 py-2 text-left",children:"Owner"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),u.jsxs("tbody",{children:[(q.data??[]).map(re=>{const ue=re.values||[];return u.jsxs("tr",{className:"border-t",children:[u.jsx("td",{className:"px-3 py-2 font-medium",children:re.name||"@"}),u.jsx("td",{className:"px-3 py-2",children:re.type}),u.jsx("td",{className:"px-3 py-2",children:re.ttl??"—"}),u.jsx("td",{className:"px-3 py-2",children:u.jsx("div",{className:"max-w-[420px] truncate",title:(ue||[]).join(", "),children:(ue||[]).join(", ")})}),u.jsx("td",{className:"px-3 py-2",children:u.jsx(yT,{s:re.status})}),u.jsx("td",{className:"px-3 py-2",children:re.owner}),u.jsx("td",{className:"px-3 py-2",children:u.jsxs("div",{className:"flex items-center justify-end gap-2",children:[u.jsx(Fe,{size:"icon",variant:"ghost",onClick:()=>Ce(re),children:u.jsx(pu,{className:"h-4 w-4"})}),u.jsxs(nC,{children:[u.jsx(rC,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",children:u.jsx(Ib,{className:"h-4 w-4"})})}),u.jsxs(sC,{children:[u.jsxs(iC,{children:[u.jsxs(oC,{children:["Delete “",re.name||"@"," ",re.type,"”?"]}),u.jsx(lC,{children:"This removes the record set from your project. Your worker does not delete it from the DNS provider right now."})]}),u.jsxs(aC,{children:[u.jsx(uC,{children:"Cancel"}),u.jsx(cC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>ce.mutate(re.id),children:"Delete"})]})]})]}),u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{variant:"ghost",size:"icon",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsx(jp,{onClick:()=>Ce(re),children:"Edit"}),u.jsx(jp,{className:"text-destructive",onClick:()=>ce.mutate(re.id),children:"Delete"})]})]})]})})]},re.id)}),(!q.data||q.data.length===0)&&u.jsx("tr",{children:u.jsx("td",{colSpan:7,className:"text-muted-foreground px-3 py-8 text-center",children:s?"No records yet — add one.":"Select a domain to view records."})})]})]})]})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Domain"})}),u.jsx(yr,{...oe,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:oe.handleSubmit(re=>ne.mutate(re)),children:[u.jsx(pt,{control:oe.control,name:"domain_name",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Domain"}),u.jsx(wt,{children:u.jsx(gt,{...re,placeholder:"example.com"})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:oe.control,name:"credential_id",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Route53 Credential"}),u.jsxs(Rn,{onValueChange:re.onChange,value:re.value??"",disabled:G.isLoading||(K?.length??0)===0,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:G.isLoading?"Loading…":(K?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),u.jsx($n,{children:(K??[]).map(ue=>u.jsx(jt,{value:ue.id,children:N3(ue)},ue.id))})]}),G.error&&u.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),u.jsx(dt,{})]})}),u.jsx(pt,{control:oe.control,name:"zone_id",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Zone ID"}),u.jsx(wt,{children:u.jsx(gt,{...re,placeholder:"/hostedzone/Z123…"})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>g(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:ne.isPending,children:[ne.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})}),u.jsx(fn,{open:j,onOpenChange:A,children:u.jsxs(mn,{className:"sm:max-w-xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Record"})}),u.jsx(yr,{...be,children:u.jsxs("form",{className:"space-y-4 pt-2",onSubmit:be.handleSubmit(re=>Ke.mutate(re)),children:[u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[u.jsx(pt,{control:be.control,name:"name",render:({field:re})=>u.jsxs(ot,{className:"md:col-span-1",children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{...re})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:be.control,name:"type",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Type"}),u.jsxs(Rn,{onValueChange:re.onChange,defaultValue:re.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{})})}),u.jsx($n,{children:O_.map(ue=>u.jsx(jt,{value:ue,children:ue},ue))})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:be.control,name:"ttl",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"TTL (sec, optional)"}),u.jsx(wt,{children:u.jsx(gt,{type:"number",value:re.value,onChange:ue=>re.onChange(ue.target.value===""?void 0:Number(ue.target.value)),placeholder:"300"})}),u.jsx(dt,{})]})})]}),u.jsx(pt,{control:be.control,name:"valuesCsv",render:({field:re})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Values (comma-separated)"}),u.jsx(wt,{children:u.jsx(hu,{...re,rows:3,className:"font-mono"})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",type:"button",onClick:()=>A(!1),children:"Cancel"}),u.jsxs(Fe,{type:"submit",disabled:Ke.isPending,children:[Ke.isPending&&u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})})]})};var D3={};var P3;function zbe(){return P3||(P3=1,(()=>{var e,r,s={557:(p,m,g)=>{const b=globalThis,S=b.ShadowRoot&&(b.ShadyCSS===void 0||b.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,j=Symbol(),A=new WeakMap;class k{constructor(n,i,l){if(this._$cssResult$=!0,l!==j)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=n,this.t=i}get styleSheet(){let n=this.o;const i=this.t;if(S&&n===void 0){const l=i!==void 0&&i.length===1;l&&(n=A.get(i)),n===void 0&&((this.o=n=new CSSStyleSheet).replaceSync(this.cssText),l&&A.set(i,n))}return n}toString(){return this.cssText}}const T=t=>new k(typeof t=="string"?t:t+"",void 0,j),M=(t,...n)=>{const i=t.length===1?t[0]:n.reduce(((l,h,v)=>l+(x=>{if(x._$cssResult$===!0)return x.cssText;if(typeof x=="number")return x;throw Error("Value passed to 'css' function must be a 'css' function result: "+x+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(h)+t[v+1]),t[0]);return new k(i,t,j)},I=(t,n)=>{if(S)t.adoptedStyleSheets=n.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of n){const l=document.createElement("style"),h=b.litNonce;h!==void 0&&l.setAttribute("nonce",h),l.textContent=i.cssText,t.appendChild(l)}},q=S?t=>t:t=>t instanceof CSSStyleSheet?(n=>{let i="";for(const l of n.cssRules)i+=l.cssText;return T(i)})(t):t,{is:G,defineProperty:K,getOwnPropertyDescriptor:X,getOwnPropertyNames:L,getOwnPropertySymbols:ee,getPrototypeOf:oe}=Object,Q=globalThis,ne=Q.trustedTypes,de=ne?ne.emptyScript:"",je=Q.reactiveElementPolyfillSupport,ve=(t,n)=>t,le={toAttribute(t,n){switch(n){case Boolean:t=t?de:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,n){let i=t;switch(n){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},be=(t,n)=>!G(t,n),Ce={attribute:!0,type:String,converter:le,reflect:!1,hasChanged:be};Symbol.metadata??=Symbol("metadata"),Q.litPropertyMetadata??=new WeakMap;class Ke extends HTMLElement{static addInitializer(n){this._$Ei(),(this.l??=[]).push(n)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(n,i=Ce){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(n,i),!i.noAccessor){const l=Symbol(),h=this.getPropertyDescriptor(n,l,i);h!==void 0&&K(this.prototype,n,h)}}static getPropertyDescriptor(n,i,l){const{get:h,set:v}=X(this.prototype,n)??{get(){return this[i]},set(x){this[i]=x}};return{get(){return h?.call(this)},set(x){const w=h?.call(this);v.call(this,x),this.requestUpdate(n,w,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(n){return this.elementProperties.get(n)??Ce}static _$Ei(){if(this.hasOwnProperty(ve("elementProperties")))return;const n=oe(this);n.finalize(),n.l!==void 0&&(this.l=[...n.l]),this.elementProperties=new Map(n.elementProperties)}static finalize(){if(this.hasOwnProperty(ve("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ve("properties"))){const i=this.properties,l=[...L(i),...ee(i)];for(const h of l)this.createProperty(h,i[h])}const n=this[Symbol.metadata];if(n!==null){const i=litPropertyMetadata.get(n);if(i!==void 0)for(const[l,h]of i)this.elementProperties.set(l,h)}this._$Eh=new Map;for(const[i,l]of this.elementProperties){const h=this._$Eu(i,l);h!==void 0&&this._$Eh.set(h,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(n){const i=[];if(Array.isArray(n)){const l=new Set(n.flat(1/0).reverse());for(const h of l)i.unshift(q(h))}else n!==void 0&&i.push(q(n));return i}static _$Eu(n,i){const l=i.attribute;return l===!1?void 0:typeof l=="string"?l:typeof n=="string"?n.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((n=>this.enableUpdating=n)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((n=>n(this)))}addController(n){(this._$EO??=new Set).add(n),this.renderRoot!==void 0&&this.isConnected&&n.hostConnected?.()}removeController(n){this._$EO?.delete(n)}_$E_(){const n=new Map,i=this.constructor.elementProperties;for(const l of i.keys())this.hasOwnProperty(l)&&(n.set(l,this[l]),delete this[l]);n.size>0&&(this._$Ep=n)}createRenderRoot(){const n=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return I(n,this.constructor.elementStyles),n}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((n=>n.hostConnected?.()))}enableUpdating(n){}disconnectedCallback(){this._$EO?.forEach((n=>n.hostDisconnected?.()))}attributeChangedCallback(n,i,l){this._$AK(n,l)}_$EC(n,i){const l=this.constructor.elementProperties.get(n),h=this.constructor._$Eu(n,l);if(h!==void 0&&l.reflect===!0){const v=(l.converter?.toAttribute!==void 0?l.converter:le).toAttribute(i,l.type);this._$Em=n,v==null?this.removeAttribute(h):this.setAttribute(h,v),this._$Em=null}}_$AK(n,i){const l=this.constructor,h=l._$Eh.get(n);if(h!==void 0&&this._$Em!==h){const v=l.getPropertyOptions(h),x=typeof v.converter=="function"?{fromAttribute:v.converter}:v.converter?.fromAttribute!==void 0?v.converter:le;this._$Em=h,this[h]=x.fromAttribute(i,v.type),this._$Em=null}}requestUpdate(n,i,l){if(n!==void 0){if(l??=this.constructor.getPropertyOptions(n),!(l.hasChanged??be)(this[n],i))return;this.P(n,i,l)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(n,i,l){this._$AL.has(n)||this._$AL.set(n,i),l.reflect===!0&&this._$Em!==n&&(this._$Ej??=new Set).add(n)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const n=this.scheduleUpdate();return n!=null&&await n,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[h,v]of this._$Ep)this[h]=v;this._$Ep=void 0}const l=this.constructor.elementProperties;if(l.size>0)for(const[h,v]of l)v.wrapped!==!0||this._$AL.has(h)||this[h]===void 0||this.P(h,this[h],v)}let n=!1;const i=this._$AL;try{n=this.shouldUpdate(i),n?(this.willUpdate(i),this._$EO?.forEach((l=>l.hostUpdate?.())),this.update(i)):this._$EU()}catch(l){throw n=!1,this._$EU(),l}n&&this._$AE(i)}willUpdate(n){}_$AE(n){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(n)),this.updated(n)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(n){return!0}update(n){this._$Ej&&=this._$Ej.forEach((i=>this._$EC(i,this[i]))),this._$EU()}updated(n){}firstUpdated(n){}}Ke.elementStyles=[],Ke.shadowRootOptions={mode:"open"},Ke[ve("elementProperties")]=new Map,Ke[ve("finalized")]=new Map,je?.({ReactiveElement:Ke}),(Q.reactiveElementVersions??=[]).push("2.0.4");const ce=globalThis,re=ce.trustedTypes,ue=re?re.createPolicy("lit-html",{createHTML:t=>t}):void 0,_e="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,He="?"+fe,Oe=`<${He}>`,ke=document,Ve=()=>ke.createComment(""),ie=t=>t===null||typeof t!="object"&&typeof t!="function",De=Array.isArray,Le=t=>De(t)||typeof t?.[Symbol.iterator]=="function",tt=`[
|
||
\f\r]`,yt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Ft=/>/g,kt=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
|
||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,ze=/"/g,zt=/^(?:script|style|textarea|title)$/i,Rt=t=>(n,...i)=>({_$litType$:t,strings:n,values:i}),V=Rt(1),Dn=Symbol.for("lit-noChange"),cn=Symbol.for("lit-nothing"),xe=new WeakMap,Ne=ke.createTreeWalker(ke,129);function Ge(t,n){if(!De(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ue!==void 0?ue.createHTML(n):n}const D=(t,n)=>{const i=t.length-1,l=[];let h,v=n===2?"<svg>":n===3?"<math>":"",x=yt;for(let w=0;w<i;w++){const C=t[w];let $,N,_=-1,F=0;for(;F<C.length&&(x.lastIndex=F,N=x.exec(C),N!==null);)F=x.lastIndex,x===yt?N[1]==="!--"?x=Ot:N[1]!==void 0?x=Ft:N[2]!==void 0?(zt.test(N[2])&&(h=RegExp("</"+N[2],"g")),x=kt):N[3]!==void 0&&(x=kt):x===kt?N[0]===">"?(x=h??yt,_=-1):N[1]===void 0?_=-2:(_=x.lastIndex-N[2].length,$=N[1],x=N[3]===void 0?kt:N[3]==='"'?ze:Jt):x===ze||x===Jt?x=kt:x===Ot||x===Ft?x=yt:(x=kt,h=void 0);const U=x===kt&&t[w+1].startsWith("/>")?" ":"";v+=x===yt?C+Oe:_>=0?(l.push($),C.slice(0,_)+_e+C.slice(_)+fe+U):C+fe+(_===-2?w:U)}return[Ge(t,v+(t[i]||"<?>")+(n===2?"</svg>":n===3?"</math>":"")),l]};class z{constructor({strings:n,_$litType$:i},l){let h;this.parts=[];let v=0,x=0;const w=n.length-1,C=this.parts,[$,N]=D(n,i);if(this.el=z.createElement($,l),Ne.currentNode=this.el.content,i===2||i===3){const _=this.el.content.firstChild;_.replaceWith(..._.childNodes)}for(;(h=Ne.nextNode())!==null&&C.length<w;){if(h.nodeType===1){if(h.hasAttributes())for(const _ of h.getAttributeNames())if(_.endsWith(_e)){const F=N[x++],U=h.getAttribute(_).split(fe),J=/([.?@])?(.*)/.exec(F);C.push({type:1,index:v,name:J[2],strings:U,ctor:J[1]==="."?st:J[1]==="?"?Kt:J[1]==="@"?Qt:Re}),h.removeAttribute(_)}else _.startsWith(fe)&&(C.push({type:6,index:v}),h.removeAttribute(_));if(zt.test(h.tagName)){const _=h.textContent.split(fe),F=_.length-1;if(F>0){h.textContent=re?re.emptyScript:"";for(let U=0;U<F;U++)h.append(_[U],Ve()),Ne.nextNode(),C.push({type:2,index:++v});h.append(_[F],Ve())}}}else if(h.nodeType===8)if(h.data===He)C.push({type:2,index:v});else{let _=-1;for(;(_=h.data.indexOf(fe,_+1))!==-1;)C.push({type:7,index:v}),_+=fe.length-1}v++}}static createElement(n,i){const l=ke.createElement("template");return l.innerHTML=n,l}}function H(t,n,i=t,l){if(n===Dn)return n;let h=l!==void 0?i.o?.[l]:i.l;const v=ie(n)?void 0:n._$litDirective$;return h?.constructor!==v&&(h?._$AO?.(!1),v===void 0?h=void 0:(h=new v(t),h._$AT(t,i,l)),l!==void 0?(i.o??=[])[l]=h:i.l=h),h!==void 0&&(n=H(t,h._$AS(t,n.values),h,l)),n}class Z{constructor(n,i){this._$AV=[],this._$AN=void 0,this._$AD=n,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(n){const{el:{content:i},parts:l}=this._$AD,h=(n?.creationScope??ke).importNode(i,!0);Ne.currentNode=h;let v=Ne.nextNode(),x=0,w=0,C=l[0];for(;C!==void 0;){if(x===C.index){let $;C.type===2?$=new we(v,v.nextSibling,this,n):C.type===1?$=new C.ctor(v,C.name,C.strings,this,n):C.type===6&&($=new Fn(v,this,n)),this._$AV.push($),C=l[++w]}x!==C?.index&&(v=Ne.nextNode(),x++)}return Ne.currentNode=ke,h}p(n){let i=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(n,l,i),i+=l.strings.length-2):l._$AI(n[i])),i++}}class we{get _$AU(){return this._$AM?._$AU??this.v}constructor(n,i,l,h){this.type=2,this._$AH=cn,this._$AN=void 0,this._$AA=n,this._$AB=i,this._$AM=l,this.options=h,this.v=h?.isConnected??!0}get parentNode(){let n=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&n?.nodeType===11&&(n=i.parentNode),n}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(n,i=this){n=H(this,n,i),ie(n)?n===cn||n==null||n===""?(this._$AH!==cn&&this._$AR(),this._$AH=cn):n!==this._$AH&&n!==Dn&&this._(n):n._$litType$!==void 0?this.$(n):n.nodeType!==void 0?this.T(n):Le(n)?this.k(n):this._(n)}O(n){return this._$AA.parentNode.insertBefore(n,this._$AB)}T(n){this._$AH!==n&&(this._$AR(),this._$AH=this.O(n))}_(n){this._$AH!==cn&&ie(this._$AH)?this._$AA.nextSibling.data=n:this.T(ke.createTextNode(n)),this._$AH=n}$(n){const{values:i,_$litType$:l}=n,h=typeof l=="number"?this._$AC(n):(l.el===void 0&&(l.el=z.createElement(Ge(l.h,l.h[0]),this.options)),l);if(this._$AH?._$AD===h)this._$AH.p(i);else{const v=new Z(h,this),x=v.u(this.options);v.p(i),this.T(x),this._$AH=v}}_$AC(n){let i=xe.get(n.strings);return i===void 0&&xe.set(n.strings,i=new z(n)),i}k(n){De(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let l,h=0;for(const v of n)h===i.length?i.push(l=new we(this.O(Ve()),this.O(Ve()),this,this.options)):l=i[h],l._$AI(v),h++;h<i.length&&(this._$AR(l&&l._$AB.nextSibling,h),i.length=h)}_$AR(n=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);n&&n!==this._$AB;){const l=n.nextSibling;n.remove(),n=l}}setConnected(n){this._$AM===void 0&&(this.v=n,this._$AP?.(n))}}class Re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(n,i,l,h,v){this.type=1,this._$AH=cn,this._$AN=void 0,this.element=n,this.name=i,this._$AM=h,this.options=v,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=cn}_$AI(n,i=this,l,h){const v=this.strings;let x=!1;if(v===void 0)n=H(this,n,i,0),x=!ie(n)||n!==this._$AH&&n!==Dn,x&&(this._$AH=n);else{const w=n;let C,$;for(n=v[0],C=0;C<v.length-1;C++)$=H(this,w[l+C],i,C),$===Dn&&($=this._$AH[C]),x||=!ie($)||$!==this._$AH[C],$===cn?n=cn:n!==cn&&(n+=($??"")+v[C+1]),this._$AH[C]=$}x&&!h&&this.j(n)}j(n){n===cn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,n??"")}}class st extends Re{constructor(){super(...arguments),this.type=3}j(n){this.element[this.name]=n===cn?void 0:n}}class Kt extends Re{constructor(){super(...arguments),this.type=4}j(n){this.element.toggleAttribute(this.name,!!n&&n!==cn)}}class Qt extends Re{constructor(n,i,l,h,v){super(n,i,l,h,v),this.type=5}_$AI(n,i=this){if((n=H(this,n,i,0)??cn)===Dn)return;const l=this._$AH,h=n===cn&&l!==cn||n.capture!==l.capture||n.once!==l.once||n.passive!==l.passive,v=n!==cn&&(l===cn||h);h&&this.element.removeEventListener(this.name,this,l),v&&this.element.addEventListener(this.name,this,n),this._$AH=n}handleEvent(n){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,n):this._$AH.handleEvent(n)}}class Fn{constructor(n,i,l){this.element=n,this.type=6,this._$AN=void 0,this._$AM=i,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(n){H(this,n)}}const dn=ce.litHtmlPolyfillSupport;dn?.(z,we),(ce.litHtmlVersions??=[]).push("3.2.0");class Ht extends Ke{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const n=super.createRenderRoot();return this.renderOptions.renderBefore??=n.firstChild,n}update(n){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(n),this.o=((l,h,v)=>{const x=v?.renderBefore??h;let w=x._$litPart$;if(w===void 0){const C=v?.renderBefore??null;x._$litPart$=w=new we(h.insertBefore(Ve(),C),C,void 0,v??{})}return w._$AI(l),w})(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return Dn}}Ht._$litElement$=!0,Ht.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Ht});const wi=globalThis.litElementPolyfillSupport;wi?.({LitElement:Ht});function Xr(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}(globalThis.litElementVersions??=[]).push("4.1.0");let fa={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const uo=/[&<>"']/,Ma=new RegExp(uo.source,"g"),cc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,xu=new RegExp(cc.source,"g"),uc={"&":"&","<":"<",">":">",'"':""","'":"'"},ma=t=>uc[t];function Lt(t,n){if(n){if(uo.test(t))return t.replace(Ma,ma)}else if(cc.test(t))return t.replace(xu,ma);return t}const vr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Yr(t){return t.replace(vr,((n,i)=>(i=i.toLowerCase())==="colon"?":":i.charAt(0)==="#"?i.charAt(1)==="x"?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""))}const Os=/(^|[^\[])\^/g;function Pn(t,n){t=typeof t=="string"?t:t.source,n=n||"";const i={replace:(l,h)=>(h=(h=h.source||h).replace(Os,"$1"),t=t.replace(l,h),i),getRegex:()=>new RegExp(t,n)};return i}const Er=/[^\w:]/g,Ys=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ll(t,n,i){if(t){let l;try{l=decodeURIComponent(Yr(i)).replace(Er,"").toLowerCase()}catch{return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}n&&!Ys.test(i)&&(i=(function(l,h){gs[" "+l]||(Zs.test(l)?gs[" "+l]=l+"/":gs[" "+l]=ya(l,"/",!0)),l=gs[" "+l];const v=l.indexOf(":")===-1;return h.substring(0,2)==="//"?v?h:l.replace(bu,"$1")+h:h.charAt(0)==="/"?v?h:l.replace(ga,"$1")+h:l+h})(n,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const gs={},Zs=/^[^:]+:\/*[^/]*$/,bu=/^([^:]+:)[\s\S]*$/,ga=/^([^:]+:\/*[^/]*)[\s\S]*$/,wu={exec:function(){}};function Lg(t,n){const i=t.replace(/\|/g,((h,v,x)=>{let w=!1,C=v;for(;--C>=0&&x[C]==="\\";)w=!w;return w?"|":" |"})).split(/ \|/);let l=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>n)i.splice(n);else for(;i.length<n;)i.push("");for(;l<i.length;l++)i[l]=i[l].trim().replace(/\\\|/g,"|");return i}function ya(t,n,i){const l=t.length;if(l===0)return"";let h=0;for(;h<l;){const v=t.charAt(l-h-1);if(v!==n||i){if(v===n||!i)break;h++}else h++}return t.slice(0,l-h)}function ss(t,n){if(n<1)return"";let i="";for(;n>1;)1&n&&(i+=t),n>>=1,t+=t;return i+t}function Ps(t,n,i,l){const h=n.href,v=n.title?Lt(n.title):null,x=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){l.state.inLink=!0;const w={type:"link",raw:i,href:h,title:v,text:x,tokens:l.inlineTokens(x)};return l.state.inLink=!1,w}return{type:"image",raw:i,href:h,title:v,text:Lt(x)}}class cl{constructor(n){this.options=n||fa}space(n){const i=this.rules.block.newline.exec(n);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(n){const i=this.rules.block.code.exec(n);if(i){const l=i[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:ya(l,`
|
||
`)}}}fences(n){const i=this.rules.block.fences.exec(n);if(i){const l=i[0],h=(function(v,x){const w=v.match(/^(\s+)(?:```)/);if(w===null)return x;const C=w[1];return x.split(`
|
||
`).map(($=>{const N=$.match(/^\s+/);if(N===null)return $;const[_]=N;return _.length>=C.length?$.slice(C.length):$})).join(`
|
||
`)})(l,i[3]||"");return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline._escapes,"$1"):i[2],text:h}}}heading(n){const i=this.rules.block.heading.exec(n);if(i){let l=i[2].trim();if(/#$/.test(l)){const h=ya(l,"#");this.options.pedantic?l=h.trim():h&&!/ $/.test(h)||(l=h.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(n){const i=this.rules.block.hr.exec(n);if(i)return{type:"hr",raw:i[0]}}blockquote(n){const i=this.rules.block.blockquote.exec(n);if(i){const l=i[0].replace(/^ *>[ \t]?/gm,""),h=this.lexer.state.top;this.lexer.state.top=!0;const v=this.lexer.blockTokens(l);return this.lexer.state.top=h,{type:"blockquote",raw:i[0],tokens:v,text:l}}}list(n){let i=this.rules.block.list.exec(n);if(i){let l,h,v,x,w,C,$,N,_,F,U,J,Y=i[1].trim();const W=Y.length>1,P={type:"list",raw:"",ordered:W,start:W?+Y.slice(0,-1):"",loose:!1,items:[]};Y=W?`\\d{1,9}\\${Y.slice(-1)}`:`\\${Y}`,this.options.pedantic&&(Y=W?Y:"[*+-]");const se=new RegExp(`^( {0,3}${Y})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;n&&(J=!1,i=se.exec(n))&&!this.rules.block.hr.test(n);){if(l=i[0],n=n.substring(l.length),N=i[2].split(`
|
||
`,1)[0].replace(/^\t+/,(he=>" ".repeat(3*he.length))),_=n.split(`
|
||
`,1)[0],this.options.pedantic?(x=2,U=N.trimLeft()):(x=i[2].search(/[^ ]/),x=x>4?1:x,U=N.slice(x),x+=i[1].length),C=!1,!N&&/^ *$/.test(_)&&(l+=_+`
|
||
`,n=n.substring(_.length+1),J=!0),!J){const he=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),ge=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),pe=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),Te=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;n&&(F=n.split(`
|
||
`,1)[0],_=F,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!pe.test(_))&&!Te.test(_)&&!he.test(_)&&!ge.test(n);){if(_.search(/[^ ]/)>=x||!_.trim())U+=`
|
||
`+_.slice(x);else{if(C||N.search(/[^ ]/)>=4||pe.test(N)||Te.test(N)||ge.test(N))break;U+=`
|
||
`+_}C||_.trim()||(C=!0),l+=F+`
|
||
`,n=n.substring(F.length+1),N=_.slice(x)}}P.loose||($?P.loose=!0:/\n *\n *$/.test(l)&&($=!0)),this.options.gfm&&(h=/^\[[ xX]\] /.exec(U),h&&(v=h[0]!=="[ ] ",U=U.replace(/^\[[ xX]\] +/,""))),P.items.push({type:"list_item",raw:l,task:!!h,checked:v,loose:!1,text:U}),P.raw+=l}P.items[P.items.length-1].raw=l.trimRight(),P.items[P.items.length-1].text=U.trimRight(),P.raw=P.raw.trimRight();const ae=P.items.length;for(w=0;w<ae;w++)if(this.lexer.state.top=!1,P.items[w].tokens=this.lexer.blockTokens(P.items[w].text,[]),!P.loose){const he=P.items[w].tokens.filter((pe=>pe.type==="space")),ge=he.length>0&&he.some((pe=>/\n.*\n/.test(pe.raw)));P.loose=ge}if(P.loose)for(w=0;w<ae;w++)P.items[w].loose=!0;return P}}html(n){const i=this.rules.block.html.exec(n);if(i){const l={type:"html",raw:i[0],pre:!this.options.sanitizer&&(i[1]==="pre"||i[1]==="script"||i[1]==="style"),text:i[0]};if(this.options.sanitize){const h=this.options.sanitizer?this.options.sanitizer(i[0]):Lt(i[0]);l.type="paragraph",l.text=h,l.tokens=this.lexer.inline(h)}return l}}def(n){const i=this.rules.block.def.exec(n);if(i){const l=i[1].toLowerCase().replace(/\s+/g," "),h=i[2]?i[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline._escapes,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:h,title:v}}}table(n){const i=this.rules.block.table.exec(n);if(i){const l={type:"table",header:Lg(i[1]).map((h=>({text:h}))),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(l.header.length===l.align.length){l.raw=i[0];let h,v,x,w,C=l.align.length;for(h=0;h<C;h++)/^ *-+: *$/.test(l.align[h])?l.align[h]="right":/^ *:-+: *$/.test(l.align[h])?l.align[h]="center":/^ *:-+ *$/.test(l.align[h])?l.align[h]="left":l.align[h]=null;for(C=l.rows.length,h=0;h<C;h++)l.rows[h]=Lg(l.rows[h],l.header.length).map(($=>({text:$})));for(C=l.header.length,v=0;v<C;v++)l.header[v].tokens=this.lexer.inline(l.header[v].text);for(C=l.rows.length,v=0;v<C;v++)for(w=l.rows[v],x=0;x<w.length;x++)w[x].tokens=this.lexer.inline(w[x].text);return l}}}lheading(n){const i=this.rules.block.lheading.exec(n);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(n){const i=this.rules.block.paragraph.exec(n);if(i){const l=i[1].charAt(i[1].length-1)===`
|
||
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(n){const i=this.rules.block.text.exec(n);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(n){const i=this.rules.inline.escape.exec(n);if(i)return{type:"escape",raw:i[0],text:Lt(i[1])}}tag(n){const i=this.rules.inline.tag.exec(n);if(i)return!this.lexer.state.inLink&&/^<a /i.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):Lt(i[0]):i[0]}}link(n){const i=this.rules.inline.link.exec(n);if(i){const l=i[2].trim();if(!this.options.pedantic&&/^</.test(l)){if(!/>$/.test(l))return;const x=ya(l.slice(0,-1),"\\");if((l.length-x.length)%2==0)return}else{const x=(function(w,C){if(w.indexOf(C[1])===-1)return-1;const $=w.length;let N=0,_=0;for(;_<$;_++)if(w[_]==="\\")_++;else if(w[_]===C[0])N++;else if(w[_]===C[1]&&(N--,N<0))return _;return-1})(i[2],"()");if(x>-1){const w=(i[0].indexOf("!")===0?5:4)+i[1].length+x;i[2]=i[2].substring(0,x),i[0]=i[0].substring(0,w).trim(),i[3]=""}}let h=i[2],v="";if(this.options.pedantic){const x=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(h);x&&(h=x[1],v=x[3])}else v=i[3]?i[3].slice(1,-1):"";return h=h.trim(),/^</.test(h)&&(h=this.options.pedantic&&!/>$/.test(l)?h.slice(1):h.slice(1,-1)),Ps(i,{href:h&&h.replace(this.rules.inline._escapes,"$1"),title:v&&v.replace(this.rules.inline._escapes,"$1")},i[0],this.lexer)}}reflink(n,i){let l;if((l=this.rules.inline.reflink.exec(n))||(l=this.rules.inline.nolink.exec(n))){let h=(l[2]||l[1]).replace(/\s+/g," ");if(h=i[h.toLowerCase()],!h){const v=l[0].charAt(0);return{type:"text",raw:v,text:v}}return Ps(l,h,l[0],this.lexer)}}emStrong(n,i,l=""){let h=this.rules.inline.emStrong.lDelim.exec(n);if(!h||h[3]&&l.match(/[\p{L}\p{N}]/u))return;const v=h[1]||h[2]||"";if(!v||v&&(l===""||this.rules.inline.punctuation.exec(l))){const x=h[0].length-1;let w,C,$=x,N=0;const _=h[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(_.lastIndex=0,i=i.slice(-1*n.length+x);(h=_.exec(i))!=null;){if(w=h[1]||h[2]||h[3]||h[4]||h[5]||h[6],!w)continue;if(C=w.length,h[3]||h[4]){$+=C;continue}if((h[5]||h[6])&&x%3&&!((x+C)%3)){N+=C;continue}if($-=C,$>0)continue;C=Math.min(C,C+$+N);const F=n.slice(0,x+h.index+(h[0].length-w.length)+C);if(Math.min(x,C)%2){const J=F.slice(1,-1);return{type:"em",raw:F,text:J,tokens:this.lexer.inlineTokens(J)}}const U=F.slice(2,-2);return{type:"strong",raw:F,text:U,tokens:this.lexer.inlineTokens(U)}}}}codespan(n){const i=this.rules.inline.code.exec(n);if(i){let l=i[2].replace(/\n/g," ");const h=/[^ ]/.test(l),v=/^ /.test(l)&&/ $/.test(l);return h&&v&&(l=l.substring(1,l.length-1)),l=Lt(l,!0),{type:"codespan",raw:i[0],text:l}}}br(n){const i=this.rules.inline.br.exec(n);if(i)return{type:"br",raw:i[0]}}del(n){const i=this.rules.inline.del.exec(n);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(n,i){const l=this.rules.inline.autolink.exec(n);if(l){let h,v;return l[2]==="@"?(h=Lt(this.options.mangle?i(l[1]):l[1]),v="mailto:"+h):(h=Lt(l[1]),v=h),{type:"link",raw:l[0],text:h,href:v,tokens:[{type:"text",raw:h,text:h}]}}}url(n,i){let l;if(l=this.rules.inline.url.exec(n)){let h,v;if(l[2]==="@")h=Lt(this.options.mangle?i(l[0]):l[0]),v="mailto:"+h;else{let x;do x=l[0],l[0]=this.rules.inline._backpedal.exec(l[0])[0];while(x!==l[0]);h=Lt(l[0]),v=l[1]==="www."?"http://"+l[0]:l[0]}return{type:"link",raw:l[0],text:h,href:v,tokens:[{type:"text",raw:h,text:h}]}}}inlineText(n,i){const l=this.rules.inline.text.exec(n);if(l){let h;return h=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):Lt(l[0]):l[0]:Lt(this.options.smartypants?i(l[0]):l[0]),{type:"text",raw:l[0],text:h}}}}const Gt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:wu,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Gt.def=Pn(Gt.def).replace("label",Gt._label).replace("title",Gt._title).getRegex(),Gt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Gt.listItemStart=Pn(/^( *)(bull) */).replace("bull",Gt.bullet).getRegex(),Gt.list=Pn(Gt.list).replace(/bull/g,Gt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Gt.def.source+")").getRegex(),Gt._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Gt.html=Pn(Gt.html,"i").replace("comment",Gt._comment).replace("tag",Gt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gt.paragraph=Pn(Gt._paragraph).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.blockquote=Pn(Gt.blockquote).replace("paragraph",Gt.paragraph).getRegex(),Gt.normal={...Gt},Gt.gfm={...Gt.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Gt.gfm.table=Pn(Gt.gfm.table).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.gfm.paragraph=Pn(Gt._paragraph).replace("hr",Gt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Gt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Gt._tag).getRegex(),Gt.pedantic={...Gt.normal,html:Pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pn(Gt.normal._paragraph).replace("hr",Gt.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",Gt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:wu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:wu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function eA(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function zg(t){let n,i,l="";const h=t.length;for(n=0;n<h;n++)i=t.charCodeAt(n),Math.random()>.5&&(i="x"+i.toString(16)),l+="&#"+i+";";return l}Nt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Nt.punctuation=Pn(Nt.punctuation).replace(/punctuation/g,Nt._punctuation).getRegex(),Nt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Nt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Nt._comment=Pn(Gt._comment).replace("(?:-->|$)","-->").getRegex(),Nt.emStrong.lDelim=Pn(Nt.emStrong.lDelim).replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimAst=Pn(Nt.emStrong.rDelimAst,"g").replace(/punct/g,Nt._punctuation).getRegex(),Nt.emStrong.rDelimUnd=Pn(Nt.emStrong.rDelimUnd,"g").replace(/punct/g,Nt._punctuation).getRegex(),Nt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Nt.autolink=Pn(Nt.autolink).replace("scheme",Nt._scheme).replace("email",Nt._email).getRegex(),Nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nt.tag=Pn(Nt.tag).replace("comment",Nt._comment).replace("attribute",Nt._attribute).getRegex(),Nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nt.link=Pn(Nt.link).replace("label",Nt._label).replace("href",Nt._href).replace("title",Nt._title).getRegex(),Nt.reflink=Pn(Nt.reflink).replace("label",Nt._label).replace("ref",Gt._label).getRegex(),Nt.nolink=Pn(Nt.nolink).replace("ref",Gt._label).getRegex(),Nt.reflinkSearch=Pn(Nt.reflinkSearch,"g").replace("reflink",Nt.reflink).replace("nolink",Nt.nolink).getRegex(),Nt.normal={...Nt},Nt.pedantic={...Nt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Pn(/^!?\[(label)\]\((.*?)\)/).replace("label",Nt._label).getRegex(),reflink:Pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nt._label).getRegex()},Nt.gfm={...Nt.normal,escape:Pn(Nt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nt.gfm.url=Pn(Nt.gfm.url,"i").replace("email",Nt.gfm._extended_email).getRegex(),Nt.breaks={...Nt.gfm,br:Pn(Nt.br).replace("{2,}","*").getRegex(),text:Pn(Nt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Vi{constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||fa,this.options.tokenizer=this.options.tokenizer||new cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={block:Gt.normal,inline:Nt.normal};this.options.pedantic?(i.block=Gt.pedantic,i.inline=Nt.pedantic):this.options.gfm&&(i.block=Gt.gfm,this.options.breaks?i.inline=Nt.breaks:i.inline=Nt.gfm),this.tokenizer.rules=i}static get rules(){return{block:Gt,inline:Nt}}static lex(n,i){return new Vi(i).lex(n)}static lexInline(n,i){return new Vi(i).inlineTokens(n)}lex(n){let i;for(n=n.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(n,this.tokens);i=this.inlineQueue.shift();)this.inlineTokens(i.src,i.tokens);return this.tokens}blockTokens(n,i=[]){let l,h,v,x;for(n=this.options.pedantic?n.replace(/\t/g," ").replace(/^ +$/gm,""):n.replace(/^( *)(\t+)/gm,((w,C,$)=>C+" ".repeat($.length)));n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((w=>!!(l=w.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.space(n))n=n.substring(l.raw.length),l.raw.length===1&&i.length>0?i[i.length-1].raw+=`
|
||
`:i.push(l);else if(l=this.tokenizer.code(n))n=n.substring(l.raw.length),h=i[i.length-1],!h||h.type!=="paragraph"&&h.type!=="text"?i.push(l):(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue[this.inlineQueue.length-1].src=h.text);else if(l=this.tokenizer.fences(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.heading(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.hr(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.blockquote(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.list(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.html(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.def(n))n=n.substring(l.raw.length),h=i[i.length-1],!h||h.type!=="paragraph"&&h.type!=="text"?this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title}):(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.raw,this.inlineQueue[this.inlineQueue.length-1].src=h.text);else if(l=this.tokenizer.table(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.lheading(n))n=n.substring(l.raw.length),i.push(l);else{if(v=n,this.options.extensions&&this.options.extensions.startBlock){let w=1/0;const C=n.slice(1);let $;this.options.extensions.startBlock.forEach((function(N){$=N.call({lexer:this},C),typeof $=="number"&&$>=0&&(w=Math.min(w,$))})),w<1/0&&w>=0&&(v=n.substring(0,w+1))}if(this.state.top&&(l=this.tokenizer.paragraph(v)))h=i[i.length-1],x&&h.type==="paragraph"?(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=h.text):i.push(l),x=v.length!==n.length,n=n.substring(l.raw.length);else if(l=this.tokenizer.text(n))n=n.substring(l.raw.length),h=i[i.length-1],h&&h.type==="text"?(h.raw+=`
|
||
`+l.raw,h.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=h.text):i.push(l);else if(n){const w="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(w);break}throw new Error(w)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){let l,h,v,x,w,C,$=n;if(this.tokens.links){const N=Object.keys(this.tokens.links);if(N.length>0)for(;(x=this.tokenizer.rules.inline.reflinkSearch.exec($))!=null;)N.includes(x[0].slice(x[0].lastIndexOf("[")+1,-1))&&($=$.slice(0,x.index)+"["+ss("a",x[0].length-2)+"]"+$.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(x=this.tokenizer.rules.inline.blockSkip.exec($))!=null;)$=$.slice(0,x.index)+"["+ss("a",x[0].length-2)+"]"+$.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(x=this.tokenizer.rules.inline.escapedEmSt.exec($))!=null;)$=$.slice(0,x.index+x[0].length-2)+"++"+$.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;n;)if(w||(C=""),w=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((N=>!!(l=N.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.escape(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.tag(n))n=n.substring(l.raw.length),h=i[i.length-1],h&&l.type==="text"&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(l=this.tokenizer.link(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.reflink(n,this.tokens.links))n=n.substring(l.raw.length),h=i[i.length-1],h&&l.type==="text"&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(l=this.tokenizer.emStrong(n,$,C))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.codespan(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.br(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.del(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.autolink(n,zg))n=n.substring(l.raw.length),i.push(l);else if(this.state.inLink||!(l=this.tokenizer.url(n,zg))){if(v=n,this.options.extensions&&this.options.extensions.startInline){let N=1/0;const _=n.slice(1);let F;this.options.extensions.startInline.forEach((function(U){F=U.call({lexer:this},_),typeof F=="number"&&F>=0&&(N=Math.min(N,F))})),N<1/0&&N>=0&&(v=n.substring(0,N+1))}if(l=this.tokenizer.inlineText(v,eA))n=n.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(C=l.raw.slice(-1)),w=!0,h=i[i.length-1],h&&h.type==="text"?(h.raw+=l.raw,h.text+=l.text):i.push(l);else if(n){const N="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(N);break}throw new Error(N)}}else n=n.substring(l.raw.length),i.push(l);return i}}class Qd{constructor(n){this.options=n||fa}code(n,i,l){const h=(i||"").match(/\S*/)[0];if(this.options.highlight){const v=this.options.highlight(n,h);v!=null&&v!==n&&(l=!0,n=v)}return n=n.replace(/\n$/,"")+`
|
||
`,h?'<pre><code class="'+this.options.langPrefix+Lt(h)+'">'+(l?n:Lt(n,!0))+`</code></pre>
|
||
`:"<pre><code>"+(l?n:Lt(n,!0))+`</code></pre>
|
||
`}blockquote(n){return`<blockquote>
|
||
${n}</blockquote>
|
||
`}html(n){return n}heading(n,i,l,h){return this.options.headerIds?`<h${i} id="${this.options.headerPrefix+h.slug(l)}">${n}</h${i}>
|
||
`:`<h${i}>${n}</h${i}>
|
||
`}hr(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`}list(n,i,l){const h=i?"ol":"ul";return"<"+h+(i&&l!==1?' start="'+l+'"':"")+`>
|
||
`+n+"</"+h+`>
|
||
`}listitem(n){return`<li>${n}</li>
|
||
`}checkbox(n){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(n){return`<p>${n}</p>
|
||
`}table(n,i){return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
||
<thead>
|
||
`+n+`</thead>
|
||
`+i+`</table>
|
||
`}tablerow(n){return`<tr>
|
||
${n}</tr>
|
||
`}tablecell(n,i){const l=i.header?"th":"td";return(i.align?`<${l} align="${i.align}">`:`<${l}>`)+n+`</${l}>
|
||
`}strong(n){return`<strong>${n}</strong>`}em(n){return`<em>${n}</em>`}codespan(n){return`<code>${n}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(n){return`<del>${n}</del>`}link(n,i,l){if((n=ll(this.options.sanitize,this.options.baseUrl,n))===null)return l;let h='<a href="'+n+'"';return i&&(h+=' title="'+i+'"'),h+=">"+l+"</a>",h}image(n,i,l){if((n=ll(this.options.sanitize,this.options.baseUrl,n))===null)return l;let h=`<img src="${n}" alt="${l}"`;return i&&(h+=` title="${i}"`),h+=this.options.xhtml?"/>":">",h}text(n){return n}}class dc{strong(n){return n}em(n){return n}codespan(n){return n}del(n){return n}html(n){return n}text(n){return n}link(n,i,l){return""+l}image(n,i,l){return""+l}br(){return""}}class hc{constructor(){this.seen={}}serialize(n){return n.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(n,i){let l=n,h=0;if(this.seen.hasOwnProperty(l)){h=this.seen[n];do h++,l=n+"-"+h;while(this.seen.hasOwnProperty(l))}return i||(this.seen[n]=h,this.seen[l]=0),l}slug(n,i={}){const l=this.serialize(n);return this.getNextSafeSlug(l,i.dryrun)}}class Hi{constructor(n){this.options=n||fa,this.options.renderer=this.options.renderer||new Qd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new dc,this.slugger=new hc}static parse(n,i){return new Hi(i).parse(n)}static parseInline(n,i){return new Hi(i).parseInline(n)}parse(n,i=!0){let l,h,v,x,w,C,$,N,_,F,U,J,Y,W,P,se,ae,he,ge,pe="";const Te=n.length;for(l=0;l<Te;l++)if(F=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[F.type]&&(ge=this.options.extensions.renderers[F.type].call({parser:this},F),ge!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(F.type)))pe+=ge||"";else switch(F.type){case"space":continue;case"hr":pe+=this.renderer.hr();continue;case"heading":pe+=this.renderer.heading(this.parseInline(F.tokens),F.depth,Yr(this.parseInline(F.tokens,this.textRenderer)),this.slugger);continue;case"code":pe+=this.renderer.code(F.text,F.lang,F.escaped);continue;case"table":for(N="",$="",x=F.header.length,h=0;h<x;h++)$+=this.renderer.tablecell(this.parseInline(F.header[h].tokens),{header:!0,align:F.align[h]});for(N+=this.renderer.tablerow($),_="",x=F.rows.length,h=0;h<x;h++){for(C=F.rows[h],$="",w=C.length,v=0;v<w;v++)$+=this.renderer.tablecell(this.parseInline(C[v].tokens),{header:!1,align:F.align[v]});_+=this.renderer.tablerow($)}pe+=this.renderer.table(N,_);continue;case"blockquote":_=this.parse(F.tokens),pe+=this.renderer.blockquote(_);continue;case"list":for(U=F.ordered,J=F.start,Y=F.loose,x=F.items.length,_="",h=0;h<x;h++)P=F.items[h],se=P.checked,ae=P.task,W="",P.task&&(he=this.renderer.checkbox(se),Y?P.tokens.length>0&&P.tokens[0].type==="paragraph"?(P.tokens[0].text=he+" "+P.tokens[0].text,P.tokens[0].tokens&&P.tokens[0].tokens.length>0&&P.tokens[0].tokens[0].type==="text"&&(P.tokens[0].tokens[0].text=he+" "+P.tokens[0].tokens[0].text)):P.tokens.unshift({type:"text",text:he}):W+=he),W+=this.parse(P.tokens,Y),_+=this.renderer.listitem(W,ae,se);pe+=this.renderer.list(_,U,J);continue;case"html":pe+=this.renderer.html(F.text);continue;case"paragraph":pe+=this.renderer.paragraph(this.parseInline(F.tokens));continue;case"text":for(_=F.tokens?this.parseInline(F.tokens):F.text;l+1<Te&&n[l+1].type==="text";)F=n[++l],_+=`
|
||
`+(F.tokens?this.parseInline(F.tokens):F.text);pe+=i?this.renderer.paragraph(_):_;continue;default:{const Ae='Token with "'+F.type+'" type was not found.';if(this.options.silent)return void console.error(Ae);throw new Error(Ae)}}return pe}parseInline(n,i){i=i||this.renderer;let l,h,v,x="";const w=n.length;for(l=0;l<w;l++)if(h=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(v=this.options.extensions.renderers[h.type].call({parser:this},h),v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)))x+=v||"";else switch(h.type){case"escape":case"text":x+=i.text(h.text);break;case"html":x+=i.html(h.text);break;case"link":x+=i.link(h.href,h.title,this.parseInline(h.tokens,i));break;case"image":x+=i.image(h.href,h.title,h.text);break;case"strong":x+=i.strong(this.parseInline(h.tokens,i));break;case"em":x+=i.em(this.parseInline(h.tokens,i));break;case"codespan":x+=i.codespan(h.text);break;case"br":x+=i.br();break;case"del":x+=i.del(this.parseInline(h.tokens,i));break;default:{const C='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(C);throw new Error(C)}}return x}}class ul{constructor(n){this.options=n||fa}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(n){return n}postprocess(n){return n}}function Zr(t,n){return(i,l,h)=>{typeof l=="function"&&(h=l,l=null);const v={...l},x=(function(w,C,$){return N=>{if(N.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,w){const _="<p>An error occurred:</p><pre>"+Lt(N.message+"",!0)+"</pre>";return C?Promise.resolve(_):$?void $(null,_):_}if(C)return Promise.reject(N);if(!$)throw N;$(N)}})((l={...ht.defaults,...v}).silent,l.async,h);if(i==null)return x(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return x(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if((function(w){w&&w.sanitize&&!w.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")})(l),l.hooks&&(l.hooks.options=l),h){const w=l.highlight;let C;try{l.hooks&&(i=l.hooks.preprocess(i)),C=t(i,l)}catch(_){return x(_)}const $=function(_){let F;if(!_)try{l.walkTokens&&ht.walkTokens(C,l.walkTokens),F=n(C,l),l.hooks&&(F=l.hooks.postprocess(F))}catch(U){_=U}return l.highlight=w,_?x(_):h(null,F)};if(!w||w.length<3||(delete l.highlight,!C.length))return $();let N=0;return ht.walkTokens(C,(function(_){_.type==="code"&&(N++,setTimeout((()=>{w(_.text,_.lang,(function(F,U){if(F)return $(F);U!=null&&U!==_.text&&(_.text=U,_.escaped=!0),N--,N===0&&$()}))}),0))})),void(N===0&&$())}if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(i):i).then((w=>t(w,l))).then((w=>l.walkTokens?Promise.all(ht.walkTokens(w,l.walkTokens)).then((()=>w)):w)).then((w=>n(w,l))).then((w=>l.hooks?l.hooks.postprocess(w):w)).catch(x);try{l.hooks&&(i=l.hooks.preprocess(i));const w=t(i,l);l.walkTokens&&ht.walkTokens(w,l.walkTokens);let C=n(w,l);return l.hooks&&(C=l.hooks.postprocess(C)),C}catch(w){return x(w)}}}function ht(t,n,i){return Zr(Vi.lex,Hi.parse)(t,n,i)}ht.options=ht.setOptions=function(t){var n;return ht.defaults={...ht.defaults,...t},n=ht.defaults,fa=n,ht},ht.getDefaults=Xr,ht.defaults=fa,ht.use=function(...t){const n=ht.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((i=>{const l={...i};if(l.async=ht.defaults.async||l.async||!1,i.extensions&&(i.extensions.forEach((h=>{if(!h.name)throw new Error("extension name required");if(h.renderer){const v=n.renderers[h.name];n.renderers[h.name]=v?function(...x){let w=h.renderer.apply(this,x);return w===!1&&(w=v.apply(this,x)),w}:h.renderer}if(h.tokenizer){if(!h.level||h.level!=="block"&&h.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[h.level]?n[h.level].unshift(h.tokenizer):n[h.level]=[h.tokenizer],h.start&&(h.level==="block"?n.startBlock?n.startBlock.push(h.start):n.startBlock=[h.start]:h.level==="inline"&&(n.startInline?n.startInline.push(h.start):n.startInline=[h.start]))}h.childTokens&&(n.childTokens[h.name]=h.childTokens)})),l.extensions=n),i.renderer){const h=ht.defaults.renderer||new Qd;for(const v in i.renderer){const x=h[v];h[v]=(...w)=>{let C=i.renderer[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.renderer=h}if(i.tokenizer){const h=ht.defaults.tokenizer||new cl;for(const v in i.tokenizer){const x=h[v];h[v]=(...w)=>{let C=i.tokenizer[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.tokenizer=h}if(i.hooks){const h=ht.defaults.hooks||new ul;for(const v in i.hooks){const x=h[v];ul.passThroughHooks.has(v)?h[v]=w=>{if(ht.defaults.async)return Promise.resolve(i.hooks[v].call(h,w)).then(($=>x.call(h,$)));const C=i.hooks[v].call(h,w);return x.call(h,C)}:h[v]=(...w)=>{let C=i.hooks[v].apply(h,w);return C===!1&&(C=x.apply(h,w)),C}}l.hooks=h}if(i.walkTokens){const h=ht.defaults.walkTokens;l.walkTokens=function(v){let x=[];return x.push(i.walkTokens.call(this,v)),h&&(x=x.concat(h.call(this,v))),x}}ht.setOptions(l)}))},ht.walkTokens=function(t,n){let i=[];for(const l of t)switch(i=i.concat(n.call(ht,l)),l.type){case"table":for(const h of l.header)i=i.concat(ht.walkTokens(h.tokens,n));for(const h of l.rows)for(const v of h)i=i.concat(ht.walkTokens(v.tokens,n));break;case"list":i=i.concat(ht.walkTokens(l.items,n));break;default:ht.defaults.extensions&&ht.defaults.extensions.childTokens&&ht.defaults.extensions.childTokens[l.type]?ht.defaults.extensions.childTokens[l.type].forEach((function(h){i=i.concat(ht.walkTokens(l[h],n))})):l.tokens&&(i=i.concat(ht.walkTokens(l.tokens,n)))}return i},ht.parseInline=Zr(Vi.lexInline,Hi.parseInline),ht.Parser=Hi,ht.parser=Hi.parse,ht.Renderer=Qd,ht.TextRenderer=dc,ht.Lexer=Vi,ht.lexer=Vi.lex,ht.Tokenizer=cl,ht.Slugger=hc,ht.Hooks=ul,ht.parse=ht,ht.options,ht.setOptions,ht.use,ht.walkTokens,ht.parseInline,Hi.parse,Vi.lex;var vw=g(848),sr=g.n(vw);g(113),g(83),g(378),g(976),g(514),g(22),g(342),g(784),g(651);const Si=M`
|
||
.hover-bg:hover {
|
||
background: var(--bg3);
|
||
}
|
||
::selection {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
.regular-font {
|
||
font-family:var(--font-regular);
|
||
}
|
||
.mono-font {
|
||
font-family:var(--font-mono);
|
||
}
|
||
.title {
|
||
font-size: calc(var(--font-size-small) + 18px);
|
||
font-weight: normal
|
||
}
|
||
.sub-title{ font-size: 20px; }
|
||
.req-res-title {
|
||
font-family: var(--font-regular);
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-weight:bold;
|
||
margin-bottom:8px;
|
||
text-align:left;
|
||
}
|
||
.tiny-title {
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
font-weight:bold;
|
||
}
|
||
.regular-font-size { font-size: var(--font-size-regular); }
|
||
.small-font-size { font-size: var(--font-size-small); }
|
||
.upper { text-transform: uppercase; }
|
||
.primary-text { color: var(--primary-color); }
|
||
.bold-text { font-weight:bold; }
|
||
.gray-text { color: var(--light-fg); }
|
||
.red-text { color: var(--red) }
|
||
.blue-text { color: var(--blue) }
|
||
.multiline {
|
||
overflow: scroll;
|
||
max-height: var(--resp-area-height, 400px);
|
||
color: var(--fg3);
|
||
}
|
||
.method-fg.put { color: var(--orange); }
|
||
.method-fg.post { color: var(--green); }
|
||
.method-fg.get { color: var(--blue); }
|
||
.method-fg.delete { color: var(--red); }
|
||
.method-fg.options,
|
||
.method-fg.head,
|
||
.method-fg.patch {
|
||
color: var(--yellow);
|
||
}
|
||
|
||
h1 { font-family:var(--font-regular); font-size:28px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h2 { font-family:var(--font-regular); font-size:24px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h3 { font-family:var(--font-regular); font-size:18px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h4 { font-family:var(--font-regular); font-size:16px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h5 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h6 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
|
||
h1,h2,h3,h4,h5,h5 {
|
||
margin-block-end: 0.2em;
|
||
}
|
||
p { margin-block-start: 0.5em; }
|
||
a { color: var(--blue); cursor:pointer; }
|
||
a.inactive-link {
|
||
color:var(--fg);
|
||
text-decoration: none;
|
||
cursor:text;
|
||
}
|
||
|
||
code,
|
||
pre {
|
||
margin: 0px;
|
||
font-family: var(--font-mono);
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown,
|
||
.m-markdown-small {
|
||
display:block;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown span {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 8px);
|
||
}
|
||
.m-markdown li {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 10px);
|
||
}
|
||
|
||
.m-markdown-small p,
|
||
.m-markdown-small span,
|
||
.m-markdown-small li {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.m-markdown-small li {
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
}
|
||
|
||
.m-markdown p:not(:first-child) {
|
||
margin-block-start: 24px;
|
||
}
|
||
|
||
.m-markdown-small p:not(:first-child) {
|
||
margin-block-start: 12px;
|
||
}
|
||
.m-markdown-small p:first-child {
|
||
margin-block-start: 0;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown-small p {
|
||
margin-block-end: 0
|
||
}
|
||
|
||
.m-markdown code span {
|
||
font-size:var(--font-size-mono);
|
||
}
|
||
|
||
.m-markdown-small code,
|
||
.m-markdown code {
|
||
padding: 1px 6px;
|
||
border-radius: 2px;
|
||
color: var(--inline-code-fg);
|
||
background-color: var(--bg3);
|
||
font-size: calc(var(--font-size-mono));
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.m-markdown-small code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown-small pre,
|
||
.m-markdown pre {
|
||
white-space: pre-wrap;
|
||
overflow-x: auto;
|
||
line-height: normal;
|
||
border-radius: 2px;
|
||
border: 1px solid var(--code-border-color);
|
||
}
|
||
|
||
.m-markdown pre {
|
||
padding: 12px;
|
||
background-color: var(--code-bg);
|
||
color:var(--code-fg);
|
||
}
|
||
|
||
.m-markdown-small pre {
|
||
margin-top: 4px;
|
||
padding: 2px 4px;
|
||
background-color: var(--bg3);
|
||
color: var(--fg2);
|
||
}
|
||
|
||
.m-markdown-small pre code,
|
||
.m-markdown pre code {
|
||
border:none;
|
||
padding:0;
|
||
}
|
||
|
||
.m-markdown pre code {
|
||
color: var(--code-fg);
|
||
background-color: var(--code-bg);
|
||
background-color: transparent;
|
||
}
|
||
|
||
.m-markdown-small pre code {
|
||
color: var(--fg2);
|
||
background-color: var(--bg3);
|
||
}
|
||
|
||
.m-markdown ul,
|
||
.m-markdown ol {
|
||
padding-inline-start: 30px;
|
||
}
|
||
|
||
.m-markdown-small ul,
|
||
.m-markdown-small ol {
|
||
padding-inline-start: 20px;
|
||
}
|
||
|
||
.m-markdown-small a,
|
||
.m-markdown a {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.m-markdown-small img,
|
||
.m-markdown img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* Markdown table */
|
||
|
||
.m-markdown-small table,
|
||
.m-markdown table {
|
||
border-spacing: 0;
|
||
margin: 10px 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
max-width: 100%;
|
||
}
|
||
|
||
.m-markdown-small table {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 2px);
|
||
margin: 8px 0;
|
||
}
|
||
|
||
.m-markdown-small td,
|
||
.m-markdown-small th,
|
||
.m-markdown td,
|
||
.m-markdown th {
|
||
vertical-align: top;
|
||
border-top: 1px solid var(--border-color);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
}
|
||
|
||
.m-markdown-small tr:first-child th,
|
||
.m-markdown tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown td {
|
||
padding: 10px 12px;
|
||
}
|
||
|
||
.m-markdown-small th,
|
||
.m-markdown-small td {
|
||
padding: 8px 8px;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown-small th {
|
||
font-weight: 600;
|
||
background-color: var(--bg2);
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.m-markdown-small table code {
|
||
font-size: calc(var(--font-size-mono) - 2px);
|
||
}
|
||
|
||
.m-markdown table code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown blockquote,
|
||
.m-markdown-small blockquote {
|
||
margin-inline-start: 0;
|
||
margin-inline-end: 0;
|
||
border-left: 3px solid var(--border-color);
|
||
padding: 6px 0 6px 6px;
|
||
}
|
||
.m-markdown hr{
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
`,Su=M`
|
||
/* Button */
|
||
.m-btn {
|
||
border-radius: var(--border-radius);
|
||
font-weight: 600;
|
||
display: inline-block;
|
||
padding: 6px 16px;
|
||
font-size: var(--font-size-small);
|
||
outline: 0;
|
||
line-height: 1;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
border: 2px solid var(--primary-color);
|
||
background-color:transparent;
|
||
user-select: none;
|
||
cursor: pointer;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||
transition-duration: 0.75s;
|
||
}
|
||
.m-btn.primary {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.thin-border { border-width: 1px; }
|
||
.m-btn.large { padding:8px 14px; }
|
||
.m-btn.small { padding:5px 12px; }
|
||
.m-btn.tiny { padding:5px 6px; }
|
||
.m-btn.circle { border-radius: 50%; }
|
||
.m-btn:hover {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.nav { border: 2px solid var(--nav-accent-color); }
|
||
.m-btn.nav:hover {
|
||
background-color: var(--nav-accent-color);
|
||
}
|
||
.m-btn:disabled {
|
||
background-color: var(--bg3);
|
||
color: var(--fg3);
|
||
border-color: var(--fg3);
|
||
cursor: not-allowed;
|
||
opacity: 0.4;
|
||
}
|
||
.m-btn:active {
|
||
filter: brightness(75%);
|
||
transform: scale(0.95);
|
||
transition:scale 0s;
|
||
}
|
||
.toolbar-btn {
|
||
cursor: pointer;
|
||
padding: 4px;
|
||
margin:0 2px;
|
||
font-size: var(--font-size-small);
|
||
min-width: 50px;
|
||
color: var(--primary-color-invert);
|
||
border-radius: 2px;
|
||
border: none;
|
||
background-color: var(--primary-color);
|
||
}
|
||
|
||
input, textarea, select, button, pre {
|
||
color:var(--fg);
|
||
outline: none;
|
||
background-color: var(--input-bg);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
button {
|
||
font-family: var(--font-regular);
|
||
}
|
||
|
||
/* Form Inputs */
|
||
pre,
|
||
select,
|
||
textarea,
|
||
input[type="file"],
|
||
input[type="text"],
|
||
input[type="password"] {
|
||
font-family: var(--font-mono);
|
||
font-weight: 400;
|
||
font-size: var(--font-size-small);
|
||
transition: border .2s;
|
||
padding: 6px 5px;
|
||
}
|
||
|
||
select {
|
||
font-family: var(--font-regular);
|
||
padding: 5px 30px 5px 5px;
|
||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E");
|
||
background-position: calc(100% - 5px) center;
|
||
background-repeat: no-repeat;
|
||
background-size: 10px;
|
||
-webkit-appearance: none;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
select:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
textarea::placeholder,
|
||
input[type="text"]::placeholder,
|
||
input[type="password"]::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
|
||
|
||
input[type="file"]{
|
||
font-family: var(--font-regular);
|
||
padding:2px;
|
||
cursor:pointer;
|
||
border: 1px solid var(--primary-color);
|
||
min-height: calc(var(--font-size-small) + 18px);
|
||
}
|
||
|
||
input[type="file"]::-webkit-file-upload-button {
|
||
font-family: var(--font-regular);
|
||
font-size: var(--font-size-small);
|
||
outline: none;
|
||
cursor:pointer;
|
||
padding: 3px 8px;
|
||
border: 1px solid var(--primary-color);
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
border-radius: var(--border-radius);;
|
||
-webkit-appearance: none;
|
||
}
|
||
|
||
pre,
|
||
textarea {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar,
|
||
textarea::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
|
||
pre::-webkit-scrollbar-track,
|
||
textarea::-webkit-scrollbar-track {
|
||
background:var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar-thumb,
|
||
textarea::-webkit-scrollbar-thumb {
|
||
border-radius: 2px;
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.link {
|
||
font-size:var(--font-size-small);
|
||
text-decoration: underline;
|
||
color:var(--blue);
|
||
font-family:var(--font-mono);
|
||
margin-bottom:2px;
|
||
}
|
||
|
||
/* Toggle Body */
|
||
input[type="checkbox"] {
|
||
appearance: none;
|
||
display: inline-block;
|
||
background-color: var(--light-bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 9px;
|
||
cursor: pointer;
|
||
height: 18px;
|
||
position: relative;
|
||
transition: border .25s .15s, box-shadow .25s .3s, padding .25s;
|
||
min-width: 36px;
|
||
width: 36px;
|
||
vertical-align: top;
|
||
}
|
||
/* Toggle Thumb */
|
||
input[type="checkbox"]:after {
|
||
position: absolute;
|
||
background-color: var(--bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 8px;
|
||
content: '';
|
||
top: 0px;
|
||
left: 0px;
|
||
right: 16px;
|
||
display: block;
|
||
height: 16px;
|
||
transition: border .25s .15s, left .25s .1s, right .15s .175s;
|
||
}
|
||
|
||
/* Toggle Body - Checked */
|
||
input[type="checkbox"]:checked {
|
||
background-color: var(--green);
|
||
border-color: var(--green);
|
||
}
|
||
/* Toggle Thumb - Checked*/
|
||
input[type="checkbox"]:checked:after {
|
||
border: 1px solid var(--green);
|
||
left: 16px;
|
||
right: 1px;
|
||
transition: border .25s, left .15s .25s, right .25s .175s;
|
||
}`,Eu=M`
|
||
.row, .col {
|
||
display:flex;
|
||
}
|
||
.row {
|
||
align-items:center;
|
||
flex-direction: row;
|
||
}
|
||
.col {
|
||
align-items:stretch;
|
||
flex-direction: column;
|
||
}
|
||
`,ju=M`
|
||
.m-table {
|
||
border-spacing: 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
margin: 0;
|
||
max-width: 100%;
|
||
direction: ltr;
|
||
}
|
||
.m-table tr:first-child td,
|
||
.m-table tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
.m-table td,
|
||
.m-table th {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
padding: 4px 5px 4px;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.m-table.padded-12 td,
|
||
.m-table.padded-12 th {
|
||
padding: 12px;
|
||
}
|
||
|
||
.m-table td:not([align]),
|
||
.m-table th:not([align]) {
|
||
text-align: left;
|
||
}
|
||
|
||
.m-table th {
|
||
color: var(--fg2);
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 18px);
|
||
font-weight: 600;
|
||
letter-spacing: normal;
|
||
background-color: var(--bg2);
|
||
vertical-align: bottom;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
}
|
||
|
||
.m-table > tbody > tr > td,
|
||
.m-table > tr > td {
|
||
border-top: 1px solid var(--light-border-color);
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
}
|
||
.table-title {
|
||
font-size:var(--font-size-small);
|
||
font-weight:bold;
|
||
vertical-align: middle;
|
||
margin: 12px 0 4px 0;
|
||
}
|
||
`,Fg=M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
.only-large-screen { display:none; }
|
||
.endpoint-head .path {
|
||
display: flex;
|
||
font-family:var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .descr {
|
||
font-size: var(--font-size-small);
|
||
color:var(--light-fg);
|
||
font-weight:400;
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
display:none;
|
||
}
|
||
|
||
.m-endpoint.expanded { margin-bottom:16px; }
|
||
.m-endpoint > .endpoint-head{
|
||
border-width:1px 1px 1px 5px;
|
||
border-style:solid;
|
||
border-color:transparent;
|
||
border-top-color:var(--light-border-color);
|
||
display:flex;
|
||
padding:6px 16px;
|
||
align-items: center;
|
||
cursor: pointer;
|
||
}
|
||
.m-endpoint > .endpoint-head.put:hover,
|
||
.m-endpoint > .endpoint-head.put.expanded {
|
||
border-color:var(--orange);
|
||
background-color:var(--light-orange);
|
||
}
|
||
.m-endpoint > .endpoint-head.post:hover,
|
||
.m-endpoint > .endpoint-head.post.expanded {
|
||
border-color:var(--green);
|
||
background-color:var(--light-green);
|
||
}
|
||
.m-endpoint > .endpoint-head.get:hover,
|
||
.m-endpoint > .endpoint-head.get.expanded {
|
||
border-color:var(--blue);
|
||
background-color:var(--light-blue);
|
||
}
|
||
.m-endpoint > .endpoint-head.delete:hover,
|
||
.m-endpoint > .endpoint-head.delete.expanded {
|
||
border-color:var(--red);
|
||
background-color:var(--light-red);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.head:hover,
|
||
.m-endpoint > .endpoint-head.head.expanded,
|
||
.m-endpoint > .endpoint-head.patch:hover,
|
||
.m-endpoint > .endpoint-head.patch.expanded,
|
||
.m-endpoint > .endpoint-head.options:hover,
|
||
.m-endpoint > .endpoint-head.options.expanded {
|
||
border-color:var(--yellow);
|
||
background-color:var(--light-yellow);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.deprecated:hover,
|
||
.m-endpoint > .endpoint-head.deprecated.expanded {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body {
|
||
flex-wrap:wrap;
|
||
padding:16px 0px 0 0px;
|
||
border-width:0px 1px 1px 5px;
|
||
border-style:solid;
|
||
box-shadow: 0px 4px 3px -3px rgba(0, 0, 0, 0.15);
|
||
}
|
||
.m-endpoint .endpoint-body.delete{ border-color:var(--red); }
|
||
.m-endpoint .endpoint-body.put{ border-color:var(--orange); }
|
||
.m-endpoint .endpoint-body.post { border-color:var(--green); }
|
||
.m-endpoint .endpoint-body.get { border-color:var(--blue); }
|
||
.m-endpoint .endpoint-body.head,
|
||
.m-endpoint .endpoint-body.patch,
|
||
.m-endpoint .endpoint-body.options {
|
||
border-color:var(--yellow);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body.deprecated {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.endpoint-head .deprecated {
|
||
color: var(--light-fg);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.summary{
|
||
padding:8px 8px;
|
||
}
|
||
.summary .title {
|
||
font-size:calc(var(--font-size-regular) + 2px);
|
||
margin-bottom: 6px;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .method {
|
||
padding:2px 5px;
|
||
vertical-align: middle;
|
||
font-size:var(--font-size-small);
|
||
height: calc(var(--font-size-small) + 16px);
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
width: 60px;
|
||
border-radius: 2px;
|
||
display:inline-block;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
text-transform:uppercase;
|
||
margin-right:5px;
|
||
}
|
||
.endpoint-head .method.delete{ border: 2px solid var(--red);}
|
||
.endpoint-head .method.put{ border: 2px solid var(--orange); }
|
||
.endpoint-head .method.post{ border: 2px solid var(--green); }
|
||
.endpoint-head .method.get{ border: 2px solid var(--blue); }
|
||
.endpoint-head .method.get.deprecated{ border: 2px solid var(--border-color); }
|
||
.endpoint-head .method.head,
|
||
.endpoint-head .method.patch,
|
||
.endpoint-head .method.options {
|
||
border: 2px solid var(--yellow);
|
||
}
|
||
|
||
.req-resp-container {
|
||
display: flex;
|
||
margin-top:16px;
|
||
align-items: stretch;
|
||
flex-wrap: wrap;
|
||
flex-direction: column;
|
||
border-top:1px solid var(--light-border-color);
|
||
}
|
||
|
||
.view-mode-request,
|
||
api-response.view-mode {
|
||
flex:1;
|
||
min-height:100px;
|
||
padding:16px 8px;
|
||
overflow:hidden;
|
||
}
|
||
.view-mode-request {
|
||
border-width:0 0 1px 0;
|
||
border-style:dashed;
|
||
}
|
||
|
||
.head .view-mode-request,
|
||
.patch .view-mode-request,
|
||
.options .view-mode-request {
|
||
border-color:var(--yellow);
|
||
}
|
||
.put .view-mode-request {
|
||
border-color:var(--orange);
|
||
}
|
||
.post .view-mode-request {
|
||
border-color:var(--green);
|
||
}
|
||
.get .view-mode-request {
|
||
border-color:var(--blue);
|
||
}
|
||
.delete .view-mode-request {
|
||
border-color:var(--red);
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.only-large-screen { display:block; }
|
||
.endpoint-head .path{
|
||
font-size: var(--font-size-regular);
|
||
}
|
||
.endpoint-head .descr{
|
||
display: flex;
|
||
}
|
||
.endpoint-head .m-markdown-small,
|
||
.descr .m-markdown-small{
|
||
display:block;
|
||
}
|
||
.req-resp-container{
|
||
flex-direction: var(--layout, row);
|
||
flex-wrap: nowrap;
|
||
}
|
||
api-response.view-mode {
|
||
padding:16px;
|
||
}
|
||
.view-mode-request.row-layout {
|
||
border-width:0 1px 0 0;
|
||
padding:16px;
|
||
}
|
||
.summary{
|
||
padding:8px 16px;
|
||
}
|
||
}
|
||
`,pc=M`
|
||
code[class*="language-"],
|
||
pre[class*="language-"] {
|
||
text-align: left;
|
||
white-space: pre;
|
||
word-spacing: normal;
|
||
word-break: normal;
|
||
word-wrap: normal;
|
||
line-height: 1.5;
|
||
tab-size: 2;
|
||
|
||
-webkit-hyphens: none;
|
||
-moz-hyphens: none;
|
||
-ms-hyphens: none;
|
||
hyphens: none;
|
||
}
|
||
|
||
/* Code blocks */
|
||
pre[class*="language-"] {
|
||
padding: 1em;
|
||
margin: .5em 0;
|
||
overflow: auto;
|
||
}
|
||
|
||
/* Inline code */
|
||
:not(pre) > code[class*="language-"] {
|
||
white-space: normal;
|
||
}
|
||
|
||
.token.comment,
|
||
.token.block-comment,
|
||
.token.prolog,
|
||
.token.doctype,
|
||
.token.cdata {
|
||
color: var(--light-fg)
|
||
}
|
||
|
||
.token.punctuation {
|
||
color: var(--fg);
|
||
}
|
||
|
||
.token.tag,
|
||
.token.attr-name,
|
||
.token.namespace,
|
||
.token.deleted {
|
||
color:var(--pink);
|
||
}
|
||
|
||
.token.function-name {
|
||
color: var(--blue);
|
||
}
|
||
|
||
.token.boolean,
|
||
.token.number,
|
||
.token.function {
|
||
color: var(--red);
|
||
}
|
||
|
||
.token.property,
|
||
.token.class-name,
|
||
.token.constant,
|
||
.token.symbol {
|
||
color: var(--code-property-color);
|
||
}
|
||
|
||
.token.selector,
|
||
.token.important,
|
||
.token.atrule,
|
||
.token.keyword,
|
||
.token.builtin {
|
||
color: var(--code-keyword-color);
|
||
}
|
||
|
||
.token.string,
|
||
.token.char,
|
||
.token.attr-value,
|
||
.token.regex,
|
||
.token.variable {
|
||
color: var(--green);
|
||
}
|
||
|
||
.token.operator,
|
||
.token.entity,
|
||
.token.url {
|
||
color: var(--code-operator-color);
|
||
}
|
||
|
||
.token.important,
|
||
.token.bold {
|
||
font-weight: bold;
|
||
}
|
||
.token.italic {
|
||
font-style: italic;
|
||
}
|
||
|
||
.token.entity {
|
||
cursor: help;
|
||
}
|
||
|
||
.token.inserted {
|
||
color: green;
|
||
}
|
||
`,dl=M`
|
||
.tab-panel {
|
||
border: none;
|
||
}
|
||
.tab-buttons {
|
||
height:30px;
|
||
padding: 4px 4px 0 4px;
|
||
border-bottom: 1px solid var(--light-border-color) ;
|
||
align-items: stretch;
|
||
overflow-y: hidden;
|
||
overflow-x: auto;
|
||
scrollbar-width: thin;
|
||
}
|
||
.tab-buttons::-webkit-scrollbar {
|
||
height: 1px;
|
||
background-color: var(--border-color);
|
||
}
|
||
.tab-btn {
|
||
border: none;
|
||
border-bottom: 3px solid transparent;
|
||
color: var(--light-fg);
|
||
background-color: transparent;
|
||
white-space: nowrap;
|
||
cursor:pointer;
|
||
outline:none;
|
||
font-family:var(--font-regular);
|
||
font-size:var(--font-size-small);
|
||
margin-right:16px;
|
||
padding:1px;
|
||
}
|
||
.tab-btn.active {
|
||
border-bottom: 3px solid var(--primary-color);
|
||
font-weight:bold;
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.tab-btn:hover {
|
||
color:var(--primary-color);
|
||
}
|
||
.tab-content {
|
||
margin:-1px 0 0 0;
|
||
position:relative;
|
||
min-height: 50px;
|
||
}
|
||
`,va=M`
|
||
.nav-bar-info:focus-visible,
|
||
.nav-bar-tag:focus-visible,
|
||
.nav-bar-path:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: -4px;
|
||
}
|
||
.nav-bar-expand-all:focus-visible,
|
||
.nav-bar-collapse-all:focus-visible,
|
||
.nav-bar-tag-icon:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: 2px;
|
||
}
|
||
.nav-bar {
|
||
width:0;
|
||
height:100%;
|
||
overflow: hidden;
|
||
color:var(--nav-text-color);
|
||
background-color: var(--nav-bg-color);
|
||
background-blend-mode: multiply;
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
display:none;
|
||
position:relative;
|
||
flex-direction:column;
|
||
flex-wrap:nowrap;
|
||
word-break:break-word;
|
||
}
|
||
::slotted([slot=nav-logo]) {
|
||
padding:16px 16px 0 16px;
|
||
}
|
||
.nav-scroll {
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
overflow-y: overlay;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--nav-hover-bg-color) transparent;
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-direction: row;
|
||
}
|
||
.nav-bar.read .nav-bar-tag-icon {
|
||
display:none;
|
||
}
|
||
.nav-bar-paths-under-tag {
|
||
overflow:hidden;
|
||
transition: max-height .2s ease-out, visibility .3s;
|
||
}
|
||
.collapsed .nav-bar-paths-under-tag {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.nav-bar-expand-all {
|
||
transform: rotate(90deg);
|
||
cursor:pointer;
|
||
margin-right:10px;
|
||
}
|
||
.nav-bar-collapse-all {
|
||
transform: rotate(270deg);
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-expand-all:hover, .nav-bar-collapse-all:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.nav-bar-tag-icon {
|
||
color: var(--nav-text-color);
|
||
font-size: 20px;
|
||
}
|
||
.nav-bar-tag-icon:hover {
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transform: rotate(-90deg);
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar {
|
||
width: var(--scroll-bar-width, 8px);
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-thumb {
|
||
background-color: var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
font-size: var(--font-size-regular);
|
||
color: var(--nav-accent-color);
|
||
border-left:4px solid transparent;
|
||
font-weight:bold;
|
||
padding: 15px 15px 15px 10px;
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
.nav-bar-components,
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-info,
|
||
.nav-bar-tag,
|
||
.nav-bar-path {
|
||
display:flex;
|
||
cursor: pointer;
|
||
width: 100%;
|
||
border: none;
|
||
border-radius:4px;
|
||
color: var(--nav-text-color);
|
||
background: transparent;
|
||
border-left:4px solid transparent;
|
||
}
|
||
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-path {
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
padding: var(--nav-item-padding);
|
||
}
|
||
.nav-bar-path.small-font {
|
||
font-size: var(--font-size-small);
|
||
}
|
||
|
||
.nav-bar-info {
|
||
font-size: var(--font-size-regular);
|
||
padding: 16px 10px;
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
font-size: var(--font-size-small);
|
||
color: var(--nav-text-color);
|
||
padding: var(--nav-item-padding);
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section.operations {
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-section.operations:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-section:first-child {
|
||
display: none;
|
||
}
|
||
.nav-bar-h2 {margin-left:12px;}
|
||
|
||
.nav-bar-h1.left-bar.active,
|
||
.nav-bar-h2.left-bar.active,
|
||
.nav-bar-info.left-bar.active,
|
||
.nav-bar-tag.left-bar.active,
|
||
.nav-bar-path.left-bar.active,
|
||
.nav-bar-section.left-bar.operations.active {
|
||
border-left:4px solid var(--nav-accent-color);
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
|
||
.nav-bar-h1.colored-block.active,
|
||
.nav-bar-h2.colored-block.active,
|
||
.nav-bar-info.colored-block.active,
|
||
.nav-bar-tag.colored-block.active,
|
||
.nav-bar-path.colored-block.active,
|
||
.nav-bar-section.colored-block.operations.active {
|
||
background-color: var(--nav-accent-color);
|
||
color: var(--nav-accent-text-color);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.nav-bar-h1:hover,
|
||
.nav-bar-h2:hover,
|
||
.nav-bar-info:hover,
|
||
.nav-bar-tag:hover,
|
||
.nav-bar-path:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
`,Ws=M`
|
||
#api-info {
|
||
font-size: calc(var(--font-size-regular) - 1px);
|
||
margin-top: 8px;
|
||
margin-left: -15px;
|
||
}
|
||
|
||
#api-info span:before {
|
||
content: "|";
|
||
display: inline-block;
|
||
opacity: 0.5;
|
||
width: 15px;
|
||
text-align: center;
|
||
}
|
||
#api-info span:first-child:before {
|
||
content: "";
|
||
width: 0px;
|
||
}
|
||
`,fc=M`
|
||
|
||
`,eh=/[\s#:?&={}]/g,ho="_rapidoc_api_key";function Cu(t){return new Promise((n=>setTimeout(n,t)))}function hl(t,n){const i=n.target,l=document.createElement("textarea");l.value=t,l.style.position="fixed",document.body.appendChild(l),l.focus(),l.select();try{document.execCommand("copy"),i.innerText="Copied",setTimeout((()=>{i.innerText="Copy"}),5e3)}catch(h){console.error("Unable to copy",h)}document.body.removeChild(l)}function th(t,n,i=""){return`${n.method} ${n.path} ${n.summary||""} ${n.description||""} ${n.operationId||""} ${i}`.toLowerCase().includes(t.toLowerCase())}function Js(t,n=new Set){return t&&Object.keys(t).forEach((i=>{var l;if(n.add(i),t[i].properties)Js(t[i].properties,n);else if((l=t[i].items)!==null&&l!==void 0&&l.properties){var h;Js((h=t[i].items)===null||h===void 0?void 0:h.properties,n)}})),n}function Lp(t,n){if(t){const i=document.createElement("a");document.body.appendChild(i),i.style="display: none",i.href=t,i.download=n,i.click(),i.remove()}}function qg(t){if(t){const n=document.createElement("a");document.body.appendChild(n),n.style="display: none",n.href=t,n.target="_blank",n.click(),n.remove()}}const zp=Object.freeze({url:"/"}),{fetch:Au,Response:xw,Headers:bw,Request:Ou,FormData:tA,File:ww,Blob:Sw}=globalThis;function nh(t,n){return n||typeof navigator>"u"||(n=navigator),n&&n.product==="ReactNative"?!(!t||typeof t!="object"||typeof t.uri!="string"):typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||!!ArrayBuffer.isView(t)||t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function Ew(t,n){return Array.isArray(t)&&t.some((i=>nh(i,n)))}globalThis.fetch===void 0&&(globalThis.fetch=Au),globalThis.Headers===void 0&&(globalThis.Headers=bw),globalThis.Request===void 0&&(globalThis.Request=Ou),globalThis.Response===void 0&&(globalThis.Response=xw),globalThis.FormData===void 0&&(globalThis.FormData=tA),globalThis.File===void 0&&(globalThis.File=ww),globalThis.Blob===void 0&&(globalThis.Blob=Sw);class Bg extends File{constructor(n,i="",l={}){super([n],i,l),this.data=n}valueOf(){return this.data}toString(){return this.valueOf()}}function rh(t,n="reserved"){return[...t].map((i=>{if((h=>/^[a-z0-9\-._~]+$/i.test(h))(i)||(h=>":/?#[]@!$&'()*+,;=".indexOf(h)>-1)(i)&&n==="unsafe")return i;const l=new TextEncoder;return Array.from(l.encode(i)).map((h=>`0${h.toString(16).toUpperCase()}`.slice(-2))).map((h=>`%${h}`)).join("")})).join("")}function xa(t){const{value:n}=t;return Array.isArray(n)?(function({key:i,value:l,style:h,explode:v,escape:x}){if(h==="simple")return l.map((w=>is(w,x))).join(",");if(h==="label")return`.${l.map((w=>is(w,x))).join(".")}`;if(h==="matrix")return l.map((w=>is(w,x))).reduce(((w,C)=>!w||v?`${w||""};${i}=${C}`:`${w},${C}`),"");if(h==="form"){const w=v?`&${i}=`:",";return l.map((C=>is(C,x))).join(w)}if(h==="spaceDelimited"){const w=v?`${i}=`:"";return l.map((C=>is(C,x))).join(` ${w}`)}if(h==="pipeDelimited"){const w=v?`${i}=`:"";return l.map((C=>is(C,x))).join(`|${w}`)}})(t):typeof n=="object"?(function({key:i,value:l,style:h,explode:v,escape:x}){const w=Object.keys(l);return h==="simple"?w.reduce(((C,$)=>{const N=is(l[$],x);return`${C?`${C},`:""}${$}${v?"=":","}${N}`}),""):h==="label"?w.reduce(((C,$)=>{const N=is(l[$],x);return`${C?`${C}.`:"."}${$}${v?"=":"."}${N}`}),""):h==="matrix"&&v?w.reduce(((C,$)=>`${C?`${C};`:";"}${$}=${is(l[$],x)}`),""):h==="matrix"?w.reduce(((C,$)=>{const N=is(l[$],x);return`${C?`${C},`:`;${i}=`}${$},${N}`}),""):h==="form"?w.reduce(((C,$)=>{const N=is(l[$],x);return`${C?`${C}${v?"&":","}`:""}${$}${v?"=":","}${N}`}),""):void 0})(t):(function({key:i,value:l,style:h,escape:v}){return h==="simple"?is(l,v):h==="label"?`.${is(l,v)}`:h==="matrix"?`;${i}=${is(l,v)}`:h==="form"||h==="deepObject"?is(l,v):void 0})(t)}function is(t,n=!1){return Array.isArray(t)||t!==null&&typeof t=="object"?t=JSON.stringify(t):typeof t!="number"&&typeof t!="boolean"||(t=String(t)),n&&t.length>0?rh(t,n):t}const Ug={form:",",spaceDelimited:"%20",pipeDelimited:"|"},ku={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function mc(t,n,i=!1){const{collectionFormat:l,allowEmptyValue:h,serializationOption:v,encoding:x}=n,w=typeof n!="object"||Array.isArray(n)?n:n.value,C=i?N=>N.toString():N=>encodeURIComponent(N),$=C(t);if(w===void 0&&h)return[[$,""]];if(nh(w)||Ew(w))return[[$,w]];if(v)return Kg(t,w,i,v);if(x){if([typeof x.style,typeof x.explode,typeof x.allowReserved].some((N=>N!=="undefined"))){const{style:N,explode:_,allowReserved:F}=x;return Kg(t,w,i,{style:N,explode:_,allowReserved:F})}if(typeof x.contentType=="string"){if(x.contentType.startsWith("application/json")){const _=C(typeof w=="string"?w:JSON.stringify(w));return[[$,new Bg(_,"blob",{type:x.contentType})]]}const N=C(String(w));return[[$,new Bg(N,"blob",{type:x.contentType})]]}return typeof w!="object"?[[$,C(w)]]:Array.isArray(w)&&w.every((N=>typeof N!="object"))?[[$,w.map(C).join(",")]]:[[$,C(JSON.stringify(w))]]}return typeof w!="object"?[[$,C(w)]]:Array.isArray(w)?l==="multi"?[[$,w.map(C)]]:[[$,w.map(C).join(ku[l||"csv"])]]:[[$,""]]}function Kg(t,n,i,l){const h=l.style||"form",v=l.explode===void 0?h==="form":l.explode,x=!i&&(l&&l.allowReserved?"unsafe":"reserved"),w=$=>is($,x),C=i?$=>$:$=>w($);return typeof n!="object"?[[C(t),w(n)]]:Array.isArray(n)?v?[[C(t),n.map(w)]]:[[C(t),n.map(w).join(Ug[h])]]:h==="deepObject"?Object.keys(n).map(($=>[C(`${t}[${$}]`),w(n[$])])):v?Object.keys(n).map(($=>[C($),w(n[$])])):[[C(t),Object.keys(n).map(($=>[`${C($)},${w(n[$])}`])).join(",")]]}function Fp(t){return((n,{encode:i=!0}={})=>{const l=(x,w,C)=>(C==null?x.append(w,""):Array.isArray(C)?C.reduce((($,N)=>l(x,w,N)),x):C instanceof Date?x.append(w,C.toISOString()):typeof C=="object"?Object.entries(C).reduce((($,[N,_])=>l(x,`${w}[${N}]`,_)),x):x.append(w,C),x),h=Object.entries(n).reduce(((x,[w,C])=>l(x,w,C)),new URLSearchParams),v=String(h);return i?v:decodeURIComponent(v)})(Object.keys(t).reduce(((n,i)=>{for(const[l,h]of mc(i,t[i]))n[l]=h instanceof Bg?h.valueOf():h;return n}),{}),{encode:!1})}function qp(t={}){const{url:n="",query:i,form:l}=t;if(l){const v=Object.keys(l).some((w=>{const{value:C}=l[w];return nh(C)||Ew(C)})),x=t.headers["content-type"]||t.headers["Content-Type"];if(v||/multipart\/form-data/i.test(x)){const w=(h=t.form,Object.entries(h).reduce(((C,[$,N])=>{for(const[_,F]of mc($,N,!0))if(Array.isArray(F))for(const U of F)if(ArrayBuffer.isView(U)){const J=new Blob([U]);C.append(_,J)}else C.append(_,U);else if(ArrayBuffer.isView(F)){const U=new Blob([F]);C.append(_,U)}else C.append(_,F);return C}),new FormData));t.formdata=w,t.body=w}else t.body=Fp(l);delete t.form}var h;if(i){const[v,x]=n.split("?");let w="";if(x){const $=new URLSearchParams(x);Object.keys(i).forEach((N=>$.delete(N))),w=String($)}const C=((...$)=>{const N=$.filter((_=>_)).join("&");return N?`?${N}`:""})(w,Fp(i));t.url=v+C,delete t.query}return t}function Ru(t){return t==null}var ar={isNothing:Ru,isObject:function(t){return typeof t=="object"&&t!==null},toArray:function(t){return Array.isArray(t)?t:Ru(t)?[]:[t]},repeat:function(t,n){var i,l="";for(i=0;i<n;i+=1)l+=t;return l},isNegativeZero:function(t){return t===0&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,n){var i,l,h,v;if(n)for(i=0,l=(v=Object.keys(n)).length;i<l;i+=1)t[h=v[i]]=n[h];return t}};function Bp(t,n){var i="",l=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(i+=`
|
||
|
||
`+t.mark.snippet),l+" "+i):l}function po(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=Bp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}po.prototype=Object.create(Error.prototype),po.prototype.constructor=po,po.prototype.toString=function(t){return this.name+": "+Bp(this,t)};var Rr=po;function sh(t,n,i,l,h){var v="",x="",w=Math.floor(h/2)-1;return l-n>w&&(n=l-w+(v=" ... ").length),i-l>w&&(i=l+w-(x=" ...").length),{str:v+t.slice(n,i).replace(/\t/g,"→")+x,pos:l-n+v.length}}function Tu(t,n){return ar.repeat(" ",n-t.length)+t}var jw=function(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i,l=/\r?\n|\r|\0/g,h=[0],v=[],x=-1;i=l.exec(t.buffer);)v.push(i.index),h.push(i.index+i[0].length),t.position<=i.index&&x<0&&(x=h.length-2);x<0&&(x=h.length-1);var w,C,$="",N=Math.min(t.line+n.linesAfter,v.length).toString().length,_=n.maxLength-(n.indent+N+3);for(w=1;w<=n.linesBefore&&!(x-w<0);w++)C=sh(t.buffer,h[x-w],v[x-w],t.position-(h[x]-h[x-w]),_),$=ar.repeat(" ",n.indent)+Tu((t.line-w+1).toString(),N)+" | "+C.str+`
|
||
`+$;for(C=sh(t.buffer,h[x],v[x],t.position,_),$+=ar.repeat(" ",n.indent)+Tu((t.line+1).toString(),N)+" | "+C.str+`
|
||
`,$+=ar.repeat("-",n.indent+N+3+C.pos)+`^
|
||
`,w=1;w<=n.linesAfter&&!(x+w>=v.length);w++)C=sh(t.buffer,h[x+w],v[x+w],t.position-(h[x]-h[x+w]),_),$+=ar.repeat(" ",n.indent)+Tu((t.line+w+1).toString(),N)+" | "+C.str+`
|
||
`;return $.replace(/\n$/,"")},Up=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Kp=["scalar","sequence","mapping"],as=function(t,n){if(n=n||{},Object.keys(n).forEach((function(i){if(Up.indexOf(i)===-1)throw new Rr('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')})),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=(function(i){var l={};return i!==null&&Object.keys(i).forEach((function(h){i[h].forEach((function(v){l[String(v)]=h}))})),l})(n.styleAliases||null),Kp.indexOf(this.kind)===-1)throw new Rr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Ms(t,n){var i=[];return t[n].forEach((function(l){var h=i.length;i.forEach((function(v,x){v.tag===l.tag&&v.kind===l.kind&&v.multi===l.multi&&(h=x)})),i[h]=l})),i}function fo(t){return this.extend(t)}fo.prototype.extend=function(t){var n=[],i=[];if(t instanceof as)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Rr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}n.forEach((function(h){if(!(h instanceof as))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new Rr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new Rr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(h){if(!(h instanceof as))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var l=Object.create(fo.prototype);return l.implicit=(this.implicit||[]).concat(n),l.explicit=(this.explicit||[]).concat(i),l.compiledImplicit=Ms(l,"implicit"),l.compiledExplicit=Ms(l,"explicit"),l.compiledTypeMap=(function(){var h,v,x={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function w(C){C.multi?(x.multi[C.kind].push(C),x.multi.fallback.push(C)):x[C.kind][C.tag]=x.fallback[C.tag]=C}for(h=0,v=arguments.length;h<v;h+=1)arguments[h].forEach(w);return x})(l.compiledImplicit,l.compiledExplicit),l};var ih=fo,_u=new as("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Cw=new as("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Vp=new as("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Hp=new ih({explicit:[_u,Cw,Vp]}),$u=new as("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")},construct:function(){return null},predicate:function(t){return t===null},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ah=new as("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")},construct:function(t){return t==="true"||t==="True"||t==="TRUE"},predicate:function(t){return Object.prototype.toString.call(t)==="[object Boolean]"},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function Aw(t){return 48<=t&&t<=55}function nA(t){return 48<=t&&t<=57}var Ow=new as("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=t.length,h=0,v=!1;if(!l)return!1;if((n=t[h])!=="-"&&n!=="+"||(n=t[++h]),n==="0"){if(h+1===l)return!0;if((n=t[++h])==="b"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(n!=="0"&&n!=="1")return!1;v=!0}return v&&n!=="_"}if(n==="x"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(!(48<=(i=t.charCodeAt(h))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;v=!0}return v&&n!=="_"}if(n==="o"){for(h++;h<l;h++)if((n=t[h])!=="_"){if(!Aw(t.charCodeAt(h)))return!1;v=!0}return v&&n!=="_"}}if(n==="_")return!1;for(;h<l;h++)if((n=t[h])!=="_"){if(!nA(t.charCodeAt(h)))return!1;v=!0}return!(!v||n==="_")},construct:function(t){var n,i=t,l=1;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),(n=i[0])!=="-"&&n!=="+"||(n==="-"&&(l=-1),n=(i=i.slice(1))[0]),i==="0")return 0;if(n==="0"){if(i[1]==="b")return l*parseInt(i.slice(2),2);if(i[1]==="x")return l*parseInt(i.slice(2),16);if(i[1]==="o")return l*parseInt(i.slice(2),8)}return l*parseInt(i,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1==0&&!ar.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),rA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Vg=/^[-+]?[0-9]+e/,kw=new as("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return t!==null&&!(!rA.test(t)||t[t.length-1]==="_")},construct:function(t){var n,i;return i=(n=t.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||ar.isNegativeZero(t))},represent:function(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ar.isNegativeZero(t))return"-0.0";return i=t.toString(10),Vg.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Rw=Hp.extend({implicit:[$u,ah,Ow,kw]}),Tw=Rw,_w=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$w=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Hg=new as("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return t!==null&&(_w.exec(t)!==null||$w.exec(t)!==null)},construct:function(t){var n,i,l,h,v,x,w,C,$=0,N=null;if((n=_w.exec(t))===null&&(n=$w.exec(t)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,h=+n[3],!n[4])return new Date(Date.UTC(i,l,h));if(v=+n[4],x=+n[5],w=+n[6],n[7]){for($=n[7].slice(0,3);$.length<3;)$+="0";$=+$}return n[9]&&(N=6e4*(60*+n[10]+ +(n[11]||0)),n[9]==="-"&&(N=-N)),C=new Date(Date.UTC(i,l,h,v,x,w,$)),N&&C.setTime(C.getTime()-N),C},instanceOf:Date,represent:function(t){return t.toISOString()}}),Nw=new as("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return t==="<<"||t===null}}),Gg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,Dw=new as("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=0,h=t.length,v=Gg;for(i=0;i<h;i++)if(!((n=v.indexOf(t.charAt(i)))>64)){if(n<0)return!1;l+=6}return l%8==0},construct:function(t){var n,i,l=t.replace(/[\r\n=]/g,""),h=l.length,v=Gg,x=0,w=[];for(n=0;n<h;n++)n%4==0&&n&&(w.push(x>>16&255),w.push(x>>8&255),w.push(255&x)),x=x<<6|v.indexOf(l.charAt(n));return(i=h%4*6)==0?(w.push(x>>16&255),w.push(x>>8&255),w.push(255&x)):i===18?(w.push(x>>10&255),w.push(x>>2&255)):i===12&&w.push(x>>4&255),new Uint8Array(w)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"},represent:function(t){var n,i,l="",h=0,v=t.length,x=Gg;for(n=0;n<v;n++)n%3==0&&n&&(l+=x[h>>18&63],l+=x[h>>12&63],l+=x[h>>6&63],l+=x[63&h]),h=(h<<8)+t[n];return(i=v%3)==0?(l+=x[h>>18&63],l+=x[h>>12&63],l+=x[h>>6&63],l+=x[63&h]):i===2?(l+=x[h>>10&63],l+=x[h>>4&63],l+=x[h<<2&63],l+=x[64]):i===1&&(l+=x[h>>2&63],l+=x[h<<4&63],l+=x[64],l+=x[64]),l}}),sA=Object.prototype.hasOwnProperty,Xg=Object.prototype.toString,Pw=new as("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,h,v,x=[],w=t;for(n=0,i=w.length;n<i;n+=1){if(l=w[n],v=!1,Xg.call(l)!=="[object Object]")return!1;for(h in l)if(sA.call(l,h)){if(v)return!1;v=!0}if(!v||x.indexOf(h)!==-1)return!1;x.push(h)}return!0},construct:function(t){return t!==null?t:[]}}),iA=Object.prototype.toString,Mw=new as("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,h,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1){if(l=x[n],iA.call(l)!=="[object Object]"||(h=Object.keys(l)).length!==1)return!1;v[n]=[h[0],l[h[0]]]}return!0},construct:function(t){if(t===null)return[];var n,i,l,h,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1)l=x[n],h=Object.keys(l),v[n]=[h[0],l[h[0]]];return v}}),Iw=Object.prototype.hasOwnProperty,Lw=new as("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(t===null)return!0;var n,i=t;for(n in i)if(Iw.call(i,n)&&i[n]!==null)return!1;return!0},construct:function(t){return t!==null?t:{}}}),Yg=Tw.extend({implicit:[Hg,Nw],explicit:[Dw,Pw,Mw,Lw]}),pl=Object.prototype.hasOwnProperty,aA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oA=/[\x85\u2028\u2029]/,lA=/[,\[\]\{\}]/,zw=/^(?:!|!!|![a-z\-]+!)$/i,Fw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function qw(t){return Object.prototype.toString.call(t)}function Gi(t){return t===10||t===13}function ba(t){return t===9||t===32}function Qs(t){return t===9||t===32||t===10||t===13}function gc(t){return t===44||t===91||t===93||t===123||t===125}function Bw(t){var n;return 48<=t&&t<=57?t-48:97<=(n=32|t)&&n<=102?n-97+10:-1}function Zg(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Uw(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var Wg=new Array(256),yc=new Array(256),Nu=0;Nu<256;Nu++)Wg[Nu]=Zg(Nu)?1:0,yc[Nu]=Zg(Nu);function cA(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||Yg,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Kw(t,n){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=jw(i),new Rr(n,i)}function Bt(t,n){throw Kw(t,n)}function oh(t,n){t.onWarning&&t.onWarning.call(null,Kw(t,n))}var Du={YAML:function(t,n,i){var l,h,v;t.version!==null&&Bt(t,"duplication of %YAML directive"),i.length!==1&&Bt(t,"YAML directive accepts exactly one argument"),(l=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))===null&&Bt(t,"ill-formed argument of the YAML directive"),h=parseInt(l[1],10),v=parseInt(l[2],10),h!==1&&Bt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=v<2,v!==1&&v!==2&&oh(t,"unsupported YAML version of the document")},TAG:function(t,n,i){var l,h;i.length!==2&&Bt(t,"TAG directive accepts exactly two arguments"),l=i[0],h=i[1],zw.test(l)||Bt(t,"ill-formed tag handle (first argument) of the TAG directive"),pl.call(t.tagMap,l)&&Bt(t,'there is a previously declared suffix for "'+l+'" tag handle'),Fw.test(h)||Bt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{h=decodeURIComponent(h)}catch{Bt(t,"tag prefix is malformed: "+h)}t.tagMap[l]=h}};function Xi(t,n,i,l){var h,v,x,w;if(n<i){if(w=t.input.slice(n,i),l)for(h=0,v=w.length;h<v;h+=1)(x=w.charCodeAt(h))===9||32<=x&&x<=1114111||Bt(t,"expected valid JSON character");else aA.test(w)&&Bt(t,"the stream contains non-printable characters");t.result+=w}}function Vw(t,n,i,l){var h,v,x,w;for(ar.isObject(i)||Bt(t,"cannot merge mappings; the provided source object is unacceptable"),x=0,w=(h=Object.keys(i)).length;x<w;x+=1)v=h[x],pl.call(n,v)||(n[v]=i[v],l[v]=!0)}function mo(t,n,i,l,h,v,x,w,C){var $,N;if(Array.isArray(h))for($=0,N=(h=Array.prototype.slice.call(h)).length;$<N;$+=1)Array.isArray(h[$])&&Bt(t,"nested arrays are not supported inside keys"),typeof h=="object"&&qw(h[$])==="[object Object]"&&(h[$]="[object Object]");if(typeof h=="object"&&qw(h)==="[object Object]"&&(h="[object Object]"),h=String(h),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(v))for($=0,N=v.length;$<N;$+=1)Vw(t,n,v[$],i);else Vw(t,n,v,i);else t.json||pl.call(i,h)||!pl.call(n,h)||(t.line=x||t.line,t.lineStart=w||t.lineStart,t.position=C||t.position,Bt(t,"duplicated mapping key")),h==="__proto__"?Object.defineProperty(n,h,{configurable:!0,enumerable:!0,writable:!0,value:v}):n[h]=v,delete i[h];return n}function Gp(t){var n;(n=t.input.charCodeAt(t.position))===10?t.position++:n===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Bt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Nr(t,n,i){for(var l=0,h=t.input.charCodeAt(t.position);h!==0;){for(;ba(h);)h===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),h=t.input.charCodeAt(++t.position);if(n&&h===35)do h=t.input.charCodeAt(++t.position);while(h!==10&&h!==13&&h!==0);if(!Gi(h))break;for(Gp(t),h=t.input.charCodeAt(t.position),l++,t.lineIndent=0;h===32;)t.lineIndent++,h=t.input.charCodeAt(++t.position)}return i!==-1&&l!==0&&t.lineIndent<i&&oh(t,"deficient indentation"),l}function Pu(t){var n,i=t.position;return!((n=t.input.charCodeAt(i))!==45&&n!==46||n!==t.input.charCodeAt(i+1)||n!==t.input.charCodeAt(i+2)||(i+=3,(n=t.input.charCodeAt(i))!==0&&!Qs(n)))}function lh(t,n){n===1?t.result+=" ":n>1&&(t.result+=ar.repeat(`
|
||
`,n-1))}function Jg(t,n){var i,l,h=t.tag,v=t.anchor,x=[],w=!1;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=x),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Bt(t,"tab characters must not be used in indentation")),l===45)&&Qs(t.input.charCodeAt(t.position+1));)if(w=!0,t.position++,Nr(t,!0,-1)&&t.lineIndent<=n)x.push(null),l=t.input.charCodeAt(t.position);else if(i=t.line,Mu(t,n,3,!1,!0),x.push(t.result),Nr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&l!==0)Bt(t,"bad indentation of a sequence entry");else if(t.lineIndent<n)break;return!!w&&(t.tag=h,t.anchor=v,t.kind="sequence",t.result=x,!0)}function Hw(t){var n,i,l,h,v=!1,x=!1;if((h=t.input.charCodeAt(t.position))!==33)return!1;if(t.tag!==null&&Bt(t,"duplication of a tag property"),(h=t.input.charCodeAt(++t.position))===60?(v=!0,h=t.input.charCodeAt(++t.position)):h===33?(x=!0,i="!!",h=t.input.charCodeAt(++t.position)):i="!",n=t.position,v){do h=t.input.charCodeAt(++t.position);while(h!==0&&h!==62);t.position<t.length?(l=t.input.slice(n,t.position),h=t.input.charCodeAt(++t.position)):Bt(t,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!Qs(h);)h===33&&(x?Bt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(n-1,t.position+1),zw.test(i)||Bt(t,"named tag handle cannot contain such characters"),x=!0,n=t.position+1)),h=t.input.charCodeAt(++t.position);l=t.input.slice(n,t.position),lA.test(l)&&Bt(t,"tag suffix cannot contain flow indicator characters")}l&&!Fw.test(l)&&Bt(t,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{Bt(t,"tag name is malformed: "+l)}return v?t.tag=l:pl.call(t.tagMap,i)?t.tag=t.tagMap[i]+l:i==="!"?t.tag="!"+l:i==="!!"?t.tag="tag:yaml.org,2002:"+l:Bt(t,'undeclared tag handle "'+i+'"'),!0}function Gw(t){var n,i;if((i=t.input.charCodeAt(t.position))!==38)return!1;for(t.anchor!==null&&Bt(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),n=t.position;i!==0&&!Qs(i)&&!gc(i);)i=t.input.charCodeAt(++t.position);return t.position===n&&Bt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(n,t.position),!0}function Mu(t,n,i,l,h){var v,x,w,C,$,N,_,F,U,J=1,Y=!1,W=!1;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,v=x=w=i===4||i===3,l&&Nr(t,!0,-1)&&(Y=!0,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)),J===1)for(;Hw(t)||Gw(t);)Nr(t,!0,-1)?(Y=!0,w=v,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)):w=!1;if(w&&(w=Y||h),J!==1&&i!==4||(F=i===1||i===2?n:n+1,U=t.position-t.lineStart,J===1?w&&(Jg(t,U)||(function(P,se,ae){var he,ge,pe,Te,Ae,qe,Se,me=P.tag,Me=P.anchor,Ie={},Qe=Object.create(null),ct=null,qt=null,kn=null,Tt=!1,on=!1;if(P.firstTabInLine!==-1)return!1;for(P.anchor!==null&&(P.anchorMap[P.anchor]=Ie),Se=P.input.charCodeAt(P.position);Se!==0;){if(Tt||P.firstTabInLine===-1||(P.position=P.firstTabInLine,Bt(P,"tab characters must not be used in indentation")),he=P.input.charCodeAt(P.position+1),pe=P.line,Se!==63&&Se!==58||!Qs(he)){if(Te=P.line,Ae=P.lineStart,qe=P.position,!Mu(P,ae,2,!1,!0))break;if(P.line===pe){for(Se=P.input.charCodeAt(P.position);ba(Se);)Se=P.input.charCodeAt(++P.position);if(Se===58)Qs(Se=P.input.charCodeAt(++P.position))||Bt(P,"a whitespace character is expected after the key-value separator within a block mapping"),Tt&&(mo(P,Ie,Qe,ct,qt,null,Te,Ae,qe),ct=qt=kn=null),on=!0,Tt=!1,ge=!1,ct=P.tag,qt=P.result;else{if(!on)return P.tag=me,P.anchor=Me,!0;Bt(P,"can not read an implicit mapping pair; a colon is missed")}}else{if(!on)return P.tag=me,P.anchor=Me,!0;Bt(P,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else Se===63?(Tt&&(mo(P,Ie,Qe,ct,qt,null,Te,Ae,qe),ct=qt=kn=null),on=!0,Tt=!0,ge=!0):Tt?(Tt=!1,ge=!0):Bt(P,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),P.position+=1,Se=he;if((P.line===pe||P.lineIndent>se)&&(Tt&&(Te=P.line,Ae=P.lineStart,qe=P.position),Mu(P,se,4,!0,ge)&&(Tt?qt=P.result:kn=P.result),Tt||(mo(P,Ie,Qe,ct,qt,kn,Te,Ae,qe),ct=qt=kn=null),Nr(P,!0,-1),Se=P.input.charCodeAt(P.position)),(P.line===pe||P.lineIndent>se)&&Se!==0)Bt(P,"bad indentation of a mapping entry");else if(P.lineIndent<se)break}return Tt&&mo(P,Ie,Qe,ct,qt,null,Te,Ae,qe),on&&(P.tag=me,P.anchor=Me,P.kind="mapping",P.result=Ie),on})(t,U,F))||(function(P,se){var ae,he,ge,pe,Te,Ae,qe,Se,me,Me,Ie,Qe,ct=!0,qt=P.tag,kn=P.anchor,Tt=Object.create(null);if((Qe=P.input.charCodeAt(P.position))===91)Te=93,Se=!1,pe=[];else{if(Qe!==123)return!1;Te=125,Se=!0,pe={}}for(P.anchor!==null&&(P.anchorMap[P.anchor]=pe),Qe=P.input.charCodeAt(++P.position);Qe!==0;){if(Nr(P,!0,se),(Qe=P.input.charCodeAt(P.position))===Te)return P.position++,P.tag=qt,P.anchor=kn,P.kind=Se?"mapping":"sequence",P.result=pe,!0;ct?Qe===44&&Bt(P,"expected the node content, but found ','"):Bt(P,"missed comma between flow collection entries"),Ie=null,Ae=qe=!1,Qe===63&&Qs(P.input.charCodeAt(P.position+1))&&(Ae=qe=!0,P.position++,Nr(P,!0,se)),ae=P.line,he=P.lineStart,ge=P.position,Mu(P,se,1,!1,!0),Me=P.tag,me=P.result,Nr(P,!0,se),Qe=P.input.charCodeAt(P.position),!qe&&P.line!==ae||Qe!==58||(Ae=!0,Qe=P.input.charCodeAt(++P.position),Nr(P,!0,se),Mu(P,se,1,!1,!0),Ie=P.result),Se?mo(P,pe,Tt,Me,me,Ie,ae,he,ge):Ae?pe.push(mo(P,null,Tt,Me,me,Ie,ae,he,ge)):pe.push(me),Nr(P,!0,se),(Qe=P.input.charCodeAt(P.position))===44?(ct=!0,Qe=P.input.charCodeAt(++P.position)):ct=!1}Bt(P,"unexpected end of the stream within a flow collection")})(t,F)?W=!0:(x&&(function(P,se){var ae,he,ge,pe,Te,Ae=1,qe=!1,Se=!1,me=se,Me=0,Ie=!1;if((pe=P.input.charCodeAt(P.position))===124)he=!1;else{if(pe!==62)return!1;he=!0}for(P.kind="scalar",P.result="";pe!==0;)if((pe=P.input.charCodeAt(++P.position))===43||pe===45)Ae===1?Ae=pe===43?3:2:Bt(P,"repeat of a chomping mode identifier");else{if(!((ge=48<=(Te=pe)&&Te<=57?Te-48:-1)>=0))break;ge===0?Bt(P,"bad explicit indentation width of a block scalar; it cannot be less than one"):Se?Bt(P,"repeat of an indentation width identifier"):(me=se+ge-1,Se=!0)}if(ba(pe)){do pe=P.input.charCodeAt(++P.position);while(ba(pe));if(pe===35)do pe=P.input.charCodeAt(++P.position);while(!Gi(pe)&&pe!==0)}for(;pe!==0;){for(Gp(P),P.lineIndent=0,pe=P.input.charCodeAt(P.position);(!Se||P.lineIndent<me)&&pe===32;)P.lineIndent++,pe=P.input.charCodeAt(++P.position);if(!Se&&P.lineIndent>me&&(me=P.lineIndent),Gi(pe))Me++;else{if(P.lineIndent<me){Ae===3?P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me):Ae===1&&qe&&(P.result+=`
|
||
`);break}for(he?ba(pe)?(Ie=!0,P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me)):Ie?(Ie=!1,P.result+=ar.repeat(`
|
||
`,Me+1)):Me===0?qe&&(P.result+=" "):P.result+=ar.repeat(`
|
||
`,Me):P.result+=ar.repeat(`
|
||
`,qe?1+Me:Me),qe=!0,Se=!0,Me=0,ae=P.position;!Gi(pe)&&pe!==0;)pe=P.input.charCodeAt(++P.position);Xi(P,ae,P.position,!1)}}return!0})(t,F)||(function(P,se){var ae,he,ge;if((ae=P.input.charCodeAt(P.position))!==39)return!1;for(P.kind="scalar",P.result="",P.position++,he=ge=P.position;(ae=P.input.charCodeAt(P.position))!==0;)if(ae===39){if(Xi(P,he,P.position,!0),(ae=P.input.charCodeAt(++P.position))!==39)return!0;he=P.position,P.position++,ge=P.position}else Gi(ae)?(Xi(P,he,ge,!0),lh(P,Nr(P,!1,se)),he=ge=P.position):P.position===P.lineStart&&Pu(P)?Bt(P,"unexpected end of the document within a single quoted scalar"):(P.position++,ge=P.position);Bt(P,"unexpected end of the stream within a single quoted scalar")})(t,F)||(function(P,se){var ae,he,ge,pe,Te,Ae,qe;if((Ae=P.input.charCodeAt(P.position))!==34)return!1;for(P.kind="scalar",P.result="",P.position++,ae=he=P.position;(Ae=P.input.charCodeAt(P.position))!==0;){if(Ae===34)return Xi(P,ae,P.position,!0),P.position++,!0;if(Ae===92){if(Xi(P,ae,P.position,!0),Gi(Ae=P.input.charCodeAt(++P.position)))Nr(P,!1,se);else if(Ae<256&&Wg[Ae])P.result+=yc[Ae],P.position++;else if((Te=(qe=Ae)===120?2:qe===117?4:qe===85?8:0)>0){for(ge=Te,pe=0;ge>0;ge--)(Te=Bw(Ae=P.input.charCodeAt(++P.position)))>=0?pe=(pe<<4)+Te:Bt(P,"expected hexadecimal character");P.result+=Uw(pe),P.position++}else Bt(P,"unknown escape sequence");ae=he=P.position}else Gi(Ae)?(Xi(P,ae,he,!0),lh(P,Nr(P,!1,se)),ae=he=P.position):P.position===P.lineStart&&Pu(P)?Bt(P,"unexpected end of the document within a double quoted scalar"):(P.position++,he=P.position)}Bt(P,"unexpected end of the stream within a double quoted scalar")})(t,F)?W=!0:(function(P){var se,ae,he;if((he=P.input.charCodeAt(P.position))!==42)return!1;for(he=P.input.charCodeAt(++P.position),se=P.position;he!==0&&!Qs(he)&&!gc(he);)he=P.input.charCodeAt(++P.position);return P.position===se&&Bt(P,"name of an alias node must contain at least one character"),ae=P.input.slice(se,P.position),pl.call(P.anchorMap,ae)||Bt(P,'unidentified alias "'+ae+'"'),P.result=P.anchorMap[ae],Nr(P,!0,-1),!0})(t)?(W=!0,t.tag===null&&t.anchor===null||Bt(t,"alias node should not have any properties")):(function(P,se,ae){var he,ge,pe,Te,Ae,qe,Se,me,Me=P.kind,Ie=P.result;if(Qs(me=P.input.charCodeAt(P.position))||gc(me)||me===35||me===38||me===42||me===33||me===124||me===62||me===39||me===34||me===37||me===64||me===96||(me===63||me===45)&&(Qs(he=P.input.charCodeAt(P.position+1))||ae&&gc(he)))return!1;for(P.kind="scalar",P.result="",ge=pe=P.position,Te=!1;me!==0;){if(me===58){if(Qs(he=P.input.charCodeAt(P.position+1))||ae&&gc(he))break}else if(me===35){if(Qs(P.input.charCodeAt(P.position-1)))break}else{if(P.position===P.lineStart&&Pu(P)||ae&&gc(me))break;if(Gi(me)){if(Ae=P.line,qe=P.lineStart,Se=P.lineIndent,Nr(P,!1,-1),P.lineIndent>=se){Te=!0,me=P.input.charCodeAt(P.position);continue}P.position=pe,P.line=Ae,P.lineStart=qe,P.lineIndent=Se;break}}Te&&(Xi(P,ge,pe,!1),lh(P,P.line-Ae),ge=pe=P.position,Te=!1),ba(me)||(pe=P.position+1),me=P.input.charCodeAt(++P.position)}return Xi(P,ge,pe,!1),!!P.result||(P.kind=Me,P.result=Ie,!1)})(t,F,i===1)&&(W=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):J===0&&(W=w&&Jg(t,U))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Bt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),C=0,$=t.implicitTypes.length;C<$;C+=1)if((_=t.implicitTypes[C]).resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(pl.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,C=0,$=(N=t.typeMap.multi[t.kind||"fallback"]).length;C<$;C+=1)if(t.tag.slice(0,N[C].tag.length)===N[C].tag){_=N[C];break}_||Bt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&Bt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Bt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||W}function uA(t){var n,i,l,h,v=t.position,x=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(h=t.input.charCodeAt(t.position))!==0&&(Nr(t,!0,-1),h=t.input.charCodeAt(t.position),!(t.lineIndent>0||h!==37));){for(x=!0,h=t.input.charCodeAt(++t.position),n=t.position;h!==0&&!Qs(h);)h=t.input.charCodeAt(++t.position);for(l=[],(i=t.input.slice(n,t.position)).length<1&&Bt(t,"directive name must not be less than one character in length");h!==0;){for(;ba(h);)h=t.input.charCodeAt(++t.position);if(h===35){do h=t.input.charCodeAt(++t.position);while(h!==0&&!Gi(h));break}if(Gi(h))break;for(n=t.position;h!==0&&!Qs(h);)h=t.input.charCodeAt(++t.position);l.push(t.input.slice(n,t.position))}h!==0&&Gp(t),pl.call(Du,i)?Du[i](t,i,l):oh(t,'unknown document directive "'+i+'"')}Nr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Nr(t,!0,-1)):x&&Bt(t,"directives end mark is expected"),Mu(t,t.lineIndent-1,4,!1,!0),Nr(t,!0,-1),t.checkLineBreaks&&oA.test(t.input.slice(v,t.position))&&oh(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Pu(t)?t.input.charCodeAt(t.position)===46&&(t.position+=3,Nr(t,!0,-1)):t.position<t.length-1&&Bt(t,"end of the stream or a document separator is expected")}function Xw(t,n){n=n||{},(t=String(t)).length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new cA(t,n),l=t.indexOf("\0");for(l!==-1&&(i.position=l,Bt(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)uA(i);return i.documents}var dA=function(t,n,i){n!==null&&typeof n=="object"&&i===void 0&&(i=n,n=null);var l=Xw(t,i);if(typeof n!="function")return l;for(var h=0,v=l.length;h<v;h+=1)n(l[h])},hA=function(t,n){var i=Xw(t,n);if(i.length!==0){if(i.length===1)return i[0];throw new Rr("expected a single document in the stream, but found more")}},ei=Object.prototype.toString,Iu=Object.prototype.hasOwnProperty,Yw={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Zw=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ww=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jw(t){var n,i,l;if(n=t.toString(16).toUpperCase(),t<=255)i="x",l=2;else if(t<=65535)i="u",l=4;else{if(!(t<=4294967295))throw new Rr("code point within a string may not be greater than 0xFFFFFFFF");i="U",l=8}return"\\"+i+ar.repeat("0",l-n.length)+n}function Qg(t){this.schema=t.schema||Yg,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ar.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=(function(n,i){var l,h,v,x,w,C,$;if(i===null)return{};for(l={},v=0,x=(h=Object.keys(i)).length;v<x;v+=1)w=h[v],C=String(i[w]),w.slice(0,2)==="!!"&&(w="tag:yaml.org,2002:"+w.slice(2)),($=n.compiledTypeMap.fallback[w])&&Iu.call($.styleAliases,C)&&(C=$.styleAliases[C]),l[w]=C;return l})(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Qw(t,n){for(var i,l=ar.repeat(" ",n),h=0,v=-1,x="",w=t.length;h<w;)(v=t.indexOf(`
|
||
`,h))===-1?(i=t.slice(h),h=w):(i=t.slice(h,v+1),h=v+1),i.length&&i!==`
|
||
`&&(x+=l),x+=i;return x}function fl(t,n){return`
|
||
`+ar.repeat(" ",t.indent*n)}function Lu(t){return t===32||t===9}function go(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function Xp(t){return go(t)&&t!==65279&&t!==13&&t!==10}function ey(t,n,i){var l=Xp(t),h=l&&!Lu(t);return(i?l:l&&t!==44&&t!==91&&t!==93&&t!==123&&t!==125)&&t!==35&&!(n===58&&!h)||Xp(n)&&!Lu(n)&&t===35||n===58&&h}function wa(t,n){var i,l=t.charCodeAt(n);return l>=55296&&l<=56319&&n+1<t.length&&(i=t.charCodeAt(n+1))>=56320&&i<=57343?1024*(l-55296)+i-56320+65536:l}function vc(t){return/^\n* /.test(t)}function ty(t,n,i,l,h){t.dump=(function(){if(n.length===0)return t.quotingType===2?'""':"''";if(!t.noCompatMode&&(Zw.indexOf(n)!==-1||Ww.test(n)))return t.quotingType===2?'"'+n+'"':"'"+n+"'";var v=t.indent*Math.max(1,i),x=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-v),w=l||t.flowLevel>-1&&i>=t.flowLevel;switch((function(C,$,N,_,F,U,J,Y){var W,P,se=0,ae=null,he=!1,ge=!1,pe=_!==-1,Te=-1,Ae=go(P=wa(C,0))&&P!==65279&&!Lu(P)&&P!==45&&P!==63&&P!==58&&P!==44&&P!==91&&P!==93&&P!==123&&P!==125&&P!==35&&P!==38&&P!==42&&P!==33&&P!==124&&P!==61&&P!==62&&P!==39&&P!==34&&P!==37&&P!==64&&P!==96&&(function(qe){return!Lu(qe)&&qe!==58})(wa(C,C.length-1));if($||J)for(W=0;W<C.length;se>=65536?W+=2:W++){if(!go(se=wa(C,W)))return 5;Ae=Ae&&ey(se,ae,Y),ae=se}else{for(W=0;W<C.length;se>=65536?W+=2:W++){if((se=wa(C,W))===10)he=!0,pe&&(ge=ge||W-Te-1>_&&C[Te+1]!==" ",Te=W);else if(!go(se))return 5;Ae=Ae&&ey(se,ae,Y),ae=se}ge=ge||pe&&W-Te-1>_&&C[Te+1]!==" "}return he||ge?N>9&&vc(C)?5:J?U===2?5:2:ge?4:3:!Ae||J||F(C)?U===2?5:2:1})(n,w,t.indent,x,(function(C){return(function($,N){var _,F;for(_=0,F=$.implicitTypes.length;_<F;_+=1)if($.implicitTypes[_].resolve(N))return!0;return!1})(t,C)}),t.quotingType,t.forceQuotes&&!l,h)){case 1:return n;case 2:return"'"+n.replace(/'/g,"''")+"'";case 3:return"|"+ny(n,t.indent)+ml(Qw(n,v));case 4:return">"+ny(n,t.indent)+ml(Qw((function(C,$){for(var N,_,F,U=/(\n+)([^\n]*)/g,J=(F=(F=C.indexOf(`
|
||
`))!==-1?F:C.length,U.lastIndex=F,ry(C.slice(0,F),$)),Y=C[0]===`
|
||
`||C[0]===" ";_=U.exec(C);){var W=_[1],P=_[2];N=P[0]===" ",J+=W+(Y||N||P===""?"":`
|
||
`)+ry(P,$),Y=N}return J})(n,x),v));case 5:return'"'+(function(C){for(var $,N="",_=0,F=0;F<C.length;_>=65536?F+=2:F++)_=wa(C,F),!($=Yw[_])&&go(_)?(N+=C[F],_>=65536&&(N+=C[F+1])):N+=$||Jw(_);return N})(n)+'"';default:throw new Rr("impossible error: invalid scalar style")}})()}function ny(t,n){var i=vc(t)?String(n):"",l=t[t.length-1]===`
|
||
`;return i+(!l||t[t.length-2]!==`
|
||
`&&t!==`
|
||
`?l?"":"-":"+")+`
|
||
`}function ml(t){return t[t.length-1]===`
|
||
`?t.slice(0,-1):t}function ry(t,n){if(t===""||t[0]===" ")return t;for(var i,l,h=/ [^ ]/g,v=0,x=0,w=0,C="";i=h.exec(t);)(w=i.index)-v>n&&(l=x>v?x:w,C+=`
|
||
`+t.slice(v,l),v=l+1),x=w;return C+=`
|
||
`,t.length-v>n&&x>v?C+=t.slice(v,x)+`
|
||
`+t.slice(x+1):C+=t.slice(v),C.slice(1)}function sy(t,n,i,l){var h,v,x,w="",C=t.tag;for(h=0,v=i.length;h<v;h+=1)x=i[h],t.replacer&&(x=t.replacer.call(i,String(h),x)),(yo(t,n+1,x,!0,!0,!1,!0)||x===void 0&&yo(t,n+1,null,!0,!0,!1,!0))&&(l&&w===""||(w+=fl(t,n)),t.dump&&t.dump.charCodeAt(0)===10?w+="-":w+="- ",w+=t.dump);t.tag=C,t.dump=w||"[]"}function iy(t,n,i){var l,h,v,x,w,C;for(v=0,x=(h=i?t.explicitTypes:t.implicitTypes).length;v<x;v+=1)if(((w=h[v]).instanceOf||w.predicate)&&(!w.instanceOf||typeof n=="object"&&n instanceof w.instanceOf)&&(!w.predicate||w.predicate(n))){if(i?w.multi&&w.representName?t.tag=w.representName(n):t.tag=w.tag:t.tag="?",w.represent){if(C=t.styleMap[w.tag]||w.defaultStyle,ei.call(w.represent)==="[object Function]")l=w.represent(n,C);else{if(!Iu.call(w.represent,C))throw new Rr("!<"+w.tag+'> tag resolver accepts not "'+C+'" style');l=w.represent[C](n,C)}t.dump=l}return!0}return!1}function yo(t,n,i,l,h,v,x){t.tag=null,t.dump=i,iy(t,i,!1)||iy(t,i,!0);var w,C=ei.call(t.dump),$=l;l&&(l=t.flowLevel<0||t.flowLevel>n);var N,_,F=C==="[object Object]"||C==="[object Array]";if(F&&(_=(N=t.duplicates.indexOf(i))!==-1),(t.tag!==null&&t.tag!=="?"||_||t.indent!==2&&n>0)&&(h=!1),_&&t.usedDuplicates[N])t.dump="*ref_"+N;else{if(F&&_&&!t.usedDuplicates[N]&&(t.usedDuplicates[N]=!0),C==="[object Object]")l&&Object.keys(t.dump).length!==0?((function(U,J,Y,W){var P,se,ae,he,ge,pe,Te="",Ae=U.tag,qe=Object.keys(Y);if(U.sortKeys===!0)qe.sort();else if(typeof U.sortKeys=="function")qe.sort(U.sortKeys);else if(U.sortKeys)throw new Rr("sortKeys must be a boolean or a function");for(P=0,se=qe.length;P<se;P+=1)pe="",W&&Te===""||(pe+=fl(U,J)),he=Y[ae=qe[P]],U.replacer&&(he=U.replacer.call(Y,ae,he)),yo(U,J+1,ae,!0,!0,!0)&&((ge=U.tag!==null&&U.tag!=="?"||U.dump&&U.dump.length>1024)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+="?":pe+="? "),pe+=U.dump,ge&&(pe+=fl(U,J)),yo(U,J+1,he,!0,ge)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+=":":pe+=": ",Te+=pe+=U.dump));U.tag=Ae,U.dump=Te||"{}"})(t,n,t.dump,h),_&&(t.dump="&ref_"+N+t.dump)):((function(U,J,Y){var W,P,se,ae,he,ge="",pe=U.tag,Te=Object.keys(Y);for(W=0,P=Te.length;W<P;W+=1)he="",ge!==""&&(he+=", "),U.condenseFlow&&(he+='"'),ae=Y[se=Te[W]],U.replacer&&(ae=U.replacer.call(Y,se,ae)),yo(U,J,se,!1,!1)&&(U.dump.length>1024&&(he+="? "),he+=U.dump+(U.condenseFlow?'"':"")+":"+(U.condenseFlow?"":" "),yo(U,J,ae,!1,!1)&&(ge+=he+=U.dump));U.tag=pe,U.dump="{"+ge+"}"})(t,n,t.dump),_&&(t.dump="&ref_"+N+" "+t.dump));else if(C==="[object Array]")l&&t.dump.length!==0?(t.noArrayIndent&&!x&&n>0?sy(t,n-1,t.dump,h):sy(t,n,t.dump,h),_&&(t.dump="&ref_"+N+t.dump)):((function(U,J,Y){var W,P,se,ae="",he=U.tag;for(W=0,P=Y.length;W<P;W+=1)se=Y[W],U.replacer&&(se=U.replacer.call(Y,String(W),se)),(yo(U,J,se,!1,!1)||se===void 0&&yo(U,J,null,!1,!1))&&(ae!==""&&(ae+=","+(U.condenseFlow?"":" ")),ae+=U.dump);U.tag=he,U.dump="["+ae+"]"})(t,n,t.dump),_&&(t.dump="&ref_"+N+" "+t.dump));else{if(C!=="[object String]"){if(C==="[object Undefined]"||t.skipInvalid)return!1;throw new Rr("unacceptable kind of an object to dump "+C)}t.tag!=="?"&&ty(t,t.dump,n,v,$)}t.tag!==null&&t.tag!=="?"&&(w=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),w=t.tag[0]==="!"?"!"+w:w.slice(0,18)==="tag:yaml.org,2002:"?"!!"+w.slice(18):"!<"+w+">",t.dump=w+" "+t.dump)}return!0}function pA(t,n){var i,l,h=[],v=[];for(ay(t,h,v),i=0,l=v.length;i<l;i+=1)n.duplicates.push(h[v[i]]);n.usedDuplicates=new Array(l)}function ay(t,n,i){var l,h,v;if(t!==null&&typeof t=="object")if((h=n.indexOf(t))!==-1)i.indexOf(h)===-1&&i.push(h);else if(n.push(t),Array.isArray(t))for(h=0,v=t.length;h<v;h+=1)ay(t[h],n,i);else for(h=0,v=(l=Object.keys(t)).length;h<v;h+=1)ay(t[l[h]],n,i)}function Yp(t,n){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var e0=as,oy=ih,Sa=Hp,xc=Rw,Yi=Tw,zu=Yg,ly=hA,Zp=dA,Wp=function(t,n){var i=new Qg(n=n||{});i.noRefs||pA(t,i);var l=t;return i.replacer&&(l=i.replacer.call({"":l},"",l)),yo(i,0,l,!0,!0)?i.dump+`
|
||
`:""},cy=Rr,bc={binary:Dw,float:kw,map:Vp,null:$u,pairs:Mw,set:Lw,timestamp:Hg,bool:ah,int:Ow,merge:Nw,omap:Pw,seq:Cw,str:_u},t0=Yp("safeLoad","load"),Jp=Yp("safeLoadAll","loadAll"),Fu=Yp("safeDump","dump"),qu={Type:e0,Schema:oy,FAILSAFE_SCHEMA:Sa,JSON_SCHEMA:xc,CORE_SCHEMA:Yi,DEFAULT_SCHEMA:zu,load:ly,loadAll:Zp,dump:Wp,YAMLException:cy,types:bc,safeLoad:t0,safeLoadAll:Jp,safeDump:Fu};function ti(t={}){return typeof t.entries!="function"?{}:Array.from(t.entries()).reduce(((n,[i,l])=>(n[i]=(function(h){return h.includes(", ")?h.split(", "):h})(l),n)),{})}function Qp(t,n,{loadSpec:i=!1}={}){const l={ok:t.ok,url:t.url||n,status:t.status,statusText:t.statusText,headers:ti(t.headers)},h=l.headers["content-type"],v=i||((x="")=>/(json|xml|yaml|text)\b/.test(x))(h);return(v?t.text:t.blob||t.buffer).call(t).then((x=>{if(l.text=x,l.data=x,v)try{const w=(function(C,$){return $&&($.indexOf("application/json")===0||$.indexOf("+json")>0)?JSON.parse(C):qu.load(C)})(x,h);l.body=w,l.obj=w}catch(w){l.parseError=w}return l}))}async function ni(t,n={}){typeof t=="object"&&(t=(n=t).url),n.headers=n.headers||{},(n=qp(n)).headers&&Object.keys(n.headers).forEach((h=>{const v=n.headers[h];typeof v=="string"&&(n.headers[h]=v.replace(/\n+/g," "))})),n.requestInterceptor&&(n=await n.requestInterceptor(n)||n);const i=n.headers["content-type"]||n.headers["Content-Type"];let l;/multipart\/form-data/i.test(i)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]);try{l=await(n.userFetch||fetch)(n.url,n),l=await Qp(l,t,n),n.responseInterceptor&&(l=await n.responseInterceptor(l)||l)}catch(h){if(!l)throw h;const v=new Error(l.statusText||`response status is ${l.status}`);throw v.status=l.status,v.statusCode=l.status,v.responseError=h,v}if(!l.ok){const h=new Error(l.statusText||`response status is ${l.status}`);throw h.status=l.status,h.statusCode=l.status,h.response=l,h}return l}function uy(t,n={}){const{requestInterceptor:i,responseInterceptor:l}=n,h=t.withCredentials?"include":"same-origin";return v=>t({url:v,loadSpec:!0,requestInterceptor:i,responseInterceptor:l,headers:{Accept:"application/json, application/yaml"},credentials:h}).then((x=>x.body))}const Bu=t=>{var n,i;const{baseDoc:l,url:h}=t,v=(n=l??h)!==null&&n!==void 0?n:"";return typeof((i=globalThis.document)===null||i===void 0?void 0:i.baseURI)=="string"?String(new URL(v,globalThis.document.baseURI)):v},gl=t=>{const{fetch:n,http:i}=t;return n||i||ni};var Uu,n0=(Uu=function(t,n){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var h in l)l.hasOwnProperty(h)&&(i[h]=l[h])},Uu(t,n)},function(t,n){function i(){this.constructor=t}Uu(t,n),t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}),dy=Object.prototype.hasOwnProperty;function ef(t,n){return dy.call(t,n)}function ri(t){if(Array.isArray(t)){for(var n=new Array(t.length),i=0;i<n.length;i++)n[i]=""+i;return n}if(Object.keys)return Object.keys(t);var l=[];for(var h in t)ef(t,h)&&l.push(h);return l}function os(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function yl(t){for(var n,i=0,l=t.length;i<l;){if(!((n=t.charCodeAt(i))>=48&&n<=57))return!1;i++}return!0}function Ia(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function Ku(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function si(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var n=0,i=t.length;n<i;n++)if(si(t[n]))return!0}else if(typeof t=="object"){for(var l=ri(t),h=l.length,v=0;v<h;v++)if(si(t[l[v]]))return!0}}return!1}function Ei(t,n){var i=[t];for(var l in n){var h=typeof n[l]=="object"?JSON.stringify(n[l],null,2):n[l];h!==void 0&&i.push(l+": "+h)}return i.join(`
|
||
`)}var vo=(function(t){function n(i,l,h,v,x){var w=this.constructor,C=t.call(this,Ei(i,{name:l,index:h,operation:v,tree:x}))||this;return C.name=l,C.index=h,C.operation=v,C.tree=x,Object.setPrototypeOf(C,w.prototype),C.message=Ei(i,{name:l,index:h,operation:v,tree:x}),C}return n0(n,t),n})(Error),Kn=vo,La=os,ii={add:function(t,n,i){return t[n]=this.value,{newDocument:i}},remove:function(t,n,i){var l=t[n];return delete t[n],{newDocument:i,removed:l}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:function(t,n,i){var l=wc(i,this.path);l&&(l=os(l));var h=xo(i,{op:"remove",path:this.from}).removed;return xo(i,{op:"add",path:this.path,value:h}),{newDocument:i,removed:l}},copy:function(t,n,i){var l=wc(i,this.from);return xo(i,{op:"add",path:this.path,value:os(l)}),{newDocument:i}},test:function(t,n,i){return{newDocument:i,test:vn(t[n],this.value)}},_get:function(t,n,i){return this.value=t[n],{newDocument:i}}},r0={add:function(t,n,i){return yl(n)?t.splice(n,0,this.value):t[n]=this.value,{newDocument:i,index:n}},remove:function(t,n,i){return{newDocument:i,removed:t.splice(n,1)[0]}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:ii.move,copy:ii.copy,test:ii.test,_get:ii._get};function wc(t,n){if(n=="")return t;var i={op:"_get",path:n};return xo(t,i),i.value}function xo(t,n,i,l,h,v){if(i===void 0&&(i=!1),l===void 0&&(l=!0),h===void 0&&(h=!0),v===void 0&&(v=0),i&&(typeof i=="function"?i(n,0,t,n.path):Fr(n,0)),n.path===""){var x={newDocument:t};if(n.op==="add")return x.newDocument=n.value,x;if(n.op==="replace")return x.newDocument=n.value,x.removed=t,x;if(n.op==="move"||n.op==="copy")return x.newDocument=wc(t,n.from),n.op==="move"&&(x.removed=t),x;if(n.op==="test"){if(x.test=vn(t,n.value),x.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x.newDocument=t,x}if(n.op==="remove")return x.removed=t,x.newDocument=null,x;if(n.op==="_get")return n.value=t,x;if(i)throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",v,n,t);return x}l||(t=os(t));var w=(n.path||"").split("/"),C=t,$=1,N=w.length,_=void 0,F=void 0,U=void 0;for(U=typeof i=="function"?i:Fr;;){if((F=w[$])&&F.indexOf("~")!=-1&&(F=Ku(F)),h&&(F=="__proto__"||F=="prototype"&&$>0&&w[$-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&_===void 0&&(C[F]===void 0?_=w.slice(0,$).join("/"):$==N-1&&(_=n.path),_!==void 0&&U(n,0,t,_)),$++,Array.isArray(C)){if(F==="-")F=C.length;else{if(i&&!yl(F))throw new Kn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",v,n,t);yl(F)&&(F=~~F)}if($>=N){if(i&&n.op==="add"&&F>C.length)throw new Kn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",v,n,t);if((x=r0[n.op].call(n,C,F,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}}else if($>=N){if((x=ii[n.op].call(n,C,F,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}if(C=C[F],i&&$<N&&(!C||typeof C!="object"))throw new Kn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",v,n,t)}}function bo(t,n,i,l,h){if(l===void 0&&(l=!0),h===void 0&&(h=!0),i&&!Array.isArray(n))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");l||(t=os(t));for(var v=new Array(n.length),x=0,w=n.length;x<w;x++)v[x]=xo(t,n[x],i,!0,h,x),t=v[x].newDocument;return v.newDocument=t,v}function Fr(t,n,i,l){if(typeof t!="object"||t===null||Array.isArray(t))throw new Kn("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,i);if(!ii[t.op])throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,i);if(typeof t.path!="string")throw new Kn("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,t,i);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Kn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,i);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Kn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&si(t.value))throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,i);if(i){if(t.op=="add"){var h=t.path.split("/").length,v=l.split("/").length;if(h!==v+1&&h!==v)throw new Kn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,i)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==l)throw new Kn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,i)}else if(t.op==="move"||t.op==="copy"){var x=hr([{op:"_get",path:t.from,value:void 0}],i);if(x&&x.name==="OPERATION_PATH_UNRESOLVABLE")throw new Kn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,i)}}}function hr(t,n,i){try{if(!Array.isArray(t))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)bo(os(n),os(t),i||!0);else{i=i||Fr;for(var l=0;l<t.length;l++)i(t[l],l,n,void 0)}}catch(h){if(h instanceof Kn)return h;throw h}}function vn(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){var i,l,h,v=Array.isArray(t),x=Array.isArray(n);if(v&&x){if((l=t.length)!=n.length)return!1;for(i=l;i--!=0;)if(!vn(t[i],n[i]))return!1;return!0}if(v!=x)return!1;var w=Object.keys(t);if((l=w.length)!==Object.keys(n).length)return!1;for(i=l;i--!=0;)if(!n.hasOwnProperty(w[i]))return!1;for(i=l;i--!=0;)if(!vn(t[h=w[i]],n[h]))return!1;return!0}return t!=t&&n!=n}const vl=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:Kn,_areEquals:vn,applyOperation:xo,applyPatch:bo,applyReducer:function(t,n,i){var l=xo(t,n);if(l.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",i,n,t);return l.newDocument},deepClone:La,getValueByPointer:wc,validate:hr,validator:Fr},Symbol.toStringTag,{value:"Module"}));var ai=new WeakMap,hy=function(t){this.observers=new Map,this.obj=t},xl=function(t,n){this.callback=t,this.observer=n};function tf(t,n){n===void 0&&(n=!1);var i=ai.get(t.object);nf(i.value,t.object,t.patches,"",n),t.patches.length&&bo(i.value,t.patches);var l=t.patches;return l.length>0&&(t.patches=[],t.callback&&t.callback(l)),l}function nf(t,n,i,l,h){if(n!==t){typeof n.toJSON=="function"&&(n=n.toJSON());for(var v=ri(n),x=ri(t),w=!1,C=x.length-1;C>=0;C--){var $=t[_=x[C]];if(!ef(n,_)||n[_]===void 0&&$!==void 0&&Array.isArray(n)===!1)Array.isArray(t)===Array.isArray(n)?(h&&i.push({op:"test",path:l+"/"+Ia(_),value:os($)}),i.push({op:"remove",path:l+"/"+Ia(_)}),w=!0):(h&&i.push({op:"test",path:l,value:t}),i.push({op:"replace",path:l,value:n}));else{var N=n[_];typeof $=="object"&&$!=null&&typeof N=="object"&&N!=null&&Array.isArray($)===Array.isArray(N)?nf($,N,i,l+"/"+Ia(_),h):$!==N&&(h&&i.push({op:"test",path:l+"/"+Ia(_),value:os($)}),i.push({op:"replace",path:l+"/"+Ia(_),value:os(N)}))}}if(w||v.length!=x.length)for(C=0;C<v.length;C++){var _;ef(t,_=v[C])||n[_]===void 0||i.push({op:"add",path:l+"/"+Ia(_),value:os(n[_])})}}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,compare:function(t,n,i){i===void 0&&(i=!1);var l=[];return nf(t,n,l,"",i),l},generate:tf,observe:function(t,n){var i,l=(function(w){return ai.get(w)})(t);if(l){var h=(function(w,C){return w.observers.get(C)})(l,n);i=h&&h.observer}else l=new hy(t),ai.set(t,l);if(i)return i;if(i={},l.value=os(t),n){i.callback=n,i.next=null;var v=function(){tf(i)},x=function(){clearTimeout(i.next),i.next=setTimeout(v)};typeof window<"u"&&(window.addEventListener("mouseup",x),window.addEventListener("keyup",x),window.addEventListener("mousedown",x),window.addEventListener("keydown",x),window.addEventListener("change",x))}return i.patches=[],i.object=t,i.unobserve=function(){tf(i),clearTimeout(i.next),(function(w,C){w.observers.delete(C.callback)})(l,i),typeof window<"u"&&(window.removeEventListener("mouseup",x),window.removeEventListener("keyup",x),window.removeEventListener("mousedown",x),window.removeEventListener("keydown",x),window.removeEventListener("change",x))},l.observers.set(n,new xl(n,i)),i},unobserve:function(t,n){n.unobserve()}},Symbol.toStringTag,{value:"Module"}));function za(t){return t&&t.t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Object.assign({},vl,Vu,{JsonPatchError:vo,deepClone:os,escapePathComponent:Ia,unescapePathComponent:Ku});var py=function(t){return(function(n){return!!n&&typeof n=="object"})(t)&&!(function(n){var i=Object.prototype.toString.call(n);return i==="[object RegExp]"||i==="[object Date]"||(function(l){return l.$$typeof===ch})(n)})(t)},ch=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Sc(t,n){return n.clone!==!1&&n.isMergeableObject(t)?oi((i=t,Array.isArray(i)?[]:{}),t,n):t;var i}function Ec(t,n,i){return t.concat(n).map((function(l){return Sc(l,i)}))}function Fa(t){return Object.keys(t).concat((function(n){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(n).filter((function(i){return Object.propertyIsEnumerable.call(n,i)})):[]})(t))}function wo(t,n){try{return n in t}catch{return!1}}function oi(t,n,i){(i=i||{}).arrayMerge=i.arrayMerge||Ec,i.isMergeableObject=i.isMergeableObject||py,i.cloneUnlessOtherwiseSpecified=Sc;var l=Array.isArray(n);return l===Array.isArray(t)?l?i.arrayMerge(t,n,i):(function(h,v,x){var w={};return x.isMergeableObject(h)&&Fa(h).forEach((function(C){w[C]=Sc(h[C],x)})),Fa(v).forEach((function(C){(function($,N){return wo($,N)&&!(Object.hasOwnProperty.call($,N)&&Object.propertyIsEnumerable.call($,N))})(h,C)||(wo(h,C)&&x.isMergeableObject(v[C])?w[C]=(function($,N){if(!N.customMerge)return oi;var _=N.customMerge($);return typeof _=="function"?_:oi})(C,x)(h[C],v[C],x):w[C]=Sc(v[C],x))})),w})(t,n,i):Sc(n,i)}oi.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(i,l){return oi(i,l,n)}),{})};const fy=za(oi),qn={add:function(t,n){return{op:"add",path:t,value:n}},replace:Cc,remove:function(t){return{op:"remove",path:t}},merge:function(t,n){return{type:"mutation",op:"merge",path:t,value:n}},mergeDeep:function(t,n){return{type:"mutation",op:"mergeDeep",path:t,value:n}},context:function(t,n){return{type:"context",path:t,value:n}},getIn:function(t,n){return n.reduce(((i,l)=>l!==void 0&&i?i[l]:i),t)},applyPatch:function(t,n,i){if(i=i||{},(n={...n,path:n.path&&jc(n.path)}).op==="merge"){const l=Sl(t,n.path);Object.assign(l,n.value),bo(t,[Cc(n.path,l)])}else if(n.op==="mergeDeep"){const l=Sl(t,n.path),h=fy(l,n.value);t=bo(t,[Cc(n.path,h)]).newDocument}else if(n.op==="add"&&n.path===""&&Ac(n.value)){const l=Object.keys(n.value).reduce(((h,v)=>(h.push({op:"add",path:`/${jc(v)}`,value:n.value[v]}),h)),[]);bo(t,l)}else if(n.op==="replace"&&n.path===""){let{value:l}=n;i.allowMetaPatches&&n.meta&&wl(n)&&(Array.isArray(n.value)||Ac(n.value))&&(l={...l,...n.meta}),t=l}else if(bo(t,[n]),i.allowMetaPatches&&n.meta&&wl(n)&&(Array.isArray(n.value)||Ac(n.value))){const l={...Sl(t,n.path),...n.meta};bo(t,[Cc(n.path,l)])}return t},parentPathMatch:function(t,n){if(!Array.isArray(n))return!1;for(let i=0,l=n.length;i<l;i+=1)if(n[i]!==t[i])return!1;return!0},flatten:uh,fullyNormalizeArray:function(t){return s0(uh(my(t)))},normalizeArray:my,isPromise:function(t){return Ac(t)&&Dr(t.then)},forEachNew:function(t,n){try{return bl(t,Hu,n)}catch(i){return i}},forEachNewPrimitive:function(t,n){try{return bl(t,Wr,n)}catch(i){return i}},isJsonPatch:rf,isContextPatch:function(t){return Xu(t)&&t.type==="context"},isPatch:Xu,isMutation:Gu,isAdditiveMutation:wl,isGenerator:function(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"},isFunction:Dr,isObject:Ac,isError:function(t){return t instanceof Error}};function jc(t){return Array.isArray(t)?t.length<1?"":`/${t.map((n=>(n+"").replace(/~/g,"~0").replace(/\//g,"~1"))).join("/")}`:t}function Cc(t,n,i){return{op:"replace",path:t,value:n,meta:i}}function bl(t,n,i){return s0(uh(t.filter(wl).map((l=>n(l.value,i,l.path)))||[]))}function Wr(t,n,i){return i=i||[],Array.isArray(t)?t.map(((l,h)=>Wr(l,n,i.concat(h)))):Ac(t)?Object.keys(t).map((l=>Wr(t[l],n,i.concat(l)))):n(t,i[i.length-1],i)}function Hu(t,n,i){let l=[];if((i=i||[]).length>0){const h=n(t,i[i.length-1],i);h&&(l=l.concat(h))}if(Array.isArray(t)){const h=t.map(((v,x)=>Hu(v,n,i.concat(x))));h&&(l=l.concat(h))}else if(Ac(t)){const h=Object.keys(t).map((v=>Hu(t[v],n,i.concat(v))));h&&(l=l.concat(h))}return l=uh(l),l}function my(t){return Array.isArray(t)?t:[t]}function uh(t){return[].concat(...t.map((n=>Array.isArray(n)?uh(n):n)))}function s0(t){return t.filter((n=>n!==void 0))}function Ac(t){return t&&typeof t=="object"}function Dr(t){return t&&typeof t=="function"}function rf(t){if(Xu(t)){const{op:n}=t;return n==="add"||n==="remove"||n==="replace"}return!1}function Gu(t){return rf(t)||Xu(t)&&t.type==="mutation"}function wl(t){return Gu(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function Xu(t){return t&&typeof t=="object"}function Sl(t,n){try{return wc(t,n)}catch(i){return console.error(i),{}}}var qa=function(t){return t&&t.Math===Math&&t},ji=qa(typeof globalThis=="object"&&globalThis)||qa(typeof window=="object"&&window)||qa(typeof self=="object"&&self)||qa(typeof Um=="object"&&Um)||qa(!1)||(function(){return this})()||Function("return this")(),Zi=function(t){try{return!!t()}catch{return!0}},sf=!Zi((function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")})),i0=sf,El=Function.prototype,af=El.apply,dh=El.call,of=typeof Reflect=="object"&&Reflect.apply||(i0?dh.bind(af):function(){return dh.apply(af,arguments)}),Oc=sf,lf=Function.prototype,Yu=lf.call,cf=Oc&&lf.bind.bind(Yu,Yu),Wi=Oc?cf:function(t){return function(){return Yu.apply(t,arguments)}},gy=Wi,kc=gy({}.toString),Rc=gy("".slice),uf=function(t){return Rc(kc(t),8,-1)},a0=uf,Zu=Wi,Tc=function(t){if(a0(t)==="Function")return Zu(t)},Wu=typeof document=="object"&&document.all,ks=Wu===void 0&&Wu!==void 0?function(t){return typeof t=="function"||t===Wu}:function(t){return typeof t=="function"},Ju={},So=!Zi((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),_c=sf,hh=Function.prototype.call,li=_c?hh.bind(hh):function(){return hh.apply(hh,arguments)},df={},hf={}.propertyIsEnumerable,Eo=Object.getOwnPropertyDescriptor,jl=Eo&&!hf.call({1:2},1);df.f=jl?function(t){var n=Eo(this,t);return!!n&&n.enumerable}:hf;var Ji,Qu,$c=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},ph=Zi,fh=uf,pf=Object,o0=Wi("".split),ed=ph((function(){return!pf("z").propertyIsEnumerable(0)}))?function(t){return fh(t)==="String"?o0(t,""):pf(t)}:pf,td=function(t){return t==null},l0=td,yy=TypeError,nd=function(t){if(l0(t))throw new yy("Can't call method on "+t);return t},Ci=ed,Qi=nd,ea=function(t){return Ci(Qi(t))},vy=ks,Ea=function(t){return typeof t=="object"?t!==null:vy(t)},Ba={},Is=Ba,jr=ji,ff=ks,Ua=function(t){return ff(t)?t:void 0},en=function(t,n){return arguments.length<2?Ua(Is[t])||Ua(jr[t]):Is[t]&&Is[t][n]||jr[t]&&jr[t][n]},Vn=Wi({}.isPrototypeOf),Pr=ji.navigator,mh=Pr&&Pr.userAgent,Nc=ji,jo=mh?String(mh):"",gh=Nc.process,rd=Nc.Deno,Dc=gh&&gh.versions||rd&&rd.version,c0=Dc&&Dc.v8;c0&&(Qu=(Ji=c0.split("."))[0]>0&&Ji[0]<4?1:+(Ji[0]+Ji[1])),!Qu&&jo&&(!(Ji=jo.match(/Edge\/(\d+)/))||Ji[1]>=74)&&(Ji=jo.match(/Chrome\/(\d+)/))&&(Qu=+Ji[1]);var Cr=Qu,xy=Zi,by=ji.String,wy=!!Object.getOwnPropertySymbols&&!xy((function(){var t=Symbol("symbol detection");return!by(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Cr&&Cr<41})),Sy=wy&&!Symbol.sham&&typeof Symbol.iterator=="symbol",fA=en,Ey=ks,jy=Vn,Cy=Object,Rs=Sy?function(t){return typeof t=="symbol"}:function(t){var n=fA("Symbol");return Ey(n)&&jy(n.prototype,Cy(t))},Mr=String,sd=function(t){try{return Mr(t)}catch{return"Object"}},yh=ks,mf=sd,Ay=TypeError,ta=function(t){if(yh(t))return t;throw new Ay(mf(t)+" is not a function")},gf=ta,Oy=td,vh=function(t,n){var i=t[n];return Oy(i)?void 0:gf(i)},ky=li,Ry=ks,Ty=Ea,u0=TypeError,_y={exports:{}},$y=ji,Ny=Object.defineProperty,d0=ji,h0=_y.exports=d0.o||(function(t,n){try{Ny($y,t,{value:n,configurable:!0,writable:!0})}catch{$y[t]=n}return n})("__core-js_shared__",{});(h0.versions||(h0.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Dy=_y.exports,Py=Dy,My=function(t,n){return Py[t]||(Py[t]=n||{})},Iy=nd,p0=Object,Ly=function(t){return p0(Iy(t))},f0=Ly,m0=Wi({}.hasOwnProperty),Ka=Object.hasOwn||function(t,n){return m0(f0(t),n)},mA=Wi,g0=0,id=Math.random(),y0=mA(1 .toString),xh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+y0(++g0+id,36)},yf=My,zy=Ka,Fy=xh,gA=wy,v0=Sy,Pc=ji.Symbol,vf=yf("wks"),x0=v0?Pc.for||Pc:Pc&&Pc.withoutSetter||Fy,Va=function(t){return zy(vf,t)||(vf[t]=gA&&zy(Pc,t)?Pc[t]:x0("Symbol."+t)),vf[t]},qy=li,By=Ea,Uy=Rs,Ky=vh,b0=TypeError,w0=Va("toPrimitive"),yA=function(t,n){if(!By(t)||Uy(t))return t;var i,l=Ky(t,w0);if(l){if(i=qy(l,t,n),!By(i)||Uy(i))return i;throw new b0("Can't convert object to primitive value")}return(function(h,v){var x,w;if(Ry(x=h.toString)&&!Ty(w=ky(x,h))||Ry(x=h.valueOf)&&!Ty(w=ky(x,h)))return w;throw new u0("Can't convert object to primitive value")})(t)},Vy=Rs,Hy=function(t){var n=yA(t,"string");return Vy(n)?n:n+""},Gy=Ea,bh=ji.document,S0=Gy(bh)&&Gy(bh.createElement),Xy=function(t){return S0?bh.createElement(t):{}},vA=Xy,E0=!So&&!Zi((function(){return Object.defineProperty(vA("div"),"a",{get:function(){return 7}}).a!==7})),j0=So,wh=li,Yy=df,xf=$c,C0=ea,A0=Hy,Sh=Ka,O0=E0,bf=Object.getOwnPropertyDescriptor;Ju.f=j0?bf:function(t,n){if(t=C0(t),n=A0(n),O0)try{return bf(t,n)}catch{}if(Sh(t,n))return xf(!wh(Yy.f,t,n),t[n])};var k0=Zi,Zy=ks,Wy=/#|\.prototype\./,ad=function(t,n){var i=Mc[R0(t)];return i===_0||i!==T0&&(Zy(n)?k0(n):!!n)},R0=ad.normalize=function(t){return String(t).replace(Wy,".").toLowerCase()},Mc=ad.data={},T0=ad.NATIVE="N",_0=ad.POLYFILL="P",$0=ad,wf=ta,N0=sf,Jy=Tc(Tc.bind),Qy=function(t,n){return wf(t),n===void 0?t:N0?Jy(t,n):function(){return t.apply(n,arguments)}},Cl={},D0=So&&Zi((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42})),ev=Ea,qr=String,ys=TypeError,Al=function(t){if(ev(t))return t;throw new ys(qr(t)+" is not an object")},P0=So,M0=E0,I0=D0,Ol=Al,tv=Hy,Sf=TypeError,Ef=Object.defineProperty,xA=Object.getOwnPropertyDescriptor;Cl.f=P0?I0?function(t,n,i){if(Ol(t),n=tv(n),Ol(i),typeof t=="function"&&n==="prototype"&&"value"in i&&"writable"in i&&!i.writable){var l=xA(t,n);l&&l.writable&&(t[n]=i.value,i={configurable:"configurable"in i?i.configurable:l.configurable,enumerable:"enumerable"in i?i.enumerable:l.enumerable,writable:!1})}return Ef(t,n,i)}:Ef:function(t,n,i){if(Ol(t),n=tv(n),Ol(i),M0)try{return Ef(t,n,i)}catch{}if("get"in i||"set"in i)throw new Sf("Accessors not supported");return"value"in i&&(t[n]=i.value),t};var jf=Cl,nv=$c,Co=So?function(t,n,i){return jf.f(t,n,nv(1,i))}:function(t,n,i){return t[n]=i,t},od=ji,L0=of,rv=Tc,sv=ks,iv=Ju.f,z0=$0,kl=Ba,Cf=Qy,Rl=Co,av=Ka,ov=function(t){var n=function(i,l,h){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,l)}return new t(i,l,h)}return L0(t,this,arguments)};return n.prototype=t.prototype,n},Eh=function(t,n){var i,l,h,v,x,w,C,$,N,_=t.target,F=t.global,U=t.stat,J=t.proto,Y=F?od:U?od[_]:od[_]&&od[_].prototype,W=F?kl:kl[_]||Rl(kl,_,{})[_],P=W.prototype;for(v in n)l=!(i=z0(F?v:_+(U?".":"#")+v,t.forced))&&Y&&av(Y,v),w=W[v],l&&(C=t.dontCallGetSet?(N=iv(Y,v))&&N.value:Y[v]),x=l&&C?C:n[v],(i||J||typeof w!=typeof x)&&($=t.bind&&l?Cf(x,od):t.wrap&&l?ov(x):J&&sv(x)?rv(x):x,(t.sham||x&&x.sham||w&&w.sham)&&Rl($,"sham",!0),Rl(W,v,$),J&&(av(kl,h=_+"Prototype")||Rl(kl,h,{}),Rl(kl[h],v,x),t.real&&P&&(i||!P[v])&&Rl(P,v,x)))},Ao=xh,Af=My("keys"),lv=function(t){return Af[t]||(Af[t]=Ao(t))},F0=!Zi((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Oo=Ka,cv=ks,q0=Ly,Of=F0,ld=lv("IE_PROTO"),or=Object,bA=or.prototype,uv=Of?or.getPrototypeOf:function(t){var n=q0(t);if(Oo(n,ld))return n[ld];var i=n.constructor;return cv(i)&&n instanceof i?i.prototype:n instanceof or?bA:null},B0=Wi,jh=ta,Tl=Ea,U0=String,K0=TypeError,Ch=Ea,Ha=nd,V0=function(t){if((function(n){return Tl(n)||n===null})(t))return t;throw new K0("Can't set "+U0(t)+" as a prototype")},Ah=Object.setPrototypeOf||("__proto__"in{}?(function(){var t,n=!1,i={};try{(t=(function(l,h,v){try{return B0(jh(Object.getOwnPropertyDescriptor(l,h)[v]))}catch{}})(Object.prototype,"__proto__","set"))(i,[]),n=i instanceof Array}catch{}return function(l,h){return Ha(l),V0(h),Ch(l)&&(n?t(l,h):l.__proto__=h),l}})():void 0),dv={},hv=Math.ceil,pv=Math.floor,kf=Math.trunc||function(t){var n=+t;return(n>0?pv:hv)(n)},Rf=function(t){var n=+t;return n!=n||n===0?0:kf(n)},ko=Rf,Br=Math.max,fv=Math.min,H0=Rf,ls=Math.min,G0=function(t){return(function(n){var i=H0(n);return i>0?ls(i,9007199254740991):0})(t.length)},X0=ea,Y0=G0,xr=function(t){return function(n,i,l){var h=X0(n),v=Y0(h);if(v===0)return!t&&-1;var x,w=(function(C,$){var N=ko(C);return N<0?Br(N+$,0):fv(N,$)})(l,v);if(t&&i!=i){for(;v>w;)if((x=h[w++])!=x)return!0}else for(;v>w;w++)if((t||w in h)&&h[w]===i)return t||w||0;return!t&&-1}},ci={indexOf:xr(!1)},ja={},Tf=Ka,Z0=ea,W0=ci.indexOf,wA=ja,Oh=Wi([].push),Ls=function(t,n){var i,l=Z0(t),h=0,v=[];for(i in l)!Tf(wA,i)&&Tf(l,i)&&Oh(v,i);for(;n.length>h;)Tf(l,i=n[h++])&&(~W0(v,i)||Oh(v,i));return v},Ai=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],J0=Ls,ui=Ai.concat("length","prototype");dv.f=Object.getOwnPropertyNames||function(t){return J0(t,ui)};var mv={};mv.f=Object.getOwnPropertySymbols;var Ro=en,Ic=dv,To=mv,gv=Al,yv=Wi([].concat),Ca=Ro("Reflect","ownKeys")||function(t){var n=Ic.f(gv(t)),i=To.f;return i?yv(n,i(t)):n},vv=Ka,cd=Ca,kh=Ju,Rh=Cl,Lc=function(t,n,i){for(var l=cd(n),h=Rh.f,v=kh.f,x=0;x<l.length;x++){var w=l[x];vv(t,w)||i&&vv(i,w)||h(t,w,v(n,w))}},xv={},Q0=Ls,Th=Ai,eS=Object.keys||function(t){return Q0(t,Th)},_f=So,tS=D0,SA=Cl,EA=Al,Hn=ea,lr=eS;xv.f=_f&&!tS?Object.defineProperties:function(t,n){EA(t);for(var i,l=Hn(n),h=lr(n),v=h.length,x=0;v>x;)SA.f(t,i=h[x++],l[i]);return t};var hn,An=en("document","documentElement"),Wn=Al,Oi=xv,_o=Ai,ud=ja,bv=An,$o=Xy,Ar=lv("IE_PROTO"),Ga=function(){},_l=function(t){return"<script>"+t+"<\/script>"},$f=function(t){t.write(_l("")),t.close();var n=t.parentWindow.Object;return t=null,n},Ts=function(){try{hn=new ActiveXObject("htmlfile")}catch{}var t,n;Ts=typeof document<"u"?document.domain&&hn?$f(hn):((n=$o("iframe")).style.display="none",bv.appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write(_l("document.F=Object")),t.close(),t.F):$f(hn);for(var i=_o.length;i--;)delete Ts.prototype[_o[i]];return Ts()};ud[Ar]=!0;var $l=Object.create||function(t,n){var i;return t!==null?(Ga.prototype=Wn(t),i=new Ga,Ga.prototype=null,i[Ar]=t):i=Ts(),n===void 0?i:Oi.f(i,n)},_h=Ea,di=Co,Nf=function(t,n){_h(n)&&"cause"in n&&di(t,"cause",n.cause)},$h=Error,nS=Wi("".replace),Df=String(new $h("zxcasd").stack),Nh=/\n\s*at [^:]*:[^\n]*/,Nl=Nh.test(Df),Jr=$c,Dl=!Zi((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Jr(1,7)),t.stack!==7)})),dd=Co,No=Dl,Pf=Error.captureStackTrace,Mf=function(t,n,i,l){No&&(Pf?Pf(t,n):dd(t,"stack",(function(h,v){if(Nl&&typeof h=="string"&&!$h.prepareStackTrace)for(;v--;)h=nS(h,Nh,"");return h})(i,l)))},zc={},Dh=zc,wv=Va("iterator"),ki=Array.prototype,Sv={};Sv[Va("toStringTag")]="z";var _s=String(Sv)==="[object z]",rS=_s,sS=ks,If=uf,Pl=Va("toStringTag"),Lf=Object,Ev=If((function(){return arguments})())==="Arguments",Ml=rS?If:function(t){var n,i,l;return t===void 0?"Undefined":t===null?"Null":typeof(i=(function(h,v){try{return h[v]}catch{}})(n=Lf(t),Pl))=="string"?i:Ev?If(n):(l=If(n))==="Object"&&sS(n.callee)?"Arguments":l},iS=Ml,jv=vh,aS=td,oS=zc,zf=Va("iterator"),Ff=function(t){if(!aS(t))return jv(t,zf)||jv(t,"@@iterator")||oS[iS(t)]},jA=li,CA=ta,AA=Al,lS=sd,cS=Ff,hd=TypeError,qf=li,Cv=Al,uS=vh,dS=Qy,hS=li,pS=Al,fS=sd,Bf=G0,Av=Vn,mS=Ff,Xn=function(t,n,i){var l,h;Cv(t);try{if(!(l=uS(t,"return"))){if(n==="throw")throw i;return i}l=qf(l,t)}catch(v){h=!0,l=v}if(n==="throw")throw i;if(h)throw l;return Cv(l),i},Ov=TypeError,Uf=function(t,n){this.stopped=t,this.result=n},kv=Uf.prototype,OA=Ml,kA=String,Rv=function(t){if(OA(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return kA(t)},Kf=Rv,Fc=function(t,n){return t===void 0?arguments.length<2?"":n:Kf(t)},Tv=Eh,Vf=Vn,_v=uv,Aa=Ah,Xa=Lc,pd=$l,$v=Co,Hf=$c,gS=Nf,yS=Mf,vS=function(t,n,i){var l,h,v,x,w,C,$,N=i&&i.that,_=!(!i||!i.AS_ENTRIES),F=!(!i||!i.IS_RECORD),U=!(!i||!i.IS_ITERATOR),J=!(!i||!i.INTERRUPTED),Y=dS(n,N),W=function(se){return l&&Xn(l,"normal",se),new Uf(!0,se)},P=function(se){return _?(pS(se),J?Y(se[0],se[1],W):Y(se[0],se[1])):J?Y(se,W):Y(se)};if(F)l=t.iterator;else if(U)l=t;else{if(!(h=mS(t)))throw new Ov(fS(t)+" is not iterable");if((function(se){return se!==void 0&&(Dh.Array===se||ki[wv]===se)})(h)){for(v=0,x=Bf(t);x>v;v++)if((w=P(t[v]))&&Av(kv,w))return w;return new Uf(!1)}l=(function(se,ae){var he=arguments.length<2?cS(se):ae;if(CA(he))return AA(jA(he,se));throw new hd(lS(se)+" is not iterable")})(t,h)}for(C=F?t.next:l.next;!($=hS(C,l)).done;){try{w=P($.value)}catch(se){Xn(l,"throw",se)}if(typeof w=="object"&&w&&Av(kv,w))return w}return new Uf(!1)},RA=Fc,Nv=Va("toStringTag"),Ph=Error,xS=[].push,fd=function(t,n){var i,l=Vf(Mh,this);Aa?i=Aa(new Ph,l?_v(this):Mh):(i=l?this:pd(Mh),$v(i,Nv,"Error")),n!==void 0&&$v(i,"message",RA(n)),yS(i,fd,i.stack,1),arguments.length>2&&gS(i,arguments[2]);var h=[];return vS(t,xS,{that:h}),$v(i,"errors",h),i};Aa?Aa(fd,Ph):Xa(fd,Ph,{name:!0});var Mh=fd.prototype=pd(Ph.prototype,{constructor:Hf(1,fd),message:Hf(1,""),name:Hf(1,"AggregateError")});Tv({global:!0},{AggregateError:fd});var Dv=Cl.f,TA=ks,_A=Ea,md=Ah,bS=en,wS=Co,En=Vn,Gf=Ah,Ih=Lc,Xf=function(t,n,i){i in t||Dv(t,i,{configurable:!0,get:function(){return n[i]},set:function(l){n[i]=l}})},SS=Fc,Pv=Nf,Lh=Mf,Yf=So,ES=function(t,n,i,l){var h="stackTraceLimit",v=l?2:1,x=t.split("."),w=x[x.length-1],C=bS.apply(null,x);if(C){var $=C.prototype;if(!i)return C;var N=bS("Error"),_=n((function(F,U){var J=SS(l?U:F,void 0),Y=l?new C(F):new C;return J!==void 0&&wS(Y,"message",J),Lh(Y,_,Y.stack,2),this&&En($,this)&&(function(W,P,se){var ae,he;md&&TA(ae=P.constructor)&&ae!==se&&_A(he=ae.prototype)&&he!==se.prototype&&md(W,he)})(Y,this,_),arguments.length>v&&Pv(Y,arguments[v]),Y}));return _.prototype=$,w!=="Error"?Gf?Gf(_,N):Ih(_,N,{name:!0}):Yf&&h in C&&(Xf(_,C,h),Xf(_,C,"prepareStackTrace")),Ih(_,C),_}},Mv=Eh,Ya=of,jS=ES,Iv=ji.WebAssembly,zh=new Error("e",{cause:7}).cause!==7,Mn=function(t,n){var i={};i[t]=jS(t,n,zh),Mv({global:!0,forced:zh},i)},Fh=function(t,n){if(Iv&&Iv[t]){var i={};i[t]=jS("WebAssembly."+t,n,zh),Mv({target:"WebAssembly",stat:!0,forced:zh},i)}};Mn("Error",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("EvalError",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("RangeError",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("ReferenceError",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("SyntaxError",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("TypeError",(function(t){return function(n){return Ya(t,this,arguments)}})),Mn("URIError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("CompileError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("LinkError",(function(t){return function(n){return Ya(t,this,arguments)}})),Fh("RuntimeError",(function(t){return function(n){return Ya(t,this,arguments)}}));var vs=Eh,$A=of,Lv=Zi,NA=ES,Zf=en("AggregateError"),Wf=!Lv((function(){return Zf([1]).errors[0]!==1}))&&Lv((function(){return Zf([1],"AggregateError",{cause:7}).cause!==7}));vs({global:!0,forced:Wf},{AggregateError:NA("AggregateError",(function(t){return function(n,i){return $A(t,this,arguments)}}),Wf,!0)});var qc,gd,qh,zv=ks,Jf=ji.WeakMap,DA=zv(Jf)&&/native code/.test(String(Jf)),Fv=ji,PA=Ea,CS=Co,qv=Ka,Bv=Dy,Il=lv,AS=ja,Qf=Fv.TypeError,Uv=Fv.WeakMap;if(DA||Bv.state){var Za=Bv.state||(Bv.state=new Uv);Za.get=Za.get,Za.has=Za.has,Za.set=Za.set,qc=function(t,n){if(Za.has(t))throw new Qf("Object already initialized");return n.facade=t,Za.set(t,n),n},gd=function(t){return Za.get(t)||{}},qh=function(t){return Za.has(t)}}else{var yd=Il("state");AS[yd]=!0,qc=function(t,n){if(qv(t,yd))throw new Qf("Object already initialized");return n.facade=t,CS(t,yd,n),n},gd=function(t){return qv(t,yd)?t[yd]:{}},qh=function(t){return qv(t,yd)}}var Ll,em,tm,OS={set:qc,get:gd,has:qh,enforce:function(t){return qh(t)?gd(t):qc(t,{})},getterFor:function(t){return function(n){var i;if(!PA(n)||(i=gd(n)).type!==t)throw new Qf("Incompatible receiver, "+t+" required");return i}}},hi=So,Kv=Ka,Vv=Function.prototype,kS=hi&&Object.getOwnPropertyDescriptor,Hv=Kv(Vv,"name"),Bh={PROPER:Hv&&(function(){}).name==="something",CONFIGURABLE:Hv&&(!hi||hi&&kS(Vv,"name").configurable)},na=Co,Gv=function(t,n,i,l){return l&&l.enumerable?t[n]=i:na(t,n,i),t},nm=Zi,Do=ks,MA=Ea,IA=$l,Bc=uv,RS=Gv,Xv=Va("iterator"),TS=!1;[].keys&&("next"in(tm=[].keys())?(em=Bc(Bc(tm)))!==Object.prototype&&(Ll=em):TS=!0);var LA=!MA(Ll)||nm((function(){var t={};return Ll[Xv].call(t)!==t}));Do((Ll=LA?{}:IA(Ll))[Xv])||RS(Ll,Xv,(function(){return this}));var _S={IteratorPrototype:Ll,BUGGY_SAFARI_ITERATORS:TS},zA=Ml,FA=_s?{}.toString:function(){return"[object "+zA(this)+"]"},qA=_s,$S=Cl.f,vd=Co,Uh=Ka,NS=FA,DS=Va("toStringTag"),zl=function(t,n,i,l){var h=i?t:t&&t.prototype;h&&(Uh(h,DS)||$S(h,DS,{configurable:!0,value:n}),l&&!qA&&vd(h,"toString",NS))},Kh=_S.IteratorPrototype,PS=$l,rm=$c,Yv=zl,Zv=zc,sm=function(){return this},MS=Eh,IS=li,BA=uv,LS=zl,zS=Gv,im=zc,UA=Bh.PROPER,Uc=_S.BUGGY_SAFARI_ITERATORS,xd=Va("iterator"),am=function(){return this},FS=function(t,n,i,l,h,v,x){(function(P,se,ae,he){var ge=se+" Iterator";P.prototype=PS(Kh,{next:rm(1,ae)}),Yv(P,ge,!1,!0),Zv[ge]=sm})(i,n,l);var w,C,$,N=function(P){if(P===h&&Y)return Y;if(!Uc&&P&&P in U)return U[P];switch(P){case"keys":case"values":case"entries":return function(){return new i(this,P)}}return function(){return new i(this)}},_=n+" Iterator",F=!1,U=t.prototype,J=U[xd]||U["@@iterator"]||h&&U[h],Y=!Uc&&J||N(h),W=n==="Array"&&U.entries||J;if(W&&(w=BA(W.call(new t)))!==Object.prototype&&w.next&&(LS(w,_,!0,!0),im[_]=am),UA&&h==="values"&&J&&J.name!=="values"&&(F=!0,Y=function(){return IS(J,this)}),h)if(C={values:N("values"),keys:v?Y:N("keys"),entries:N("entries")},x)for($ in C)(Uc||F||!($ in U))&&zS(U,$,C[$]);else MS({target:n,proto:!0,forced:Uc||F},C);return x&&U[xd]!==Y&&zS(U,xd,Y,{}),im[n]=Y,C},bd=function(t,n){return{value:t,done:n}},KA=ea,Wv=zc,Jv=OS;Cl.f;var qS=FS,Vh=bd,Qv=Jv.set,BS=Jv.getterFor("Array Iterator");qS(Array,"Array",(function(t,n){Qv(this,{type:"Array Iterator",target:KA(t),index:0,kind:n})}),(function(){var t=BS(this),n=t.target,i=t.index++;if(!n||i>=n.length)return t.target=null,Vh(void 0,!0);switch(t.kind){case"keys":return Vh(i,!1);case"values":return Vh(n[i],!1)}return Vh([i,n[i]],!1)}),"values"),Wv.Arguments=Wv.Array;var om=Wi,lm=Rf,VA=Rv,HA=nd,ex=om("".charAt),cm=om("".charCodeAt),um=om("".slice),tx=function(t){return function(n,i){var l,h,v=VA(HA(n)),x=lm(i),w=v.length;return x<0||x>=w?t?"":void 0:(l=cm(v,x))<55296||l>56319||x+1===w||(h=cm(v,x+1))<56320||h>57343?t?ex(v,x):l:t?um(v,x,x+2):h-56320+(l-55296<<10)+65536}},US=tx(!0),nx=Rv,Po=OS,Fl=FS,Mo=bd,Hh=Po.set,Gh=Po.getterFor("String Iterator");Fl(String,"String",(function(t){Hh(this,{type:"String Iterator",string:nx(t),index:0})}),(function(){var t,n=Gh(this),i=n.string,l=n.index;return l>=i.length?Mo(void 0,!0):(t=US(i,l),n.index+=t.length,Mo(t,!1))}));var ql=Ba.AggregateError,GA=ji,KS=zl,wd=zc;for(var rx in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})KS(GA[rx],rx),wd[rx]=wd.Array;const VS=za(ql);class dm extends VS{constructor(n,i,l){if(super(n,i,l),this.name=this.constructor.name,typeof i=="string"&&(this.message=i),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(i).stack,l!=null&&typeof l=="object"&&Object.hasOwn(l,"cause")&&!("cause"in this)){const{cause:h}=l;this.cause=h,h instanceof Error&&"stack"in h&&(this.stack=`${this.stack}
|
||
CAUSE: ${h.stack}`)}}}class br extends Error{static[Symbol.hasInstance](n){return super[Symbol.hasInstance](n)||Function.prototype[Symbol.hasInstance].call(dm,n)}constructor(n,i){if(super(n,i),this.name=this.constructor.name,typeof n=="string"&&(this.message=n),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(n).stack,i!=null&&typeof i=="object"&&Object.hasOwn(i,"cause")&&!("cause"in this)){const{cause:l}=i;this.cause=l,l instanceof Error&&"stack"in l&&(this.stack=`${this.stack}
|
||
CAUSE: ${l.stack}`)}}}class Oa extends br{constructor(n,i){if(super(n,i),i!=null&&typeof i=="object"){const{cause:l,...h}=i;Object.assign(this,h)}}}class Ur extends br{}class Sd extends Ur{}var hm=function(){return!1},pi=function(){return!0};function pr(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Bn(t){return function n(i){return arguments.length===0||pr(i)?n:t.apply(this,arguments)}}function Zt(t){return function n(i,l){switch(arguments.length){case 0:return n;case 1:return pr(i)?n:Bn((function(h){return t(i,h)}));default:return pr(i)&&pr(l)?n:pr(i)?Bn((function(h){return t(h,l)})):pr(l)?Bn((function(h){return t(i,h)})):t(i,l)}}}function Xh(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(i){return n.apply(this,arguments)};case 2:return function(i,l){return n.apply(this,arguments)};case 3:return function(i,l,h){return n.apply(this,arguments)};case 4:return function(i,l,h,v){return n.apply(this,arguments)};case 5:return function(i,l,h,v,x){return n.apply(this,arguments)};case 6:return function(i,l,h,v,x,w){return n.apply(this,arguments)};case 7:return function(i,l,h,v,x,w,C){return n.apply(this,arguments)};case 8:return function(i,l,h,v,x,w,C,$){return n.apply(this,arguments)};case 9:return function(i,l,h,v,x,w,C,$,N){return n.apply(this,arguments)};case 10:return function(i,l,h,v,x,w,C,$,N,_){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function sx(t,n,i){return function(){for(var l=[],h=0,v=t,x=0,w=!1;x<n.length||h<arguments.length;){var C;x<n.length&&(!pr(n[x])||h>=arguments.length)?C=n[x]:(C=arguments[h],h+=1),l[x]=C,pr(C)?w=!0:v-=1,x+=1}return!w&&v<=0?i.apply(this,l):Xh(Math.max(0,v),sx(t,l,i))}}var Jn=Zt((function(t,n){return t===1?Bn(n):Xh(t,sx(t,[],n))}));function a(t){return function n(i,l,h){switch(arguments.length){case 0:return n;case 1:return pr(i)?n:Zt((function(v,x){return t(i,v,x)}));case 2:return pr(i)&&pr(l)?n:pr(i)?Zt((function(v,x){return t(v,l,x)})):pr(l)?Zt((function(v,x){return t(i,v,x)})):Bn((function(v){return t(i,l,v)}));default:return pr(i)&&pr(l)&&pr(h)?n:pr(i)&&pr(l)?Zt((function(v,x){return t(v,x,h)})):pr(i)&&pr(h)?Zt((function(v,x){return t(v,l,x)})):pr(l)&&pr(h)?Zt((function(v,x){return t(i,v,x)})):pr(i)?Bn((function(v){return t(v,l,h)})):pr(l)?Bn((function(v){return t(i,v,h)})):pr(h)?Bn((function(v){return t(i,l,v)})):t(i,l,h)}}}const c=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function f(t,n,i){return function(){if(arguments.length===0)return i();var l=arguments[arguments.length-1];if(!c(l)){for(var h=0;h<t.length;){if(typeof l[t[h]]=="function")return l[t[h]].apply(l,Array.prototype.slice.call(arguments,0,-1));h+=1}if((function(v){return v!=null&&typeof v["@@transducer/step"]=="function"})(l))return n.apply(null,Array.prototype.slice.call(arguments,0,-1))(l)}return i.apply(this,arguments)}}function y(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const E=function(){return this.xf["@@transducer/init"]()},O=function(t){return this.xf["@@transducer/result"](t)};var B=(function(){function t(n,i){this.xf=i,this.f=n,this.all=!0}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=function(n){return this.all&&(n=this.xf["@@transducer/step"](n,!0)),this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)||(this.all=!1,n=y(this.xf["@@transducer/step"](n,!1))),n},t})(),te=Zt(f(["all"],(function(t){return function(n){return new B(t,n)}}),(function(t,n){for(var i=0;i<n.length;){if(!t(n[i]))return!1;i+=1}return!0})));function ye(t){for(var n,i=[];!(n=t.next()).done;)i.push(n.value);return i}function Be(t,n,i){for(var l=0,h=i.length;l<h;){if(t(n,i[l]))return!0;l+=1}return!1}function We(t,n){return Object.prototype.hasOwnProperty.call(n,t)}const rt=typeof Object.is=="function"?Object.is:function(t,n){return t===n?t!==0||1/t==1/n:t!=t&&n!=n};var Ue=Object.prototype.toString,Xe=(function(){return Ue.call(arguments)==="[object Arguments]"?function(t){return Ue.call(t)==="[object Arguments]"}:function(t){return We("callee",t)}})(),Dt=!{toString:null}.propertyIsEnumerable("toString"),Xt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Qn=(function(){return arguments.propertyIsEnumerable("length")})(),$e=function(t,n){for(var i=0;i<t.length;){if(t[i]===n)return!0;i+=1}return!1},Ee=Bn(typeof Object.keys!="function"||Qn?(function(t){if(Object(t)!==t)return[];var n,i,l=[],h=Qn&&Xe(t);for(n in t)!We(n,t)||h&&n==="length"||(l[l.length]=n);if(Dt)for(i=Xt.length-1;i>=0;)We(n=Xt[i],t)&&!$e(l,n)&&(l[l.length]=n),i-=1;return l}):(function(t){return Object(t)!==t?[]:Object.keys(t)})),Pe=Bn((function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function nt(t,n,i,l){var h=ye(t);function v(x,w){return Ut(x,w,i.slice(),l.slice())}return!Be((function(x,w){return!Be(v,w,x)}),ye(n),h)}function Ut(t,n,i,l){if(rt(t,n))return!0;var h=Pe(t);if(h!==Pe(n))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof n["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](n)&&typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof n.equals=="function")return typeof t.equals=="function"&&t.equals(n)&&typeof n.equals=="function"&&n.equals(t);switch(h){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&(function(N){var _=String(N).match(/^function (\w*)/);return _==null?"":_[1]})(t.constructor)==="Promise")return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!rt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!rt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var v=i.length-1;v>=0;){if(i[v]===t)return l[v]===n;v-=1}switch(h){case"Map":return t.size===n.size&&nt(t.entries(),n.entries(),i.concat([t]),l.concat([n]));case"Set":return t.size===n.size&&nt(t.values(),n.values(),i.concat([t]),l.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var x=Ee(t);if(x.length!==Ee(n).length)return!1;var w=i.concat([t]),C=l.concat([n]);for(v=x.length-1;v>=0;){var $=x[v];if(!We($,n)||!Ut(n[$],t[$],w,C))return!1;v-=1}return!0}var pn=Zt((function(t,n){return Ut(t,n,[],[])}));function Pt(t,n){return(function(i,l,h){var v,x;if(typeof i.indexOf=="function")switch(typeof l){case"number":if(l===0){for(v=1/l;h<i.length;){if((x=i[h])===0&&1/x===v)return h;h+=1}return-1}if(l!=l){for(;h<i.length;){if(typeof(x=i[h])=="number"&&x!=x)return h;h+=1}return-1}return i.indexOf(l,h);case"string":case"boolean":case"function":case"undefined":return i.indexOf(l,h);case"object":if(l===null)return i.indexOf(l,h)}for(;h<i.length;){if(pn(i[h],l))return h;h+=1}return-1})(n,t,0)>=0}function rn(t,n){for(var i=0,l=n.length,h=Array(l);i<l;)h[i]=t(n[i]),i+=1;return h}function wn(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var On=function(t){return(t<10?"0":"")+t},Bl=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+On(t.getUTCMonth()+1)+"-"+On(t.getUTCDate())+"T"+On(t.getUTCHours())+":"+On(t.getUTCMinutes())+":"+On(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function HS(t){return function(){return!t.apply(this,arguments)}}function ix(t,n,i){for(var l=0,h=i.length;l<h;)n=t(n,i[l]),l+=1;return n}function GS(t){return Object.prototype.toString.call(t)==="[object Object]"}var gB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.xf["@@transducer/step"](n,i):n},t})(),yB=Zt(f(["fantasy-land/filter","filter"],(function(t){return function(n){return new gB(t,n)}}),(function(t,n){return GS(n)?ix((function(i,l){return t(n[l])&&(i[l]=n[l]),i}),{},Ee(n)):(function(i,l){for(var h=0,v=l.length,x=[];h<v;)i(l[h])&&(x[x.length]=l[h]),h+=1;return x})(t,n)}))),vB=Zt((function(t,n){return yB(HS(t),n)}));function x$(t,n){var i=function(v){var x=n.concat([t]);return Pt(v,x)?"<Circular>":x$(v,x)},l=function(v,x){return rn((function(w){return wn(w)+": "+i(v[w])}),x.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+rn(i,t).join(", ")+"))";case"[object Array]":return"["+rn(i,t).concat(l(t,vB((function(v){return/^\d+$/.test(v)}),Ee(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+i(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?i(NaN):wn(Bl(t)))+")";case"[object Map]":return"new Map("+i(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+i(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+i(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+i(t.valueOf())+")":wn(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var h=t.toString();if(h!=="[object Object]")return h}return"{"+l(t,Ee(t)).join(", ")+"}"}}var pm=Bn((function(t){return x$(t,[])})),XA=Zt((function(t,n){if(t===n)return n;function i(w,C){if(w>C!=C>w)return C>w?C:w}var l=i(t,n);if(l!==void 0)return l;var h=i(typeof t,typeof n);if(h!==void 0)return h===typeof t?t:n;var v=pm(t),x=i(v,pm(n));return x!==void 0&&x===v?t:n})),xB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.xf["@@transducer/step"](n,this.f(i))},t})(),ax=Zt(f(["fantasy-land/map","map"],(function(t){return function(n){return new xB(t,n)}}),(function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Jn(n.length,(function(){return t.call(this,n.apply(this,arguments))}));case"[object Object]":return ix((function(i,l){return i[l]=t(n[l]),i}),{},Ee(n));default:return rn(t,n)}})));const XS=Number.isInteger||function(t){return(t|0)===t};function YA(t){return Object.prototype.toString.call(t)==="[object String]"}function YS(t,n){var i=t<0?n.length+t:t;return YA(n)?n.charAt(i):n[i]}var ox=Zt((function(t,n){if(n!=null)return XS(t)?YS(t,n):n[t]})),ZA=Zt((function(t,n){return ax(ox(t),n)})),bB=Bn((function(t){return!!c(t)||!!t&&typeof t=="object"&&!YA(t)&&(t.length===0||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),b$=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function w$(t,n,i){return function(l,h,v){if(bB(v))return t(l,h,v);if(v==null)return h;if(typeof v["fantasy-land/reduce"]=="function")return n(l,h,v,"fantasy-land/reduce");if(v[b$]!=null)return i(l,h,v[b$]());if(typeof v.next=="function")return i(l,h,v);if(typeof v.reduce=="function")return n(l,h,v,"reduce");throw new TypeError("reduce: list must be array or iterable")}}var ZS=Zt((function(t,n){return Xh(t.length,(function(){return t.apply(n,arguments)}))})),WA=w$((function(t,n,i){for(var l=0,h=i.length;l<h;){if((n=t["@@transducer/step"](n,i[l]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l+=1}return t["@@transducer/result"](n)}),(function(t,n,i,l){return t["@@transducer/result"](i[l](ZS(t["@@transducer/step"],t),n))}),(function(t,n,i){for(var l=i.next();!l.done;){if((n=t["@@transducer/step"](n,l.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l=i.next()}return t["@@transducer/result"](n)})),wB=(function(){function t(n){this.f=n}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(n){return n},t.prototype["@@transducer/step"]=function(n,i){return this.f(n,i)},t})();function S$(t){return new wB(t)}var Yh=a((function(t,n,i){return WA(typeof t=="function"?S$(t):t,n,i)})),SB=Bn((function(t){return Jn(Yh(XA,0,ZA("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0}))})),Wt=Bn((function(t){return function(){return t}})),EB=Zt((function(t,n){return t&&n})),jB=Bn((function(t){return Jn(Yh(XA,0,ZA("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(t[n].apply(this,arguments))return!0;n+=1}return!1}))})),CB=w$(ix,(function(t,n,i,l){return i[l](t,n)}),(function(t,n,i){for(var l=i.next();!l.done;)n=t(n,l.value),l=i.next();return n})),AB=Zt((function(t,n){return typeof n["fantasy-land/ap"]=="function"?n["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(n):typeof t=="function"?function(i){return t(i)(n(i))}:CB((function(i,l){return(function(h,v){var x;v=v||[];var w=(h=h||[]).length,C=v.length,$=[];for(x=0;x<w;)$[$.length]=h[x],x+=1;for(x=0;x<C;)$[$.length]=v[x],x+=1;return $})(i,ax(l,n))}),[],t)})),OB=Zt((function(t,n){return t.apply(this,n)})),JA=Bn((function(t){return Jn(t.length,t)})),WS=Bn((function(t){return t==null})),kB=a((function t(n,i,l){if(n.length===0)return i;var h=n[0];if(n.length>1){var v=!WS(l)&&We(h,l)&&typeof l[h]=="object"?l[h]:XS(n[1])?[]:{};i=t(Array.prototype.slice.call(n,1),i,v)}return(function(x,w,C){if(XS(x)&&c(C)){var $=[].concat(C);return $[x]=w,$}var N={};for(var _ in C)N[_]=C[_];return N[x]=w,N})(h,i,l)}));function QA(t){var n=Object.prototype.toString.call(t);return n==="[object Function]"||n==="[object AsyncFunction]"||n==="[object GeneratorFunction]"||n==="[object AsyncGeneratorFunction]"}var RB=Zt((function(t,n){var i=Jn(t,n);return Jn(t,(function(){return ix(AB,ax(i,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),eO=Bn((function(t){return RB(t.length,t)})),Zh=Zt((function(t,n){return QA(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:eO(EB)(t,n)}));function E$(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}function j$(t,n,i){if(i||(i=new TB),(function(h){var v=typeof h;return h==null||v!="object"&&v!="function"})(t))return t;var l=function(h){var v=i.get(t);if(v)return v;for(var x in i.set(t,h),t)Object.prototype.hasOwnProperty.call(t,x)&&(h[x]=t[x]);return h};switch(Pe(t)){case"Object":return l(Object.create(Object.getPrototypeOf(t)));case"Array":return l(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return E$(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}var TB=(function(){function t(){this.map={},this.length=0}return t.prototype.set=function(n,i){var l=this.hash(n),h=this.map[l];h||(this.map[l]=h=[]),h.push([n,i]),this.length+=1},t.prototype.hash=function(n){var i=[];for(var l in n)i.push(Object.prototype.toString.call(n[l]));return i.join()},t.prototype.get=function(n){if(this.length<=180){for(var i in this.map)for(var l=this.map[i],h=0;h<l.length;h+=1)if((x=l[h])[0]===n)return x[1]}else{var v=this.hash(n);if(l=this.map[v])for(h=0;h<l.length;h+=1){var x;if((x=l[h])[0]===n)return x[1]}}},t})(),_B=Bn((function(t){return function(n,i){return t(n,i)?-1:t(i,n)?1:0}})),lx=eO(Bn((function(t){return!t})));function $B(t,n){return function(){return n.call(this,t.apply(this,arguments))}}function tO(t,n){return function(){var i=arguments.length;if(i===0)return n();var l=arguments[i-1];return c(l)||typeof l[t]!="function"?n.apply(this,arguments):l[t].apply(l,Array.prototype.slice.call(arguments,0,i-1))}}var cx=a(tO("slice",(function(t,n,i){return Array.prototype.slice.call(i,t,n)}))),C$=Bn(tO("tail",cx(1,1/0)));function zs(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Xh(arguments[0].length,Yh($B,arguments[0],C$(arguments)))}var NB=Bn((function(t){return YS(0,t)})),nO=Bn((function(t){return t})),DB=Zt((function(t,n){return Jn(Yh(XA,0,ZA("length",n)),(function(){var i=arguments,l=this;return t.apply(l,rn((function(h){return h.apply(l,i)}),n))}))})),PB=(function(){function t(n,i,l,h){this.valueFn=n,this.valueAcc=i,this.keyFn=l,this.xf=h,this.inputs={}}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=function(n){var i;for(i in this.inputs)if(We(i,this.inputs)&&(n=this.xf["@@transducer/step"](n,this.inputs[i]))["@@transducer/reduced"]){n=n["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){var l=this.keyFn(i);return this.inputs[l]=this.inputs[l]||[l,j$(this.valueAcc)],this.inputs[l][1]=this.valueFn(this.inputs[l][1],i),n},t})(),MB=sx(4,[],f([],(function(t,n,i){return function(l){return new PB(t,n,i,l)}}),(function(t,n,i,l){var h=S$((function(v,x){var w=i(x),C=t(We(w,v)?v[w]:j$(n),x);return C&&C["@@transducer/reduced"]?y(v):(v[w]=C,v)}));return WA(h,{},l)}))),fm=Zt((function(t,n){return n==null||n!=n?t:n})),IB=(function(){function t(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return t.prototype.add=function(n){return!A$(n,!0,this)},t.prototype.has=function(n){return A$(n,!1,this)},t})();function A$(t,n,i){var l,h=typeof t;switch(h){case"string":case"number":return t===0&&1/t==-1/0?!!i._items["-0"]||(n&&(i._items["-0"]=!0),!1):i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):h in i._items?t in i._items[h]||(n&&(i._items[h][t]=!0),!1):(n&&(i._items[h]={},i._items[h][t]=!0),!1);case"boolean":if(h in i._items){var v=t?1:0;return!!i._items[h][v]||(n&&(i._items[h][v]=!0),!1)}return n&&(i._items[h]=t?[!1,!0]:[!0,!1]),!1;case"function":return i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):h in i._items?!!Pt(t,i._items[h])||(n&&i._items[h].push(t),!1):(n&&(i._items[h]=[t]),!1);case"undefined":return!!i._items[h]||(n&&(i._items[h]=!0),!1);case"object":if(t===null)return!!i._items.null||(n&&(i._items.null=!0),!1);default:return(h=Object.prototype.toString.call(t))in i._items?!!Pt(t,i._items[h])||(n&&i._items[h].push(t),!1):(n&&(i._items[h]=[t]),!1)}}var LB=Zt((function(t,n){for(var i=[],l=0,h=t.length,v=n.length,x=new IB,w=0;w<v;w+=1)x.add(n[w]);for(;l<h;)x.add(t[l])&&(i[i.length]=t[l]),l+=1;return i})),zB=(function(){function t(n,i){this.xf=i,this.n=n,this.i=0}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){this.i+=1;var l=this.n===0?n:this.xf["@@transducer/step"](n,i);return this.n>=0&&this.i>=this.n?y(l):l},t})(),FB=Zt(f(["take"],(function(t){return function(n){return new zB(t,n)}}),(function(t,n){return cx(0,t<0?1/0:t,n)}))),qB=(function(){function t(n,i){this.f=n,this.retained=[],this.xf=i}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=function(n){return this.retained=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.retain(n,i):this.flush(n,i)},t.prototype.flush=function(n,i){return n=WA(this.xf,n,this.retained),this.retained=[],this.xf["@@transducer/step"](n,i)},t.prototype.retain=function(n,i){return this.retained.push(i),n},t})(),BB=Zt(f([],(function(t){return function(n){return new qB(t,n)}}),(function(t,n){for(var i=n.length-1;i>=0&&t(n[i]);)i-=1;return cx(0,i+1,n)}))),JS=Bn((function(t){return YS(-1,t)})),UB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){if(this.f){if(this.f(i))return n;this.f=null}return this.xf["@@transducer/step"](n,i)},t})(),KB=Zt(f(["dropWhile"],(function(t){return function(n){return new UB(t,n)}}),(function(t,n){for(var i=0,l=n.length;i<l&&t(n[i]);)i+=1;return cx(i,1/0,n)}))),VB=Zt((function(t,n){return t||n})),HB=Zt((function(t,n){return QA(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:eO(VB)(t,n)})),GB=Bn((function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():c(t)?[]:YA(t)?"":GS(t)?{}:Xe(t)?(function(){return arguments})():(function(n){var i=Object.prototype.toString.call(n);return i==="[object Uint8ClampedArray]"||i==="[object Int8Array]"||i==="[object Uint8Array]"||i==="[object Int16Array]"||i==="[object Uint16Array]"||i==="[object Int32Array]"||i==="[object Uint32Array]"||i==="[object Float32Array]"||i==="[object Float64Array]"||i==="[object BigInt64Array]"||i==="[object BigUint64Array]"})(t)?t.constructor.from(""):void 0})),XB=Bn((function(t){return Jn(t.length,(function(n,i){var l=Array.prototype.slice.call(arguments,0);return l[0]=i,l[1]=n,t.apply(this,l)}))})),YB=Zt(tO("groupBy",MB((function(t,n){return t.push(n),t}),[]))),ZB=Zt((function(t,n){if(t.length===0||WS(n))return!1;for(var i=n,l=0;l<t.length;){if(WS(i)||!We(t[l],i))return!1;i=i[t[l]],l+=1}return!0})),O$=Zt((function(t,n){return ZB([t],n)})),Kc=function(t,n){switch(arguments.length){case 0:return Kc;case 1:return function i(l){return arguments.length===0?i:rt(t,l)};default:return rt(t,n)}},rO=a((function(t,n,i){return Jn(Math.max(t.length,n.length,i.length),(function(){return t.apply(this,arguments)?n.apply(this,arguments):i.apply(this,arguments)}))})),WB=Zt(Pt),JB=cx(0,-1),sO=Zt((function(t,n){return Jn(t+1,(function(){var i=arguments[t];if(i!=null&&QA(i[n]))return i[n].apply(i,Array.prototype.slice.call(arguments,0,t));throw new TypeError(pm(i)+' does not have a method named "'+n+'"')}))})),ux=Bn((function(t){return t!=null&&pn(t,GB(t))})),k$=Bn((function(t){return!ux(t)})),R$=sO(1,"join");function T$(t){return Object.prototype.toString.call(t)==="[object Number]"}var QB=Zt((function(t,n){return function(i){return function(l){return ax((function(h){return n(h,l)}),i(t(l)))}}}));function iO(t,n){for(var i=n,l=0;l<t.length;l+=1){if(i==null)return;var h=t[l];i=XS(h)?YS(h,i):i[h]}return i}var eU=Zt((function(t,n){return ix((function(i,l){return i[l]=t(n[l],l,n),i}),{},Ee(n))})),tU=a((function(t,n,i){var l,h={};for(l in i=i||{},n=n||{})We(l,n)&&(h[l]=We(l,i)?t(l,n[l],i[l]):n[l]);for(l in i)We(l,i)&&!We(l,h)&&(h[l]=i[l]);return h})),nU=a((function t(n,i,l){return tU((function(h,v,x){return GS(v)&&GS(x)?t(n,v,x):n(h,v,x)}),i,l)})),aO=Zt((function(t,n){return nU((function(i,l,h){return h}),t,n)})),rU=Zt((function(t,n){return te(HS(t),n)})),_$=function(t){return{value:t,map:function(n){return _$(n(t))}}},sU=a((function(t,n,i){return t((function(l){return _$(n(l))}))(i).value})),ra=Zt(iO),$$=a((function(t,n,i){return fm(t,iO(n,i))})),QS=a((function(t,n,i){return t(iO(n,i))})),N$=Zt((function(t,n){for(var i={},l=0;l<t.length;)t[l]in n&&(i[t[l]]=n[t[l]]),l+=1;return i})),D$=a((function(t,n,i){return pn(t,ox(n,i))})),e1=a((function(t,n,i){return fm(t,ox(n,i))})),iU=a((function(t,n,i){return t(ox(n,i))})),aU=Zt((function(t,n){if(!T$(t)||!T$(n))throw new TypeError("Both arguments to range must be numbers");for(var i=Array(t<n?n-t:0),l=t<0?n+Math.abs(t):n-t,h=0;h<l;)i[h]=h+t,h+=1;return i})),oU=Bn(y),mm=a((function(t,n,i){return i.replace(t,n)})),lU=Zt((function(t,n){return Array.prototype.slice.call(n,0).sort(t)})),oO=sO(1,"split"),P$=Zt((function(t,n){return pn(FB(t.length,n),t)})),cU=Zt((function(t,n){if(i=t,Object.prototype.toString.call(i)!=="[object RegExp]")throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+pm(t));var i;return E$(t).test(n)})),uU=(function(){function t(n,i){this.xf=i,this.pred=n,this.items=[]}return t.prototype["@@transducer/init"]=E,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return Be(this.pred,i,this.items)?n:(this.items.push(i),this.xf["@@transducer/step"](n,i))},t})(),dU=Zt(f([],(function(t){return function(n){return new uU(t,n)}}),(function(t,n){for(var i,l=0,h=n.length,v=[];l<h;)Be(t,i=n[l],v)||(v[v.length]=i),l+=1;return v}))),hU=a((function(t,n,i){return t(i)?n(i):i})),t1=Wt(void 0),Ed=pn(t1()),M$=lx(Ed),I$=pn(null),L$=lx(I$),pU=lx(WS),fU=Jn(1,zs(Pe,Kc("GeneratorFunction"))),mU=Jn(1,zs(Pe,Kc("AsyncFunction"))),Vc=jB([zs(Pe,Kc("Function")),fU,mU]),z$=Jn(1,Vc(Array.isArray)?Array.isArray:zs(Pe,Kc("Array"))),gU=Zh(z$,ux),yU=Zh(z$,k$),Wh=Jn(1,zs(Pe,Kc("String"))),F$=pn("");function lO(t){return lO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lO(t)}var q$=function(t){return lO(t)==="object"},vU=lx(Jn(1,Zh(L$,HB(q$,Vc)))),cO=SB([Wh,vU,k$]),xU=lx(Vc),bU=Jn(1,Zh(L$,q$)),wU=zs(Pe,Kc("Object")),SU=zs(pm,pn(pm(Object))),EU=QS(Zh(Vc,SU),["constructor"]),Jh=Jn(1,(function(t){if(!bU(t)||!wU(t))return!1;var n=Object.getPrototypeOf(t);return!!I$(n)||EU(n)})),jU=Zh(Jn(1,zs(Pe,Kc("Number"))),isFinite),CU=Jn(1,jU),AU=Zh(Vc(Number.isFinite)?Jn(1,ZS(Number.isFinite,Number)):CU,DB(pn,[Math.floor,nO])),OU=Jn(1,AU),kU=Vc(Number.isInteger)?Jn(1,ZS(Number.isInteger,Number)):OU,RU=Jn(1,zs(Pe,Kc("RegExp")));function uO(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=Array(n);i<n;i++)l[i]=t[i];return l}var Hc,Gc,TU=zs(lU(_B((function(t,n){return t.length>n.length}))),NB,ox("length")),_U=JA((function(t,n,i){var l=i.apply(void 0,(function(h){return(function(v){if(Array.isArray(v))return uO(v)})(h)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(h)||(function(v,x){if(v){if(typeof v=="string")return uO(v,x);var w={}.toString.call(v).slice(8,-1);return w==="Object"&&v.constructor&&(w=v.constructor.name),w==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?uO(v,x):void 0}})(h)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(t));return pU(l)?oU(l):n})),B$=rO(yU,(function(t){var n=TU(t);return Jn(n,(function(){for(var i=arguments.length,l=new Array(i),h=0;h<i;h++)l[h]=arguments[h];return Yh(_U(l),void 0,t)}))}),t1),n1=XB(WB),dx=Jn(3,(function(t,n,i){var l=ra(t,i),h=ra(JB(t),i);if(!xU(l)&&!gU(t)){var v=ZS(l,h);return OB(v,n)}})),$U=hU(Wh,mm(/[.*+?^${}()|[\]\\-]/g,"\\$&")),U$=function(t,n){if(typeof t!="string"&&!(t instanceof String))throw TypeError("`".concat(n,"` must be a string"))},NU=Jn(3,(function(t,n,i){(function(h,v,x){if(x==null||h==null||v==null)throw TypeError("Input values must not be `null` or `undefined`")})(t,n,i),U$(i,"str"),U$(n,"replaceValue"),(function(h){if(!(typeof h=="string"||h instanceof String||h instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")})(t);var l=new RegExp(RU(t)?t:$U(t),"g");return mm(l,n,i)})),DU=sO(2,"replaceAll"),PU=Vc(String.prototype.replaceAll)?DU:NU,MU=JA((function(t,n){return zs(oO(""),BB(n1(t)),R$(""))(n)})),dO=JA((function(t,n){return zs(oO(""),KB(n1(t)),R$(""))(n)})),K$={exports:{}},Qr=K$.exports={};function hO(){throw new Error("setTimeout has not been defined")}function pO(){throw new Error("clearTimeout has not been defined")}function V$(t){if(Hc===setTimeout)return setTimeout(t,0);if((Hc===hO||!Hc)&&setTimeout)return Hc=setTimeout,setTimeout(t,0);try{return Hc(t,0)}catch{try{return Hc.call(null,t,0)}catch{return Hc.call(this,t,0)}}}(function(){try{Hc=typeof setTimeout=="function"?setTimeout:hO}catch{Hc=hO}try{Gc=typeof clearTimeout=="function"?clearTimeout:pO}catch{Gc=pO}})();var Qh,Xc=[],gm=!1,r1=-1;function IU(){gm&&Qh&&(gm=!1,Qh.length?Xc=Qh.concat(Xc):r1=-1,Xc.length&&H$())}function H$(){if(!gm){var t=V$(IU);gm=!0;for(var n=Xc.length;n;){for(Qh=Xc,Xc=[];++r1<n;)Qh&&Qh[r1].run();r1=-1,n=Xc.length}Qh=null,gm=!1,(function(i){if(Gc===clearTimeout)return clearTimeout(i);if((Gc===pO||!Gc)&&clearTimeout)return Gc=clearTimeout,clearTimeout(i);try{Gc(i)}catch{try{return Gc.call(null,i)}catch{return Gc.call(this,i)}}})(t)}}function G$(t,n){this.fun=t,this.array=n}function Yc(){}Qr.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];Xc.push(new G$(t,n)),Xc.length!==1||gm||V$(H$)},G$.prototype.run=function(){this.fun.apply(null,this.array)},Qr.title="browser",Qr.browser=!0,Qr.env={},Qr.argv=[],Qr.version="",Qr.versions={},Qr.on=Yc,Qr.addListener=Yc,Qr.once=Yc,Qr.off=Yc,Qr.removeListener=Yc,Qr.removeAllListeners=Yc,Qr.emit=Yc,Qr.prependListener=Yc,Qr.prependOnceListener=Yc,Qr.listeners=function(t){return[]},Qr.binding=function(t){throw new Error("process.binding is not supported")},Qr.cwd=function(){return"/"},Qr.chdir=function(t){throw new Error("process.chdir is not supported")},Qr.umask=function(){return 0};const s1=za(K$.exports),fO=()=>QS(cU(/^win/),["platform"],s1),i1=t=>{try{const n=new URL(t);return MU(":",n.protocol)}catch{return}},LU=zs(i1,M$),X$=t=>{const n=t.lastIndexOf(".");return n>=0?t.substring(n).toLowerCase():""},mO=t=>{if(s1.browser)return!1;const n=i1(t);return Ed(n)||n==="file"||/^[a-zA-Z]$/.test(n)},a1=t=>{const n=i1(t);return n==="http"||n==="https"},gO=(t,n)=>{const i=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],l=e1(!1,"keepFileProtocol",n),h=e1(fO,"isWindows",n);let v=decodeURI(t);for(let w=0;w<i.length;w+=2)v=v.replace(i[w],i[w+1]);let x=v.substring(0,7).toLowerCase()==="file://";return x&&(v=v[7]==="/"?v.substring(8):v.substring(7),h()&&v[1]==="/"&&(v=`${v[0]}:${v.substring(1)}`),l?v=`file:///${v}`:(x=!1,v=h()?v:`/${v}`)),h()&&!x&&(v=PU("/","\\",v),v.substring(1,3)===":\\"&&(v=v[0].toUpperCase()+v.substring(1))),v},Y$=t=>{const n=[/\?/g,"%3F",/#/g,"%23"];let i=t;fO()&&(i=i.replace(/\\/g,"/")),i=encodeURI(i);for(let l=0;l<n.length;l+=2)i=i.replace(n[l],n[l+1]);return i},yO=t=>{const n=t.indexOf("#");return n!==-1?t.substring(n):"#"},cr=t=>{const n=t.indexOf("#");let i=t;return n>=0&&(i=t.substring(0,n)),i},o1=()=>{if(s1.browser)return cr(globalThis.location.href);const t=s1.cwd(),n=JS(t);return["/","\\"].includes(n)?t:t+(fO()?"\\":"/")},$s=(t,n)=>{const i=new URL(n,new URL(t,"resolve://"));if(i.protocol==="resolve:"){const{pathname:l,search:h,hash:v}=i;return l+h+v}return i.toString()},hx=t=>{if(mO(t))return Y$(gO(t));try{return new URL(t).toString()}catch{return encodeURI(decodeURI(t)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},Io=t=>mO(t)?gO(t):decodeURI(t),zU=Object.freeze(Object.defineProperty({__proto__:null,cwd:o1,fromFileSystemPath:Y$,getExtension:X$,getHash:yO,getProtocol:i1,hasProtocol:LU,isFileSystemPath:mO,isHttpUrl:a1,isURI:t=>{try{return new URL(t)&&!0}catch{return!1}},resolve:$s,sanitize:hx,stripHash:cr,toFileSystemPath:gO,unsanitize:Io},Symbol.toStringTag,{value:"Module"}));let px=class{uri;mediaType;data;parseResult;constructor({uri:t,mediaType:n="text/plain",data:i,parseResult:l}){this.uri=t,this.mediaType=n,this.data=i,this.parseResult=l}get extension(){return Wh(this.uri)?X$(this.uri):""}toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(Pe(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}};class ym{rootRef;refs;circular;constructor({refs:n=[],circular:i=!1}={}){this.refs=[],this.circular=i,n.forEach(this.add.bind(this))}get size(){return this.refs.length}add(n){return this.has(n)||(this.refs.push(n),this.rootRef=this.rootRef===void 0?n:this.rootRef,n.refSet=this),this}merge(n){for(const i of n.values())this.add(i);return this}has(n){const i=Wh(n)?n:n.uri;return M$(this.find((l=>l.uri===i)))}find(n){return this.refs.find(n)}*values(){yield*this.refs}clean(){this.refs.forEach((n=>{n.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}}const Z$={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:nO,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}},FU=QB(ra(["resolve","baseURI"]),kB(["resolve","baseURI"])),qU=t=>F$(t)?o1():t,W$=(t,n)=>{const i=aO(t,n);return sU(FU,qU,i)};class BU extends br{plugin;constructor(n,i){super(n,{cause:i.cause}),this.plugin=i.plugin}}const vO=async(t,n,i)=>{const l=await Promise.all(i.map(dx([t],n)));return i.filter(((h,v)=>l[v]))},xO=async(t,n,i)=>{let l;for(const h of i)try{const v=await h[t].call(h,...n);return{plugin:h,result:v}}catch(v){l=new BU("Error while running plugin",{cause:v,plugin:h})}return Promise.reject(l)};class bO extends br{}class wO extends br{}class J$ extends wO{}class Q$ extends J${}var eN=typeof Um=="object"&&Um&&Um.Object===Object&&Um,UU=eN,KU=typeof self=="object"&&self&&self.Object===Object&&self,Zc=UU||KU||Function("return this")(),fx=Zc.Symbol,tN=fx,nN=Object.prototype,VU=nN.hasOwnProperty,HU=nN.toString,mx=tN?tN.toStringTag:void 0,GU=Object.prototype.toString,XU=function(t){var n=VU.call(t,mx),i=t[mx];try{t[mx]=void 0;var l=!0}catch{}var h=HU.call(t);return l&&(n?t[mx]=i:delete t[mx]),h},rN=fx?fx.toStringTag:void 0,ep=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":rN&&rN in Object(t)?XU(t):(function(n){return GU.call(n)})(t)},l1=Array.isArray,tp=function(t){return t!=null&&typeof t=="object"},YU=ep,ZU=l1,WU=tp,JU=ep,QU=tp,e8=ep,t8=tp,c1=function(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")},sN=function(t,n){return t===n||t!=t&&n!=n},n8=sN,u1=function(t,n){for(var i=t.length;i--;)if(n8(t[i][0],n))return i;return-1},r8=u1,s8=Array.prototype.splice,i8=u1,a8=u1,o8=u1,l8=function(){this.u=[],this.size=0},c8=function(t){var n=this.u,i=r8(n,t);return!(i<0||(i==n.length-1?n.pop():s8.call(n,i,1),--this.size,0))},u8=function(t){var n=this.u,i=i8(n,t);return i<0?void 0:n[i][1]},d8=function(t,n){var i=this.u,l=o8(i,t);return l<0?(++this.size,i.push([t,n])):i[l][1]=n,this};function vm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}vm.prototype.clear=l8,vm.prototype.delete=c8,vm.prototype.get=u8,vm.prototype.has=function(t){return a8(this.u,t)>-1},vm.prototype.set=d8;var d1=vm,h8=d1,p8=ep,f8=c1,iN=function(t){if(!f8(t))return!1;var n=p8(t);return n=="[object Function]"||n=="[object GeneratorFunction]"||n=="[object AsyncFunction]"||n=="[object Proxy]"},SO=Zc.o,aN=(function(){var t=/[^.]+$/.exec(SO&&SO.keys&&SO.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),m8=Function.prototype.toString,oN=function(t){if(t!=null){try{return m8.call(t)}catch{}try{return t+""}catch{}}return""},g8=iN,y8=function(t){return!!aN&&aN in t},v8=c1,x8=oN,b8=/^\[object .+?Constructor\]$/,w8=Function.prototype,S8=Object.prototype,E8=w8.toString,j8=S8.hasOwnProperty,C8=RegExp("^"+E8.call(j8).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xm=function(t,n){var i=(function(l,h){return l?.[h]})(t,n);return(function(l){return!(!v8(l)||y8(l))&&(g8(l)?C8:b8).test(x8(l))})(i)?i:void 0},EO=xm(Zc,"Map"),h1=xm(Object,"create"),lN=h1,A8=h1,O8=Object.prototype.hasOwnProperty,k8=h1,R8=Object.prototype.hasOwnProperty,T8=h1,_8=function(){this.u=lN?lN(null):{},this.size=0},$8=function(t){var n=this.has(t)&&delete this.u[t];return this.size-=n?1:0,n},N8=function(t){var n=this.u;if(A8){var i=n[t];return i==="__lodash_hash_undefined__"?void 0:i}return O8.call(n,t)?n[t]:void 0},D8=function(t){var n=this.u;return k8?n[t]!==void 0:R8.call(n,t)},P8=function(t,n){var i=this.u;return this.size+=this.has(t)?0:1,i[t]=T8&&n===void 0?"__lodash_hash_undefined__":n,this};function bm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}bm.prototype.clear=_8,bm.prototype.delete=$8,bm.prototype.get=N8,bm.prototype.has=D8,bm.prototype.set=P8;var cN=bm,M8=d1,I8=EO,L8=function(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null},p1=function(t,n){var i=t.u;return L8(n)?i[typeof n=="string"?"string":"hash"]:i.map},z8=p1,F8=p1,q8=p1,B8=p1,U8=function(t,n){var i=B8(this,t),l=i.size;return i.set(t,n),this.size+=i.size==l?0:1,this};function wm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}wm.prototype.clear=function(){this.size=0,this.u={hash:new cN,map:new(I8||M8),string:new cN}},wm.prototype.delete=function(t){var n=z8(this,t).delete(t);return this.size-=n?1:0,n},wm.prototype.get=function(t){return F8(this,t).get(t)},wm.prototype.has=function(t){return q8(this,t).has(t)},wm.prototype.set=U8;var uN=wm,K8=d1,V8=EO,H8=uN,G8=d1,X8=function(){this.u=new h8,this.size=0},Y8=function(t){var n=this.u,i=n.delete(t);return this.size=n.size,i},Z8=function(t){return this.u.get(t)},W8=function(t){return this.u.has(t)},J8=function(t,n){var i=this.u;if(i instanceof K8){var l=i.u;if(!V8||l.length<199)return l.push([t,n]),this.size=++i.size,this;i=this.u=new H8(l)}return i.set(t,n),this.size=i.size,this};function Sm(t){var n=this.u=new G8(t);this.size=n.size}Sm.prototype.clear=X8,Sm.prototype.delete=Y8,Sm.prototype.get=Z8,Sm.prototype.has=W8,Sm.prototype.set=J8;var Q8=Sm,eK=uN;function f1(t){var n=-1,i=t==null?0:t.length;for(this.u=new eK;++n<i;)this.add(t[n])}f1.prototype.add=f1.prototype.push=function(t){return this.u.set(t,"__lodash_hash_undefined__"),this},f1.prototype.has=function(t){return this.u.has(t)};var tK=f1,nK=function(t,n){for(var i=-1,l=t==null?0:t.length;++i<l;)if(n(t[i],i,t))return!0;return!1},rK=function(t,n){return t.has(n)},dN=function(t,n,i,l,h,v){var x=1&i,w=t.length,C=n.length;if(w!=C&&!(x&&C>w))return!1;var $=v.get(t),N=v.get(n);if($&&N)return $==n&&N==t;var _=-1,F=!0,U=2&i?new tK:void 0;for(v.set(t,n),v.set(n,t);++_<w;){var J=t[_],Y=n[_];if(l)var W=x?l(Y,J,_,n,t,v):l(J,Y,_,t,n,v);if(W!==void 0){if(W)continue;F=!1;break}if(U){if(!nK(n,(function(P,se){if(!rK(U,se)&&(J===P||h(J,P,i,l,v)))return U.push(se)}))){F=!1;break}}else if(J!==Y&&!h(J,Y,i,l,v)){F=!1;break}}return v.delete(t),v.delete(n),F},hN=Zc.Uint8Array,sK=sN,iK=dN,aK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l,h){i[++n]=[h,l]})),i},oK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l){i[++n]=l})),i},pN=fx?fx.prototype:void 0,jO=pN?pN.valueOf:void 0,lK=function(t,n){for(var i=-1,l=n.length,h=t.length;++i<l;)t[h+i]=n[i];return t},cK=l1,uK=function(t,n){for(var i=-1,l=t==null?0:t.length,h=0,v=[];++i<l;){var x=t[i];n(x,i,t)&&(v[h++]=x)}return v},dK=Object.prototype.propertyIsEnumerable,fN=Object.getOwnPropertySymbols,hK=fN?function(t){return t==null?[]:(t=Object(t),uK(fN(t),(function(n){return dK.call(t,n)})))}:function(){return[]},pK=ep,fK=tp,mN=function(t){return fK(t)&&pK(t)=="[object Arguments]"},mK=tp,gN=Object.prototype,gK=gN.hasOwnProperty,yK=gN.propertyIsEnumerable,vK=mN((function(){return arguments})())?mN:function(t){return mK(t)&&gK.call(t,"callee")&&!yK.call(t,"callee")},CO={exports:{}},xK=function(){return!1};(function(t,n){var i=Zc,l=xK,h=n&&!n.nodeType&&n,v=h&&t&&!t.nodeType&&t,x=v&&v.exports===h?i.Buffer:void 0,w=(x?x.isBuffer:void 0)||l;t.exports=w})(CO,CO.exports);var yN=CO.exports,bK=/^(?:0|[1-9]\d*)$/,vN=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},wK=ep,SK=vN,EK=tp,Or={};Or["[object Float32Array]"]=Or["[object Float64Array]"]=Or["[object Int8Array]"]=Or["[object Int16Array]"]=Or["[object Int32Array]"]=Or["[object Uint8Array]"]=Or["[object Uint8ClampedArray]"]=Or["[object Uint16Array]"]=Or["[object Uint32Array]"]=!0,Or["[object Arguments]"]=Or["[object Array]"]=Or["[object ArrayBuffer]"]=Or["[object Boolean]"]=Or["[object DataView]"]=Or["[object Date]"]=Or["[object Error]"]=Or["[object Function]"]=Or["[object Map]"]=Or["[object Number]"]=Or["[object Object]"]=Or["[object RegExp]"]=Or["[object Set]"]=Or["[object String]"]=Or["[object WeakMap]"]=!1;var AO={exports:{}};(function(t,n){var i=eN,l=n&&!n.nodeType&&n,h=l&&t&&!t.nodeType&&t,v=h&&h.exports===l&&i.process,x=(function(){try{return h&&h.require&&h.require("util").types||v&&v.binding&&v.binding("util")}catch{}})();t.exports=x})(AO,AO.exports);var xN=AO.exports,jK=function(t){return EK(t)&&SK(t.length)&&!!Or[wK(t)]},CK=function(t){return function(n){return t(n)}},bN=xN&&xN.isTypedArray,wN=bN?CK(bN):jK,AK=function(t,n){for(var i=-1,l=Array(t);++i<t;)l[i]=n(i);return l},OK=vK,kK=l1,RK=yN,TK=function(t,n){var i=typeof t;return!!(n=n??9007199254740991)&&(i=="number"||i!="symbol"&&bK.test(t))&&t>-1&&t%1==0&&t<n},_K=wN,$K=Object.prototype.hasOwnProperty,NK=Object.prototype,DK=(function(t,n){return function(i){return t(n(i))}})(Object.keys,Object),PK=function(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||NK)},MK=DK,IK=Object.prototype.hasOwnProperty,LK=iN,zK=vN,FK=function(t,n){var i=kK(t),l=!i&&OK(t),h=!i&&!l&&RK(t),v=!i&&!l&&!h&&_K(t),x=i||l||h||v,w=x?AK(t.length,String):[],C=w.length;for(var $ in t)!$K.call(t,$)||x&&($=="length"||h&&($=="offset"||$=="parent")||v&&($=="buffer"||$=="byteLength"||$=="byteOffset")||TK($,C))||w.push($);return w},qK=function(t,n,i){var l=n(t);return cK(t)?l:lK(l,i(t))},BK=hK,UK=function(t){return(function(n){return n!=null&&zK(n.length)&&!LK(n)})(t)?FK(t):(function(n){if(!PK(n))return MK(n);var i=[];for(var l in Object(n))IK.call(n,l)&&l!="constructor"&&i.push(l);return i})(t)},SN=function(t){return qK(t,UK,BK)},KK=Object.prototype.hasOwnProperty,OO=xm(Zc,"DataView"),kO=EO,RO=xm(Zc,"Promise"),TO=xm(Zc,"Set"),_O=xm(Zc,"WeakMap"),EN=ep,Em=oN,VK=Em(OO),HK=Em(kO),GK=Em(RO),XK=Em(TO),YK=Em(_O),np=EN;(OO&&np(new OO(new ArrayBuffer(1)))!="[object DataView]"||kO&&np(new kO)!="[object Map]"||RO&&np(RO.resolve())!="[object Promise]"||TO&&np(new TO)!="[object Set]"||_O&&np(new _O)!="[object WeakMap]")&&(np=function(t){var n=EN(t),i=n=="[object Object]"?t.constructor:void 0,l=i?Em(i):"";if(l)switch(l){case VK:return"[object DataView]";case HK:return"[object Map]";case GK:return"[object Promise]";case XK:return"[object Set]";case YK:return"[object WeakMap]"}return n});var $O=Q8,ZK=dN,WK=function(t,n,i,l,h,v,x){switch(i){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!v(new hN(t),new hN(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return sK(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var w=aK;case"[object Set]":var C=1&l;if(w||(w=oK),t.size!=n.size&&!C)return!1;var $=x.get(t);if($)return $==n;l|=2,x.set(t,n);var N=iK(w(t),w(n),l,h,v,x);return x.delete(t),N;case"[object Symbol]":if(jO)return jO.call(t)==jO.call(n)}return!1},JK=function(t,n,i,l,h,v){var x=1&i,w=SN(t),C=w.length;if(C!=SN(n).length&&!x)return!1;for(var $=C;$--;){var N=w[$];if(!(x?N in n:KK.call(n,N)))return!1}var _=v.get(t),F=v.get(n);if(_&&F)return _==n&&F==t;var U=!0;v.set(t,n),v.set(n,t);for(var J=x;++$<C;){var Y=t[N=w[$]],W=n[N];if(l)var P=x?l(W,Y,N,n,t,v):l(Y,W,N,t,n,v);if(!(P===void 0?Y===W||h(Y,W,i,l,v):P)){U=!1;break}J||(J=N=="constructor")}if(U&&!J){var se=t.constructor,ae=n.constructor;se==ae||!("constructor"in t)||!("constructor"in n)||typeof se=="function"&&se instanceof se&&typeof ae=="function"&&ae instanceof ae||(U=!1)}return v.delete(t),v.delete(n),U},jN=np,CN=l1,AN=yN,QK=wN,m1="[object Object]",ON=Object.prototype.hasOwnProperty,kN=tp,eV=function t(n,i,l,h,v){return n===i||(n==null||i==null||!kN(n)&&!kN(i)?n!=n&&i!=i:(function(x,w,C,$,N,_){var F=CN(x),U=CN(w),J=F?"[object Array]":jN(x),Y=U?"[object Array]":jN(w),W=(J=J=="[object Arguments]"?m1:J)==m1,P=(Y=Y=="[object Arguments]"?m1:Y)==m1,se=J==Y;if(se&&AN(x)){if(!AN(w))return!1;F=!0,W=!1}if(se&&!W)return _||(_=new $O),F||QK(x)?ZK(x,w,C,$,N,_):WK(x,w,J,C,$,N,_);if(!(1&C)){var ae=W&&ON.call(x,"__wrapped__"),he=P&&ON.call(w,"__wrapped__");if(ae||he){var ge=ae?x.value():x,pe=he?w.value():w;return _||(_=new $O),N(ge,pe,C,$,_)}}return!!se&&(_||(_=new $O),JK(x,w,C,$,N,_))})(n,i,l,h,t,v))},g1=class lB{constructor(n,i){this.key=n,this.value=i}clone(){const n=new lB;return this.key&&(n.key=this.key.clone()),this.value&&(n.value=this.value.clone()),n}},y1=function(t){if(typeof t!="function")throw new TypeError("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}};const tV=y1;function NO(t){return typeof t=="string"?n=>n.element===t:t.constructor&&t.extend?n=>n instanceof t:t}let RN=class k_{constructor(n){this.elements=n||[]}toValue(){return this.elements.map((n=>n.toValue()))}map(n,i){return this.elements.map(n,i)}flatMap(n,i){return this.map(n,i).reduce(((l,h)=>l.concat(h)),[])}compactMap(n,i){const l=[];return this.forEach((h=>{const v=n.bind(i)(h);v&&l.push(v)})),l}filter(n,i){return n=NO(n),new k_(this.elements.filter(n,i))}reject(n,i){return n=NO(n),new k_(this.elements.filter(tV(n),i))}find(n,i){return n=NO(n),this.elements.find(n,i)}forEach(n,i){this.elements.forEach(n,i)}reduce(n,i){return this.elements.reduce(n,i)}includes(n){return this.elements.some((i=>i.equals(n)))}shift(){return this.elements.shift()}unshift(n){this.elements.unshift(this.refract(n))}push(n){return this.elements.push(this.refract(n)),this}add(n){this.push(n)}get(n){return this.elements[n]}getValue(n){const i=this.elements[n];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}};typeof Symbol<"u"&&(RN.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()});var v1=RN;const nV=function(t,n){return eV(t,n)},x1=g1,jd=v1;var Wc=class Ej{constructor(n,i,l){i&&(this.meta=i),l&&(this.attributes=l),this.content=n}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((n=>{n.parent=this,n.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const n=new this.constructor;return n.element=this.element,this.meta.length&&(n._meta=this.meta.clone()),this.attributes.length&&(n._attributes=this.attributes.clone()),this.content?this.content.clone?n.content=this.content.clone():Array.isArray(this.content)?n.content=this.content.map((i=>i.clone())):n.content=this.content:n.content=this.content,n}toValue(){return this.content instanceof Ej?this.content.toValue():this.content instanceof x1?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((n=>n.toValue()),this):this.content}toRef(n){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const i=new this.RefElement(this.id.toValue());return n&&(i.path=n),i}findRecursive(...n){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const i=n.pop();let l=new jd;const h=(x,w)=>(x.push(w),x),v=(x,w)=>{w.element===i&&x.push(w);const C=w.findRecursive(i);return C&&C.reduce(h,x),w.content instanceof x1&&(w.content.key&&v(x,w.content.key),w.content.value&&v(x,w.content.value)),x};return this.content&&(this.content.element&&v(l,this.content),Array.isArray(this.content)&&this.content.reduce(v,l)),n.isEmpty||(l=l.filter((x=>{let w=x.parents.map((C=>C.element));for(const C in n){const $=n[C],N=w.indexOf($);if(N===-1)return!1;w=w.splice(0,N)}return!0}))),l}set(n){return this.content=n,this}equals(n){return nV(this.toValue(),n)}getMetaProperty(n,i){if(!this.meta.hasKey(n)){if(this.isFrozen){const l=this.refract(i);return l.freeze(),l}this.meta.set(n,i)}return this.meta.get(n)}setMetaProperty(n,i){this.meta.set(n,i)}get element(){return this._storedElement||"element"}set element(n){this._storedElement=n}get content(){return this._content}set content(n){if(n instanceof Ej)this._content=n;else if(n instanceof jd)this.content=n.elements;else if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n==="null"||n==null)this._content=n;else if(n instanceof x1)this._content=n;else if(Array.isArray(n))this._content=n.map(this.refract);else{if(typeof n!="object")throw new Error("Cannot set content to given value");this._content=Object.keys(n).map((i=>new this.MemberElement(i,n[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._meta=new this.ObjectElement}return this._meta}set meta(n){n instanceof this.ObjectElement?this._meta=n:this.meta.set(n||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._attributes=new this.ObjectElement}return this._attributes}set attributes(n){n instanceof this.ObjectElement?this._attributes=n:this.attributes.set(n||{})}get id(){return this.getMetaProperty("id","")}set id(n){this.setMetaProperty("id",n)}get classes(){return this.getMetaProperty("classes",[])}set classes(n){this.setMetaProperty("classes",n)}get title(){return this.getMetaProperty("title","")}set title(n){this.setMetaProperty("title",n)}get description(){return this.getMetaProperty("description","")}set description(n){this.setMetaProperty("description",n)}get links(){return this.getMetaProperty("links",[])}set links(n){this.setMetaProperty("links",n)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:n}=this;const i=new jd;for(;n;)i.push(n),n=n.parent;return i}get children(){if(Array.isArray(this.content))return new jd(this.content);if(this.content instanceof x1){const n=new jd([this.content.key]);return this.content.value&&n.push(this.content.value),n}return this.content instanceof Ej?new jd([this.content]):new jd}get recursiveChildren(){const n=new jd;return this.children.forEach((i=>{n.push(i),i.recursiveChildren.forEach((l=>{n.push(l)}))})),n}};const rV=Wc,sV=Wc,iV=Wc,aV=Wc,oV=y1,lV=Wc,TN=v1;let gx=class extends lV{constructor(t,n,i){super(t||[],n,i),this.element="array"}primitive(){return"array"}get(t){return this.content[t]}getValue(t){const n=this.get(t);if(n)return n.toValue()}getIndex(t){return this.content[t]}set(t,n){return this.content[t]=this.refract(n),this}remove(t){const n=this.content.splice(t,1);return n.length?n[0]:null}map(t,n){return this.content.map(t,n)}flatMap(t,n){return this.map(t,n).reduce(((i,l)=>i.concat(l)),[])}compactMap(t,n){const i=[];return this.forEach((l=>{const h=t.bind(n)(l);h&&i.push(h)})),i}filter(t,n){return new TN(this.content.filter(t,n))}reject(t,n){return this.filter(oV(t),n)}reduce(t,n){let i,l;n!==void 0?(i=0,l=this.refract(n)):(i=1,l=this.primitive()==="object"?this.first.value:this.first);for(let h=i;h<this.length;h+=1){const v=this.content[h];l=this.primitive()==="object"?this.refract(t(l,v.value,v.key,v,this)):this.refract(t(l,v,h,this))}return l}forEach(t,n){this.content.forEach(((i,l)=>{t.bind(n)(i,this.refract(l))}))}shift(){return this.content.shift()}unshift(t){this.content.unshift(this.refract(t))}push(t){return this.content.push(this.refract(t)),this}add(t){this.push(t)}findElements(t,n){const i=n||{},l=!!i.recursive,h=i.results===void 0?[]:i.results;return this.forEach(((v,x,w)=>{l&&v.findElements!==void 0&&v.findElements(t,{results:h,recursive:l}),t(v,x,w)&&h.push(v)})),h}find(t){return new TN(this.findElements(t,{recursive:!0}))}findByElement(t){return this.find((n=>n.element===t))}findByClass(t){return this.find((n=>n.classes.includes(t)))}getById(t){return this.find((n=>n.id.toValue()===t)).first}includes(t){return this.content.some((n=>n.equals(t)))}contains(t){return this.includes(t)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(t){return new this.constructor(this.content.concat(t.content))}"fantasy-land/concat"(t){return this.concat(t)}"fantasy-land/map"(t){return new this.constructor(this.map(t))}"fantasy-land/chain"(t){return this.map((n=>t(n)),this).reduce(((n,i)=>n.concat(i)),this.empty())}"fantasy-land/filter"(t){return new this.constructor(this.content.filter(t))}"fantasy-land/reduce"(t,n){return this.content.reduce(t,n)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}};gx.empty=function(){return new this},gx["fantasy-land/empty"]=gx.empty,typeof Symbol<"u"&&(gx.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()});var _N=gx;const cV=g1,uV=Wc;var $N=class extends uV{constructor(t,n,i,l){super(new cV,i,l),this.element="member",this.key=t,this.value=n}get key(){return this.content.key}set key(t){this.content.key=this.refract(t)}get value(){return this.content.value}set value(t){this.content.value=this.refract(t)}};const dV=y1,hV=v1;var NN=class cB extends hV{map(n,i){return this.elements.map((l=>n.bind(i)(l.value,l.key,l)))}filter(n,i){return new cB(this.elements.filter((l=>n.bind(i)(l.value,l.key,l))))}reject(n,i){return this.filter(dV(n.bind(i)))}forEach(n,i){return this.elements.forEach(((l,h)=>{n.bind(i)(l.value,l.key,l,h)}))}keys(){return this.map(((n,i)=>i.toValue()))}values(){return this.map((n=>n.toValue()))}};const pV=y1,fV=c1,mV=_N,gV=$N,yV=NN,vV=Wc,xV=Wc,jm=Wc,DN=class extends rV{constructor(t,n,i){super(t||null,n,i),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}},PN=class extends sV{constructor(t,n,i){super(t,n,i),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},MN=class extends iV{constructor(t,n,i){super(t,n,i),this.element="number"}primitive(){return"number"}},IN=class extends aV{constructor(t,n,i){super(t,n,i),this.element="boolean"}primitive(){return"boolean"}},LN=_N,zN=$N,DO=class extends mV{constructor(t,n,i){super(t||[],n,i),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((t,n)=>(t[n.key.toValue()]=n.value?n.value.toValue():void 0,t)),{})}get(t){const n=this.getMember(t);if(n)return n.value}getMember(t){if(t!==void 0)return this.content.find((n=>n.key.toValue()===t))}remove(t){let n=null;return this.content=this.content.filter((i=>i.key.toValue()!==t||(n=i,!1))),n}getKey(t){const n=this.getMember(t);if(n)return n.key}set(t,n){if(fV(t))return Object.keys(t).forEach((h=>{this.set(h,t[h])})),this;const i=t,l=this.getMember(i);return l?l.value=n:this.content.push(new gV(i,n)),this}keys(){return this.content.map((t=>t.key.toValue()))}values(){return this.content.map((t=>t.value.toValue()))}hasKey(t){return this.content.some((n=>n.key.equals(t)))}items(){return this.content.map((t=>[t.key.toValue(),t.value.toValue()]))}map(t,n){return this.content.map((i=>t.bind(n)(i.value,i.key,i)))}compactMap(t,n){const i=[];return this.forEach(((l,h,v)=>{const x=t.bind(n)(l,h,v);x&&i.push(x)})),i}filter(t,n){return new yV(this.content).filter(t,n)}reject(t,n){return this.filter(pV(t),n)}forEach(t,n){return this.content.forEach((i=>t.bind(n)(i.value,i.key,i)))}},FN=class extends xV{constructor(t,n,i){super(t||[],n,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(t){this.attributes.set("path",t)}},qN=v1,bV=NN,wV=g1;function b1(t){return t instanceof jm?t:typeof t=="string"?new PN(t):typeof t=="number"?new MN(t):typeof t=="boolean"?new IN(t):t===null?new DN:Array.isArray(t)?new LN(t.map(b1)):typeof t=="object"?new DO(t):t}jm.prototype.ObjectElement=DO,jm.prototype.RefElement=FN,jm.prototype.MemberElement=zN,jm.prototype.refract=b1,qN.prototype.refract=b1;var sa={Element:jm,NullElement:DN,StringElement:PN,NumberElement:MN,BooleanElement:IN,ArrayElement:LN,MemberElement:zN,ObjectElement:DO,LinkElement:class extends vV{constructor(t,n,i){super(t||[],n,i),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(t){this.attributes.set("relation",t)}get href(){return this.attributes.get("href")}set href(t){this.attributes.set("href",t)}},RefElement:FN,refract:b1,ArraySlice:qN,ObjectSlice:bV,KeyValuePair:wV};const SV=function(t){return t===null},EV=function(t){return typeof t=="string"||!ZU(t)&&WU(t)&&YU(t)=="[object String]"},jV=function(t){return typeof t=="number"||QU(t)&&JU(t)=="[object Number]"},CV=function(t){return t===!0||t===!1||t8(t)&&e8(t)=="[object Boolean]"},AV=c1,BN=class{constructor(t){this.namespace=t||new this.Namespace}serialise(t){if(!(t instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${t}\` is not an Element instance`);const n={element:t.element};t._meta&&t._meta.length>0&&(n.meta=this.serialiseObject(t.meta)),t._attributes&&t._attributes.length>0&&(n.attributes=this.serialiseObject(t.attributes));const i=this.serialiseContent(t.content);return i!==void 0&&(n.content=i),n}deserialise(t){if(!t.element)throw new Error("Given value is not an object containing an element name");const n=new(this.namespace.getElementClass(t.element));n.element!==t.element&&(n.element=t.element),t.meta&&this.deserialiseObject(t.meta,n.meta),t.attributes&&this.deserialiseObject(t.attributes,n.attributes);const i=this.deserialiseContent(t.content);return i===void 0&&n.content!==null||(n.content=i),n}serialiseContent(t){if(t instanceof this.namespace.elements.Element)return this.serialise(t);if(t instanceof this.namespace.KeyValuePair){const n={key:this.serialise(t.key)};return t.value&&(n.value=this.serialise(t.value)),n}return t&&t.map?t.length===0?void 0:t.map(this.serialise,this):t}deserialiseContent(t){if(t){if(t.element)return this.deserialise(t);if(t.key){const n=new this.namespace.KeyValuePair(this.deserialise(t.key));return t.value&&(n.value=this.deserialise(t.value)),n}if(t.map)return t.map(this.deserialise,this)}return t}serialiseObject(t){const n={};if(t.forEach(((i,l)=>{i&&(n[l.toValue()]=this.serialise(i))})),Object.keys(n).length!==0)return n}deserialiseObject(t,n){Object.keys(t).forEach((i=>{n.set(i,this.deserialise(t[i]))}))}},Fs=sa;let UN=class{constructor(t){this.elementMap={},this.elementDetection=[],this.Element=Fs.Element,this.KeyValuePair=Fs.KeyValuePair,t&&t.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(t){return t.namespace&&t.namespace({base:this}),t.load&&t.load({base:this}),this}useDefault(){return this.register("null",Fs.NullElement).register("string",Fs.StringElement).register("number",Fs.NumberElement).register("boolean",Fs.BooleanElement).register("array",Fs.ArrayElement).register("object",Fs.ObjectElement).register("member",Fs.MemberElement).register("ref",Fs.RefElement).register("link",Fs.LinkElement),this.detect(SV,Fs.NullElement,!1).detect(EV,Fs.StringElement,!1).detect(jV,Fs.NumberElement,!1).detect(CV,Fs.BooleanElement,!1).detect(Array.isArray,Fs.ArrayElement,!1).detect(AV,Fs.ObjectElement,!1),this}register(t,n){return this._elements=void 0,this.elementMap[t]=n,this}unregister(t){return this._elements=void 0,delete this.elementMap[t],this}detect(t,n,i){return i===void 0||i?this.elementDetection.unshift([t,n]):this.elementDetection.push([t,n]),this}toElement(t){if(t instanceof this.Element)return t;let n;for(let i=0;i<this.elementDetection.length;i+=1){const l=this.elementDetection[i][0],h=this.elementDetection[i][1];if(l(t)){n=new h(t);break}}return n}getElementClass(t){const n=this.elementMap[t];return n===void 0?this.Element:n}fromRefract(t){return this.serialiser.deserialise(t)}toRefract(t){return this.serialiser.serialise(t)}get elements(){return this._elements===void 0&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((t=>{const n=t[0].toUpperCase()+t.substr(1);this._elements[n]=this.elementMap[t]}))),this._elements}get serialiser(){return new BN(this)}};BN.prototype.Namespace=UN;var OV=UN,Cm=g1,yx=sa.ArraySlice,w1=sa.ObjectSlice,kV=sa.Element,Jc=sa.StringElement,PO=sa.NumberElement,Qc=sa.BooleanElement,MO=sa.NullElement,ur=sa.ArrayElement,St=sa.ObjectElement,vx=sa.MemberElement,eu=sa.RefElement,IO=sa.LinkElement,LO=sa.refract;class S1 extends Jc{constructor(n,i,l){super(n,i,l),this.element="annotation"}get code(){return this.attributes.get("code")}set code(n){this.attributes.set("code",n)}}class E1 extends Jc{constructor(n,i,l){super(n,i,l),this.element="comment"}}class Lo extends ur{constructor(n,i,l){super(n,i,l),this.element="parseResult"}get api(){return this.children.filter((n=>n.classes.contains("api"))).first}get results(){return this.children.filter((n=>n.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((n=>n.element==="annotation"))}get warnings(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("warning")))}get errors(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("error")))}get isEmpty(){return this.children.reject((n=>n.element==="annotation")).isEmpty}replaceResult(n){const{result:i}=this;if(Ed(i))return!1;const l=this.content.findIndex((h=>h===i));return l!==-1&&(this.content[l]=n,!0)}}class j1 extends ur{constructor(n,i,l){super(n,i,l),this.element="sourceMap"}get positionStart(){return this.children.filter((n=>n.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((n=>n.classes.contains("position"))).get(1)}set position(n){if(n===void 0)return;const i=new ur([n.start.row,n.start.column,n.start.char]),l=new ur([n.end.row,n.end.column,n.end.char]);i.classes.push("position"),l.classes.push("position"),this.push(i).push(l)}}const RV=(t,n)=>typeof n=="object"&&n!==null&&t in n&&typeof n[t]=="function",TV=t=>typeof t=="object"&&t!=null&&"_storedElement"in t&&typeof t._storedElement=="string"&&"_content"in t,_V=(t,n)=>typeof n=="object"&&n!==null&&"primitive"in n&&typeof n.primitive=="function"&&n.primitive()===t,$V=(t,n)=>typeof n=="object"&&n!==null&&"classes"in n&&(Array.isArray(n.classes)||n.classes instanceof ur)&&n.classes.includes(t),Cd=(t,n)=>typeof n=="object"&&n!==null&&"element"in n&&n.element===t,_t=t=>t({hasMethod:RV,hasBasicElementProps:TV,primitiveEq:_V,isElementType:Cd,hasClass:$V}),es=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof kV||t(i)&&n(void 0,i))),xn=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof Jc||t(i)&&n("string",i))),zO=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof PO||t(i)&&n("number",i))),FO=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof MO||t(i)&&n("null",i))),xx=_t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof Qc||t(i)&&n("boolean",i))),Un=_t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof St||t(l)&&n("object",l)&&i("keys",l)&&i("values",l)&&i("items",l))),Ri=_t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof ur&&!(l instanceof St)||t(l)&&n("array",l)&&i("push",l)&&i("unshift",l)&&i("map",l)&&i("reduce",l))),zo=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof vx||t(l)&&n("member",l)&&i(void 0,l))),KN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof IO||t(l)&&n("link",l)&&i(void 0,l))),VN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof eu||t(l)&&n("ref",l)&&i(void 0,l))),NV=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof S1||t(l)&&n("annotation",l)&&i("array",l))),DV=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof E1||t(l)&&n("comment",l)&&i("string",l))),HN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Lo||t(l)&&n("parseResult",l)&&i("array",l))),GN=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof j1||t(l)&&n("sourceMap",l)&&i("array",l))),rp=t=>Cd("object",t)||Cd("array",t)||Cd("boolean",t)||Cd("number",t)||Cd("string",t)||Cd("null",t)||Cd("member",t),bx=t=>GN(t.meta.get("sourceMap")),C1=(t,n)=>t.length===0||te(n1(n.classes.toValue()),t),PV=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:bx,includesClasses:C1,includesSymbols:(t,n)=>{if(t.length===0)return!0;const i=n.attributes.get("symbols");return!!Ri(i)&&te(n1(i.toValue()),t)},isAnnotationElement:NV,isArrayElement:Ri,isBooleanElement:xx,isCommentElement:DV,isElement:es,isLinkElement:KN,isMemberElement:zo,isNullElement:FO,isNumberElement:zO,isObjectElement:Un,isParseResultElement:HN,isPrimitiveElement:rp,isRefElement:VN,isSourceMapElement:GN,isStringElement:xn},Symbol.toStringTag,{value:"Module"}));class XN extends OV{constructor(){super(),this.register("annotation",S1),this.register("comment",E1),this.register("parseResult",Lo),this.register("sourceMap",j1)}}const YN=new XN,wx=t=>{const n=new XN;return Jh(t)&&n.use(t),n},ZN=()=>({predicates:{...PV},namespace:YN}),A1=(t,n,i)=>{const l=t[n];if(l!=null){if(!i&&typeof l=="function")return l;const h=i?l.leave:l.enter;if(typeof h=="function")return h}else{const h=i?t.leave:t.enter;if(h!=null){if(typeof h=="function")return h;const v=h[n];if(typeof v=="function")return v}}return null},Gn={},Sx=t=>t?.type,WN=t=>typeof Sx(t)=="string",qO=t=>Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),O1=(t,{visitFnGetter:n=A1,nodeTypeGetter:i=Sx,breakSymbol:l=Gn,deleteNodeSymbol:h=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const w=Symbol("skip"),C=new Array(t.length).fill(w);return{enter($,N,_,F,U,J){let Y=$,W=!1;const P={...J,replaceWith(se,ae){J.replaceWith(se,ae),Y=se}};for(let se=0;se<t.length;se+=1)if(C[se]===w){const ae=n(t[se],i(Y),!1);if(typeof ae=="function"){const he=ae.call(t[se],Y,N,_,F,U,P);if(typeof he?.then=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:t[se],visitFn:ae});if(he===v)C[se]=Y;else if(he===l)C[se]=l;else{if(he===h)return he;if(he!==void 0){if(!x)return he;Y=he,W=!0}}}}return W?Y:void 0},leave($,N,_,F,U,J){let Y=$;const W={...J,replaceWith(P,se){J.replaceWith(P,se),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===w){const se=n(t[P],i(Y),!0);if(typeof se=="function"){const ae=se.call(t[P],Y,N,_,F,U,W);if(typeof ae?.then=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:t[P],visitFn:se});if(ae===l)C[P]=l;else if(ae!==void 0&&ae!==v)return ae}}else C[P]===Y&&(C[P]=w)}}};O1[Symbol.for("nodejs.util.promisify.custom")]=(t,{visitFnGetter:n=A1,nodeTypeGetter:i=Sx,breakSymbol:l=Gn,deleteNodeSymbol:h=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const w=Symbol("skip"),C=new Array(t.length).fill(w);return{async enter($,N,_,F,U,J){let Y=$,W=!1;const P={...J,replaceWith(se,ae){J.replaceWith(se,ae),Y=se}};for(let se=0;se<t.length;se+=1)if(C[se]===w){const ae=n(t[se],i(Y),!1);if(typeof ae=="function"){const he=await ae.call(t[se],Y,N,_,F,U,P);if(he===v)C[se]=Y;else if(he===l)C[se]=l;else{if(he===h)return he;if(he!==void 0){if(!x)return he;Y=he,W=!0}}}}return W?Y:void 0},async leave($,N,_,F,U,J){let Y=$;const W={...J,replaceWith(P,se){J.replaceWith(P,se),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===w){const se=n(t[P],i(Y),!0);if(typeof se=="function"){const ae=await se.call(t[P],Y,N,_,F,U,W);if(ae===l)C[P]=l;else if(ae!==void 0&&ae!==v)return ae}}else C[P]===Y&&(C[P]=w)}}};const BO=(t,n,{keyMap:i=null,state:l={},breakSymbol:h=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:w=A1,nodeTypeGetter:C=Sx,nodePredicate:$=WN,nodeCloneFn:N=qO,detectCycles:_=!0}={})=>{const F=i||{};let U,J,Y=Array.isArray(t),W=[t],P=-1,se=[],ae=t;const he=[],ge=[];do{P+=1;const Ae=P===W.length;let qe;const Se=Ae&&se.length!==0;if(Ae){if(qe=ge.length===0?void 0:he.pop(),ae=J,J=ge.pop(),Se)if(Y){ae=ae.slice();let Me=0;for(const[Ie,Qe]of se){const ct=Ie-Me;Qe===v?(ae.splice(ct,1),Me+=1):ae[ct]=Qe}}else{ae=N(ae);for(const[Me,Ie]of se)ae[Me]=Ie}P=U.index,W=U.keys,se=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(qe=Y?P:W[P],ae=J[qe],ae===v||ae===void 0)continue;he.push(qe)}let me;if(!Array.isArray(ae)){var pe;if(!$(ae))throw new Oa(`Invalid AST Node: ${String(ae)}`,{node:ae});if(_&&ge.includes(ae)){he.pop();continue}const Me=w(n,C(ae),Ae);if(Me){for(const[Qe,ct]of Object.entries(l))n[Qe]=ct;const Ie={replaceWith(Qe,ct){typeof ct=="function"?ct(Qe,ae,qe,J,he,ge):J&&(J[qe]=Qe),Ae||(ae=Qe)}};me=Me.call(n,ae,qe,J,he,ge,Ie)}if(typeof((pe=me)===null||pe===void 0?void 0:pe.then)=="function")throw new Oa("Async visitor not supported in sync mode",{visitor:n,visitFn:Me});if(me===h)break;if(me===x){if(!Ae){he.pop();continue}}else if(me!==void 0&&(se.push([qe,me]),!Ae)){if(!$(me)){he.pop();continue}ae=me}}var Te;me===void 0&&Se&&se.push([qe,ae]),Ae||(U={inArray:Y,index:P,keys:W,edits:se,prev:U},Y=Array.isArray(ae),W=Y?ae:(Te=F[C(ae)])!==null&&Te!==void 0?Te:[],P=-1,se=[],J!==v&&J!==void 0&&ge.push(J),J=ae)}while(U!==void 0);return se.length!==0?se[se.length-1][1]:t};BO[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=null,state:l={},breakSymbol:h=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:w=A1,nodeTypeGetter:C=Sx,nodePredicate:$=WN,nodeCloneFn:N=qO,detectCycles:_=!0}={})=>{const F=i||{};let U,J,Y=Array.isArray(t),W=[t],P=-1,se=[],ae=t;const he=[],ge=[];do{P+=1;const Te=P===W.length;let Ae;const qe=Te&&se.length!==0;if(Te){if(Ae=ge.length===0?void 0:he.pop(),ae=J,J=ge.pop(),qe)if(Y){ae=ae.slice();let me=0;for(const[Me,Ie]of se){const Qe=Me-me;Ie===v?(ae.splice(Qe,1),me+=1):ae[Qe]=Ie}}else{ae=N(ae);for(const[me,Me]of se)ae[me]=Me}P=U.index,W=U.keys,se=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(Ae=Y?P:W[P],ae=J[Ae],ae===v||ae===void 0)continue;he.push(Ae)}let Se;if(!Array.isArray(ae)){if(!$(ae))throw new Oa(`Invalid AST Node: ${String(ae)}`,{node:ae});if(_&&ge.includes(ae)){he.pop();continue}const me=w(n,C(ae),Te);if(me){for(const[Ie,Qe]of Object.entries(l))n[Ie]=Qe;const Me={replaceWith(Ie,Qe){typeof Qe=="function"?Qe(Ie,ae,Ae,J,he,ge):J&&(J[Ae]=Ie),Te||(ae=Ie)}};Se=await me.call(n,ae,Ae,J,he,ge,Me)}if(Se===h)break;if(Se===x){if(!Te){he.pop();continue}}else if(Se!==void 0&&(se.push([Ae,Se]),!Te)){if(!$(Se)){he.pop();continue}ae=Se}}var pe;Se===void 0&&qe&&se.push([Ae,ae]),Te||(U={inArray:Y,index:P,keys:W,edits:se,prev:U},Y=Array.isArray(ae),W=Y?ae:(pe=F[C(ae)])!==null&&pe!==void 0?pe:[],P=-1,se=[],J!==v&&J!==void 0&&ge.push(J),J=ae)}while(U!==void 0);return se.length!==0?se[se.length-1][1]:t};class JN extends Oa{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class MV extends JN{}class IV extends JN{}const Ct=(t,n={})=>{const{visited:i=new WeakMap}=n,l={...n,visited:i};if(i.has(t))return i.get(t);if(t instanceof Cm){const{key:h,value:v}=t,x=es(h)?Ct(h,l):h,w=es(v)?Ct(v,l):v,C=new Cm(x,w);return i.set(t,C),C}if(t instanceof w1){const h=w=>Ct(w,l),v=[...t].map(h),x=new w1(v);return i.set(t,x),x}if(t instanceof yx){const h=w=>Ct(w,l),v=[...t].map(h),x=new yx(v);return i.set(t,x),x}if(es(t)){const h=Ti(t);if(i.set(t,h),t.content)if(es(t.content))h.content=Ct(t.content,l);else if(t.content instanceof Cm)h.content=Ct(t.content,l);else if(Array.isArray(t.content)){const v=x=>Ct(x,l);h.content=t.content.map(v)}else h.content=t.content;else h.content=t.content;return h}throw new MV("Value provided to cloneDeep function couldn't be cloned",{value:t})};Ct.safe=t=>{try{return Ct(t)}catch{return t}};const QN=t=>{const{key:n,value:i}=t;return new Cm(n,i)},eD=t=>{const n=new t.constructor;if(n.element=t.element,t.meta.length>0&&(n._meta=Ct(t.meta)),t.attributes.length>0&&(n._attributes=Ct(t.attributes)),es(t.content)){const i=t.content;n.content=eD(i)}else Array.isArray(t.content)?n.content=[...t.content]:t.content instanceof Cm?n.content=QN(t.content):n.content=t.content;return n},Ti=t=>{if(t instanceof Cm)return QN(t);if(t instanceof w1)return(n=>{const i=[...n];return new w1(i)})(t);if(t instanceof yx)return(n=>{const i=[...n];return new yx(i)})(t);if(es(t))return eD(t);throw new IV("Value provided to cloneShallow function couldn't be cloned",{value:t})};Ti.safe=t=>{try{return Ti(t)}catch{return t}};const Am=t=>Un(t)?"ObjectElement":Ri(t)?"ArrayElement":zo(t)?"MemberElement":xn(t)?"StringElement":xx(t)?"BooleanElement":zO(t)?"NumberElement":FO(t)?"NullElement":KN(t)?"LinkElement":VN(t)?"RefElement":void 0,tD=t=>es(t)?Ti(t):qO(t),nD=zs(Am,Wh),Om={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class rD{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:n=hm,returnOnTrue:i,returnOnFalse:l}={}){this.result=[],this.predicate=n,this.returnOnTrue=i,this.returnOnFalse=l}enter(n){return this.predicate(n)?(this.result.push(n),this.returnOnTrue):this.returnOnFalse}}const fi=(t,n,{keyMap:i=Om,...l}={})=>BO(t,n,{keyMap:i,nodeTypeGetter:Am,nodePredicate:nD,nodeCloneFn:tD,...l});fi[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=Om,...l}={})=>BO[Symbol.for("nodejs.util.promisify.custom")](t,n,{keyMap:i,nodeTypeGetter:Am,nodePredicate:nD,nodeCloneFn:tD,...l});const sD={toolboxCreator:ZN,visitorOptions:{nodeTypeGetter:Am,exposeEdits:!0}},km=(t,n,i={})=>{if(n.length===0)return t;const l=aO(sD,i),{toolboxCreator:h,visitorOptions:v}=l,x=h(),w=n.map((N=>N(x))),C=O1(w.map(e1({},"visitor")),{...v});w.forEach(dx(["pre"],[]));const $=fi(t,C,v);return w.forEach(dx(["post"],[])),$};km[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,i={})=>{if(n.length===0)return t;const l=aO(sD,i),{toolboxCreator:h,visitorOptions:v}=l,x=h(),w=n.map((F=>F(x))),C=O1[Symbol.for("nodejs.util.promisify.custom")],$=fi[Symbol.for("nodejs.util.promisify.custom")],N=C(w.map(e1({},"visitor")),{...v});await Promise.allSettled(w.map(dx(["pre"],[])));const _=await $(t,N,v);return await Promise.allSettled(w.map(dx(["post"],[]))),_};var iD={exports:{}};(function(t){var n=(()=>{var i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,C=(W,P,se)=>P in W?i(W,P,{enumerable:!0,configurable:!0,writable:!0,value:se}):W[P]=se,$=(W,P)=>{for(var se in P||(P={}))x.call(P,se)&&C(W,se,P[se]);if(v)for(var se of v(P))w.call(P,se)&&C(W,se,P[se]);return W},N=(W,P,se)=>(C(W,typeof P!="symbol"?P+"":P,se),se),_={};((W,P)=>{for(var se in P)i(W,se,{get:P[se],enumerable:!0})})(_,{DEFAULT_OPTIONS:()=>U,DEFAULT_UUID_LENGTH:()=>F,default:()=>Y});var F=6,U={dictionary:"alphanum",shuffle:!0,debug:!1,length:F,counter:0},J=class{constructor(W={}){N(this,"counter"),N(this,"debug"),N(this,"dict"),N(this,"version"),N(this,"dictIndex",0),N(this,"dictRange",[]),N(this,"lowerBound",0),N(this,"upperBound",0),N(this,"dictLength",0),N(this,"uuidLength"),N(this,"_digit_first_ascii",48),N(this,"_digit_last_ascii",58),N(this,"_alpha_lower_first_ascii",97),N(this,"_alpha_lower_last_ascii",123),N(this,"_hex_last_ascii",103),N(this,"_alpha_upper_first_ascii",65),N(this,"_alpha_upper_last_ascii",91),N(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),N(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),N(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),N(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),N(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),N(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),N(this,"log",((...pe)=>{const Te=[...pe];if(Te[0]=`[short-unique-id] ${pe[0]}`,this.debug===!0&&typeof console<"u"&&console!==null)return console.log(...Te)})),N(this,"_normalizeDictionary",((pe,Te)=>{let Ae;if(pe&&Array.isArray(pe)&&pe.length>1)Ae=pe;else{let qe;Ae=[],this.dictIndex=qe=0;const Se=`_${pe}_dict_ranges`,me=this._dict_ranges[Se];Object.keys(me).forEach((Me=>{const Ie=Me;for(this.dictRange=me[Ie],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=qe=this.lowerBound;this.lowerBound<=this.upperBound?qe<this.upperBound:qe>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?qe+=1:qe-=1)Ae.push(String.fromCharCode(this.dictIndex))}))}return Te&&(Ae=Ae.sort((()=>Math.random()-.5))),Ae})),N(this,"setDictionary",((pe,Te)=>{this.dict=this._normalizeDictionary(pe,Te),this.dictLength=this.dict.length,this.setCounter(0)})),N(this,"seq",(()=>this.sequentialUUID())),N(this,"sequentialUUID",(()=>{let pe,Te,Ae="";pe=this.counter;do Te=pe%this.dictLength,pe=Math.trunc(pe/this.dictLength),Ae+=this.dict[Te];while(pe!==0);return this.counter+=1,Ae})),N(this,"rnd",((pe=this.uuidLength||F)=>this.randomUUID(pe))),N(this,"randomUUID",((pe=this.uuidLength||F)=>{let Te,Ae,qe;if(pe==null||pe<1)throw new Error("Invalid UUID Length Provided");for(Te="",qe=0;qe<pe;qe+=1)Ae=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,Te+=this.dict[Ae];return Te})),N(this,"fmt",((pe,Te)=>this.formattedUUID(pe,Te))),N(this,"formattedUUID",((pe,Te)=>{const Ae={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return pe.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(qe=>{const Se=qe.slice(0,2),me=parseInt(qe.slice(2),10);return Se==="$s"?Ae[Se]().padStart(me,"0"):Se==="$t"&&Te?Ae[Se](me,Te):Ae[Se](me)}))})),N(this,"availableUUIDs",((pe=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,pe).toFixed(0)))),N(this,"approxMaxBeforeCollision",((pe=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*pe).toFixed(20)))),N(this,"collisionProbability",((pe=this.availableUUIDs(this.uuidLength),Te=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(pe)/this.availableUUIDs(Te)).toFixed(20)))),N(this,"uniqueness",((pe=this.availableUUIDs(this.uuidLength))=>{const Te=parseFloat((1-this.approxMaxBeforeCollision(pe)/pe).toFixed(20));return Te>1?1:Te<0?0:Te})),N(this,"getVersion",(()=>this.version)),N(this,"stamp",((pe,Te)=>{const Ae=Math.floor(+(Te||new Date)/1e3).toString(16);if(typeof pe=="number"&&pe===0)return Ae;if(typeof pe!="number"||pe<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
|
||
`));const qe=pe-9,Se=Math.round(Math.random()*(qe>15?15:qe)),me=this.randomUUID(qe);return`${me.substring(0,Se)}${Ae}${me.substring(Se)}${Se.toString(16)}`})),N(this,"parseStamp",((pe,Te)=>{if(Te&&!/t0|t[1-9]\d{1,}/.test(Te))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const Ae=Te?Te.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(Se=>{const me={$r:Qe=>[...Array(Qe)].map((()=>"r")).join(""),$s:Qe=>[...Array(Qe)].map((()=>"s")).join(""),$t:Qe=>[...Array(Qe)].map((()=>"t")).join("")},Me=Se.slice(0,2),Ie=parseInt(Se.slice(2),10);return me[Me](Ie)})).replace(/^(.*?)(t{8,})(.*)$/g,((Se,me,Me)=>pe.substring(me.length,me.length+Me.length))):pe;if(Ae.length===8)return new Date(1e3*parseInt(Ae,16));if(Ae.length<10)throw new Error("Stamp length invalid");const qe=parseInt(Ae.substring(Ae.length-1),16);return new Date(1e3*parseInt(Ae.substring(qe,qe+8),16))})),N(this,"setCounter",(pe=>{this.counter=pe})),N(this,"validate",((pe,Te)=>{const Ae=Te?this._normalizeDictionary(Te):this.dict;return pe.split("").every((qe=>Ae.includes(qe)))}));const P=$($({},U),W);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:se,shuffle:ae,length:he,counter:ge}=P;return this.uuidLength=he,this.setDictionary(se,ae),this.setCounter(ge),this.debug=P.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};N(J,"default",J);var Y=J;return(W=>((P,se,ae,he)=>{if(se&&typeof se=="object"||typeof se=="function")for(let ge of h(se))x.call(P,ge)||ge===void 0||i(P,ge,{get:()=>se[ge],enumerable:!(he=l(se,ge))||he.enumerable});return P})(i({},"__esModule",{value:!0}),W))(_)})();t.exports=n.default,typeof window<"u"&&(n=n.default)})(iD);const LV=za(iD.exports);class zV extends Oa{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class UO{uuid;identityMap;constructor({length:n=6}={}){this.uuid=new LV({length:n}),this.identityMap=new WeakMap}identify(n){if(!es(n))throw new zV("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:n});if(n.meta.hasKey("id")&&xn(n.meta.get("id"))&&!n.meta.get("id").equals(""))return n.id;if(this.identityMap.has(n))return this.identityMap.get(n);const i=new Jc(this.generateId());return this.identityMap.set(n,i),i}forget(n){return!!this.identityMap.has(n)&&(this.identityMap.delete(n),!0)}generateId(){return this.uuid.randomUUID()}}new UO;class FV extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Sd("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Sd("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Sd("latest method in MediaTypes class is not yet implemented.")}}const Wa=t=>(n,i={})=>((l,{Type:h,plugins:v=[]})=>{const x=new h(l);return es(l)&&(l.meta.length>0&&(x.meta=Ct(l.meta)),l.attributes.length>0&&(x.attributes=Ct(l.attributes))),km(x,v,{toolboxCreator:ZN,visitorOptions:{nodeTypeGetter:Am}})})(n,{...i,Type:t});St.refract=Wa(St),ur.refract=Wa(ur),Jc.refract=Wa(Jc),Qc.refract=Wa(Qc),MO.refract=Wa(MO),PO.refract=Wa(PO),IO.refract=Wa(IO),eu.refract=Wa(eu),S1.refract=Wa(S1),E1.refract=Wa(E1),Lo.refract=Wa(Lo),j1.refract=Wa(j1);const aD=(t,n)=>{const i=new rD({predicate:t,returnOnTrue:Gn});return fi(n,i),$$(void 0,[0],i.result)},oD=t=>typeof t?.type=="string"?t.type:Am(t),lD={EphemeralObject:["content"],EphemeralArray:["content"],...Om},cD=(t,n,{keyMap:i=lD,...l}={})=>fi(t,n,{keyMap:i,nodeTypeGetter:oD,nodePredicate:pi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...l});cD[Symbol.for("nodejs.util.promisify.custom")]=async(t,{keyMap:n=lD,...i}={})=>fi[Symbol.for("nodejs.util.promisify.custom")](t,visitor,{keyMap:n,nodeTypeGetter:oD,nodePredicate:pi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...i});class qV{type="EphemeralArray";content=[];reference=void 0;constructor(n){this.content=n,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class BV{type="EphemeralObject";content=[];reference=void 0;constructor(n){this.content=n,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const it=t=>es(t)?xn(t)||zO(t)||xx(t)||FO(t)?t.toValue():cD(t,new class{ObjectElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new BV(n.content);return this.references.set(n,i),i}};EphemeralObject={leave:n=>n.toObject()};MemberElement={enter:n=>[n.key,n.value]};ArrayElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new qV(n.content);return this.references.set(n,i),i}};EphemeralArray={leave:n=>n.toArray()};references=new WeakMap;BooleanElement(n){return n.toValue()}NumberElement(n){return n.toValue()}StringElement(n){return n.toValue()}NullElement(){return null}RefElement(n,...i){var l;const h=i[3];return((l=h[h.length-1])===null||l===void 0?void 0:l.type)==="EphemeralObject"?Symbol.for("delete-node"):String(n.toValue())}LinkElement(n){return xn(n.href)?n.href.toValue():""}}):t,k1=(t,n=new WeakMap)=>(zo(t)?(n.set(t.key,t),k1(t.key,n),n.set(t.value,t),k1(t.value,n)):t.children.forEach((i=>{n.set(i,t),k1(i,n)})),n);class UV{element;edges;constructor({element:n}){this.element=n}transclude(n,i){var l;if(n===this.element)return i;if(n===i)return this.element;this.edges=(l=this.edges)!==null&&l!==void 0?l:k1(this.element);const h=this.edges.get(n);return Ed(h)?void 0:(Un(h)?((v,x,w)=>{const C=w.get(v);Un(C)&&(C.content=C.map((($,N,_)=>_===v?(w.delete(v),w.set(x,C),x):_)))})(n,i,this.edges):Ri(h)?((v,x,w)=>{const C=w.get(v);Ri(C)&&(C.content=C.map(($=>$===v?(w.delete(v),w.set(x,C),x):$)))})(n,i,this.edges):zo(h)&&((v,x,w)=>{const C=w.get(v);zo(C)&&(C.key===v&&(C.key=x,w.delete(v),w.set(x,C)),C.value===v&&(C.value=x,w.delete(v),w.set(x,C)))})(n,i,this.edges),this.element)}}const R1=(t,n)=>{const i=fm(t,n);return eU((l=>{if(Jh(l)&&O$("$ref",l)&&iU(Wh,"$ref",l)){const h=ra(["$ref"],l),v=dO("#/",h);return ra(v.split("/"),i)}return Jh(l)?R1(l,i):l}),t)},uD=(t,n=YN)=>{if(Wh(t))try{return n.fromRefract(JSON.parse(t))}catch{}return Jh(t)&&O$("element",t)?n.fromRefract(t):n.toElement(t)},T1=t=>{const n=t.meta.length>0?Ct(t.meta):void 0,i=t.attributes.length>0?Ct(t.attributes):void 0;return new t.constructor(void 0,n,i)},_1=(t,n)=>n.clone&&n.isMergeableElement(t)?Ul(T1(t),t,n):t,$1={clone:!0,isMergeableElement:t=>Un(t)||Ri(t),arrayElementMerge:(t,n,i)=>t.concat(n)["fantasy-land/map"]((l=>_1(l,i))),objectElementMerge:(t,n,i)=>{const l=Un(t)?T1(t):T1(n);return Un(t)&&t.forEach(((h,v,x)=>{const w=Ti(x);w.value=_1(h,i),l.content.push(w)})),n.forEach(((h,v,x)=>{const w=it(v);let C;if(Un(t)&&t.hasKey(w)&&i.isMergeableElement(h)){const $=t.get(w);C=Ti(x),C.value=((N,_)=>{if(typeof _.customMerge!="function")return Ul;const F=_.customMerge(N,_);return typeof F=="function"?F:Ul})(v,i)($,h)}else C=Ti(x),C.value=_1(h,i);l.remove(w),l.content.push(C)})),l},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function Ul(t,n,i){var l,h,v;const x={...$1,...i};x.isMergeableElement=(l=x.isMergeableElement)!==null&&l!==void 0?l:$1.isMergeableElement,x.arrayElementMerge=(h=x.arrayElementMerge)!==null&&h!==void 0?h:$1.arrayElementMerge,x.objectElementMerge=(v=x.objectElementMerge)!==null&&v!==void 0?v:$1.objectElementMerge;const w=Ri(n);if(w!==Ri(t))return _1(n,x);const C=w&&typeof x.arrayElementMerge=="function"?x.arrayElementMerge(t,n,x):x.objectElementMerge(t,n,x);return C.meta=($=>typeof $.customMetaMerge!="function"?N=>Ct(N):$.customMetaMerge)(x)(t.meta,n.meta),C.attributes=($=>typeof $.customAttributesMerge!="function"?N=>Ct(N):$.customAttributesMerge)(x)(t.attributes,n.attributes),C}Ul.all=(t,n)=>{if(!Array.isArray(t))throw new TypeError("First argument of deepmerge should be an array.");return t.length===0?new St:t.reduce(((i,l)=>Ul(i,l,n)),T1(t[0]))};class KO extends br{}class dD extends KO{}let Ex=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:t,allowEmpty:n=!0,sourceMap:i=!1,fileExtensions:l=[],mediaTypes:h=[]}){this.name=t,this.allowEmpty=n,this.sourceMap=i,this.fileExtensions=l,this.mediaTypes=h}};class VO extends Array{includesCycle(n){return this.filter((i=>i.has(n))).length>1}includes(n,i){return n instanceof Set?super.includes(n,i):this.some((l=>l.has(n)))}findItem(n){for(const i of this)for(const l of i)if(es(l)&&n(l))return l}}let tu=class{uri;depth;value;refSet;errors;constructor({uri:t,depth:n=0,refSet:i,value:l}){this.uri=t,this.value=l,this.depth=n,this.refSet=i,this.errors=[]}};class hD extends br{}class KV extends hD{}class VV extends br{}class HO extends VV{}class HV extends hD{constructor(n){super(`Invalid JSON Schema $anchor "${n}".`)}}class Rm extends KO{}class GV extends wO{}class nu extends bO{}function pD(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=new Array(n);i<n;i++)l[i]=t[i];return l}function fD(t,n){return n!=null&&typeof Symbol<"u"&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n}function XV(t,n){return(function(i){if(Array.isArray(i))return i})(t)||(function(i,l){var h=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(h!=null){var v,x,w=[],C=!0,$=!1;try{for(h=h.call(i);!(C=(v=h.next()).done)&&(w.push(v.value),!l||w.length!==l);C=!0);}catch(N){$=!0,x=N}finally{try{C||h.return==null||h.return()}finally{if($)throw x}}return w}})(t,n)||(function(i,l){if(i){if(typeof i=="string")return pD(i,l);var h=Object.prototype.toString.call(i).slice(8,-1);return h==="Object"&&i.constructor&&(h=i.constructor.name),h==="Map"||h==="Set"?Array.from(h):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?pD(i,l):void 0}})(t,n)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function Tm(t){return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var mD=function(t){throw TypeError(t)},gD=function(t,n,i){return n.has(t)||mD("Cannot "+i)},_i=function(t,n,i){return gD(t,n,"read from private field"),n.get(t)},yD=function(t,n,i){return n.has(t)?mD("Cannot add the same private member more than once"):fD(n,WeakSet)?n.add(t):n.set(t,i)},GO=function(t,n,i,l){return gD(t,n,"write to private field"),n.set(t,i),i},_m=function(t){return Object.prototype.toString.call(t)},vD=function(t){return ArrayBuffer.isView(t)&&!fD(t,DataView)},xD=Array.isArray,YV=Object.getOwnPropertyDescriptor,ZV=Object.prototype.propertyIsEnumerable,WV=Object.getOwnPropertySymbols,N1=Object.prototype.hasOwnProperty;function XO(t){for(var n=Object.keys(t),i=WV(t),l=0;l<i.length;l++)ZV.call(t,i[l])&&n.push(i[l]);return n}function JV(t,n){var i;return!(!((i=YV(t,n))===null||i===void 0)&&i.writable)}function bD(t,n){if((t===void 0?"undefined":Tm(t))==="object"&&t!==null){var i;if(xD(t))i=[];else if(_m(t)==="[object Date]")i=new Date(t.getTime?t.getTime():t);else if((function(N){return _m(N)==="[object RegExp]"})(t))i=new RegExp(t);else if((function(N){return _m(N)==="[object Error]"})(t))i={message:t.message};else if((function(N){return _m(N)==="[object Boolean]"})(t)||(function(N){return _m(N)==="[object Number]"})(t)||(function(N){return _m(N)==="[object String]"})(t))i=Object(t);else{if(vD(t))return t.slice();i=Object.create(Object.getPrototypeOf(t))}var l=n.includeSymbols?XO:Object.keys,h=!0,v=!1,x=void 0;try{for(var w,C=l(t)[Symbol.iterator]();!(h=(w=C.next()).done);h=!0){var $=w.value;i[$]=t[$]}}catch(N){v=!0,x=N}finally{try{h||C.return==null||C.return()}finally{if(v)throw x}}return i}return t}var ia,Ad,wD={includeSymbols:!1,immutable:!1};function SD(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wD,l=[],h=[],v=!0,x=i.includeSymbols?XO:Object.keys,w=!!i.immutable;return(function C($){var N=w?bD($,i):$,_={},F=!0,U={node:N,node_:$,path:[].concat(l),parent:h[h.length-1],parents:h,key:l[l.length-1],isRoot:l.length===0,level:l.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(me){var Me=arguments.length>1&&arguments[1]!==void 0&&arguments[1];U.isRoot||(U.parent.node[U.key]=me),U.node=me,Me&&(F=!1)},delete:function(me){delete U.parent.node[U.key],me&&(F=!1)},remove:function(me){xD(U.parent.node)?U.parent.node.splice(U.key,1):delete U.parent.node[U.key],me&&(F=!1)},keys:null,before:function(me){_.before=me},after:function(me){_.after=me},pre:function(me){_.pre=me},post:function(me){_.post=me},stop:function(){v=!1},block:function(){F=!1}};if(!v)return U;function J(){if(Tm(U.node)==="object"&&U.node!==null){U.keys&&U.node_===U.node||(U.keys=x(U.node)),U.isLeaf=U.keys.length===0;for(var me=0;me<h.length;me++)if(h[me].node_===$){U.circular=h[me];break}}else U.isLeaf=!0,U.keys=null;U.notLeaf=!U.isLeaf,U.notRoot=!U.isRoot}J();var Y=n.call(U,U.node);if(Y!==void 0&&U.update&&U.update(Y),_.before&&_.before.call(U,U.node),!F)return U;if(Tm(U.node)==="object"&&U.node!==null&&!U.circular){var W;h.push(U),J();var P=!0,se=!1,ae=void 0;try{for(var he,ge=Object.entries((W=U.keys)!==null&&W!==void 0?W:[])[Symbol.iterator]();!(P=(he=ge.next()).done);P=!0){var pe,Te=XV(he.value,2),Ae=Te[0],qe=Te[1];l.push(qe),_.pre&&_.pre.call(U,U.node[qe],qe);var Se=C(U.node[qe]);w&&N1.call(U.node,qe)&&!JV(U.node,qe)&&(U.node[qe]=Se.node),Se.isLast=!!(!((pe=U.keys)===null||pe===void 0)&&pe.length)&&+Ae==U.keys.length-1,Se.isFirst=+Ae==0,_.post&&_.post.call(U,Se),l.pop()}}catch(me){se=!0,ae=me}finally{try{P||ge.return==null||ge.return()}finally{if(se)throw ae}}h.pop()}return _.after&&_.after.call(U,U.node),U})(t).node}var Kl=(function(){function t(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wD;(function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),yD(this,ia),yD(this,Ad),GO(this,ia,n),GO(this,Ad,i)}return(function(n,i){i&&(function(l,h){for(var v=0;v<h.length;v++){var x=h[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}})(n.prototype,i)})(t,[{key:"get",value:function(n){for(var i=_i(this,ia),l=0;i&&l<n.length;l++){var h=n[l];if(!N1.call(i,h)||!_i(this,Ad).includeSymbols&&(h===void 0?"undefined":Tm(h))==="symbol")return;i=i[h]}return i}},{key:"has",value:function(n){for(var i=_i(this,ia),l=0;i&&l<n.length;l++){var h=n[l];if(!N1.call(i,h)||!_i(this,Ad).includeSymbols&&(h===void 0?"undefined":Tm(h))==="symbol")return!1;i=i[h]}return!0}},{key:"set",value:function(n,i){var l=_i(this,ia),h=0;for(h=0;h<n.length-1;h++){var v=n[h];N1.call(l,v)||(l[v]={}),l=l[v]}return l[n[h]]=i,i}},{key:"map",value:function(n){return SD(_i(this,ia),n,{immutable:!0,includeSymbols:!!_i(this,Ad).includeSymbols})}},{key:"forEach",value:function(n){return GO(this,ia,SD(_i(this,ia),n,_i(this,Ad))),_i(this,ia)}},{key:"reduce",value:function(n,i){var l=arguments.length===1,h=l?_i(this,ia):i;return this.forEach((function(v){this.isRoot&&l||(h=n.call(this,h,v))})),h}},{key:"paths",value:function(){var n=[];return this.forEach((function(){n.push(this.path)})),n}},{key:"nodes",value:function(){var n=[];return this.forEach((function(){n.push(this.node)})),n}},{key:"clone",value:function(){var n=[],i=[],l=_i(this,Ad);return vD(_i(this,ia))?_i(this,ia).slice():(function h(v){for(var x=0;x<n.length;x++)if(n[x]===v)return i[x];if((v===void 0?"undefined":Tm(v))==="object"&&v!==null){var w=bD(v,l);n.push(v),i.push(w);var C=l.includeSymbols?XO:Object.keys,$=!0,N=!1,_=void 0;try{for(var F,U=C(v)[Symbol.iterator]();!($=(F=U.next()).done);$=!0){var J=F.value;w[J]=h(v[J])}}catch(Y){N=!0,_=Y}finally{try{$||U.return==null||U.return()}finally{if(N)throw _}}return n.pop(),i.pop(),w}return v})(_i(this,ia))}}]),t})();ia=new WeakMap,Ad=new WeakMap;var Vl=function(t,n){return new Kl(t,n)};Vl.get=function(t,n,i){return new Kl(t,i).get(n)},Vl.set=function(t,n,i,l){return new Kl(t,l).set(n,i)},Vl.has=function(t,n,i){return new Kl(t,i).has(n)},Vl.map=function(t,n,i){return new Kl(t,i).map(n)},Vl.forEach=function(t,n,i){return new Kl(t,i).forEach(n)},Vl.reduce=function(t,n,i,l){return new Kl(t,l).reduce(n,i)},Vl.paths=function(t,n){return new Kl(t,n).paths()},Vl.nodes=function(t,n){return new Kl(t,n).nodes()},Vl.clone=function(t,n){return new Kl(t,n).clone()};var QV=Vl;const e7=["properties"],t7=["properties"],n7=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],r7=["schema/example","items/example"];function ED(t){const n=t[t.length-1],i=t[t.length-2],l=t.join("/");return e7.indexOf(n)>-1&&t7.indexOf(i)===-1||n7.indexOf(l)>-1||r7.some((h=>l.indexOf(h)>-1))}function YO(t,n){const[i,l]=t.split("#"),h=n??"",v=i??"";let x;if(a1(h))x=$s(h,v);else{const w=$s("https://swagger.io",h),C=$s(w,v).replace("https://swagger.io","");x=v.startsWith("/")?C:C.substring(1)}return l?`${x}#${l}`:x}const s7=/^([a-z]+:\/\/|\/\/)/i;class $m extends Oa{}const ru={},jD=new WeakMap,i7=[t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"],a7={key:"$ref",plugin:(t,n,i,l)=>{const h=l.getInstance(),v=i.slice(0,-1);if(ED(v)||(Y=>i7.some((W=>W(Y))))(v))return;const{baseDoc:x}=l.getContext(i);if(typeof t!="string")return new $m("$ref: must be a string (JSON-Ref)",{$ref:t,baseDoc:x,fullPath:i});const w=AD(t),C=w[0],$=w[1]||"";let N,_,F;try{N=x||C?CD(C,x):null}catch(Y){return WO(Y,{pointer:$,$ref:t,basePath:N,fullPath:i})}if((function(Y,W,P,se){let ae=jD.get(se);ae||(ae={},jD.set(se,ae));const he=(function(qe){return qe.length===0?"":`/${qe.map(TD).join("/")}`})(P),ge=`${W||"<specmap-base>"}#${Y}`,pe=he.replace(/allOf\/\d+\/?/g,"");if(W===se.contextTree.get([]).baseDoc&&ek(pe,Y))return!0;let Te="";if(P.some((qe=>(Te=`${Te}/${TD(qe)}`,ae[Te]&&ae[Te].some((Se=>ek(Se,ge)||ek(ge,Se)))))))return!0;ae[pe]=(ae[pe]||[]).concat(ge)})($,N,v,l)&&!h.useCircularStructures){const Y=YO(t,N);return t===Y?null:qn.replace(i,Y)}if(N==null?(F=QO($),_=l.get(F),_===void 0&&(_=new $m(`Could not resolve reference: ${t}`,{pointer:$,$ref:t,baseDoc:x,fullPath:i}))):(_=OD(N,$),_=_.l!=null?_.l:_.catch((Y=>{throw WO(Y,{pointer:$,$ref:t,baseDoc:x,fullPath:i})}))),_ instanceof Error)return[qn.remove(i),_];const U=YO(t,N),J=qn.replace(v,_,{$$ref:U});if(N&&N!==x)return[J,qn.context(v,{baseDoc:N})];try{if(!(function(Y,W){const P=[Y];return W.path.reduce(((se,ae)=>(P.push(se[ae]),se[ae])),Y),(function se(ae){return qn.isObject(ae)&&(P.indexOf(ae)>=0||Object.keys(ae).some((he=>se(ae[he]))))})(W.value)})(l.state,J)||h.useCircularStructures)return J}catch{return null}}},ZO=Object.assign(a7,{docCache:ru,absoluteify:CD,clearCache:function(t){t!==void 0?delete ru[t]:Object.keys(ru).forEach((n=>{delete ru[n]}))},JSONRefError:$m,wrapError:WO,getDoc:kD,split:AD,extractFromDoc:OD,fetchJSON:function(t){return fetch(t,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((n=>n.text())).then((n=>qu.load(n)))},extract:JO,jsonPointerToArray:QO,unescapeJsonPointerToken:RD});function CD(t,n){if(!s7.test(t)){if(!n)throw new $m(`Tried to resolve a relative URL, without having a basePath. path: '${t}' basePath: '${n}'`);return $s(n,t)}return t}function WO(t,n){let i;return i=t&&t.response&&t.response.body?`${t.response.body.code} ${t.response.body.message}`:t.message,new $m(`Could not resolve reference: ${i}`,{...n,cause:t})}function AD(t){return(t+"").split("#")}function OD(t,n){const i=ru[t];if(i&&!qn.isPromise(i))try{const l=JO(n,i);return Object.assign(Promise.resolve(l),{l})}catch(l){return Promise.reject(l)}return kD(t).then((l=>JO(n,l)))}function kD(t){const n=ru[t];return n?qn.isPromise(n)?n:Promise.resolve(n):(ru[t]=ZO.fetchJSON(t).then((i=>(ru[t]=i,i))),ru[t])}function JO(t,n){const i=QO(t);if(i.length<1)return n;const l=qn.getIn(n,i);if(l===void 0)throw new $m(`Could not resolve pointer: ${t} does not exist in document`,{pointer:t});return l}function QO(t){if(typeof t!="string")throw new TypeError("Expected a string, got a "+typeof t);return t[0]==="/"&&(t=t.substr(1)),t===""?[]:t.split("/").map(RD)}function RD(t){return typeof t!="string"?t:new URLSearchParams(`=${t.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function TD(t){return new URLSearchParams([["",t.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function ek(t,n){if(!(i=n)||i==="/"||i==="#")return!0;var i;const l=t.charAt(n.length),h=n.slice(-1);return t.indexOf(n)===0&&(!l||l==="/"||l==="#")&&h!=="#"}const o7={key:"allOf",plugin:(t,n,i,l,h)=>{if(h.meta&&h.meta.$$ref)return;const v=i.slice(0,-1);if(ED(v))return;if(!Array.isArray(t)){const $=new TypeError("allOf must be an array");return $.fullPath=i,$}let x=!1,w=h.value;if(v.forEach(($=>{w&&(w=w[$])})),w={...w},Object.keys(w).length===0)return;delete w.allOf;const C=[];return C.push(l.replace(v,{})),t.forEach((($,N)=>{if(!l.isObject($)){if(x)return null;x=!0;const F=new TypeError("Elements in allOf must be objects");return F.fullPath=i,C.push(F)}C.push(l.mergeDeep(v,$));const _=(function(F,U,{specmap:J,getBaseUrlForNodePath:Y=P=>J.getContext([...U,...P]).baseDoc,targetKeys:W=["$ref","$$ref"]}={}){const P=[];return QV(F).forEach((function(){if(W.includes(this.key)&&typeof this.node=="string"){const se=this.path,ae=U.concat(this.path),he=YO(this.node,Y(se));P.push(J.replace(ae,he))}})),P})($,i.slice(0,-1),{getBaseUrlForNodePath:F=>l.getContext([...i,N,...F]).baseDoc,specmap:l});C.push(..._)})),w.example&&C.push(l.remove([].concat(v,"example"))),C.push(l.mergeDeep(v,w)),w.$$ref||C.push(l.remove([].concat(v,"$$ref"))),C}},l7={key:"parameters",plugin:(t,n,i,l)=>{if(Array.isArray(t)&&t.length){const h=Object.assign([],t),v=i.slice(0,-1),x={...qn.getIn(l.spec,v)};for(let w=0;w<t.length;w+=1){const C=t[w];try{h[w].default=l.parameterMacro(x,C)}catch($){const N=new Error($);return N.fullPath=i,N}}return qn.replace(i,h)}return qn.replace(i,t)}},c7={key:"properties",plugin:(t,n,i,l)=>{const h={...t};for(const v in t)try{h[v].default=l.modelPropertyMacro(h[v])}catch(x){const w=new Error(x);return w.fullPath=i,w}return qn.replace(i,h)}};class u7{constructor(n){this.root=tk(n||{})}set(n,i){const l=this.getParent(n,!0);if(!l)return void D1(this.root,i,null);const h=n[n.length-1],{children:v}=l;v[h]?D1(v[h],i,l):v[h]=tk(i,l)}get(n){if((n=n||[]).length<1)return this.root.value;let i,l,h=this.root;for(let v=0;v<n.length&&(l=n[v],i=h.children,i[l]);v+=1)h=i[l];return h&&h.protoValue}getParent(n,i){return!n||n.length<1?null:n.length<2?this.root:n.slice(0,-1).reduce(((l,h)=>{if(!l)return l;const{children:v}=l;return!v[h]&&i&&(v[h]=tk(null,l)),v[h]}),this.root)}}function tk(t,n){return D1({children:{}},t,n)}function D1(t,n,i){return t.value=n||{},t.protoValue=i?{...i.protoValue,...t.value}:t.value,Object.keys(t.children).forEach((l=>{const h=t.children[l];t.children[l]=D1(h,h.value,t)})),t}const _D=()=>{};class d7{static getPluginName(n){return n.pluginName}static getPatchesOfType(n,i){return n.filter(i)}constructor(n){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new u7,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),qn,{getInstance:()=>this}),allowMetaPatches:!1},n),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(qn.isFunction),this.patches.push(qn.add([],this.spec)),this.patches.push(qn.context([],this.context)),this.updatePatches(this.patches)}debug(n,...i){this.debugLevel===n&&console.log(...i)}verbose(n,...i){this.debugLevel==="verbose"&&console.log(`[${n}] `,...i)}wrapPlugin(n,i){const{pathDiscriminator:l}=this;let h,v=null;return n[this.pluginProp]?(v=n,h=n[this.pluginProp]):qn.isFunction(n)?h=n:qn.isObject(n)&&(h=(function(x){const w=(C,$)=>!Array.isArray(C)||C.every(((N,_)=>N===$[_]));return function*(C,$){const N={};for(const[F,U]of C.filter(qn.isAdditiveMutation).entries()){if(!(F<3e3))return;yield*_(U.value,U.path,U)}function*_(F,U,J){if(qn.isObject(F)){const Y=U.length-1,W=U[Y],P=U.indexOf("properties"),se=W==="properties"&&Y===P,ae=$.allowMetaPatches&&N[F.$$ref];for(const he of Object.keys(F)){const ge=F[he],pe=U.concat(he),Te=qn.isObject(ge),Ae=F.$$ref;if(ae||Te&&($.allowMetaPatches&&Ae&&(N[Ae]=!0),yield*_(ge,pe,J)),!se&&he===x.key){const qe=w(l,U);l&&!qe||(yield x.plugin(ge,he,pe,$,J))}}}else x.key===U[U.length-1]&&(yield x.plugin(F,x.key,U,$))}}})(n)),Object.assign(h.bind(v),{pluginName:n.name||i,isGenerator:qn.isGenerator(h)})}nextPlugin(){return this.wrappedPlugins.find((n=>this.getMutationsForPlugin(n).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((n=>n.value)))}getPluginHistory(n){const i=this.constructor.getPluginName(n);return this.pluginHistory[i]||[]}getPluginRunCount(n){return this.getPluginHistory(n).length}getPluginHistoryTip(n){const i=this.getPluginHistory(n);return i&&i[i.length-1]||{}}getPluginMutationIndex(n){const i=this.getPluginHistoryTip(n).mutationIndex;return typeof i!="number"?-1:i}updatePluginHistory(n,i){const l=this.constructor.getPluginName(n);this.pluginHistory[l]=this.pluginHistory[l]||[],this.pluginHistory[l].push(i)}updatePatches(n){qn.normalizeArray(n).forEach((i=>{if(i instanceof Error)this.errors.push(i);else try{if(!qn.isObject(i))return void this.debug("updatePatches","Got a non-object patch",i);if(this.showDebug&&this.allPatches.push(i),qn.isPromise(i.value))return this.promisedPatches.push(i),void this.promisedPatchThen(i);if(qn.isContextPatch(i))return void this.setContext(i.path,i.value);qn.isMutation(i)&&this.updateMutations(i)}catch(l){console.error(l),this.errors.push(l)}}))}updateMutations(n){typeof n.value=="object"&&!Array.isArray(n.value)&&this.allowMetaPatches&&(n.value={...n.value});const i=qn.applyPatch(this.state,n,{allowMetaPatches:this.allowMetaPatches});i&&(this.mutations.push(n),this.state=i)}removePromisedPatch(n){const i=this.promisedPatches.indexOf(n);i<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(i,1)}promisedPatchThen(n){return n.value=n.value.then((i=>{const l={...n,value:i};this.removePromisedPatch(n),this.updatePatches(l)})).catch((i=>{this.removePromisedPatch(n),this.updatePatches(i)})),n.value}getMutations(n,i){return n=n||0,typeof i!="number"&&(i=this.mutations.length),this.mutations.slice(n,i)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(n){const i=this.getPluginMutationIndex(n);return this.getMutations(i+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(n){return qn.getIn(this.state,n)}_getContext(n){return this.contextTree.get(n)}setContext(n,i){return this.contextTree.set(n,i)}_hasRun(n){return this.getPluginRunCount(this.getCurrentPlugin())>(n||0)}dispatch(){const n=this,i=this.nextPlugin();if(!i){const h=this.nextPromisedPatch();if(h)return h.then((()=>this.dispatch())).catch((()=>this.dispatch()));const v={spec:this.state,errors:this.errors};return this.showDebug&&(v.patches=this.allPatches),Promise.resolve(v)}if(n.pluginCount=n.pluginCount||new WeakMap,n.pluginCount.set(i,(n.pluginCount.get(i)||0)+1),n.pluginCount[i]>100)return Promise.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(i!==this.currentPlugin&&this.promisedPatches.length){const h=this.promisedPatches.map((v=>v.value));return Promise.all(h.map((v=>v.then(_D,_D)))).then((()=>this.dispatch()))}return(function(){n.currentPlugin=i;const h=n.getCurrentMutations(),v=n.mutations.length-1;try{if(i.isGenerator)for(const x of i(h,n.getLib()))l(x);else l(i(h,n.getLib()))}catch(x){console.error(x),l([Object.assign(Object.create(x),{plugin:i})])}finally{n.updatePluginHistory(i,{mutationIndex:v})}return n.dispatch()})();function l(h){h&&(h=qn.fullyNormalizeArray(h),n.updatePatches(h,i))}}}const sp={refs:ZO,allOf:o7,parameters:l7,properties:c7};async function nk(t){const{spec:n,mode:i,allowMetaPatches:l=!0,pathDiscriminator:h,modelPropertyMacro:v,parameterMacro:x,requestInterceptor:w,responseInterceptor:C,skipNormalization:$=!1,useCircularStructures:N,strategies:_}=t,F=Bu(t),U=gl(t),J=_.find((Y=>Y.match(n)));return(async function(Y){F&&(sp.refs.docCache[F]=Y),sp.refs.fetchJSON=uy(U,{requestInterceptor:w,responseInterceptor:C});const W=[sp.refs];typeof x=="function"&&W.push(sp.parameters),typeof v=="function"&&W.push(sp.properties),i!=="strict"&&W.push(sp.allOf);const P=await(se={spec:Y,context:{baseDoc:F},plugins:W,allowMetaPatches:l,pathDiscriminator:h,parameterMacro:x,modelPropertyMacro:v,useCircularStructures:N},new d7(se).dispatch());var se;return $||(P.spec=J.normalize(P.spec)),P})(n)}const $D=t=>t.replace(/\W/gi,"_");function jx(t,n,i="",{v2OperationIdCompatibilityMode:l}={}){return t&&typeof t=="object"?(t.operationId||"").replace(/\s/g,"").length?$D(t.operationId):(function(h,v,{v2OperationIdCompatibilityMode:x}={}){if(x){let w=`${v.toLowerCase()}_${h}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return w=w||`${h.substring(1)}_${v}`,w.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${v.toLowerCase()}${$D(h)}`})(n,i,{v2OperationIdCompatibilityMode:l}):null}function rk(t){const{spec:n}=t,{paths:i}=n,l={};if(!i||n.$$normalized)return t;for(const h in i){const v=i[h];if(v==null||!["object","function"].includes(typeof v))continue;const x=v.parameters;for(const w in v){const C=v[w];if(C==null||!["object","function"].includes(typeof C))continue;const $=jx(C,h,w);if($){l[$]?l[$].push(C):l[$]=[C];const N=l[$];if(N.length>1)N.forEach(((_,F)=>{_.h=_.h||_.operationId,_.operationId=`${$}${F+1}`}));else if(C.operationId!==void 0){const _=N[0];_.h=_.h||C.operationId,_.operationId=$}}if(w!=="parameters"){const N=[],_={};for(const F in n)F!=="produces"&&F!=="consumes"&&F!=="security"||(_[F]=n[F],N.push(_));if(x&&(_.parameters=x,N.push(_)),N.length)for(const F of N)for(const U in F)if(C[U]){if(U==="parameters")for(const J of F[U])C[U].some((Y=>Y.name&&Y.name===J.name||Y.$ref&&Y.$ref===J.$ref||Y.$$ref&&Y.$$ref===J.$$ref||Y===J))||C[U].push(J)}else C[U]=F[U]}}}return n.$$normalized=!0,t}const ND={name:"generic",match:()=>!0,normalize(t){const{spec:n}=rk({spec:t});return n},resolve:async t=>nk(t)},DD=t=>{try{const{swagger:n}=t;return n==="2.0"}catch{return!1}},PD=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(n)}catch{return!1}},sk=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(n)}catch{return!1}},ik=t=>PD(t)||sk(t),MD={name:"openapi-2",match:t=>DD(t),normalize(t){const{spec:n}=rk({spec:t});return n},resolve:async t=>(async function(n){return nk(n)})(t)},ID={name:"openapi-3-0",match:t=>PD(t),normalize(t){const{spec:n}=rk({spec:t});return n},resolve:async t=>(async function(n){return nk(n)})(t)},LD=t=>async n=>(async i=>{const{spec:l,requestInterceptor:h,responseInterceptor:v}=i,x=Bu(i),w=gl(i),C=l||await uy(w,{requestInterceptor:h,responseInterceptor:v})(x),$={...i,spec:C};return i.strategies.find((N=>N.match(C))).resolve($)})({...t,...n}),h7=LD({strategies:[ID,MD,ND]});class ak extends Oa{}class ok extends ak{pointer;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer)}}class p7 extends ak{tokens;constructor(n,i){super(n,i),i!==void 0&&(this.tokens=[...i.tokens])}}class Cx extends ak{pointer;tokens;failedToken;failedTokenPosition;element;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer,Array.isArray(i.tokens)&&(this.tokens=[...i.tokens]),this.failedToken=i.failedToken,this.failedTokenPosition=i.failedTokenPosition,this.element=i.element)}}const f7=zs(mm(/~/g,"~0"),mm(/\//g,"~1"),encodeURIComponent),m7=zs(mm(/~1/g,"/"),mm(/~0/g,"~"),(t=>{try{return decodeURIComponent(t)}catch{return t}})),Ja=t=>{const n=(i=>{const l=i.indexOf("#");return l!==-1?i.substring(l):"#"})(t);return dO("#",n)},zD=t=>{try{return t.length===0?"":`/${t.map(f7).join("/")}`}catch(n){throw new p7("JSON Pointer compilation of tokens encountered an error.",{tokens:t,cause:n})}},Fo=(t,n)=>{let i;try{i=(l=>{if(F$(l))return[];if(!P$("/",l))throw new ok(`Invalid JSON Pointer "${l}". JSON Pointers must begin with "/"`,{pointer:l});try{const h=zs(oO("/"),ax(m7))(l);return C$(h)}catch(h){throw new ok(`JSON Pointer parsing of "${l}" encountered an error.`,{pointer:l,cause:h})}})(t)}catch(l){throw new Cx(`JSON Pointer evaluation failed while parsing the pointer "${t}".`,{pointer:t,element:Ct(n),cause:l})}return i.reduce(((l,h,v)=>{if(Un(l)){if(!l.hasKey(h))throw new Cx(`JSON Pointer evaluation failed while evaluating token "${h}" against an ObjectElement`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)});return l.get(h)}if(Ri(l)){if(!(h in l.content)||!kU(Number(h)))throw new Cx(`JSON Pointer evaluation failed while evaluating token "${h}" against an ArrayElement`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)});return l.get(Number(h))}throw new Cx(`JSON Pointer evaluation failed while evaluating token "${h}" against an unexpected Element`,{pointer:t,tokens:i,failedToken:h,failedTokenPosition:v,element:Ct(l)})}),n)};class lk extends FV{filterByFormat(n="generic"){const i=n==="generic"?"openapi;version":n;return this.filter((l=>l.includes(i)))}findBy(n="3.1.0",i="generic"){const l=i==="generic"?`vnd.oai.openapi;version=${n}`:`vnd.oai.openapi+${i};version=${n}`;return this.find((h=>h.includes(l)))||this.unknownMediaType}latest(n="generic"){return JS(this.filterByFormat(n))}}const Nm=new lk("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let Ax=class extends St{constructor(t,n,i){super(t,n,i),this.element="callback"}},Ox=class extends St{constructor(t,n,i){super(t,n,i),this.element="components"}get schemas(){return this.get("schemas")}set schemas(t){this.set("schemas",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get requestBodies(){return this.get("requestBodies")}set requestBodies(t){this.set("requestBodies",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(t){this.set("securitySchemes",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}},kx=class extends St{constructor(t,n,i){super(t,n,i),this.element="contact"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}get email(){return this.get("email")}set email(t){this.set("email",t)}},P1=class extends St{constructor(t,n,i){super(t,n,i),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(t){this.set("propertyName",t)}get mapping(){return this.get("mapping")}set mapping(t){this.set("mapping",t)}},M1=class extends St{constructor(t,n,i){super(t,n,i),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(t){this.set("contentType",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(t){this.set("allowedReserved",t)}},Rx=class extends St{constructor(t,n,i){super(t,n,i),this.element="example"}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get value(){return this.get("value")}set value(t){this.set("value",t)}get externalValue(){return this.get("externalValue")}set externalValue(t){this.set("externalValue",t)}},Tx=class extends St{constructor(t,n,i){super(t,n,i),this.element="externalDocumentation"}get description(){return this.get("description")}set description(t){this.set("description",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},Dm=class extends St{constructor(t,n,i){super(t,n,i),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(Dm.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let _x=class extends St{constructor(t,n,i){super(t,n,i),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get termsOfService(){return this.get("termsOfService")}set termsOfService(t){this.set("termsOfService",t)}get contact(){return this.get("contact")}set contact(t){this.set("contact",t)}get license(){return this.get("license")}set license(t){this.set("license",t)}get version(){return this.get("version")}set version(t){this.set("version",t)}},$x=class extends St{constructor(t,n,i){super(t,n,i),this.element="license"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},Nx=class extends St{constructor(t,n,i){super(t,n,i),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(t){this.set("operationRef",t)}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get operation(){var t,n;return xn(this.operationRef)?(t=this.operationRef)===null||t===void 0?void 0:t.meta.get("operation"):xn(this.operationId)?(n=this.operationId)===null||n===void 0?void 0:n.meta.get("operation"):void 0}set operation(t){this.set("operation",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get server(){return this.get("server")}set server(t){this.set("server",t)}},Dx=class extends St{constructor(t,n,i){super(t,n,i),this.element="mediaType"}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get encoding(){return this.get("encoding")}set encoding(t){this.set("encoding",t)}},I1=class extends St{constructor(t,n,i){super(t,n,i),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(t){this.set("authorizationUrl",t)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(t){this.set("tokenUrl",t)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(t){this.set("refreshUrl",t)}get scopes(){return this.get("scopes")}set scopes(t){this.set("scopes",t)}},L1=class extends St{constructor(t,n,i){super(t,n,i),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(t){this.set("implicit",t)}get password(){return this.get("password")}set password(t){this.set("password",t)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(t){this.set("clientCredentials",t)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(t){this.set("authorizationCode",t)}},Px=class extends Jc{constructor(t,n,i){super(t,n,i),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class z1 extends St{constructor(n,i,l){super(n,i,l),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}}let Mx=class extends St{constructor(t,n,i){super(t,n,i),this.element="operation"}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}set externalDocs(t){this.set("externalDocs",t)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get servers(){return this.get("severs")}set servers(t){this.set("servers",t)}},Pm=class extends St{constructor(t,n,i){super(t,n,i),this.element="parameter"}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Qc(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(Pm.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Ix=class extends St{constructor(t,n,i){super(t,n,i),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}},Lx=class extends St{constructor(t,n,i){super(t,n,i),this.element="paths"}},zx=class extends St{constructor(t,n,i){super(t,n,i),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}},Fx=class extends St{constructor(t,n,i){super(t,n,i),this.element="requestBody"}get description(){return this.get("description")}set description(t){this.set("description",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get required(){return this.hasKey("required")?this.get("required"):new Qc(!1)}set required(t){this.set("required",t)}},qx=class extends St{constructor(t,n,i){super(t,n,i),this.element="response"}get description(){return this.get("description")}set description(t){this.set("description",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}},Bx=class extends St{constructor(t,n,i){super(t,n,i),this.element="responses"}get default(){return this.get("default")}set default(t){this.set("default",t)}};class Ux extends St{constructor(n,i,l){super(n,i,l),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(n){this.set("id",n)}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get additionalItems(){return this.get("additionalItems")}set additionalItems(n){this.set("additionalItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get dependencies(){return this.get("dependencies")}set dependencies(n){this.set("dependencies",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get definitions(){return this.get("definitions")}set definitions(n){this.set("definitions",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get base(){return this.get("base")}set base(n){this.set("base",n)}get links(){return this.get("links")}set links(n){this.set("links",n)}get media(){return this.get("media")}set media(n){this.set("media",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}}class F1 extends St{constructor(n,i,l){super(n,i,l),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}}class q1 extends St{constructor(n,i,l){super(n,i,l),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(n){this.set("binaryEncoding",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}}class B1 extends St{constructor(n,i,l){super(n,i,l),this.element="linkDescription"}get href(){return this.get("href")}set href(n){this.set("href",n)}get rel(){return this.get("rel")}set rel(n){this.set("rel",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get targetSchema(){return this.get("targetSchema")}set targetSchema(n){this.set("targetSchema",n)}get mediaType(){return this.get("mediaType")}set mediaType(n){this.set("mediaType",n)}get method(){return this.get("method")}set method(n){this.set("method",n)}get encType(){return this.get("encType")}set encType(n){this.set("encType",n)}get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}const g7={namespace:t=>{const{base:n}=t;return n.register("jSONSchemaDraft4",Ux),n.register("jSONReference",F1),n.register("media",q1),n.register("linkDescription",B1),n}},y7=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},v7={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Om};let FD=class{element;constructor(t){Object.assign(this,t)}copyMetaAndAttributes(t,n){(t.meta.length>0||n.meta.length>0)&&(n.meta=Ul(n.meta,t.meta),bx(t)&&n.meta.set("sourceMap",t.meta.get("sourceMap"))),(t.attributes.length>0||t.meta.length>0)&&(n.attributes=Ul(n.attributes,t.attributes))}},cs=class extends FD{enter(t){return this.element=Ct(t),Gn}};const qD=(t,n,i=[])=>{const l=Object.getOwnPropertyDescriptors(n);for(let h of i)delete l[h];Object.defineProperties(t,l)},Kx=(t,n=[t])=>{const i=Object.getPrototypeOf(t);return i===null?n:Kx(i,[...n,i])},BD=(t,n,i=[])=>{var l;const h=(l=((...w)=>{if(w.length===0)return;let C;const $=w.map((N=>Kx(N)));for(;$.every((N=>N.length>0));){const N=$.map((F=>F.pop())),_=N[0];if(!N.every((F=>F===_)))break;C=_}return C})(...t))!==null&&l!==void 0?l:Object.prototype,v=Object.create(h),x=Kx(h);for(let w of t){let C=Kx(w);for(let $=C.length-1;$>=0;$--){let N=C[$];x.indexOf(N)===-1&&(qD(v,N,["constructor",...i]),x.push(N))}}return v.constructor=n,v},ck=t=>t.filter(((n,i)=>t.indexOf(n)==i)),UD=new WeakMap,x7=t=>UD.get(t),KD=(t,n)=>{var i,l;const h=ck([...Object.getOwnPropertyNames(t),...Object.getOwnPropertyNames(n)]),v={};for(let x of h)v[x]=ck([...(i=t?.[x])!==null&&i!==void 0?i:[],...(l=n?.[x])!==null&&l!==void 0?l:[]]);return v},VD=(t,n)=>{var i,l,h,v;return{property:KD((i=t?.property)!==null&&i!==void 0?i:{},(l=n?.property)!==null&&l!==void 0?l:{}),method:KD((h=t?.method)!==null&&h!==void 0?h:{},(v=n?.method)!==null&&v!==void 0?v:{})}},b7=new Map;function bt(...t){var n,i,l;const h=t.map(($=>$.prototype));function v(...$){for(const N of t)qD(this,new N(...$))}v.prototype=BD(h,v),Object.setPrototypeOf(v,BD(t,null,["prototype"]));let x=v;{const $=((...N)=>{const _=((...F)=>{var U;const J=new Set,Y=new Set([...F]);for(;Y.size>0;)for(let W of Y){const P=[...Kx(W.prototype).map((se=>se.constructor)),...(U=x7(W))!==null&&U!==void 0?U:[]].filter((se=>!J.has(se)));for(let se of P)Y.add(se);J.add(W),Y.delete(W)}return[...J]})(...N).map((F=>b7.get(F))).filter((F=>!!F));return _.length==0?{}:_.length==1?_[0]:_.reduce(((F,U)=>((J,Y)=>{var W,P,se,ae,he,ge;return{class:ck([...(W=J?.class)!==null&&W!==void 0?W:[],...(P=Y?.class)!==null&&P!==void 0?P:[]]),static:VD((se=J?.static)!==null&&se!==void 0?se:{},(ae=Y?.static)!==null&&ae!==void 0?ae:{}),instance:VD((he=J?.instance)!==null&&he!==void 0?he:{},(ge=Y?.instance)!==null&&ge!==void 0?ge:{})}})(F,U)))})(...t);for(let N of(n=$?.class)!==null&&n!==void 0?n:[]){const _=N(x);_&&(x=_)}HD((i=$?.static)!==null&&i!==void 0?i:{},x),HD((l=$?.instance)!==null&&l!==void 0?l:{},x.prototype)}var w,C;return w=x,C=t,UD.set(w,C),x}const HD=(t,n)=>{const i=t.property,l=t.method;if(i)for(let h in i)for(let v of i[h])v(n,h);if(l)for(let h in l)for(let v of l[h])v(n,h,Object.getOwnPropertyDescriptor(n,h))};let Od=class extends FD{specObj;passingOptionsNames=["specObj"];constructor({specObj:t,...n}){super({...n}),this.specObj=t}retrievePassingOptions(){return N$(this.passingOptionsNames,this)}retrieveFixedFields(t){const n=ra(["visitors",...t,"fixedFields"],this.specObj);return typeof n=="object"&&n!==null?Object.keys(n):[]}retrieveVisitor(t){return QS(Vc,["visitors",...t],this.specObj)?ra(["visitors",...t],this.specObj):ra(["visitors",...t,"$visitor"],this.specObj)}retrieveVisitorInstance(t,n={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(t))({...i,...n})}toRefractedElement(t,n,i={}){const l=this.retrieveVisitorInstance(t,i);return l instanceof cs&&l?.constructor===cs?Ct(n):(fi(n,l,i),l.element)}},Vx=class extends Od{specPath;ignoredFields;constructor({specPath:t,ignoredFields:n,...i}){super({...i}),this.specPath=t,this.ignoredFields=n||[]}ObjectElement(t){const n=this.specPath(t),i=this.retrieveFixedFields(n);return t.forEach(((l,h,v)=>{if(xn(h)&&i.includes(it(h))&&!this.ignoredFields.includes(it(h))){const x=this.toRefractedElement([...n,"fixedFields",it(h)],l),w=new vx(Ct(h),x);this.copyMetaAndAttributes(v,w),w.classes.push("fixed-field"),this.element.content.push(w)}else this.ignoredFields.includes(it(h))||this.element.content.push(Ct(v))})),this.copyMetaAndAttributes(t,this.element),Gn}};class w7 extends bt(Vx,cs){constructor(n){super(n),this.element=new Ux,this.specPath=Wt(["document","objects","JSONSchema"])}}let su=class{parent;constructor({parent:t}){this.parent=t}};const Hl=t=>Un(t)&&t.hasKey("$ref");let S7=class extends bt(Od,su,cs){ObjectElement(t){const n=Hl(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(n,t),Gn}ArrayElement(t){return this.element=new ur,this.element.classes.push("json-schema-items"),t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},E7=class extends Od{specPath;ignoredFields;fieldPatternPredicate=hm;constructor({specPath:t,ignoredFields:n,fieldPatternPredicate:i,...l}){super({...l}),this.specPath=t,this.ignoredFields=n||[],typeof i=="function"&&(this.fieldPatternPredicate=i)}ObjectElement(t){return t.forEach(((n,i,l)=>{if(!this.ignoredFields.includes(it(i))&&this.fieldPatternPredicate(it(i))){const h=this.specPath(n),v=this.toRefractedElement(h,n),x=new vx(Ct(i),v);this.copyMetaAndAttributes(l,x),x.classes.push("patterned-field"),this.element.content.push(x)}else this.ignoredFields.includes(it(i))||this.element.content.push(Ct(l))})),this.copyMetaAndAttributes(t,this.element),Gn}},U1=class extends E7{constructor(t){super(t),this.fieldPatternPredicate=cO}},j7=class extends bt(U1,su,cs){constructor(t){super(t),this.element=new St,this.element.classes.push("json-schema-properties"),this.specPath=n=>Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},C7=class extends bt(U1,su,cs){constructor(t){super(t),this.element=new St,this.element.classes.push("json-schema-patternProperties"),this.specPath=n=>Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class A7 extends bt(U1,su,cs){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-dependencies"),this.specPath=i=>Hl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let O7=class extends bt(Od,su,cs){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},k7=class extends bt(Od,su,cs){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-anyOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},R7=class extends bt(Od,su,cs){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-oneOf")}ArrayElement(t){return t.forEach((n=>{const i=Hl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class T7 extends bt(U1,su,cs){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-definitions"),this.specPath=i=>Hl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let _7=class extends bt(Od,su,cs){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-links")}ArrayElement(t){return t.forEach((n=>{const i=this.toRefractedElement(["document","objects","LinkDescription"],n);this.element.push(i)})),this.copyMetaAndAttributes(t,this.element),Gn}};class $7 extends bt(Vx,cs){constructor(n){super(n),this.element=new F1,this.specPath=Wt(["document","objects","JSONReference"])}ObjectElement(n){const i=Vx.prototype.ObjectElement.call(this,n);return xn(this.element.$ref)&&this.element.classes.push("reference-element"),i}}let N7=class extends Od{alternator;constructor({alternator:t,...n}){super({...n}),this.alternator=t}enter(t){const n=this.alternator.map((({predicate:l,specPath:h})=>rO(l,Wt(h),t1))),i=B$(n)(t);return this.element=this.toRefractedElement(i,t),Gn}},Mm=class extends N7{constructor(t){super(t),this.alternator=[{predicate:Hl,specPath:["document","objects","JSONReference"]},{predicate:pi,specPath:["document","objects","JSONSchema"]}]}};class D7 extends bt(Vx,cs){constructor(n){super(n),this.element=new q1,this.specPath=Wt(["document","objects","Media"])}}class P7 extends bt(Vx,cs){constructor(n){super(n),this.element=new B1,this.specPath=Wt(["document","objects","LinkDescription"])}}const iu={visitors:{value:cs,JSONSchemaOrJSONReferenceVisitor:Mm,document:{objects:{JSONSchema:{$visitor:w7,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:Mm,items:S7,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:class extends cs{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-required"),n}},properties:j7,additionalProperties:Mm,patternProperties:C7,dependencies:A7,enum:class extends cs{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-enum"),n}},type:class extends cs{StringElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}},allOf:O7,anyOf:k7,oneOf:R7,not:Mm,definitions:T7,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:_7,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:$7,fixedFields:{$ref:class extends cs{StringElement(t){const n=this.enter(t);return this.element.classes.push("reference-value"),n}}}},Media:{$visitor:D7,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:P7,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Mm,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Mm}}}}}},M7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ux||t(l)&&n("JSONSchemaDraft4",l)&&i("object",l))),I7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof F1||t(l)&&n("JSONReference",l)&&i("object",l))),L7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof q1||t(l)&&n("media",l)&&i("object",l))),z7=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof B1||t(l)&&n("linkDescription",l)&&i("object",l))),F7=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:I7,isJSONSchemaElement:M7,isLinkDescriptionElement:z7,isMediaElement:L7},Symbol.toStringTag,{value:"Module"})),q7=()=>{const t=wx(g7);return{predicates:{...F7,isStringElement:xn},namespace:t}},K1=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","JSONSchema","$visitor"],plugins:v=[],specificationObj:x=iu}={})=>{const w=LO(l),C=R1(x),$=new(ra(h,C))({specObj:C});return fi(w,$),km($.element,v,{toolboxCreator:q7,visitorOptions:{keyMap:v7,nodeTypeGetter:y7}})})(n,{specPath:t,...i});Ux.refract=K1(["visitors","document","objects","JSONSchema","$visitor"]),F1.refract=K1(["visitors","document","objects","JSONReference","$visitor"]),q1.refract=K1(["visitors","document","objects","Media","$visitor"]),B1.refract=K1(["visitors","document","objects","LinkDescription","$visitor"]);let V1=class extends Ux{constructor(t,n,i){super(t,n,i),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new Ur("idProp getter in Schema class is not not supported.")}set idProp(t){throw new Ur("idProp setter in Schema class is not not supported.")}get $schema(){throw new Ur("$schema getter in Schema class is not not supported.")}set $schema(t){throw new Ur("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get patternProperties(){throw new Ur("patternProperties getter in Schema class is not not supported.")}set patternProperties(t){throw new Ur("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Ur("dependencies getter in Schema class is not not supported.")}set dependencies(t){throw new Ur("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(t){this.set("type",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get definitions(){throw new Ur("definitions getter in Schema class is not not supported.")}set definitions(t){throw new Ur("definitions setter in Schema class is not not supported.")}get base(){throw new Ur("base getter in Schema class is not not supported.")}set base(t){throw new Ur("base setter in Schema class is not not supported.")}get links(){throw new Ur("links getter in Schema class is not not supported.")}set links(t){throw new Ur("links setter in Schema class is not not supported.")}get media(){throw new Ur("media getter in Schema class is not not supported.")}set media(t){throw new Ur("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(t){this.set("nullable",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}},Hx=class extends St{constructor(t,n,i){super(t,n,i),this.element="securityRequirement"}},Gx=class extends St{constructor(t,n,i){super(t,n,i),this.element="securityScheme"}get type(){return this.get("type")}set type(t){this.set("type",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get scheme(){return this.get("scheme")}set scheme(t){this.set("scheme",t)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(t){this.set("bearerFormat",t)}get flows(){return this.get("flows")}set flows(t){this.set("flows",t)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(t){this.set("openIdConnectUrl",t)}},Xx=class extends St{constructor(t,n,i){super(t,n,i),this.element="server"}get url(){return this.get("url")}set url(t){this.set("url",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get variables(){return this.get("variables")}set variables(t){this.set("variables",t)}},Yx=class extends St{constructor(t,n,i){super(t,n,i),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}},H1=class extends St{constructor(t,n,i){super(t,n,i),this.element="tag"}get name(){return this.get("name")}set name(t){this.set("name",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}},G1=class extends St{constructor(t,n,i){super(t,n,i),this.element="xml"}get name(){return this.get("name")}set name(t){this.set("name",t)}get namespace(){return this.get("namespace")}set namespace(t){this.set("namespace",t)}get prefix(){return this.get("prefix")}set prefix(t){this.set("prefix",t)}get attribute(){return this.get("attribute")}set attribute(t){this.set("attribute",t)}get wrapped(){return this.get("wrapped")}set wrapped(t){this.set("wrapped",t)}};const B7={namespace:t=>{const{base:n}=t;return n.register("callback",Ax),n.register("components",Ox),n.register("contact",kx),n.register("discriminator",P1),n.register("encoding",M1),n.register("example",Rx),n.register("externalDocumentation",Tx),n.register("header",Dm),n.register("info",_x),n.register("license",$x),n.register("link",Nx),n.register("mediaType",Dx),n.register("oAuthFlow",I1),n.register("oAuthFlows",L1),n.register("openapi",Px),n.register("openApi3_0",z1),n.register("operation",Mx),n.register("parameter",Pm),n.register("pathItem",Ix),n.register("paths",Lx),n.register("reference",zx),n.register("requestBody",Fx),n.register("response",qx),n.register("responses",Bx),n.register("schema",V1),n.register("securityRequirement",Hx),n.register("securityScheme",Gx),n.register("server",Xx),n.register("serverVariable",Yx),n.register("tag",H1),n.register("xml",G1),n}};class X1 extends ur{static primaryClass="servers";constructor(n,i,l){super(n,i,l),this.classes.push(X1.primaryClass)}}class uk extends ur{static primaryClass="security";constructor(n,i,l){super(n,i,l),this.classes.push(uk.primaryClass)}}class dk extends ur{static primaryClass="tags";constructor(n,i,l){super(n,i,l),this.classes.push(dk.primaryClass)}}class hk extends St{static primaryClass="server-variables";constructor(n,i,l){super(n,i,l),this.classes.push(hk.primaryClass)}}class Y1 extends St{static primaryClass="components-schemas";constructor(n,i,l){super(n,i,l),this.classes.push(Y1.primaryClass)}}class pk extends St{static primaryClass="components-responses";constructor(n,i,l){super(n,i,l),this.classes.push(pk.primaryClass)}}class fk extends St{static primaryClass="components-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(fk.primaryClass),this.classes.push("parameters")}}class mk extends St{static primaryClass="components-examples";constructor(n,i,l){super(n,i,l),this.classes.push(mk.primaryClass),this.classes.push("examples")}}class gk extends St{static primaryClass="components-request-bodies";constructor(n,i,l){super(n,i,l),this.classes.push(gk.primaryClass)}}class yk extends St{static primaryClass="components-headers";constructor(n,i,l){super(n,i,l),this.classes.push(yk.primaryClass)}}class vk extends St{static primaryClass="components-security-schemes";constructor(n,i,l){super(n,i,l),this.classes.push(vk.primaryClass)}}class xk extends St{static primaryClass="components-links";constructor(n,i,l){super(n,i,l),this.classes.push(xk.primaryClass)}}class bk extends St{static primaryClass="components-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(bk.primaryClass)}}class wk extends ur{static primaryClass="path-item-servers";constructor(n,i,l){super(n,i,l),this.classes.push(wk.primaryClass),this.classes.push("servers")}}class Sk extends ur{static primaryClass="path-item-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Sk.primaryClass),this.classes.push("parameters")}}class Z1 extends ur{static primaryClass="operation-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Z1.primaryClass),this.classes.push("parameters")}}class Ek extends St{static primaryClass="parameter-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Ek.primaryClass),this.classes.push("examples")}}class jk extends St{static primaryClass="parameter-content";constructor(n,i,l){super(n,i,l),this.classes.push(jk.primaryClass),this.classes.push("content")}}class Ck extends ur{static primaryClass="operation-tags";constructor(n,i,l){super(n,i,l),this.classes.push(Ck.primaryClass)}}class Ak extends St{static primaryClass="operation-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(Ak.primaryClass)}}class W1 extends ur{static primaryClass="operation-security";constructor(n,i,l){super(n,i,l),this.classes.push(W1.primaryClass),this.classes.push("security")}}class Ok extends ur{static primaryClass="operation-servers";constructor(n,i,l){super(n,i,l),this.classes.push(Ok.primaryClass),this.classes.push("servers")}}class kk extends St{static primaryClass="request-body-content";constructor(n,i,l){super(n,i,l),this.classes.push(kk.primaryClass),this.classes.push("content")}}class Rk extends St{static primaryClass="media-type-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Rk.primaryClass),this.classes.push("examples")}}class Tk extends St{static primaryClass="media-type-encoding";constructor(n,i,l){super(n,i,l),this.classes.push(Tk.primaryClass)}}class _k extends St{static primaryClass="encoding-headers";constructor(n,i,l){super(n,i,l),this.classes.push(_k.primaryClass)}}class $k extends St{static primaryClass="response-headers";constructor(n,i,l){super(n,i,l),this.classes.push($k.primaryClass)}}class Nk extends St{static primaryClass="response-content";constructor(n,i,l){super(n,i,l),this.classes.push(Nk.primaryClass),this.classes.push("content")}}class Dk extends St{static primaryClass="response-links";constructor(n,i,l){super(n,i,l),this.classes.push(Dk.primaryClass)}}class Pk extends St{static primaryClass="discriminator-mapping";constructor(n,i,l){super(n,i,l),this.classes.push(Pk.primaryClass)}}class Mk extends St{static primaryClass="oauth-flow-scopes";constructor(n,i,l){super(n,i,l),this.classes.push(Mk.primaryClass)}}class Ik extends St{static primaryClass="link-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Ik.primaryClass)}}class Lk extends St{static primaryClass="header-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Lk.primaryClass),this.classes.push("examples")}}class zk extends St{static primaryClass="header-content";constructor(n,i,l){super(n,i,l),this.classes.push(zk.primaryClass),this.classes.push("content")}}const U7=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},K7={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Om};class GD{element;constructor(n={}){Object.assign(this,n)}copyMetaAndAttributes(n,i){(n.meta.length>0||i.meta.length>0)&&(i.meta=Ul(i.meta,n.meta),bx(n)&&i.meta.set("sourceMap",n.meta.get("sourceMap"))),(n.attributes.length>0||n.meta.length>0)&&(i.attributes=Ul(i.attributes,n.attributes))}}class vt extends GD{enter(n){return this.element=Ct(n),Gn}}class $i extends GD{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:n,passingOptionsNames:i,openApiGenericElement:l,openApiSemanticElement:h,...v}){super({...v}),this.specObj=n,this.openApiGenericElement=l,this.openApiSemanticElement=h,Array.isArray(i)&&(this.passingOptionsNames=i)}retrievePassingOptions(){return N$(this.passingOptionsNames,this)}retrieveFixedFields(n){const i=ra(["visitors",...n,"fixedFields"],this.specObj);return typeof i=="object"&&i!==null?Object.keys(i):[]}retrieveVisitor(n){return QS(Vc,["visitors",...n],this.specObj)?ra(["visitors",...n],this.specObj):ra(["visitors",...n,"$visitor"],this.specObj)}retrieveVisitorInstance(n,i={}){const l=this.retrievePassingOptions();return new(this.retrieveVisitor(n))({...l,...i})}toRefractedElement(n,i,l={}){const h=this.retrieveVisitorInstance(n,l);return h instanceof vt&&h?.constructor===vt?Ct(i):(fi(i,h,l),h.element)}}const wr=t=>Un(t)&&t.hasKey("$ref"),V7=Un,H7=Un,XD=t=>xn(t.key)&&P$("x-",it(t.key));class bn extends $i{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=XD;constructor({specPath:n,ignoredFields:i,canSupportSpecificationExtensions:l,specificationExtensionPredicate:h,...v}){super({...v}),this.specPath=n,this.ignoredFields=i||[],typeof l=="boolean"&&(this.canSupportSpecificationExtensions=l),typeof h=="function"&&(this.specificationExtensionPredicate=h)}ObjectElement(n){const i=this.specPath(n),l=this.retrieveFixedFields(i);return n.forEach(((h,v,x)=>{if(xn(v)&&l.includes(it(v))&&!this.ignoredFields.includes(it(v))){const w=this.toRefractedElement([...i,"fixedFields",it(v)],h),C=new vx(Ct(v),w);this.copyMetaAndAttributes(x,C),C.classes.push("fixed-field"),this.element.content.push(C)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(x)){const w=this.toRefractedElement(["document","extension"],x);this.element.content.push(w)}else this.ignoredFields.includes(it(v))||this.element.content.push(Ct(x))})),this.copyMetaAndAttributes(n,this.element),Gn}}class G7 extends bt(bn,vt){constructor(n){super(n),this.element=new z1,this.specPath=Wt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(n){return bn.prototype.ObjectElement.call(this,n)}}class X7 extends bt($i,vt){StringElement(n){const i=new Px(it(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}let Y7=class extends bt(bn,vt){constructor(t){super(t),this.element=new _x,this.specPath=Wt(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}},Z7=class extends bt(bn,vt){constructor(t){super(t),this.element=new kx,this.specPath=Wt(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},W7=class extends bt(bn,vt){constructor(t){super(t),this.element=new $x,this.specPath=Wt(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},J7=class extends bt(bn,vt){constructor(t){super(t),this.element=new Nx,this.specPath=Wt(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return(xn(this.element.operationId)||xn(this.element.operationRef))&&this.element.classes.push("reference-element"),n}};class Im extends $i{specPath;ignoredFields;fieldPatternPredicate=hm;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=XD;constructor({specPath:n,ignoredFields:i,fieldPatternPredicate:l,canSupportSpecificationExtensions:h,specificationExtensionPredicate:v,...x}){super({...x}),this.specPath=n,this.ignoredFields=i||[],typeof l=="function"&&(this.fieldPatternPredicate=l),typeof h=="boolean"&&(this.canSupportSpecificationExtensions=h),typeof v=="function"&&(this.specificationExtensionPredicate=v)}ObjectElement(n){return n.forEach(((i,l,h)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(h)){const v=this.toRefractedElement(["document","extension"],h);this.element.content.push(v)}else if(!this.ignoredFields.includes(it(l))&&this.fieldPatternPredicate(it(l))){const v=this.specPath(i),x=this.toRefractedElement(v,i),w=new vx(Ct(l),x);this.copyMetaAndAttributes(h,w),w.classes.push("patterned-field"),this.element.content.push(w)}else this.ignoredFields.includes(it(l))||this.element.content.push(Ct(h))})),this.copyMetaAndAttributes(n,this.element),Gn}}class un extends Im{constructor(n){super(n),this.fieldPatternPredicate=cO}}let Q7=class extends bt(un,vt){constructor(t){super(t),this.element=new Ik,this.specPath=Wt(["value"])}},e9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Xx,this.specPath=Wt(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}},Fk=class extends bt($i,vt){constructor(t){super(t),this.element=new X1}ArrayElement(t){return t.forEach((n=>{const i=V7(n)?["document","objects","Server"]:["value"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},t9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Yx,this.specPath=Wt(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class n9 extends bt(un,vt){constructor(n){super(n),this.element=new hk,this.specPath=Wt(["document","objects","ServerVariable"])}}let r9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Dx,this.specPath=Wt(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class Gl extends $i{alternator;constructor({alternator:n,...i}){super({...i}),this.alternator=n||[]}enter(n){const i=this.alternator.map((({predicate:h,specPath:v})=>rO(h,Wt(v),t1))),l=B$(i)(n);return this.element=this.toRefractedElement(l,n),Gn}}const s9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ax||t(l)&&n("callback",l)&&i("object",l))),i9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ox||t(l)&&n("components",l)&&i("object",l))),a9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof kx||t(l)&&n("contact",l)&&i("object",l))),o9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Rx||t(l)&&n("example",l)&&i("object",l))),l9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Tx||t(l)&&n("externalDocumentation",l)&&i("object",l))),Lm=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Dm||t(l)&&n("header",l)&&i("object",l))),c9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof _x||t(l)&&n("info",l)&&i("object",l))),u9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof $x||t(l)&&n("license",l)&&i("object",l))),d9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Nx||t(l)&&n("link",l)&&i("object",l))),h9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Px||t(l)&&n("openapi",l)&&i("string",l))),p9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof z1||t(h)&&n("openApi3_0",h)&&i("object",h)&&l("api",h))),YD=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Mx||t(l)&&n("operation",l)&&i("object",l))),f9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Pm||t(l)&&n("parameter",l)&&i("object",l))),qk=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ix||t(l)&&n("pathItem",l)&&i("object",l))),m9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Lx||t(l)&&n("paths",l)&&i("object",l))),fr=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof zx||t(l)&&n("reference",l)&&i("object",l))),g9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Fx||t(l)&&n("requestBody",l)&&i("object",l))),J1=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof qx||t(l)&&n("response",l)&&i("object",l))),y9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Bx||t(l)&&n("responses",l)&&i("object",l))),v9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof V1||t(l)&&n("schema",l)&&i("object",l))),x9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Hx||t(l)&&n("securityRequirement",l)&&i("object",l))),b9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Gx||t(l)&&n("securityScheme",l)&&i("object",l))),w9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Xx||t(l)&&n("server",l)&&i("object",l))),S9=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Yx||t(l)&&n("serverVariable",l)&&i("object",l))),Q1=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Dx||t(l)&&n("mediaType",l)&&i("object",l))),ZD=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof X1||t(h)&&n("array",h)&&i("array",h)&&l("servers",h))),E9=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:t=>xx(t)&&t.classes.includes("boolean-json-schema"),isCallbackElement:s9,isComponentsElement:i9,isContactElement:a9,isExampleElement:o9,isExternalDocumentationElement:l9,isHeaderElement:Lm,isInfoElement:c9,isLicenseElement:u9,isLinkElement:d9,isMediaTypeElement:Q1,isOpenApi3_0Element:p9,isOpenapiElement:h9,isOperationElement:YD,isParameterElement:f9,isPathItemElement:qk,isPathsElement:m9,isReferenceElement:fr,isRequestBodyElement:g9,isResponseElement:J1,isResponsesElement:y9,isSchemaElement:v9,isSecurityRequirementElement:x9,isSecuritySchemeElement:b9,isServerElement:w9,isServerVariableElement:S9,isServersElement:ZD},Symbol.toStringTag,{value:"Module"}));let j9=class extends bt(Gl,vt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},Bk=class extends bt(un,vt){constructor(t){super(t),this.element=new St,this.element.classes.push("examples"),this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}},C9=class extends bt(un,vt){constructor(t){super(t),this.element=new Tk,this.specPath=Wt(["document","objects","Encoding"])}},A9=class extends bt(un,vt){constructor(t){super(t),this.element=new Hx,this.specPath=Wt(["value"])}},O9=class extends bt($i,vt){constructor(t){super(t),this.element=new uk}ArrayElement(t){return t.forEach((n=>{if(Un(n)){const i=this.toRefractedElement(["document","objects","SecurityRequirement"],n);this.element.push(i)}else this.element.push(Ct(n))})),this.copyMetaAndAttributes(t,this.element),Gn}},k9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Ox,this.specPath=Wt(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},R9=class extends bt(bn,vt){constructor(t){super(t),this.element=new H1,this.specPath=Wt(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},T9=class extends bt(bn,vt){constructor(t){super(t),this.element=new zx,this.specPath=Wt(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return xn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},_9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Pm,this.specPath=Wt(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(Q1).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),n}},$9=class extends bt(Gl,vt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},N9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Dm,this.specPath=Wt(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},D9=class extends bt(Gl,vt){constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},eE=class extends bt(un,vt){constructor(t){super(t),this.element=new St,this.element.classes.push("content"),this.specPath=Wt(["document","objects","MediaType"])}},P9=class extends bt(bn,vt){constructor(t){super(t),this.element=new V1,this.specPath=Wt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const{allOf:WD}=iu.visitors.document.objects.JSONSchema.fixedFields,{anyOf:JD}=iu.visitors.document.objects.JSONSchema.fixedFields,{oneOf:QD}=iu.visitors.document.objects.JSONSchema.fixedFields,{items:eP}=iu.visitors.document.objects.JSONSchema.fixedFields,{properties:tP}=iu.visitors.document.objects.JSONSchema.fixedFields,{type:M9}=iu.visitors.document.objects.JSONSchema.fixedFields,{JSONSchemaOrJSONReferenceVisitor:nP}=iu.visitors;class rP extends nP{ObjectElement(n){const i=nP.prototype.enter.call(this,n);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),i}}let I9=class extends bt(bn,vt){constructor(t){super(t),this.element=new P1,this.specPath=Wt(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class L9 extends bt(un,vt){constructor(n){super(n),this.element=new Pk,this.specPath=Wt(["value"])}}let z9=class extends bt(bn,vt){constructor(t){super(t),this.element=new G1,this.specPath=Wt(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},F9=class extends bt(un,vt){constructor(t){super(t),this.element=new Y1,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},q9=class extends bt(un,vt){constructor(t){super(t),this.element=new pk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(J1).forEach(((i,l)=>{i.setMetaProperty("http-status-code",it(l))})),n}},B9=class extends bt(un,vt){constructor(t){super(t),this.element=new fk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","parameter")})),n}},U9=class extends bt(un,vt){constructor(t){super(t),this.element=new mk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}};class K9 extends bt(un,vt){constructor(n){super(n),this.element=new gk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","requestBody")})),i}}let V9=class extends bt(un,vt){constructor(t){super(t),this.element=new yk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.filter(Lm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}};class H9 extends bt(un,vt){constructor(n){super(n),this.element=new vk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","securityScheme")})),i}}let G9=class extends bt(un,vt){constructor(t){super(t),this.element=new xk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","link")})),n}},X9=class extends bt(un,vt){constructor(t){super(t),this.element=new bk,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","callback")})),n}},Y9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Rx,this.specPath=Wt(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return xn(this.element.externalValue)&&this.element.classes.push("reference-element"),n}},Z9=class extends bt(bn,vt){constructor(t){super(t),this.element=new Tx,this.specPath=Wt(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},W9=class extends bt(bn,vt){constructor(t){super(t),this.element=new M1,this.specPath=Wt(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.headers)&&this.element.headers.filter(Lm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}},J9=class extends bt(un,vt){constructor(t){super(t),this.element=new _k,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.forEach(((i,l)=>{if(!Lm(i))return;const h=it(l);i.setMetaProperty("headerName",h)})),n}},Q9=class extends bt(Im,vt){constructor(t){super(t),this.element=new Lx,this.specPath=Wt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=pi}ObjectElement(t){const n=Im.prototype.ObjectElement.call(this,t);return this.element.filter(qk).forEach(((i,l)=>{l.classes.push("openapi-path-template"),l.classes.push("path-template"),i.setMetaProperty("path",Ct(l))})),n}},eH=class extends bt(bn,vt){constructor(t){super(t),this.element=new Fx,this.specPath=Wt(["document","objects","RequestBody"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(Q1).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),n}},tH=class extends bt(Im,vt){constructor(t){super(t),this.element=new Ax,this.specPath=Wt(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=n=>/{(?<expression>[^}]{1,2083})}/.test(String(n))}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(qk).forEach(((i,l)=>{i.setMetaProperty("runtime-expression",it(l))})),n}},nH=class extends bt(bn,vt){constructor(t){super(t),this.element=new qx,this.specPath=Wt(["document","objects","Response"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return Un(this.element.contentProp)&&this.element.contentProp.filter(Q1).forEach(((i,l)=>{i.setMetaProperty("media-type",it(l))})),Un(this.element.headers)&&this.element.headers.filter(Lm).forEach(((i,l)=>{i.setMetaProperty("header-name",it(l))})),n}};class rH extends bt(un,vt){constructor(n){super(n),this.element=new $k,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","header")})),this.element.forEach(((l,h)=>{if(!Lm(l))return;const v=it(h);l.setMetaProperty("header-name",v)})),i}}class sH extends bt(un,vt){constructor(n){super(n),this.element=new Dk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","link")})),i}}class sP extends bt(bn,Im){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:n,specPathPatternedFields:i,...l}){super({...l}),this.specPathFixedFields=n,this.specPathPatternedFields=i}ObjectElement(n){const{specPath:i,ignoredFields:l}=this;try{this.specPath=this.specPathFixedFields;const h=this.retrieveFixedFields(this.specPath(n));this.ignoredFields=[...l,...LB(n.keys(),h)],bn.prototype.ObjectElement.call(this,n),this.specPath=this.specPathPatternedFields,this.ignoredFields=h,Im.prototype.ObjectElement.call(this,n)}catch(h){throw this.specPath=i,h}return Gn}}let iH=class extends bt(sP,vt){constructor(t){super(t),this.element=new Bx,this.specPathFixedFields=Wt(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=n=>wr(n)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=n=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${aU(100,600).join("|")})$`).test(String(n))}ObjectElement(t){const n=sP.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(J1).forEach(((i,l)=>{const h=Ct(l);this.fieldPatternPredicate(it(h))&&i.setMetaProperty("http-status-code",h)})),n}};class aH extends bt(Gl,vt){constructor(n){super(n),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","Response"]}]}ObjectElement(n){const i=Gl.prototype.enter.call(this,n);return fr(this.element)?this.element.setMetaProperty("referenced-element","response"):J1(this.element)&&this.element.setMetaProperty("http-status-code","default"),i}}let oH=class extends bt(bn,vt){constructor(t){super(t),this.element=new Mx,this.specPath=Wt(["document","objects","Operation"])}},iP=class extends bt($i,vt){constructor(t){super(t),this.element=new ur,this.element.classes.push("parameters")}ArrayElement(t){return t.forEach((n=>{const i=wr(n)?["document","objects","Reference"]:["document","objects","Parameter"],l=this.toRefractedElement(i,n);fr(l)&&l.setMetaProperty("referenced-element","parameter"),this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class lH extends bt(un,vt){specPath;constructor(n){super(n),this.element=new Ak,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(fr).forEach((l=>{l.setMetaProperty("referenced-element","callback")})),i}}class cH extends bt($i,vt){constructor(n){super(n),this.element=new W1}ArrayElement(n){return n.forEach((i=>{const l=Un(i)?["document","objects","SecurityRequirement"]:["value"],h=this.toRefractedElement(l,i);this.element.push(h)})),this.copyMetaAndAttributes(n,this.element),Gn}}let uH=class extends bt(bn,vt){constructor(t){super(t),this.element=new Ix,this.specPath=Wt(["document","objects","PathItem"])}ObjectElement(t){const n=bn.prototype.ObjectElement.call(this,t);return this.element.filter(YD).forEach(((i,l)=>{const h=Ct(l);h.content=it(h).toUpperCase(),i.setMetaProperty("http-method",h)})),xn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},dH=class extends bt(bn,vt){constructor(t){super(t),this.element=new Gx,this.specPath=Wt(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},hH=class extends bt(bn,vt){constructor(t){super(t),this.element=new L1,this.specPath=Wt(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},pH=class extends bt(bn,vt){constructor(t){super(t),this.element=new I1,this.specPath=Wt(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class fH extends bt(un,vt){constructor(n){super(n),this.element=new Mk,this.specPath=Wt(["value"])}}class mH extends bt($i,vt){constructor(n){super(n),this.element=new dk}ArrayElement(n){return n.forEach((i=>{const l=H7(i)?["document","objects","Tag"]:["value"],h=this.toRefractedElement(l,i);this.element.push(h)})),this.copyMetaAndAttributes(n,this.element),Gn}}const{fixedFields:xs}=iu.visitors.document.objects.JSONSchema,Ye={visitors:{value:vt,document:{objects:{OpenApi:{$visitor:G7,fixedFields:{openapi:X7,info:{$ref:"#/visitors/document/objects/Info"},servers:Fk,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:O9,tags:mH,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:Y7,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("api-version"),this.element.classes.push("version"),n}}}},Contact:{$visitor:Z7,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:W7,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:e9,fixedFields:{url:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("server-url"),n}},description:{$ref:"#/visitors/value"},variables:n9}},ServerVariable:{$visitor:t9,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:k9,fixedFields:{schemas:F9,responses:q9,parameters:B9,examples:U9,requestBodies:K9,headers:V9,securitySchemes:H9,links:G9,callbacks:X9}},Paths:{$visitor:Q9},PathItem:{$visitor:uH,fixedFields:{$ref:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:class extends Fk{constructor(t){super(t),this.element=new wk}},parameters:class extends iP{constructor(t){super(t),this.element=new Sk}}}},Operation:{$visitor:oH,fixedFields:{tags:class extends vt{constructor(t){super(t),this.element=new Ck}ArrayElement(t){return this.element=this.element.concat(Ct(t)),Gn}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:class extends iP{constructor(t){super(t),this.element=new Z1}},requestBody:class extends Gl{constructor(t){super(t),this.alternator=[{predicate:wr,specPath:["document","objects","Reference"]},{predicate:pi,specPath:["document","objects","RequestBody"]}]}ObjectElement(t){const n=Gl.prototype.enter.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),n}},responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:lH,deprecated:{$ref:"#/visitors/value"},security:cH,servers:class extends Fk{constructor(t){super(t),this.element=new Ok}}}},ExternalDocumentation:{$visitor:Z9,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:_9,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:$9,example:{$ref:"#/visitors/value"},examples:class extends Bk{constructor(t){super(t),this.element=new Ek}},content:class extends eE{constructor(t){super(t),this.element=new jk}}}},RequestBody:{$visitor:eH,fixedFields:{description:{$ref:"#/visitors/value"},content:class extends eE{constructor(t){super(t),this.element=new kk}},required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:r9,fixedFields:{schema:j9,example:{$ref:"#/visitors/value"},examples:class extends Bk{constructor(t){super(t),this.element=new Rk}},encoding:C9}},Encoding:{$visitor:W9,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:J9,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:iH,fixedFields:{default:aH}},Response:{$visitor:nH,fixedFields:{description:{$ref:"#/visitors/value"},headers:rH,content:class extends eE{constructor(t){super(t),this.element=new Nk}},links:sH}},Callback:{$visitor:tH},Example:{$visitor:Y9,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},Link:{$visitor:J7,fixedFields:{operationRef:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},operationId:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},parameters:Q7,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:N9,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:D9,example:{$ref:"#/visitors/value"},examples:class extends Bk{constructor(t){super(t),this.element=new Lk}},content:class extends eE{constructor(t){super(t),this.element=new zk}}}},Tag:{$visitor:R9,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:T9,fixedFields:{$ref:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:P9,fixedFields:{title:xs.title,multipleOf:xs.multipleOf,maximum:xs.maximum,exclusiveMaximum:xs.exclusiveMaximum,minimum:xs.minimum,exclusiveMinimum:xs.exclusiveMinimum,maxLength:xs.maxLength,minLength:xs.minLength,pattern:xs.pattern,maxItems:xs.maxItems,minItems:xs.minItems,uniqueItems:xs.uniqueItems,maxProperties:xs.maxProperties,minProperties:xs.minProperties,required:xs.required,enum:xs.enum,type:class extends M9{ArrayElement(t){return this.enter(t)}},allOf:class extends WD{ArrayElement(t){const n=WD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},anyOf:class extends JD{ArrayElement(t){const n=JD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},oneOf:class extends QD{ArrayElement(t){const n=QD.prototype.ArrayElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},not:rP,items:class extends eP{ObjectElement(t){const n=eP.prototype.ObjectElement.call(this,t);return fr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}ArrayElement(t){return this.enter(t)}},properties:class extends tP{ObjectElement(t){const n=tP.prototype.ObjectElement.call(this,t);return this.element.filter(fr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},additionalProperties:rP,description:xs.description,format:xs.format,default:xs.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:I9,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:L9}},XML:{$visitor:z9,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:dH,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:hH,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:pH,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:fH}},SecurityRequirement:{$visitor:A9}},extension:{$visitor:class extends $i{MemberElement(t){return this.element=Ct(t),this.element.classes.push("specification-extension"),Gn}}}}}},gH=()=>{const t=wx(B7);return{predicates:{...E9,isElement:es,isStringElement:xn,isArrayElement:Ri,isObjectElement:Un,isMemberElement:zo,includesClasses:C1,hasElementSourceMap:bx},namespace:t}},er=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=LO(l),w=R1(Ye),C=new(ra(h,w))({specObj:w});return fi(x,C),km(C.element,v,{toolboxCreator:gH,visitorOptions:{keyMap:K7,nodeTypeGetter:U7}})})(n,{specPath:t,...i});Ax.refract=er(["visitors","document","objects","Callback","$visitor"]),Ox.refract=er(["visitors","document","objects","Components","$visitor"]),kx.refract=er(["visitors","document","objects","Contact","$visitor"]),Rx.refract=er(["visitors","document","objects","Example","$visitor"]),P1.refract=er(["visitors","document","objects","Discriminator","$visitor"]),M1.refract=er(["visitors","document","objects","Encoding","$visitor"]),Tx.refract=er(["visitors","document","objects","ExternalDocumentation","$visitor"]),Dm.refract=er(["visitors","document","objects","Header","$visitor"]),_x.refract=er(["visitors","document","objects","Info","$visitor"]),$x.refract=er(["visitors","document","objects","License","$visitor"]),Nx.refract=er(["visitors","document","objects","Link","$visitor"]),Dx.refract=er(["visitors","document","objects","MediaType","$visitor"]),I1.refract=er(["visitors","document","objects","OAuthFlow","$visitor"]),L1.refract=er(["visitors","document","objects","OAuthFlows","$visitor"]),Px.refract=er(["visitors","document","objects","OpenApi","fixedFields","openapi"]),z1.refract=er(["visitors","document","objects","OpenApi","$visitor"]),Mx.refract=er(["visitors","document","objects","Operation","$visitor"]),Pm.refract=er(["visitors","document","objects","Parameter","$visitor"]),Ix.refract=er(["visitors","document","objects","PathItem","$visitor"]),Lx.refract=er(["visitors","document","objects","Paths","$visitor"]),zx.refract=er(["visitors","document","objects","Reference","$visitor"]),Fx.refract=er(["visitors","document","objects","RequestBody","$visitor"]),qx.refract=er(["visitors","document","objects","Response","$visitor"]),Bx.refract=er(["visitors","document","objects","Responses","$visitor"]),V1.refract=er(["visitors","document","objects","Schema","$visitor"]),Hx.refract=er(["visitors","document","objects","SecurityRequirement","$visitor"]),Gx.refract=er(["visitors","document","objects","SecurityScheme","$visitor"]),Xx.refract=er(["visitors","document","objects","Server","$visitor"]),Yx.refract=er(["visitors","document","objects","ServerVariable","$visitor"]),H1.refract=er(["visitors","document","objects","Tag","$visitor"]),G1.refract=er(["visitors","document","objects","XML","$visitor"]);class tE extends Ax{}class nE extends Ox{get pathItems(){return this.get("pathItems")}set pathItems(n){this.set("pathItems",n)}}class rE extends kx{}class Uk extends P1{}class Kk extends M1{}class sE extends Rx{}class iE extends Tx{}class aE extends Dm{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class oE extends _x{get license(){return this.get("license")}set license(n){this.set("license",n)}get summary(){return this.get("summary")}set summary(n){this.set("summary",n)}}class ip extends Jc{static default=new ip("https://spec.openapis.org/oas/3.1/dialect/base");constructor(n,i,l){super(n,i,l),this.element="jsonSchemaDialect"}}class lE extends $x{get identifier(){return this.get("identifier")}set identifier(n){this.set("identifier",n)}}class cE extends Nx{}class uE extends Dx{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class Vk extends I1{}class Hk extends L1{}class Gk extends Px{}class kd extends St{constructor(n,i,l){super(n,i,l),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(n){this.set("jsonSchemaDialect",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get webhooks(){return this.get("webhooks")}set webhooks(n){this.set("webhooks",n)}}class Zx extends Mx{get requestBody(){return this.get("requestBody")}set requestBody(n){this.set("requestBody",n)}}class dE extends Pm{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class Rd extends Ix{get GET(){return this.get("get")}set GET(n){this.set("GET",n)}get PUT(){return this.get("put")}set PUT(n){this.set("PUT",n)}get POST(){return this.get("post")}set POST(n){this.set("POST",n)}get DELETE(){return this.get("delete")}set DELETE(n){this.set("DELETE",n)}get OPTIONS(){return this.get("options")}set OPTIONS(n){this.set("OPTIONS",n)}get HEAD(){return this.get("head")}set HEAD(n){this.set("HEAD",n)}get PATCH(){return this.get("patch")}set PATCH(n){this.set("PATCH",n)}get TRACE(){return this.get("trace")}set TRACE(n){this.set("TRACE",n)}}class hE extends Lx{}class Td extends zx{}Object.defineProperty(Td.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0}),Object.defineProperty(Td.prototype,"summary",{get(){return this.get("summary")},set(t){this.set("summary",t)},enumerable:!0});class pE extends Fx{}let fE=class extends qx{};class mE extends Bx{}class ap extends St{constructor(n,i,l){super(n,i,l),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(n){this.set("$vocabulary",n)}get $id(){return this.get("$id")}set $id(n){this.set("$id",n)}get $anchor(){return this.get("$anchor")}set $anchor(n){this.set("$anchor",n)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(n){this.set("$dynamicAnchor",n)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(n){this.set("$dynamicRef",n)}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}get $defs(){return this.get("$defs")}set $defs(n){this.set("$defs",n)}get $comment(){return this.get("$comment")}set $comment(n){this.set("$comment",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get if(){return this.get("if")}set if(n){this.set("if",n)}get then(){return this.get("then")}set then(n){this.set("then",n)}get else(){return this.get("else")}set else(n){this.set("else",n)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(n){this.set("dependentSchemas",n)}get prefixItems(){return this.get("prefixItems")}set prefixItems(n){this.set("prefixItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get containsProp(){return this.get("contains")}set containsProp(n){this.set("contains",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get propertyNames(){return this.get("propertyNames")}set propertyNames(n){this.set("propertyNames",n)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(n){this.set("unevaluatedItems",n)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(n){this.set("unevaluatedProperties",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get const(){return this.get("const")}set const(n){this.set("const",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxContains(){return this.get("maxContains")}set maxContains(n){this.set("maxContains",n)}get minContains(){return this.get("minContains")}set minContains(n){this.set("minContains",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(n){this.set("dependentRequired",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get deprecated(){return this.get("deprecated")}set deprecated(n){this.set("deprecated",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}get writeOnly(){return this.get("writeOnly")}set writeOnly(n){this.set("writeOnly",n)}get examples(){return this.get("examples")}set examples(n){this.set("examples",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(n){this.set("contentEncoding",n)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(n){this.set("contentMediaType",n)}get contentSchema(){return this.get("contentSchema")}set contentSchema(n){this.set("contentSchema",n)}get discriminator(){return this.get("discriminator")}set discriminator(n){this.set("discriminator",n)}get xml(){return this.get("xml")}set xml(n){this.set("xml",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get example(){return this.get("example")}set example(n){this.set("example",n)}}class gE extends Hx{}class yE extends Gx{}class vE extends Xx{}class xE extends Yx{}class Xk extends H1{}class Yk extends G1{}const Zk={namespace:t=>{const{base:n}=t;return n.register("callback",tE),n.register("components",nE),n.register("contact",rE),n.register("discriminator",Uk),n.register("encoding",Kk),n.register("example",sE),n.register("externalDocumentation",iE),n.register("header",aE),n.register("info",oE),n.register("jsonSchemaDialect",ip),n.register("license",lE),n.register("link",cE),n.register("mediaType",uE),n.register("oAuthFlow",Vk),n.register("oAuthFlows",Hk),n.register("openapi",Gk),n.register("openApi3_1",kd),n.register("operation",Zx),n.register("parameter",dE),n.register("pathItem",Rd),n.register("paths",hE),n.register("reference",Td),n.register("requestBody",pE),n.register("response",fE),n.register("responses",mE),n.register("schema",ap),n.register("securityRequirement",gE),n.register("securityScheme",yE),n.register("server",vE),n.register("serverVariable",xE),n.register("tag",Xk),n.register("xml",Yk),n}};class Wk extends St{static primaryClass="components-path-items";constructor(n,i,l){super(n,i,l),this.classes.push(Wk.primaryClass)}}class Jk extends St{static primaryClass="webhooks";constructor(n,i,l){super(n,i,l),this.classes.push(Jk.primaryClass)}}const qo=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Xl={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Om};class Wx{internalStore;constructor(n,i,l){this.storageElement=n,this.storageField=i,this.storageSubField=l}get store(){if(!this.internalStore){let n=this.storageElement.get(this.storageField);Un(n)||(n=new St,this.storageElement.set(this.storageField,n));let i=n.get(this.storageSubField);Ri(i)||(i=new ur,n.set(this.storageSubField,i)),this.internalStore=i}return this.internalStore}append(n){this.includes(n)||this.store.push(n)}includes(n){return this.store.includes(n)}}const yH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n,h=(w,C)=>!!(i.isParameterElement(w)&&i.isParameterElement(C)&&i.isStringElement(w.name)&&i.isStringElement(w.in)&&i.isStringElement(C.name)&&i.isStringElement(C.in)&&it(w.name)===it(C.name)&&it(w.in)===it(C.in)),v=[];let x;return{visitor:{OpenApi3_1Element:{enter(w){x=new Wx(w,t,"parameters")},leave(){x=void 0}},PathItemElement:{enter(w,C,$,N,_){if(_.some(i.isComponentsElement))return;const{parameters:F}=w;i.isArrayElement(F)?v.push([...F.content]):v.push([])},leave(){v.pop()}},OperationElement:{leave(w,C,$,N,_){const F=JS(v);if(!Array.isArray(F)||F.length===0)return;const U=l([..._,$,w]);if(x.includes(U))return;const J=$$([],["parameters","content"],w),Y=dU(h,[...J,...F]);w.parameters=new Z1(Y),x.append(U)}}}}},vH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h,v;return{visitor:{OpenApi3_1Element:{enter(x){v=new Wx(x,t,"security-requirements"),i.isArrayElement(x.security)&&(h=x.security)},leave(){v=void 0,h=void 0}},OperationElement:{leave(x,w,C,$,N){if(N.some(i.isComponentsElement))return;const _=l([...N,C,x]);var F;v.includes(_)||x.security===void 0&&h!==void 0&&(x.security=new W1((F=h)===null||F===void 0?void 0:F.content),v.append(_))}}}}},Qk=t=>t.replace(/\s/g,""),eR=t=>t.replace(/\W/gi,"_"),xH=(t,n,i)=>{const l=Qk(t);return l.length>0?eR(l):((h,v)=>`${eR(Qk(v.toLowerCase()))}${eR(Qk(h))}`)(n,i)},bH=({storageField:t="x-normalized",operationIdNormalizer:n=xH}={})=>i=>{const{predicates:l,ancestorLineageToJSONPointer:h,namespace:v}=i,x=[],w=[],C=[];let $;return{visitor:{OpenApi3_1Element:{enter(N){$=new Wx(N,t,"operation-ids")},leave(){const N=YB((_=>it(_.operationId)),w);Object.entries(N).forEach((([_,F])=>{Array.isArray(F)&&(F.length<=1||F.forEach(((U,J)=>{const Y=`${_}${J+1}`;U.operationId=new v.elements.String(Y)})))})),C.forEach((_=>{if(_.operationId===void 0)return;const F=String(it(_.operationId)),U=w.find((J=>it(J.meta.get("originalOperationId"))===F));U!==void 0&&(_.operationId=Ct.safe(U.operationId),_.meta.set("originalOperationId",F),_.set("__originalOperationId",F))})),w.length=0,C.length=0,$=void 0}},PathItemElement:{enter(N){const _=fm("path",it(N.meta.get("path")));x.push(_)},leave(){x.pop()}},OperationElement:{enter(N,_,F,U,J){if(N.operationId===void 0)return;const Y=h([...J,F,N]);if($.includes(Y))return;const W=String(it(N.operationId)),P=JS(x),se=fm("method",it(N.meta.get("http-method"))),ae=n(W,P,se);W!==ae&&(N.operationId=new v.elements.String(ae),N.set("__originalOperationId",W),N.meta.set("originalOperationId",W),w.push(N),$.append(Y))}},LinkElement:{leave(N){l.isLinkElement(N)&&N.operationId!==void 0&&C.push(N)}}}}},wH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h;return{visitor:{OpenApi3_1Element:{enter(v){h=new Wx(v,t,"parameter-examples")},leave(){h=void 0}},ParameterElement:{leave(v,x,w,C,$){var N,_;if($.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((N=v.schema)===null||N===void 0?void 0:N.example)===void 0&&((_=v.schema)===null||_===void 0?void 0:_.examples)===void 0)return;const F=l([...$,w,v]);if(!h.includes(F)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>Ct.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),h.append(F)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),h.append(F)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[Ct(v.example)]),h.append(F)),v.schema.example!==void 0&&(v.schema.set("example",Ct(v.example)),h.append(F)))}}}}}},SH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let h;return{visitor:{OpenApi3_1Element:{enter(v){h=new Wx(v,t,"header-examples")},leave(){h=void 0}},HeaderElement:{leave(v,x,w,C,$){var N,_;if($.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((N=v.schema)===null||N===void 0?void 0:N.example)===void 0&&((_=v.schema)===null||_===void 0?void 0:_.examples)===void 0)return;const F=l([...$,w,v]);if(!h.includes(F)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>Ct.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),h.append(F)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),h.append(F)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[Ct(v.example)]),h.append(F)),v.schema.example!==void 0&&(v.schema.set("example",Ct(v.example)),h.append(F)))}}}}}},EH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof tE||t(l)&&n("callback",l)&&i("object",l))),jH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof nE||t(l)&&n("components",l)&&i("object",l))),CH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof rE||t(l)&&n("contact",l)&&i("object",l))),AH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof sE||t(l)&&n("example",l)&&i("object",l))),OH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof iE||t(l)&&n("externalDocumentation",l)&&i("object",l))),kH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof aE||t(l)&&n("header",l)&&i("object",l))),RH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof oE||t(l)&&n("info",l)&&i("object",l))),aP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof ip||t(l)&&n("jsonSchemaDialect",l)&&i("string",l))),TH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof lE||t(l)&&n("license",l)&&i("object",l))),_H=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof cE||t(l)&&n("link",l)&&i("object",l))),$H=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Gk||t(l)&&n("openapi",l)&&i("string",l))),oP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>h=>h instanceof kd||t(h)&&n("openApi3_1",h)&&i("object",h)&&l("api",h))),lP=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Zx||t(l)&&n("operation",l)&&i("object",l))),NH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof dE||t(l)&&n("parameter",l)&&i("object",l))),op=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Rd||t(l)&&n("pathItem",l)&&i("object",l))),DH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof hE||t(l)&&n("paths",l)&&i("object",l))),lp=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Td||t(l)&&n("reference",l)&&i("object",l))),PH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof pE||t(l)&&n("requestBody",l)&&i("object",l))),MH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof fE||t(l)&&n("response",l)&&i("object",l))),IH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof mE||t(l)&&n("responses",l)&&i("object",l))),au=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof ap||t(l)&&n("schema",l)&&i("object",l))),tR=t=>xx(t)&&t.classes.includes("boolean-json-schema"),LH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof gE||t(l)&&n("securityRequirement",l)&&i("object",l))),zH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof yE||t(l)&&n("securityScheme",l)&&i("object",l))),FH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof vE||t(l)&&n("server",l)&&i("object",l))),qH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof xE||t(l)&&n("serverVariable",l)&&i("object",l))),BH=_t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof uE||t(l)&&n("mediaType",l)&&i("object",l))),UH=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:tR,isCallbackElement:EH,isComponentsElement:jH,isContactElement:CH,isExampleElement:AH,isExternalDocumentationElement:OH,isHeaderElement:kH,isInfoElement:RH,isJsonSchemaDialectElement:aP,isLicenseElement:TH,isLinkElement:_H,isMediaTypeElement:BH,isOpenApi3_1Element:oP,isOpenapiElement:$H,isOperationElement:lP,isParameterElement:NH,isPathItemElement:op,isPathItemElementExternal:t=>{if(!op(t)||!xn(t.$ref))return!1;const n=it(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isPathsElement:DH,isReferenceElement:lp,isReferenceElementExternal:t=>{if(!lp(t)||!xn(t.$ref))return!1;const n=it(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isRequestBodyElement:PH,isResponseElement:MH,isResponsesElement:IH,isSchemaElement:au,isSecurityRequirementElement:LH,isSecuritySchemeElement:zH,isServerElement:FH,isServerVariableElement:qH},Symbol.toStringTag,{value:"Module"})),KH=t=>{const n=t.reduce(((i,l,h)=>{if(zo(l)){const v=String(it(l.key));i.push(v)}else if(Ri(t[h-2])){const v=String(t[h-2].content.indexOf(l));i.push(v)}return i}),[]);return zD(n)},cP=()=>{const t=wx(Zk);return{predicates:{...UH,isElement:es,isStringElement:xn,isArrayElement:Ri,isObjectElement:Un,isMemberElement:zo,isServersElement:ZD,includesClasses:C1,hasElementSourceMap:bx},ancestorLineageToJSONPointer:KH,namespace:t}};class VH extends bt(bn,vt){constructor(n){super(n),this.element=new kd,this.specPath=Wt(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(n){return this.openApiGenericElement=n,bn.prototype.ObjectElement.call(this,n)}}const{visitors:{document:{objects:{Info:{$visitor:HH}}}}}=Ye,{visitors:{document:{objects:{Contact:{$visitor:GH}}}}}=Ye,{visitors:{document:{objects:{License:{$visitor:XH}}}}}=Ye,{visitors:{document:{objects:{Link:{$visitor:YH}}}}}=Ye;class ZH extends bt($i,vt){StringElement(n){const i=new ip(it(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}const{visitors:{document:{objects:{Server:{$visitor:WH}}}}}=Ye,{visitors:{document:{objects:{ServerVariable:{$visitor:JH}}}}}=Ye,{visitors:{document:{objects:{MediaType:{$visitor:QH}}}}}=Ye,{visitors:{document:{objects:{SecurityRequirement:{$visitor:eG}}}}}=Ye,{visitors:{document:{objects:{Components:{$visitor:tG}}}}}=Ye,{visitors:{document:{objects:{Tag:{$visitor:nG}}}}}=Ye,{visitors:{document:{objects:{Reference:{$visitor:rG}}}}}=Ye,{visitors:{document:{objects:{Parameter:{$visitor:sG}}}}}=Ye,{visitors:{document:{objects:{Header:{$visitor:iG}}}}}=Ye;class ou{parent;constructor({parent:n}){this.parent=n}}class aG extends bt(bn,ou,vt){constructor(n){super(n),this.element=new ap,this.specPath=Wt(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=ip.default,this.passingOptionsNames.push("parent")}ObjectElement(n){this.handle$schema(n),this.handle$id(n),this.parent=this.element;const i=bn.prototype.ObjectElement.call(this,n);return xn(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),i}BooleanElement(n){const i=super.enter(n);return this.element.classes.push("boolean-json-schema"),i}getJsonSchemaDialect(){let n;return n=this.openApiSemanticElement!==void 0&&aP(this.openApiSemanticElement.jsonSchemaDialect)?it(this.openApiSemanticElement.jsonSchemaDialect):this.openApiGenericElement!==void 0&&xn(this.openApiGenericElement.get("jsonSchemaDialect"))?it(this.openApiGenericElement.get("jsonSchemaDialect")):it(this.jsonSchemaDefaultDialect),n}handle$schema(n){if(Ed(this.parent)&&!xn(n.get("$schema")))this.element.setMetaProperty("inherited$schema",this.getJsonSchemaDialect());else if(au(this.parent)&&!xn(n.get("$schema"))){const i=fm(it(this.parent.meta.get("inherited$schema")),it(this.parent.$schema));this.element.setMetaProperty("inherited$schema",i)}}handle$id(n){const i=this.parent!==void 0?Ct(this.parent.getMetaProperty("inherited$id",[])):new ur,l=it(n.get("$id"));cO(l)&&i.push(l),this.element.setMetaProperty("inherited$id",i)}}class oG extends bt(un,ou,vt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-$defs"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}let lG=class extends bt($i,ou,vt){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf"),this.passingOptionsNames.push("parent")}ArrayElement(t){return t.forEach((n=>{if(Un(n)){const i=this.toRefractedElement(["document","objects","Schema"],n);this.element.push(i)}else{const i=Ct(n);this.element.push(i)}})),this.copyMetaAndAttributes(t,this.element),Gn}};class cG extends bt($i,ou,vt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-anyOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class uG extends bt($i,ou,vt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-oneOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class dG extends bt(un,ou,vt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class hG extends bt($i,ou,vt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-prefixItems"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Un(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=Ct(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class pG extends bt(un,ou,vt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-properties"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class fG extends bt(un,ou,vt){constructor(n){super(n),this.element=new St,this.element.classes.push("json-schema-patternProperties"),this.specPath=Wt(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}const{visitors:{document:{objects:{Discriminator:{$visitor:mG}}}}}=Ye,{visitors:{document:{objects:{XML:{$visitor:gG}}}}}=Ye;class yG extends bt(un,vt){constructor(n){super(n),this.element=new Y1,this.specPath=Wt(["document","objects","Schema"])}}class vG extends bt(un,vt){constructor(n){super(n),this.element=new Wk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(lp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),i}}const{visitors:{document:{objects:{Example:{$visitor:xG}}}}}=Ye,{visitors:{document:{objects:{ExternalDocumentation:{$visitor:bG}}}}}=Ye,{visitors:{document:{objects:{Encoding:{$visitor:wG}}}}}=Ye,{visitors:{document:{objects:{Paths:{$visitor:SG}}}}}=Ye,{visitors:{document:{objects:{RequestBody:{$visitor:EG}}}}}=Ye,{visitors:{document:{objects:{Callback:{$visitor:uP}}}}}=Ye,{visitors:{document:{objects:{Response:{$visitor:jG}}}}}=Ye,{visitors:{document:{objects:{Responses:{$visitor:CG}}}}}=Ye,{visitors:{document:{objects:{Operation:{$visitor:AG}}}}}=Ye,{visitors:{document:{objects:{PathItem:{$visitor:OG}}}}}=Ye,{visitors:{document:{objects:{SecurityScheme:{$visitor:kG}}}}}=Ye,{visitors:{document:{objects:{OAuthFlows:{$visitor:RG}}}}}=Ye,{visitors:{document:{objects:{OAuthFlow:{$visitor:TG}}}}}=Ye;class _G extends bt(un,vt){constructor(n){super(n),this.element=new Jk,this.specPath=i=>wr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(lp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),this.element.filter(op).forEach(((l,h)=>{l.setMetaProperty("webhook-name",it(h))})),i}}const $G={visitors:{value:Ye.visitors.value,document:{objects:{OpenApi:{$visitor:VH,fixedFields:{openapi:Ye.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:ZH,servers:Ye.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:_G,components:{$ref:"#/visitors/document/objects/Components"},security:Ye.visitors.document.objects.OpenApi.fixedFields.security,tags:Ye.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:class extends HH{constructor(t){super(t),this.element=new oE}},fixedFields:{title:Ye.visitors.document.objects.Info.fixedFields.title,description:Ye.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:Ye.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Ye.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:class extends GH{constructor(t){super(t),this.element=new rE}},fixedFields:{name:Ye.visitors.document.objects.Contact.fixedFields.name,url:Ye.visitors.document.objects.Contact.fixedFields.url,email:Ye.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:class extends XH{constructor(t){super(t),this.element=new lE}},fixedFields:{name:Ye.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:Ye.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:class extends WH{constructor(t){super(t),this.element=new vE}},fixedFields:{url:Ye.visitors.document.objects.Server.fixedFields.url,description:Ye.visitors.document.objects.Server.fixedFields.description,variables:Ye.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:class extends JH{constructor(t){super(t),this.element=new xE}},fixedFields:{enum:Ye.visitors.document.objects.ServerVariable.fixedFields.enum,default:Ye.visitors.document.objects.ServerVariable.fixedFields.default,description:Ye.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:class extends tG{constructor(t){super(t),this.element=new nE}},fixedFields:{schemas:yG,responses:Ye.visitors.document.objects.Components.fixedFields.responses,parameters:Ye.visitors.document.objects.Components.fixedFields.parameters,examples:Ye.visitors.document.objects.Components.fixedFields.examples,requestBodies:Ye.visitors.document.objects.Components.fixedFields.requestBodies,headers:Ye.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Ye.visitors.document.objects.Components.fixedFields.securitySchemes,links:Ye.visitors.document.objects.Components.fixedFields.links,callbacks:Ye.visitors.document.objects.Components.fixedFields.callbacks,pathItems:vG}},Paths:{$visitor:class extends SG{constructor(t){super(t),this.element=new hE}}},PathItem:{$visitor:class extends OG{constructor(t){super(t),this.element=new Rd}},fixedFields:{$ref:Ye.visitors.document.objects.PathItem.fixedFields.$ref,summary:Ye.visitors.document.objects.PathItem.fixedFields.summary,description:Ye.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:Ye.visitors.document.objects.PathItem.fixedFields.servers,parameters:Ye.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:class extends AG{constructor(t){super(t),this.element=new Zx}},fixedFields:{tags:Ye.visitors.document.objects.Operation.fixedFields.tags,summary:Ye.visitors.document.objects.Operation.fixedFields.summary,description:Ye.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:Ye.visitors.document.objects.Operation.fixedFields.operationId,parameters:Ye.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Ye.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:Ye.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Ye.visitors.document.objects.Operation.fixedFields.deprecated,security:Ye.visitors.document.objects.Operation.fixedFields.security,servers:Ye.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:class extends bG{constructor(t){super(t),this.element=new iE}},fixedFields:{description:Ye.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Ye.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:class extends sG{constructor(t){super(t),this.element=new dE}},fixedFields:{name:Ye.visitors.document.objects.Parameter.fixedFields.name,in:Ye.visitors.document.objects.Parameter.fixedFields.in,description:Ye.visitors.document.objects.Parameter.fixedFields.description,required:Ye.visitors.document.objects.Parameter.fixedFields.required,deprecated:Ye.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Ye.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Ye.visitors.document.objects.Parameter.fixedFields.style,explode:Ye.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.Parameter.fixedFields.example,examples:Ye.visitors.document.objects.Parameter.fixedFields.examples,content:Ye.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:class extends EG{constructor(t){super(t),this.element=new pE}},fixedFields:{description:Ye.visitors.document.objects.RequestBody.fixedFields.description,content:Ye.visitors.document.objects.RequestBody.fixedFields.content,required:Ye.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:class extends QH{constructor(t){super(t),this.element=new uE}},fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.MediaType.fixedFields.example,examples:Ye.visitors.document.objects.MediaType.fixedFields.examples,encoding:Ye.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:class extends wG{constructor(t){super(t),this.element=new Kk}},fixedFields:{contentType:Ye.visitors.document.objects.Encoding.fixedFields.contentType,headers:Ye.visitors.document.objects.Encoding.fixedFields.headers,style:Ye.visitors.document.objects.Encoding.fixedFields.style,explode:Ye.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:class extends CG{constructor(t){super(t),this.element=new mE}},fixedFields:{default:Ye.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:class extends jG{constructor(t){super(t),this.element=new fE}},fixedFields:{description:Ye.visitors.document.objects.Response.fixedFields.description,headers:Ye.visitors.document.objects.Response.fixedFields.headers,content:Ye.visitors.document.objects.Response.fixedFields.content,links:Ye.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:class extends uP{constructor(t){super(t),this.element=new tE,this.specPath=n=>wr(n)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(t){const n=uP.prototype.ObjectElement.call(this,t);return this.element.filter(lp).forEach((i=>{i.setMetaProperty("referenced-element","pathItem")})),n}}},Example:{$visitor:class extends xG{constructor(t){super(t),this.element=new sE}},fixedFields:{summary:Ye.visitors.document.objects.Example.fixedFields.summary,description:Ye.visitors.document.objects.Example.fixedFields.description,value:Ye.visitors.document.objects.Example.fixedFields.value,externalValue:Ye.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:class extends YH{constructor(t){super(t),this.element=new cE}},fixedFields:{operationRef:Ye.visitors.document.objects.Link.fixedFields.operationRef,operationId:Ye.visitors.document.objects.Link.fixedFields.operationId,parameters:Ye.visitors.document.objects.Link.fixedFields.parameters,requestBody:Ye.visitors.document.objects.Link.fixedFields.requestBody,description:Ye.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:class extends iG{constructor(t){super(t),this.element=new aE}},fixedFields:{description:Ye.visitors.document.objects.Header.fixedFields.description,required:Ye.visitors.document.objects.Header.fixedFields.required,deprecated:Ye.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Ye.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Ye.visitors.document.objects.Header.fixedFields.style,explode:Ye.visitors.document.objects.Header.fixedFields.explode,allowReserved:Ye.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ye.visitors.document.objects.Header.fixedFields.example,examples:Ye.visitors.document.objects.Header.fixedFields.examples,content:Ye.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:class extends nG{constructor(t){super(t),this.element=new Xk}},fixedFields:{name:Ye.visitors.document.objects.Tag.fixedFields.name,description:Ye.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:class extends rG{constructor(t){super(t),this.element=new Td}},fixedFields:{$ref:Ye.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Schema:{$visitor:aG,fixedFields:{$schema:{$ref:"#/visitors/value"},$vocabulary:class extends vt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-$vocabulary"),n}},$id:{$ref:"#/visitors/value"},$anchor:{$ref:"#/visitors/value"},$dynamicAnchor:{$ref:"#/visitors/value"},$dynamicRef:{$ref:"#/visitors/value"},$ref:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},$defs:oG,$comment:{$ref:"#/visitors/value"},allOf:lG,anyOf:cG,oneOf:uG,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:dG,prefixItems:hG,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:pG,patternProperties:fG,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:class extends vt{StringElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}},enum:class extends vt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-enum"),n}},const:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxContains:{$ref:"#/visitors/value"},minContains:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},dependentRequired:class extends vt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-dependentRequired"),n}},title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},readOnly:{$ref:"#/visitors/value"},writeOnly:{$ref:"#/visitors/value"},examples:class extends vt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-examples"),n}},format:{$ref:"#/visitors/value"},contentEncoding:{$ref:"#/visitors/value"},contentMediaType:{$ref:"#/visitors/value"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:class extends mG{constructor(t){super(t),this.element=new Uk,this.canSupportSpecificationExtensions=!0}},fixedFields:{propertyName:Ye.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Ye.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:class extends gG{constructor(t){super(t),this.element=new Yk}},fixedFields:{name:Ye.visitors.document.objects.XML.fixedFields.name,namespace:Ye.visitors.document.objects.XML.fixedFields.namespace,prefix:Ye.visitors.document.objects.XML.fixedFields.prefix,attribute:Ye.visitors.document.objects.XML.fixedFields.attribute,wrapped:Ye.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:class extends kG{constructor(t){super(t),this.element=new yE}},fixedFields:{type:Ye.visitors.document.objects.SecurityScheme.fixedFields.type,description:Ye.visitors.document.objects.SecurityScheme.fixedFields.description,name:Ye.visitors.document.objects.SecurityScheme.fixedFields.name,in:Ye.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Ye.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Ye.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Ye.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:class extends RG{constructor(t){super(t),this.element=new Hk}},fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:class extends TG{constructor(t){super(t),this.element=new Vk}},fixedFields:{authorizationUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Ye.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Ye.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:class extends eG{constructor(t){super(t),this.element=new gE}}}},extension:{$visitor:Ye.visitors.document.extension.$visitor}}}},Yn=t=>(n,i={})=>((l,{specPath:h=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=LO(l),w=R1($G),C=new(ra(h,w))({specObj:w});return fi(x,C),km(C.element,v,{toolboxCreator:cP,visitorOptions:{keyMap:Xl,nodeTypeGetter:qo}})})(n,{specPath:t,...i});tE.refract=Yn(["visitors","document","objects","Callback","$visitor"]),nE.refract=Yn(["visitors","document","objects","Components","$visitor"]),rE.refract=Yn(["visitors","document","objects","Contact","$visitor"]),sE.refract=Yn(["visitors","document","objects","Example","$visitor"]),Uk.refract=Yn(["visitors","document","objects","Discriminator","$visitor"]),Kk.refract=Yn(["visitors","document","objects","Encoding","$visitor"]),iE.refract=Yn(["visitors","document","objects","ExternalDocumentation","$visitor"]),aE.refract=Yn(["visitors","document","objects","Header","$visitor"]),oE.refract=Yn(["visitors","document","objects","Info","$visitor"]),ip.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),lE.refract=Yn(["visitors","document","objects","License","$visitor"]),cE.refract=Yn(["visitors","document","objects","Link","$visitor"]),uE.refract=Yn(["visitors","document","objects","MediaType","$visitor"]),Vk.refract=Yn(["visitors","document","objects","OAuthFlow","$visitor"]),Hk.refract=Yn(["visitors","document","objects","OAuthFlows","$visitor"]),Gk.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","openapi"]),kd.refract=Yn(["visitors","document","objects","OpenApi","$visitor"]),Zx.refract=Yn(["visitors","document","objects","Operation","$visitor"]),dE.refract=Yn(["visitors","document","objects","Parameter","$visitor"]),Rd.refract=Yn(["visitors","document","objects","PathItem","$visitor"]),hE.refract=Yn(["visitors","document","objects","Paths","$visitor"]),Td.refract=Yn(["visitors","document","objects","Reference","$visitor"]),pE.refract=Yn(["visitors","document","objects","RequestBody","$visitor"]),fE.refract=Yn(["visitors","document","objects","Response","$visitor"]),mE.refract=Yn(["visitors","document","objects","Responses","$visitor"]),ap.refract=Yn(["visitors","document","objects","Schema","$visitor"]),gE.refract=Yn(["visitors","document","objects","SecurityRequirement","$visitor"]),yE.refract=Yn(["visitors","document","objects","SecurityScheme","$visitor"]),vE.refract=Yn(["visitors","document","objects","Server","$visitor"]),xE.refract=Yn(["visitors","document","objects","ServerVariable","$visitor"]),Xk.refract=Yn(["visitors","document","objects","Tag","$visitor"]),Yk.refract=Yn(["visitors","document","objects","XML","$visitor"]);class NG extends Ex{constructor(n){super({...n??{},name:"binary"})}canParse(n){return this.fileExtensions.length===0||this.fileExtensions.includes(n.extension)}parse(n){try{const i=unescape(encodeURIComponent(n.toString())),l=btoa(i),h=new Lo;if(l.length!==0){const v=new Jc(l);v.classes.push("result"),h.push(v)}return h}catch(i){throw new nu(`Error parsing "${n.uri}"`,{cause:i})}}}class DG extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canResolve(n,i){const l=i.dereference.strategies.find((h=>h.name==="openapi-3-1"));return l!==void 0&&l.canDereference(n,i)}async resolve(n,i){const l=i.dereference.strategies.find((x=>x.name==="openapi-3-1"));if(l===void 0)throw new dD('"openapi-3-1" dereference strategy is not available.');const h=new ym,v=W$(i,{resolve:{internal:!1},dereference:{refSet:h}});return await l.dereference(n,v),h}}const{AbortController:PG,AbortSignal:MG}=globalThis;globalThis.AbortController===void 0&&(globalThis.AbortController=PG),globalThis.AbortSignal===void 0&&(globalThis.AbortSignal=MG);class dP extends class extends class{name;constructor({name:n}){this.name=n}}{timeout;redirects;withCredentials;constructor(n){const{name:i="http-resolver",timeout:l=5e3,redirects:h=5,withCredentials:v=!1}=n??{};super({name:i}),this.timeout=l,this.redirects=h,this.withCredentials=v}canRead(n){return a1(n.uri)}}{swaggerHTTPClient=ni;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:n=ni,swaggerHTTPClientConfig:i={},...l}={}){super({...l,name:"http-swagger-client"}),this.swaggerHTTPClient=n,this.swaggerHTTPClientConfig=i}getHttpClient(){return this.swaggerHTTPClient}async read(n){const i=this.getHttpClient(),l=new AbortController,{signal:h}=l,v=setTimeout((()=>{l.abort()}),this.timeout),x=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",w=this.redirects===0?"error":"follow",C=this.redirects>0?this.redirects:void 0;try{return(await i({url:n.uri,signal:h,userFetch:async($,N)=>{let _=await fetch($,N);try{_.headers.delete("Content-Type")}catch{_=new Response(_.body,{..._,headers:new Headers(_.headers)}),_.headers.delete("Content-Type")}return _},credentials:x,redirect:w,follow:C,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch($){throw new J$(`Error downloading "${n.uri}"`,{cause:$})}finally{clearTimeout(v)}}}class hP extends Ex{constructor(n={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return JSON.parse(n.toString()),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("json-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const h=uD(JSON.parse(l));return h.classes.push("result"),i.push(h),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class pP extends Ex{constructor(n={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return qu.load(n.toString(),{schema:xc}),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();try{const h=qu.load(l,{schema:xc});if(this.allowEmpty&&h===void 0)return i;const v=uD(h);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class fP extends Ex{detectionRegExp=/"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))"/;constructor(n={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new lk(...Nm.filterByFormat("generic"),...Nm.filterByFormat("json")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const h=n.toString();return JSON.parse(h),this.detectionRegExp.test(h)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const h=JSON.parse(l),v=kd.refract(h,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}class mP extends Ex{detectionRegExp=/(?<YAML>^(["']?)openapi\2\s*:\s*(["']?)(?<version_yaml>3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(?<JSON>"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))")/m;constructor(n={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new lk(...Nm.filterByFormat("generic"),...Nm.filterByFormat("yaml")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const h=n.toString();return qu.load(h),this.detectionRegExp.test(h)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new nu("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new Lo,l=n.toString();try{const h=qu.load(l,{schema:xc});if(this.allowEmpty&&h===void 0)return i;const v=kd.refract(h,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(h){throw new nu(`Error parsing "${n.uri}"`,{cause:h})}}}const bE=t=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(t),zm=t=>{const n=yO(t);return dO("#",n)},nR=(t,n)=>{const i=(h=>{if(!bE(h))throw new HV(h);return h})(t),l=aD((h=>au(h)&&it(h.$anchor)===i),n);if(Ed(l))throw new KV(`Evaluation failed on token: "${i}"`);return l},gP=(t,n)=>{if(n.$ref===void 0)return;const i=yO(it(n.$ref)),l=it(n.meta.get("inherited$id"));return`${Yh(((h,v)=>$s(h,hx(cr(v)))),t,[...l,it(n.$ref)])}${i==="#"?"":i}`},Jx=t=>{if(Jx.cache.has(t))return Jx.cache.get(t);const n=ap.refract(t);return Jx.cache.set(t,n),n};Jx.cache=new WeakMap;const mi=t=>rp(t)?Jx(t):t,wE=(t,n)=>{const{cache:i}=wE,l=cr(t),h=C=>au(C)&&C.$id!==void 0;if(!i.has(n)){const C=(($,N)=>{const _=new rD({predicate:$});return fi(N,_),new yx(_.result)})(h,n);i.set(n,Array.from(C))}const v=i.get(n).find((C=>((N,_)=>{if(_.$id===void 0)return;const F=it(_.meta.get("inherited$id"));return Yh(((U,J)=>$s(U,hx(cr(J)))),N,[...F,it(_.$id)])})(l,C)===l));if(Ed(v))throw new HO(`Evaluation failed on URI: "${t}"`);let x,w;return bE(zm(t))?(x=nR,w=zm(t)):(x=Fo,w=Ja(t)),x(w,v)};wE.cache=new WeakMap;const rR=fi[Symbol.for("nodejs.util.promisify.custom")],qs=new UO,Yl=(t,n,i,l)=>{zo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class Fm{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:n,namespace:i,options:l,indirections:h=[],ancestors:v=new VO,refractCache:x=new Map}){this.indirections=h,this.namespace=i,this.reference=n,this.options=l,this.ancestors=new VO(...v),this.refractCache=x}toBaseURI(n){return $s(this.reference.uri,hx(cr(n)))}async toReference(n){if(this.reference.depth>=this.options.resolve.maxDepth)throw new GV(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const i=this.toBaseURI(n),{refSet:l}=this.reference;if(l.has(i))return l.find(D$(i,"uri"));const h=await(async(x,w)=>{const C=new px({uri:hx(cr(x)),mediaType:w.parse.mediaType}),$=await(async(N,_)=>{const F=_.resolve.resolvers.map((J=>{const Y=Object.create(J);return Object.assign(Y,_.resolve.resolverOpts)})),U=await vO("canRead",[N,_],F);if(ux(U))throw new Q$(N.uri);try{const{result:J}=await xO("read",[N],U);return J}catch(J){throw new wO(`Error while reading file "${N.uri}"`,{cause:J})}})(C,w);return(async(N,_)=>{const F=_.parse.parsers.map((J=>{const Y=Object.create(J);return Object.assign(Y,_.parse.parserOpts)})),U=await vO("canParse",[N,_],F);if(ux(U))throw new Q$(N.uri);try{const{plugin:J,result:Y}=await xO("parse",[N,_],U);return!J.allowEmpty&&Y.isEmpty?Promise.reject(new bO(`Error while parsing file "${N.uri}". File is empty.`)):Y}catch(J){throw new bO(`Error while parsing file "${N.uri}"`,{cause:J})}})(new px({...C,data:$}),w)})(Io(i),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),v=new tu({uri:i,value:Ct(h),depth:this.reference.depth+1});if(l.add(v),this.options.dereference.immutable){const x=new tu({uri:`immutable://${i}`,value:h,depth:this.reference.depth+1});l.add(x)}return v}toAncestorLineage(n){const i=new Set(n.filter(es));return[new VO(...this.ancestors,i),i]}async ReferenceElement(n,i,l,h,v,x){if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]),$=this.toBaseURI(it(n.$ref)),N=cr(this.reference.uri)===$,_=!N;if(!this.options.resolve.internal&&N||!this.options.resolve.external&&_)return!1;const F=await this.toReference(it(n.$ref)),U=$s($,it(n.$ref));this.indirections.push(n);const J=Ja(U);let Y=Fo(J,F.value.result);if(Y.id=qs.identify(Y),rp(Y)){const ge=it(n.meta.get("referenced-element")),pe=`${ge}-${it(qs.identify(Y))}`;this.refractCache.has(pe)?Y=this.refractCache.get(pe):wr(Y)?(Y=Td.refract(Y),Y.setMetaProperty("referenced-element",ge),this.refractCache.set(pe,Y)):(Y=this.namespace.getElementClass(ge).refract(Y),this.refractCache.set(pe,Y))}if(n===Y)throw new br("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(Y)){if(F.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var W,P;const ge=new eu(Y.id,{type:"reference",uri:F.uri,$ref:it(n.$ref)}),pe=((W=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&W!==void 0?W:this.options.dereference.circularReplacer)(ge);return x.replaceWith(pe,Yl),!l&&pe}}const se=cr(F.refSet.rootRef.uri)!==F.uri,ae=["error","replace"].includes(this.options.dereference.circular);if((_||se||lp(Y)||ae)&&!w.includesCycle(Y)){C.add(n);const ge=new Fm({reference:F,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});Y=await rR(Y,ge,{keyMap:Xl,nodeTypeGetter:qo}),C.delete(n)}this.indirections.pop();const he=Ti(Y);return he.setMetaProperty("id",qs.generateId()),he.setMetaProperty("ref-fields",{$ref:it(n.$ref),description:it(n.description),summary:it(n.summary)}),he.setMetaProperty("ref-origin",F.uri),he.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),Un(Y)&&Un(he)&&(n.hasKey("description")&&"description"in Y&&(he.remove("description"),he.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in Y&&(he.remove("summary"),he.set("summary",n.get("summary")))),x.replaceWith(he,Yl),!l&&he}async PathItemElement(n,i,l,h,v,x){if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]),$=this.toBaseURI(it(n.$ref)),N=cr(this.reference.uri)===$,_=!N;if(!this.options.resolve.internal&&N||!this.options.resolve.external&&_)return;const F=await this.toReference(it(n.$ref)),U=$s($,it(n.$ref));this.indirections.push(n);const J=Ja(U);let Y=Fo(J,F.value.result);if(Y.id=qs.identify(Y),rp(Y)){const he=`path-item-${it(qs.identify(Y))}`;this.refractCache.has(he)?Y=this.refractCache.get(he):(Y=Rd.refract(Y),this.refractCache.set(he,Y))}if(n===Y)throw new br("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(Y)){if(F.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var W,P;const he=new eu(Y.id,{type:"path-item",uri:F.uri,$ref:it(n.$ref)}),ge=((W=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&W!==void 0?W:this.options.dereference.circularReplacer)(he);return x.replaceWith(ge,Yl),!l&&ge}}const se=cr(F.refSet.rootRef.uri)!==F.uri,ae=["error","replace"].includes(this.options.dereference.circular);if((_||se||op(Y)&&xn(Y.$ref)||ae)&&!w.includesCycle(Y)){C.add(n);const he=new Fm({reference:F,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});Y=await rR(Y,he,{keyMap:Xl,nodeTypeGetter:qo}),C.delete(n)}if(this.indirections.pop(),op(Y)){const he=new Rd([...Y.content],Ct(Y.meta),Ct(Y.attributes));he.setMetaProperty("id",qs.generateId()),n.forEach(((ge,pe,Te)=>{he.remove(it(pe)),he.content.push(Te)})),he.remove("$ref"),he.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),he.setMetaProperty("ref-origin",F.uri),he.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),Y=he}return x.replaceWith(Y,Yl),l?void 0:Y}async LinkElement(n,i,l,h,v,x){if(!xn(n.operationRef)&&!xn(n.operationId))return;if(xn(n.operationRef)&&xn(n.operationId))throw new br("LinkElement operationRef and operationId fields are mutually exclusive.");let w;if(xn(n.operationRef)){var C;const N=Ja(it(n.operationRef)),_=this.toBaseURI(it(n.operationRef)),F=cr(this.reference.uri)===_,U=!F;if(!this.options.resolve.internal&&F||!this.options.resolve.external&&U)return;const J=await this.toReference(it(n.operationRef));if(w=Fo(N,J.value.result),rp(w)){const W=`operation-${it(qs.identify(w))}`;this.refractCache.has(W)?w=this.refractCache.get(W):(w=Zx.refract(w),this.refractCache.set(W,w))}w=Ti(w),w.setMetaProperty("ref-origin",J.uri);const Y=Ti(n);return(C=Y.operationRef)===null||C===void 0||C.meta.set("operation",w),x.replaceWith(Y,Yl),l?void 0:Y}if(xn(n.operationId)){var $;const N=it(n.operationId),_=await this.toReference(Io(this.reference.uri));if(w=aD((U=>lP(U)&&es(U.operationId)&&U.operationId.equals(N)),_.value.result),Ed(w))throw new br(`OperationElement(operationId=${N}) not found.`);const F=Ti(n);return($=F.operationId)===null||$===void 0||$.meta.set("operation",w),x.replaceWith(F,Yl),l?void 0:F}}async ExampleElement(n,i,l,h,v,x){if(!xn(n.externalValue))return;if(n.hasKey("value")&&xn(n.externalValue))throw new br("ExampleElement value and externalValue fields are mutually exclusive.");const w=this.toBaseURI(it(n.externalValue)),C=cr(this.reference.uri)===w,$=!C;if(!this.options.resolve.internal&&C||!this.options.resolve.external&&$)return;const N=await this.toReference(it(n.externalValue)),_=Ti(N.value.result);_.setMetaProperty("ref-origin",N.uri);const F=Ti(n);return F.value=_,x.replaceWith(F,Yl),l?void 0:F}async SchemaElement(n,i,l,h,v,x){if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[w,C]=this.toAncestorLineage([...v,l]);let $=await this.toReference(Io(this.reference.uri)),{uri:N}=$;const _=gP(N,n),F=cr(_),U=new px({uri:F}),J=rU((Te=>Te.canRead(U)),this.options.resolve.resolvers),Y=!J;let W,P=cr(this.reference.uri)===_,se=!P;this.indirections.push(n);try{if(J||Y){N=this.toBaseURI(_);const Te=_,Ae=mi($.value.result);if(W=wE(Te,Ae),W=mi(W),W.id=qs.identify(W),!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return}else{if(N=this.toBaseURI(_),P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(Io(_));const Te=Ja(_),Ae=mi($.value.result);W=Fo(Te,Ae),W=mi(W),W.id=qs.identify(W)}}catch(Te){if(!(Y&&Te instanceof HO))throw Te;if(bE(zm(_))){if(P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(Io(_));const Ae=zm(_),qe=mi($.value.result);W=nR(Ae,qe),W=mi(W),W.id=qs.identify(W)}else{if(N=this.toBaseURI(_),P=cr(this.reference.uri)===N,se=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&se)return;$=await this.toReference(Io(_));const Ae=Ja(_),qe=mi($.value.result);W=Fo(Ae,qe),W=mi(W),W.id=qs.identify(W)}}if(n===W)throw new br("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(w.includes(W)){if($.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var ae,he;const Te=new eu(W.id,{type:"json-schema",uri:$.uri,$ref:it(n.$ref)}),Ae=((ae=(he=this.options.dereference.strategyOpts["openapi-3-1"])===null||he===void 0?void 0:he.circularReplacer)!==null&&ae!==void 0?ae:this.options.dereference.circularReplacer)(Te);return x.replaceWith(Ae,Yl),!l&&Ae}}const ge=cr($.refSet.rootRef.uri)!==$.uri,pe=["error","replace"].includes(this.options.dereference.circular);if((se||ge||au(W)&&xn(W.$ref)||pe)&&!w.includesCycle(W)){C.add(n);const Te=new Fm({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});W=await rR(W,Te,{keyMap:Xl,nodeTypeGetter:qo}),C.delete(n)}if(this.indirections.pop(),tR(W)){const Te=Ct(W);return Te.setMetaProperty("id",qs.generateId()),Te.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Te.setMetaProperty("ref-origin",$.uri),Te.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),x.replaceWith(Te,Yl),!l&&Te}if(au(W)){const Te=new ap([...W.content],Ct(W.meta),Ct(W.attributes));Te.setMetaProperty("id",qs.generateId()),n.forEach(((Ae,qe,Se)=>{Te.remove(it(qe)),Te.content.push(Se)})),Te.remove("$ref"),Te.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Te.setMetaProperty("ref-origin",$.uri),Te.setMetaProperty("ref-referencing-element-id",Ct(qs.identify(n))),W=Te}return x.replaceWith(W,Yl),l?void 0:W}}const IG=fi[Symbol.for("nodejs.util.promisify.custom")],Bo=t=>{const n=(i=>i.slice(2))(t);return n.reduce(((i,l,h)=>{if(zo(l)){const v=String(it(l.key));i.push(v)}else if(Ri(n[h-2])){const v=n[h-2].content.indexOf(l);i.push(v)}return i}),[])};class LG{modelPropertyMacro;options;SchemaElement={leave:(n,i,l,h,v)=>{n.properties!==void 0&&Un(n.properties)&&n.properties.forEach((x=>{if(Un(x))try{const $=this.modelPropertyMacro(it(x));x.set("default",$)}catch($){var w,C;const N=new Error($,{cause:$});N.fullPath=[...Bo([...v,l,n]),"properties"],(w=this.options.dereference.dereferenceOpts)===null||w===void 0||(w=w.errors)===null||w===void 0||(C=w.push)===null||C===void 0||C.call(w,N)}}))}};constructor({modelPropertyMacro:n,options:i}){this.modelPropertyMacro=n,this.options=i}}class zG{options;SchemaElement={leave(n,i,l,h,v){if(n.allOf!==void 0){if(!Ri(n.allOf)){var x,w;const N=new TypeError("allOf must be an array");return N.fullPath=[...Bo([...v,l,n]),"allOf"],void((x=this.options.dereference.dereferenceOpts)===null||x===void 0||(x=x.errors)===null||x===void 0||(w=x.push)===null||w===void 0||w.call(x,N))}if(n.allOf.isEmpty)n.remove("allOf");else{if(!n.allOf.content.every(au)){var C,$;const N=new TypeError("Elements in allOf must be objects");return N.fullPath=[...Bo([...v,l,n]),"allOf"],void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,N))}for(;n.hasKey("allOf");){const{allOf:N}=n;n.remove("allOf");const _=Ul.all([...N.content,n]);if(n.hasKey("$$ref")||_.remove("$$ref"),n.hasKey("example")){const F=_.getMember("example");F&&(F.value=n.get("example"))}if(n.hasKey("examples")){const F=_.getMember("examples");F&&(F.value=n.get("examples"))}n.content=_.content}}}}};constructor({options:n}){this.options=n}}class FG{parameterMacro;options;#e;OperationElement={enter:n=>{this.#e=n},leave:()=>{this.#e=void 0}};ParameterElement={leave:(n,i,l,h,v)=>{const x=this.#e?it(this.#e):null,w=it(n);try{const N=this.parameterMacro(x,w);n.set("default",N)}catch(N){var C,$;const _=new Error(N,{cause:N});_.fullPath=Bo([...v,l]),(C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,_)}}};constructor({parameterMacro:n,options:i}){this.parameterMacro=n,this.options=i}}const SE=t=>{if(t.cause==null)return t;let{cause:n}=t;for(;n.cause!=null;)n=n.cause;return n};class qG extends Oa{}const{wrapError:sR}=ZO,iR=fi[Symbol.for("nodejs.util.promisify.custom")],Qa=new UO,cp=(t,n,i,l)=>{zo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class Qx extends Fm{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:n=!0,useCircularStructures:i=!1,basePath:l=null,...h}){super(h),this.allowMetaPatches=n,this.useCircularStructures=i,this.basePath=l}async ReferenceElement(n,i,l,h,v,x){try{if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(it(n.$ref)),W=cr(this.reference.uri)===Y,P=!W;if(!this.options.resolve.internal&&W||!this.options.resolve.external&&P)return!1;const se=await this.toReference(it(n.$ref)),ae=$s(Y,it(n.$ref));this.indirections.push(n);const he=Ja(ae);let ge=Fo(he,se.value.result);if(ge.id=Qa.identify(ge),rp(ge)){const qe=it(n.meta.get("referenced-element")),Se=`${qe}-${it(Qa.identify(ge))}`;this.refractCache.has(Se)?ge=this.refractCache.get(Se):wr(ge)?(ge=Td.refract(ge),ge.setMetaProperty("referenced-element",qe),this.refractCache.set(Se,ge)):(ge=this.namespace.getElementClass(qe).refract(ge),this.refractCache.set(Se,ge))}if(n===ge)throw new br("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(ge)){if(se.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const qe=new eu(ge.id,{type:"reference",uri:se.uri,$ref:it(n.$ref),baseURI:ae,referencingElement:n}),Se=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(qe);return x.replaceWith(qe,cp),!l&&Se}}const pe=cr(se.refSet.rootRef.uri)!==se.uri,Te=["error","replace"].includes(this.options.dereference.circular);if((P||pe||lp(ge)||Te)&&!U.includesCycle(ge)){var $;J.add(n);const qe=new Qx({reference:se,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Bo([...v,l,n]),"$ref"]});ge=await iR(ge,qe,{keyMap:Xl,nodeTypeGetter:qo}),J.delete(n)}this.indirections.pop();const Ae=Ti(ge);if(Ae.setMetaProperty("ref-fields",{$ref:it(n.$ref),description:it(n.description),summary:it(n.summary)}),Ae.setMetaProperty("ref-origin",se.uri),Ae.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),Un(ge)&&(n.hasKey("description")&&"description"in ge&&(Ae.remove("description"),Ae.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in ge&&(Ae.remove("summary"),Ae.set("summary",n.get("summary")))),this.allowMetaPatches&&Un(Ae)&&!Ae.hasKey("$$ref")){const qe=$s(Y,ae);Ae.set("$$ref",qe)}return x.replaceWith(Ae,cp),!l&&Ae}catch(U){var N,_,F;const J=SE(U),Y=sR(J,{baseDoc:this.reference.uri,$ref:it(n.$ref),pointer:Ja(it(n.$ref)),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Bo([...v,l,n]),"$ref"]});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async PathItemElement(n,i,l,h,v,x){try{if(!xn(n.$ref))return;if(this.indirections.includes(n)||C1(["cycle"],n.$ref))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(it(n.$ref)),W=cr(this.reference.uri)===Y,P=!W;if(!this.options.resolve.internal&&W||!this.options.resolve.external&&P)return;const se=await this.toReference(it(n.$ref)),ae=$s(Y,it(n.$ref));this.indirections.push(n);const he=Ja(ae);let ge=Fo(he,se.value.result);if(ge.id=Qa.identify(ge),rp(ge)){const Ae=`path-item-${it(Qa.identify(ge))}`;this.refractCache.has(Ae)?ge=this.refractCache.get(Ae):(ge=Rd.refract(ge),this.refractCache.set(Ae,ge))}if(n===ge)throw new br("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(ge)){if(se.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const Ae=new eu(ge.id,{type:"path-item",uri:se.uri,$ref:it(n.$ref),baseURI:ae,referencingElement:n}),qe=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(Ae);return x.replaceWith(Ae,cp),!l&&qe}}const pe=cr(se.refSet.rootRef.uri)!==se.uri,Te=["error","replace"].includes(this.options.dereference.circular);if((P||pe||op(ge)&&xn(ge.$ref)||Te)&&!U.includesCycle(ge)){var $;J.add(n);const Ae=new Qx({reference:se,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Bo([...v,l,n]),"$ref"]});ge=await iR(ge,Ae,{keyMap:Xl,nodeTypeGetter:qo}),J.delete(n)}if(this.indirections.pop(),op(ge)){const Ae=new Rd([...ge.content],Ct(ge.meta),Ct(ge.attributes));if(n.forEach(((qe,Se,me)=>{Ae.remove(it(Se)),Ae.content.push(me)})),Ae.remove("$ref"),Ae.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),Ae.setMetaProperty("ref-origin",se.uri),Ae.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),this.allowMetaPatches&&Ae.get("$$ref")===void 0){const qe=$s(Y,ae);Ae.set("$$ref",qe)}ge=Ae}return x.replaceWith(ge,cp),l?void 0:ge}catch(U){var N,_,F;const J=SE(U),Y=sR(J,{baseDoc:this.reference.uri,$ref:it(n.$ref),pointer:Ja(it(n.$ref)),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Bo([...v,l,n]),"$ref"]});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async SchemaElement(n,i,l,h,v,x){try{if(!xn(n.$ref))return;if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]);let Y=await this.toReference(Io(this.reference.uri)),{uri:W}=Y;const P=gP(W,n),se=cr(P),ae=new px({uri:se}),he=!this.options.resolve.resolvers.some((me=>me.canRead(ae))),ge=!he;let pe,Te=cr(this.reference.uri)===P,Ae=!Te;this.indirections.push(n);try{if(he||ge){W=this.toBaseURI(P);const me=P,Me=mi(Y.value.result);if(pe=wE(me,Me),pe=mi(pe),pe.id=Qa.identify(pe),!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return}else{if(W=this.toBaseURI(P),Te=cr(this.reference.uri)===W,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(Io(P));const me=Ja(P),Me=mi(Y.value.result);pe=Fo(me,Me),pe=mi(pe),pe.id=Qa.identify(pe)}}catch(me){if(!(ge&&me instanceof HO))throw me;if(bE(zm(P))){if(Te=cr(this.reference.uri)===W,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(Io(P));const Me=zm(P),Ie=mi(Y.value.result);pe=nR(Me,Ie),pe=mi(pe),pe.id=Qa.identify(pe)}else{if(W=this.toBaseURI(it(P)),Te=cr(this.reference.uri)===W,Ae=!Te,!this.options.resolve.internal&&Te||!this.options.resolve.external&&Ae)return;Y=await this.toReference(Io(P));const Me=Ja(P),Ie=mi(Y.value.result);pe=Fo(Me,Ie),pe=mi(pe),pe.id=Qa.identify(pe)}}if(n===pe)throw new br("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new Rm(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(pe)){if(Y.refSet.circular=!0,this.options.dereference.circular==="error")throw new br("Circular reference detected");if(this.options.dereference.circular==="replace"){var w,C;const me=new eu(pe.id,{type:"json-schema",uri:Y.uri,$ref:it(n.$ref),baseURI:$s(W,P),referencingElement:n}),Me=((w=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&w!==void 0?w:this.options.dereference.circularReplacer)(me);return x.replaceWith(Me,cp),!l&&Me}}const qe=cr(Y.refSet.rootRef.uri)!==Y.uri,Se=["error","replace"].includes(this.options.dereference.circular);if((Ae||qe||au(pe)&&xn(pe.$ref)||Se)&&!U.includesCycle(pe)){var $;J.add(n);const me=new Qx({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:U,basePath:($=this.basePath)!==null&&$!==void 0?$:[...Bo([...v,l,n]),"$ref"]});pe=await iR(pe,me,{keyMap:Xl,nodeTypeGetter:qo}),J.delete(n)}if(this.indirections.pop(),tR(pe)){const me=Ct(pe);return me.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),me.setMetaProperty("ref-origin",Y.uri),me.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),x.replaceWith(me,cp),!l&&me}if(au(pe)){const me=new ap([...pe.content],Ct(pe.meta),Ct(pe.attributes));if(n.forEach(((Me,Ie,Qe)=>{me.remove(it(Ie)),me.content.push(Qe)})),me.remove("$ref"),me.setMetaProperty("ref-fields",{$ref:it(n.$ref)}),me.setMetaProperty("ref-origin",Y.uri),me.setMetaProperty("ref-referencing-element-id",Ct(Qa.identify(n))),this.allowMetaPatches&&me.get("$$ref")===void 0){const Me=$s(W,P);me.set("$$ref",Me)}pe=me}return x.replaceWith(pe,cp),l?void 0:pe}catch(U){var N,_,F;const J=SE(U),Y=new qG(`Could not resolve reference: ${J.message}`,{baseDoc:this.reference.uri,$ref:it(n.$ref),fullPath:(N=this.basePath)!==null&&N!==void 0?N:[...Bo([...v,l,n]),"$ref"],cause:J});return void((_=this.options.dereference.dereferenceOpts)===null||_===void 0||(_=_.errors)===null||_===void 0||(F=_.push)===null||F===void 0||F.call(_,Y))}}async LinkElement(){}async ExampleElement(n,i,l,h,v,x){try{return await super.ExampleElement(n,i,l,h,v,x)}catch(N){var w,C,$;const _=SE(N),F=sR(_,{baseDoc:this.reference.uri,externalValue:it(n.externalValue),fullPath:(w=this.basePath)!==null&&w!==void 0?w:[...Bo([...v,l,n]),"externalValue"]});return void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||($=C.push)===null||$===void 0||$.call(C,F))}}}const BG=O1[Symbol.for("nodejs.util.promisify.custom")];class UG{constructor({parameterMacro:n,modelPropertyMacro:i,mode:l,options:h,...v}){const x=[];x.push(new Qx({...v,options:h})),typeof i=="function"&&x.push(new LG({modelPropertyMacro:i,options:h})),l!=="strict"&&x.push(new zG({options:h})),typeof n=="function"&&x.push(new FG({parameterMacro:n,options:h}));const w=BG(x,{nodeTypeGetter:qo});Object.assign(this,w)}}const KG=fi[Symbol.for("nodejs.util.promisify.custom")];class yP extends class extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canDereference(n){var i;return n.mediaType!=="text/plain"?Nm.includes(n.mediaType):oP((i=n.parseResult)===null||i===void 0?void 0:i.result)}async dereference(n,i){var l;const h=wx(Zk),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new ym,x=new ym;let w,C=v;v.has(n.uri)?w=v.find(D$(n.uri,"uri")):(w=new tu({uri:n.uri,value:n.parseResult}),v.add(w)),i.dereference.immutable&&(v.refs.map((_=>new tu({..._,value:Ct(_.value)}))).forEach((_=>x.add(_))),w=x.find((_=>_.uri===n.uri)),C=x);const $=new Fm({reference:w,namespace:h,options:i}),N=await IG(C.rootRef.value,$,{keyMap:Xl,nodeTypeGetter:qo});return i.dereference.immutable&&x.refs.filter((_=>_.uri.startsWith("immutable://"))).map((_=>new tu({..._,uri:_.uri.replace(/^immutable:\/\//,"")}))).forEach((_=>v.add(_))),i.dereference.refSet===null&&v.clean(),x.clean(),N}}{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:n=!1,parameterMacro:i=null,modelPropertyMacro:l=null,mode:h="non-strict",ancestors:v=[],...x}={}){super({...x}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=n,this.parameterMacro=i,this.modelPropertyMacro=l,this.mode=h,this.ancestors=[...v]}async dereference(n,i){var l;const h=wx(Zk),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new ym,x=new ym;let w,C=v;v.has(n.uri)?w=v.find((_=>_.uri===n.uri)):(w=new tu({uri:n.uri,value:n.parseResult}),v.add(w)),i.dereference.immutable&&(v.refs.map((_=>new tu({..._,value:Ct(_.value)}))).forEach((_=>x.add(_))),w=x.find((_=>_.uri===n.uri)),C=x);const $=new UG({reference:w,namespace:h,options:i,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),N=await KG(C.rootRef.value,$,{keyMap:Xl,nodeTypeGetter:qo});return i.dereference.immutable&&x.refs.filter((_=>_.uri.startsWith("immutable://"))).map((_=>new tu({..._,uri:_.uri.replace(/^immutable:\/\//,"")}))).forEach((_=>v.add(_))),i.dereference.refSet===null&&v.clean(),x.clean(),N}}const VG=t=>{const n=it(t.meta.get("baseURI")),i=t.meta.get("referencingElement");return new St({$ref:n},Ct(i.meta),Ct(i.attributes))},EE=async t=>{const{spec:n,timeout:i,redirects:l,requestInterceptor:h,responseInterceptor:v,pathDiscriminator:x=[],allowMetaPatches:w=!1,useCircularStructures:C=!1,skipNormalization:$=!1,parameterMacro:N=null,modelPropertyMacro:_=null,mode:F="non-strict",strategies:U}=t;try{const{cache:J}=EE,Y=U.find((Qe=>Qe.match(n))),W=a1(o1())?o1():"https://swagger.io",P=Bu(t),se=$s(W,P);let ae;J.has(n)?ae=J.get(n):(ae=kd.refract(n),ae.classes.push("result"),J.set(n,ae));const he=new Lo([ae]),ge=zD(x),pe=ge===""?"":`#${ge}`,Te=Fo(ge,ae),Ae=new tu({uri:se,value:he}),qe=new ym({refs:[Ae]});ge!==""&&(qe.rootRef=void 0);const Se=[new Set([Te])],me=[],Me=((Qe,ct,qt)=>new UV({element:qt}).transclude(Qe,ct))(Te,await(async(Qe,ct={})=>(async(qt,kn)=>{let Tt=qt,on=!1;if(!HN(qt)){const Zn=Ti(qt);Zn.classes.push("result"),Tt=new Lo([Zn]),on=!0}const nr=new px({uri:kn.resolve.baseURI,parseResult:Tt,mediaType:kn.parse.mediaType}),yi=await vO("canDereference",[nr,kn],kn.dereference.strategies);if(ux(yi))throw new dD(nr.uri);try{const{result:Zn}=await xO("dereference",[nr,kn],yi);return on?Zn.get(0):Zn}catch(Zn){throw new KO(`Error while dereferencing file "${nr.uri}"`,{cause:Zn})}})(Qe,W$(Z$,ct)))(Te,{resolve:{baseURI:`${se}${pe}`,resolvers:[new dP({timeout:i||1e4,redirects:l||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:h,responseInterceptor:v}},strategies:[new DG]},parse:{mediaType:Nm.latest(),parsers:[new fP({allowEmpty:!1,sourceMap:!1}),new mP({allowEmpty:!1,sourceMap:!1}),new hP({allowEmpty:!1,sourceMap:!1}),new pP({allowEmpty:!1,sourceMap:!1}),new NG({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new yP({allowMetaPatches:w,useCircularStructures:C,parameterMacro:N,modelPropertyMacro:_,mode:F,ancestors:Se})],refSet:qe,dereferenceOpts:{errors:me},immutable:!1,circular:C?"ignore":"replace",circularReplacer:C?Z$.dereference.circularReplacer:VG}}),ae),Ie=$?Me:Y.normalize(Me);return{spec:it(Ie),errors:me}}catch(J){if(J instanceof ok||J instanceof Cx)return{spec:null,errors:[]};throw J}};EE.cache=new WeakMap;const vP=t=>{if(!Un(t))return t;const n=[bH({operationIdNormalizer:(i,l,h)=>jx({operationId:i},l,h,{v2OperationIdCompatibilityMode:!1})}),yH(),vH(),wH(),SH()];return km(t,n,{toolboxCreator:cP,visitorOptions:{keyMap:Xl,nodeTypeGetter:qo}})},HG={name:"openapi-3-1-apidom",match:t=>sk(t),normalize(t){if(!es(t)&&Jh(t)&&!t.$$normalized){const i=(n=vP,l=>{const h=kd.refract(l);h.classes.push("result");const v=n(h),x=it(v);return EE.cache.set(x,v),it(v)})(t);return i.$$normalized=!0,i}var n;return es(t)?vP(t):t},resolve:async t=>EE(t)};function xP(t,n,i){if(!t||typeof t!="object"||!t.paths||typeof t.paths!="object")return null;const{paths:l}=t;for(const h in l)for(const v in l[h]){if(v.toUpperCase()==="PARAMETERS")continue;const x=l[h][v];if(!x||typeof x!="object")continue;const w={spec:t,pathName:h,method:v.toUpperCase(),operation:x},C=n(w);if(i&&C)return w}}function bP(t,n){return`${n.toLowerCase()}-${t}`}const{isHttpUrl:GG}=zU,XG=()=>null,YG=function({spec:t,cb:n=XG,defaultTag:i="default",v2OperationIdCompatibilityMode:l}){const h={},v={};return xP(t,(({pathName:x,method:w,operation:C})=>{var $;(C.tags?($=C.tags,Array.isArray($)?$:[$]):[i]).forEach((N=>{if(typeof N!="string")return;v[N]=v[N]||{};const _=v[N],F=jx(C,x,w,{v2OperationIdCompatibilityMode:l}),U=n({spec:t,pathName:x,method:w,operation:C,operationId:F});if(h[F])h[F]+=1,_[`${F}${h[F]}`]=U;else if(_[F]!==void 0){const J=h[F]||1;h[F]=J+1,_[`${F}${h[F]}`]=U;const Y=_[F];delete _[F],_[`${F}${J}`]=Y}else _[F]=U}))})),v},ZG=function(t={}){return({pathName:n,method:i,operationId:l})=>(h,v={})=>{const{requestInterceptor:x,responseInterceptor:w,userFetch:C}=t;return t.execute({spec:t.spec,requestInterceptor:x,responseInterceptor:w,userFetch:C,pathName:n,method:i,parameters:h,operationId:l,...v})}};var WG=function(t,n,i){var l={},h=l.encode||QG;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!jE.test(t))throw new TypeError("argument name is invalid");var v=h(n);if(v&&!jE.test(v))throw new TypeError("argument val is invalid");var x=t+"="+v;if(l.maxAge!=null){var w=l.maxAge-0;if(isNaN(w)||!isFinite(w))throw new TypeError("option maxAge is invalid");x+="; Max-Age="+Math.floor(w)}if(l.domain){if(!jE.test(l.domain))throw new TypeError("option domain is invalid");x+="; Domain="+l.domain}if(l.path){if(!jE.test(l.path))throw new TypeError("option path is invalid");x+="; Path="+l.path}if(l.expires){var C=l.expires;if(!(function($){return JG.call($)==="[object Date]"||$ instanceof Date})(C)||isNaN(C.valueOf()))throw new TypeError("option expires is invalid");x+="; Expires="+C.toUTCString()}if(l.httpOnly&&(x+="; HttpOnly"),l.secure&&(x+="; Secure"),l.partitioned&&(x+="; Partitioned"),l.priority)switch(typeof l.priority=="string"?l.priority.toLowerCase():l.priority){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"strict":x+="; SameSite=Strict";break;case"none":x+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return x},JG=Object.prototype.toString,jE=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function QG(t){return encodeURIComponent(t)}const wP=function(){const t=sn,n=gi,i=this,l="parser.js: Parser(): ";i.ast=void 0,i.stats=void 0,i.trace=void 0,i.callbacks=[];let h,v,x,w,C,$,N,_=0,F=0,U=0,J=0,Y=0,W=new function(){this.state=t.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=t.ACTIVE,this.phraseLength=0}};i.parse=(he,ge,pe,Te)=>{const Ae=`${l}parse(): `;_=0,F=0,U=0,J=0,Y=0,h=void 0,v=void 0,x=void 0,w=void 0,W.refresh(),C=void 0,$=void 0,N=void 0,w=n.stringToChars(pe),h=he.rules,v=he.udts;const qe=ge.toLowerCase();let Se;for(const Me in h)if(h.hasOwnProperty(Me)&&qe===h[Me].lower){Se=h[Me].index;break}if(Se===void 0)throw new Error(`${Ae}start rule name '${startRule}' not recognized`);(()=>{const Me=`${l}initializeCallbacks(): `;let Ie,Qe;for(C=[],$=[],Ie=0;Ie<h.length;Ie+=1)C[Ie]=void 0;for(Ie=0;Ie<v.length;Ie+=1)$[Ie]=void 0;const ct=[];for(Ie=0;Ie<h.length;Ie+=1)ct.push(h[Ie].lower);for(Ie=0;Ie<v.length;Ie+=1)ct.push(v[Ie].lower);for(const qt in i.callbacks)if(i.callbacks.hasOwnProperty(qt)){if(Ie=ct.indexOf(qt.toLowerCase()),Ie<0)throw new Error(`${Me}syntax callback '${qt}' not a rule or udt name`);if(Qe=i.callbacks[qt]?i.callbacks[qt]:void 0,typeof Qe!="function"&&Qe!==void 0)throw new Error(`${Me}syntax callback[${qt}] must be function reference or falsy)`);Ie<h.length?C[Ie]=Qe:$[Ie-h.length]=Qe}})(),i.trace&&i.trace.init(h,v,w),i.stats&&i.stats.init(h,v),i.ast&&i.ast.init(h,v,w),N=Te,x=[{type:t.RNM,index:Se}],ae(0,0),x=void 0;let me=!1;switch(W.state){case t.ACTIVE:throw new Error(`${Ae}final state should never be 'ACTIVE'`);case t.NOMATCH:me=!1;break;case t.EMPTY:case t.MATCH:me=W.phraseLength===w.length;break;default:throw new Error("unrecognized state")}return{success:me,state:W.state,stateName:t.idName(W.state),length:w.length,matched:W.phraseLength,maxMatched:Y,maxTreeDepth:U,nodeHits:J}};const P=(he,ge,pe,Te)=>{if(ge.phraseLength>pe){let Ae=`${l}opRNM(${he.name}): callback function error: `;throw Ae+=`sysData.phraseLength: ${ge.phraseLength}`,Ae+=` must be <= remaining chars: ${pe}`,new Error(Ae)}switch(ge.state){case t.ACTIVE:if(!Te)throw new Error(`${l}opRNM(${he.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:ge.phraseLength=0;break;case t.MATCH:ge.phraseLength===0&&(ge.state=t.EMPTY);break;case t.NOMATCH:ge.phraseLength=0;break;default:throw new Error(`${l}opRNM(${he.name}): callback function return error. Unrecognized return state: ${ge.state}`)}},se=(he,ge)=>{let pe,Te,Ae;const qe=x[he],Se=v[qe.index];W.UdtIndex=Se.index,_||(Ae=i.ast&&i.ast.udtDefined(qe.index),Ae&&(Te=h.length+qe.index,pe=i.ast.getLength(),i.ast.down(Te,Se.name)));const me=w.length-ge;$[qe.index](W,w,ge,N),((Me,Ie,Qe)=>{if(Ie.phraseLength>Qe){let ct=`${l}opUDT(${Me.name}): callback function error: `;throw ct+=`sysData.phraseLength: ${Ie.phraseLength}`,ct+=` must be <= remaining chars: ${Qe}`,new Error(ct)}switch(Ie.state){case t.ACTIVE:throw new Error(`${l}opUDT(${Me.name}) ACTIVE state return not allowed.`);case t.EMPTY:if(!Me.empty)throw new Error(`${l}opUDT(${Me.name}) may not return EMPTY.`);Ie.phraseLength=0;break;case t.MATCH:if(Ie.phraseLength===0){if(!Me.empty)throw new Error(`${l}opUDT(${Me.name}) may not return EMPTY.`);Ie.state=t.EMPTY}break;case t.NOMATCH:Ie.phraseLength=0;break;default:throw new Error(`${l}opUDT(${Me.name}): callback function return error. Unrecognized return state: ${Ie.state}`)}})(Se,W,me),_||Ae&&(W.state===t.NOMATCH?i.ast.setLength(pe):i.ast.up(Te,Se.name,ge,W.phraseLength))},ae=(he,ge)=>{const pe=`${l}opExecute(): `,Te=x[he];switch(J+=1,F>U&&(U=F),F+=1,W.refresh(),i.trace&&i.trace.down(Te,ge),Te.type){case t.ALT:((Ae,qe)=>{const Se=x[Ae];for(let me=0;me<Se.children.length&&(ae(Se.children[me],qe),W.state===t.NOMATCH);me+=1);})(he,ge);break;case t.CAT:((Ae,qe)=>{let Se,me,Me,Ie;const Qe=x[Ae];i.ast&&(me=i.ast.getLength()),Se=!0,Me=qe,Ie=0;for(let ct=0;ct<Qe.children.length;ct+=1){if(ae(Qe.children[ct],Me),W.state===t.NOMATCH){Se=!1;break}Me+=W.phraseLength,Ie+=W.phraseLength}Se?(W.state=Ie===0?t.EMPTY:t.MATCH,W.phraseLength=Ie):(W.state=t.NOMATCH,W.phraseLength=0,i.ast&&i.ast.setLength(me))})(he,ge);break;case t.REP:((Ae,qe)=>{let Se,me,Me,Ie;const Qe=x[Ae];if(Qe.max===0)return W.state=t.EMPTY,void(W.phraseLength=0);for(me=qe,Me=0,Ie=0,i.ast&&(Se=i.ast.getLength());!(me>=w.length)&&(ae(Ae+1,me),W.state!==t.NOMATCH)&&W.state!==t.EMPTY&&(Ie+=1,Me+=W.phraseLength,me+=W.phraseLength,Ie!==Qe.max););W.state===t.EMPTY||Ie>=Qe.min?(W.state=Me===0?t.EMPTY:t.MATCH,W.phraseLength=Me):(W.state=t.NOMATCH,W.phraseLength=0,i.ast&&i.ast.setLength(Se))})(he,ge);break;case t.RNM:((Ae,qe)=>{let Se,me,Me;const Ie=x[Ae],Qe=h[Ie.index],ct=C[Qe.index];if(_||(me=i.ast&&i.ast.ruleDefined(Ie.index),me&&(Se=i.ast.getLength(),i.ast.down(Ie.index,h[Ie.index].name))),ct){const qt=w.length-qe;ct(W,w,qe,N),P(Qe,W,qt,!0),W.state===t.ACTIVE&&(Me=x,x=Qe.opcodes,ae(0,qe),x=Me,ct(W,w,qe,N),P(Qe,W,qt,!1))}else Me=x,x=Qe.opcodes,ae(0,qe),x=Me;_||me&&(W.state===t.NOMATCH?i.ast.setLength(Se):i.ast.up(Ie.index,Qe.name,qe,W.phraseLength))})(he,ge);break;case t.TRG:((Ae,qe)=>{const Se=x[Ae];W.state=t.NOMATCH,qe<w.length&&Se.min<=w[qe]&&w[qe]<=Se.max&&(W.state=t.MATCH,W.phraseLength=1)})(he,ge);break;case t.TBS:((Ae,qe)=>{const Se=x[Ae],me=Se.string.length;if(W.state=t.NOMATCH,qe+me<=w.length){for(let Me=0;Me<me;Me+=1)if(w[qe+Me]!==Se.string[Me])return;W.state=t.MATCH,W.phraseLength=me}})(he,ge);break;case t.TLS:((Ae,qe)=>{let Se;const me=x[Ae];W.state=t.NOMATCH;const Me=me.string.length;if(Me!==0){if(qe+Me<=w.length){for(let Ie=0;Ie<Me;Ie+=1)if(Se=w[qe+Ie],Se>=65&&Se<=90&&(Se+=32),Se!==me.string[Ie])return;W.state=t.MATCH,W.phraseLength=Me}}else W.state=t.EMPTY})(he,ge);break;case t.UDT:se(he,ge);break;case t.AND:((Ae,qe)=>{switch(_+=1,ae(Ae+1,qe),_-=1,W.phraseLength=0,W.state){case t.EMPTY:case t.MATCH:W.state=t.EMPTY;break;case t.NOMATCH:W.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${W.state}`)}})(he,ge);break;case t.NOT:((Ae,qe)=>{switch(_+=1,ae(Ae+1,qe),_-=1,W.phraseLength=0,W.state){case t.EMPTY:case t.MATCH:W.state=t.NOMATCH;break;case t.NOMATCH:W.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${W.state}`)}})(he,ge);break;default:throw new Error(`${pe}unrecognized operator`)}_||ge+W.phraseLength>Y&&(Y=ge+W.phraseLength),i.stats&&i.stats.collect(Te,W),i.trace&&i.trace.up(Te,W.state,ge,W.phraseLength),F-=1}},SP=function(){const t=sn,n=gi,i=this;let l,h,v,x=0;const w=[],C=[],$=[];function N(_){let F="";for(;_-- >0;)F+=" ";return F}i.callbacks=[],i.init=(_,F,U)=>{let J;C.length=0,$.length=0,x=0,l=_,h=F,v=U;const Y=[];for(J=0;J<l.length;J+=1)Y.push(l[J].lower);for(J=0;J<h.length;J+=1)Y.push(h[J].lower);for(x=l.length+h.length,J=0;J<x;J+=1)w[J]=void 0;for(const W in i.callbacks)if(i.callbacks.hasOwnProperty(W)){const P=W.toLowerCase();if(J=Y.indexOf(P),J<0)throw new Error(`parser.js: Ast()): init: node '${W}' not a rule or udt name`);w[J]=i.callbacks[W]}},i.ruleDefined=_=>!!w[_],i.udtDefined=_=>!!w[l.length+_],i.down=(_,F)=>{const U=$.length;return C.push(U),$.push({name:F,thisIndex:U,thatIndex:void 0,state:t.SEM_PRE,callbackIndex:_,phraseIndex:void 0,phraseLength:void 0,stack:C.length}),U},i.up=(_,F,U,J)=>{const Y=$.length,W=C.pop();return $.push({name:F,thisIndex:Y,thatIndex:W,state:t.SEM_POST,callbackIndex:_,phraseIndex:U,phraseLength:J,stack:C.length}),$[W].thatIndex=Y,$[W].phraseIndex=U,$[W].phraseLength=J,Y},i.translate=_=>{let F,U;for(let J=0;J<$.length;J+=1)U=$[J],F=w[U.callbackIndex],F&&(U.state===t.SEM_PRE?F(t.SEM_PRE,v,U.phraseIndex,U.phraseLength,_):F&&F(t.SEM_POST,v,U.phraseIndex,U.phraseLength,_))},i.setLength=_=>{$.length=_,C.length=_>0?$[_-1].stack:0},i.getLength=()=>$.length,i.toXml=()=>{let _="",F=0;return _+=`<?xml version="1.0" encoding="utf-8"?>
|
||
`,_+=`<root nodes="${$.length/2}" characters="${v.length}">
|
||
`,_+=`<!-- input string -->
|
||
`,_+=N(F+2),_+=n.charsToString(v),_+=`
|
||
`,$.forEach((U=>{U.state===t.SEM_PRE?(F+=1,_+=N(F),_+=`<node name="${U.name}" index="${U.phraseIndex}" length="${U.phraseLength}">
|
||
`,_+=N(F+2),_+=n.charsToString(v,U.phraseIndex,U.phraseLength),_+=`
|
||
`):(_+=N(F),_+=`</node><!-- name="${U.name}" -->
|
||
`,F-=1)})),_+=`</root>
|
||
`,_}},gi={stringToChars:t=>[...t].map((n=>n.codePointAt(0))),charsToString:(t,n,i)=>{let l=t;for(;!(n===void 0||n<0);){if(i===void 0){l=t.slice(n);break}if(i<=0)return"";l=t.slice(n,n+i);break}return String.fromCodePoint(...l)}},sn={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:t=>{switch(t){case sn.ALT:return"ALT";case sn.CAT:return"CAT";case sn.REP:return"REP";case sn.RNM:return"RNM";case sn.TRG:return"TRG";case sn.TBS:return"TBS";case sn.TLS:return"TLS";case sn.UDT:return"UDT";case sn.AND:return"AND";case sn.NOT:return"NOT";case sn.ACTIVE:return"ACTIVE";case sn.EMPTY:return"EMPTY";case sn.MATCH:return"MATCH";case sn.NOMATCH:return"NOMATCH";case sn.SEM_PRE:return"SEM_PRE";case sn.SEM_POST:return"SEM_POST";case sn.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}},eX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-url-template",gi.charsToString(n,i,l)])}return sn.SEM_OK},tX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-variable",gi.charsToString(n,i,l)])}return sn.SEM_OK},nX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["server-variable-name",gi.charsToString(n,i,l)])}return sn.SEM_OK},rX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["literals",gi.charsToString(n,i,l)])}return sn.SEM_OK},sX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"ALPHA",lower:"alpha",index:4,isBkr:!1},this.rules[5]={name:"DIGIT",lower:"digit",index:5,isBkr:!1},this.rules[6]={name:"HEXDIG",lower:"hexdig",index:6,isBkr:!1},this.rules[7]={name:"pct-encoded",lower:"pct-encoded",index:7,isBkr:!1},this.rules[8]={name:"unreserved",lower:"unreserved",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ucschar",lower:"ucschar",index:10,isBkr:!1},this.rules[11]={name:"iprivate",lower:"iprivate",index:11,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[2].opcodes[2]={type:4,index:8},this.rules[2].opcodes[3]={type:4,index:7},this.rules[2].opcodes[4]={type:4,index:9},this.rules[2].opcodes[5]={type:7,string:[58]},this.rules[2].opcodes[6]={type:7,string:[64]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13,14]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:6,string:[38]},this.rules[3].opcodes[5]={type:5,min:40,max:59},this.rules[3].opcodes[6]={type:6,string:[61]},this.rules[3].opcodes[7]={type:5,min:63,max:91},this.rules[3].opcodes[8]={type:6,string:[93]},this.rules[3].opcodes[9]={type:6,string:[95]},this.rules[3].opcodes[10]={type:5,min:97,max:122},this.rules[3].opcodes[11]={type:6,string:[126]},this.rules[3].opcodes[12]={type:4,index:10},this.rules[3].opcodes[13]={type:4,index:11},this.rules[3].opcodes[14]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:65,max:90},this.rules[4].opcodes[2]={type:5,min:97,max:122},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[6].opcodes[1]={type:4,index:5},this.rules[6].opcodes[2]={type:7,string:[97]},this.rules[6].opcodes[3]={type:7,string:[98]},this.rules[6].opcodes[4]={type:7,string:[99]},this.rules[6].opcodes[5]={type:7,string:[100]},this.rules[6].opcodes[6]={type:7,string:[101]},this.rules[6].opcodes[7]={type:7,string:[102]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:2,children:[1,2,3]},this.rules[7].opcodes[1]={type:7,string:[37]},this.rules[7].opcodes[2]={type:4,index:6},this.rules[7].opcodes[3]={type:4,index:6},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[8].opcodes[1]={type:4,index:4},this.rules[8].opcodes[2]={type:4,index:5},this.rules[8].opcodes[3]={type:7,string:[45]},this.rules[8].opcodes[4]={type:7,string:[46]},this.rules[8].opcodes[5]={type:7,string:[95]},this.rules[8].opcodes[6]={type:7,string:[126]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[10].opcodes[1]={type:5,min:160,max:55295},this.rules[10].opcodes[2]={type:5,min:63744,max:64975},this.rules[10].opcodes[3]={type:5,min:65008,max:65519},this.rules[10].opcodes[4]={type:5,min:65536,max:131069},this.rules[10].opcodes[5]={type:5,min:131072,max:196605},this.rules[10].opcodes[6]={type:5,min:196608,max:262141},this.rules[10].opcodes[7]={type:5,min:262144,max:327677},this.rules[10].opcodes[8]={type:5,min:327680,max:393213},this.rules[10].opcodes[9]={type:5,min:393216,max:458749},this.rules[10].opcodes[10]={type:5,min:458752,max:524285},this.rules[10].opcodes[11]={type:5,min:524288,max:589821},this.rules[10].opcodes[12]={type:5,min:589824,max:655357},this.rules[10].opcodes[13]={type:5,min:655360,max:720893},this.rules[10].opcodes[14]={type:5,min:720896,max:786429},this.rules[10].opcodes[15]={type:5,min:786432,max:851965},this.rules[10].opcodes[16]={type:5,min:851968,max:917501},this.rules[10].opcodes[17]={type:5,min:921600,max:983037},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3]},this.rules[11].opcodes[1]={type:5,min:57344,max:63743},this.rules[11].opcodes[2]={type:5,min:983040,max:1048573},this.rules[11].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){return`; OpenAPI Server URL templating ABNF syntax
|
||
server-url-template = 1*( literals / server-variable )
|
||
server-variable = "{" server-variable-name "}"
|
||
server-variable-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B
|
||
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
|
||
/ pct-encoded)
|
||
; any Unicode character except: CTL, SP,
|
||
; DQUOTE, "'", "%" (aside from pct-encoded),
|
||
; "<", ">", "\\", "^", "\`", "{", "|", "}"
|
||
|
||
; Characters definitions (from RFC 6570)
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
; case-insensitive
|
||
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
|
||
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
|
||
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
|
||
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
|
||
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
|
||
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
|
||
/ %xD0000-DFFFD / %xE1000-EFFFD
|
||
|
||
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
|
||
`}},EP=t=>{const n=new wP;return n.ast=new SP,n.ast.callbacks["server-url-template"]=eX,n.ast.callbacks["server-variable"]=tX,n.ast.callbacks["server-variable-name"]=nX,n.ast.callbacks.literals=rX,{result:n.parse(sX,"server-url-template",t),ast:n.ast}},iX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),aX=["literals","server-variable-name"],oX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["slash",gi.charsToString(n,i,l)]),sn.SEM_OK),lX=(t,n,i,l,h)=>{if(t===sn.SEM_PRE){if(Array.isArray(h)===!1)throw new Error("parser's user data must be an array");h.push(["path-template",gi.charsToString(n,i,l)])}return sn.SEM_OK},cX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["path",gi.charsToString(n,i,l)]),sn.SEM_OK),uX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["path-literal",gi.charsToString(n,i,l)]),sn.SEM_OK),dX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["query",gi.charsToString(n,i,l)]),sn.SEM_OK),hX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["query-marker",gi.charsToString(n,i,l)]),sn.SEM_OK),pX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["fragment",gi.charsToString(n,i,l)]),sn.SEM_OK),fX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["fragment-marker",gi.charsToString(n,i,l)]),sn.SEM_OK),mX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["template-expression",gi.charsToString(n,i,l)]),sn.SEM_OK),gX=(t,n,i,l,h)=>(t===sn.SEM_PRE&&h.push(["template-expression-param-name",gi.charsToString(n,i,l)]),sn.SEM_OK),yX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path",lower:"path",index:1,isBkr:!1},this.rules[2]={name:"path-segment",lower:"path-segment",index:2,isBkr:!1},this.rules[3]={name:"query",lower:"query",index:3,isBkr:!1},this.rules[4]={name:"query-literal",lower:"query-literal",index:4,isBkr:!1},this.rules[5]={name:"query-marker",lower:"query-marker",index:5,isBkr:!1},this.rules[6]={name:"fragment",lower:"fragment",index:6,isBkr:!1},this.rules[7]={name:"fragment-literal",lower:"fragment-literal",index:7,isBkr:!1},this.rules[8]={name:"fragment-marker",lower:"fragment-marker",index:8,isBkr:!1},this.rules[9]={name:"slash",lower:"slash",index:9,isBkr:!1},this.rules[10]={name:"path-literal",lower:"path-literal",index:10,isBkr:!1},this.rules[11]={name:"template-expression",lower:"template-expression",index:11,isBkr:!1},this.rules[12]={name:"template-expression-param-name",lower:"template-expression-param-name",index:12,isBkr:!1},this.rules[13]={name:"unreserved",lower:"unreserved",index:13,isBkr:!1},this.rules[14]={name:"pct-encoded",lower:"pct-encoded",index:14,isBkr:!1},this.rules[15]={name:"sub-delims",lower:"sub-delims",index:15,isBkr:!1},this.rules[16]={name:"ALPHA",lower:"alpha",index:16,isBkr:!1},this.rules[17]={name:"DIGIT",lower:"digit",index:17,isBkr:!1},this.rules[18]={name:"HEXDIG",lower:"hexdig",index:18,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:5},this.rules[0].opcodes[5]={type:4,index:3},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:2,children:[8,9]},this.rules[0].opcodes[8]={type:4,index:8},this.rules[0].opcodes[9]={type:4,index:6},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,6]},this.rules[1].opcodes[1]={type:4,index:9},this.rules[1].opcodes[2]={type:3,min:0,max:1/0},this.rules[1].opcodes[3]={type:2,children:[4,5]},this.rules[1].opcodes[4]={type:4,index:2},this.rules[1].opcodes[5]={type:4,index:9},this.rules[1].opcodes[6]={type:3,min:0,max:1},this.rules[1].opcodes[7]={type:4,index:2},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:10},this.rules[2].opcodes[3]={type:4,index:11},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:4},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10]},this.rules[4].opcodes[2]={type:4,index:13},this.rules[4].opcodes[3]={type:4,index:14},this.rules[4].opcodes[4]={type:4,index:15},this.rules[4].opcodes[5]={type:7,string:[58]},this.rules[4].opcodes[6]={type:7,string:[64]},this.rules[4].opcodes[7]={type:7,string:[47]},this.rules[4].opcodes[8]={type:7,string:[63]},this.rules[4].opcodes[9]={type:7,string:[38]},this.rules[4].opcodes[10]={type:7,string:[61]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:7,string:[63]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:0,max:1/0},this.rules[6].opcodes[1]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:3,min:1,max:1/0},this.rules[7].opcodes[1]={type:1,children:[2,3,4,5,6,7,8]},this.rules[7].opcodes[2]={type:4,index:13},this.rules[7].opcodes[3]={type:4,index:14},this.rules[7].opcodes[4]={type:4,index:15},this.rules[7].opcodes[5]={type:7,string:[58]},this.rules[7].opcodes[6]={type:7,string:[64]},this.rules[7].opcodes[7]={type:7,string:[47]},this.rules[7].opcodes[8]={type:7,string:[63]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:7,string:[35]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:7,string:[47]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:3,min:1,max:1/0},this.rules[10].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[10].opcodes[2]={type:4,index:13},this.rules[10].opcodes[3]={type:4,index:14},this.rules[10].opcodes[4]={type:4,index:15},this.rules[10].opcodes[5]={type:7,string:[58]},this.rules[10].opcodes[6]={type:7,string:[64]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:2,children:[1,2,3]},this.rules[11].opcodes[1]={type:7,string:[123]},this.rules[11].opcodes[2]={type:4,index:12},this.rules[11].opcodes[3]={type:7,string:[125]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:3,min:1,max:1/0},this.rules[12].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[12].opcodes[2]={type:4,index:13},this.rules[12].opcodes[3]={type:4,index:14},this.rules[12].opcodes[4]={type:4,index:15},this.rules[12].opcodes[5]={type:7,string:[58]},this.rules[12].opcodes[6]={type:7,string:[64]},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[13].opcodes[1]={type:4,index:16},this.rules[13].opcodes[2]={type:4,index:17},this.rules[13].opcodes[3]={type:7,string:[45]},this.rules[13].opcodes[4]={type:7,string:[46]},this.rules[13].opcodes[5]={type:7,string:[95]},this.rules[13].opcodes[6]={type:7,string:[126]},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2,3]},this.rules[14].opcodes[1]={type:7,string:[37]},this.rules[14].opcodes[2]={type:4,index:18},this.rules[14].opcodes[3]={type:4,index:18},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[15].opcodes[1]={type:7,string:[33]},this.rules[15].opcodes[2]={type:7,string:[36]},this.rules[15].opcodes[3]={type:7,string:[38]},this.rules[15].opcodes[4]={type:7,string:[39]},this.rules[15].opcodes[5]={type:7,string:[40]},this.rules[15].opcodes[6]={type:7,string:[41]},this.rules[15].opcodes[7]={type:7,string:[42]},this.rules[15].opcodes[8]={type:7,string:[43]},this.rules[15].opcodes[9]={type:7,string:[44]},this.rules[15].opcodes[10]={type:7,string:[59]},this.rules[15].opcodes[11]={type:7,string:[61]},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2]},this.rules[16].opcodes[1]={type:5,min:65,max:90},this.rules[16].opcodes[2]={type:5,min:97,max:122},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:48,max:57},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[18].opcodes[1]={type:4,index:17},this.rules[18].opcodes[2]={type:7,string:[97]},this.rules[18].opcodes[3]={type:7,string:[98]},this.rules[18].opcodes[4]={type:7,string:[99]},this.rules[18].opcodes[5]={type:7,string:[100]},this.rules[18].opcodes[6]={type:7,string:[101]},this.rules[18].opcodes[7]={type:7,string:[102]},this.toString=function(){return`; OpenAPI Path Templating ABNF syntax
|
||
path-template = path [ query-marker query ] [ fragment-marker fragment ]
|
||
path = slash *( path-segment slash ) [ path-segment ]
|
||
path-segment = 1*( path-literal / template-expression )
|
||
query = *( query-literal )
|
||
query-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" / "&" / "=" )
|
||
query-marker = "?"
|
||
fragment = *( fragment-literal )
|
||
fragment-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" )
|
||
fragment-marker = "#"
|
||
slash = "/"
|
||
path-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
template-expression = "{" template-expression-param-name "}"
|
||
template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
|
||
; Characters definitions (from RFC 3986)
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
`}},vX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),xX=["slash","path-literal","query-marker","query-literal","template-expression-param-name"],aR=(t,n,i={})=>{const l={encoder:vX,...i},h=(w=>{const C=new wP;return C.ast=new SP,C.ast.callbacks["path-template"]=lX,C.ast.callbacks.path=cX,C.ast.callbacks.query=dX,C.ast.callbacks["query-marker"]=hX,C.ast.callbacks.fragment=pX,C.ast.callbacks["fragment-marker"]=fX,C.ast.callbacks.slash=oX,C.ast.callbacks["path-literal"]=uX,C.ast.callbacks["template-expression"]=mX,C.ast.callbacks["template-expression-param-name"]=gX,{result:C.parse(yX,"path-template",w),ast:C.ast}})(t);if(!h.result.success)return t;const v=[];return h.ast.translate(v),v.filter((([w])=>xX.includes(w))).map((([w,C])=>w==="template-expression-param-name"?Object.hasOwn(n,C)?l.encoder(n[C],C):`{${C}}`:C)).join("")},bX={body:function({req:t,value:n}){n!==void 0&&(t.body=n)},header:function({req:t,parameter:n,value:i}){t.headers=t.headers||{},i!==void 0&&(t.headers[n.name]=i)},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.query[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}},path:function({req:t,value:n,parameter:i,baseURL:l}){if(n!==void 0){const h=t.url.replace(l,""),v=aR(h,{[i.name]:n});t.url=l+v}},formData:function({req:t,value:n,parameter:i}){if(n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.form=t.form||{},t.form[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){t.form=t.form||{};const l=i.name;t.form[l]=t.form[l]||{},t.form[l].allowEmptyValue=!0}}};function CE(t,n){return n.includes("application/json")?typeof t=="string"?t:(Array.isArray(t)&&(t=t.map((i=>{try{return JSON.parse(i)}catch{return i}}))),JSON.stringify(t)):String(t)}const wX=["accept","authorization","content-type"],SX=Object.freeze(Object.defineProperty({__proto__:null,cookie:function({req:t,parameter:n,value:i}){t.headers=t.headers||{};const l=typeof i;if(i!==void 0&&n.content){const h=Object.keys(n.content)[0];t.headers.Cookie=`${n.name}=${CE(i,h)}`}else if(i!==void 0&&(!Array.isArray(i)||i.length!==0)){const h=l==="object"&&!Array.isArray(i)&&n.explode?"":`${n.name}=`;t.headers.Cookie=h+xa({key:n.name,value:i,escape:!1,style:n.style||"form",explode:n.explode!==void 0&&n.explode})}},header:function({req:t,parameter:n,value:i}){if(t.headers=t.headers||{},!(wX.indexOf(n.name.toLowerCase())>-1))if(i!==void 0&&n.content){const l=Object.keys(n.content)[0];t.headers[n.name]=CE(i,l)}else i===void 0||Array.isArray(i)&&i.length===0||(t.headers[n.name]=xa({key:n.name,value:i,style:n.style||"simple",explode:n.explode!==void 0&&n.explode,escape:!1}))},path:function({req:t,value:n,parameter:i,baseURL:l}){const{name:h,style:v,explode:x,content:w}=i;if(n===void 0)return;const C=t.url.replace(l,"");let $;if(w){const N=Object.keys(w)[0];$=aR(C,{[h]:n},{encoder:_=>rh(CE(_,N))})}else $=aR(C,{[h]:n},{encoder:N=>xa({key:i.name,value:N,style:v||"simple",explode:x||!1,escape:"reserved"})});t.url=l+$},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n!==void 0&&i.content){const l=CE(n,Object.keys(i.content)[0]);if(l)t.query[i.name]=l;else if(i.allowEmptyValue){const h=i.name;t.query[h]=t.query[h]||{},t.query[h].allowEmptyValue=!0}}else if(n===!1&&(n="false"),n===0&&(n="0"),n){const{style:l,explode:h,allowReserved:v}=i;t.query[i.name]={value:n,serializationOption:{style:l,explode:h,allowReserved:v}}}else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}}},Symbol.toStringTag,{value:"Module"})),EX=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,{btoa:jP}=EX,CP=t=>Array.isArray(t)?t:[],oR=t=>{try{return new URL(t)}catch{const n=new URL(t,"https://swagger.io"),i=String(t).startsWith("/")?n.pathname:n.pathname.substring(1);return{hash:n.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:i,port:"",protocol:"",search:n.search,searchParams:n.searchParams}}};class jX extends Oa{}const CX={buildRequest:AP};function AP(t){const{spec:n,operationId:i,responseContentType:l,scheme:h,requestInterceptor:v,responseInterceptor:x,contextUrl:w,userFetch:C,server:$,serverVariables:N,http:_,signal:F,serverVariableEncoder:U}=t;let{parameters:J,parameterBuilders:Y}=t;const W=ik(n);Y||(Y=W?SX:bX);let P={url:"",credentials:_&&_.withCredentials?"include":"same-origin",headers:{},cookies:{}};F&&(P.signal=F),v&&(P.requestInterceptor=v),x&&(P.responseInterceptor=x),C&&(P.userFetch=C);const se=(function(Se,me){return Se&&Se.paths?(function(Me,Ie){return xP(Me,Ie,!0)||null})(Se,(({pathName:Me,method:Ie,operation:Qe})=>{if(!Qe||typeof Qe!="object")return!1;const ct=Qe.operationId;return[jx(Qe,Me,Ie),bP(Me,Ie),ct].some((qt=>qt&&qt===me))})):null})(n,i);if(!se)throw new jX(`Operation ${i} not found`);const{operation:ae={},method:he,pathName:ge}=se,pe=OP({spec:n,scheme:h,contextUrl:w,server:$,serverVariables:N,pathName:ge,method:he,serverVariableEncoder:U});if(P.url+=pe,!i)return delete P.cookies,P;P.url+=ge,P.method=`${he}`.toUpperCase(),J=J||{};const Te=n.paths[ge]||{};l&&(P.headers.accept=l);const Ae=(Se=>{const me={};Se.forEach((Ie=>{me[Ie.in]||(me[Ie.in]={}),me[Ie.in][Ie.name]=Ie}));const Me=[];return Object.keys(me).forEach((Ie=>{Object.keys(me[Ie]).forEach((Qe=>{Me.push(me[Ie][Qe])}))})),Me})([].concat(CP(ae.parameters)).concat(CP(Te.parameters)));Ae.forEach((Se=>{const me=Y[Se.in];let Me;if(Se.in==="body"&&Se.schema&&Se.schema.properties&&(Me=J),Me=Se&&Se.name&&J[Se.name],Me===void 0?Me=Se&&Se.name&&J[`${Se.in}.${Se.name}`]:((Ie,Qe)=>Qe.filter((ct=>ct.name===Ie)))(Se.name,Ae).length>1&&console.warn(`Parameter '${Se.name}' is ambiguous because the defined spec has more than one parameter with the name: '${Se.name}' and the passed-in parameter values did not define an 'in' value.`),Me!==null){if(Se.default!==void 0&&Me===void 0&&(Me=Se.default),Me===void 0&&Se.required&&!Se.allowEmptyValue)throw new Error(`Required parameter ${Se.name} is not provided`);if(W&&Se.schema&&Se.schema.type==="object"&&typeof Me=="string")try{Me=JSON.parse(Me)}catch{throw new Error("Could not parse object parameter value string as JSON")}me&&me({req:P,parameter:Se,value:Me,operation:ae,spec:n,baseURL:pe})}}));const qe={...t,operation:ae};if(P=W?(function(Se,me){const{operation:Me,requestBody:Ie,securities:Qe,spec:ct,attachContentTypeForEmptyPayload:qt}=Se;let{requestContentType:kn}=Se;me=(function({request:kr,securities:Tr={},operation:Ir={},spec:la}){var Zl;const Kr={...kr},{authorized:Uo={}}=Tr,ds=Ir.security||la.security||[],Ko=Uo&&!!Object.keys(Uo).length,pp=(la==null||(Zl=la.components)===null||Zl===void 0?void 0:Zl.securitySchemes)||{};return Kr.headers=Kr.headers||{},Kr.query=Kr.query||{},Object.keys(Tr).length&&Ko&&ds&&(!Array.isArray(Ir.security)||Ir.security.length)?(ds.forEach((eb=>{Object.keys(eb).forEach((tb=>{const Vo=Uo[tb],vi=pp[tb];if(!Vo)return;const $d=Vo.value||Vo,{type:DE}=vi;if(Vo){if(DE==="apiKey")vi.in==="query"&&(Kr.query[vi.name]=$d),vi.in==="header"&&(Kr.headers[vi.name]=$d),vi.in==="cookie"&&(Kr.cookies[vi.name]=$d);else if(DE==="http"){if(/^basic$/i.test(vi.scheme)){const PE=$d.username||"",CR=$d.password||"",Bm=jP(`${PE}:${CR}`);Kr.headers.Authorization=`Basic ${Bm}`}/^bearer$/i.test(vi.scheme)&&(Kr.headers.Authorization=`Bearer ${$d}`)}else if(DE==="oauth2"||DE==="openIdConnect"){const PE=Vo.token||{},CR=PE[vi["x-tokenName"]||"access_token"];let Bm=PE.token_type;Bm&&Bm.toLowerCase()!=="bearer"||(Bm="Bearer"),Kr.headers.Authorization=`${Bm} ${CR}`}}}))})),Kr):kr})({request:me,securities:Qe,operation:Me,spec:ct});const Tt=Me.requestBody||{},on=Object.keys(Tt.content||{}),nr=kn&&on.indexOf(kn)>-1;if(Ie||qt){if(kn&&nr)me.headers["Content-Type"]=kn;else if(!kn){const kr=on[0];kr&&(me.headers["Content-Type"]=kr,kn=kr)}}else kn&&nr&&(me.headers["Content-Type"]=kn);if(!Se.responseContentType&&Me.responses){const kr=Object.entries(Me.responses).filter((([Tr,Ir])=>{const la=parseInt(Tr,10);return la>=200&&la<300&&Jh(Ir.content)})).reduce(((Tr,[,Ir])=>Tr.concat(Object.keys(Ir.content))),[]);kr.length>0&&(me.headers.accept=kr.join(", "))}if(Ie)if(kn){if(on.indexOf(kn)>-1)if(kn==="application/x-www-form-urlencoded"||kn==="multipart/form-data")if(typeof Ie=="object"){var yi,Zn;const kr=(yi=(Zn=Tt.content[kn])===null||Zn===void 0?void 0:Zn.encoding)!==null&&yi!==void 0?yi:{};me.form={},Object.keys(Ie).forEach((Tr=>{let Ir;try{Ir=JSON.parse(Ie[Tr])}catch{Ir=Ie[Tr]}me.form[Tr]={value:Ir,encoding:kr[Tr]||{}}}))}else if(typeof Ie=="string"){var Ln,Ni;const kr=(Ln=(Ni=Tt.content[kn])===null||Ni===void 0?void 0:Ni.encoding)!==null&&Ln!==void 0?Ln:{};try{me.form={};const Tr=JSON.parse(Ie);Object.entries(Tr).forEach((([Ir,la])=>{me.form[Ir]={value:la,encoding:kr[Ir]||{}}}))}catch{me.form=Ie}}else me.form=Ie;else me.body=Ie}else me.body=Ie;return me})(qe,P):(function(Se,me){const{spec:Me,operation:Ie,securities:Qe,requestContentType:ct,responseContentType:qt,attachContentTypeForEmptyPayload:kn}=Se;if(me=(function({request:Tt,securities:on={},operation:nr={},spec:yi}){const Zn={...Tt},{authorized:Ln={},specSecurity:Ni=[]}=on,kr=nr.security||Ni,Tr=Ln&&!!Object.keys(Ln).length,Ir=yi.securityDefinitions;return Zn.headers=Zn.headers||{},Zn.query=Zn.query||{},Object.keys(on).length&&Tr&&kr&&(!Array.isArray(nr.security)||nr.security.length)?(kr.forEach((la=>{Object.keys(la).forEach((Zl=>{const Kr=Ln[Zl];if(!Kr)return;const{token:Uo}=Kr,ds=Kr.value||Kr,Ko=Ir[Zl],{type:pp}=Ko,eb=Ko["x-tokenName"]||"access_token",tb=Uo&&Uo[eb];let Vo=Uo&&Uo.token_type;if(Kr)if(pp==="apiKey"){const vi=Ko.in==="query"?"query":"headers";Zn[vi]=Zn[vi]||{},Zn[vi][Ko.name]=ds}else if(pp==="basic")if(ds.header)Zn.headers.authorization=ds.header;else{const vi=ds.username||"",$d=ds.password||"";ds.base64=jP(`${vi}:${$d}`),Zn.headers.authorization=`Basic ${ds.base64}`}else pp==="oauth2"&&tb&&(Vo=Vo&&Vo.toLowerCase()!=="bearer"?Vo:"Bearer",Zn.headers.authorization=`${Vo} ${tb}`)}))})),Zn):Tt})({request:me,securities:Qe,operation:Ie,spec:Me}),me.body||me.form||kn)ct?me.headers["Content-Type"]=ct:Array.isArray(Ie.consumes)?[me.headers["Content-Type"]]=Ie.consumes:Array.isArray(Me.consumes)?[me.headers["Content-Type"]]=Me.consumes:Ie.parameters&&Ie.parameters.filter((Tt=>Tt.type==="file")).length?me.headers["Content-Type"]="multipart/form-data":Ie.parameters&&Ie.parameters.filter((Tt=>Tt.in==="formData")).length&&(me.headers["Content-Type"]="application/x-www-form-urlencoded");else if(ct){const Tt=Ie.parameters&&Ie.parameters.filter((nr=>nr.in==="body")).length>0,on=Ie.parameters&&Ie.parameters.filter((nr=>nr.in==="formData")).length>0;(Tt||on)&&(me.headers["Content-Type"]=ct)}return!qt&&Array.isArray(Ie.produces)&&Ie.produces.length>0&&(me.headers.accept=Ie.produces.join(", ")),me})(qe,P),P.cookies&&Object.keys(P.cookies).length){const Se=Object.keys(P.cookies).reduce(((me,Me)=>{const Ie=P.cookies[Me];return me+(me?"&":"")+WG(Me,Ie)}),"");P.headers.Cookie=Se}return P.cookies&&delete P.cookies,qp(P)}const lR=t=>t?t.replace(/\W/g,""):null;function OP(t){return ik(t.spec)?(function({spec:n,pathName:i,method:l,server:h,contextUrl:v,serverVariables:x={},serverVariableEncoder:w}){var C,$;let N,_=[],F="";const U=n==null||(C=n.paths)===null||C===void 0||(C=C[i])===null||C===void 0||(C=C[(l||"").toLowerCase()])===null||C===void 0?void 0:C.servers,J=n==null||($=n.paths)===null||$===void 0||($=$[i])===null||$===void 0?void 0:$.servers,Y=n?.servers;if(_=cR(U)?U:cR(J)?J:cR(Y)?Y:[zp],h&&(N=_.find((W=>W.url===h)),N&&(F=h)),F||([N]=_,F=N.url),((W,{strict:P=!1}={})=>{try{const se=EP(W);if(!se.result.success)return!1;const ae=[];se.ast.translate(ae);const he=ae.some((([ge])=>ge==="server-variable"));if(!P&&!he)try{return new URL(W,"https://vladimirgorej.com"),!0}catch{return!1}return!P||he}catch{return!1}})(F,{strict:!0})){const W=Object.entries({...N.variables}).reduce(((P,[se,ae])=>(P[se]=ae.default,P)),{});F=((P,se,ae={})=>{const he={encoder:iX,...ae},ge=EP(P);if(!ge.result.success)return P;const pe=[];return ge.ast.translate(pe),pe.filter((([Ae])=>aX.includes(Ae))).map((([Ae,qe])=>Ae==="server-variable-name"?Object.hasOwn(se,qe)?he.encoder(se[qe],qe):`{${qe}}`:qe)).join("")})(F,{...W,...x},{encoder:typeof w=="function"?w:nO})}return(function(W="",P=""){const se=oR(W&&P?$s(P,W):W),ae=oR(P),he=lR(se.protocol)||lR(ae.protocol),ge=se.host||ae.host,pe=se.pathname;let Te;return Te=he&&ge?`${he}://${ge+pe}`:pe,Te[Te.length-1]==="/"?Te.slice(0,-1):Te})(F,v)})(t):(function({spec:n,scheme:i,contextUrl:l=""}){const h=oR(l),v=Array.isArray(n.schemes)?n.schemes[0]:null,x=i||v||lR(h.protocol)||"http",w=n.host||h.host||"",C=n.basePath||"";let $;return $=w?`${x}://${w+C}`:C,$[$.length-1]==="/"?$.slice(0,-1):$})(t)}const cR=t=>Array.isArray(t)&&t.length>0;function tr(t,n={}){if(typeof t=="string"?n.url=t:n=t,!(this instanceof tr))return new tr(n);Object.assign(this,n);const i=this.resolve().then((()=>(this.disableInterfaces||Object.assign(this,tr.makeApisTagOperation(this)),this)));return i.client=this,i}function kP(t){const n=(t=t.replace("[]","Array")).split("/");return n[0]=n[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),n.join("/")}tr.http=ni,tr.makeHttp=(function(t,n,i){return i=i||(l=>l),n=n||(l=>l),l=>(typeof l=="string"&&(l={url:l}),l=qp(l),l=n(l),i(t(l)))}).bind(null,tr.http),tr.resolveStrategies={"openapi-3-1-apidom":HG,"openapi-3-0":ID,"openapi-2-0":MD,generic:ND},tr.resolve=LD({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.resolveSubtree=(t=>async(n,i,l={})=>(async(h,v,x={})=>{const{returnEntireTree:w,baseDoc:C,requestInterceptor:$,responseInterceptor:N,parameterMacro:_,modelPropertyMacro:F,useCircularStructures:U,strategies:J}=x,Y={spec:h,pathDiscriminator:v,baseDoc:C,requestInterceptor:$,responseInterceptor:N,parameterMacro:_,modelPropertyMacro:F,useCircularStructures:U,strategies:J},W=J.find((se=>se.match(h))).normalize(h),P=await h7({spec:W,...Y,allowMetaPatches:!0,skipNormalization:!sk(h)});return!w&&Array.isArray(v)&&v.length&&(P.spec=v.reduce(((se,ae)=>se?.[ae]),P.spec)||null),P})(n,i,{...t,...l}))({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.execute=function({http:t,fetch:n,spec:i,operationId:l,pathName:h,method:v,parameters:x,securities:w,...C}){const $=t||n||ni;h&&v&&!l&&(l=bP(h,v));const N=CX.buildRequest({spec:i,operationId:l,parameters:x,securities:w,http:$,...C});return N.body&&(Jh(N.body)||Array.isArray(N.body))&&(N.body=JSON.stringify(N.body)),$(N)},tr.serializeRes=Qp,tr.serializeHeaders=ti,tr.clearCache=function(){sp.refs.clearCache()},tr.makeApisTagOperation=function(t={}){const n=ZG(t);return{apis:YG({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:n})}},tr.buildRequest=AP,tr.helpers={opId:jx},tr.getBaseUrl=OP,tr.apidom={resolve:{resolvers:{HTTPResolverSwaggerClient:dP}},parse:{parsers:{JsonParser:hP,YamlParser:pP,OpenApiJson3_1Parser:fP,OpenApiYaml3_1Parser:mP}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:yP}}},tr.prototype={http:ni,execute(t){return this.applyDefaults(),tr.execute({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,...t})},resolve(t={}){return tr.resolve({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1,...t}).then((n=>(this.originalSpec=this.spec,this.spec=n.spec,this.errors=n.errors,this)))}},tr.prototype.applyDefaults=function(){const{spec:t}=this,n=this.url;if(DD(t)&&GG(n)){const i=new URL(n);t.host||(t.host=i.host),t.schemes||(t.schemes=[i.protocol.replace(":","")]),t.basePath||(t.basePath="/")}else if(ik(t)){const i=Array.isArray(t.servers)&&t.servers.length===0;t.servers&&!i||(t.servers=[zp])}};const ir={parameterTypeProperties:["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],arrayProperties:["items","minItems","maxItems","uniqueItems"],httpMethods:["get","post","put","delete","patch","head","options","trace"],uniqueOnly:function(t,n,i){return i.indexOf(t)===n},createHash:function(t){let n,i=0;if(t.length===0)return i;for(let l=0;l<t.length;l++)n=t.charCodeAt(l),i=(i<<5)-i+n,i|=0;return i},sanitise:kP,sanitiseAll:function(t){return kP(t.split("/").join("_"))},camelize:function(t){return t.toLowerCase().replace(/[-_ \/\.](.)/g,((n,i)=>i.toUpperCase()))},clone:function(t){return JSON.parse(JSON.stringify(t))},circularClone:function t(n,i=null){if(i||(i=new WeakMap),Object(n)!==n||n instanceof Function)return n;if(i.has(n))return i.get(n);let l;try{l=new n.constructor}catch{l=Object.create(Object.getPrototypeOf(n))}return i.set(n,l),Object.assign(l,...Object.keys(n).map((h=>({[h]:t(n[h],i)}))))}};function RP(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}const AX={getDefaultState:RP,walkSchema:function t(n,i,l,h){if(l.depth===void 0&&(l=RP()),n==null||(l.combine&&(n.allOf&&Array.isArray(n.allOf)&&n.allOf.length===1&&delete(n={...n.allOf[0],...n})?.allOf,n?.anyOf&&Array.isArray(n.anyOf)&&n.anyOf.length===1&&delete(n={...n.anyOf[0],...n})?.anyOf,n?.oneOf&&Array.isArray(n.oneOf)&&n.oneOf.length===1&&delete(n={...n.oneOf[0],...n})?.oneOf),h(n,i,l),l.seen.has(n)))return n;if(typeof n=="object"&&n!==null&&l.seen.set(n,!0),l.top=!1,l.depth++,n?.items!==void 0&&(l.property="items",t(n.items,n,l,h)),n?.additionalItems&&typeof n.additionalItems=="object"&&(l.property="additionalItems",t(n.additionalItems,n,l,h)),n?.additionalProperties&&typeof n.additionalProperties=="object"&&(l.property="additionalProperties",t(n.additionalProperties,n,l,h)),n?.properties)for(const v in n.properties){const x=n.properties[v];l.property=`properties/${v}`,t(x,n,l,h)}if(n?.patternProperties)for(const v in n.patternProperties){const x=n.patternProperties[v];l.property=`patternProperties/${v}`,t(x,n,l,h)}if(n?.allOf)for(const v in n.allOf){const x=n.allOf[v];l.property=`allOf/${v}`,t(x,n,l,h)}if(n?.anyOf)for(const v in n.anyOf){const x=n.anyOf[v];l.property=`anyOf/${v}`,t(x,n,l,h)}if(n?.oneOf)for(const v in n.oneOf){const x=n.oneOf[v];l.property=`oneOf/${v}`,t(x,n,l,h)}return n?.not&&(l.property="not",t(n.not,n,l,h)),l.depth--,n}};function uR(t,n,i){if(n||(n={depth:0}),n.depth||(n={path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1,...n}),typeof t!="object")return;const l=n.path;for(const h in t){if(n.key=h,n.path=`${n.path}/${encodeURIComponent(h)}`,n.identityPath=n.seen.get(t[h]),n.identity=n.identityPath!==void 0,t.hasOwnProperty(h)&&i(t,h,n),typeof t[h]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(t[h])&&t[h]!==null&&n.seen.set(t[h],n.path);const v={};v.parent=t,v.path=n.path,v.depth=n.depth?n.depth+1:1,v.pkey=h,v.payload=n.payload,v.seen=n.seen,v.identity=!1,v.identityDetection=n.identityDetection,uR(t[h],v,i)}n.path=l}}let TP;function dR(t,n){for(const i in t)i.startsWith("x-")&&!i.startsWith("x-s2o")&&(n[i]=t[i])}function AE(t,n){AX.walkSchema(t,{},{},((i,l)=>{(function(h){if(h["x-required"]&&Array.isArray(h["x-required"])&&(h.required||(h.required=[]),h.required=h.required.concat(h["x-required"]),delete h["x-required"]),h["x-anyOf"]&&(h.anyOf=h["x-anyOf"],delete h["x-anyOf"]),h["x-oneOf"]&&(h.oneOf=h["x-oneOf"],delete h["x-oneOf"]),h["x-not"]&&(h.not=h["x-not"],delete h["x-not"]),typeof h["x-nullable"]=="boolean"&&(h.nullable=h["x-nullable"],delete h["x-nullable"]),typeof h["x-discriminator"]=="object"&&typeof h["x-discriminator"].propertyName=="string"){h.discriminator=h["x-discriminator"],delete h["x-discriminator"];for(const v in h.discriminator.mapping){const x=h.discriminator.mapping[v];x.startsWith("#/definitions/")&&(h.discriminator.mapping[v]=x.replace("#/definitions/","#/components/schemas/"))}}})(i),(function(h,v,x){if(h.nullable&&x.patches++,h.discriminator&&typeof h.discriminator=="string"&&(h.discriminator={propertyName:h.discriminator}),h.items&&Array.isArray(h.items)&&(h.items.length===0?h.items={}:h.items.length===1?h.items=h.items[0]:h.items={anyOf:h.items}),h.type&&Array.isArray(h.type)){if(x.patches++,x.warnings.push("(Patchable) schema type must not be an array"),h.type.length===0)delete h.type;else{h.oneOf||(h.oneOf=[]);for(const w of h.type){const C={};if(w==="null")h.nullable=!0;else{C.type=w;for(const $ of ir.arrayProperties)h.prop!==void 0&&(C[$]=h[$],delete h[$])}C.type&&h.oneOf.push(C)}delete h.type,h.oneOf.length===0?delete h.oneOf:h.oneOf.length<2&&(h.type=h.oneOf[0].type,Object.keys(h.oneOf[0]).length>1&&(x.patches++,x.warnings.push("Lost properties from oneOf")),delete h.oneOf)}h.type&&Array.isArray(h.type)&&h.type.length===1&&(h.type=h.type[0])}h.type&&h.type==="null"&&(delete h.type,h.nullable=!0),h.type!=="array"||h.items||(h.items={}),h.type==="file"&&(h.type="string",h.format="binary"),typeof h.required=="boolean"&&(h.required&&h.name&&(v.required===void 0&&(v.required=[]),Array.isArray(v.required)&&v.required.push(h.name)),delete h.required),h.xml&&typeof h.xml.namespace=="string"&&(h.xml.namespace||delete h.xml.namespace),h.allowEmptyValue&&(delete h.allowEmptyValue,x.patches++,x.warnings.push("(Patchable): deleted schema.allowEmptyValue"))})(i,l,n)}))}function _P(t){for(const n in t)for(const i in t[n]){const l=ir.sanitise(i);i!==l&&(t[n][l]=t[n][i],delete t[n][i])}}function OX(t,n){if(t.type==="basic"&&(t.type="http",t.scheme="basic"),t.type==="oauth2"){const i={};let l=t.flow;t.flow==="application"&&(l="clientCredentials"),t.flow==="accessCode"&&(l="authorizationCode"),typeof t.authorizationUrl=="string"&&(i.authorizationUrl=t.authorizationUrl.split("?")[0].trim()||"/"),typeof t.tokenUrl=="string"&&(i.tokenUrl=t.tokenUrl.split("?")[0].trim()||"/"),i.scopes=t.scopes||{},t.flows={},t.flows[l]=i,delete t.flow,delete t.authorizationUrl,delete t.tokenUrl,delete t.scopes,t.name&&(delete t.name,n.patches++,n.warnings.push("(Patchable) oauth2 securitySchemes should not have name property"))}}function $P(t){return t&&!t["x-s2o-delete"]}function NP(t,n){if(t.type&&!t.schema&&(t.schema={}),t.type&&(t.schema.type=t.type),t.items&&t.items.type!=="array"){if(t.items.collectionFormat!==t.collectionFormat)return n.errCount++,void n.errors.push({message:"Nested collectionFormats are not supported",pointer:"/.../responses/header"});delete t.items.collectionFormat}t.type==="array"?(t.collectionFormat==="ssv"?(n.patches++,n.warnings.push("collectionFormat:ssv is no longer supported for headers")):t.collectionFormat==="pipes"?(n.patches++,n.warnings.push("collectionFormat:pipes is no longer supported for headers")):t.collectionFormat==="multi"?t.explode=!0:t.collectionFormat==="tsv"?(t["x-collectionFormat"]="tsv",n.patches++,n.warnings.push("collectionFormat:tsv is no longer supported")):t.style="simple",delete t.collectionFormat):t.collectionFormat&&(delete t.collectionFormat,n.patches++,n.warnings.push("(Patchable) collectionFormat is only applicable to header.type array")),delete t.type;for(const i of ir.parameterTypeProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i]);for(const i of ir.arrayProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i])}function OE(t,n,i,l,h,v,x){const w={};let C,$=!0;n&&n.consumes&&typeof n.consumes=="string"&&(n.consumes=[n.consumes],x.patches++,x.warnings.push("(Patchable) operation.consumes must be an array")),Array.isArray(v.consumes)||delete v.consumes;const N=((n?n.consumes:null)||v.consumes||[]).filter(ir.uniqueOnly);if(t&&(t.name||t.in)){typeof t["x-deprecated"]=="boolean"&&(t.deprecated=t["x-deprecated"],delete t["x-deprecated"]),t["x-example"]!==void 0&&(t.example=t["x-example"],delete t["x-example"]),t.in==="body"||t.type||(t.type="string",x.patches++,x.warnings.push("(Patchable) parameter.type is mandatory for non-body parameters")),t.type==="file"&&(t["x-s2o-originalType"]=t.type,C=t.type),t.description===null&&delete t.description;let _=t.collectionFormat;if(t.type!=="array"||_||(_="csv"),_&&(t.type!=="array"&&(delete t.collectionFormat,x.patches++,x.warnings.push("(Patchable) collectionFormat is only applicable to param.type array")),_!=="csv"||t.in!=="query"&&t.in!=="cookie"||(t.style="form",t.explode=!1),_!=="csv"||t.in!=="path"&&t.in!=="header"||(t.style="simple"),_==="ssv"&&(t.in==="query"?t.style="spaceDelimited":x.warnings.push(`${t.name} collectionFormat:ssv is no longer supported except for in:query parameters`)),_==="pipes"&&(t.in==="query"?t.style="pipeDelimited":x.warnings.push(`${t.name} collectionFormat:pipes is no longer supported except for in:query parameters`)),_==="multi"&&(t.explode=!0),_==="tsv"&&(x.warnings.push("collectionFormat:tsv is no longer supported"),t["x-collectionFormat"]="tsv"),delete t.collectionFormat),t.type&&t.type!=="body"&&t.in!=="formData")if(t.items&&t.schema)x.warnings.push(`${t.name} parameter has array,items and schema`);else{t.schema&&x.patches++,t.schema&&typeof t.schema=="object"||(t.schema={}),t.schema.type=t.type,t.items&&(t.schema.items=t.items,delete t.items,uR(t.schema.items,null,((F,U)=>{U==="collectionFormat"&&typeof F[U]=="string"&&(_&&F[U]!==_&&x.warnings.push(`${t.name} Nested collectionFormats are not supported`),delete F[U])})));for(const F of ir.parameterTypeProperties)t[F]!==void 0&&(t.schema[F]=t[F]),delete t[F]}t.schema&&AE(t.schema,x),t["x-ms-skip-url-encoding"]&&t.in==="query"&&(t.allowReserved=!0,delete t["x-ms-skip-url-encoding"])}if(t&&t.in==="formData"){$=!1,w.content={};let _="application/x-www-form-urlencoded";if(N.length&&N.indexOf("multipart/form-data")>=0&&(_="multipart/form-data"),w.content[_]={},t.schema)w.content[_].schema=t.schema;else{w.content[_].schema={},w.content[_].schema.type="object",w.content[_].schema.properties={},w.content[_].schema.properties[t.name]={};const F=w.content[_].schema,U=w.content[_].schema.properties[t.name];t.description&&(U.description=t.description),t.example&&(U.example=t.example),t.type&&(U.type=t.type);for(const J of ir.parameterTypeProperties)t[J]!==void 0&&(U[J]=t[J]);t.required===!0&&(F.required||(F.required=[]),F.required.push(t.name),w.required=!0),t.default!==void 0&&(U.default=t.default),U.properties&&(U.properties=t.properties),t.allOf&&(U.allOf=t.allOf),t.type==="array"&&t.items&&(U.items=t.items,U.items.collectionFormat&&delete U.items.collectionFormat),C!=="file"&&t["x-s2o-originalType"]!=="file"||(U.type="string",U.format="binary"),dR(t,U)}}else t&&t.type==="file"&&(t.required&&(w.required=t.required),w.content={},w.content["application/octet-stream"]={},w.content["application/octet-stream"].schema={},w.content["application/octet-stream"].schema.type="string",w.content["application/octet-stream"].schema.format="binary",dR(t,w));if(t&&t.in==="body"){w.content={},t.name&&(w["x-s2o-name"]=(n&&n.operationId?ir.sanitiseAll(n.operationId):"")+ir.camelize(`_${t.name}`)),t.description&&(w.description=t.description),t.required&&(w.required=t.required),N.length||N.push("application/json");for(const _ of N)w.content[_]={},w.content[_].schema=ir.clone(t.schema||{}),AE(w.content[_].schema,x);dR(t,w)}if(Object.keys(w).length>0&&(t["x-s2o-delete"]=!0,n))if(n.requestBody&&$){n.requestBody["x-s2o-overloaded"]=!0;const _=n.operationId||h;x.warnings.push(`Operation ${_} has multiple requestBodies`)}else n.requestBody||(n=(function(_,F){const U={};for(const J of Object.keys(_))U[J]=_[J],J==="parameters"&&(U.requestBody={},F.rbname&&(U[F.rbname]=""));return U.requestBody={},U})(n,x),i[l]=n),n.requestBody.content&&n.requestBody.content["multipart/form-data"]&&n.requestBody.content["multipart/form-data"].schema&&n.requestBody.content["multipart/form-data"].schema.properties&&w.content["multipart/form-data"]&&w.content["multipart/form-data"].schema&&w.content["multipart/form-data"].schema.properties?(n.requestBody.content["multipart/form-data"].schema.properties=Object.assign(n.requestBody.content["multipart/form-data"].schema.properties,w.content["multipart/form-data"].schema.properties),n.requestBody.content["multipart/form-data"].schema.required=(n.requestBody.content["multipart/form-data"].schema.required||[]).concat(w.content["multipart/form-data"].schema.required||[]),n.requestBody.content["multipart/form-data"].schema.required.length||delete n.requestBody.content["multipart/form-data"].schema.required):n.requestBody.content&&n.requestBody.content["application/x-www-form-urlencoded"]&&n.requestBody.content["application/x-www-form-urlencoded"].schema&&n.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&w.content["application/x-www-form-urlencoded"]&&w.content["application/x-www-form-urlencoded"].schema&&w.content["application/x-www-form-urlencoded"].schema.properties?(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties,w.content["application/x-www-form-urlencoded"].schema.properties),n.requestBody.content["application/x-www-form-urlencoded"].schema.required=(n.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(w.content["application/x-www-form-urlencoded"].schema.required||[]),n.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete n.requestBody.content["application/x-www-form-urlencoded"].schema.required):(n.requestBody=Object.assign(n.requestBody,w),n.requestBody["x-s2o-name"]||n.operationId&&(n.requestBody["x-s2o-name"]=ir.sanitiseAll(n.operationId)));if(t&&!t["x-s2o-delete"]){delete t.type;for(const _ of ir.parameterTypeProperties)delete t[_];t.in!=="path"||t.required!==void 0&&t.required===!0||(t.required=!0,x.patches++,x.warnings.push(`(Patchable) path parameters must be required:true [${t.name} in ${h}]`))}return n}function DP(t,n,i,l){if(!t)return!1;if(t.description||typeof t!="object"||Array.isArray(t)||(l.patches++,l.warnings.push("(Patchable) response.description is mandatory")),t.schema!==void 0){AE(t.schema,l),n&&n.produces&&typeof n.produces=="string"&&(n.produces=[n.produces],l.patches++,l.warnings.push("(Patchable) operation.produces must be an array")),i.produces&&!Array.isArray(i.produces)&&delete i.produces;const h=((n?n.produces:null)||i.produces||[]).filter(ir.uniqueOnly);h.length||h.push("*/*"),t.content={};for(const v of h){if(t.content[v]={},t.content[v].schema=ir.clone(t.schema),t.examples&&t.examples[v]){const x={};x.value=t.examples[v],t.content[v].examples={},t.content[v].examples.response=x,delete t.examples[v]}t.content[v].schema.type==="file"&&(t.content[v].schema={type:"string",format:"binary"})}delete t.schema}for(const h in t.examples)t.content||(t.content={}),t.content[h]||(t.content[h]={}),t.content[h].examples={},t.content[h].examples.response={},t.content[h].examples.response.value=t.examples[h];if(delete t.examples,t.headers)for(const h in t.headers)h.toLowerCase()==="status code"?(delete t.headers[h],l.patches++,l.warnings.push('(Patchable) "Status Code" is not a valid header')):NP(t.headers[h],l)}function PP(t,n,i,l,h){for(const v in t){const x=t[v];x&&x["x-trace"]&&typeof x["x-trace"]=="object"&&(x.trace=x["x-trace"],delete x["x-trace"]),x&&x["x-summary"]&&typeof x["x-summary"]=="string"&&(x.summary=x["x-summary"],delete x["x-summary"]),x&&x["x-description"]&&typeof x["x-description"]=="string"&&(x.description=x["x-description"],delete x["x-description"]),x&&x["x-servers"]&&Array.isArray(x["x-servers"])&&(x.servers=x["x-servers"],delete x["x-servers"]);for(const w in x)if(ir.httpMethods.indexOf(w)>=0||w==="x-amazon-apigateway-any-method"){let C=x[w];if(C&&C.parameters&&Array.isArray(C.parameters)){if(x.parameters)for(const $ of x.parameters)C.parameters.find((N=>N.name===$.name&&N.in===$.in))||$.in!=="formData"&&$.in!=="body"&&$.type!=="file"||(C=OE($,C,x,w,v,h,i));for(const $ of C.parameters)C=OE($,C,x,w,`${w}: ${v}`,h,i);C.parameters&&(C.parameters=C.parameters.filter($P))}if(C&&C.security&&_P(C.security),typeof C=="object"){if(!C.responses){const $={description:"Default response"};C.responses={default:$}}for(const $ in C.responses)DP(C.responses[$],C,h,i)}if(C&&C["x-servers"]&&Array.isArray(C["x-servers"]))C.servers=C["x-servers"],delete C["x-servers"];else if(C&&C.schemes&&C.schemes.length){for(const $ of C.schemes)if((!h.schemes||h.schemes.indexOf($)<0)&&(C.servers||(C.servers=[]),Array.isArray(h.servers)))for(const N of h.servers){const _=ir.clone(N);C.servers.push(_)}}if(C){if(delete C.consumes,delete C.produces,delete C.schemes,C["x-ms-examples"]){for(const $ in C["x-ms-examples"]){const N=C["x-ms-examples"][$],_=ir.sanitiseAll($);if(N.parameters)for(const F in N.parameters){const U=N.parameters[F];for(const J of(C.parameters||[]).concat(x.parameters||[]))J.name!==F||J.example||(J.examples||(J.examples={}),J.examples[$]={value:U})}if(N.responses)for(const F in N.responses){if(N.responses[F].headers)for(const U in N.responses[F].headers){const J=N.responses[F].headers[U];for(const Y in C.responses[F].headers)Y===U&&(C.responses[F].headers[Y].example=J)}if(N.responses[F].body&&(h.components.examples[_]={value:ir.clone(N.responses[F].body)},C.responses[F]&&C.responses[F].content))for(const U in C.responses[F].content){const J=C.responses[F].content[U];J.examples||(J.examples={}),J.examples[$]={$ref:`#/components/examples/${_}`}}}}delete C["x-ms-examples"]}if(C.parameters&&C.parameters.length===0&&delete C.parameters,C.requestBody){const $=C.operationId?ir.sanitiseAll(C.operationId):ir.camelize(ir.sanitiseAll(w+v)),N=ir.sanitise(C.requestBody["x-s2o-name"]||$||"");delete C.requestBody["x-s2o-name"];const _=JSON.stringify(C.requestBody),F=ir.createHash(_);if(!l[F]){const J={};J.name=N,J.body=C.requestBody,J.refs=[],l[F]=J}const U=`#/${n}/${encodeURIComponent(v)}/${w}/requestBody`;l[F].refs.push(U)}}}if(x&&x.parameters){for(const w in x.parameters)OE(x.parameters[w],null,x,null,v,h,i);Array.isArray(x.parameters)&&(x.parameters=x.parameters.filter($P))}}}function MP(t){return t&&t.url&&typeof t.url=="string"&&(t.url=t.url.split("{{").join("{"),t.url=t.url.split("}}").join("}"),t.url.replace(/\{(.+?)\}/g,((n,i)=>{t.variables||(t.variables={}),t.variables[i]={default:"unknown"}}))),t}function IP(t,n){t.info!==void 0&&t.info!==null||(t.info={version:"",title:""},n.patches++,n.warnings.push("(Patchable) info object is mandatory")),(typeof t.info!="object"||Array.isArray(t.info))&&(n.errCount++,n.errors.push({message:"info must be an object",pointer:"/info"})),t.info&&(t.info.title===void 0&&(n.patches++,t.info.title="",n.warnings.push({message:"(Patchable) info.title cannot be null",pointer:"/info/title",patchable:!0})),t.info.version===void 0?(n.patches++,t.info.version="",n.warnings.push("(Patchable) info.version cannot be null")):typeof t.info.version!="string"&&(n.patches++,t.info.version=t.info.version.toString(),n.warnings.push("(Patchable) info.version must be a string")))}function LP(t,n){t.paths||(n.patches++,t.paths={},n.warnings.push("(Patchable) paths object is mandatory"))}function kX(t={}){const n={original:t,openapi:{},patches:0,warnings:[],errCount:0,errors:[]};if(t.openapi&&typeof t.openapi=="string"&&t.openapi.startsWith("3."))return n.openapi=ir.circularClone(t),IP(n.openapi,n),LP(n.openapi,n),n;if(t.swagger!=="2.0")return n.errCount++,n.errors.push({message:`Unsupported swagger/OpenAPI version: ${t.openapi?t.openapi:t.swagger}`,pointer:"/swagger"}),n;if(n.openapi=ir.circularClone(t),n.openapi.openapi="3.0.0",delete n.openapi.swagger,uR(n.openapi,{},((i,l,h)=>{i[l]===null&&!l.startsWith("x-")&&l!=="default"&&h.path.indexOf("/example")<0&&delete i[l]})),t.host)(t.schemes||[]).forEach((i=>{const l={},h=(t.basePath||"").replace(/\/$/,"");l.url=`${i?`${i}:`:""}//${t.host}${h}`,MP(l),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(l)}));else if(t.basePath){const i={};i.url=t.basePath,MP(i),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(i)}if(delete n.openapi.host,delete n.openapi.basePath,t["x-ms-parameterized-host"]){const i=t["x-ms-parameterized-host"],l={};l.url=i.hostTemplate+(t.basePath?t.basePath:""),l.variables={};const h=l.url.match(/\{\w+\}/g);for(const v in i.parameters){const x=i.parameters[v];v.startsWith("x-")||(delete x.required,delete x.type,delete x.in,x.default===void 0&&(x.enum?x.default=x.enum[0]:x.default="none"),x.name||(x.name=h[v].replace("{","").replace("}","")),l.variables[x.name]=x,delete x.name)}n.openapi.servers||(n.openapi.servers=[]),i.useSchemePrefix===!1?n.openapi.servers.push(l):t.schemes.forEach((v=>{n.openapi.servers.push({...l,url:`${v}://${l.url}`})})),delete n.openapi["x-ms-parameterized-host"]}return IP(n.openapi,n),LP(n.openapi,n),typeof n.openapi.consumes=="string"&&(n.openapi.consumes=[n.openapi.consumes]),typeof n.openapi.produces=="string"&&(n.openapi.produces=[n.openapi.produces]),n.openapi.components={},n.openapi["x-callbacks"]&&(n.openapi.components.callbacks=n.openapi["x-callbacks"],delete n.openapi["x-callbacks"]),n.openapi.components.examples={},n.openapi.components.headers={},n.openapi["x-links"]&&(n.openapi.components.links=n.openapi["x-links"],delete n.openapi["x-links"]),n.openapi.components.parameters=n.openapi.parameters||{},n.openapi.components.responses=n.openapi.responses||{},n.openapi.components.requestBodies={},n.openapi.components.securitySchemes=n.openapi.securityDefinitions||{},n.openapi.components.schemas=n.openapi.definitions||{},delete n.openapi.definitions,delete n.openapi.responses,delete n.openapi.parameters,delete n.openapi.securityDefinitions,(function(i){const l=i.openapi,h={};TP={schemas:{}},l.security&&_P(l.security);for(const v in l.components.securitySchemes){const x=ir.sanitise(v);if(v!==x){if(l.components.securitySchemes[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised securityScheme name ${x}`,pointer:`/components/securitySchemes/${x}`}),i;l.components.securitySchemes[x]=l.components.securitySchemes[v],delete l.components.securitySchemes[v]}OX(l.components.securitySchemes[x],i)}for(const v in l.components.schemas){const x=ir.sanitiseAll(v);let w=0;if(v!==x){for(;l.components.schemas[x+w];)w=w?++w:2;l.components.schemas[x+w]=l.components.schemas[v],delete l.components.schemas[v]}TP.schemas[v]=x+w,AE(l.components.schemas[`${x}${w}`],i)}for(const v in l.components.parameters){const x=ir.sanitise(v);if(v!==x){if(l.components.parameters[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised parameter name ${x}`,pointer:`/components/parameters/${x}`}),i;l.components.parameters[x]=l.components.parameters[v],delete l.components.parameters[v]}OE(l.components.parameters[x],null,null,null,x,l,i)}for(const v in l.components.responses){const x=ir.sanitise(v);if(v!==x){if(l.components.responses[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised response name ${x}`,pointer:`/components/responses/${x}`}),i;l.components.responses[x]=l.components.responses[v],delete l.components.responses[v]}const w=l.components.responses[x];if(DP(w,null,l,i),w.headers)for(const C in w.headers)C.toLowerCase()==="status code"?(delete w.headers[C],i.patches++,i.warnings.push('(Patchable) "Status Code" is not a valid header')):NP(w.headers[C],i)}for(const v in l.components.requestBodies){const x=l.components.requestBodies[v],w=JSON.stringify(x),C=ir.createHash(w),$={};$.name=v,$.body=x,$.refs=[],h[C]=$}PP(l.paths,"paths",i,h,l),l["x-ms-paths"]&&PP(l["x-ms-paths"],"x-ms-paths",i,h,l);for(const v in l.components.parameters)l.components.parameters[v]["x-s2o-delete"]&&delete l.components.parameters[v];return delete l.consumes,delete l.produces,delete l.schemes,l.components.requestBodies={},l.components.responses&&Object.keys(l.components.responses).length===0&&delete l.components.responses,l.components.parameters&&Object.keys(l.components.parameters).length===0&&delete l.components.parameters,l.components.examples&&Object.keys(l.components.examples).length===0&&delete l.components.examples,l.components.requestBodies&&Object.keys(l.components.requestBodies).length===0&&delete l.components.requestBodies,l.components.securitySchemes&&Object.keys(l.components.securitySchemes).length===0&&delete l.components.securitySchemes,l.components.headers&&Object.keys(l.components.headers).length===0&&delete l.components.headers,l.components.schemas&&Object.keys(l.components.schemas).length===0&&delete l.components.schemas,l.components&&Object.keys(l.components).length===0&&delete l.components,i})(n)}function RX(t){return t.ok&&t.text&&t.parseError&&t.parseError.name==="YAMLException"&&(!t.headers["content-type"]||t.headers["content-type"].match("text/plain"))&&(t.body=t.text),t}const zP=function(t){return new Promise((async n=>{try{const i=await tr.resolve(t,RX);if(i.errors&&i.errors.length>0)n(i);else{i.spec.openapi&&(i.resolvedSpec=i.spec,n(i));const l=kX(i.spec);l.errors&&l.errors.length>0&&(Array.isArray(i.errors)?i.errors.concat(i.errors):i.errors=l.errors),l.warnings&&l.warnings.length>0&&(i.warnings=l.warnings),i.resolvedSpec=i.spec,i.spec=l.openapi,n(i)}}catch(i){n(i)}}))};async function hR(t,n=!1,i=!1,l=!1,h="",v="",x="",w="",C="",$="",N="",_=""){var F,U;let J;try{var Y,W;let Se;if(this.requestUpdate(),Se=typeof t=="string"?await zP({url:t,allowMetaPatches:!1}):await zP({spec:t,allowMetaPatches:!1}),await Cu(0),(Y=Se.resolvedSpec)!==null&&Y!==void 0&&Y.jsonSchemaViewer&&(W=Se.resolvedSpec)!==null&&W!==void 0&&W.schemaAndExamples){this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:Se.resolvedSpec}}));const me=Object.entries(Se.resolvedSpec.schemaAndExamples).map((Me=>({show:!0,expanded:!0,selectedExample:null,name:Me[0],elementId:Me[0].replace(eh,"-"),...Me[1]})));return{specLoadError:!1,isSpecLoading:!1,info:Se.resolvedSpec.info,schemaAndExamples:me}}var P,se,ae,he;if(!Se.spec||!(Se.spec.components||Se.spec.info||Se.spec.servers||Se.spec.tags||Se.spec.paths))return console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Se),{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:(P=Se.response)!==null&&P!==void 0&&P.url?`${(se=Se.response)===null||se===void 0?void 0:se.url} ┃ ${(ae=Se.response)===null||ae===void 0?void 0:ae.status} ${(he=Se.response)===null||he===void 0?void 0:he.statusText}`:"Unable to load the Spec",version:" "},tags:[]};J=(function(me,Me="",Ie="",Qe=""){const ct={},qt=Qe.split(",").map((on=>on.trim().toLowerCase())).filter(Boolean);function kn(on,nr){if(!Me)return!0;const yi=`${nr} ${on}`.toLowerCase();return Ie==="regex"?new RegExp(Me,"i").test(Me.toLowerCase()):yi.includes(Me.toLowerCase())}function Tt(on){return on.some((nr=>qt.includes(nr?.label.toLowerCase())))}return Object.entries(me.paths).forEach((([on,nr])=>{const yi={};Object.entries(nr).forEach((([Zn,Ln])=>{const Ni=Ln["x-badges"];kn(on,Zn)&&(Ni&&Array.isArray(Ni)&&Tt(Ni)||(yi[Zn]=Ln))})),Object.keys(yi).length>0&&(ct[on]=yi)})),me.paths=ct,me})(Se.spec,$,N,_),this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:J}}))}catch(Se){console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Se)}const ge=(function(Se,me,Me=!1,Ie=!1){const Qe=["get","put","post","delete","patch","head","options"],ct=Se.tags&&Array.isArray(Se.tags)&&Se.tags.length>0?Se.tags.map((Tt=>({show:!0,elementId:`tag--${Tt.name.replace(eh,"-")}`,name:Tt.name,displayName:Tt["x-displayName"]||Tt.name,description:Tt.description||"",headers:Tt.description?pR(Tt.description):[],paths:[],expanded:Tt["x-tag-expanded"]!==!1}))):[],qt=Se.paths||{};if(Se.webhooks)for(const[Tt,on]of Object.entries(Se.webhooks))on._type="webhook",qt[Tt]=on;for(const Tt in qt){const on=qt[Tt].parameters,nr={servers:qt[Tt].servers||[],parameters:qt[Tt].parameters||[]},yi=qt[Tt]._type==="webhook";Qe.forEach((Zn=>{if(qt[Tt][Zn]){const Ln=Se.paths[Tt][Zn],Ni=Ln.tags||[];if(Ni.length===0)if(Me){const kr=Tt.replace(/^\/+|\/+$/g,""),Tr=kr.indexOf("/");Tr===-1?Ni.push(kr):Ni.push(kr.substring(0,Tr))}else Ni.push("General ⦂");Ni.forEach((kr=>{let Tr,Ir;var la,Zl;Se.tags&&(Ir=Se.tags.find((ds=>ds.name.toLowerCase()===kr.toLowerCase()))),Tr=ct.find((ds=>ds.name===kr)),Tr||(Tr={show:!0,elementId:`tag--${kr.replace(eh,"-")}`,name:kr,description:((la=Ir)===null||la===void 0?void 0:la.description)||"",headers:(Zl=Ir)!==null&&Zl!==void 0&&Zl.description?pR(Ir.description):[],paths:[],expanded:!Ir||Ir["x-tag-expanded"]!==!1},ct.push(Tr));let Kr=(Ln.summary||Ln.description||`${Zn.toUpperCase()} ${Tt}`).trim();Kr.length>100&&([Kr]=Kr.split(/[.|!|?]\s|[\r?\n]/));let Uo=[];if(Uo=on?Ln.parameters?on.filter((ds=>{if(!Ln.parameters.some((Ko=>ds.name===Ko.name&&ds.in===Ko.in)))return ds})).concat(Ln.parameters):on.slice(0):Ln.parameters?Ln.parameters.slice(0):[],Ln.callbacks)for(const[ds,Ko]of Object.entries(Ln.callbacks)){const pp=Object.entries(Ko).filter((eb=>typeof eb[1]=="object"))||[];Ln.callbacks[ds]=Object.fromEntries(pp)}Tr.paths.push({show:!0,expanded:!1,isWebhook:yi,expandedAtLeastOnce:!1,summary:Ln.summary||"",description:Ln.description||"",externalDocs:Ln.externalDocs,shortSummary:Kr,method:Zn,path:Tt,operationId:Ln.operationId,elementId:`${Zn}-${Tt.replace(eh,"-")}`,servers:Ln.servers?nr.servers.concat(Ln.servers):nr.servers,parameters:Uo,requestBody:Ln.requestBody,responses:Ln.responses,callbacks:Ln.callbacks,deprecated:Ln.deprecated,security:Ln.security,xBadges:Ln["x-badges"]||void 0,xCodeSamples:Ln["x-codeSamples"]||Ln["x-code-samples"]||""})}))}}))}const kn=ct.filter((Tt=>Tt.paths&&Tt.paths.length>0));return kn.forEach((Tt=>{me==="method"?Tt.paths.sort(((on,nr)=>Qe.indexOf(on.method).toString().localeCompare(Qe.indexOf(nr.method)))):me==="summary"?Tt.paths.sort(((on,nr)=>on.shortSummary.localeCompare(nr.shortSummary))):me==="path"&&Tt.paths.sort(((on,nr)=>on.path.localeCompare(nr.path))),Tt.firstPathId=Tt.paths[0].elementId})),Ie?kn.sort(((Tt,on)=>Tt.name.localeCompare(on.name))):kn})(J,h,n,i),pe=(function(Se,me=!1){if(!Se.components)return[];const Me=[];for(const Ie in Se.components){const Qe=[];for(const Tt in Se.components[Ie]){const on={show:!0,id:`${Ie.toLowerCase()}-${Tt.toLowerCase()}`.replace(eh,"-"),name:Tt,component:Se.components[Ie][Tt]};Qe.push(on)}let ct=Ie,qt=Ie;switch(Ie){case"schemas":me&&Qe.sort(((Tt,on)=>Tt.name.localeCompare(on.name))),qt="Schemas",ct="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":qt="Responses",ct="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":qt="Parameters",ct="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":qt="Examples",ct="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":qt="Request Bodies",ct="Describes common request bodies that are used across the API operations.";break;case"headers":qt="Headers",ct='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":qt="Security Schemes",ct="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":qt="Links",ct="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":qt="Callbacks",ct="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:qt=Ie,ct=Ie}const kn={show:!0,name:qt,description:ct,subComponents:Qe};Me.push(kn)}return Me||[]})(J,l),Te=(F=J.info)!==null&&F!==void 0&&F.description?pR(J.info.description):[],Ae=[];if((U=J.components)!==null&&U!==void 0&&U.securitySchemes){const Se=new Set;Object.entries(J.components.securitySchemes).forEach((me=>{if(!Se.has(me[0])){Se.add(me[0]);const Me={securitySchemeId:me[0],...me[1]};Me.value="",Me.finalKeyValue="",me[1].type==="apiKey"||me[1].type==="http"?(Me.in=me[1].in||"header",Me.name=me[1].name||"Authorization",Me.user="",Me.password=""):me[1].type==="oauth2"&&(Me.in="header",Me.name="Authorization",Me.clientId="",Me.clientSecret=""),Ae.push(Me)}}))}v&&x&&w&&Ae.push({securitySchemeId:ho,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:v,in:x,value:w,finalKeyValue:w}),Ae.forEach((Se=>{Se.type==="http"?Se.typeDisplay=Se.scheme==="basic"?"HTTP Basic":"HTTP Bearer":Se.type==="apiKey"?Se.typeDisplay=`API Key (${Se.name})`:Se.type==="oauth2"?Se.typeDisplay=`OAuth (${Se.securitySchemeId})`:Se.typeDisplay=Se.type||"None"}));let qe=[];return J.servers&&Array.isArray(J.servers)&&J.servers.length>0?(J.servers.forEach((Se=>{let me=Se.url.trim();me.startsWith("http")||me.startsWith("//")||me.startsWith("{")||window.location.origin.startsWith("http")&&(Se.url=window.location.origin+Se.url,me=Se.url),Se.variables&&Object.entries(Se.variables).forEach((Me=>{const Ie=new RegExp(`{${Me[0]}}`,"g");me=me.replace(Ie,Me[1].default||""),Me[1].value=Me[1].default||""})),Se.computedUrl=me})),C&&J.servers.push({url:C,computedUrl:C})):C?J.servers=[{url:C,computedUrl:C}]:window.location.origin.startsWith("http")?J.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:J.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],qe=J.servers,{specLoadError:!1,isSpecLoading:!1,info:J.info,infoDescriptionHeaders:Te,tags:ge,components:pe,externalDocs:J.externalDocs,securitySchemes:Ae,servers:qe}}function pR(t){return ht.lexer(t).filter((i=>i.type==="heading"&&i.depth<=2))||[]}const FP=1,TX=2,qP=3,BP=4,fR=t=>(...n)=>({_$litDirective$:t,values:n});class mR{constructor(n){}get _$AU(){return this._$AM._$AU}_$AT(n,i,l){this.t=n,this._$AM=i,this.i=l}_$AS(n,i){return this.update(n,i)}update(n,i){return this.render(...i)}}class gR extends mR{constructor(n){if(super(n),this.it=cn,n.type!==TX)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(n){if(n===cn||n==null)return this._t=void 0,this.it=n;if(n===Dn)return n;if(typeof n!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(n===this.it)return this._t;this.it=n;const i=[n];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}gR.directiveName="unsafeHTML",gR.resultType=1;const In=fR(gR);var UP=g(287).hp;const _X="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",$X="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",KP="rapidoc";function up(t,n="",i="",l=""){var h,v;const x=(h=this.resolvedSpec.securitySchemes)===null||h===void 0?void 0:h.find(($=>$.securitySchemeId===t));if(!x)return!1;let w="";if(((v=x.scheme)===null||v===void 0?void 0:v.toLowerCase())==="basic")n&&(w=`Basic ${UP.from(`${n}:${i}`,"utf8").toString("base64")}`);else if(l){var C;x.value=l,w=`${((C=x.scheme)===null||C===void 0?void 0:C.toLowerCase())==="bearer"?"Bearer ":""}${l}`}return!!w&&(x.finalKeyValue=w,this.requestUpdate(),!0)}function yR(){var t;(t=this.resolvedSpec.securitySchemes)===null||t===void 0||t.forEach((n=>{n.user="",n.password="",n.value="",n.finalKeyValue=""})),this.requestUpdate()}function vR(){return JSON.parse(localStorage.getItem(KP))||{}}function VP(t){localStorage.setItem(KP,JSON.stringify(t))}function NX(){const t=vR.call(this);Object.values(t).forEach((n=>{up.call(this,n.securitySchemeId,n.username,n.password,n.value)}))}function HP(t){let n="";const i=this.resolvedSpec.securitySchemes.find((l=>l.securitySchemeId===t));if(i){const l=this.shadowRoot.getElementById(`security-scheme-${t}`);if(l){if(i.type&&i.scheme&&i.type==="http"&&i.scheme.toLowerCase()==="basic"){const h=l.querySelector(".api-key-user").value.trim(),v=l.querySelector(".api-key-password").value.trim();up.call(this,t,h,v)}else n=l.querySelector(".api-key-input").value.trim(),up.call(this,t,"","",n);if(this.persistAuth==="true"){const h=vR.call(this);h[t]=i,VP.call(this,h)}}}}function GP(t,n,i="Bearer"){const l=this.resolvedSpec.securitySchemes.find((h=>h.securitySchemeId===t));l.finalKeyValue=`${i.toLowerCase()==="bearer"?"Bearer":i.toLowerCase()==="mac"?"MAC":i} ${n}`,this.requestUpdate()}async function xR(t,n,i,l,h,v,x,w,C="header",$=null,N=null,_=null){const F=w?w.querySelector(".oauth-resp-display"):void 0,U=new URLSearchParams,J=new Headers;U.append("grant_type",h),h==="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),h!=="client_credentials"&&h!=="password"&&U.append("redirect_uri",l),v&&(U.append("code",v),U.append("code_verifier",_X)),C==="header"?J.set("Authorization",`Basic ${UP.from(`${n}:${i}`,"utf8").toString("base64")}`):h!=="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),h==="password"&&(U.append("username",N),U.append("password",_)),$&&U.append("scope",$);try{const Y=await fetch(t,{method:"POST",headers:J,body:U}),W=await Y.json();if(!Y.ok)return F&&(F.innerHTML=`<span style="color:var(--red)">${W.error_description||W.error_description||"Unable to get access token"}</span>`),!1;if(W.token_type&&W.access_token)return GP.call(this,x,W.access_token,W.token_type),F&&(F.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}catch{return F&&(F.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function DX(t,n,i,l,h,v,x,w,C,$){sessionStorage.removeItem("winMessageEventActive"),n.close(),t.data.fake||(t.data||console.warn("RapiDoc: Received no data with authorization message"),t.data.error&&console.warn("RapiDoc: Error while receiving data"),t.data&&(t.data.responseType==="code"?xR.call(this,i,l,h,v,x,t.data.code,C,$,w):t.data.responseType==="token"&&GP.call(this,C,t.data.access_token,t.data.token_type)))}async function PX(t,n,i,l,h){const v=h.target.closest(".oauth-flow"),x=v.querySelector(".oauth-client-id")?v.querySelector(".oauth-client-id").value.trim():"",w=v.querySelector(".oauth-client-secret")?v.querySelector(".oauth-client-secret").value.trim():"",C=v.querySelector(".api-key-user")?v.querySelector(".api-key-user").value.trim():"",$=v.querySelector(".api-key-password")?v.querySelector(".api-key-password").value.trim():"",N=v.querySelector(".oauth-send-client-secret-in")?v.querySelector(".oauth-send-client-secret-in").value.trim():"header",_=[...v.querySelectorAll(".scope-checkbox:checked")],F=v.querySelector(`#${t}-pkce`),U=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,J=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,Y=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`);let W,P="",se="";if([...v.parentNode.querySelectorAll(".oauth-resp-display")].forEach((ae=>{ae.innerHTML=""})),n==="authorizationCode"||n==="implicit"){const ae=new URL(i);n==="authorizationCode"?(P="authorization_code",se="code"):n==="implicit"&&(se="token");const he=new URLSearchParams(ae.search),ge=_.map((pe=>pe.value)).join(" ");ge&&he.set("scope",ge),he.set("client_id",x),he.set("redirect_uri",Y.toString()),he.set("response_type",se),he.set("state",U),he.set("nonce",J),F&&F.checked&&(he.set("code_challenge",$X),he.set("code_challenge_method","S256")),he.set("show_dialog",!0),ae.search=he.toString(),sessionStorage.getItem("winMessageEventActive")==="true"&&window.postMessage({fake:!0},this),setTimeout((()=>{W=window.open(ae.toString()),W?(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",(pe=>DX.call(this,pe,W,l,x,w,Y.toString(),P,N,t,v)),{once:!0})):console.error(`RapiDoc: Unable to open ${ae.toString()} in a new window`)}),10)}else if(n==="clientCredentials"){P="client_credentials";const ae=_.map((he=>he.value)).join(" ");xR.call(this,l,x,w,Y.toString(),P,"",t,v,N,ae)}else if(n==="password"){P="password";const ae=_.map((he=>he.value)).join(" ");xR.call(this,l,x,w,Y.toString(),P,"",t,v,N,ae,C,$)}}function MX(t,n,i,l,h,v=[],x="header",w=void 0){var C;let{authorizationUrl:$,tokenUrl:N,refreshUrl:_}=h;const F=h["x-pkce-only"]||!1,U=W=>W.indexOf("://")>0||W.indexOf("//")===0,J=new URL((C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl).origin;let Y;return _&&!U(_)&&(_=`${J}/${_.replace(/^\//,"")}`),N&&!U(N)&&(N=`${J}/${N.replace(/^\//,"")}`),$&&!U($)&&($=`${J}/${$.replace(/^\//,"")}`),Y=t==="authorizationCode"?"Authorization Code Flow":t==="clientCredentials"?"Client Credentials Flow":t==="implicit"?"Implicit Flow":t==="password"?"Password Flow":t,V`
|
||
<div class="oauth-flow ${t}" style="padding: 12px 0; margin-bottom:12px;">
|
||
<div class="tiny-title upper" style="margin-bottom:8px;">${Y}</div>
|
||
${$?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Auth URL</span> <span class="mono-font"> ${$} </span></div>`:""}
|
||
${N?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Token URL</span> <span class="mono-font">${N}</span></div>`:""}
|
||
${_?V`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Refresh URL</span> <span class="mono-font">${_}</span></div>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?V`
|
||
${h.scopes?V`
|
||
<span> Scopes </span>
|
||
<div class= "oauth-scopes" part="section-auth-scopes" style = "width:100%; display:flex; flex-direction:column; flex-wrap:wrap; margin:0 0 10px 24px">
|
||
${Object.entries(h.scopes).map(((W,P)=>V`
|
||
<div class="m-checkbox" style="display:inline-flex; align-items:center">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${l}${t}${P}" ?checked="${v.includes(W[0])}" value="${W[0]}">
|
||
<label for="${l}${t}${P}" style="margin-left:5px; cursor:pointer">
|
||
<span class="mono-font">${W[0]}</span>
|
||
${W[0]!==W[1]?` - ${W[1]||""}`:""}
|
||
</label>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`:""}
|
||
${t==="password"?V`
|
||
<div style="margin:5px 0">
|
||
<input type="text" value = "" placeholder="username" spellcheck="false" class="oauth2 ${t} ${l} api-key-user" part="textbox textbox-username" id="input-${l}-${t}-api-key-user">
|
||
<input type="password" value = "" placeholder="password" spellcheck="false" class="oauth2 ${t} ${l} api-key-password" style = "margin:0 5px;" part="textbox textbox-password" id="input-${l}-${t}-api-key-password">
|
||
</div>`:""}
|
||
<div>
|
||
${t==="authorizationCode"?V`
|
||
<div style="margin: 16px 0 4px">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" id="${l}-pkce" checked ?disabled=${F}>
|
||
<label for="${l}-pkce" style="margin:0 16px 0 4px; line-height:24px; cursor:pointer">
|
||
Send Proof Key for Code Exchange (PKCE)
|
||
</label>
|
||
</div>
|
||
`:""}
|
||
<input type="text" part="textbox textbox-auth-client-id" value = "${n||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${t} ${l} oauth-client-id">
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="password"?V`
|
||
<input
|
||
id="${l}-${t}-oauth-client-secret"
|
||
type="password" part="textbox textbox-auth-client-secret"
|
||
value = "${i||""}" placeholder="client-secret" spellcheck="false"
|
||
class="oauth2 ${t} ${l}
|
||
oauth-client-secret"
|
||
style = "margin:0 5px;${F?"display:none;":""}"
|
||
>
|
||
<select style="margin-right:5px;${F?"display:none;":""}" class="${t} ${l} oauth-send-client-secret-in">
|
||
${!w||w.includes("header")?V`<option value = 'header' .selected = ${x==="header"} > Authorization Header </option>`:""}
|
||
${!w||w.includes("request-body")?V` <option value = 'request-body' .selected = ${x==="request-body"}> Request Body </option>`:""}
|
||
</select>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?V`
|
||
<button class="m-btn thin-border" part="btn btn-outline"
|
||
@click="${W=>{PX.call(this,l,t,$,N,W)}}"
|
||
> GET TOKEN </button>`:""}
|
||
</div>
|
||
<div class="oauth-resp-display red-text small-font-size"></div>
|
||
`:""}
|
||
</div>
|
||
`}function IX(t){var n;const i=(n=this.resolvedSpec.securitySchemes)===null||n===void 0?void 0:n.find((l=>l.securitySchemeId===t));if(i.user="",i.password="",i.value="",i.finalKeyValue="",this.persistAuth==="true"){const l=vR.call(this);delete l[i.securitySchemeId],VP.call(this,l)}this.requestUpdate()}function XP(){var t;if(!this.resolvedSpec)return"";const n=(t=this.resolvedSpec.securitySchemes)===null||t===void 0?void 0:t.filter((i=>i.finalKeyValue));return n?V`
|
||
<section id='auth' part="section-auth" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class = 'observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}'>
|
||
<div class='sub-title regular-font'> AUTHENTICATION </div>
|
||
|
||
<div class="small-font-size" style="display:flex; align-items: center; min-height:30px">
|
||
${n.length>0?V`
|
||
<div class="blue-text"> ${n.length} API key applied </div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn thin-border" part="btn btn-outline" @click=${()=>{yR.call(this)}}>CLEAR ALL API KEYS</button>`:V`<div class="red-text">No API key applied</div>`}
|
||
</div>
|
||
${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?V`
|
||
<table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
|
||
${this.resolvedSpec.securitySchemes.filter((i=>i.type)).map((i=>{var l,h;return V`
|
||
<tr id="security-scheme-${i.securitySchemeId}" class="${i.type.toLowerCase()}">
|
||
<td style="max-width:500px; overflow-wrap: break-word;">
|
||
<div style="line-height:28px; margin-bottom:5px;">
|
||
<span style="font-weight:bold; font-size:var(--font-size-regular)">${i.typeDisplay}</span>
|
||
${i.finalKeyValue?V`
|
||
<span class='blue-text'> ${i.finalKeyValue?"Key Applied":""} </span>
|
||
<button class="m-btn thin-border small" part="btn btn-outline" @click=${()=>{IX.call(this,i.securitySchemeId)}}>REMOVE</button>
|
||
`:""}
|
||
</div>
|
||
${i.description?V`
|
||
<div class="m-markdown">
|
||
${In(ht(i.description||""))}
|
||
</div>`:""}
|
||
|
||
${i.type.toLowerCase()==="apikey"||i.type.toLowerCase()==="http"&&((l=i.scheme)===null||l===void 0?void 0:l.toLowerCase())==="bearer"?V`
|
||
<div style="margin-bottom:5px">
|
||
${i.type.toLowerCase()==="apikey"?V`Send <code>${i.name}</code> in <code>${i.in}</code>`:V`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and a Token String.`}
|
||
</div>
|
||
<div style="max-height:28px;">
|
||
${i.in!=="cookie"?V`
|
||
<input type = "text" value = "${i.value}" class="${i.type} ${i.securitySchemeId} api-key-input" placeholder = "api-token" spellcheck = "false" id = "${i.type}-${i.securitySchemeId}-api-key-input">
|
||
<button class="m-btn thin-border" style = "margin-left:5px;"
|
||
part = "btn btn-outline"
|
||
@click="${v=>{HP.call(this,i.securitySchemeId,v)}}">
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>`:V`<span class="gray-text" style="font-size::var(--font-size-small)"> cookies cannot be set from here</span>`}
|
||
</div>`:""}
|
||
${i.type.toLowerCase()==="http"&&((h=i.scheme)===null||h===void 0?void 0:h.toLowerCase())==="basic"?V`
|
||
<div style="margin-bottom:5px">
|
||
Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.
|
||
</div>
|
||
<div>
|
||
<input type="text" value = "${i.user}" placeholder="username" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-user" style="width:100px" id = "input-${i.type}-${i.securitySchemeId}-api-key-user">
|
||
<input type="password" value = "${i.password}" placeholder="password" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-password" style = "width:100px; margin:0 5px;" id = "input-${i.type}-${i.securitySchemeId}-api-key-password">
|
||
<button class="m-btn thin-border"
|
||
@click="${v=>{HP.call(this,i.securitySchemeId,v)}}"
|
||
part = "btn btn-outline"
|
||
>
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>
|
||
</div>`:""}
|
||
</td>
|
||
</tr>
|
||
${i.type.toLowerCase()==="oauth2"?V`
|
||
<tr>
|
||
<td style="border:none; padding-left:48px">
|
||
${Object.keys(i.flows).map((v=>MX.call(this,v,i.flows[v]["x-client-id"]||i["x-client-id"]||"",i.flows[v]["x-client-secret"]||i["x-client-secret"]||"",i.securitySchemeId,i.flows[v],i.flows[v]["x-default-scopes"]||i["x-default-scopes"],i.flows[v]["x-receive-token-in"]||i["x-receive-token-in"],i.flows[v]["x-receive-token-in-options"]||i["x-receive-token-in-options"])))}
|
||
</td>
|
||
</tr>
|
||
`:""}
|
||
`}))}
|
||
</table>`:""}
|
||
<slot name="auth"></slot>
|
||
</section>
|
||
`:void 0}function YP(t){if(this.resolvedSpec.securitySchemes&&t){const n=[];return Array.isArray(t)?t.length===0?"":(t.forEach((i=>{const l=[],h=[];Object.keys(i).length===0?n.push({securityTypes:"None",securityDefs:[]}):(Object.keys(i).forEach((v=>{let x="";const w=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===v));i[v]&&Array.isArray(i[v])&&(x=i[v].join(", ")),w&&(h.push(w.typeDisplay),l.push({...w,scopes:x}))})),n.push({securityTypes:h.length>1?`${h[0]} + ${h.length-1} more`:h[0],securityDefs:l}))})),V`<div style="position:absolute; top:3px; right:2px; font-size:var(--font-size-small); line-height: 1.5;">
|
||
<div style="position:relative; display:flex; min-width:350px; max-width:700px; justify-content: flex-end;">
|
||
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--fg3)"> <rect x="5" y="11" width="14" height="10" rx="2" /> <circle cx="12" cy="16" r="1" /> <path d="M8 11v-4a4 4 0 0 1 8 0v4" /></svg>
|
||
${n.map(((i,l)=>V`
|
||
${i.securityTypes?V`
|
||
${l!==0?V`<div style="padding:3px 4px;"> OR </div>`:""}
|
||
<div class="tooltip">
|
||
<div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;">
|
||
${this.updateRoute==="true"&&this.allowAuthentication==="true"?V`<a part="anchor anchor-operation-security" href="#auth"> ${i.securityTypes} </a>`:V`${i.securityTypes}`}
|
||
</div>
|
||
<div class="tooltip-text" style="position:absolute; color: var(--fg); top:26px; right:0; border:1px solid var(--border-color);padding:2px 4px; display:block;">
|
||
${i.securityDefs.length>1?V`<div>Requires <b>all</b> of the following </div>`:""}
|
||
<div style="padding-left: 8px">
|
||
${i.securityDefs.map(((h,v)=>{const x=V`${h.scopes!==""?V`
|
||
<div>
|
||
<b>Required scopes:</b>
|
||
<br/>
|
||
<div style="margin-left:8px">
|
||
${h.scopes.split(",").map(((w,C)=>V`${C===0?"":"┃"}<span>${w}</span>`))}
|
||
</div>
|
||
</div>`:""}`;return V`
|
||
${h.type==="oauth2"?V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:"Needs"}
|
||
OAuth Token <span style="font-family:var(--font-mono); color:var(--primary-color);">${h.securitySchemeId}</span> in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:h.type==="http"?V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:V`Requires`}
|
||
${h.scheme==="basic"?"Base 64 encoded username:password":"Bearer Token"} in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:V`
|
||
<div>
|
||
${i.securityDefs.length>1?V`<b>${v+1}.</b> `:V`Requires`}
|
||
Token in <b>${h.name} ${h.in}</b>
|
||
${x}
|
||
</div>`}`}))}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`:""}
|
||
`))}
|
||
</div>
|
||
</div>
|
||
`):""}return""}function ZP(t){return V`
|
||
<section class="table-title" style="margin-top:24px;">CODE SAMPLES</div>
|
||
<div part="tab-panel" class="tab-panel col"
|
||
@click="${n=>{if(!n.target.classList.contains("tab-btn"))return;const i=n.target.dataset.tab,l=[...n.currentTarget.querySelectorAll(".tab-btn")],h=[...n.currentTarget.querySelectorAll(".tab-content")];l.forEach((v=>v.classList[v.dataset.tab===i?"add":"remove"]("active"))),h.forEach((v=>{v.style.display=v.dataset.tab===i?"block":"none"}))}}">
|
||
<div part="tab-btn-row" class="tab-buttons row" style="width:100; overflow">
|
||
${t.map(((n,i)=>V`<button part="tab-btn" class="tab-btn ${i===0?"active":""}" data-tab = '${n.lang}${i}'> ${n.label||n.lang} </button>`))}
|
||
</div>
|
||
${t.map(((n,i)=>{var l,h,v;return V`
|
||
<div class="tab-content m-markdown" style= "display:${i===0?"block":"none"}" data-tab = '${n.lang}${i}'>
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${x=>{hl(n.source,x)}}'> Copy </button>
|
||
<pre><code class="language">${sr().languages[(l=n.lang)===null||l===void 0?void 0:l.toLowerCase()]?In(sr().highlight(n.source,sr().languages[(h=n.lang)===null||h===void 0?void 0:h.toLowerCase()],(v=n.lang)===null||v===void 0?void 0:v.toLowerCase())):n.source}</code></pre>
|
||
</div>`}))}
|
||
</div>
|
||
</section>`}function WP(t){return V`
|
||
<div class="req-res-title" style="margin-top:12px">CALLBACKS</div>
|
||
${Object.entries(t).map((n=>V`
|
||
<div class="tiny-title" style="padding: 12px; border:1px solid var(--light-border-color)">
|
||
${n[0]}
|
||
${Object.entries(n[1]).map((i=>V`
|
||
<div class="mono-font small-font-size" style="display:flex; margin-left:16px;">
|
||
<div style="width:100%">
|
||
${Object.entries(i[1]).map((l=>{var h,v,x;return V`
|
||
<div>
|
||
<div style="margin-top:12px;">
|
||
<div class="method method-fg ${l[0]}" style="width:70px; border:none; margin:0; padding:0; line-height:20px; vertical-align: baseline;text-align:left">
|
||
<span style="font-size:20px;"> ⥄ </span>
|
||
${l[0]}
|
||
</div>
|
||
<span style="line-height:20px; vertical-align: baseline;">${i[0]} </span>
|
||
</div>
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode callback"
|
||
style = "width:100%;"
|
||
callback = "true"
|
||
method = "${l[0]||""}",
|
||
path = "${i[0]||""}"
|
||
.parameters = "${((h=l[1])===null||h===void 0?void 0:h.parameters)||""}"
|
||
.request_body = "${((v=l[1])===null||v===void 0?void 0:v.requestBody)||""}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "false"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":"true"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
<api-response
|
||
style = "width:100%;"
|
||
class = "${this.renderStyle}-mode"
|
||
callback = "true"
|
||
.responses="${(x=l[1])===null||x===void 0?void 0:x.responses}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":"true"}"
|
||
schema-hide-write-only = "false"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
</div>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`))}
|
||
`}const LX={},kE=fR(class extends mR{constructor(){super(...arguments),this.ot=LX}render(t,n){return n()}update(t,[n,i]){if(Array.isArray(n)){if(Array.isArray(this.ot)&&this.ot.length===n.length&&n.every(((l,h)=>l===this.ot[h])))return Dn}else if(this.ot===n)return Dn;return this.ot=Array.isArray(n)?Array.from(n):n,this.render(n,i)}}),zX={},bR=fR(class extends mR{constructor(t){if(super(t),t.type!==qP&&t.type!==FP&&t.type!==BP)throw Error("The `live` directive is not allowed on child or event bindings");if(!(n=>n.strings===void 0)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[n]){if(n===Dn||n===cn)return n;const i=t.element,l=t.name;if(t.type===qP){if(n===i[l])return Dn}else if(t.type===BP){if(!!n===i.hasAttribute(l))return Dn}else if(t.type===FP&&i.getAttribute(l)===n+"")return Dn;return((h,v=zX)=>{h._$AH=v})(t),n}});var FX=g(657),qX=g.n(FX);const RE=M`
|
||
.border-top {
|
||
border-top:1px solid var(--border-color);
|
||
}
|
||
.border{
|
||
border:1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.light-border{
|
||
border:1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.pad-8-16{
|
||
padding: 8px 16px;
|
||
}
|
||
.pad-top-8 {
|
||
padding-top: 8px;
|
||
}
|
||
.mar-top-8 {
|
||
margin-top: 8px;
|
||
}
|
||
`;var BX=g(859),JP=g.n(BX);function dp(t){if(t===void 0)return"";if(t===null)return"null";if(t==="")return"∅";if(typeof t=="boolean"||typeof t=="number")return`${t}`;if(Array.isArray(t))return t.map((n=>n===null?"null":n===""?"∅":n.toString().replace(/^ +| +$/g,(i=>"●".repeat(i.length)))||"")).join(", ");if(typeof t=="object"){const n=Object.keys(t);return`{ ${n[0]}:${t[n[0]]}${n.length>1?",":""} ... }`}return t.toString().replace(/^ +| +$/g,(n=>"●".repeat(n.length)))||""}function _d(t){if(!t)return;let n="",i="";if(t.$ref){const x=t.$ref.lastIndexOf("/");n=`{recursive: ${t.$ref.substring(x+1)}} `}else t.type?(n=Array.isArray(t.type)?t.type.join(t.length===2?" or ":"┃"):t.type,(t.format||t.enum||t.const)&&(n=n.replace("string",t.enum?"enum":t.const?"const":t.format)),t.nullable&&(n+="┃null")):n=t.const?"const":Object.keys(t).length===0?"any":"{missing-type-info}";const l={type:n,format:t.format||"",pattern:t.pattern&&!t.enum?t.pattern:"",readOrWriteOnly:t.readOnly?"🆁":t.writeOnly?"🆆":"",deprecated:t.deprecated?"❌":"",examples:t.examples||t.example,default:dp(t.default),description:t.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if(l.type==="{recursive}"?l.description=t.$ref.substring(t.$ref.lastIndexOf("/")+1):l.type!=="{missing-type-info}"&&l.type!=="any"||(l.description=l.description||""),l.allowedValues=t.const?t.const:Array.isArray(t.enum)?t.enum.map((x=>dp(x))).join("┃"):"",n==="array"&&t.items){var h,v;const x=(h=t.items)===null||h===void 0?void 0:h.type,w=dp(t.items.default);l.arrayType=`${t.type} of ${Array.isArray(x)?x.join(""):x}`,l.default=w,l.allowedValues=t.items.const?t.const:Array.isArray((v=t.items)===null||v===void 0?void 0:v.enum)?t.items.enum.map((C=>dp(C))).join("┃"):""}return n.match(/integer|number/g)&&(t.minimum===void 0&&t.exclusiveMinimum===void 0||(i+=t.minimum!==void 0?`Min ${t.minimum}`:`More than ${t.exclusiveMinimum}`),t.maximum===void 0&&t.exclusiveMaximum===void 0||(i+=t.maximum!==void 0?`${i?"┃":""}Max ${t.maximum}`:`${i?"┃":""}Less than ${t.exclusiveMaximum}`),t.multipleOf!==void 0&&(i+=`${i?"┃":""} multiple of ${t.multipleOf}`)),n.match(/string/g)&&(t.minLength!==void 0&&t.maxLength!==void 0?i+=`${i?"┃":""}${t.minLength} to ${t.maxLength} chars`:t.minLength!==void 0?i+=`${i?"┃":""}Min ${t.minLength} chars`:t.maxLength!==void 0&&(i+=`Max ${i?"┃":""}${t.maxLength} chars`)),l.constrain=i,l.html=`${l.type}~|~${l.readOrWriteOnly}~|~${l.constrain}~|~${l.default}~|~${l.allowedValues}~|~${l.pattern}~|~${l.description}~|~${t.title||""}~|~${l.deprecated?"deprecated":""}`,l}function aa(t){if(typeof t=="object"&&!Array.isArray(t)){if(t.value!==void 0)return{Example:{...t}};const n=Object.entries(t).filter((([i,l])=>l.value!==void 0));return n.length===0?void 0:Object.fromEntries(n)}return Array.isArray(t)?t.reduce(((n,i,l)=>(n[`Example${l+1}`]={value:i},n)),{}):t?{Example:{value:t}}:void 0}function QP(t,n="string"){if(!t)return{exampleVal:"",exampleList:[]};if(t.constructor===Object){const h=Object.values(t).filter((v=>v["x-example-show-value"]!==!1)).map((v=>({value:typeof v.value=="boolean"||typeof v.value=="number"?`${v.value}`:v.value||"",printableValue:dp(v.value),summary:v.summary||"",description:v.description||""})));return{exampleVal:h.length>0?h[0].value:"",exampleList:h}}if(Array.isArray(t)||(t=t?[t]:[]),t.length===0)return{exampleVal:"",exampleList:[]};if(n==="array"){const[h]=t,v=t.map((x=>({value:x,printableValue:dp(x)})));return{exampleVal:h,exampleList:v}}const i=t[0].toString(),l=t.map((h=>({value:h.toString(),printableValue:dp(h)})));return{exampleVal:i,exampleList:l}}function TE(t){const n=t.examples?t.examples[0]:t.example===null?null:t.example||void 0;if(n==="")return"";if(n===null)return null;if(n===0)return 0;if(n===!1)return!1;if(n instanceof Date)switch(t.format.toLowerCase()){case"date":return n.toISOString().split("T")[0];case"time":return n.toISOString().split("T")[1];default:return n.toISOString()}if(n)return n;if(Object.keys(t).length===0)return null;if(t.$ref)return{};if(t.const===!1||t.const===0||t.const===null||t.const===""||t.const)return t.const;if(t.default)return t.default;const i=Array.isArray(t.type)?t.type[0]:t.type;if(!i)return null;if(i.match(/^integer|^number/g)){const l=Number.isNaN(Number(t.multipleOf))?void 0:Number(t.multipleOf),h=Number.isNaN(Number(t.maximum))?void 0:Number(t.maximum),v=Number.isNaN(Number(t.minimum))?Number.isNaN(Number(t.exclusiveMinimum))?h||0:Number(t.exclusiveMinimum)+(i.startsWith("integer")?1:.001):Number(t.minimum);return l?l>=v?l:v%l==0?v:Math.ceil(v/l)*l:v}if(i.match(/^boolean/g))return!1;if(i.match(/^null/g))return null;if(i.match(/^string/g)){if(t.enum)return t.enum[0];if(t.const)return t.const;if(t.pattern)try{return new(JP())(t.pattern).gen()}catch{return t.pattern}if(!t.format){const l=Number.isNaN(t.minLength)?void 0:Number(t.minLength),h=Number.isNaN(t.maxLength)?void 0:Number(t.maxLength),v=l||(h>6?6:h||void 0);return v?"A".repeat(v):"string"}{const l=`${Date.now().toString(16)}${Math.random().toString(16)}0`.repeat(16);switch(t.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return[l.substring(0,8),l.substring(8,12),`4000-8${l.substring(13,16)}`,l.substring(16,28)].join("-");case"byte":return"ZXhhbXBsZQ==";default:return""}}}return null}function wR(t,n=1){const i=" ".repeat(n);let l="";if(n===1&&typeof t!="object")return`
|
||
${i}${t.toString()}`;for(const h in t){const v=t[h]["::XML_TAG"]||h;let x="";x=Array.isArray(t[h])?v[0]["::XML_TAG"]||`${h}`:v,h.startsWith("::")||(l=Array.isArray(t[h])||typeof t[h]=="object"?`${l}
|
||
${i}<${x}>${wR(t[h],n+1)}
|
||
${i}</${x}>`:`${l}
|
||
${i}<${x}>${t[h].toString()}</${x}>`)}return l}function _E(t,n){var i,l;if(typeof n=="object"&&n!==null){var h,v;t.title&&(n["::TITLE"]=t.title),t.description&&(n["::DESCRIPTION"]=t.description),(i=t.xml)!==null&&i!==void 0&&i.name&&(n["::XML_TAG"]=(h=t.xml)===null||h===void 0?void 0:h.name),(l=t.xml)!==null&&l!==void 0&&l.wrapped&&(n["::XML_WRAP"]=(v=t.xml)===null||v===void 0?void 0:v.wrapped.toString())}}function eM(t){if(typeof t=="object"&&t!==null){delete t["::TITLE"],delete t["::DESCRIPTION"],delete t["::XML_TAG"],delete t["::XML_WRAP"];for(const n in t)eM(t[n])}}function tM(t,n,i){for(const l in n)n[l][i]=t}function hp(t,n,i){let l=0;const h={};for(const v in t){for(const x in i)if(h[`example-${l}`]={...t[v]},h[`example-${l}`][n]=i[x],l++,l>=10)break;if(l>=10)break}return h}function eo(t,n={}){let i={};if(t){if(t.allOf){var l,h;const Y={};if(!(t.allOf.length!==1||(l=t.allOf[0])!==null&&l!==void 0&&l.properties||(h=t.allOf[0])!==null&&h!==void 0&&h.items))return t.allOf[0].$ref?"{ }":t.allOf[0].readOnly&&n.includeReadOnly?TE(t.allOf[0]):void 0;t.allOf.forEach((W=>{if(W.type==="object"||W.properties||W.allOf||W.anyOf||W.oneOf){const P=eo(W,n);Object.assign(Y,P)}else if(W.type==="array"||W.items){const P=[eo(W,n)];Object.assign(Y,P)}else{if(!W.type)return"";{const P=`prop${Object.keys(Y).length}`;Y[P]=TE(W)}}})),i=Y}else if(t.oneOf){const Y={};if(t.properties)for(const W in t.properties){var v;t.properties[W].properties||(v=t.properties[W].properties)!==null&&v!==void 0&&v.items?Y[W]=eo(t.properties[W],n):Y[W]=TE(t.properties[W])}if(t.oneOf.length>0){let W=0;for(const P in t.oneOf){const se=eo(t.oneOf[P],n);for(const ae in se){let he;if(Object.keys(Y).length>0){if(se[ae]===null||typeof se[ae]!="object")continue;he=Object.assign(se[ae],Y)}else he=se[ae];i[`example-${W}`]=he,_E(t.oneOf[P],i[`example-${W}`]),W++}}}}else if(t.anyOf){let Y;if(t.type==="object"||t.properties){Y={"example-0":{}};for(const P in t.properties){if(t.example){Y=t;break}t.properties[P].deprecated&&!n.includeDeprecated||t.properties[P].readOnly&&!n.includeReadOnly||t.properties[P].writeOnly&&!n.includeWriteOnly||(Y=hp(Y,P,eo(t.properties[P],n)))}}let W=0;for(const P in t.anyOf){const se=eo(t.anyOf[P],n);for(const ae in se){if(Y!==void 0)for(const he in Y)i[`example-${W}`]={...Y[he],...se[ae]};else i[`example-${W}`]=se[ae];_E(t.anyOf[P],i[`example-${W}`]),W++}}}else if(t.type==="object"||t.properties)if(i["example-0"]={},_E(t,i["example-0"]),t.example)i["example-0"]=t.example;else{for(const Y in t.properties){var x,w,C,$,N,_;if(((x=t.properties[Y])===null||x===void 0||!x.deprecated||n.includeDeprecated)&&((w=t.properties[Y])===null||w===void 0||!w.readOnly||n.includeReadOnly)&&((C=t.properties[Y])===null||C===void 0||!C.writeOnly||n.includeWriteOnly))if((($=t.properties[Y])===null||$===void 0?void 0:$.type)==="array"||(N=t.properties[Y])!==null&&N!==void 0&&N.items)if(t.properties[Y].example)tM(t.properties[Y].example,i,Y);else if((_=t.properties[Y])!==null&&_!==void 0&&(_=_.items)!==null&&_!==void 0&&_.example)tM([t.properties[Y].items.example],i,Y);else{const W=eo(t.properties[Y].items,n);if(n.useXmlTagForProp){var F,U;const P=((F=t.properties[Y].xml)===null||F===void 0?void 0:F.name)||Y;(U=t.properties[Y].xml)!==null&&U!==void 0&&U.wrapped?i=hp(i,P,JSON.parse(`{ "${P}" : { "${P}" : ${JSON.stringify(W["example-0"])} } }`)):i=hp(i,P,W)}else{const P=[];for(const se in W)P[se]=[W[se]];i=hp(i,Y,P)}}else i=hp(i,Y,eo(t.properties[Y],n))}if(typeof t.additionalProperties=="object"){const Y=t.additionalProperties["x-additionalPropertiesName"]||"property";i=hp(i,`${Y}1`,eo(t.additionalProperties,n)),i=hp(i,`${Y}2`,eo(t.additionalProperties,n))}}else{if(t.type!=="array"&&!t.items)return{"example-0":TE(t)};var J;if(t.items||t.example)if(t.example)i["example-0"]=t.example;else if((J=t.items)!==null&&J!==void 0&&J.example)i["example-0"]=[t.items.example];else{const Y=eo(t.items,n);let W=0;for(const P in Y)i[`example-${W}`]=[Y[P]],_E(t.items,i[`example-${W}`]),W++}else i["example-0"]=[]}return i}}function nM(t,n=0){var i;let l=(t.description||t.title)&&(t.minItems||t.maxItems)?'<span class="descr-expand-toggle">➔</span>':"";if(t.title?l=t.description?`${l} <b>${t.title}:</b> ${t.description}<br/>`:`${l} ${t.title}<br/>`:t.description&&(l=`${l} ${t.description}<br/>`),t.minItems&&(l=`${l} <b>Min Items:</b> ${t.minItems}`),t.maxItems&&(l=`${l} <b>Max Items:</b> ${t.maxItems}`),n>0&&(i=t.items)!==null&&i!==void 0&&i.description){let h="";t.items.minProperties&&(h=`<b>Min Properties:</b> ${t.items.minProperties}`),t.items.maxProperties&&(h=`${h} <b>Max Properties:</b> ${t.items.maxProperties}`),l=`${l} ⮕ ${h} [ ${t.items.description} ] `}return l}function ts(t,n,i=0,l=""){if(t){if(t.allOf){const w={};if(t.allOf.length===1&&!t.allOf[0].properties&&!t.allOf[0].items)return`${_d(t.allOf[0]).html}`;t.allOf.map(((C,$)=>{if(C.type==="object"||C.properties||C.allOf||C.anyOf||C.oneOf){const N=(C.anyOf||C.oneOf)&&$>0?$:"",_=ts(C,{},i+1,N);Object.assign(w,_)}else if(C.type==="array"||C.items){const N=ts(C,{},i+1);Object.assign(w,N)}else{if(!C.type)return"";{const N=`prop${Object.keys(w).length}`,_=_d(C);w[N]=`${_.html}`}}})),n=w}else if(t.anyOf||t.oneOf){if(n["::description"]=t.description||"",t.type==="object"||t.properties){n["::description"]=t.description||"",n["::type"]="object";for(const $ in t.properties)t.required&&t.required.includes($)?n[`${$}*`]=ts(t.properties[$],{},i+1):n[$]=ts(t.properties[$],{},i+1)}const w={},C=t.anyOf?"anyOf":"oneOf";t[C].forEach((($,N)=>{if($.type==="object"||$.properties||$.allOf||$.anyOf||$.oneOf){const _=ts($,{});w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]=_,w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]["::readwrite"]="",w["::type"]="xxx-of-option"}else if($.type==="array"||$.items){const _=ts($,{});w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]=_,w[`::OPTION~${N+1}${$.title?`~${$.title}`:""}`]["::readwrite"]="",w["::type"]="xxx-of-array"}else{const _=`::OPTION~${N+1}${$.title?`~${$.title}`:""}`;w[_]=`${_d($).html}`,w["::type"]="xxx-of-option"}})),n[t.anyOf?`::ANY~OF ${l}`:`::ONE~OF ${l}`]=w,n["::type"]="object"}else if(Array.isArray(t.type)){const w=JSON.parse(JSON.stringify(t)),C=[],$=[];let N;var h;if(w.type.forEach((_=>{var F,U;_.match(/integer|number|string|null|boolean/g)?C.push(_):_==="array"&&typeof((F=w.items)===null||F===void 0?void 0:F.type)=="string"&&(U=w.items)!==null&&U!==void 0&&U.type.match(/integer|number|string|null|boolean/g)?w.items.type==="string"&&w.items.format?C.push(`[${w.items.format}]`):C.push(`[${w.items.type}]`):$.push(_)})),C.length>0&&(w.type=C.join(C.length===2?" or ":"┃"),N=_d(w),$.length===0))return`${((h=N)===null||h===void 0?void 0:h.html)||""}`;if($.length>0){var v;n["::type"]="object";const _={"::type":"xxx-of-option"};$.forEach(((F,U)=>{if(F==="null")_[`::OPTION~${U+1}`]="NULL~|~~|~~|~~|~~|~~|~~|~~|~";else if("integer, number, string, boolean,".includes(`${F},`)){w.type=Array.isArray(F)?F.join("┃"):F;const J=_d(w);_[`::OPTION~${U+1}`]=J.html}else if(F==="object"){const J={"::title":t.title||"","::description":t.description||"","::type":"object","::deprecated":t.deprecated||!1};for(const Y in t.properties)t.required&&t.required.includes(Y)?J[`${Y}*`]=ts(t.properties[Y],{},i+1):J[Y]=ts(t.properties[Y],{},i+1);_[`::OPTION~${U+1}`]=J}else F==="array"&&(_[`::OPTION~${U+1}`]={"::title":t.title||"","::description":t.description||"","::type":"array","::props":ts(t.items,{},i+1)})})),_[`::OPTION~${$.length+1}`]=((v=N)===null||v===void 0?void 0:v.html)||"",n["::ONE~OF"]=_}}else if(t.type==="object"||t.properties){n["::title"]=t.title||"",n["::description"]=nM(t,i),n["::type"]="object",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="object or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"";for(const w in t.properties)t.required&&t.required.includes(w)?n[`${w}*`]=ts(t.properties[w],{},i+1):n[w]=ts(t.properties[w],{},i+1);for(const w in t.patternProperties)n[`[pattern: ${w}]`]=ts(t.patternProperties[w],n,i+1);t.additionalProperties&&(n["[any-key]"]=ts(t.additionalProperties,{}))}else{if(t.type!=="array"&&!t.items){const w=_d(t);return w!=null&&w.html?`${w.html}`:""}var x;n["::title"]=t.title||"",n["::description"]=nM(t,i),n["::type"]="array",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="array or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"",(x=t.items)!==null&&x!==void 0&&x.items&&(n["::array-type"]=t.items.items.type),n["::props"]=ts(t.items,{},i+1)}return n}}function qm(t,n,i={},l={},h=!0,v=!0,x="json",w=!1){const C=[];if(i)for(const _ in i){let F="",U="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")F=typeof i[_].value=="string"?i[_].value:JSON.stringify(i[_].value,void 0,2),U="text";else if(F=i[_].value,typeof i[_].value=="string")try{const J=i[_].value;F=JSON.parse(J),U="json"}catch{U="text",F=i[_].value}}else F=i[_].value,U="text";C.push({exampleId:_,exampleSummary:i[_].summary||_,exampleDescription:i[_].description||"",exampleType:n,exampleValue:F,exampleFormat:U})}else if(l){let _="",F="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")_=typeof l=="string"?l:JSON.stringify(l,void 0,2),F="text";else if(typeof l=="object")_=l,F="json";else if(typeof l=="string")try{_=JSON.parse(l),F="json"}catch{F="text",_=l}}else _=l,F="text";C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:_,exampleFormat:F})}if(C.length===0||w===!0)if(t)if(t.example)C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:t.example,exampleFormat:n!=null&&n.toLowerCase().includes("json")&&typeof t.example=="object"?"json":"text"});else if(n!=null&&n.toLowerCase().includes("json")||n!=null&&n.toLowerCase().includes("text")||n!=null&&n.toLowerCase().includes("*/*")||n!=null&&n.toLowerCase().includes("xml")){let _="",F="",U="",J="";var $,N;n!=null&&n.toLowerCase().includes("xml")?(_=($=t.xml)!==null&&$!==void 0&&$.name?`<${t.xml.name} ${t.xml.namespace?`xmlns="${t.xml.namespace}"`:""}>`:"<root>",F=(N=t.xml)!==null&&N!==void 0&&N.name?`</${t.xml.name}>`:"</root>",U="text"):U=x;const Y=eo(t,{includeReadOnly:h,includeWriteOnly:v,useXmlTagForProp:n?.toLowerCase().includes("xml")});let W=0;for(const P in Y){if(!Y[P])continue;const se=Y[P]["::TITLE"]||"Example "+ ++W,ae=Y[P]["::DESCRIPTION"]||"";n!=null&&n.toLowerCase().includes("xml")?J=`<?xml version="1.0" encoding="UTF-8"?>
|
||
${_}${wR(Y[P],1)}
|
||
${F}`:(eM(Y[P]),J=x==="text"?JSON.stringify(Y[P],null,2):Y[P]),C.push({exampleId:P,exampleSummary:se,exampleDescription:ae,exampleType:n,exampleFormat:U,exampleValue:J})}}else n!=null&&n.toLowerCase().includes("jose")?C.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:n,exampleValue:t.pattern||"bXJpbg==",exampleFormat:"text"}):C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});else C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});return C}function UX(t){return t==="application/json"?"json":t==="application/xml"?"xml":null}function KX(t){if(t.schema)return[t.schema,null,null];if(t.content){for(const n of Object.keys(t.content))if(t.content[n].schema)return[t.content[n].schema,UX(n),t.content[n]]}return[null,null,null]}JP().prototype.randInt=t=>t,customElements.define("json-tree",class extends Ht{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[Si,RE,Su,M`
|
||
:host{
|
||
display:flex;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.json-tree {
|
||
position: relative;
|
||
font-family: var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
display:inline-block;
|
||
overflow:hidden;
|
||
word-break: break-all;
|
||
flex:1;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
min-height: 40px;
|
||
direction: ltr;
|
||
text-align: left;
|
||
}
|
||
|
||
.open-bracket {
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.close-bracket {
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
display:inline-block;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.open-bracket.expanded:hover ~ .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.open-bracket.expanded:hover ~ .close-bracket {
|
||
color:var(--primary-color);
|
||
}
|
||
.inside-bracket {
|
||
padding-left:12px;
|
||
overflow: hidden;
|
||
border-left:1px dotted var(--border-color);
|
||
}
|
||
.open-bracket.collapsed + .inside-bracket,
|
||
.open-bracket.collapsed + .inside-bracket + .close-bracket {
|
||
display:none;
|
||
}
|
||
|
||
.string{color:var(--green);}
|
||
.number{color:var(--blue);}
|
||
.null{color:var(--red);}
|
||
.boolean{color:var(--purple);}
|
||
.object{color:var(--fg)}
|
||
.toolbar {
|
||
position: absolute;
|
||
top:5px;
|
||
right:6px;
|
||
display:flex;
|
||
padding:2px;
|
||
align-items: center;
|
||
}`,fc]}render(){return V`
|
||
<div class = "json-tree" @click='${t=>{t.target.classList.contains("btn-copy")?hl(JSON.stringify(this.data,null,2),t):this.toggleExpand(t)}}'>
|
||
<div class='toolbar'>
|
||
<button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy"> Copy </button>
|
||
</div>
|
||
${this.generateTree(this.data,!0)}
|
||
</div>
|
||
`}generateTree(t,n=!1){if(t===null)return V`<span class="null">null</span>${n?"":","}`;if(typeof t=="object"&&!(t instanceof Date)){const i=Array.isArray(t)?"array":"pure_object";return Object.keys(t).length===0?V`${Array.isArray(t)?"[ ],":"{ },"}`:V`
|
||
<div class="open-bracket expanded ${i==="array"?"array":"object"}" > ${i==="array"?"[":"{"}</div>
|
||
<div class="inside-bracket">
|
||
${Object.keys(t).map(((l,h,v)=>V`
|
||
<div class="item">
|
||
${i==="pure_object"?V`"${l}":`:""}
|
||
${this.generateTree(t[l],h===v.length-1)}
|
||
</div>`))}
|
||
</div>
|
||
<div class="close-bracket">${i==="array"?"]":"}"}${n?"":","}</div>
|
||
`}return typeof t=="string"||t instanceof Date?V`<span class="${typeof t}">"${t}"</span>${n?"":","}`:V`<span class="${typeof t}">${t}</span>${n?"":","}`}toggleExpand(t){const n=t.target;t.target.classList.contains("open-bracket")&&(n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array")?"[...]":"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array")?"[":"{"))}});const rM=M`
|
||
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
|
||
.tr {
|
||
display: flex;
|
||
flex: none;
|
||
width: 100%;
|
||
box-sizing: content-box;
|
||
border-bottom: 1px dotted transparent;
|
||
transition: max-height 0.3s ease-out;
|
||
}
|
||
.td {
|
||
display: block;
|
||
flex: 0 0 auto;
|
||
}
|
||
.key {
|
||
font-family: var(--font-mono);
|
||
white-space: normal;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.collapsed-all-descr .key {
|
||
overflow:hidden;
|
||
}
|
||
.expanded-all-descr .key-descr .descr-expand-toggle {
|
||
display:none;
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle {
|
||
display:inline-block;
|
||
user-select:none;
|
||
color: var(--fg);
|
||
cursor: pointer;
|
||
transform: rotate(45deg);
|
||
transition: transform .2s ease;
|
||
}
|
||
|
||
.expanded-descr .key-descr .descr-expand-toggle {
|
||
transform: rotate(270deg)
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.expanded-descr .more-content { display:none; }
|
||
|
||
.key-descr {
|
||
font-family:var(--font-regular);
|
||
color:var(--light-fg);
|
||
flex-shrink: 1;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
display: none;
|
||
}
|
||
.expanded-descr .key-descr{
|
||
max-height:auto;
|
||
overflow:hidden;
|
||
display: none;
|
||
}
|
||
|
||
.xxx-of-key {
|
||
font-size: calc(var(--font-size-small) - 2px);
|
||
font-weight:bold;
|
||
background-color:var(--primary-color);
|
||
color:var(--primary-color-invert);
|
||
border-radius:2px;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
padding:0px 5px;
|
||
margin-bottom:1px;
|
||
display:inline-block;
|
||
}
|
||
|
||
.xxx-of-descr {
|
||
font-family: var(--font-regular);
|
||
color: var(--primary-color);
|
||
font-size: calc(var(--font-size-small) - 1px);
|
||
margin-left: 2px;
|
||
}
|
||
|
||
.stri, .string, .uri, .url, .byte, .bina, .date, .pass, .ipv4, .ipv4, .uuid, .emai, .host { color:var(--green); }
|
||
.inte, .numb, .number, .int6, .int3, .floa, .doub, .deci .blue { color:var(--blue); }
|
||
.null { color:var(--red); }
|
||
.bool, .boolean { color:var(--orange) }
|
||
.enum { color:var(--purple) }
|
||
.cons { color:var(--purple) }
|
||
.recu { color:var(--brown) }
|
||
.toolbar {
|
||
display:flex;
|
||
width:100%;
|
||
padding: 2px 0;
|
||
color:var(--primary-color);
|
||
}
|
||
.toolbar-item {
|
||
cursor:pointer;
|
||
padding:5px 0;
|
||
margin:0 2px;
|
||
}
|
||
.schema-root-type {
|
||
cursor:auto;
|
||
color:var(--fg2);
|
||
font-weight: bold;
|
||
text-transform: uppercase;
|
||
}
|
||
.toolbar-item:first-of-type { margin:0 2px 0 0;}
|
||
|
||
@container (min-width: 500px) {
|
||
.key-descr {
|
||
display: block;
|
||
}
|
||
.expanded-descr .key-descr {
|
||
display: block;
|
||
}
|
||
}
|
||
`;customElements.define("schema-tree",class extends Ht{static get properties(){return{data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Si,rM,RE,M`
|
||
.tree {
|
||
font-size:var(--font-size-small);
|
||
text-align: left;
|
||
direction: ltr;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
}
|
||
.tree .tr:hover{
|
||
background-color:var(--hover-color);
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
overflow: hidden;
|
||
max-height:calc(var(--font-size-small) + 8px);
|
||
}
|
||
.tree .key {
|
||
max-width: 300px;
|
||
}
|
||
.tr.expanded:hover > .td.key > .open-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket + .close-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.inside-bracket.xxx-of-option {
|
||
border-left: 1px solid transparent;
|
||
}
|
||
.open-bracket{
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.close-bracket{
|
||
display:inline-block;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.tr.collapsed + .inside-bracket,
|
||
.tr.collapsed + .inside-bracket + .close-bracket{
|
||
overflow: hidden;
|
||
display:none;
|
||
}
|
||
.inside-bracket.object,
|
||
.inside-bracket.array {
|
||
border-left: 1px dotted var(--border-color);
|
||
}`,fc]}render(){var t,n,i;return V`
|
||
<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?V`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-toolbar-item schema-multiline-toggle" class='toolbar-item schema-multiline-toggle'>
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${In(ht(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))}</span>
|
||
${this.data?V`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"]||"")}`:V`<span class='mono-font' style='color:var(--red)'> Schema not found </span>`}
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",h="",v=0,x=0,w="",C=!1){var $;if(this.schemaHideReadOnly==="true"&&(n==="array"&&w==="readonly"||t?.["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&w==="writeonly"||t?.["::readwrite"]==="writeonly"))return;if(!t)return V`<div class="null" style="display:inline;">
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?V`<span class='mono-font'> [ ] </span>`:n==="object"?V`<span class='mono-font'> { } </span>`:V`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;if(Object.keys(t).length===0)return V`<span class="key object">${l}:{ }</span>`;let N="",_="";l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF")?N=l.replace("::","").replace("~"," "):l.startsWith("::OPTION")?[,N,_]=l.split("~"):N=l;const F=400-12*x;let U="",J="";const Y=($=t["::type"])!==null&&$!==void 0&&$.startsWith("xxx-of")?v:v+1,W=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1;if(t["::type"]==="object")n==="array"?(U=v<this.schemaExpandLevel?V`<span class="open-bracket array-of-object" >[{</span>`:V`<span class="open-bracket array-of-object">[{...}]</span>`,J="}]"):(U=v<this.schemaExpandLevel?V`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{</span>`:V`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{...}</span>`,J="}");else if(t["::type"]==="array")if(n==="array"){const ct=i!=="object"?i:"";U=v<this.schemaExpandLevel?V`<span class="open-bracket array-of-array" data-array-type="${ct}">[[ ${ct} </span>`:V`<span class="open-bracket array-of-array" data-array-type="${ct}">[[...]]</span>`,J="]]"}else U=v<this.schemaExpandLevel?V`<span class="open-bracket array">[</span>`:V`<span class="open-bracket array">[...]</span>`,J="]";var P;if(typeof t=="object")return V`
|
||
<div class="tr ${v<this.schemaExpandLevel||(P=t["::type"])!==null&&P!==void 0&&P.startsWith("xxx-of")?"expanded":"collapsed"} ${t["::type"]||"no-type-info"}${t["::nullable"]?" nullable":""}" title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='min-width:${F}px'>
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?V`<span class='key-label xxx-of-key'> ${N}</span><span class="xxx-of-descr">${_}</span>`:N==="::props"||N==="::ARRAY~OF"?"":v>0?V`<span class="key-label" title="${w==="readonly"?"Read-Only":w==="writeonly"?"Write-Only":""}">
|
||
${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${N.replace(/\*$/,"")}${N.endsWith("*")?V`<span style="color:var(--red)">*</span>`:""}${w==="readonly"?V` 🆁`:w==="writeonly"?V` 🆆`:w}:
|
||
</span>`:""}
|
||
${U}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small'>${In(ht(h||""))}</div>
|
||
</div>
|
||
<div class='inside-bracket ${t["::type"]||"no-type-info"}' style='padding-left:${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"?0:12}px;'>
|
||
${Array.isArray(t)&&t[0]?V`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",Y,W,t[0]["::readwrite"],C||t[0]["::deprecated"])}`:V`
|
||
${Object.keys(t).map((ct=>{var qt;return V`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(ct)?t[ct]["::type"]==="array"||t[ct]["::type"]==="object"?V`${this.generateTree(t[ct]["::type"]==="array"?t[ct]["::props"]:t[ct],t[ct]["::type"],t[ct]["::array-type"]||"",ct,t[ct]["::description"],Y,W,t[ct]["::readwrite"]?t[ct]["::readwrite"]:"",C||t[ct]["::deprecated"])}`:"":V`${this.generateTree(t[ct]["::type"]==="array"?t[ct]["::props"]:t[ct],t[ct]["::type"],t[ct]["::array-type"]||"",ct,((qt=t[ct])===null||qt===void 0?void 0:qt["::description"])||"",Y,W,t[ct]["::readwrite"]?t[ct]["::readwrite"]:"",C||t[ct]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
${t["::type"]&&t["::type"].includes("xxx-of")?"":V`<div class='close-bracket'> ${J} </div>`}
|
||
`;const[se,ae,he,ge,pe,Te,Ae,qe,Se]=t.split("~|~");if(ae==="🆁"&&this.schemaHideReadOnly==="true"||ae==="🆆"&&this.schemaHideWriteOnly==="true")return;const me=se.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),Me=he||ge||pe||Te?`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";let Ie="",Qe="";return n==="array"?w==="readonly"?(Ie="🆁",Qe="Read-Only"):w==="writeonly"&&(Ie="🆆",Qe="Write-Only"):ae==="🆁"?(Ie="🆁",Qe="Read-Only"):ae==="🆆"&&(Ie="🆆",Qe="Write-Only"),V`
|
||
<div class = "tr primitive" title="${Se?"Deprecated":""}">
|
||
<div class="td key ${C||Se}" style='min-width:${F}px'>
|
||
${C||Se?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${N.endsWith("*")?V`<span class="key-label">${N.substring(0,N.length-1)}</span><span style='color:var(--red);'>*</span>:`:l.startsWith("::OPTION")?V`<span class='key-label xxx-of-key'>${N}</span><span class="xxx-of-descr">${_}</span>`:V`<span class="key-label">${N}:</span>`}
|
||
<span class="${me}" title="${Qe}">
|
||
${n==="array"?`[${se}]`:`${se}`}
|
||
${Ie}
|
||
</span>
|
||
</div>
|
||
<div class='td key-descr'>
|
||
${h||qe||Ae?V`${V`<span class="m-markdown-small">
|
||
${In(ht(n==="array"?`${Me} ${h}`:qe?`${Me} <b>${qe}:</b> ${Ae}`:`${Me} ${Ae}`))}
|
||
</span>`}`:""}
|
||
${he?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Constraints: </span>${he}</div>`:""}
|
||
${ge?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${ge}</div>`:""}
|
||
${pe?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>${se==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${Te?V`<div style='display:inline-block; line-break: anywhere; margin-right:8px'><span class='bold-text'>Pattern: </span>${Te}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("open-bracket"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr"),i=n.classList.contains("nullable");n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{...}]":t.target.classList.contains("array-of-array")?"[[...]]":t.target.classList.contains("array")?"[...]":(i?"null┃":"")+"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{":t.target.classList.contains("array-of-array")?`[[ ${t.target.dataset.arrayType}`:t.target.classList.contains("object")?(i?"null┃":"")+"{":"[")}}),customElements.define("tag-input",class extends Ht{render(){let t="";return Array.isArray(this.value)&&(t=V`${this.value.filter((n=>typeof n=="string"&&n.trim()!=="")).map((n=>V`<span class='tag'>${n}</span>`))}`),V`
|
||
<div class='tags'>
|
||
${t}
|
||
<input type="text" class='editor' @paste="${n=>this.afterPaste(n)}" @keydown="${this.afterKeyDown}" @blur="${this.onBlur}" placeholder="${this.placeholder||""}">
|
||
</div>
|
||
`}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value"}}}attributeChangedCallback(t,n,i){t==="value"&&i&&n!==i&&(this.value=i.split(",").filter((l=>l.trim()!==""))),super.attributeChangedCallback(t,n,i)}afterPaste(t){const n=(t.clipboardData||window.clipboardData).getData("Text"),i=n?n.split(",").filter((l=>l.trim()!=="")):"";i&&(Array.isArray(this.value)?this.value=[...this.value,...i]:this.value=i),t.preventDefault()}afterKeyDown(t){t.keyCode===13?(t.stopPropagation(),t.preventDefault(),t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")):t.keyCode===8&&t.target.value.length===0&&Array.isArray(this.value)&&this.value.length>0&&(this.value.splice(-1),this.value=[...this.value])}onBlur(t){t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")}static get styles(){return[M`
|
||
.tags {
|
||
display:flex;
|
||
flex-wrap: wrap;
|
||
outline: none;
|
||
padding:0;
|
||
border-radius:var(--border-radius);
|
||
border:1px solid var(--border-color);
|
||
cursor:text;
|
||
overflow:hidden;
|
||
background:var(--input-bg);
|
||
}
|
||
.tag, .editor {
|
||
padding:3px;
|
||
margin:2px;
|
||
}
|
||
.tag{
|
||
border:1px solid var(--border-color);
|
||
background-color:var(--bg3);
|
||
color:var(--fg3);
|
||
border-radius:var(--border-radius);
|
||
word-break: break-all;
|
||
font-size: var(--font-size-small);
|
||
}
|
||
.tag:hover ~ #cursor {
|
||
display: block;
|
||
}
|
||
.editor {
|
||
flex:1;
|
||
border:1px solid transparent;
|
||
color:var(--fg);
|
||
min-width:60px;
|
||
outline: none;
|
||
line-height: inherit;
|
||
font-family:inherit;
|
||
background:transparent;
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
}
|
||
.editor:focus-visible {
|
||
outline: 1px solid;
|
||
}
|
||
.editor::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
`]}}),customElements.define("api-request",class extends Ht{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={}}static get properties(){return{serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},responseMessage:{type:String,attribute:!1},responseText:{type:String,attribute:!1},responseHeaders:{type:String,attribute:!1},responseStatus:{type:String,attribute:!1},responseUrl:{type:String,attribute:!1},curlSyntax:{type:String,attribute:!1},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:t=>JSON.parse(t),toAttribute:t=>JSON.stringify(t)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},activeResponseTab:{type:String},selectedRequestBodyType:{type:String,attribute:"selected-request-body-type"},selectedRequestBodyExample:{type:String,attribute:"selected-request-body-example"}}}static get styles(){return[ju,Su,Si,Eu,RE,dl,pc,M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
tag-input:focus-within { outline: 1px solid;}
|
||
.read-mode {
|
||
margin-top: 24px;
|
||
}
|
||
.param-name,
|
||
.param-type {
|
||
margin: 1px 0;
|
||
text-align: right;
|
||
line-height: var(--font-size-small);
|
||
}
|
||
.param-name {
|
||
color: var(--fg);
|
||
font-family: var(--font-mono);
|
||
}
|
||
.param-name.deprecated {
|
||
color: var(--red);
|
||
}
|
||
.param-type{
|
||
color: var(--light-fg);
|
||
font-family: var(--font-regular);
|
||
}
|
||
.param-constraint{
|
||
min-width:100px;
|
||
}
|
||
.param-constraint:empty{
|
||
display:none;
|
||
}
|
||
.top-gap{margin-top:24px;}
|
||
|
||
.textarea {
|
||
min-height:220px;
|
||
padding:5px;
|
||
resize:vertical;
|
||
direction: ltr;
|
||
}
|
||
.example:first-child {
|
||
margin-top: -9px;
|
||
}
|
||
|
||
.response-message{
|
||
font-weight:bold;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.response-message.error {
|
||
color:var(--red);
|
||
}
|
||
.response-message.success {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.file-input-container {
|
||
align-items:flex-end;
|
||
}
|
||
.file-input-container .input-set:first-child .file-input-remove-btn{
|
||
visibility:hidden;
|
||
}
|
||
|
||
.file-input-remove-btn{
|
||
font-size:16px;
|
||
color:var(--red);
|
||
outline: none;
|
||
border: none;
|
||
background:none;
|
||
cursor:pointer;
|
||
}
|
||
|
||
.v-tab-btn {
|
||
font-size: var(--smal-font-size);
|
||
height:24px;
|
||
border:none;
|
||
background:none;
|
||
opacity: 0.3;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
}
|
||
.v-tab-btn.active {
|
||
font-weight: bold;
|
||
background: var(--bg);
|
||
opacity: 1;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.textarea {
|
||
padding:8px;
|
||
}
|
||
}
|
||
|
||
@container (max-width: 470px) {
|
||
.hide-in-small-screen {
|
||
display:none;
|
||
}
|
||
}
|
||
`,fc]}render(){return V`
|
||
<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK REQUEST":"REQUEST"}
|
||
</div>
|
||
<div>
|
||
${kE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("path")))}
|
||
${kE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("query")))}
|
||
${this.requestBodyTemplate()}
|
||
${kE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("header")))}
|
||
${kE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("cookie")))}
|
||
${this.allowTry==="false"?"":V`${this.apiCallTemplate()}`}
|
||
</div>
|
||
</div>
|
||
`}async updated(){this.showCurlBeforeTry==="true"&&this.applyCURLSyntax(this.shadowRoot),this.webhook==="true"&&(this.allowTry="false")}async saveExampleState(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.dataset.user_example=t.value})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.dataset.user_example=t.value})),this.requestUpdate())}async updateExamplesFromDataAttr(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),this.requestUpdate())}renderExample(t,n,i){var l,h;return V`
|
||
${n==="array"?"[":""}
|
||
<a
|
||
part="anchor anchor-param-example"
|
||
style="display:inline-block; min-width:24px; text-align:center"
|
||
class="${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-example-type="${n==="array"?n:"string"}"
|
||
data-example="${t.value&&Array.isArray(t.value)?(l=t.value)===null||l===void 0?void 0:l.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
title="${t.value&&Array.isArray(t.value)?(h=t.value)===null||h===void 0?void 0:h.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
@click="${v=>{const x=v.target.closest("table").querySelector(`[data-pname="${i}"]`);x&&(x.value=v.target.dataset.exampleType==="array"?v.target.dataset.example.split("~|~"):v.target.dataset.example)}}"
|
||
> ${t.printableValue||t.value} </a>
|
||
${n==="array"?"] ":""}
|
||
`}renderShortFormatExamples(t,n,i){return V`${t.map(((l,h)=>V`
|
||
${h===0?"":"┃"}
|
||
${this.renderExample(l,n,i)}`))}`}renderLongFormatExamples(t,n,i){return V` <ul style="list-style-type: disclosure-closed;">
|
||
${t.map((l=>{var h,v;return V`
|
||
<li>
|
||
${this.renderExample(l,n,i)}
|
||
${((h=l.summary)===null||h===void 0?void 0:h.length)>0?V`<span>(${l.summary})</span>`:""}
|
||
${((v=l.description)===null||v===void 0?void 0:v.length)>0?V`<p>${In(ht(l.description))}</p>`:""}
|
||
</li>
|
||
`}))}
|
||
</ul>`}exampleListTemplate(t,n,i=[]){return V` ${i.length>0?V`<span style="font-weight:bold">Examples: </span>
|
||
${l=i,l.some((h=>{var v,x;return((v=h.summary)===null||v===void 0?void 0:v.length)>0||((x=h.description)===null||x===void 0?void 0:x.length)>0}))?this.renderLongFormatExamples(i,n,t):this.renderShortFormatExamples(i,n,t)}`:""}`;var l}inputParametersTemplate(t){const n=this.parameters?this.parameters.filter((h=>h.in===t)):[];if(n.length===0)return"";let i="";t==="path"?i="PATH PARAMETERS":t==="query"?i="QUERY-STRING PARAMETERS":t==="header"?i="REQUEST HEADERS":t==="cookie"&&(i="COOKIES");const l=[];for(const h of n){const[v,x,w]=KX(h);if(!v)continue;const C=_d(v);if(!C)continue;const $=ts(v,{});let N="form",_=!0,F=!1;t!=="query"&&t!=="header"&&t!=="path"||(h.style&&"form spaceDelimited pipeDelimited".includes(h.style)?N=h.style:x&&(N=x),typeof h.explode=="boolean"&&(_=h.explode),typeof h.allowReserved=="boolean"&&(F=h.allowReserved));const U=QP(aa(h.examples)||aa(h.example)||aa(w?.example)||aa(w?.examples)||aa(C.examples)||aa(C.example),C.type);U.exampleVal||C.type!=="object"||(U.exampleVal=qm(v,x||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true",!0,"text")[0].exampleValue);const J="read focused".includes(this.renderStyle)?"200px":"160px";l.push(V`
|
||
<tr title="${h.deprecated?"Deprecated":""}">
|
||
<td rowspan="${this.allowTry==="true"?"1":"2"}" style="width:${J}; min-width:100px;">
|
||
<div class="param-name ${h.deprecated?"deprecated":""}" >
|
||
${h.deprecated?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${h.required?V`<span style='color:var(--red)'>*</span>`:""}
|
||
${h.name}
|
||
</div>
|
||
<div class="param-type">
|
||
${C.type==="array"?`${C.arrayType}`:`${C.format?C.format:C.type}`}
|
||
</div>
|
||
</td>
|
||
${this.allowTry==="true"?V`
|
||
<td style="min-width:100px;" colspan="${C.default||C.constrain||C.allowedValues||C.pattern?"1":"2"}">
|
||
${C.type==="array"?V`
|
||
<tag-input class="request-param"
|
||
id = "tag-input-request-param-${h.name}"
|
||
style = "width:100%"
|
||
data-ptype = "${t}"
|
||
data-pname = "${h.name}"
|
||
data-example = "${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-serialize-style = "${N}"
|
||
data-param-serialize-explode = "${_}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value="${h["x-fill-example"]==="no"?[]:bR(this.fillRequestFieldsWithExample==="true"?Array.isArray(U.exampleVal)?U.exampleVal:[U.exampleVal]:[])}"
|
||
>
|
||
</tag-input>`:C.type==="object"?V`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${Y=>{if(Y.target.tagName.toLowerCase()==="button"){const W={...this.activeParameterSchemaTabs};W[h.name]=Y.target.dataset.tab,this.activeParameterSchemaTabs=W}}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[h.name]==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[h.name]!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
|
||
${V`<div part="tab-content" class="tab-content col" data-tab = 'example' style="display:${this.activeParameterSchemaTabs[h.name]==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
id = "textarea-request-param-${h.name}"
|
||
class = "textarea request-param"
|
||
part = "textarea textarea-param"
|
||
data-ptype = "${t}-object"
|
||
data-pname = "${h.name}"
|
||
data-example = "${U.exampleVal}"
|
||
data-param-serialize-style = "${N}"
|
||
data-param-serialize-explode = "${_}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
spellcheck = "false"
|
||
.textContent="${h["x-fill-example"]==="no"?"":bR(this.fillRequestFieldsWithExample==="true"?typeof U.exampleVal=="object"?JSON.stringify(U.exampleVal,null,2):U.exampleVal:"")}"
|
||
style = "resize:vertical; width:100%; height: ${"read focused".includes(this.renderStyle)?"180px":"120px"};"
|
||
@input=${Y=>{const W=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(W)}}
|
||
></textarea>
|
||
</div>`}
|
||
${V`<div part="tab-content" class="tab-content col" data-tab = 'schema' style="display:${this.activeParameterSchemaTabs[h.name]!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
class = 'json'
|
||
style = 'display: block'
|
||
.data = '${$}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly.includes(this.method)}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly.includes(this.method)}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example"
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>`:V`
|
||
<input type="${C.format==="password"?"password":"text"}" spellcheck="false" style="width:100%"
|
||
id="input-request-param-${h.name}"
|
||
class="request-param"
|
||
part="textbox textbox-param"
|
||
data-ptype="${t}"
|
||
data-pname="${h.name}"
|
||
data-example="${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-allow-reserved = "${F}"
|
||
data-x-fill-example = "${h["x-fill-example"]||"yes"}"
|
||
data-array="false"
|
||
.value="${h["x-fill-example"]==="no"?"":bR(this.fillRequestFieldsWithExample==="true"?U.exampleVal:"")}"
|
||
@input=${Y=>{const W=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(W)}}
|
||
/>`}
|
||
</td>`:""}
|
||
${C.default||C.constrain||C.allowedValues||C.pattern?V`
|
||
<td colspan="${this.allowTry==="true"?"1":"2"}">
|
||
<div class="param-constraint">
|
||
${C.default?V`<span style="font-weight:bold">Default: </span>${C.default}<br/>`:""}
|
||
${C.pattern?V`<span style="font-weight:bold">Pattern: </span>${C.pattern}<br/>`:""}
|
||
${C.constrain?V`${C.constrain}<br/>`:""}
|
||
${C.allowedValues&&C.allowedValues.split("┃").map(((Y,W)=>V`
|
||
${W>0?"┃":V`<span style="font-weight:bold">Allowed: </span>`}
|
||
${V`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${C.type==="array"?C.type:"string"}"
|
||
data-enum="${Y.trim()}"
|
||
@click="${P=>{const se=P.target.closest("table").querySelector(`[data-pname="${h.name}"]`);se&&(P.target.dataset.type==="array"?se.value=[P.target.dataset.enum]:se.value=P.target.dataset.enum)}}"
|
||
>${Y}</a>`}`))}
|
||
</div>
|
||
</td>`:V`<td></td>`}
|
||
</tr>
|
||
<tr>
|
||
${this.allowTry==="true"?V`<td style="border:none"> </td>`:""}
|
||
<td colspan="2" style="border:none">
|
||
<span class="m-markdown-small">${In(ht(h.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,h.name,C.type,U.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`)}return V`
|
||
<div class="table-title top-gap">${i}</div>
|
||
<div style="display:block; overflow-x:auto; max-width:100%;">
|
||
<table role="presentation" class="m-table" style="width:100%; word-break:break-word;">
|
||
${l}
|
||
</table>
|
||
</div>`}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.updateExamplesFromDataAttr(),this.clearResponseData()}onSelectExample(t){this.selectedRequestBodyExample=t.target.value;const n=t.target;window.setTimeout((i=>{const l=i.closest(".example-panel").querySelector(".request-body-param");i.closest(".example-panel").querySelector(".request-body-param-user-input").value=l.innerText;const h=this.getRequestPanel({target:i});this.liveCURLSyntaxUpdate(h)}),0,n)}onMimeTypeChange(t){this.selectedRequestBodyType=t.target.value;const n=t.target;this.selectedRequestBodyExample="",window.setTimeout((i=>{const l=i.closest(".request-body-container").querySelector(".request-body-param");l&&(i.closest(".request-body-container").querySelector(".request-body-param-user-input").value=l.innerText)}),0,n)}requestBodyTemplate(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let t="",n="",i="",l="",h="";const v=[],{content:x}=this.request_body;for(const w in x)v.push({mimeType:w,schema:x[w].schema,example:x[w].example,examples:x[w].examples}),this.selectedRequestBodyType||(this.selectedRequestBodyType=w);return t=v.length===1?"":V`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change = '${w=>this.onMimeTypeChange(w)}'>
|
||
${v.map((w=>V`
|
||
<option value = '${w.mimeType}' ?selected = '${w.mimeType===this.selectedRequestBodyType}'>
|
||
${w.mimeType}
|
||
</option> `))}
|
||
</select>
|
||
`,v.forEach((w=>{let C,$=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))w.mimeType===this.selectedRequestBodyType&&($=qm(w.schema,w.mimeType,aa(w.examples),aa(w.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||(this.selectedRequestBodyExample=$.length>0?$[0].exampleId:""),h=V`
|
||
${h}
|
||
<div class = 'example-panel border-top pad-top-8'>
|
||
${$.length===1?"":V`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change='${N=>this.onSelectExample(N)}'>
|
||
${$.map((N=>V`<option value="${N.exampleId}" ?selected=${N.exampleId===this.selectedRequestBodyExample} >
|
||
${N.exampleSummary.length>80?N.exampleId:N.exampleSummary?N.exampleSummary:N.exampleId}
|
||
</option>`))}
|
||
</select>
|
||
`}
|
||
${$.filter((N=>N.exampleId===this.selectedRequestBodyExample)).map((N=>V`
|
||
<div class="example ${N.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example = '${N.exampleId}'>
|
||
${N.exampleSummary&&N.exampleSummary.length>80?V`<div style="padding: 4px 0"> ${N.exampleSummary} </div>`:""}
|
||
${N.exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${In(ht(N.exampleDescription||""))} </div>`:""}
|
||
<!-- This pre(hidden) is to store the original example value, this will remain unchanged when users switches from one example to another, its is used to populate the editable textarea -->
|
||
<pre
|
||
class = "textarea is-hidden request-body-param ${w.mimeType.substring(w.mimeType.indexOf("/")+1)}"
|
||
spellcheck = "false"
|
||
data-ptype = "${w.mimeType}"
|
||
style="width:100%; resize:vertical; display:none"
|
||
>${N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2)}</pre>
|
||
|
||
<!-- this textarea is for user to edit the example -->
|
||
<textarea
|
||
class = "textarea request-body-param-user-input"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-ptype = "${w.mimeType}"
|
||
data-example = "${N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2)}"
|
||
data-example-format = "${N.exampleFormat}"
|
||
style="width:100%; resize:vertical;"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?N.exampleFormat==="text"?N.exampleValue:JSON.stringify(N.exampleValue,null,2):""}"
|
||
@input=${_=>{const F=this.getRequestPanel(_);this.liveCURLSyntaxUpdate(F)}}
|
||
@keydown=${_=>{if((_.keyCode===10||_.keyCode===13)&&_.ctrlKey)return this.onTryClick(_)}}
|
||
|
||
></textarea>
|
||
</div>
|
||
`))}
|
||
|
||
</div>
|
||
`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(w.mimeType===this.selectedRequestBodyType){const N=qm(w.schema,w.mimeType,w.examples,w.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);w.schema&&(i=this.formDataTemplate(w.schema,w.mimeType,N[0]?N[0].exampleValue:""))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&w.mimeType===this.selectedRequestBodyType&&(n=V`
|
||
<div class = "small-font-size bold-text row">
|
||
<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file" data-ptype="${w.mimeType}" spellcheck="false" />
|
||
</div>
|
||
`);(w.mimeType.includes("json")||w.mimeType.includes("xml")||w.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(C=ts(w.schema,{}),this.schemaStyle==="table"?l=V`
|
||
${l}
|
||
<schema-table
|
||
class = '${w.mimeType.substring(w.mimeType.indexOf("/")+1)}'
|
||
style = 'display: ${this.selectedRequestBodyType===w.mimeType?"block":"none"};'
|
||
.data = '${C}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>
|
||
`:this.schemaStyle==="tree"&&(l=V`
|
||
${l}
|
||
<schema-tree
|
||
class = "${w.mimeType.substring(w.mimeType.indexOf("/")+1)}"
|
||
style = "display: ${this.selectedRequestBodyType===w.mimeType?"block":"none"};"
|
||
.data = "${C}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>
|
||
`))})),V`
|
||
<div class='request-body-container' data-selected-request-body-type="${this.selectedRequestBodyType}">
|
||
<div class="table-title top-gap row">
|
||
REQUEST BODY ${this.request_body.required?V`<span class="mono-font" style='color:var(--red)'>*</span>`:""}
|
||
<span style = "font-weight:normal; margin-left:5px"> ${this.selectedRequestBodyType}</span>
|
||
<span style="flex:1"></span>
|
||
${t}
|
||
</div>
|
||
${this.request_body.description?V`<div class="m-markdown" style="margin-bottom:12px">${In(ht(this.request_body.description))}</div>`:""}
|
||
|
||
${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?V`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${w=>{w.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=w.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
${V`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"};"> ${h}</div>`}
|
||
${V`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"};"> ${l}</div>`}
|
||
</div>`:V`
|
||
${n}
|
||
${i}`}
|
||
</div>
|
||
`}formDataParamAsObjectTemplate(t,n,i){var l;const h=ts(n,{}),v=qm(n,"json",aa(n.examples),aa(n.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return V`
|
||
<div part="tab-panel" class="tab-panel row" style="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch;">
|
||
<div style="width:24px; background-color:var(--light-border-color)">
|
||
<div class="row" style="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block;" @click="${x=>{if(x.target.classList.contains("v-tab-btn")){const{tab:w}=x.target.dataset;if(w){const C=x.target.closest(".tab-panel"),$=C.querySelector(`.v-tab-btn[data-tab="${w}"]`),N=[...C.querySelectorAll(`.v-tab-btn:not([data-tab="${w}"])`)],_=C.querySelector(`.tab-content[data-tab="${w}"]`),F=[...C.querySelectorAll(`.tab-content:not([data-tab="${w}"])`)];$.classList.add("active"),_.style.display="block",N.forEach((U=>{U.classList.remove("active")})),F.forEach((U=>{U.style.display="none"}))}}x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}">
|
||
<button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button class="v-tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
</div>
|
||
${V`
|
||
<div class="tab-content col" data-tab = 'example' style="display:${this.activeSchemaTab==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
class = "textarea"
|
||
part = "textarea textarea-param"
|
||
style = "width:100%; border:none; resize:vertical;"
|
||
data-array = "false"
|
||
data-ptype = "${i.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${t}"
|
||
data-example = "${((l=v[0])===null||l===void 0?void 0:l.exampleValue)||""}"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?v[0].exampleValue:""}"
|
||
spellcheck = "false"
|
||
></textarea>
|
||
</div>`}
|
||
${V`
|
||
<div class="tab-content col" data-tab = 'schema' style="display:${this.activeSchemaTab!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
.data = "${h}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}",
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>
|
||
`}formDataTemplate(t,n,i=""){const l=[];if(t.properties){for(const x in t.properties){var h,v;const w=t.properties[x];if(w.readOnly)continue;const C=w.examples||w.example||"",$=w.type,N=_d(w),_="read focused".includes(this.renderStyle)?"200px":"160px",F=QP(N.examples||N.example,N.type);l.push(V`
|
||
<tr title="${w.deprecated?"Deprecated":""}">
|
||
<td style="width:${_}; min-width:100px;">
|
||
<div class="param-name ${w.deprecated?"deprecated":""}">
|
||
${x}${(h=t.required)!==null&&h!==void 0&&h.includes(x)||w.required?V`<span style='color:var(--red);'>*</span>`:""}
|
||
</div>
|
||
<div class="param-type">${N.type}</div>
|
||
</td>
|
||
<td
|
||
style="${$==="object"?"width:100%; padding:0;":this.allowTry==="true"?"":"display:none;"} min-width:100px;"
|
||
colspan="${$==="object"?2:1}">
|
||
${$==="array"?((v=w.items)===null||v===void 0?void 0:v.format)==="binary"?V`
|
||
<div class="file-input-container col" style='align-items:flex-end;' @click="${U=>this.onAddRemoveFileInput(U,x,n)}">
|
||
<div class='input-set row'>
|
||
<input
|
||
type = "file"
|
||
part = "file-input"
|
||
style = "width:100%"
|
||
data-pname = "${x}"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-array = "false"
|
||
data-file-array = "true"
|
||
/>
|
||
<button class="file-input-remove-btn"> ✕ </button>
|
||
</div>
|
||
<button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:2px 25px 0 0; padding:2px 6px;">ADD</button>
|
||
</div>
|
||
`:V`
|
||
<tag-input
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C.join("~|~"):C}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value = "${Array.isArray(C)?Array.isArray(C[0])?C[0]:C:[]}"
|
||
>
|
||
</tag-input>
|
||
`:V`
|
||
${$==="object"?this.formDataParamAsObjectTemplate.call(this,x,w,n):V`
|
||
${this.allowTry==="true"?V`<input
|
||
.value = "${this.fillRequestFieldsWithExample==="true"?F.exampleVal:""}"
|
||
spellcheck = "false"
|
||
type = "${w.format==="binary"?"file":w.format==="password"?"password":"text"}"
|
||
part = "textbox textbox-param"
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C[0]:C}"
|
||
data-array = "false"
|
||
/>`:""}
|
||
`}`}
|
||
</td>
|
||
${$==="object"?"":V`
|
||
<td>
|
||
${N.default||N.constrain||N.allowedValues||N.pattern?V`
|
||
<div class="param-constraint">
|
||
${N.default?V`<span style="font-weight:bold">Default: </span>${N.default}<br/>`:""}
|
||
${N.pattern?V`<span style="font-weight:bold">Pattern: </span>${N.pattern}<br/>`:""}
|
||
${N.constrain?V`${N.constrain}<br/>`:""}
|
||
${N.allowedValues&&N.allowedValues.split("┃").map(((U,J)=>V`
|
||
${J>0?"┃":V`<span style="font-weight:bold">Allowed: </span>`}
|
||
${V`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${N.type==="array"?N.type:"string"}"
|
||
data-enum="${U.trim()}"
|
||
@click="${Y=>{const W=Y.target.closest("table").querySelector(`[data-pname="${x}"]`);W&&(Y.target.dataset.type==="array"?W.value=[Y.target.dataset.enum]:W.value=Y.target.dataset.enum)}}"
|
||
>
|
||
${U}
|
||
</a>`}`))}
|
||
</div>`:""}
|
||
</td>`}
|
||
</tr>
|
||
${$==="object"?"":V`
|
||
<tr>
|
||
<td style="border:none"> </td>
|
||
<td colspan="2" style="border:none; margin-top:0; padding:0 5px 8px 5px;">
|
||
<span class="m-markdown-small">${In(ht(w.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,x,N.type,F.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`}`)}return V`
|
||
<table role="presentation" style="width:100%;" class="m-table">
|
||
${l}
|
||
</table>
|
||
`}return V`
|
||
<textarea
|
||
class = "textarea dynamic-form-param ${n}"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-pname="dynamic-form"
|
||
data-ptype="${n}"
|
||
.textContent = "${i}"
|
||
style="width:100%"
|
||
></textarea>
|
||
${t.description?V`<span class="m-markdown-small">${In(ht(t.description))}</span>`:""}
|
||
`}curlSyntaxTemplate(t="flex"){return V`
|
||
<div class="col m-markdown" style="flex:1; display:${t}; position:relative; max-width: 100%;">
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${n=>{hl(this.curlSyntax.trim().replace(/\\$/,""),n)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${In(sr().highlight(this.curlSyntax.trim().replace(/\\$/,""),sr().languages.shell,"shell"))}</code></pre>
|
||
</div>
|
||
`}apiResponseTabTemplate(){let t="",n="";if(!this.responseIsBlob)if(this.responseHeaders.includes("application/x-ndjson")){t="json";const i=this.responseText.split(`
|
||
`).map((l=>sr().highlight(l,sr().languages[t],t))).join(`
|
||
`);n=V`<code>${In(i)}</code>`}else this.responseHeaders.includes("json")?(t="json",n=V`<code>${In(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?(t="html",n=V`<code>${In(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):(t="text",n=V`<code>${this.responseText}</code>`);return V`
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
<div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button>
|
||
</div>
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${i=>{i.target.classList.contains("tab-btn")!==!1&&(this.activeResponseTab=i.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab = 'response' > RESPONSE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab = 'headers' > RESPONSE HEADERS</button>
|
||
${this.showCurlBeforeTry==="true"?"":V`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab = 'curl'>CURL</button>`}
|
||
</div>
|
||
${this.responseIsBlob?V`
|
||
<div part="tab-content" class="tab-content col" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};">
|
||
${this.responseBlobType==="image"?V`<img style="max-height:var(--resp-area-height, 400px); object-fit:contain;" class="mar-top-8" src="${(i=>i??cn)(this.responseBlobUrl)}"></img>`:""}
|
||
<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{Lp(this.responseBlobUrl,this.respContentDisposition)}}' part="btn btn-outline">
|
||
DOWNLOAD
|
||
</button>
|
||
${this.responseBlobType==="view"||this.responseBlobType==="image"?V`<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{qg(this.responseBlobUrl)}}' part="btn btn-outline">VIEW (NEW TAB)</button>`:""}
|
||
</div>`:V`
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style="position:absolute; top:12px; right:8px" @click='${i=>{hl(this.responseText,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre; min-height:50px; height:var(--resp-area-height, 400px); resize:vertical; overflow:auto">${n}</pre>
|
||
</div>`}
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="headers"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${i=>{hl(this.responseHeaders,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${In(sr().highlight(this.responseHeaders,sr().languages.css,"css"))}</code></pre>
|
||
</div>
|
||
${this.showCurlBeforeTry==="true"?"":this.curlSyntaxTemplate(this.activeResponseTab==="curl"?"flex":"none")}
|
||
</div>`}apiCallTemplate(){var t,n;const i=V`
|
||
<div style="display:flex; flex-direction:column;">
|
||
${this.serverUrl?V`
|
||
<div style="display:flex; align-items:baseline;">
|
||
<div style="font-weight:bold; padding-right:5px;">API Server</div>
|
||
<span class = "gray-text"> ${this.serverUrl} </span>
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
`;return V`
|
||
<div style="display:flex; align-items:flex-end; margin:16px 0; font-size:var(--font-size-small);" part="wrap-request-btn">
|
||
<div class="hide-in-small-screen" style="flex-direction:column; margin:0; width:calc(100% - 60px);">
|
||
<div style="display:flex; flex-direction:row; align-items:center; overflow:hidden;">
|
||
${i}
|
||
</div>
|
||
<div style="display:flex;">
|
||
<div style="font-weight:bold; padding-right:5px;">Authentication</div>
|
||
${((t=this.security)===null||t===void 0?void 0:t.length)>0?V`
|
||
${this.api_keys.length>0?V`<div style="color:var(--blue); overflow:hidden;">
|
||
${this.api_keys.length===1?`${(n=this.api_keys[0])===null||n===void 0?void 0:n.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}
|
||
</div>`:V`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span> </div>`}`:V`<span class="gray-text"> Not Required </span>`}
|
||
</div>
|
||
</div>
|
||
${this.parameters.length>0||this.request_body?V`
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-fill" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">
|
||
FILL EXAMPLE
|
||
</button>
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-clear" style="margin-right:5px;" @click="${this.onClearRequestData}">
|
||
CLEAR
|
||
</button>`:""}
|
||
<button class="m-btn primary thin-border" part="btn btn-try" @click="${this.onTryClick}">TRY</button>
|
||
</div>
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
${this.showCurlBeforeTry==="true"?this.curlSyntaxTemplate():""}
|
||
</div>
|
||
${this.responseMessage===""?"":this.apiResponseTabTemplate()}
|
||
`}async onFillRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.dataset.example&&(n.tagName.toUpperCase()==="TAG-INPUT"?n.value=n.dataset.example.split("~|~"):n.value=n.dataset.example)}))}async onClearRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.value=""}))}buildFetchURL(t){let n;const i=[...t.querySelectorAll("[data-ptype='path']")],l=[...t.querySelectorAll("[data-ptype='query']")],h=[...t.querySelectorAll("[data-ptype='query-object']")];n=this.path,i.map((C=>{n=n.replace(`{${C.dataset.pname}}`,encodeURIComponent(C.value))}));const v=new Map,x=[];l.length>0&&l.forEach((C=>{const $=new URLSearchParams;if(C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),C.dataset.array==="false")C.value!==""&&$.append(C.dataset.pname,C.value);else{const{paramSerializeStyle:N,paramSerializeExplode:_}=C.dataset;let F=C.value&&Array.isArray(C.value)?C.value:[];F=Array.isArray(F)?F.filter((U=>U!=="")):[],F.length>0&&(N==="spaceDelimited"?$.append(C.dataset.pname,F.join(" ").replace(/^\s|\s$/g,"")):N==="pipeDelimited"?$.append(C.dataset.pname,F.join("|").replace(/^\||\|$/g,"")):_==="true"?F.forEach((U=>{$.append(C.dataset.pname,U)})):$.append(C.dataset.pname,F.join(",").replace(/^,|,$/g,"")))}$.toString()&&v.set(C.dataset.pname,$)})),h.length>0&&h.map((C=>{const $=new URLSearchParams;try{let N={};const{paramSerializeStyle:_,paramSerializeExplode:F,pname:U}=C.dataset;if(N=Object.assign(N,JSON.parse(C.value.replace(/\s+/g," "))),C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),"json xml".includes(_))_==="json"?$.append(C.dataset.pname,JSON.stringify(N)):_==="xml"&&$.append(C.dataset.pname,wR(N));else for(const J in N){const Y=`${U}[${J}]`;typeof N[J]=="object"?Array.isArray(N[J])&&(_==="spaceDelimited"?$.append(Y,N[J].join(" ")):_==="pipeDelimited"?$.append(Y,N[J].join("|")):F==="true"?N[J].forEach((W=>{$.append(Y,W)})):$.append(Y,N[J])):$.append(Y,N[J])}}catch{console.error("RapiDoc: unable to parse %s into object",C.value)}$.toString()&&v.set(C.dataset.pname,$)}));let w="";return v.size&&(v.forEach(((C,$)=>{x.includes($)?(w+=`${$}=`,w+=C.getAll($).join(`&${$}=`),w+="&"):w+=`${C.toString()}&`})),w=w.slice(0,-1)),w.length!==0&&(n=`${n}${n.includes("?")?"&":"?"}${w}`),this.api_keys.filter((C=>C.in==="query")).forEach((C=>{n=`${n}${n.includes("?")?"&":"?"}${C.name}=${encodeURIComponent(C.finalKeyValue)}`})),n=`${this.serverUrl.replace(/\/$/,"")}${n}`,n}buildFetchHeaders(t){var n;const i=(n=this.closest(".expanded-req-resp-container, .req-resp-container"))===null||n===void 0?void 0:n.getElementsByTagName("api-response")[0],l=[...t.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],h=t.querySelector(".request-body-container"),v=i?.selectedMimeType,x=new Headers;if(v?x.append("Accept",v):this.accept&&x.append("Accept",this.accept),this.api_keys.filter((w=>w.in==="header")).forEach((w=>{x.append(w.name,w.finalKeyValue)})),l.map((w=>{if(w.value)if(w.dataset.ptype==="header-object"){const C=JSON.parse(w.value.replace(/\n/g,"").trim()),$=w.dataset.paramSerializeExplode==="true"?"=":",",N=Object.keys(C).map((_=>{const F=C[_];return typeof F=="object"?`${_}${$}${JSON.stringify(F)}`:`${_}${$}${F}`})).join(",");x.append(w.dataset.pname,N)}else x.append(w.dataset.pname,w.value)})),h){const w=h.dataset.selectedRequestBodyType;w.includes("form-data")||x.append("Content-Type",w)}return x}buildFetchBodyOptions(t){const n=t.querySelector(".request-body-container"),i={method:this.method.toUpperCase()};if(n){const l=n.dataset.selectedRequestBodyType;if(l.includes("form-urlencoded")){const h=t.querySelector("[data-ptype='dynamic-form']");if(h){const v=h.value,x=new URLSearchParams;let w,C=!0;if(v)try{w=JSON.parse(v)}catch($){C=!1,console.warn("RapiDoc: Invalid JSON provided",$)}else C=!1;if(C){for(const $ in w)x.append($,JSON.stringify(w[$]));i.body=x}}else{const v=[...t.querySelectorAll("[data-ptype='form-urlencode']")],x=new URLSearchParams;v.filter((w=>w.type!=="file")).forEach((w=>{if(w.dataset.array==="false")w.value&&x.append(w.dataset.pname,w.value);else{const C=w.value&&Array.isArray(w.value)?w.value.join(","):"";x.append(w.dataset.pname,C)}})),i.body=x}}else if(l.includes("form-data")){const h=new FormData;[...t.querySelectorAll("[data-ptype='form-data']")].forEach((v=>{v.dataset.array==="false"?v.type==="file"&&v.files[0]?h.append(v.dataset.pname,v.files[0],v.files[0].name):v.value&&h.append(v.dataset.pname,v.value):v.value&&Array.isArray(v.value)&&h.append(v.dataset.pname,v.value.join(","))})),i.body=h}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(l)){const h=t.querySelector(".request-body-param-file");h!=null&&h.files[0]&&(i.body=h.files[0])}else if(l.includes("json")||l.includes("xml")||l.includes("text")){const h=t.querySelector(".request-body-param-user-input");h!=null&&h.value&&(i.body=h.value)}}return i}async onTryClick(t){const n=t.target,i=n.closest(".request-panel"),l=this.buildFetchURL(i),h=this.buildFetchBodyOptions(i),v=this.buildFetchHeaders(i);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(l,v,h,i),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),this.fetchCredentials&&(h.credentials=this.fetchCredentials);const x=new AbortController,{signal:w}=x;h.headers=v;const C={url:l,...h};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:C,controller:x}}));const $={method:C.method,headers:C.headers,credentials:C.credentials,body:C.body},N=new Request(C.url,$);let _,F;try{let U,J,Y;n.disabled=!0,this.responseText="⌛",this.responseMessage="",this.requestUpdate();const W=performance.now();_=await fetch(N,{signal:w});const P=performance.now();F=_.clone(),n.disabled=!1,this.responseMessage=V`${_.statusText?`${_.statusText}:${_.status}`:_.status} <div style="color:var(--light-fg)"> Took ${Math.round(P-W)} milliseconds </div>`,this.responseUrl=_.url;const se={};_.headers.forEach(((he,ge)=>{se[ge]=he,this.responseHeaders=`${this.responseHeaders}${ge}: ${he}
|
||
`}));let ae=_.headers.get("content-type");if((await _.clone().text()).length===0)this.responseText="";else if(ae){if(ae=ae.split(";")[0].trim(),ae==="application/x-ndjson")this.responseText=await _.text();else if(ae.includes("json"))if(/charset=[^"']+/.test(ae)){const he=ae.split("charset=")[1],ge=await _.arrayBuffer();try{Y=new TextDecoder(he).decode(ge)}catch{Y=new TextDecoder("utf-8").decode(ge)}try{J=JSON.parse(Y),this.responseText=JSON.stringify(J,null,2)}catch{this.responseText=Y}}else J=await _.json(),this.responseText=JSON.stringify(J,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="download"):/^image/.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="image"):/^audio|^image|^video/.test(ae)?(this.responseIsBlob=!0,this.responseBlobType="view"):(Y=await _.text(),ae.includes("xml")?this.responseText=qX()(Y,{textNodesOnSameLine:!0,indentor:" "}):this.responseText=Y);if(this.responseIsBlob){const he=_.headers.get("content-disposition")||"";let ge="filename";if(he){const pe=he.match(/filename\*=\s*UTF-8''([^;]+)/);if(pe)ge=decodeURIComponent(pe[1]);else{const Te=he.match(/filename="?([^"]+)"?/);Te&&(ge=Te[1])}}this.respContentDisposition=ge,U=await _.blob(),this.responseBlobUrl=URL.createObjectURL(U)}}else Y=await _.text(),this.responseText=Y;this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:N,response:F,responseHeaders:se,responseBody:J||Y||U,responseStatus:F.ok}}))}catch(U){n.disabled=!1,U.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:U,request:N}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:U,request:N}})),this.responseMessage=`${U.message} (CORS or Network Issue)`)}this.requestUpdate()}liveCURLSyntaxUpdate(t){this.applyCURLSyntax(t),this.requestUpdate()}onGenerateCURLClick(t){const n=this.getRequestPanel(t);this.applyCURLSyntax(n)}getRequestPanel(t){return t.target.closest(".request-panel")}applyCURLSyntax(t){const n=this.buildFetchURL(t),i=this.buildFetchBodyOptions(t),l=this.buildFetchHeaders(t);this.curlSyntax=this.generateCURLSyntax(n,l,i,t)}generateCURLSyntax(t,n,i,l){let h,v="",x="",w="",C="";const $=l.querySelector(".request-body-container");if(t.startsWith("http")===!1?h=new URL(t,window.location.href).href:h=t,v=`curl -X ${this.method.toUpperCase()} "${h}" \\
|
||
`,n.forEach(((N,_)=>{let F=N.split(",");F=F.map((U=>U.trim())).filter(((U,J)=>F.indexOf(U)===J)),n.set(_,F.join(", "))})),x=Array.from(n).map((([N,_])=>` -H '${N}: ${_}'`)).join(`\\
|
||
`),x&&(x=`${x} \\
|
||
`),i.body instanceof URLSearchParams)w=` -d ${i.body.toString()} \\
|
||
`;else if(i.body instanceof File)w=` --data-binary @${i.body.name} \\
|
||
`;else if(i.body instanceof FormData)C=Array.from(i.body).reduce(((N,[_,F])=>{if(F instanceof File)return[...N,` -F "${_}=@${F.name}"`];const U=F.match(/([^,],)/gm);if(U){const J=U.map((Y=>`-F "${_}[]=${Y}"`));return[...N,...J]}return[...N,` -F "${_}=${F}"`]}),[]).join(`\\
|
||
`);else if($&&$.dataset.selectedRequestBodyType){const N=$.dataset.selectedRequestBodyType,_=l.querySelector(".request-body-param-user-input");if(_!=null&&_.value){if(i.body=_.value,N.includes("json"))try{w=` -d '${JSON.stringify(JSON.parse(_.value))}' \\
|
||
`}catch{}w||(w=` -d '${_.value.replace(/'/g,`'"'"'`)}' \\
|
||
`)}}return`${v}${x}${w}${C}`}onAddRemoveFileInput(t,n,i){if(t.target.tagName.toLowerCase()!=="button")return;if(t.target.classList.contains("file-input-remove-btn"))return void t.target.closest(".input-set").remove();const l=t.target.closest(".file-input-container"),h=document.createElement("div");h.setAttribute("class","input-set row");const v=document.createElement("input");v.type="file",v.style="width:200px; margin-top:2px;",v.setAttribute("data-pname",n),v.setAttribute("data-ptype",i.includes("form-urlencode")?"form-urlencode":"form-data"),v.setAttribute("data-array","false"),v.setAttribute("data-file-array","true");const x=document.createElement("button");x.setAttribute("class","file-input-remove-btn"),x.innerHTML="✕",h.appendChild(v),h.appendChild(x),l.insertBefore(h,t.target)}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl="")}disconnectedCallback(){this.curlSyntax="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),super.disconnectedCallback()}}),customElements.define("schema-table",class extends Ht{static get properties(){return{schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Si,rM,M`
|
||
.table {
|
||
font-size: var(--font-size-small);
|
||
text-align: left;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.table .tr {
|
||
width: calc(100% - 5px);
|
||
padding: 0 0 0 5px;
|
||
border-bottom: 1px dotted var(--light-border-color);
|
||
}
|
||
.table .td {
|
||
padding: 4px 0;
|
||
}
|
||
.table .key {
|
||
width: 240px;
|
||
}
|
||
.key .key-label {
|
||
font-size: var(--font-size-mono);
|
||
}
|
||
.key.deprecated .key-label {
|
||
color: var(--red);
|
||
}
|
||
|
||
.table .key-type {
|
||
white-space: normal;
|
||
width: 150px;
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
max-height: calc(var(--font-size-small) + var(--font-size-small));
|
||
}
|
||
|
||
.obj-toggle {
|
||
padding: 0 2px;
|
||
border-radius:2px;
|
||
border: 1px solid transparent;
|
||
display: inline-block;
|
||
margin-left: -16px;
|
||
color:var(--primary-color);
|
||
cursor:pointer;
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-family: var(--font-mono);
|
||
background-clip: border-box;
|
||
}
|
||
.obj-toggle:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tr.expanded + .object-body {
|
||
display:block;
|
||
}
|
||
.tr.collapsed + .object-body {
|
||
display:none;
|
||
}`,fc]}render(){var t,n,i;return V`
|
||
<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class='toolbar'>
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?V`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-multiline-toggle" class='toolbar-item schema-multiline-toggle' >
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${In(ht(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))} </span>
|
||
<div style = 'border:1px solid var(--light-border-color)'>
|
||
<div style='display:flex; background-color: var(--bg2); padding:8px 4px; border-bottom:1px solid var(--light-border-color);'>
|
||
<div class='key' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Field </div>
|
||
<div class='key-type' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Type </div>
|
||
<div class='key-descr' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Description </div>
|
||
</div>
|
||
${this.data?V`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"])}`:""}
|
||
</div>
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",h="",v=0,x=0,w="",C=!1){var $,N;if(this.schemaHideReadOnly==="true"&&(n==="array"&&w==="readonly"||t&&t["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&w==="writeonly"||t&&t["::readwrite"]==="writeonly"))return;if(!t)return V`<div class="null" style="display:inline;">
|
||
<span style='margin-left:${16*(v+1)}px'> </span>
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?V`<span class='mono-font'> [ ] </span>`:n==="object"?V`<span class='mono-font'> { } </span>`:V`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;const _=($=t["::type"])!==null&&$!==void 0&&$.startsWith("xxx-of")?v:v+1,F=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1,U=16*F;if(Object.keys(t).length===0)return V`<span class="td key object" style='padding-left:${U}px'>${l}</span>`;let J="",Y="",W=!1;if(l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF"))J=l.replace("::","").replace("~"," "),W=!0;else if(l.startsWith("::OPTION")){const Qe=l.split("~");J=Qe[1],Y=Qe[2]}else J=l;let P="";if(t["::type"]==="object"?P=n==="array"?"array of object":t["::dataTypeLabel"]||t["::type"]:t["::type"]==="array"&&(P=n==="array"?"array of array "+(i!=="object"?`of ${i}`:""):t["::dataTypeLabel"]||t["::type"]),typeof t=="object")return V`
|
||
${_>=0&&l?V`
|
||
<div class='tr ${_<=this.schemaExpandLevel?"expanded":"collapsed"} ${t["::type"]}' data-obj='${J}' title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='padding-left:${U}px'>
|
||
${J||Y?V`
|
||
<span class='obj-toggle ${_<this.schemaExpandLevel?"expanded":"collapsed"}' data-obj='${J}'>
|
||
${v<this.schemaExpandLevel?"-":"+"}
|
||
</span>`:""}
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?V`<span class="xxx-of-key" style="margin-left:-6px">${J}</span><span class="${W?"xxx-of-key":"xxx-of-descr"}">${Y}</span>`:J.endsWith("*")?V`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J.substring(0,J.length-1)}</span><span style='color:var(--red);'>*</span>`:V`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J==="::props"?"":J}</span>`}
|
||
${t["::type"]==="xxx-of"&&n==="array"?V`<span style="color:var(--primary-color)">ARRAY</span>`:""}
|
||
</div>
|
||
<div class='td key-type' title="${t["::readwrite"]==="readonly"?"Read-Only":t["::readwrite"]==="writeonly"?"Write-Only":""}">
|
||
${(t["::type"]||"").includes("xxx-of")?"":P}
|
||
${t["::readwrite"]==="readonly"?" 🆁":t["::readwrite"]==="writeonly"?" 🆆":""}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small' style='line-height:1.7'>${In(ht(h||""))}</div>
|
||
</div>`:V`
|
||
${t["::type"]==="array"&&n==="array"?V`
|
||
<div class='tr'>
|
||
<div class='td key'></div>
|
||
<div class='td key-type'>
|
||
${i&&i!=="object"?`${n} of ${i}`:n}
|
||
</div>
|
||
<div class='td key-descr'></div>
|
||
</div>`:""}`}
|
||
<div class='object-body'>
|
||
${Array.isArray(t)&&t[0]?V`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",_,F,"")}`:V`
|
||
${Object.keys(t).map((Qe=>{var ct;return V`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(Qe)?t[Qe]["::type"]==="array"||t[Qe]["::type"]==="object"?V`${this.generateTree(t[Qe]["::type"]==="array"?t[Qe]["::props"]:t[Qe],t[Qe]["::type"],t[Qe]["::array-type"]||"",Qe,t[Qe]["::description"],_,F,t[Qe]["::readwrite"]?t[Qe]["::readwrite"]:"",C||t[Qe]["::deprecated"])}`:"":V`${this.generateTree(t[Qe]["::type"]==="array"?t[Qe]["::props"]:t[Qe],t[Qe]["::type"],t[Qe]["::array-type"]||"",Qe,((ct=t[Qe])===null||ct===void 0?void 0:ct["::description"])||"",_,F,t[Qe]["::readwrite"]?t[Qe]["::readwrite"]:"",C||t[Qe]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
`;const[se,ae,he,ge,pe,Te,Ae,qe,Se]=t.split("~|~");if(ae==="🆁"&&this.schemaHideReadOnly==="true"||ae==="🆆"&&this.schemaHideWriteOnly==="true")return;const me=se.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),Me=he||ge||pe||Te?'<span class="descr-expand-toggle">➔</span>':"";let Ie="";return Ie=n==="array"?V`
|
||
<div class='td key-type ${me}' title="${w==="readonly"?"Read-Only":ae==="writeonly"?"Write-Only":""}">
|
||
[${se}] ${w==="readonly"?"🆁":w==="writeonly"?"🆆":""}
|
||
</div>`:V`
|
||
<div class='td key-type ${me}' title="${ae==="🆁"?"Read-Only":ae==="🆆"?"Write-Only":""}">
|
||
${se} ${ae}
|
||
</div>`,V`
|
||
<div class = "tr primitive" title="${C||Se?"Deprecated":""}">
|
||
<div class="td key ${C||Se?"deprecated":""}" style='padding-left:${U}px'>
|
||
${C||Se?V`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${(N=J)!==null&&N!==void 0&&N.endsWith("*")?V`
|
||
<span class="key-label">${J.substring(0,J.length-1)}</span>
|
||
<span style='color:var(--red);'>*</span>`:l.startsWith("::OPTION")?V`<span class='xxx-of-key'>${J}</span><span class="xxx-of-descr">${Y}</span>`:V`${J?V`<span class="key-label"> ${J}</span>`:V`<span class="xxx-of-descr">${qe}</span>`}`}
|
||
</div>
|
||
${Ie}
|
||
<div class='td key-descr' style='font-size: var(--font-size-small)'>
|
||
${V`<span class="m-markdown-small">
|
||
${In(ht(n==="array"?`${Me} ${h}`:qe?`${Me} <b>${qe}:</b> ${Ae}`:`${Me} ${Ae}`))}
|
||
</span>`}
|
||
${he?V`<div class='' style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Constraints: </span> ${he}</div>`:""}
|
||
${ge?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${ge}</div>`:""}
|
||
${pe?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>${se==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${Te?V`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Pattern: </span>${Te}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("obj-toggle"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr");n.classList.contains("expanded")?(n.classList.add("collapsed"),n.classList.remove("expanded"),t.target.innerText="+"):(n.classList.remove("collapsed"),n.classList.add("expanded"),t.target.innerText="-")}});function VX(t){const n=new ht.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(h)}">${i}</h${l}>`,n}function HX(t){const n=t.target.closest(".tag-container").querySelector(".tag-description"),i=t.target.closest(".tag-container").querySelector(".tag-icon");n&&i&&(n.classList.contains("expanded")?(n.style.maxHeight=0,n.classList.replace("expanded","collapsed"),i.classList.replace("expanded","collapsed")):(n.style.maxHeight=`${n.scrollHeight}px`,n.classList.replace("collapsed","expanded"),i.classList.replace("collapsed","expanded")))}function SR(t,n="",i=""){var l,h,v,x,w,C,$,N,_;const F=new Set;for(const se in t.responses)for(const ae in(U=t.responses[se])===null||U===void 0?void 0:U.content){var U;F.add(ae.trim())}const J=[...F].join(", "),Y=this.resolvedSpec.securitySchemes.filter((se=>{var ae;return se.finalKeyValue&&((ae=t.security)===null||ae===void 0?void 0:ae.some((he=>se.securitySchemeId in he)))}))||[],W=this.resolvedSpec.securitySchemes.find((se=>se.securitySchemeId===ho&&se.value!=="-"));W&&Y.push(W);const P=t.xCodeSamples?ZP.call(this,t.xCodeSamples):"";return V`
|
||
${this.renderStyle==="read"?V`<div class='divider' part="operation-divider"></div>`:""}
|
||
<div class='expanded-endpoint-body observe-me ${t.method} ${t.deprecated?"deprecated":""} ' part="section-operation ${t.elementId}" id='${t.elementId}'>
|
||
${this.renderStyle==="focused"&&n!=="General ⦂"?V`
|
||
<div class="tag-container" part="section-operation-tag">
|
||
<span class="upper" style="font-weight:bold; font-size:18px;"> ${n} </span>
|
||
${i?V`
|
||
<svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary-color); vertical-align:top; cursor:pointer"
|
||
@click="${se=>{HX.call(this,se)}}"
|
||
>
|
||
<path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path>
|
||
</svg>
|
||
<div class="tag-description collapsed" style="max-height:0px; overflow:hidden; margin-top:16px; border:1px solid var(--border-color)">
|
||
<div class="m-markdown" style="padding:8px"> ${In(ht(i))}</div>
|
||
</div>`:""}
|
||
</div>
|
||
`:""}
|
||
${t.deprecated?V`<div class="bold-text red-text"> DEPRECATED </div>`:""}
|
||
${V`
|
||
${t.xBadges&&((l=t.xBadges)===null||l===void 0?void 0:l.length)>0?V`
|
||
<div style="display:flex; flex-wrap:wrap; margin-bottom: -24px; font-size: var(--font-size-small);">
|
||
${t.xBadges.map((se=>se.color==="none"?"":V`<span style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${se.color}, var(--input-bg)); color:var(--${se.color}); border:1px solid var(--${se.color})">${se.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
<h2 part="section-operation-summary"> ${t.shortSummary||`${t.method.toUpperCase()} ${t.path}`}</h2>
|
||
${t.isWebhook?V`<span part="section-operation-webhook" style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`:V`
|
||
<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)">
|
||
<span part="label-operation-method" class="regular-font upper method-fg bold-text ${t.method}">${t.method}</span>
|
||
<span part="label-operation-path">${t.path}</span>
|
||
</div>
|
||
`}
|
||
<slot name="${t.elementId}"></slot>`}
|
||
${t.description?V`<div class="m-markdown"> ${In(ht(t.description))}</div>`:""}
|
||
${YP.call(this,t.security)}
|
||
${(h=t.externalDocs)!==null&&h!==void 0&&h.url||(v=t.externalDocs)!==null&&v!==void 0&&v.description?V`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${In(ht(((x=t.externalDocs)===null||x===void 0?void 0:x.description)||""))} </div>
|
||
${(w=t.externalDocs)!==null&&w!==void 0&&w.url?V`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(C=t.externalDocs)===null||C===void 0?void 0:C.url}" target="_blank">
|
||
${($=t.externalDocs)===null||$===void 0?void 0:$.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
${P}
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${Y}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${((N=t.servers)===null||N===void 0||(N=N[0])===null||N===void 0?void 0:N.url)||((_=this.selectedServer)===null||_===void 0?void 0:_.computedUrl)}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${J}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?WP.call(this,t.callbacks):""}
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses = "${t.responses}"
|
||
render-style = "${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}function GX(){return this.resolvedSpec?V`
|
||
${this.resolvedSpec.tags.map((t=>V`
|
||
<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag" part="section-tag-title label-tag-title">${t.displayName||t.name}</div>
|
||
<slot name="${t.elementId}"></slot>
|
||
<div class="regular-font-size">
|
||
${In(`
|
||
<div class="m-markdown regular-font">
|
||
${ht(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:VX(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>
|
||
</section>
|
||
<section class="regular-font section-gap--read-mode" part="section-operations-in-tag">
|
||
${t.paths.map((n=>SR.call(this,n)))}
|
||
</section>
|
||
`))}
|
||
`:""}function XX(t){return V`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400;"> Schema </span></div>
|
||
${this.schemaStyle==="table"?V`
|
||
<schema-table
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>`:V`
|
||
<schema-tree
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}
|
||
</div>`}function YX(t,n){return t.id.indexOf("schemas-")!==-1?XX.call(this,t):V`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
${V`
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400"> ${n} </span> </div>
|
||
${t.component?V`
|
||
<div class='mono-font regular-font-size' style='padding: 8px 0; color:var(--fg2)'>
|
||
<json-tree class="border tree" render-style='${this.renderStyle}' .data="${t.component}"> </json-tree>
|
||
</div>`:""}
|
||
`}
|
||
</div>
|
||
`}function ZX(){return this.resolvedSpec?V`
|
||
${this.resolvedSpec.components.map((t=>V`
|
||
<div id="cmp--${t.name.toLowerCase()}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag">${t.name}</div>
|
||
<div class="regular-font-size">
|
||
${In(`<div class='m-markdown regular-font'>${ht(t.description?t.description:"")}</div>`)}
|
||
</div>
|
||
</div>
|
||
<div class='regular-font section-gap--read-mode'>
|
||
${t.subComponents.filter((n=>n.expanded!==!1)).map((n=>YX.call(this,n,t.name)))}
|
||
</div>
|
||
`))}
|
||
`:""}function WX(){const t=new ht.Renderer;return t.heading=(n,i,l,h)=>`<h${i} class="observe-me" id="overview--${h.slug(l)}">${n}</h${i}>`,t}function $E(){var t,n,i,l;return V`
|
||
<section id="overview" part="section-overview"
|
||
class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">
|
||
${(t=this.resolvedSpec)!==null&&t!==void 0&&t.info?V`
|
||
<div id="api-title" part="section-overview-title" style="font-size:32px">
|
||
${this.resolvedSpec.info.title}
|
||
${this.resolvedSpec.info.version?V`
|
||
<span style = 'font-size:var(--font-size-small);font-weight:bold'>
|
||
${this.resolvedSpec.info.version}
|
||
</span>`:""}
|
||
</div>
|
||
<div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px); margin-top:8px;">
|
||
${(n=this.resolvedSpec.info.contact)!==null&&n!==void 0&&n.email?V`<span>${this.resolvedSpec.info.contact.name||"Email"}:
|
||
<a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a>
|
||
</span>`:""}
|
||
${(i=this.resolvedSpec.info.contact)!==null&&i!==void 0&&i.url?V`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""}
|
||
${this.resolvedSpec.info.license?V`<span>License:
|
||
${this.resolvedSpec.info.license.url?V`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name} </span>`:""}
|
||
${this.resolvedSpec.info.termsOfService?V`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}
|
||
${this.specUrl&&this.allowSpecFileDownload==="true"?V`
|
||
<div style="display:flex; margin:12px 0; gap:8px; justify-content: start;">
|
||
<button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click='${h=>{Lp(this.specUrl,"openapi-spec")}}'>Download OpenAPI spec</button>
|
||
${(l=this.specUrl)!==null&&l!==void 0&&l.trim().toLowerCase().endsWith("json")?V`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click='${h=>{qg(this.specUrl)}}'>View OpenAPI spec (New Tab)</button>`:""}
|
||
</div>`:""}
|
||
</div>
|
||
<slot name="overview"></slot>
|
||
<div id="api-description">
|
||
${this.resolvedSpec.info.description?V`${In(`
|
||
<div class="m-markdown regular-font">
|
||
${ht(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:WX()}:void 0)}
|
||
</div>`)}`:""}
|
||
</div>
|
||
`:""}
|
||
</section>
|
||
`}function ER(t){var n;const i=(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.find((l=>l.url===t));return!!i&&(this.selectedServer=i,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:i}})),!0)}function sM(t,n){const i=[...t.currentTarget.closest("table").querySelectorAll("input, select")];let l=n.url;i.forEach((h=>{const v=new RegExp(`{${h.dataset.var}}`,"g");l=l.replace(v,h.value)})),n.computedUrl=l,this.requestUpdate()}function JX(){return this.selectedServer&&this.selectedServer.variables?V`
|
||
<div class="table-title">SERVER VARIABLES</div>
|
||
<table class='m-table' role='presentation'>
|
||
${Object.entries(this.selectedServer.variables).map((t=>V`
|
||
<tr>
|
||
<td style="vertical-align: middle;" >${t[0]}</td>
|
||
<td>
|
||
${t[1].enum?V`
|
||
<select
|
||
data-var = "${t[0]}"
|
||
@input = ${n=>{sM.call(this,n,this.selectedServer)}}
|
||
>
|
||
${Object.entries(t[1].enum).map((n=>t[1].default===n[1]?V`
|
||
<option
|
||
selected
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`:V`
|
||
<option
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`))}
|
||
</select>`:V`
|
||
<input
|
||
type = "text"
|
||
part="textbox textbox-server-var"
|
||
spellcheck = "false"
|
||
data-var = "${t[0]}"
|
||
value = "${t[1].default}"
|
||
@input = ${n=>{sM.call(this,n,this.selectedServer)}}
|
||
/>`}
|
||
</td>
|
||
</tr>
|
||
${t[1].description?V`<tr><td colspan="2" style="border:none"><span class="m-markdown-small"> ${In(ht(t[1].description))} </span></td></tr>`:""}
|
||
`))}
|
||
</table>
|
||
`:""}function iM(){var t,n,i;return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":V`
|
||
<section id = 'servers' part="section-servers" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class='regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}'>
|
||
<div part = "section-servers-title" class = "sub-title">API SERVER</div>
|
||
<div class = 'mono-font' style='margin: 12px 0; font-size:calc(var(--font-size-small) + 1px);'>
|
||
${this.resolvedSpec.servers&&((t=this.resolvedSpec.servers)===null||t===void 0?void 0:t.length)!==0?V`
|
||
${(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.map(((l,h)=>V`
|
||
<input type = 'radio'
|
||
name = 'api_server'
|
||
id = 'srvr-opt-${h}'
|
||
value = '${l.url}'
|
||
@change = ${()=>{ER.call(this,l.url)}}
|
||
.checked = '${this.selectedServer.url===l.url}'
|
||
style = 'margin:4px 0; cursor:pointer'
|
||
/>
|
||
<label style='cursor:pointer' for='srvr-opt-${h}'>
|
||
${l.url} ${l.description?V`- <span class='regular-font'>${l.description} </span>`:""}
|
||
</label>
|
||
<br/>
|
||
`))}
|
||
`:""}
|
||
<div class="table-title primary-text" part="label-selected-server"> SELECTED: ${((i=this.selectedServer)===null||i===void 0?void 0:i.computedUrl)||"none"}</div>
|
||
</div>
|
||
<slot name="servers"></slot>
|
||
${JX.call(this)}
|
||
</section>`}function aM(t,n="toggle"){const i=t?.closest(".nav-bar-tag-and-paths"),l=i?.querySelector(".nav-bar-paths-under-tag");if(i){const h=i.classList.contains("expanded");!h||n!=="toggle"&&n!=="collapse"?h||n!=="toggle"&&n!=="expand"||(i.classList.replace("collapsed","expanded"),l.style.maxHeight=`${l.scrollHeight}px`):(l.style.maxHeight=0,i.classList.replace("expanded","collapsed"))}}function oM(t){var n,i,l,h;if(t.type!=="click"&&(t.type!=="keyup"||t.keyCode!==13))return;const v=t.target;t.stopPropagation(),((n=v.dataset)===null||n===void 0?void 0:n.action)==="navigate"?this.scrollToEventTarget(t,!1):((i=v.dataset)===null||i===void 0?void 0:i.action)==="expand-all"||((l=v.dataset)===null||l===void 0?void 0:l.action)==="collapse-all"?(function(x,w="expand-all"){if(x.type!=="click"&&(x.type!=="keyup"||x.keyCode!==13))return;const C=[...x.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];w==="expand-all"?C.forEach(($=>{const N=$.querySelector(".nav-bar-paths-under-tag");$.classList.replace("collapsed","expanded"),N.style.maxHeight=`${N?.scrollHeight}px`})):C.forEach(($=>{$.classList.replace("expanded","collapsed"),$.querySelector(".nav-bar-paths-under-tag").style.maxHeight=0}))})(t,v.dataset.action):((h=v.dataset)===null||h===void 0?void 0:h.action)==="expand-collapse-tag"&&aM(v,"toggle")}function QX(){var t,n;return!this.resolvedSpec||this.resolvedSpec.specLoadError?V`
|
||
<nav class='nav-bar' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
</nav>
|
||
`:V`
|
||
<nav class='nav-bar ${this.renderStyle}' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":V`
|
||
<div style='display:flex; flex-direction:row; justify-content:center; align-items:stretch; padding:8px 24px 12px 24px; ${this.allowAdvancedSearch==="false"?"border-bottom: 1px solid var(--nav-hover-bg-color)":""}' part='section-navbar-search'>
|
||
${this.allowSearch==="false"?"":V`
|
||
<div style = 'display:flex; flex:1; line-height:22px;'>
|
||
<input id = 'nav-bar-search'
|
||
part = 'textbox textbox-nav-filter'
|
||
style = 'width:100%; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)'
|
||
type = 'text'
|
||
placeholder = 'Filter'
|
||
@change = '${this.onSearchChange}'
|
||
spellcheck = 'false'
|
||
>
|
||
<div style='margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;'>↩</div>
|
||
</div>
|
||
${this.searchVal?V`
|
||
<button @click = '${this.onClearSearch}' class='m-btn thin-border' style='margin-left:5px; color:var(--nav-text-color); width:75px; padding:6px 8px;' part='btn btn-outline btn-clear-filter'>
|
||
CLEAR
|
||
</button>`:""}
|
||
`}
|
||
${this.allowAdvancedSearch==="false"||this.searchVal?"":V`
|
||
<button class='m-btn primary' part='btn btn-fill btn-search' style='margin-left:5px; padding:6px 8px; width:75px' @click='${this.onShowSearchModalClicked}'>
|
||
SEARCH
|
||
</button>
|
||
`}
|
||
</div>
|
||
`}
|
||
${V`<nav class='nav-scroll' tabindex='-1' part='section-navbar-scroll' @click='${i=>oM.call(this,i)}' @keyup='${i=>oM.call(this,i)}' >
|
||
${this.showInfo!=="false"&&this.resolvedSpec.info?V`
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?V`
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-content-id='overview' data-action='navigate' tabindex='0' part='section-navbar-item section-navbar-overview'>
|
||
${((t=this.resolvedSpec.info)===null||t===void 0||(t=t.title)===null||t===void 0?void 0:t.trim())||"Overview"}
|
||
</div>`:""}
|
||
<div class='overview-headers'>
|
||
${this.resolvedSpec.infoDescriptionHeaders.map((i=>V`
|
||
<div
|
||
class='nav-bar-h${i.depth} ${this.navActiveItemMarker}'
|
||
id='link-overview--${new ht.Slugger().slug(i.text)}'
|
||
data-action='navigate'
|
||
data-content-id='overview--${new ht.Slugger().slug(i.text)}'
|
||
>
|
||
${i.text}
|
||
</div>`))}
|
||
</div>
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?V`<hr style='border-top: 1px solid var(--nav-hover-bg-color); border-width:1px 0 0 0; margin: 15px 0 0 0'/>`:""}
|
||
`:V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-action='navigate' data-content-id='overview' tabindex='0'>
|
||
${((n=this.resolvedSpec.info)===null||n===void 0||(n=n.title)===null||n===void 0?void 0:n.trim())||"Overview"}
|
||
</div>`}
|
||
`:""}
|
||
|
||
${this.allowServerSelection==="false"?"":V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-servers' data-action='navigate' data-content-id='servers' tabindex='0' part='section-navbar-item section-navbar-servers'> API Servers </div>`}
|
||
${this.allowAuthentication!=="false"&&this.resolvedSpec.securitySchemes?V`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-auth' data-action='navigate' data-content-id='auth' tabindex='0' part='section-navbar-item section-navbar-auth'> Authentication </div>`:""}
|
||
|
||
<div id='link-operations-top' class='nav-bar-section operations' data-action='navigate' data-content-id='${this.renderStyle==="focused"?"":"operations-top"}' part='section-navbar-item section-navbar-operations-top'>
|
||
<div style='font-size:16px; display:flex; margin-left:10px;'>
|
||
${this.renderStyle==="focused"?V`
|
||
<div class='nav-bar-expand-all'
|
||
data-action='expand-all'
|
||
tabindex='0'
|
||
title='Expand all'
|
||
>▸</div>
|
||
<div class='nav-bar-collapse-all'
|
||
data-action='collapse-all'
|
||
tabindex='0'
|
||
title='Collapse all'
|
||
>▸</div>`:""}
|
||
</div>
|
||
<div class='nav-bar-section-title'> OPERATIONS </div>
|
||
</div>
|
||
|
||
<!-- TAGS AND PATHS-->
|
||
${this.resolvedSpec.tags.filter((i=>i.paths.filter((l=>th(this.searchVal,l,i.name))).length)).map((i=>{var l;return V`
|
||
<div class='nav-bar-tag-and-paths ${this.renderStyle==="read"||i.expanded?"expanded":"collapsed"}' >
|
||
${i.name==="General ⦂"?V`<hr style='border:none; border-top: 1px dotted var(--nav-text-color); opacity:0.3; margin:-1px 0 0 0;'/>`:V`
|
||
<div
|
||
class='nav-bar-tag ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-tag'
|
||
id='link-${i.elementId}'
|
||
data-action='${this.renderStyle==="read"||this.onNavTagClick==="show-description"?"navigate":"expand-collapse-tag"}'
|
||
data-content-id='${(this.renderStyle==="read"?`${i.elementId}`:this.onNavTagClick==="show-description")?`${i.elementId}`:""}'
|
||
data-first-path-id='${i.firstPathId}'
|
||
tabindex='0'
|
||
>
|
||
<div style="pointer-events:none;">${i.displayName||i.name}</div>
|
||
<div class='nav-bar-tag-icon' tabindex='0' data-action='expand-collapse-tag'></div>
|
||
</div>
|
||
`}
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?V`
|
||
${this.renderStyle==="focused"&&this.onNavTagClick==="expand-collapse"?"":V`
|
||
<div class='tag-headers'>
|
||
${i.headers.map((h=>V`
|
||
<div
|
||
class='nav-bar-h${h.depth} ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-h${h.depth}'
|
||
id='link-${i.elementId}--${new ht.Slugger().slug(h.text)}'
|
||
data-action='navigate'
|
||
data-content-id='${i.elementId}--${new ht.Slugger().slug(h.text)}'
|
||
tabindex='0'
|
||
> ${h.text}</div>`))}
|
||
</div>`}`:""}
|
||
<div class='nav-bar-paths-under-tag' style='max-height:${i.expanded||this.renderStyle==="read"?50*(((l=i.paths)===null||l===void 0?void 0:l.length)||1):0}px;'>
|
||
<!-- Paths in each tag (endpoints) -->
|
||
${i.paths.filter((h=>!this.searchVal||th(this.searchVal,h,i.name))).map((h=>V`
|
||
<div
|
||
class='nav-bar-path ${this.navActiveItemMarker} ${this.usePathInNavBar==="true"?"small-font":""}'
|
||
part='section-navbar-item section-navbar-path'
|
||
data-action='navigate'
|
||
data-content-id='${h.elementId}'
|
||
id='link-${h.elementId}'
|
||
tabindex='0'
|
||
>
|
||
<span style = 'display:flex; pointer-events: none; align-items:start; ${h.deprecated?"filter:opacity(0.5)":""}'>
|
||
${V`<span class='nav-method ${this.showMethodInNavBar} ${h.method}' style='pointer-events: none;'>
|
||
${this.showMethodInNavBar==="as-colored-block"?h.method.substring(0,3).toUpperCase():h.method.toUpperCase()}
|
||
</span>`}
|
||
${h.isWebhook?V`<span style='font-weight:bold; pointer-events: none; margin-right:8px; font-size: calc(var(--font-size-small) - 2px)'>WEBHOOK</span>`:""}
|
||
${this.usePathInNavBar==="true"?V`<span style='pointer-events: none;' class='mono-font'>${h.path}</span>`:h.summary||h.shortSummary}
|
||
</span>
|
||
</div>`))}
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
|
||
<!-- COMPONENTS -->
|
||
${this.resolvedSpec.components&&this.showComponents==="true"&&this.renderStyle==="focused"?V`
|
||
<div id='link-components' class='nav-bar-section components'>
|
||
<div></div>
|
||
<div class='nav-bar-section-title'>COMPONENTS</div>
|
||
</div>
|
||
${this.resolvedSpec.components.map((i=>i.subComponents.length?V`
|
||
<div class='nav-bar-tag'
|
||
part='section-navbar-item section-navbar-tag'
|
||
data-action='navigate'
|
||
data-content-id='cmp--${i.name.toLowerCase()}'
|
||
id='link-cmp--${i.name.toLowerCase()}'
|
||
>
|
||
${i.name}
|
||
</div>
|
||
${i.subComponents.filter((l=>l.expanded!==!1)).map((l=>V`
|
||
<div class='nav-bar-path' data-action='navigate' data-content-id='cmp--${l.id}' id='link-cmp--${l.id}'>
|
||
<span style = 'pointer-events: none;'> ${l.name} </span>
|
||
</div>`))}`:""))}`:""}
|
||
</nav>`}
|
||
</nav>
|
||
`}function eY(t){const n=new ht.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(h)}">${i}</h${l}>`,n}function NE(t){return V`
|
||
<div class='regular-font section-gap--focused-mode' part="section-operations-in-tag">
|
||
${t}
|
||
</div>`}function lM(){var t;if(this.showInfo==="true")return NE($E.call(this));const n=this.resolvedSpec.tags[0],i=(t=this.resolvedSpec.tags[0])===null||t===void 0?void 0:t.paths[0];return NE(n&&i?SR.call(this,i,n.name):"")}function tY(t){return V`
|
||
<h1 id="${t.elementId}">${t.displayName||t.name}</h1>
|
||
${this.onNavTagClick==="show-description"&&t.description?V`
|
||
<div class="m-markdown">
|
||
${In(`
|
||
<div class="m-markdown regular-font">
|
||
${ht(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:eY(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>`:""}
|
||
`}function nY(){if(!this.focusedElementId||!this.resolvedSpec)return;const t=this.focusedElementId;let n,i=null,l=null,h=0;if(t.startsWith("overview")&&this.showInfo==="true")n=$E.call(this);else if(t==="auth"&&this.allowAuthentication==="true")n=XP.call(this);else if(t==="servers"&&this.allowServerSelection==="true")n=iM.call(this);else if(t==="operations-top")n=V`
|
||
<div id="operations-top" class="observe-me">
|
||
<slot name="operations-top"></slot>
|
||
</div>`;else if(t.startsWith("cmp--")&&this.showComponents==="true")n=ZX.call(this);else if(t.startsWith("tag--")){const v=t.indexOf("--",4)>0?t.substring(0,t.indexOf("--",5)):t;l=this.resolvedSpec.tags.find((x=>x.elementId===v)),n=l?NE.call(this,tY.call(this,l)):lM.call(this)}else{for(h=0;h<this.resolvedSpec.tags.length&&(l=this.resolvedSpec.tags[h],i=this.resolvedSpec.tags[h].paths.find((v=>`${v.elementId}`===t)),!i);h+=1);i?(aM(this.shadowRoot.getElementById(`link-${t}`),"expand"),n=NE.call(this,SR.call(this,i,l.name||"",l.description||""))):n=lM.call(this)}return n}function rY(t){if(t.expanded)t.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(t.expanded=!0,this.updateRoute==="true"){const n=`${this.routePrefix||"#"}${t.elementId}`;window.location.hash!==n&&this.replaceHistoryState(t.elementId)}this.requestUpdate()}function sY(t,n="expand-all"){const i=[...t.querySelectorAll(".section-tag")];n==="expand-all"?i.map((l=>{l.classList.replace("collapsed","expanded")})):i.map((l=>{l.classList.replace("expanded","collapsed")}))}function cM(t,n="expand-all"){sY.call(this,t.target.closest(".operations-root"),n)}function uM(t,n=!1){return V`
|
||
<summary @click="${i=>{rY.call(this,t,i)}}" part="section-endpoint-head-${t.expanded?"expanded":"collapsed"}" class='endpoint-head ${t.method} ${t.deprecated?"deprecated":""} ${n||t.expanded?"expanded":"collapsed"}'>
|
||
<div part="section-endpoint-head-method" class="method ${t.method} ${t.deprecated?"deprecated":""}"> ${t.method} </div>
|
||
<div part="section-endpoint-head-path" class="path ${t.deprecated?"deprecated":""}">
|
||
${t.path}
|
||
${t.isWebhook?V`<span style="font-family: var(--font-regular); font-size: var(--); font-size: var(--font-size-small); color:var(--primary-color); margin-left: 16px"> Webhook</span>`:""}
|
||
</div>
|
||
${t.deprecated?V`
|
||
<span style="font-size:var(--font-size-small); text-transform:uppercase; font-weight:bold; color:var(--red); margin:2px 0 0 5px;">
|
||
deprecated
|
||
</span>`:""}
|
||
${this.showSummaryWhenCollapsed?V`
|
||
<div class="only-large-screen" style="min-width:60px; flex:1"></div>
|
||
<div part="section-endpoint-head-description" class="descr">${t.summary||t.shortSummary} </div>`:""}
|
||
</summary>
|
||
`}function dM(t){var n,i,l,h,v,x,w,C;const $=new Set;for(const Y in t.responses)for(const W in(N=t.responses[Y])===null||N===void 0?void 0:N.content){var N;$.add(W.trim())}const _=[...$].join(", "),F=this.resolvedSpec.securitySchemes.filter((Y=>{var W;return Y.finalKeyValue&&((W=t.security)===null||W===void 0?void 0:W.some((P=>Y.securitySchemeId in P)))}))||[],U=this.resolvedSpec.securitySchemes.find((Y=>Y.securitySchemeId===ho&&Y.value!=="-"));U&&F.push(U);const J=t.xCodeSamples?ZP(t.xCodeSamples):"";return V`
|
||
<div part="section-endpoint-body-${t.expanded?"expanded":"collapsed"}" class='endpoint-body ${t.method} ${t.deprecated?"deprecated":""}'>
|
||
<div class="summary">
|
||
${t.summary?V`<div class="title" part="section-endpoint-body-title">${t.summary}</div>`:t.shortSummary!==t.description?V`<div class="title" part="section-endpoint-body-title">${t.shortSummary}</div>`:""}
|
||
${t.xBadges&&((n=t.xBadges)===null||n===void 0?void 0:n.length)>0?V`
|
||
<div style="display:flex; flex-wrap:wrap;font-size: var(--font-size-small);">
|
||
${t.xBadges.map((Y=>Y.color==="none"?"":V`<span part="endpoint-badge" style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${Y.color}, var(--input-bg)); color:var(--${Y.color}); border:1px solid var(--${Y.color})">${Y.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
|
||
${t.description?V`<div part="section-endpoint-body-description" class="m-markdown"> ${In(ht(t.description))}</div>`:""}
|
||
${(i=t.externalDocs)!==null&&i!==void 0&&i.url||(l=t.externalDocs)!==null&&l!==void 0&&l.description?V`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${In(ht(((h=t.externalDocs)===null||h===void 0?void 0:h.description)||""))} </div>
|
||
${(v=t.externalDocs)!==null&&v!==void 0&&v.url?V`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(x=t.externalDocs)===null||x===void 0?void 0:x.url}" target="_blank">
|
||
${(w=t.externalDocs)===null||w===void 0?void 0:w.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
<slot name="${t.elementId}"></slot>
|
||
${YP.call(this,t.security)}
|
||
${J}
|
||
</div>
|
||
<div class='req-resp-container'>
|
||
<div style="display:flex; flex-direction:column" class="view-mode-request ${this.layout}-layout">
|
||
<api-request
|
||
class = "${this.renderStyle}-mode ${this.layout}-layout"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${F}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${t.servers&&t.servers.length>0?t.servers[0].url:(C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${_}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?WP.call(this,t.callbacks):""}
|
||
</div>
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses="${t.responses}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
|
||
textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>`}function iY(t=!1,n=!1){return this.resolvedSpec?V`
|
||
${t?"":V`
|
||
<div style="display:flex; justify-content:flex-end;">
|
||
<span @click="${i=>cM(i,"expand-all")}" style="color:var(--primary-color); cursor:pointer;">
|
||
Expand all
|
||
</span>
|
||
|
|
||
<span @click="${i=>cM(i,"collapse-all")}" style="color:var(--primary-color); cursor:pointer;" >
|
||
Collapse all
|
||
</span>
|
||
sections
|
||
</div>`}
|
||
${this.resolvedSpec.tags.map((i=>V`
|
||
${t?V`
|
||
<div class='section-tag-body'>
|
||
${i.paths.filter((l=>!this.searchVal||th(this.searchVal,l,i.name))).map((l=>V`
|
||
<section id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${uM.call(this,l,n)}
|
||
${n||l.expanded?dM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
`:V`
|
||
<div class='regular-font section-gap section-tag ${i.expanded?"expanded":"collapsed"}'>
|
||
<div class='section-tag-header' @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}">
|
||
<div id='${i.elementId}' class="sub-title tag" style="color:var(--primary-color)">${i.displayName||i.name}</div>
|
||
</div>
|
||
<div class='section-tag-body'>
|
||
<slot name="${i.elementId}"></slot>
|
||
<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">
|
||
${In(ht(i.description||""))}
|
||
</div>
|
||
${i.paths.filter((l=>!this.searchVal||th(this.searchVal,l,i.name))).map((l=>V`
|
||
<section part="section-endpoint" id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${uM.call(this,l,n)}
|
||
${n||l.expanded?dM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
</div>
|
||
`}
|
||
`))}`:""}function jR(){return V`
|
||
<header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px;">
|
||
<div class="only-large-screen-flex" style="align-items: center;">
|
||
<slot name="logo" class="logo" part="section-logo">
|
||
${t="height:36px;width:36px;margin-left:5px",V`
|
||
<div style=${t}>
|
||
<svg viewBox="1 0 511 512">
|
||
<path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/>
|
||
<path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/>
|
||
<path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/>
|
||
<path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/>
|
||
<path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/>
|
||
<path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/>
|
||
</svg>
|
||
</div>
|
||
`}
|
||
<!-- m-logo style="height:36px;width:36px;margin-left:5px"></m-logo -->
|
||
</slot>
|
||
<div class="header-title" part="label-header-title">${this.headingText}</div>
|
||
</div>
|
||
<div style="margin: 0px 8px;display:flex;flex:1">
|
||
${this.allowSpecUrlLoad==="false"?"":V`
|
||
<input id="spec-url"
|
||
type="text"
|
||
style="font-size:var(--font-size-small)"
|
||
class="header-input mono-font"
|
||
part="textbox textbox-spec-url"
|
||
placeholder="Spec URL"
|
||
value="${this.specUrl||""}"
|
||
@change="${this.onSpecUrlChange}"
|
||
spellcheck="false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
${this.allowSpecFileLoad==="false"?"":V`
|
||
<input id="spec-file"
|
||
part = "file-input"
|
||
type="file"
|
||
style="display:none"
|
||
value="${this.specFile||""}"
|
||
@change="${this.onSpecFileChange}"
|
||
spellcheck="false"
|
||
>
|
||
<button class="m-btn primary only-large-screen" style="margin-left:10px;" part="btn btn-fill" @click="${this.onFileLoadClick}"> LOCAL JSON FILE </button>
|
||
`}
|
||
<slot name="header"></slot>
|
||
${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":V`
|
||
<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px;" spellcheck="false" >
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
|
||
${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":V`
|
||
<button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px;" @click="${this.onShowSearchModalClicked}">
|
||
Search
|
||
</button>
|
||
`}
|
||
</div>
|
||
</header>`;var t}customElements.define("api-response",class extends Ht{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[Si,Eu,dl,ju,Su,RE,M`
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.resp-head{
|
||
vertical-align: middle;
|
||
padding:16px 0 8px;
|
||
}
|
||
.resp-head.divider{
|
||
border-top: 1px solid var(--border-color);
|
||
margin-top:10px;
|
||
}
|
||
.resp-status{
|
||
font-weight:bold;
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
}
|
||
.resp-descr{
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
color:var(--light-fg);
|
||
text-align:left;
|
||
}
|
||
.top-gap{margin-top:16px;}
|
||
.example-panel{
|
||
font-size:var(--font-size-small);
|
||
margin:0;
|
||
}
|
||
.focused-mode,
|
||
.read-mode {
|
||
padding-top:24px;
|
||
margin-top:12px;
|
||
border-top: 1px dashed var(--border-color);
|
||
}`,fc]}render(){return V`
|
||
<div class="col regular-font response-panel ${this.renderStyle}-mode">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK RESPONSE":"RESPONSE"}
|
||
</div>
|
||
<div>
|
||
${this.responseTemplate()}
|
||
</div>
|
||
</div>
|
||
`}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const l in this.responses){this.selectedStatus||(this.selectedStatus=l);const h={};for(const x in(t=this.responses[l])===null||t===void 0?void 0:t.content){var t,n;const w=this.responses[l].content[x];this.selectedMimeType||(this.selectedMimeType=x);const C=ts(w.schema,{}),$=qm(w.schema,x,aa(w.examples),aa(w.example),this.callback!=="true"&&this.webhook!=="true",this.callback==="true"||this.webhook==="true",x.includes("json")?"json":"text");h[x]={description:this.responses[l].description,examples:$,selectedExample:((n=$[0])===null||n===void 0?void 0:n.exampleId)||"",schemaTree:C}}const v=[];for(const x in(i=this.responses[l])===null||i===void 0?void 0:i.headers){var i;v.push({name:x,...this.responses[l].headers[x]})}this.headersForEachRespStatus[l]=v,this.mimeResponsesForEachStatus[l]=h}return V`
|
||
${Object.keys(this.responses).length>1?V`<div class='row' style='flex-wrap:wrap'>
|
||
${Object.keys(this.responses).map((l=>V`
|
||
${l==="$$ref"?"":V`
|
||
<button
|
||
@click="${()=>{this.selectedStatus=l,this.responses[l].content&&Object.keys(this.responses[l].content)[0]?this.selectedMimeType=Object.keys(this.responses[l].content)[0]:this.selectedMimeType=void 0}}"
|
||
class='m-btn small ${this.selectedStatus===l?"primary":""}'
|
||
part="btn ${this.selectedStatus===l?"btn-response-status btn-selected-response-status":" btn-response-status"}"
|
||
style='margin: 8px 4px 0 0'
|
||
>
|
||
${l}
|
||
</button>`}`))}</div>`:V`<span>${Object.keys(this.responses)[0]}</span>`}
|
||
|
||
${Object.keys(this.responses).map((l=>{var h,v;return V`
|
||
<div style = 'display: ${l===this.selectedStatus?"block":"none"}' >
|
||
<div class="top-gap">
|
||
<span class="resp-descr m-markdown ">${In(ht(((h=this.responses[l])===null||h===void 0?void 0:h.description)||""))}</span>
|
||
${this.headersForEachRespStatus[l]&&((v=this.headersForEachRespStatus[l])===null||v===void 0?void 0:v.length)>0?V`${this.responseHeaderListTemplate(this.headersForEachRespStatus[l])}`:""}
|
||
</div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===0?"":V`
|
||
<div part="tab-panel" class="tab-panel col">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${x=>{x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}" >
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema' >SCHEMA</button>
|
||
<div style="flex:1"></div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===1?V`<span class='small-font-size gray-text' style='align-self:center; margin-top:8px;'> ${Object.keys(this.mimeResponsesForEachStatus[l])[0]} </span>`:V`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[l]))}`}
|
||
</div>
|
||
${this.activeSchemaTab==="example"?V`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`:V`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`}
|
||
</div>
|
||
`}</div>`}))}
|
||
`}responseHeaderListTemplate(t){return V`
|
||
<div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div>
|
||
<table role="presentation" style="border-collapse: collapse; margin-bottom:16px; border:1px solid var(--border-color); border-radius: var(--border-radius)" class="small-font-size mono-font">
|
||
${t.map((n=>{var i,l;return V`
|
||
<tr>
|
||
<td style="padding:8px; vertical-align: baseline; min-width:120px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${n.name||""}
|
||
</td>
|
||
<td style="padding:4px; vertical-align: baseline; padding:0 5px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((i=n.schema)===null||i===void 0?void 0:i.type)||""}
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color);text-overflow: ellipsis;">
|
||
<div class="m-markdown-small regular-font" >${In(ht(n.description||""))}</div>
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((l=n.schema)===null||l===void 0?void 0:l.example)||""}
|
||
</td>
|
||
</tr>
|
||
`}))}
|
||
</table>`}mimeTypeDropdownTemplate(t){return V`
|
||
<select aria-label='mime types' @change="${n=>{this.selectedMimeType=n.target.value}}" style='margin-bottom: -1px; z-index:1'>
|
||
${t.map((n=>V`<option value='${n}' ?selected = '${n===this.selectedMimeType}'> ${n} </option>`))}
|
||
</select>`}onSelectExample(t){[...t.target.closest(".example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"block":"none"}))}mimeExampleTemplate(t){return t?V`
|
||
${t.examples.length===1?V`
|
||
${t.examples[0].exampleFormat==="json"?V`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?V`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${In(ht(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data="${t.examples[0].exampleValue}"
|
||
class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:V`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?V`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${In(ht(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<pre class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>${t.examples[0].exampleValue}</pre>
|
||
`}`:V`
|
||
<span class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>
|
||
<select aria-label='response examples' style="min-width:100px; max-width:100%" @change='${n=>this.onSelectExample(n)}'>
|
||
${t.examples.map((n=>V`<option value="${n.exampleId}" ?selected=${n.exampleId===t.selectedExample} >
|
||
${n.exampleSummary.length>80?n.exampleId:n.exampleSummary}
|
||
</option>`))}
|
||
</select>
|
||
${t.examples.map((n=>V`
|
||
<div class="example" data-example = '${n.exampleId}' style = "display: ${n.exampleId===t.selectedExample?"block":"none"}">
|
||
${n.exampleSummary&&n.exampleSummary.length>80?V`<div style="padding: 4px 0"> ${n.exampleSummary} </div>`:""}
|
||
${n.exampleDescription?V`<div class="m-markdown-small" style="padding: 4px 0"> ${In(ht(n.exampleDescription||""))} </div>`:""}
|
||
${n.exampleFormat==="json"?V`
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data = '${n.exampleValue}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:V`<pre>${n.exampleValue}</pre>`}
|
||
</div>
|
||
`))}
|
||
</span>
|
||
`}
|
||
`:V`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"read example-panel border pad-8-16":"example-panel border-top"}'> No example provided </pre>
|
||
`}mimeSchemaTemplate(t){return t?V`
|
||
${this.schemaStyle==="table"?V`
|
||
<schema-table
|
||
.data = "${t.schemaTree}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table> `:V`
|
||
<schema-tree
|
||
.data = '${t.schemaTree}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}`:V`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"border pad-8-16":"border-top"}'> Schema not found</pre>
|
||
`}});const aY=M`
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
.dialog-box-overlay {
|
||
background-color: var(--overlay-bg);
|
||
position: fixed;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
z-index: var(--dialog-z-index);
|
||
}
|
||
|
||
.dialog-box {
|
||
position: fixed;
|
||
top: 100px;
|
||
left: 50%;
|
||
transform: translate(-50%, 0%);
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 70vw;
|
||
background-color: var(--bg2);
|
||
color: var(--fg2);
|
||
border-radius: 4px;
|
||
max-height: 500px;
|
||
overflow: hidden;
|
||
border: 1px solid var(--border-color);
|
||
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
|
||
}
|
||
|
||
.dialog-box-header {
|
||
position: sticky;
|
||
top: 0;
|
||
align-self: stretch;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0px 16px;
|
||
min-height: 60px;
|
||
max-height: 60px;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.dialog-box-header button {
|
||
font-size: 1.5rem;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
color: var(--fg);
|
||
border: none;
|
||
outline: none;
|
||
background-color: transparent;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius: 50%;
|
||
margin-right: -8px;
|
||
}
|
||
.dialog-box-header button:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.dialog-box-content {
|
||
padding: 16px;
|
||
display:block;
|
||
overflow: auto;
|
||
height: 100%;
|
||
}
|
||
|
||
.dialog-box-title {
|
||
flex-grow: 1;
|
||
font-size:24px;
|
||
}
|
||
`;function oY(){var t;return document.addEventListener("close",(()=>{this.showAdvancedSearchDialog=!1})),document.addEventListener("open",this.onOpenSearchDialog),V`
|
||
<dialog-box
|
||
heading="Search"
|
||
show="${!!this.showAdvancedSearchDialog}"
|
||
>
|
||
<span class="advanced-search-options">
|
||
<input
|
||
id="input-advanced-search-dialog"
|
||
style="width:100%; padding-right:20px;"
|
||
type="text"
|
||
part="textbox textbox-search-dialog"
|
||
placeholder="search text..."
|
||
spellcheck="false"
|
||
@keyup = "${n=>this.onAdvancedSearch(n,400)}"
|
||
>
|
||
<div style="display:flex; margin:8px 0 24px;">
|
||
<div>
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label for="search-api-path" style="cursor:pointer;"> API Path </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-descr"> API Description </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-params"> API Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-request-body"> Request Body Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-resp-descr"> Response Description </label>
|
||
</div>
|
||
</div>
|
||
</span>
|
||
|
||
${(t=this.advancedSearchMatches)===null||t===void 0?void 0:t.map((n=>V`
|
||
<div
|
||
class="mono-font small-font-size hover-bg"
|
||
style='padding: 5px; cursor: pointer; border-bottom: 1px solid var(--light-border-color); ${n.deprecated?"filter:opacity(0.5);":""}'
|
||
data-content-id='${n.elementId}'
|
||
tabindex = '0'
|
||
@click="${i=>{this.searchVal="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(i,!0)}}"
|
||
>
|
||
<span style="pointer-events: none" class="upper bold-text method-fg ${n.method}">${n.method}</span>
|
||
<span style="pointer-events: none">${n.path}</span>
|
||
<span style="pointer-events: none" class="regular-font gray-text">${n.summary}</span>
|
||
</div>
|
||
`))}
|
||
</dialog-box>
|
||
`}customElements.define("dialog-box",class extends Ht{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[aY]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",(t=>{t.code==="Escape"&&this.onClose()}))}attributeChangedCallback(t,n,i){n!==i&&(t==="heading"&&(this.heading=i),t==="show"&&(this.show=i,i==="true"&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(t,n,i)}render(){return V`
|
||
${this.show==="true"?V`
|
||
<div class="dialog-box-overlay">
|
||
<div class="dialog-box">
|
||
<header class="dialog-box-header">
|
||
<span class="dialog-box-title">${this.heading}</span>
|
||
<button type="button" @click="${this.onClose}">×</button>
|
||
</header>
|
||
<div class="dialog-box-content">
|
||
<slot></slot>
|
||
</div>
|
||
</div>
|
||
</div>`:""}`}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});const Vt={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(t){if(t.indexOf("#")===0&&(t=t.slice(1,7)),t.length!==3&&t.length!==4||(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t.length!==6)throw new Error("Invalid HEX color.");return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},luminanace(t){const n=this.getRgb(t);return .299*n.r+.587*n.g+.114*n.b},invert(t){return this.luminanace(t)>135?"#000":"#fff"},opacity(t,n){const i=this.getRgb(t);return`rgba(${i.r}, ${i.g}, ${i.b}, ${n})`},brightness(t,n){const i=this.getRgb(t);return i.r+=n,i.g+=n,i.b+=n,i.r>255?i.r=255:i.r<0&&(i.r=0),i.g>255?i.g=255:i.g<0&&(i.g=0),i.b>255?i.b=255:i.b<0&&(i.b=0),`#${i.r.toString(16).padStart(2,"0")}${i.g.toString(16).padStart(2,"0")}${i.b.toString(16).padStart(2,"0")}`},hasGoodContrast(t,n){return this.luminanace(t)-this.luminanace(n)}}};function us(t){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(t)}function oa(t,n={}){let i={};const l=n.primaryColor?n.primaryColor:t==="dark"?"#f76b39":"#ff591e",h=Vt.color.invert(l),v=Vt.color.opacity(l,"0.4");if(t==="dark"){const x=n.bg1?n.bg1:"#2a2b2c",w=n.fg1?n.fg1:"#bbb",C=n.bg2?n.bg2:Vt.color.brightness(x,5),$=n.bg3?n.bg3:Vt.color.brightness(x,17),N=n.bg3?n.bg3:Vt.color.brightness(x,35),_=n.fg2?n.fg2:Vt.color.brightness(w,-15),F=n.fg3?n.fg3:Vt.color.brightness(w,-20),U=n.fg3?n.fg3:Vt.color.brightness(w,-65),J=n.inlineCodeFg?n.inlineCodeFg:"#aaa",Y=_,W=C,P=n.headerColor?n.headerColor:Vt.color.brightness(x,10),se=n.navBgColor?n.navBgColor:Vt.color.brightness(x,10),ae=n.navTextColor?n.navTextColor:Vt.color.opacity(Vt.color.invert(se),"0.50"),he=n.navHoverBgColor?n.navHoverBgColor:Vt.color.brightness(se,-15),ge=n.navHoverTextColor?n.navHoverTextColor:Vt.color.invert(se),pe=n.navAccentColor?n.navAccentColor:Vt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:$,lightBg:N,fg1:w,fg2:_,fg3:F,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:h,selectionBg:Y,selectionFg:W,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:se,navTextColor:ae,navHoverBgColor:he,navHoverTextColor:ge,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Vt.color.invert(pe),headerColor:P,headerColorInvert:Vt.color.invert(P),headerColorDarker:Vt.color.brightness(P,-20),headerColorBorder:Vt.color.brightness(P,10),borderColor:n.borderColor||Vt.color.brightness(x,20),lightBorderColor:n.lightBorderColor||Vt.color.brightness(x,15),codeBorderColor:n.codeBorderColor||Vt.color.brightness(x,30),inputBg:n.inputBg||Vt.color.brightness(x,-5),placeHolder:n.placeHolder||Vt.color.opacity(w,"0.3"),hoverColor:n.hoverColor||Vt.color.brightness(x,-10),red:n.red?n.red:"#F06560",lightRed:n.lightRed?n.lightRed:Vt.color.brightness(x,-10),pink:n.pink?n.pink:"#ffb2b2",lightPink:n.lightPink||Vt.color.brightness(x,-10),green:n.green||"#7ec699",lightGreen:n.lightGreen||Vt.color.brightness(x,-10),blue:n.blue||"#71b7ff",lightBlue:n.lightBlue||Vt.color.brightness(x,-10),orange:n.orange?n.orange:"#f08d49",lightOrange:n.lightOrange||Vt.color.brightness(x,-10),yellow:n.yellow||"#827717",lightYellow:n.lightYellow||Vt.color.brightness(x,-10),purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Vt.color.opacity(Vt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#aaa",codePropertyColor:n.codePropertyColor||"#f8c555",codeKeywordColor:n.codeKeywordColor||"#cc99cd",codeOperatorColor:n.codeOperatorColor||"#67cdcc"}}else{const x=n.bg1?n.bg1:"#fafbfc",w=n.fg1?n.fg1:"#444444",C=n.bg2?n.bg2:Vt.color.brightness(x,-5),$=n.bg3?n.bg3:Vt.color.brightness(x,-15),N=n.bg3?n.bg3:Vt.color.brightness(x,-45),_=n.fg2?n.fg2:Vt.color.brightness(w,17),F=n.fg3?n.fg3:Vt.color.brightness(w,30),U=n.fg3?n.fg3:Vt.color.brightness(w,70),J=n.inlineCodeFg?n.inlineCodeFg:"brown",Y=_,W=C,P=n.headerColor?n.headerColor:Vt.color.brightness(x,-180),se=n.navBgColor?n.navBgColor:Vt.color.brightness(x,-200),ae=n.navTextColor?n.navTextColor:Vt.color.opacity(Vt.color.invert(se),"0.65"),he=n.navHoverBgColor?n.navHoverBgColor:Vt.color.brightness(se,-15),ge=n.navHoverTextColor?n.navHoverTextColor:Vt.color.invert(se),pe=n.navAccentColor?n.navAccentColor:Vt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:$,lightBg:N,fg1:w,fg2:_,fg3:F,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:h,selectionBg:Y,selectionFg:W,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:se,navTextColor:ae,navHoverBgColor:he,navHoverTextColor:ge,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Vt.color.invert(pe),headerColor:P,headerColorInvert:Vt.color.invert(P),headerColorDarker:Vt.color.brightness(P,-20),headerColorBorder:Vt.color.brightness(P,10),borderColor:n.borderColor||Vt.color.brightness(x,-38),lightBorderColor:n.lightBorderColor||Vt.color.brightness(x,-23),codeBorderColor:n.codeBorderColor||"transparent",inputBg:n.inputBg||Vt.color.brightness(x,10),placeHolder:n.placeHolder||Vt.color.brightness(U,20),hoverColor:n.hoverColor||Vt.color.brightness(x,-5),red:n.red||"#F06560",lightRed:n.lightRed||"#fff0f0",pink:n.pink?n.pink:"#990055",lightPink:n.lightPink?n.lightPink:"#ffb2b2",green:n.green||"#690",lightGreen:n.lightGreen||"#fbfff0",blue:n.blue||"#47AFE8",lightBlue:n.lightBlue||"#eff8fd",orange:n.orange||"#FF9900",lightOrange:n.lightOrange||"#fff5e6",yellow:n.yellow||"#827717",lightYellow:n.lightYellow||"#fff5cc",purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Vt.color.opacity(Vt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#666",codePropertyColor:n.codePropertyColor||"#905",codeKeywordColor:n.codeKeywordColor||"#07a",codeOperatorColor:n.codeOperatorColor||"#9a6e3a"}}return V`
|
||
<style>
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
:host {
|
||
/* Common Styles - irrespective of themes */
|
||
--border-radius: 2px;
|
||
--layout: ${this.layout||"row"};
|
||
--font-mono: ${this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace'};
|
||
--font-regular: ${this.regularFont||'"Open Sans", Avenir, "Segoe UI", Arial, sans-serif'};
|
||
--scroll-bar-width: 8px;
|
||
--nav-item-padding: ${this.navItemSpacing==="relaxed"?"10px 16px 10px 10px":this.navItemSpacing==="compact"?"5px 16px 5px 10px":"7px 16px 7px 10px"};
|
||
|
||
--resp-area-height: ${this.responseAreaHeight};
|
||
--font-size-small: ${this.fontSize==="default"?"12px":this.fontSize==="large"?"13px":"14px"};
|
||
--font-size-mono: ${this.fontSize==="default"?"13px":this.fontSize==="large"?"14px":"15px"};
|
||
--font-size-regular: ${this.fontSize==="default"?"14px":this.fontSize==="large"?"15px":"16px"};
|
||
--dialog-z-index: 1000;
|
||
|
||
--focus-shadow: 0 0 0 1px transparent, 0 0 0 3px ${i.primaryColorTrans};
|
||
|
||
/* Theme specific styles */
|
||
--bg:${i.bg1};
|
||
--bg2:${i.bg2};
|
||
--bg3:${i.bg3};
|
||
--light-bg:${i.lightBg};
|
||
--fg:${i.fg1};
|
||
--fg2:${i.fg2};
|
||
--fg3:${i.fg3};
|
||
--light-fg:${i.lightFg};
|
||
--selection-bg:${i.selectionBg};
|
||
--selection-fg:${i.selectionFg};
|
||
--overlay-bg:${i.overlayBg};
|
||
|
||
/* Border Colors */
|
||
--border-color:${i.borderColor};
|
||
--light-border-color:${i.lightBorderColor};
|
||
--code-border-color:${i.codeBorderColor};
|
||
|
||
--input-bg:${i.inputBg};
|
||
--placeholder-color:${i.placeHolder};
|
||
--hover-color:${i.hoverColor};
|
||
--red:${i.red};
|
||
--light-red:${i.lightRed};
|
||
--pink:${i.pink};
|
||
--light-pink:${i.lightPink};
|
||
--green:${i.green};
|
||
--light-green:${i.lightGreen};
|
||
--blue:${i.blue};
|
||
--light-blue:${i.lightBlue};
|
||
--orange:${i.orange};
|
||
--light-orange:${i.lightOrange};
|
||
--yellow:${i.yellow};
|
||
--light-yellow:${i.lightYellow};
|
||
--purple:${i.purple};
|
||
--brown:${i.brown};
|
||
|
||
/* Header Color */
|
||
--header-bg:${i.headerColor};
|
||
--header-fg:${i.headerColorInvert};
|
||
--header-color-darker:${i.headerColorDarker};
|
||
--header-color-border:${i.headerColorBorder};
|
||
|
||
/* Nav Colors */
|
||
--nav-bg-color:${i.navBgColor};
|
||
--nav-text-color:${i.navTextColor};
|
||
--nav-hover-bg-color:${i.navHoverBgColor};
|
||
--nav-hover-text-color:${i.navHoverTextColor};
|
||
--nav-accent-color:${i.navAccentColor};
|
||
--nav-accent-text-color:${i.navAccentTextColor};
|
||
|
||
/* Nav API Method Colors*/
|
||
--nav-get-color:${i.blue};
|
||
--nav-put-color:${i.orange};
|
||
--nav-post-color:${i.green};
|
||
--nav-delete-color:${i.red};
|
||
--nav-head-color:${i.yellow};
|
||
|
||
/* Primary Colors */
|
||
--primary-color:${i.primaryColor};
|
||
--primary-color-invert:${i.primaryColorInvert};
|
||
--primary-color-trans:${i.primaryColorTrans};
|
||
|
||
/*Code Syntax Color*/
|
||
--code-bg:${i.codeBg};
|
||
--code-fg:${i.codeFg};
|
||
--inline-code-fg:${i.inlineCodeFg};
|
||
--code-property-color:${i.codePropertyColor};
|
||
--code-keyword-color:${i.codeKeywordColor};
|
||
--code-operator-color:${i.codeOperatorColor};
|
||
}
|
||
</style>`}function hM(t=!1,n=!1){if(!this.resolvedSpec)return"";this.persistAuth==="true"&&NX.call(this);const i={bg1:us(this.bgColor)?this.bgColor:"",fg1:us(this.textColor)?this.textColor:"",headerColor:us(this.headerColor)?this.headerColor:"",primaryColor:us(this.primaryColor)?this.primaryColor:"",navBgColor:us(this.navBgColor)?this.navBgColor:"",navTextColor:us(this.navTextColor)?this.navTextColor:"",navHoverBgColor:us(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:us(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:us(this.navAccentColor)?this.navAccentColor:"",navAccentTextColor:us(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
<div id="spec-not-found" style='display:flex; align-items:center; justify-content: center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'>
|
||
${this.resolvedSpec.info.description}
|
||
</div>
|
||
`:this.resolvedSpec.isSpecLoading?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
<main class='main-content regular-font' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
<div class='loader'></div>
|
||
</div>
|
||
</main>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",i):oa.call(this,"light",i)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":jR.call(this)}
|
||
|
||
<!-- Advanced Search -->
|
||
${this.allowAdvancedSearch==="false"?"":oY.call(this)}
|
||
|
||
<div id='the-main-body' class='body ${this.cssClasses}' dir='${this.pageDirection}' >
|
||
<!-- Side Nav -->
|
||
${this.renderStyle!=="read"&&this.renderStyle!=="focused"||this.showSideNav!=="true"||!this.resolvedSpec?"":QX.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class='main-content regular-font' tabindex='-1' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
${this.loading===!0?V`<div class='loader'></div>`:V`
|
||
${this.loadFailed===!0?V`<div style='text-align: center;margin: 16px;'> Unable to load the Spec</div>`:V`
|
||
<div class='operations-root' @click='${l=>{this.handleHref(l)}}'>
|
||
${this.renderStyle==="focused"?V`${nY.call(this)}`:V`
|
||
${this.showInfo==="true"?$E.call(this):""}
|
||
${this.allowServerSelection==="true"?iM.call(this):""}
|
||
${this.allowAuthentication==="true"?XP.call(this):""}
|
||
<div id='operations-top' class='observe-me'>
|
||
<slot name='operations-top'></slot>
|
||
</div>
|
||
${this.renderStyle==="read"?GX.call(this):iY.call(this,t,n)}
|
||
`}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name='footer'></slot>
|
||
</main>
|
||
</div>
|
||
`}class lY extends Ht{constructor(){super();const n={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver((i=>{this.onIntersect(i)}),n)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navBgColor:{type:String,attribute:"nav-bg-color"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navAccentTextColor:{type:String,attribute:"nav-accent-text-color"},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[Si,Su,Eu,ju,Fg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.main-content {
|
||
margin:0;
|
||
padding: 0;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.section-gap.section-tag {
|
||
border-bottom:1px solid var(--border-color);
|
||
}
|
||
.section-gap,
|
||
.section-gap--focused-mode,
|
||
.section-gap--read-mode {
|
||
padding: 0px 4px;
|
||
}
|
||
.section-tag-header {
|
||
position:relative;
|
||
cursor: n-resize;
|
||
padding: 12px 0;
|
||
}
|
||
.collapsed .section-tag-header:hover {
|
||
cursor: s-resize;
|
||
}
|
||
|
||
.section-tag-header:hover {
|
||
background-image: linear-gradient(to right, rgba(0,0,0,0), var(--border-color), rgba(0,0,0,0));
|
||
}
|
||
|
||
.section-tag-header:hover::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color:var(--primary-color);
|
||
content: '⬆';
|
||
}
|
||
|
||
.collapsed .section-tag-header::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color: var(--border-color);
|
||
content: '⬇';
|
||
}
|
||
.collapsed .section-tag-header:hover::after {
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.collapsed .section-tag-body {
|
||
display:none;
|
||
}
|
||
|
||
.logo {
|
||
height:36px;
|
||
width:36px;
|
||
margin-left:5px;
|
||
}
|
||
.only-large-screen-flex,
|
||
.only-large-screen {
|
||
display:none;
|
||
}
|
||
.tag.title {
|
||
text-transform: uppercase;
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
.expanded-endpoint-body {
|
||
position: relative;
|
||
padding: 6px 0px;
|
||
}
|
||
.expanded-endpoint-body .tag-description {
|
||
background: var(--code-bg);
|
||
border-radius: var(--border-radius);
|
||
transition: max-height .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon {
|
||
transition: transform .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon.expanded {
|
||
transform: rotate(180deg);
|
||
}
|
||
.divider {
|
||
border-top: 2px solid var(--border-color);
|
||
margin: 24px 0;
|
||
width:100%;
|
||
}
|
||
|
||
.tooltip {
|
||
cursor:pointer;
|
||
border: 1px solid var(--border-color);
|
||
border-left-width: 4px;
|
||
margin-left:2px;
|
||
}
|
||
.tooltip a {
|
||
color: var(--fg2);
|
||
text-decoration: none;
|
||
}
|
||
.tooltip-text {
|
||
color: var(--fg2);
|
||
max-width: 400px;
|
||
position: absolute;
|
||
z-index:1;
|
||
background-color: var(--bg2);
|
||
visibility: hidden;
|
||
|
||
overflow-wrap: break-word;
|
||
}
|
||
.tooltip:hover {
|
||
color: var(--primary-color);
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tooltip:hover a:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.tooltip:hover .tooltip-text {
|
||
visibility: visible;
|
||
}
|
||
|
||
@keyframes spin {
|
||
0% { transform: rotate(0deg); }
|
||
100% { transform: rotate(360deg); }
|
||
}
|
||
|
||
.nav-method { font-weight: bold; margin-right: 4px; font-size: calc(var(--font-size-small) - 2px); white-space: nowrap; }
|
||
.nav-method.false { display: none; }
|
||
|
||
.nav-method.as-colored-text.get { color:var(--nav-get-color); }
|
||
.nav-method.as-colored-text.put { color:var(--nav-put-color); }
|
||
.nav-method.as-colored-text.post { color:var(--nav-post-color); }
|
||
.nav-method.as-colored-text.delete { color:var(--nav-delete-color); }
|
||
.nav-method.as-colored-text.head, .nav-method.as-colored-text.patch, .nav-method.as-colored-text.options { color:var(--nav-head-color); }
|
||
|
||
.nav-method.as-colored-block {
|
||
padding: 1px 4px;
|
||
min-width: 30px;
|
||
border-radius: 4px 0 0 4px;
|
||
color: #000;
|
||
}
|
||
.colored-block .nav-method.as-colored-block {
|
||
outline: 1px solid;
|
||
}
|
||
|
||
.nav-method.as-colored-block.get { background-color: var(--blue); }
|
||
.nav-method.as-colored-block.put { background-color: var(--orange); }
|
||
.nav-method.as-colored-block.post { background-color: var(--green); }
|
||
.nav-method.as-colored-block.delete { background-color: var(--red); }
|
||
.nav-method.as-colored-block.head, .nav-method.as-colored-block.patch , .nav-method.as-colored-block.options {
|
||
background-color: var(--yellow);
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.nav-bar {
|
||
width: 260px;
|
||
display:flex;
|
||
}
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
.section-gap {
|
||
padding: 0 0 0 24px;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.endpoint-body {
|
||
position: relative;
|
||
padding:36px 0 48px 0;
|
||
}
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.nav-bar {
|
||
width: ${T(this.fontSize==="default"?"300px":this.fontSize==="large"?"315px":"330px")};
|
||
display:flex;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 12px 80px 12px 80px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 80px 12px 80px;
|
||
}
|
||
}`,fc]}connectedCallback(){super.connectedCallback();const n=this.parentElement;if(n&&(n.offsetWidth===0&&n.style.width===""&&(n.style.width="100vw"),n.offsetHeight===0&&n.style.height===""&&(n.style.height="100vh"),n.tagName==="BODY"&&(n.style.marginTop||(n.style.marginTop="0"),n.style.marginRight||(n.style.marginRight="0"),n.style.marginBottom||(n.style.marginBottom="0"),n.style.marginLeft||(n.style.marginLeft="0"))),this.loadFonts!=="false"){const i={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",i);i.weight="600";const h=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",i);l.load().then((v=>{document.fonts.add(v)})),h.load().then((v=>{document.fonts.add(v)}))}this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="400px"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.routePrefix||(this.routePrefix="#"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.onNavTagClick&&"expand-collapse, show-description,".includes(`${this.onNavTagClick},`)||(this.onNavTagClick="expand-collapse"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navActiveItemMarker&&"left-bar, colored-block".includes(`${this.navActiveItemMarker},`)||(this.navActiveItemMarker="left-bar"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),this.cssFile||(this.cssFile=null),this.cssClasses||(this.cssClasses=""),ht.setOptions({highlight:(i,l)=>sr().languages[l]?sr().highlight(i,sr().languages[l],l):i}),window.addEventListener("hashchange",(()=>{this.scrollToPath(this.getElementIDFromURL())}),!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const n=new ht.Renderer;return n.heading=(i,l,h,v)=>`<h${l} class="observe-me" id="${v.slug(h)}">${i}</h${l}>`,n}render(){const n=document.querySelector(`link[href*="${this.cssFile}"]`);return n&&this.shadowRoot.appendChild(n.cloneNode()),hM.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach((n=>{this.intersectionObserver.observe(n)}))}attributeChangedCallback(n,i,l){if(n==="spec-url"&&i!==l&&window.setTimeout((async()=>{await this.loadSpec(l),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)}),0),n!=="match-paths"&&n!=="match-type"&&n!=="remove-endpoints-with-badge-label-as"||i!==l&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),n==="render-style"&&(l==="read"?window.setTimeout((()=>{this.observeExpandedContent()}),100):this.intersectionObserver.disconnect()),n==="api-key-name"||n==="api-key-location"||n==="api-key-value"){let h=!1,v="",x="",w="";if(n==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(v=l,x=this.getAttribute("api-key-location"),w=this.getAttribute("api-key-value"),h=!0):n==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(x=l,v=this.getAttribute("api-key-name"),w=this.getAttribute("api-key-value"),h=!0):n==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(w=l,x=this.getAttribute("api-key-location"),v=this.getAttribute("api-key-name"),h=!0),h&&this.resolvedSpec){const C=this.resolvedSpec.securitySchemes.find(($=>$.securitySchemeId===ho));C?(C.name=v,C.in=x,C.value=w,C.finalKeyValue=w):this.resolvedSpec.securitySchemes.push({securitySchemeId:ho,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:v,in:x,value:w,finalKeyValue:w}),this.requestUpdate()}}super.attributeChangedCallback(n,i,l)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(n){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const i=n.target.files[0],l=new FileReader;l.onload=()=>{try{const h=JSON.parse(l.result);this.loadSpec(h),this.shadowRoot.getElementById("spec-url").value=""}catch{console.error("RapiDoc: Unable to read or parse json")}},l.readAsText(i)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(n){this.searchVal=n.target.value,this.resolvedSpec.tags.forEach((i=>i.paths.filter((l=>{this.searchVal&&th(this.searchVal,l,i.name)&&(i.expanded=!0)})))),this.resolvedSpec.components.forEach((i=>i.subComponents.filter((l=>{l.expanded=!1,(function(h,v){return v.name.toLowerCase().includes(h.toLowerCase())})(this.searchVal,l)&&(l.expanded=!0)})))),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.searchVal="",this.resolvedSpec.components.forEach((n=>n.subComponents.filter((i=>{i.expanded=!0}))))}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(n){const i=n.detail.querySelector("input");await Cu(0),i&&i.focus()}async loadSpec(n){if(n){this.searchVal="";try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;const i=await hR.call(this,n,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(i)}catch(i){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${i.message}`)}}}async afterSpecParsedAndValidated(n){for(this.resolvedSpec=n,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((v=>v.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const i=new CustomEvent("spec-loaded",{detail:n});this.dispatchEvent(i),this.intersectionObserver.disconnect(),this.renderStyle==="read"&&(await Cu(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;const l=this.getElementIDFromURL();if(l)this.renderStyle==="view"?this.expandAndGotoOperation(l,!0,!0):this.scrollToPath(l);else if(this.renderStyle==="focused"&&!this.gotoPath){var h;const v=this.showInfo?"overview":(h=this.resolvedSpec.tags[0])===null||h===void 0?void 0:h.paths[0];this.scrollToPath(v)}}getComponentBaseURL(){const{href:n}=window.location,i=this.routePrefix.replace(/(#|\/)$/,"");if(!i)return n.split("#")[0];const l=n.lastIndexOf(i);return l===-1?n:n.slice(0,l)}getElementIDFromURL(){const n=this.getComponentBaseURL();return window.location.href.replace(n+this.routePrefix,"")}replaceHistoryState(n){const i=this.getComponentBaseURL();window.history.replaceState(null,null,`${i}${this.routePrefix||"#"}${n}`)}expandAndGotoOperation(n,i=!0){if(!this.resolvedSpec)return;let l=!0;const h=n.indexOf("#")===-1?n:n.substring(1);if(h.startsWith("overview")||h==="servers"||h==="auth")l=!1;else for(let w=0;w<((v=this.resolvedSpec.tags)===null||v===void 0?void 0:v.length);w++){var v,x;const C=this.resolvedSpec.tags[w],$=(x=C.paths)===null||x===void 0?void 0:x.find((N=>N.elementId===n));$&&($.expanded&&C.expanded?l=!1:($.expanded=!0,C.expanded=!0))}i&&(l&&this.requestUpdate(),window.setTimeout((()=>{const w=this.shadowRoot.getElementById(h);w&&(w.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),this.updateRoute==="true"&&this.replaceHistoryState(h))}),l?150:0))}isValidTopId(n){return n.startsWith("overview")||n==="servers"||n==="auth"}isValidPathId(n){var i,l;return!(n!=="overview"||!this.showInfo)||!(n!=="servers"||!this.allowServerSelection)||!(n!=="auth"||!this.allowAuthentication)||(n.startsWith("tag--")?(l=this.resolvedSpec)===null||l===void 0||(l=l.tags)===null||l===void 0?void 0:l.find((h=>h.elementId===n)):(i=this.resolvedSpec)===null||i===void 0||(i=i.tags)===null||i===void 0?void 0:i.find((h=>h.paths.find((v=>v.elementId===n)))))}onIntersect(n){this.isIntersectionObserverActive!==!1&&n.forEach((i=>{if(i.isIntersecting&&i.intersectionRatio>0){const l=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active"),h=this.shadowRoot.getElementById(`link-${i.target.id}`);h&&(this.updateRoute==="true"&&this.replaceHistoryState(i.target.id),h.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),h.classList.add("active"),h.part.add("section-navbar-active-item")),l&&l!==h&&(l.classList.remove("active"),l.part.remove("section-navbar-active-item"))}}))}handleHref(n){if(n.target.tagName.toLowerCase()==="a"&&n.target.getAttribute("href").startsWith("#")){const i=this.shadowRoot.getElementById(n.target.getAttribute("href").replace("#",""));i&&i.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(n,i=!0){if(n.type!=="click"&&(n.type!=="keyup"||n.keyCode!==13))return;const l=n.target;if(l.dataset.contentId){if(this.isIntersectionObserverActive=!1,this.renderStyle==="focused"){const h=this.shadowRoot.querySelector("api-request");h&&h.beforeNavigationFocusedMode()}this.scrollToPath(l.dataset.contentId,!0,i),setTimeout((()=>{this.isIntersectionObserverActive=!0}),300)}}async scrollToPath(n,i=!0,l=!0){if(this.renderStyle==="focused"&&(this.focusedElementId=n,await Cu(0)),this.renderStyle==="view")this.expandAndGotoOperation(n,i,!0);else{let h=!1;const v=this.shadowRoot.getElementById(n);if(v?(h=!0,v.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):h=!1,h){if(this.renderStyle==="focused"){const w=this.shadowRoot.querySelector("api-request");w&&w.afterNavigationFocusedMode();const C=this.shadowRoot.querySelector("api-response");C&&C.resetSelection()}this.updateRoute==="true"&&this.replaceHistoryState(n);const x=this.shadowRoot.getElementById(`link-${n}`);if(x){l&&x.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await Cu(0);const w=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");w&&(w.classList.remove("active"),w.part.remove("active"),w.part.remove("section-navbar-active-item")),x.classList.add("active"),x.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(n,i,l){return up.call(this,n,i,l)}setApiKey(n,i){return up.call(this,n,"","",i)}removeAllSecurityKeys(){return yR.call(this)}setApiServer(n){return ER.call(this,n)}onAdvancedSearch(n,i){const l=n.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{let h;h=l.type==="text"?l:l.closest(".advanced-search-options").querySelector("input[type=text]");const v=[...l.closest(".advanced-search-options").querySelectorAll("input:checked")].map((x=>x.id));this.advancedSearchMatches=(function(x,w,C=[]){if(!x.trim()||C.length===0)return;const $=[];return w.forEach((N=>{N.paths.forEach((_=>{let F="";var U;if(C.includes("search-api-path")&&(F=_.path),C.includes("search-api-descr")&&(F=`${F} ${(_.summary||"")+(_.description||"")}`),C.includes("search-api-params")&&(F=`${F} ${((U=_.parameters)===null||U===void 0?void 0:U.map((P=>P.name)).join(" "))||""}`),C.includes("search-api-request-body")&&_.requestBody){let P=new Set;for(const se in(J=_.requestBody)===null||J===void 0?void 0:J.content){var J,Y,W;(Y=_.requestBody.content[se].schema)!==null&&Y!==void 0&&Y.properties&&(P=Js((W=_.requestBody.content[se].schema)===null||W===void 0?void 0:W.properties)),F=`${F} ${[...P].join(" ")}`}}C.includes("search-api-resp-descr")&&(F=`${F} ${Object.values(_.responses).map((P=>P.description||"")).join(" ")}`),F.toLowerCase().includes(x.trim().toLowerCase())&&$.push({elementId:_.elementId,method:_.method,path:_.path,summary:_.summary||_.description||"",deprecated:_.deprecated})}))})),$})(h.value,this.resolvedSpec.tags,v)}),i)}}customElements.define("rapi-doc",lY),customElements.define("rapi-doc-mini",class extends Ht{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[Si,Su,Eu,ju,Fg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){if(super.connectedCallback(),this.loadFonts!=="false"){const t={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},n=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",t);t.weight="600";const i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",t);n.load().then((l=>{document.fonts.add(l)})),i.load().then((l=>{document.fonts.add(l)}))}this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),ht.setOptions({highlight:(t,n)=>sr().languages[n]?sr().highlight(t,sr().languages[n],n):t})}render(){return hM.call(this,!0,this.pathsExpanded)}attributeChangedCallback(t,n,i){if(t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),t!=="match-paths"&&t!=="match-type"&&t!=="remove-endpoints-with-badge-label-as"||n!==i&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),t==="api-key-name"||t==="api-key-location"||t==="api-key-value"){let l=!1,h="",v="",x="";if(t==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(h=i,v=this.getAttribute("api-key-location"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(v=i,h=this.getAttribute("api-key-name"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(x=i,v=this.getAttribute("api-key-location"),h=this.getAttribute("api-key-name"),l=!0),l&&this.resolvedSpec){const w=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===ho));w?(w.name=h,w.in=v,w.value=x,w.finalKeyValue=x):this.resolvedSpec.securitySchemes.push({apiKeyId:ho,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:h,in:v,value:x,finalKeyValue:x}),this.requestUpdate()}}super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await hR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}setHttpUserNameAndPassword(t,n,i){return up.call(this,t,n,i)}setApiKey(t,n){return up.call(this,t,"","",n)}removeAllSecurityKeys(){return yR.call(this)}setApiServer(t){return ER.call(this,t)}async afterSpecParsedAndValidated(t){for(this.resolvedSpec=t,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((i=>i.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}});class cY extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",(n=>this.receiveStorage(n)),!0)}receiveAuthParms(){let n={};if(document.location.search){const i=new URLSearchParams(document.location.search);n={code:i.get("code"),error:i.get("error"),state:i.get("state"),responseType:"code"}}else window.location.hash&&(n={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"});window.opener?window.opener.postMessage(n,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(n))}relayAuthParams(n){if(window.parent&&n.key==="rapidoc-oauth-data"){const i=JSON.parse(n.newValue);window.parent.postMessage(i,this.target)}}parseQueryString(n,i){const l=n.split("&");for(let h=0;h<l.length;h++){const v=l[h].split("=");if(decodeURIComponent(v[0])===i)return decodeURIComponent(v[1])}}}function uY(){return V`
|
||
<nav class='nav-bar' part="section-navbar">
|
||
<slot name="nav-logo" class="logo"></slot>
|
||
<div style="display:flex;line-height:22px; padding:8px">
|
||
<input id="nav-bar-search"
|
||
part = "textbox textbox-nav-filter"
|
||
style = "width:100%; height: 26px; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)"
|
||
type = "text"
|
||
placeholder = "Filter"
|
||
@change = "${this.onSearchChange}"
|
||
spellcheck = "false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
</div>
|
||
<nav style="flex:1" class='nav-scroll' part="section-navbar-scroll">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>V`
|
||
<div class='nav-bar-path' data-content-id='${t.elementId}' id='link-${t.elementId}'
|
||
@click = '${n=>{this.scrollToEventTarget(n,!1)}}'
|
||
>
|
||
${t.name}
|
||
</div>`))}
|
||
</nav>
|
||
</nav>
|
||
`}function dY(){return V`
|
||
${this.showInfo==="true"?$E.call(this):""}
|
||
<div style="font-size:var(--font-size-regular);">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>{var n;const i=qm(t.schema,"json",aa(t.examples),aa(t.example),!0,!1,"json",!0);return t.selectedExample=(n=i[0])===null||n===void 0?void 0:n.exampleId,V`
|
||
<section id='${t.elementId}' class='json-schema-and-example regular-font' style="display:flex; flex-direction: column; border:1px solid var(--border-color); margin-bottom:32px; border-top: 5px solid var(--border-color)">
|
||
<div style="padding:16px; border-bottom: 1px solid var(--border-color)">
|
||
<div style="font-size:var(--font-size-small); font-weight:bold">${t.name}</div>
|
||
<span class="json-schema-description m-markdown ">${In(ht(t.description||""))}</span>
|
||
</div>
|
||
<div style="display:flex; flex-direction: row; gap:16px;">
|
||
<div class="json-schema-def" style="flex:1; padding:16px 0 16px 16px; ">
|
||
<schema-tree
|
||
.data = "${ts(t.schema,{})}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "false"
|
||
> </schema-tree>
|
||
</div>
|
||
<div class="json-schema-example-panel" style="width:400px; background-color: var(--input-bg); padding:16px 0 16px 16px; border-left: 1px dashed var(--border-color);">
|
||
${i.length>1?V`<select style="min-width:100px; max-width:100%" @change='${l=>this.onSelectExample(l,t)}'>
|
||
${i.map((l=>V`
|
||
<option value="${l.exampleId}" ?selected=${l.exampleId===t.selectedExample}>
|
||
${l.exampleSummary.length>80?l.exampleId:l.exampleSummary}
|
||
</option>`))}
|
||
</select>`:V`<div style="font-size: var(--font-size-small);font-weight:700; margin:5px 0"> ${i[0].exampleSummary}</div>`}
|
||
${i.map((l=>V`
|
||
<json-tree
|
||
.data = "${l.exampleValue}"
|
||
data-example = "${l.exampleId}"
|
||
class = "example"
|
||
style = "margin-top:16px; display: ${l.exampleId===t.selectedExample?"flex":"none"}"
|
||
></json-tree>`))}
|
||
</div>
|
||
</div>
|
||
</section>`}))}
|
||
</div>
|
||
`}function hY(t=!1){if(!this.resolvedSpec)return"";const n={bg1:us(this.bgColor)?this.bgColor:"",fg1:us(this.textColor)?this.textColor:"",headerColor:us(this.headerColor)?this.headerColor:"",primaryColor:us(this.primaryColor)?this.primaryColor:"",navBgColor:us(this.navBgColor)?this.navBgColor:"",navTextColor:us(this.navTextColor)?this.navTextColor:"",navHoverBgColor:us(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:us(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:us(this.navAccentColor)?this.navAccentColor:"",navAccenttextColor:us(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?t?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<div style="display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<!-- Header -->
|
||
${jR.call(this)}
|
||
<h1> Header </h1>
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div style="margin:24px; text-align: center;">
|
||
<h1 style="color: var(--red)"> ${this.resolvedSpec.info.title} </h1>
|
||
<div style="font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
</div>
|
||
</main>
|
||
`:this.resolvedSpec.isSpecLoading?V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
<div class="loader"></div>
|
||
</div>
|
||
</main>
|
||
`:V`
|
||
${this.theme==="dark"?oa.call(this,"dark",n):oa.call(this,"light",n)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":jR.call(this)}
|
||
|
||
<div id='the-main-body' class="body ${this.cssClasses}" dir= ${this.pageDirection}>
|
||
|
||
<!-- Side Nav -->
|
||
${uY.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
${this.loading===!0?V`<div class="loader"></div>`:V`
|
||
${this.loadFailed===!0?V`<div style="text-align: center;margin: 16px;"> Unable to load the Spec</div>`:V`
|
||
<div class="operations-root" @click="${i=>{this.handleHref(i)}}">
|
||
${dY.call(this)}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name="footer"></slot>
|
||
</main>
|
||
</div>
|
||
`}customElements.define("oauth-receiver",cY),customElements.define("json-schema-viewer",class extends Ht{constructor(){super(),this.isMini=!1,this.updateRoute="false",this.renderStyle="focused",this.showHeader="true",this.allowAdvancedSearch="false",this.selectedExampleForEachSchema={}}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},loading:{type:Boolean}}}static get styles(){return[Si,Su,Eu,ju,Fg,pc,dl,va,Ws,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.nav-bar {
|
||
width: 230px;
|
||
display:flex;
|
||
}
|
||
|
||
.main-content {
|
||
margin:0;
|
||
padding: 16px;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
@container (min-width: 768px) {
|
||
.only-large-screen{
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){super.connectedCallback();const t=this.parentElement;if(t&&(t.offsetWidth===0&&t.style.width===""&&(t.style.width="100vw"),t.offsetHeight===0&&t.style.height===""&&(t.style.height="100vh"),t.tagName==="BODY"&&(t.style.marginTop||(t.style.marginTop="0"),t.style.marginRight||(t.style.marginRight="0"),t.style.marginBottom||(t.style.marginBottom="0"),t.style.marginLeft||(t.style.marginLeft="0"))),this.loadFonts!=="false"){const n={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",n);n.weight="600";const l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",n);i.load().then((h=>{document.fonts.add(h)})),l.load().then((h=>{document.fonts.add(h)}))}this.renderStyle="focused",this.pathsExpanded=this.pathsExpanded==="true",this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showHeader&&"true, false,".includes(`${this.showHeader},`)||(this.showHeader="true"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),ht.setOptions({highlight:(n,i)=>sr().languages[i]?sr().highlight(n,sr().languages[i],i):n})}render(){return hY.call(this,!0,!1,!1,this.pathsExpanded)}attributeChangedCallback(t,n,i){t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSearchChange(t){this.matchPaths=t.target.value}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await hR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("match-paths"),this.getAttribute("match-type"),this.getAttribute("remove-endpoints-with-badge-label-as"));this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}async afterSpecParsedAndValidated(t){this.resolvedSpec=t;const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}onSelectExample(t){[...t.target.closest(".json-schema-example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"flex":"none"}))}async scrollToEventTarget(t){const n=t.currentTarget;if(!n.dataset.contentId)return;const i=this.shadowRoot.getElementById(n.dataset.contentId);i&&i.scrollIntoView({behavior:"auto",block:"start"})}})},526:(p,m)=>{m.byteLength=function(M){var I=k(M),q=I[0],G=I[1];return 3*(q+G)/4-G},m.toByteArray=function(M){var I,q,G=k(M),K=G[0],X=G[1],L=new S((function(Q,ne,de){return 3*(ne+de)/4-de})(0,K,X)),ee=0,oe=X>0?K-4:K;for(q=0;q<oe;q+=4)I=b[M.charCodeAt(q)]<<18|b[M.charCodeAt(q+1)]<<12|b[M.charCodeAt(q+2)]<<6|b[M.charCodeAt(q+3)],L[ee++]=I>>16&255,L[ee++]=I>>8&255,L[ee++]=255&I;return X===2&&(I=b[M.charCodeAt(q)]<<2|b[M.charCodeAt(q+1)]>>4,L[ee++]=255&I),X===1&&(I=b[M.charCodeAt(q)]<<10|b[M.charCodeAt(q+1)]<<4|b[M.charCodeAt(q+2)]>>2,L[ee++]=I>>8&255,L[ee++]=255&I),L},m.fromByteArray=function(M){for(var I,q=M.length,G=q%3,K=[],X=16383,L=0,ee=q-G;L<ee;L+=X)K.push(T(M,L,L+X>ee?ee:L+X));return G===1?(I=M[q-1],K.push(g[I>>2]+g[I<<4&63]+"==")):G===2&&(I=(M[q-2]<<8)+M[q-1],K.push(g[I>>10]+g[I>>4&63]+g[I<<2&63]+"=")),K.join("")};for(var g=[],b=[],S=typeof Uint8Array<"u"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0;A<64;++A)g[A]=j[A],b[j.charCodeAt(A)]=A;function k(M){var I=M.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var q=M.indexOf("=");return q===-1&&(q=I),[q,q===I?0:4-q%4]}function T(M,I,q){for(var G,K,X=[],L=I;L<q;L+=3)G=(M[L]<<16&16711680)+(M[L+1]<<8&65280)+(255&M[L+2]),X.push(g[(K=G)>>18&63]+g[K>>12&63]+g[K>>6&63]+g[63&K]);return X.join("")}b[45]=62,b[95]=63},287:(p,m,g)=>{const b=g(526),S=g(251),j=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;m.hp=T,m.IS=50;const A=2147483647;function k(D){if(D>A)throw new RangeError('The value "'+D+'" is invalid for option "size"');const z=new Uint8Array(D);return Object.setPrototypeOf(z,T.prototype),z}function T(D,z,H){if(typeof D=="number"){if(typeof z=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return q(D)}return M(D,z,H)}function M(D,z,H){if(typeof D=="string")return(function(Re,st){if(typeof st=="string"&&st!==""||(st="utf8"),!T.isEncoding(st))throw new TypeError("Unknown encoding: "+st);const Kt=0|L(Re,st);let Qt=k(Kt);const Fn=Qt.write(Re,st);return Fn!==Kt&&(Qt=Qt.slice(0,Fn)),Qt})(D,z);if(ArrayBuffer.isView(D))return(function(Re){if(Dn(Re,Uint8Array)){const st=new Uint8Array(Re);return K(st.buffer,st.byteOffset,st.byteLength)}return G(Re)})(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(Dn(D,ArrayBuffer)||D&&Dn(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Dn(D,SharedArrayBuffer)||D&&Dn(D.buffer,SharedArrayBuffer)))return K(D,z,H);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=D.valueOf&&D.valueOf();if(Z!=null&&Z!==D)return T.from(Z,z,H);const we=(function(Re){if(T.isBuffer(Re)){const st=0|X(Re.length),Kt=k(st);return Kt.length===0||Re.copy(Kt,0,0,st),Kt}if(Re.length!==void 0)return typeof Re.length!="number"||cn(Re.length)?k(0):G(Re);if(Re.type==="Buffer"&&Array.isArray(Re.data))return G(Re.data)})(D);if(we)return we;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return T.from(D[Symbol.toPrimitive]("string"),z,H);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}function I(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function q(D){return I(D),k(D<0?0:0|X(D))}function G(D){const z=D.length<0?0:0|X(D.length),H=k(z);for(let Z=0;Z<z;Z+=1)H[Z]=255&D[Z];return H}function K(D,z,H){if(z<0||D.byteLength<z)throw new RangeError('"offset" is outside of buffer bounds');if(D.byteLength<z+(H||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return Z=z===void 0&&H===void 0?new Uint8Array(D):H===void 0?new Uint8Array(D,z):new Uint8Array(D,z,H),Object.setPrototypeOf(Z,T.prototype),Z}function X(D){if(D>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return 0|D}function L(D,z){if(T.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||Dn(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);const H=D.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&H===0)return 0;let we=!1;for(;;)switch(z){case"ascii":case"latin1":case"binary":return H;case"utf8":case"utf-8":return zt(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*H;case"hex":return H>>>1;case"base64":return Rt(D).length;default:if(we)return Z?-1:zt(D).length;z=(""+z).toLowerCase(),we=!0}}function ee(D,z,H){let Z=!1;if((z===void 0||z<0)&&(z=0),z>this.length||((H===void 0||H>this.length)&&(H=this.length),H<=0)||(H>>>=0)<=(z>>>=0))return"";for(D||(D="utf8");;)switch(D){case"hex":return _e(this,z,H);case"utf8":case"utf-8":return Ke(this,z,H);case"ascii":return re(this,z,H);case"latin1":case"binary":return ue(this,z,H);case"base64":return Ce(this,z,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,z,H);default:if(Z)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),Z=!0}}function oe(D,z,H){const Z=D[z];D[z]=D[H],D[H]=Z}function Q(D,z,H,Z,we){if(D.length===0)return-1;if(typeof H=="string"?(Z=H,H=0):H>2147483647?H=2147483647:H<-2147483648&&(H=-2147483648),cn(H=+H)&&(H=we?0:D.length-1),H<0&&(H=D.length+H),H>=D.length){if(we)return-1;H=D.length-1}else if(H<0){if(!we)return-1;H=0}if(typeof z=="string"&&(z=T.from(z,Z)),T.isBuffer(z))return z.length===0?-1:ne(D,z,H,Z,we);if(typeof z=="number")return z&=255,typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(D,z,H):Uint8Array.prototype.lastIndexOf.call(D,z,H):ne(D,[z],H,Z,we);throw new TypeError("val must be string, number or Buffer")}function ne(D,z,H,Z,we){let Re,st=1,Kt=D.length,Qt=z.length;if(Z!==void 0&&((Z=String(Z).toLowerCase())==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(D.length<2||z.length<2)return-1;st=2,Kt/=2,Qt/=2,H/=2}function Fn(dn,Ht){return st===1?dn[Ht]:dn.readUInt16BE(Ht*st)}if(we){let dn=-1;for(Re=H;Re<Kt;Re++)if(Fn(D,Re)===Fn(z,dn===-1?0:Re-dn)){if(dn===-1&&(dn=Re),Re-dn+1===Qt)return dn*st}else dn!==-1&&(Re-=Re-dn),dn=-1}else for(H+Qt>Kt&&(H=Kt-Qt),Re=H;Re>=0;Re--){let dn=!0;for(let Ht=0;Ht<Qt;Ht++)if(Fn(D,Re+Ht)!==Fn(z,Ht)){dn=!1;break}if(dn)return Re}return-1}function de(D,z,H,Z){H=Number(H)||0;const we=D.length-H;Z?(Z=Number(Z))>we&&(Z=we):Z=we;const Re=z.length;let st;for(Z>Re/2&&(Z=Re/2),st=0;st<Z;++st){const Kt=parseInt(z.substr(2*st,2),16);if(cn(Kt))return st;D[H+st]=Kt}return st}function je(D,z,H,Z){return V(zt(z,D.length-H),D,H,Z)}function ve(D,z,H,Z){return V((function(we){const Re=[];for(let st=0;st<we.length;++st)Re.push(255&we.charCodeAt(st));return Re})(z),D,H,Z)}function le(D,z,H,Z){return V(Rt(z),D,H,Z)}function be(D,z,H,Z){return V((function(we,Re){let st,Kt,Qt;const Fn=[];for(let dn=0;dn<we.length&&!((Re-=2)<0);++dn)st=we.charCodeAt(dn),Kt=st>>8,Qt=st%256,Fn.push(Qt),Fn.push(Kt);return Fn})(z,D.length-H),D,H,Z)}function Ce(D,z,H){return z===0&&H===D.length?b.fromByteArray(D):b.fromByteArray(D.slice(z,H))}function Ke(D,z,H){H=Math.min(D.length,H);const Z=[];let we=z;for(;we<H;){const Re=D[we];let st=null,Kt=Re>239?4:Re>223?3:Re>191?2:1;if(we+Kt<=H){let Qt,Fn,dn,Ht;switch(Kt){case 1:Re<128&&(st=Re);break;case 2:Qt=D[we+1],(192&Qt)==128&&(Ht=(31&Re)<<6|63&Qt,Ht>127&&(st=Ht));break;case 3:Qt=D[we+1],Fn=D[we+2],(192&Qt)==128&&(192&Fn)==128&&(Ht=(15&Re)<<12|(63&Qt)<<6|63&Fn,Ht>2047&&(Ht<55296||Ht>57343)&&(st=Ht));break;case 4:Qt=D[we+1],Fn=D[we+2],dn=D[we+3],(192&Qt)==128&&(192&Fn)==128&&(192&dn)==128&&(Ht=(15&Re)<<18|(63&Qt)<<12|(63&Fn)<<6|63&dn,Ht>65535&&Ht<1114112&&(st=Ht))}}st===null?(st=65533,Kt=1):st>65535&&(st-=65536,Z.push(st>>>10&1023|55296),st=56320|1023&st),Z.push(st),we+=Kt}return(function(Re){const st=Re.length;if(st<=ce)return String.fromCharCode.apply(String,Re);let Kt="",Qt=0;for(;Qt<st;)Kt+=String.fromCharCode.apply(String,Re.slice(Qt,Qt+=ce));return Kt})(Z)}T.TYPED_ARRAY_SUPPORT=(function(){try{const D=new Uint8Array(1),z={foo:function(){return 42}};return Object.setPrototypeOf(z,Uint8Array.prototype),Object.setPrototypeOf(D,z),D.foo()===42}catch{return!1}})(),T.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}}),T.poolSize=8192,T.from=function(D,z,H){return M(D,z,H)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array),T.alloc=function(D,z,H){return(function(Z,we,Re){return I(Z),Z<=0?k(Z):we!==void 0?typeof Re=="string"?k(Z).fill(we,Re):k(Z).fill(we):k(Z)})(D,z,H)},T.allocUnsafe=function(D){return q(D)},T.allocUnsafeSlow=function(D){return q(D)},T.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==T.prototype},T.compare=function(D,z){if(Dn(D,Uint8Array)&&(D=T.from(D,D.offset,D.byteLength)),Dn(z,Uint8Array)&&(z=T.from(z,z.offset,z.byteLength)),!T.isBuffer(D)||!T.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===z)return 0;let H=D.length,Z=z.length;for(let we=0,Re=Math.min(H,Z);we<Re;++we)if(D[we]!==z[we]){H=D[we],Z=z[we];break}return H<Z?-1:Z<H?1:0},T.isEncoding=function(D){switch(String(D).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},T.concat=function(D,z){if(!Array.isArray(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return T.alloc(0);let H;if(z===void 0)for(z=0,H=0;H<D.length;++H)z+=D[H].length;const Z=T.allocUnsafe(z);let we=0;for(H=0;H<D.length;++H){let Re=D[H];if(Dn(Re,Uint8Array))we+Re.length>Z.length?(T.isBuffer(Re)||(Re=T.from(Re)),Re.copy(Z,we)):Uint8Array.prototype.set.call(Z,Re,we);else{if(!T.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(Z,we)}we+=Re.length}return Z},T.byteLength=L,T.prototype._isBuffer=!0,T.prototype.swap16=function(){const D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let z=0;z<D;z+=2)oe(this,z,z+1);return this},T.prototype.swap32=function(){const D=this.length;if(D%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let z=0;z<D;z+=4)oe(this,z,z+3),oe(this,z+1,z+2);return this},T.prototype.swap64=function(){const D=this.length;if(D%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let z=0;z<D;z+=8)oe(this,z,z+7),oe(this,z+1,z+6),oe(this,z+2,z+5),oe(this,z+3,z+4);return this},T.prototype.toString=function(){const D=this.length;return D===0?"":arguments.length===0?Ke(this,0,D):ee.apply(this,arguments)},T.prototype.toLocaleString=T.prototype.toString,T.prototype.equals=function(D){if(!T.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D||T.compare(this,D)===0},T.prototype.inspect=function(){let D="";const z=m.IS;return D=this.toString("hex",0,z).replace(/(.{2})/g,"$1 ").trim(),this.length>z&&(D+=" ... "),"<Buffer "+D+">"},j&&(T.prototype[j]=T.prototype.inspect),T.prototype.compare=function(D,z,H,Z,we){if(Dn(D,Uint8Array)&&(D=T.from(D,D.offset,D.byteLength)),!T.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(z===void 0&&(z=0),H===void 0&&(H=D?D.length:0),Z===void 0&&(Z=0),we===void 0&&(we=this.length),z<0||H>D.length||Z<0||we>this.length)throw new RangeError("out of range index");if(Z>=we&&z>=H)return 0;if(Z>=we)return-1;if(z>=H)return 1;if(this===D)return 0;let Re=(we>>>=0)-(Z>>>=0),st=(H>>>=0)-(z>>>=0);const Kt=Math.min(Re,st),Qt=this.slice(Z,we),Fn=D.slice(z,H);for(let dn=0;dn<Kt;++dn)if(Qt[dn]!==Fn[dn]){Re=Qt[dn],st=Fn[dn];break}return Re<st?-1:st<Re?1:0},T.prototype.includes=function(D,z,H){return this.indexOf(D,z,H)!==-1},T.prototype.indexOf=function(D,z,H){return Q(this,D,z,H,!0)},T.prototype.lastIndexOf=function(D,z,H){return Q(this,D,z,H,!1)},T.prototype.write=function(D,z,H,Z){if(z===void 0)Z="utf8",H=this.length,z=0;else if(H===void 0&&typeof z=="string")Z=z,H=this.length,z=0;else{if(!isFinite(z))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");z>>>=0,isFinite(H)?(H>>>=0,Z===void 0&&(Z="utf8")):(Z=H,H=void 0)}const we=this.length-z;if((H===void 0||H>we)&&(H=we),D.length>0&&(H<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");let Re=!1;for(;;)switch(Z){case"hex":return de(this,D,z,H);case"utf8":case"utf-8":return je(this,D,z,H);case"ascii":case"latin1":case"binary":return ve(this,D,z,H);case"base64":return le(this,D,z,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,D,z,H);default:if(Re)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),Re=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const ce=4096;function re(D,z,H){let Z="";H=Math.min(D.length,H);for(let we=z;we<H;++we)Z+=String.fromCharCode(127&D[we]);return Z}function ue(D,z,H){let Z="";H=Math.min(D.length,H);for(let we=z;we<H;++we)Z+=String.fromCharCode(D[we]);return Z}function _e(D,z,H){const Z=D.length;(!z||z<0)&&(z=0),(!H||H<0||H>Z)&&(H=Z);let we="";for(let Re=z;Re<H;++Re)we+=xe[D[Re]];return we}function fe(D,z,H){const Z=D.slice(z,H);let we="";for(let Re=0;Re<Z.length-1;Re+=2)we+=String.fromCharCode(Z[Re]+256*Z[Re+1]);return we}function He(D,z,H){if(D%1!=0||D<0)throw new RangeError("offset is not uint");if(D+z>H)throw new RangeError("Trying to access beyond buffer length")}function Oe(D,z,H,Z,we,Re){if(!T.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(z>we||z<Re)throw new RangeError('"value" argument is out of bounds');if(H+Z>D.length)throw new RangeError("Index out of range")}function ke(D,z,H,Z,we){Ft(z,Z,we,D,H,7);let Re=Number(z&BigInt(4294967295));D[H++]=Re,Re>>=8,D[H++]=Re,Re>>=8,D[H++]=Re,Re>>=8,D[H++]=Re;let st=Number(z>>BigInt(32)&BigInt(4294967295));return D[H++]=st,st>>=8,D[H++]=st,st>>=8,D[H++]=st,st>>=8,D[H++]=st,H}function Ve(D,z,H,Z,we){Ft(z,Z,we,D,H,7);let Re=Number(z&BigInt(4294967295));D[H+7]=Re,Re>>=8,D[H+6]=Re,Re>>=8,D[H+5]=Re,Re>>=8,D[H+4]=Re;let st=Number(z>>BigInt(32)&BigInt(4294967295));return D[H+3]=st,st>>=8,D[H+2]=st,st>>=8,D[H+1]=st,st>>=8,D[H]=st,H+8}function ie(D,z,H,Z,we,Re){if(H+Z>D.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("Index out of range")}function De(D,z,H,Z,we){return z=+z,H>>>=0,we||ie(D,0,H,4),S.write(D,z,H,Z,23,4),H+4}function Le(D,z,H,Z,we){return z=+z,H>>>=0,we||ie(D,0,H,8),S.write(D,z,H,Z,52,8),H+8}T.prototype.slice=function(D,z){const H=this.length;(D=~~D)<0?(D+=H)<0&&(D=0):D>H&&(D=H),(z=z===void 0?H:~~z)<0?(z+=H)<0&&(z=0):z>H&&(z=H),z<D&&(z=D);const Z=this.subarray(D,z);return Object.setPrototypeOf(Z,T.prototype),Z},T.prototype.readUintLE=T.prototype.readUIntLE=function(D,z,H){D>>>=0,z>>>=0,H||He(D,z,this.length);let Z=this[D],we=1,Re=0;for(;++Re<z&&(we*=256);)Z+=this[D+Re]*we;return Z},T.prototype.readUintBE=T.prototype.readUIntBE=function(D,z,H){D>>>=0,z>>>=0,H||He(D,z,this.length);let Z=this[D+--z],we=1;for(;z>0&&(we*=256);)Z+=this[D+--z]*we;return Z},T.prototype.readUint8=T.prototype.readUInt8=function(D,z){return D>>>=0,z||He(D,1,this.length),this[D]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(D,z){return D>>>=0,z||He(D,2,this.length),this[D]|this[D+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(D,z){return D>>>=0,z||He(D,2,this.length),this[D]<<8|this[D+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(D,z){return D>>>=0,z||He(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(D,z){return D>>>=0,z||He(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},T.prototype.readBigUInt64LE=Ne((function(D){kt(D>>>=0,"offset");const z=this[D],H=this[D+7];z!==void 0&&H!==void 0||Jt(D,this.length-8);const Z=z+256*this[++D]+65536*this[++D]+this[++D]*2**24,we=this[++D]+256*this[++D]+65536*this[++D]+H*2**24;return BigInt(Z)+(BigInt(we)<<BigInt(32))})),T.prototype.readBigUInt64BE=Ne((function(D){kt(D>>>=0,"offset");const z=this[D],H=this[D+7];z!==void 0&&H!==void 0||Jt(D,this.length-8);const Z=z*2**24+65536*this[++D]+256*this[++D]+this[++D],we=this[++D]*2**24+65536*this[++D]+256*this[++D]+H;return(BigInt(Z)<<BigInt(32))+BigInt(we)})),T.prototype.readIntLE=function(D,z,H){D>>>=0,z>>>=0,H||He(D,z,this.length);let Z=this[D],we=1,Re=0;for(;++Re<z&&(we*=256);)Z+=this[D+Re]*we;return we*=128,Z>=we&&(Z-=Math.pow(2,8*z)),Z},T.prototype.readIntBE=function(D,z,H){D>>>=0,z>>>=0,H||He(D,z,this.length);let Z=z,we=1,Re=this[D+--Z];for(;Z>0&&(we*=256);)Re+=this[D+--Z]*we;return we*=128,Re>=we&&(Re-=Math.pow(2,8*z)),Re},T.prototype.readInt8=function(D,z){return D>>>=0,z||He(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},T.prototype.readInt16LE=function(D,z){D>>>=0,z||He(D,2,this.length);const H=this[D]|this[D+1]<<8;return 32768&H?4294901760|H:H},T.prototype.readInt16BE=function(D,z){D>>>=0,z||He(D,2,this.length);const H=this[D+1]|this[D]<<8;return 32768&H?4294901760|H:H},T.prototype.readInt32LE=function(D,z){return D>>>=0,z||He(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},T.prototype.readInt32BE=function(D,z){return D>>>=0,z||He(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},T.prototype.readBigInt64LE=Ne((function(D){kt(D>>>=0,"offset");const z=this[D],H=this[D+7];z!==void 0&&H!==void 0||Jt(D,this.length-8);const Z=this[D+4]+256*this[D+5]+65536*this[D+6]+(H<<24);return(BigInt(Z)<<BigInt(32))+BigInt(z+256*this[++D]+65536*this[++D]+this[++D]*16777216)})),T.prototype.readBigInt64BE=Ne((function(D){kt(D>>>=0,"offset");const z=this[D],H=this[D+7];z!==void 0&&H!==void 0||Jt(D,this.length-8);const Z=(z<<24)+65536*this[++D]+256*this[++D]+this[++D];return(BigInt(Z)<<BigInt(32))+BigInt(this[++D]*16777216+65536*this[++D]+256*this[++D]+H)})),T.prototype.readFloatLE=function(D,z){return D>>>=0,z||He(D,4,this.length),S.read(this,D,!0,23,4)},T.prototype.readFloatBE=function(D,z){return D>>>=0,z||He(D,4,this.length),S.read(this,D,!1,23,4)},T.prototype.readDoubleLE=function(D,z){return D>>>=0,z||He(D,8,this.length),S.read(this,D,!0,52,8)},T.prototype.readDoubleBE=function(D,z){return D>>>=0,z||He(D,8,this.length),S.read(this,D,!1,52,8)},T.prototype.writeUintLE=T.prototype.writeUIntLE=function(D,z,H,Z){D=+D,z>>>=0,H>>>=0,!Z&&Oe(this,D,z,H,Math.pow(2,8*H)-1,0);let we=1,Re=0;for(this[z]=255&D;++Re<H&&(we*=256);)this[z+Re]=D/we&255;return z+H},T.prototype.writeUintBE=T.prototype.writeUIntBE=function(D,z,H,Z){D=+D,z>>>=0,H>>>=0,!Z&&Oe(this,D,z,H,Math.pow(2,8*H)-1,0);let we=H-1,Re=1;for(this[z+we]=255&D;--we>=0&&(Re*=256);)this[z+we]=D/Re&255;return z+H},T.prototype.writeUint8=T.prototype.writeUInt8=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,1,255,0),this[z]=255&D,z+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,2,65535,0),this[z]=255&D,this[z+1]=D>>>8,z+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,2,65535,0),this[z]=D>>>8,this[z+1]=255&D,z+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,4,4294967295,0),this[z+3]=D>>>24,this[z+2]=D>>>16,this[z+1]=D>>>8,this[z]=255&D,z+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,4,4294967295,0),this[z]=D>>>24,this[z+1]=D>>>16,this[z+2]=D>>>8,this[z+3]=255&D,z+4},T.prototype.writeBigUInt64LE=Ne((function(D,z=0){return ke(this,D,z,BigInt(0),BigInt("0xffffffffffffffff"))})),T.prototype.writeBigUInt64BE=Ne((function(D,z=0){return Ve(this,D,z,BigInt(0),BigInt("0xffffffffffffffff"))})),T.prototype.writeIntLE=function(D,z,H,Z){if(D=+D,z>>>=0,!Z){const Kt=Math.pow(2,8*H-1);Oe(this,D,z,H,Kt-1,-Kt)}let we=0,Re=1,st=0;for(this[z]=255&D;++we<H&&(Re*=256);)D<0&&st===0&&this[z+we-1]!==0&&(st=1),this[z+we]=(D/Re|0)-st&255;return z+H},T.prototype.writeIntBE=function(D,z,H,Z){if(D=+D,z>>>=0,!Z){const Kt=Math.pow(2,8*H-1);Oe(this,D,z,H,Kt-1,-Kt)}let we=H-1,Re=1,st=0;for(this[z+we]=255&D;--we>=0&&(Re*=256);)D<0&&st===0&&this[z+we+1]!==0&&(st=1),this[z+we]=(D/Re|0)-st&255;return z+H},T.prototype.writeInt8=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,1,127,-128),D<0&&(D=255+D+1),this[z]=255&D,z+1},T.prototype.writeInt16LE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,2,32767,-32768),this[z]=255&D,this[z+1]=D>>>8,z+2},T.prototype.writeInt16BE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,2,32767,-32768),this[z]=D>>>8,this[z+1]=255&D,z+2},T.prototype.writeInt32LE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,4,2147483647,-2147483648),this[z]=255&D,this[z+1]=D>>>8,this[z+2]=D>>>16,this[z+3]=D>>>24,z+4},T.prototype.writeInt32BE=function(D,z,H){return D=+D,z>>>=0,H||Oe(this,D,z,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[z]=D>>>24,this[z+1]=D>>>16,this[z+2]=D>>>8,this[z+3]=255&D,z+4},T.prototype.writeBigInt64LE=Ne((function(D,z=0){return ke(this,D,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),T.prototype.writeBigInt64BE=Ne((function(D,z=0){return Ve(this,D,z,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),T.prototype.writeFloatLE=function(D,z,H){return De(this,D,z,!0,H)},T.prototype.writeFloatBE=function(D,z,H){return De(this,D,z,!1,H)},T.prototype.writeDoubleLE=function(D,z,H){return Le(this,D,z,!0,H)},T.prototype.writeDoubleBE=function(D,z,H){return Le(this,D,z,!1,H)},T.prototype.copy=function(D,z,H,Z){if(!T.isBuffer(D))throw new TypeError("argument should be a Buffer");if(H||(H=0),Z||Z===0||(Z=this.length),z>=D.length&&(z=D.length),z||(z=0),Z>0&&Z<H&&(Z=H),Z===H||D.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),D.length-z<Z-H&&(Z=D.length-z+H);const we=Z-H;return this===D&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(z,H,Z):Uint8Array.prototype.set.call(D,this.subarray(H,Z),z),we},T.prototype.fill=function(D,z,H,Z){if(typeof D=="string"){if(typeof z=="string"?(Z=z,z=0,H=this.length):typeof H=="string"&&(Z=H,H=this.length),Z!==void 0&&typeof Z!="string")throw new TypeError("encoding must be a string");if(typeof Z=="string"&&!T.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);if(D.length===1){const Re=D.charCodeAt(0);(Z==="utf8"&&Re<128||Z==="latin1")&&(D=Re)}}else typeof D=="number"?D&=255:typeof D=="boolean"&&(D=Number(D));if(z<0||this.length<z||this.length<H)throw new RangeError("Out of range index");if(H<=z)return this;let we;if(z>>>=0,H=H===void 0?this.length:H>>>0,D||(D=0),typeof D=="number")for(we=z;we<H;++we)this[we]=D;else{const Re=T.isBuffer(D)?D:T.from(D,Z),st=Re.length;if(st===0)throw new TypeError('The value "'+D+'" is invalid for argument "value"');for(we=0;we<H-z;++we)this[we+z]=Re[we%st]}return this};const tt={};function yt(D,z,H){tt[D]=class extends H{constructor(){super(),Object.defineProperty(this,"message",{value:z.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${D}]`,this.stack,delete this.name}get code(){return D}set code(Z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Z,writable:!0})}toString(){return`${this.name} [${D}]: ${this.message}`}}}function Ot(D){let z="",H=D.length;const Z=D[0]==="-"?1:0;for(;H>=Z+4;H-=3)z=`_${D.slice(H-3,H)}${z}`;return`${D.slice(0,H)}${z}`}function Ft(D,z,H,Z,we,Re){if(D>H||D<z){const st=typeof z=="bigint"?"n":"";let Kt;throw Kt=z===0||z===BigInt(0)?`>= 0${st} and < 2${st} ** ${8*(Re+1)}${st}`:`>= -(2${st} ** ${8*(Re+1)-1}${st}) and < 2 ** ${8*(Re+1)-1}${st}`,new tt.ERR_OUT_OF_RANGE("value",Kt,D)}(function(st,Kt,Qt){kt(Kt,"offset"),st[Kt]!==void 0&&st[Kt+Qt]!==void 0||Jt(Kt,st.length-(Qt+1))})(Z,we,Re)}function kt(D,z){if(typeof D!="number")throw new tt.ERR_INVALID_ARG_TYPE(z,"number",D)}function Jt(D,z,H){throw Math.floor(D)!==D?(kt(D,H),new tt.ERR_OUT_OF_RANGE("offset","an integer",D)):z<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${z}`,D)}yt("ERR_BUFFER_OUT_OF_BOUNDS",(function(D){return D?`${D} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),yt("ERR_INVALID_ARG_TYPE",(function(D,z){return`The "${D}" argument must be of type number. Received type ${typeof z}`}),TypeError),yt("ERR_OUT_OF_RANGE",(function(D,z,H){let Z=`The value of "${D}" is out of range.`,we=H;return Number.isInteger(H)&&Math.abs(H)>4294967296?we=Ot(String(H)):typeof H=="bigint"&&(we=String(H),(H>BigInt(2)**BigInt(32)||H<-(BigInt(2)**BigInt(32)))&&(we=Ot(we)),we+="n"),Z+=` It must be ${z}. Received ${we}`,Z}),RangeError);const ze=/[^+/0-9A-Za-z-_]/g;function zt(D,z){let H;z=z||1/0;const Z=D.length;let we=null;const Re=[];for(let st=0;st<Z;++st){if(H=D.charCodeAt(st),H>55295&&H<57344){if(!we){if(H>56319){(z-=3)>-1&&Re.push(239,191,189);continue}if(st+1===Z){(z-=3)>-1&&Re.push(239,191,189);continue}we=H;continue}if(H<56320){(z-=3)>-1&&Re.push(239,191,189),we=H;continue}H=65536+(we-55296<<10|H-56320)}else we&&(z-=3)>-1&&Re.push(239,191,189);if(we=null,H<128){if((z-=1)<0)break;Re.push(H)}else if(H<2048){if((z-=2)<0)break;Re.push(H>>6|192,63&H|128)}else if(H<65536){if((z-=3)<0)break;Re.push(H>>12|224,H>>6&63|128,63&H|128)}else{if(!(H<1114112))throw new Error("Invalid code point");if((z-=4)<0)break;Re.push(H>>18|240,H>>12&63|128,H>>6&63|128,63&H|128)}}return Re}function Rt(D){return b.toByteArray((function(z){if((z=(z=z.split("=")[0]).trim().replace(ze,"")).length<2)return"";for(;z.length%4!=0;)z+="=";return z})(D))}function V(D,z,H,Z){let we;for(we=0;we<Z&&!(we+H>=z.length||we>=D.length);++we)z[we+H]=D[we];return we}function Dn(D,z){return D instanceof z||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===z.name}function cn(D){return D!=D}const xe=(function(){const D="0123456789abcdef",z=new Array(256);for(let H=0;H<16;++H){const Z=16*H;for(let we=0;we<16;++we)z[Z+we]=D[H]+D[we]}return z})();function Ne(D){return typeof BigInt>"u"?Ge:D}function Ge(){throw new Error("BigInt not supported")}},4:p=>{class m{constructor(S,j){this.low=S,this.high=j,this.length=1+j-S}overlaps(S){return!(this.high<S.low||this.low>S.high)}touches(S){return!(this.high+1<S.low||this.low-1>S.high)}add(S){return new m(Math.min(this.low,S.low),Math.max(this.high,S.high))}subtract(S){return S.low<=this.low&&S.high>=this.high?[]:S.low>this.low&&S.high<this.high?[new m(this.low,S.low-1),new m(S.high+1,this.high)]:S.low<=this.low?[new m(S.high+1,this.high)]:[new m(this.low,S.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class g{constructor(S,j){this.ranges=[],this.length=0,S!=null&&this.add(S,j)}_update_length(){this.length=this.ranges.reduce(((S,j)=>S+j.length),0)}add(S,j){var A=k=>{for(var T=0;T<this.ranges.length&&!k.touches(this.ranges[T]);)T++;for(var M=this.ranges.slice(0,T);T<this.ranges.length&&k.touches(this.ranges[T]);)k=k.add(this.ranges[T]),T++;M.push(k),this.ranges=M.concat(this.ranges.slice(T)),this._update_length()};return S instanceof g?S.ranges.forEach(A):(j==null&&(j=S),A(new m(S,j))),this}subtract(S,j){var A=k=>{for(var T=0;T<this.ranges.length&&!k.overlaps(this.ranges[T]);)T++;for(var M=this.ranges.slice(0,T);T<this.ranges.length&&k.overlaps(this.ranges[T]);)M=M.concat(this.ranges[T].subtract(k)),T++;this.ranges=M.concat(this.ranges.slice(T)),this._update_length()};return S instanceof g?S.ranges.forEach(A):(j==null&&(j=S),A(new m(S,j))),this}intersect(S,j){var A=[],k=T=>{for(var M=0;M<this.ranges.length&&!T.overlaps(this.ranges[M]);)M++;for(;M<this.ranges.length&&T.overlaps(this.ranges[M]);){var I=Math.max(this.ranges[M].low,T.low),q=Math.min(this.ranges[M].high,T.high);A.push(new m(I,q)),M++}};return S instanceof g?S.ranges.forEach(k):(j==null&&(j=S),k(new m(S,j))),this.ranges=A,this._update_length(),this}index(S){for(var j=0;j<this.ranges.length&&this.ranges[j].length<=S;)S-=this.ranges[j].length,j++;return this.ranges[j].low+S}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new g(this)}numbers(){return this.ranges.reduce(((S,j)=>{for(var A=j.low;A<=j.high;)S.push(A),A++;return S}),[])}subranges(){return this.ranges.map((S=>({low:S.low,high:S.high,length:1+S.high-S.low})))}}p.exports=g},251:(p,m)=>{m.read=function(g,b,S,j,A){var k,T,M=8*A-j-1,I=(1<<M)-1,q=I>>1,G=-7,K=S?A-1:0,X=S?-1:1,L=g[b+K];for(K+=X,k=L&(1<<-G)-1,L>>=-G,G+=M;G>0;k=256*k+g[b+K],K+=X,G-=8);for(T=k&(1<<-G)-1,k>>=-G,G+=j;G>0;T=256*T+g[b+K],K+=X,G-=8);if(k===0)k=1-q;else{if(k===I)return T?NaN:1/0*(L?-1:1);T+=Math.pow(2,j),k-=q}return(L?-1:1)*T*Math.pow(2,k-j)},m.write=function(g,b,S,j,A,k){var T,M,I,q=8*k-A-1,G=(1<<q)-1,K=G>>1,X=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=j?0:k-1,ee=j?1:-1,oe=b<0||b===0&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(M=isNaN(b)?1:0,T=G):(T=Math.floor(Math.log(b)/Math.LN2),b*(I=Math.pow(2,-T))<1&&(T--,I*=2),(b+=T+K>=1?X/I:X*Math.pow(2,1-K))*I>=2&&(T++,I/=2),T+K>=G?(M=0,T=G):T+K>=1?(M=(b*I-1)*Math.pow(2,A),T+=K):(M=b*Math.pow(2,K-1)*Math.pow(2,A),T=0));A>=8;g[S+L]=255&M,L+=ee,M/=256,A-=8);for(T=T<<A|M,q+=A;q>0;g[S+L]=255&T,L+=ee,T/=256,q-=8);g[S+L-ee]|=128*oe}},22:()=>{(function(p){var m="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",g={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},b={bash:g,environment:{pattern:RegExp("\\$"+m),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+m),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};p.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+m),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:b},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:g}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:b},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:b.entity}}],environment:{pattern:RegExp("\\$?"+m),alias:"constant"},variable:b.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},g.inside=p.languages.bash;for(var S=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],j=b.variable[1].inside,A=0;A<S.length;A++)j[S[A]]=p.languages.bash[S[A]];p.languages.sh=p.languages.bash,p.languages.shell=p.languages.bash})(Prism)},651:()=>{(function(p){function m(Le,tt){return Le.replace(/<<(\d+)>>/g,(function(yt,Ot){return"(?:"+tt[+Ot]+")"}))}function g(Le,tt,yt){return RegExp(m(Le,tt),"")}function b(Le,tt){for(var yt=0;yt<tt;yt++)Le=Le.replace(/<<self>>/g,(function(){return"(?:"+Le+")"}));return Le.replace(/<<self>>/g,"[^\\s\\S]")}var S="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",j="class enum interface record struct",A="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",k="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function T(Le){return"\\b(?:"+Le.trim().replace(/ /g,"|")+")\\b"}var M=T(j),I=RegExp(T(S+" "+j+" "+A+" "+k)),q=T(j+" "+A+" "+k),G=T(S+" "+j+" "+k),K=b(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),X=b(/\((?:[^()]|<<self>>)*\)/.source,2),L=/@?\b[A-Za-z_]\w*\b/.source,ee=m(/<<0>>(?:\s*<<1>>)?/.source,[L,K]),oe=m(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[q,ee]),Q=/\[\s*(?:,\s*)*\]/.source,ne=m(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[oe,Q]),de=m(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[K,X,Q]),je=m(/\(<<0>>+(?:,<<0>>+)+\)/.source,[de]),ve=m(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[je,oe,Q]),le={keyword:I,punctuation:/[<>()?,.:[\]]/},be=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,Ce=/"(?:\\.|[^\\"\r\n])*"/.source,Ke=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;p.languages.csharp=p.languages.extend("clike",{string:[{pattern:g(/(^|[^$\\])<<0>>/.source,[Ke]),lookbehind:!0,greedy:!0},{pattern:g(/(^|[^@$\\])<<0>>/.source,[Ce]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:g(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[oe]),lookbehind:!0,inside:le},{pattern:g(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[L,ve]),lookbehind:!0,inside:le},{pattern:g(/(\busing\s+)<<0>>(?=\s*=)/.source,[L]),lookbehind:!0},{pattern:g(/(\b<<0>>\s+)<<1>>/.source,[M,ee]),lookbehind:!0,inside:le},{pattern:g(/(\bcatch\s*\(\s*)<<0>>/.source,[oe]),lookbehind:!0,inside:le},{pattern:g(/(\bwhere\s+)<<0>>/.source,[L]),lookbehind:!0},{pattern:g(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[ne]),lookbehind:!0,inside:le},{pattern:g(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[ve,G,L]),inside:le}],keyword:I,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),p.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),p.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:g(/([(,]\s*)<<0>>(?=\s*:)/.source,[L]),lookbehind:!0,alias:"punctuation"}}),p.languages.insertBefore("csharp","class-name",{namespace:{pattern:g(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[L]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:g(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[X]),lookbehind:!0,alias:"class-name",inside:le},"return-type":{pattern:g(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[ve,oe]),inside:le,alias:"class-name"},"constructor-invocation":{pattern:g(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[ve]),lookbehind:!0,inside:le,alias:"class-name"},"generic-method":{pattern:g(/<<0>>\s*<<1>>(?=\s*\()/.source,[L,K]),inside:{function:g(/^<<0>>/.source,[L]),generic:{pattern:RegExp(K),alias:"class-name",inside:le}}},"type-list":{pattern:g(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[M,ee,L,ve,I.source,X,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:g(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[ee,X]),lookbehind:!0,greedy:!0,inside:p.languages.csharp},keyword:I,"class-name":{pattern:RegExp(ve),greedy:!0,inside:le},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var ce=Ce+"|"+be,re=m(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[ce]),ue=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[re]),2),_e=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,fe=m(/<<0>>(?:\s*\(<<1>>*\))?/.source,[oe,ue]);p.languages.insertBefore("csharp","class-name",{attribute:{pattern:g(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[_e,fe]),lookbehind:!0,greedy:!0,inside:{target:{pattern:g(/^<<0>>(?=\s*:)/.source,[_e]),alias:"keyword"},"attribute-arguments":{pattern:g(/\(<<0>>*\)/.source,[ue]),inside:p.languages.csharp},"class-name":{pattern:RegExp(oe),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var He=/:[^}\r\n]+/.source,Oe=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[re]),2),ke=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Oe,He]),Ve=b(m(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[ce]),2),ie=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Ve,He]);function De(Le,tt){return{interpolation:{pattern:g(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[Le]),lookbehind:!0,inside:{"format-string":{pattern:g(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[tt,He]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:p.languages.csharp}}},string:/[\s\S]+/}}p.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:g(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[ke]),lookbehind:!0,greedy:!0,inside:De(ke,Oe)},{pattern:g(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ie]),lookbehind:!0,greedy:!0,inside:De(ie,Ve)}],char:{pattern:RegExp(be),greedy:!0}}),p.languages.dotnet=p.languages.cs=p.languages.csharp})(Prism)},113:()=>{(function(p){var m=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;p.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+m.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+m.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+m.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+m.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:m,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},p.languages.css.atrule.inside.rest=p.languages.css;var g=p.languages.markup;g&&(g.tag.addInlined("style","css"),g.tag.addAttribute("style","css"))})(Prism)},378:()=>{Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},784:()=>{(function(p){function m(M){return RegExp("(^(?:"+M+"):[ ]*(?![ ]))[^]+","i")}p.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:p.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:m(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:p.languages.csp},{pattern:m(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:p.languages.hpkp},{pattern:m(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:p.languages.hsts},{pattern:m(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var g,b=p.languages,S={"application/javascript":b.javascript,"application/json":b.json||b.javascript,"application/xml":b.xml,"text/xml":b.xml,"text/html":b.html,"text/css":b.css,"text/plain":b.plain},j={"application/json":!0,"application/xml":!0};function A(M){var I=M.replace(/^[a-z]+\//,"");return"(?:"+M+"|"+("\\w+/(?:[\\w.-]+\\+)+"+I+"(?![+\\w.-])")+")"}for(var k in S)if(S[k]){g=g||{};var T=j[k]?A(k):k;g[k.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+T+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:S[k]}}g&&p.languages.insertBefore("http","header",g)})(Prism)},976:()=>{(function(p){var m=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,g=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,b={pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};p.languages.java=p.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[b,{pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:b.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+g+/[A-Z]\w*\b/.source),lookbehind:!0,inside:b.inside}],keyword:m,function:[p.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),p.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),p.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":b,keyword:m,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+g+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:b.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+g+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:b.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return m.source}))),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)},514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},342:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},83:()=>{(function(p){var m=/[*&][^\s[\]{},]+/,g=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,b="(?:"+g.source+"(?:[ ]+"+m.source+")?|"+m.source+"(?:[ ]+"+g.source+")?)",S=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),j=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function A(k,T){T=(T||"").replace(/m/g,"")+"m";var M=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<value>>/g,(function(){return k}));return RegExp(M,T)}p.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return b}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<key>>/g,(function(){return"(?:"+S+"|"+j+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:A(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:A(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:A(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:A(j),lookbehind:!0,greedy:!0},number:{pattern:A(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:g,important:m,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},p.languages.yml=p.languages.yaml})(Prism)},848:(p,m,g)=>{var b=(function(S){var j=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,A=0,k={},T={manual:S.Prism&&S.Prism.manual,disableWorkerMessageHandler:S.Prism&&S.Prism.disableWorkerMessageHandler,util:{encode:function Q(ne){return ne instanceof M?new M(ne.type,Q(ne.content),ne.alias):Array.isArray(ne)?ne.map(Q):ne.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(Q){return Object.prototype.toString.call(Q).slice(8,-1)},objId:function(Q){return Q.__id||Object.defineProperty(Q,"__id",{value:++A}),Q.__id},clone:function Q(ne,de){var je,ve;switch(de=de||{},T.util.type(ne)){case"Object":if(ve=T.util.objId(ne),de[ve])return de[ve];for(var le in je={},de[ve]=je,ne)ne.hasOwnProperty(le)&&(je[le]=Q(ne[le],de));return je;case"Array":return ve=T.util.objId(ne),de[ve]?de[ve]:(je=[],de[ve]=je,ne.forEach((function(be,Ce){je[Ce]=Q(be,de)})),je);default:return ne}},getLanguage:function(Q){for(;Q;){var ne=j.exec(Q.className);if(ne)return ne[1].toLowerCase();Q=Q.parentElement}return"none"},setLanguage:function(Q,ne){Q.className=Q.className.replace(RegExp(j,"gi"),""),Q.classList.add("language-"+ne)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(je){var Q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(je.stack)||[])[1];if(Q){var ne=document.getElementsByTagName("script");for(var de in ne)if(ne[de].src==Q)return ne[de]}return null}},isActive:function(Q,ne,de){for(var je="no-"+ne;Q;){var ve=Q.classList;if(ve.contains(ne))return!0;if(ve.contains(je))return!1;Q=Q.parentElement}return!!de}},languages:{plain:k,plaintext:k,text:k,txt:k,extend:function(Q,ne){var de=T.util.clone(T.languages[Q]);for(var je in ne)de[je]=ne[je];return de},insertBefore:function(Q,ne,de,je){var ve=(je=je||T.languages)[Q],le={};for(var be in ve)if(ve.hasOwnProperty(be)){if(be==ne)for(var Ce in de)de.hasOwnProperty(Ce)&&(le[Ce]=de[Ce]);de.hasOwnProperty(be)||(le[be]=ve[be])}var Ke=je[Q];return je[Q]=le,T.languages.DFS(T.languages,(function(ce,re){re===Ke&&ce!=Q&&(this[ce]=le)})),le},DFS:function Q(ne,de,je,ve){ve=ve||{};var le=T.util.objId;for(var be in ne)if(ne.hasOwnProperty(be)){de.call(ne,be,ne[be],je||be);var Ce=ne[be],Ke=T.util.type(Ce);Ke!=="Object"||ve[le(Ce)]?Ke!=="Array"||ve[le(Ce)]||(ve[le(Ce)]=!0,Q(Ce,de,be,ve)):(ve[le(Ce)]=!0,Q(Ce,de,null,ve))}}},plugins:{},highlightAll:function(Q,ne){T.highlightAllUnder(document,Q,ne)},highlightAllUnder:function(Q,ne,de){var je={callback:de,container:Q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};T.hooks.run("before-highlightall",je),je.elements=Array.prototype.slice.apply(je.container.querySelectorAll(je.selector)),T.hooks.run("before-all-elements-highlight",je);for(var ve,le=0;ve=je.elements[le++];)T.highlightElement(ve,ne===!0,je.callback)},highlightElement:function(Q,ne,de){var je=T.util.getLanguage(Q),ve=T.languages[je];T.util.setLanguage(Q,je);var le=Q.parentElement;le&&le.nodeName.toLowerCase()==="pre"&&T.util.setLanguage(le,je);var be={element:Q,language:je,grammar:ve,code:Q.textContent};function Ce(ce){be.highlightedCode=ce,T.hooks.run("before-insert",be),be.element.innerHTML=be.highlightedCode,T.hooks.run("after-highlight",be),T.hooks.run("complete",be),de&&de.call(be.element)}if(T.hooks.run("before-sanity-check",be),(le=be.element.parentElement)&&le.nodeName.toLowerCase()==="pre"&&!le.hasAttribute("tabindex")&&le.setAttribute("tabindex","0"),!be.code)return T.hooks.run("complete",be),void(de&&de.call(be.element));if(T.hooks.run("before-highlight",be),be.grammar)if(ne&&S.Worker){var Ke=new Worker(T.filename);Ke.onmessage=function(ce){Ce(ce.data)},Ke.postMessage(JSON.stringify({language:be.language,code:be.code,immediateClose:!0}))}else Ce(T.highlight(be.code,be.grammar,be.language));else Ce(T.util.encode(be.code))},highlight:function(Q,ne,de){var je={code:Q,grammar:ne,language:de};if(T.hooks.run("before-tokenize",je),!je.grammar)throw new Error('The language "'+je.language+'" has no grammar.');return je.tokens=T.tokenize(je.code,je.grammar),T.hooks.run("after-tokenize",je),M.stringify(T.util.encode(je.tokens),je.language)},tokenize:function(Q,ne){var de=ne.rest;if(de){for(var je in de)ne[je]=de[je];delete ne.rest}var ve=new G;return K(ve,ve.head,Q),q(Q,ve,ne,ve.head,0),(function(le){for(var be=[],Ce=le.head.next;Ce!==le.tail;)be.push(Ce.value),Ce=Ce.next;return be})(ve)},hooks:{all:{},add:function(Q,ne){var de=T.hooks.all;de[Q]=de[Q]||[],de[Q].push(ne)},run:function(Q,ne){var de=T.hooks.all[Q];if(de&&de.length)for(var je,ve=0;je=de[ve++];)je(ne)}},Token:M};function M(Q,ne,de,je){this.type=Q,this.content=ne,this.alias=de,this.length=0|(je||"").length}function I(Q,ne,de,je){Q.lastIndex=ne;var ve=Q.exec(de);if(ve&&je&&ve[1]){var le=ve[1].length;ve.index+=le,ve[0]=ve[0].slice(le)}return ve}function q(Q,ne,de,je,ve,le){for(var be in de)if(de.hasOwnProperty(be)&&de[be]){var Ce=de[be];Ce=Array.isArray(Ce)?Ce:[Ce];for(var Ke=0;Ke<Ce.length;++Ke){if(le&&le.cause==be+","+Ke)return;var ce=Ce[Ke],re=ce.inside,ue=!!ce.lookbehind,_e=!!ce.greedy,fe=ce.alias;if(_e&&!ce.pattern.global){var He=ce.pattern.toString().match(/[imsuy]*$/)[0];ce.pattern=RegExp(ce.pattern.source,He+"g")}for(var Oe=ce.pattern||ce,ke=je.next,Ve=ve;ke!==ne.tail&&!(le&&Ve>=le.reach);Ve+=ke.value.length,ke=ke.next){var ie=ke.value;if(ne.length>Q.length)return;if(!(ie instanceof M)){var De,Le=1;if(_e){if(!(De=I(Oe,Ve,Q,ue))||De.index>=Q.length)break;var tt=De.index,yt=De.index+De[0].length,Ot=Ve;for(Ot+=ke.value.length;tt>=Ot;)Ot+=(ke=ke.next).value.length;if(Ve=Ot-=ke.value.length,ke.value instanceof M)continue;for(var Ft=ke;Ft!==ne.tail&&(Ot<yt||typeof Ft.value=="string");Ft=Ft.next)Le++,Ot+=Ft.value.length;Le--,ie=Q.slice(Ve,Ot),De.index-=Ve}else if(!(De=I(Oe,0,ie,ue)))continue;tt=De.index;var kt=De[0],Jt=ie.slice(0,tt),ze=ie.slice(tt+kt.length),zt=Ve+ie.length;le&&zt>le.reach&&(le.reach=zt);var Rt=ke.prev;if(Jt&&(Rt=K(ne,Rt,Jt),Ve+=Jt.length),X(ne,Rt,Le),ke=K(ne,Rt,new M(be,re?T.tokenize(kt,re):kt,fe,kt)),ze&&K(ne,ke,ze),Le>1){var V={cause:be+","+Ke,reach:zt};q(Q,ne,de,ke.prev,Ve,V),le&&V.reach>le.reach&&(le.reach=V.reach)}}}}}}function G(){var Q={value:null,prev:null,next:null},ne={value:null,prev:Q,next:null};Q.next=ne,this.head=Q,this.tail=ne,this.length=0}function K(Q,ne,de){var je=ne.next,ve={value:de,prev:ne,next:je};return ne.next=ve,je.prev=ve,Q.length++,ve}function X(Q,ne,de){for(var je=ne.next,ve=0;ve<de&&je!==Q.tail;ve++)je=je.next;ne.next=je,je.prev=ne,Q.length-=ve}if(S.Prism=T,M.stringify=function Q(ne,de){if(typeof ne=="string")return ne;if(Array.isArray(ne)){var je="";return ne.forEach((function(Ke){je+=Q(Ke,de)})),je}var ve={type:ne.type,content:Q(ne.content,de),tag:"span",classes:["token",ne.type],attributes:{},language:de},le=ne.alias;le&&(Array.isArray(le)?Array.prototype.push.apply(ve.classes,le):ve.classes.push(le)),T.hooks.run("wrap",ve);var be="";for(var Ce in ve.attributes)be+=" "+Ce+'="'+(ve.attributes[Ce]||"").replace(/"/g,""")+'"';return"<"+ve.tag+' class="'+ve.classes.join(" ")+'"'+be+">"+ve.content+"</"+ve.tag+">"},!S.document)return S.addEventListener&&(T.disableWorkerMessageHandler||S.addEventListener("message",(function(Q){var ne=JSON.parse(Q.data),de=ne.language,je=ne.code,ve=ne.immediateClose;S.postMessage(T.highlight(je,T.languages[de],de)),ve&&S.close()}),!1)),T;var L=T.util.currentScript();function ee(){T.manual||T.highlightAll()}if(L&&(T.filename=L.src,L.hasAttribute("data-manual")&&(T.manual=!0)),!T.manual){var oe=document.readyState;oe==="loading"||oe==="interactive"&&L&&L.defer?document.addEventListener("DOMContentLoaded",ee):window.requestAnimationFrame?window.requestAnimationFrame(ee):window.setTimeout(ee,16)}return T})(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});p.exports&&(p.exports=b),g.g!==void 0&&(g.g.Prism=b),b.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},b.languages.markup.tag.inside["attr-value"].inside.entity=b.languages.markup.entity,b.languages.markup.doctype.inside["internal-subset"].inside=b.languages.markup,b.hooks.add("wrap",(function(S){S.type==="entity"&&(S.attributes.title=S.content.replace(/&/,"&"))})),Object.defineProperty(b.languages.markup.tag,"addInlined",{value:function(S,j){var A={};A["language-"+j]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:b.languages[j]},A.cdata=/^<!\[CDATA\[|\]\]>$/i;var k={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:A}};k["language-"+j]={pattern:/[\s\S]+/,inside:b.languages[j]};var T={};T[S]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return S})),"i"),lookbehind:!0,greedy:!0,inside:k},b.languages.insertBefore("markup","cdata",T)}}),Object.defineProperty(b.languages.markup.tag,"addAttribute",{value:function(S,j){b.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+S+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[j,"language-"+j],inside:b.languages[j]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),b.languages.html=b.languages.markup,b.languages.mathml=b.languages.markup,b.languages.svg=b.languages.markup,b.languages.xml=b.languages.extend("markup",{}),b.languages.ssml=b.languages.xml,b.languages.atom=b.languages.xml,b.languages.rss=b.languages.xml,(function(S){var j=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;S.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+j.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+j.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+j.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+j.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:j,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},S.languages.css.atrule.inside.rest=S.languages.css;var A=S.languages.markup;A&&(A.tag.addInlined("style","css"),A.tag.addAttribute("style","css"))})(b),b.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},b.languages.javascript=b.languages.extend("clike",{"class-name":[b.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),b.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,b.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:b.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:b.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:b.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:b.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:b.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),b.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:b.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),b.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),b.languages.markup&&(b.languages.markup.tag.addInlined("script","javascript"),b.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),b.languages.js=b.languages.javascript,(function(){if(b!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var S={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},j="data-src-status",A="loading",k="loaded",T="pre[data-src]:not(["+j+'="'+k+'"]):not(['+j+'="'+A+'"])';b.hooks.add("before-highlightall",(function(I){I.selector+=", "+T})),b.hooks.add("before-sanity-check",(function(I){var q=I.element;if(q.matches(T)){I.code="",q.setAttribute(j,A);var G=q.appendChild(document.createElement("CODE"));G.textContent="Loading…";var K=q.getAttribute("data-src"),X=I.language;if(X==="none"){var L=(/\.(\w+)$/.exec(K)||[,"none"])[1];X=S[L]||L}b.util.setLanguage(G,X),b.util.setLanguage(q,X);var ee=b.plugins.autoloader;ee&&ee.loadLanguages(X),(function(oe,Q,ne){var de=new XMLHttpRequest;de.open("GET",oe,!0),de.onreadystatechange=function(){de.readyState==4&&(de.status<400&&de.responseText?Q(de.responseText):de.status>=400?ne("✖ Error "+de.status+" while fetching file: "+de.statusText):ne("✖ Error: File does not exist or is empty"))},de.send(null)})(K,(function(oe){q.setAttribute(j,k);var Q=(function(ve){var le=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(ve||"");if(le){var be=Number(le[1]),Ce=le[2],Ke=le[3];return Ce?Ke?[be,Number(Ke)]:[be,void 0]:[be,be]}})(q.getAttribute("data-range"));if(Q){var ne=oe.split(/\r\n?|\n/g),de=Q[0],je=Q[1]==null?ne.length:Q[1];de<0&&(de+=ne.length),de=Math.max(0,Math.min(de-1,ne.length)),je<0&&(je+=ne.length),je=Math.max(0,Math.min(je,ne.length)),oe=ne.slice(de,je).join(`
|
||
`),q.hasAttribute("data-start")||q.setAttribute("data-start",String(de+1))}G.textContent=oe,b.highlightElement(G)}),(function(oe){q.setAttribute(j,"failed"),G.textContent=oe}))}})),b.plugins.fileHighlight={highlight:function(I){for(var q,G=(I||document).querySelectorAll(T),K=0;q=G[K++];)b.highlightElement(q)}};var M=!1;b.fileHighlight=function(){M||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),M=!0),b.plugins.fileHighlight.highlight.apply(this,arguments)}}})()},859:(p,m,g)=>{const b=g(96),S=g(4),j=b.types;p.exports=class Ob{constructor(k,T){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else{if(typeof k!="string")throw new Error("Expected a regexp or string");this.ignoreCase=T&&T.indexOf("i")!==-1,this.multiline=T&&T.indexOf("m")!==-1}this.tokens=b(k)}_setDefaults(k){this.max=k.max!=null?k.max:Ob.prototype.max!=null?Ob.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,T){var M,I,q,G,K;switch(k.type){case j.ROOT:case j.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=T.push(null)-1),I="",G=0,K=(M=k.options?this._randSelect(k.options):k.stack).length;G<K;G++)I+=this._gen(M[G],T);return k.remember&&(T[k.groupNumber]=I),I;case j.POSITION:return"";case j.SET:var X=this._expand(k);return X.length?String.fromCharCode(this._randSelect(X)):"";case j.REPETITION:for(q=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),I="",G=0;G<q;G++)I+=this._gen(k.value,T);return I;case j.REFERENCE:return T[k.value-1]||"";case j.CHAR:var L=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode(L)}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof S?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===b.types.CHAR)return new S(k.value);if(k.type===b.types.RANGE)return new S(k.from,k.to);{let T=new S;for(let M=0;M<k.set.length;M++){let I=this._expand(k.set[M]);if(T.add(I),this.ignoreCase)for(let q=0;q<I.length;q++){let G=I.index(q),K=this._toOtherCase(G);G!==K&&T.add(K)}}return k.not?this.defaultRange.clone().subtract(T):this.defaultRange.clone().intersect(T)}}randInt(k,T){return k+Math.floor(Math.random()*(1+T-k))}get defaultRange(){return this._range=this._range||new S(32,126)}set defaultRange(k){this._range=k}static randexp(k,T){var M;return typeof k=="string"&&(k=new RegExp(k,T)),k._randexp===void 0?(M=new Ob(k,T),k._randexp=M):(M=k._randexp)._setDefaults(k),M.gen()}static sugar(){RegExp.prototype.gen=function(){return Ob.randexp(this)}}}},208:p=>{var m,g="";p.exports=function(b,S){if(typeof b!="string")throw new TypeError("expected a string");if(S===1)return b;if(S===2)return b+b;var j=b.length*S;if(m!==b||m===void 0)m=b,g="";else if(g.length>=j)return g.substr(0,j);for(;j>g.length&&S>1;)1&S&&(g+=b),S>>=1,b+=b;return g=(g+=b).substr(0,j)}},96:(p,m,g)=>{const b=g(586),S=g(205),j=g(23),A=g(48);p.exports=k=>{var T,M,I=0,q={type:S.ROOT,stack:[]},G=q,K=q.stack,X=[],L=be=>{b.error(k,"Nothing to repeat at column "+(be-1))},ee=b.strToChars(k);for(T=ee.length;I<T;)switch(M=ee[I++]){case"\\":switch(M=ee[I++]){case"b":K.push(A.wordBoundary());break;case"B":K.push(A.nonWordBoundary());break;case"w":K.push(j.words());break;case"W":K.push(j.notWords());break;case"d":K.push(j.ints());break;case"D":K.push(j.notInts());break;case"s":K.push(j.whitespace());break;case"S":K.push(j.notWhitespace());break;default:/\d/.test(M)?K.push({type:S.REFERENCE,value:parseInt(M,10)}):K.push({type:S.CHAR,value:M.charCodeAt(0)})}break;case"^":K.push(A.begin());break;case"$":K.push(A.end());break;case"[":var oe;ee[I]==="^"?(oe=!0,I++):oe=!1;var Q=b.tokenizeClass(ee.slice(I),k);I+=Q[1],K.push({type:S.SET,set:Q[0],not:oe});break;case".":K.push(j.anyChar());break;case"(":var ne={type:S.GROUP,stack:[],remember:!0};(M=ee[I])==="?"&&(M=ee[I+1],I+=2,M==="="?ne.followedBy=!0:M==="!"?ne.notFollowedBy=!0:M!==":"&&b.error(k,`Invalid group, character '${M}' after '?' at column `+(I-1)),ne.remember=!1),K.push(ne),X.push(G),G=ne,K=ne.stack;break;case")":X.length===0&&b.error(k,"Unmatched ) at column "+(I-1)),K=(G=X.pop()).options?G.options[G.options.length-1]:G.stack;break;case"|":G.options||(G.options=[G.stack],delete G.stack);var de=[];G.options.push(de),K=de;break;case"{":var je,ve,le=/^(\d+)(,(\d+)?)?\}/.exec(ee.slice(I));le!==null?(K.length===0&&L(I),je=parseInt(le[1],10),ve=le[2]?le[3]?parseInt(le[3],10):1/0:je,I+=le[0].length,K.push({type:S.REPETITION,min:je,max:ve,value:K.pop()})):K.push({type:S.CHAR,value:123});break;case"?":K.length===0&&L(I),K.push({type:S.REPETITION,min:0,max:1,value:K.pop()});break;case"+":K.length===0&&L(I),K.push({type:S.REPETITION,min:1,max:1/0,value:K.pop()});break;case"*":K.length===0&&L(I),K.push({type:S.REPETITION,min:0,max:1/0,value:K.pop()});break;default:K.push({type:S.CHAR,value:M.charCodeAt(0)})}return X.length!==0&&b.error(k,"Unterminated group"),q},p.exports.types=S},48:(p,m,g)=>{const b=g(205);m.wordBoundary=()=>({type:b.POSITION,value:"b"}),m.nonWordBoundary=()=>({type:b.POSITION,value:"B"}),m.begin=()=>({type:b.POSITION,value:"^"}),m.end=()=>({type:b.POSITION,value:"$"})},23:(p,m,g)=>{const b=g(205),S=()=>[{type:b.RANGE,from:48,to:57}],j=()=>[{type:b.CHAR,value:95},{type:b.RANGE,from:97,to:122},{type:b.RANGE,from:65,to:90}].concat(S()),A=()=>[{type:b.CHAR,value:9},{type:b.CHAR,value:10},{type:b.CHAR,value:11},{type:b.CHAR,value:12},{type:b.CHAR,value:13},{type:b.CHAR,value:32},{type:b.CHAR,value:160},{type:b.CHAR,value:5760},{type:b.RANGE,from:8192,to:8202},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233},{type:b.CHAR,value:8239},{type:b.CHAR,value:8287},{type:b.CHAR,value:12288},{type:b.CHAR,value:65279}];m.words=()=>({type:b.SET,set:j(),not:!1}),m.notWords=()=>({type:b.SET,set:j(),not:!0}),m.ints=()=>({type:b.SET,set:S(),not:!1}),m.notInts=()=>({type:b.SET,set:S(),not:!0}),m.whitespace=()=>({type:b.SET,set:A(),not:!1}),m.notWhitespace=()=>({type:b.SET,set:A(),not:!0}),m.anyChar=()=>({type:b.SET,set:[{type:b.CHAR,value:10},{type:b.CHAR,value:13},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233}],not:!0})},205:p=>{p.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},586:(p,m,g)=>{const b=g(205),S=g(23),j={0:0,t:9,n:10,v:11,f:12,r:13};m.strToChars=function(A){return A=A.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(k,T,M,I,q,G,K,X){if(M)return k;var L=T?8:I?parseInt(I,16):q?parseInt(q,16):G?parseInt(G,8):K?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(K):j[X],ee=String.fromCharCode(L);return/[[\]{}^$.|?*+()]/.test(ee)&&(ee="\\"+ee),ee}))},m.tokenizeClass=(A,k)=>{for(var T,M,I=[],q=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;(T=q.exec(A))!=null;)if(T[1])I.push(S.words());else if(T[2])I.push(S.ints());else if(T[3])I.push(S.whitespace());else if(T[4])I.push(S.notWords());else if(T[5])I.push(S.notInts());else if(T[6])I.push(S.notWhitespace());else if(T[7])I.push({type:b.RANGE,from:(T[8]||T[9]).charCodeAt(0),to:T[10].charCodeAt(0)});else{if(!(M=T[12]))return[I,q.lastIndex];I.push({type:b.CHAR,value:M.charCodeAt(0)})}m.error(k,"Unterminated character class")},m.error=(A,k)=>{throw new SyntaxError("Invalid regular expression: /"+A+"/: "+k)}},657:(p,m,g)=>{var b=g(208),S=function(T){return/<\/+[^>]+>/.test(T)},j=function(T){return/<[^>]+\/>/.test(T)},A=function(T){return(function(M){return/<[^>!]+>/.test(M)})(T)&&!S(T)&&!j(T)};function k(T){return S(T)?"ClosingTag":A(T)?"OpeningTag":j(T)?"SelfClosingTag":"Text"}p.exports=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=M.indentor,q=M.textNodesOnSameLine,G=0,K=[];I=I||" ";var X,L,ee=(X=T,(L=X,L.split(/(<\/?[^>]+>)/g).filter((function(oe){return oe.trim()!==""}))).map((function(oe){return{value:oe,type:k(oe)}}))).map((function(oe,Q,ne){var de=oe.value,je=oe.type;je==="ClosingTag"&&G--;var ve=b(I,G),le=ve+de;if(je==="OpeningTag"&&G++,q){var be=ne[Q-1],Ce=ne[Q-2];je==="ClosingTag"&&be.type==="Text"&&Ce.type==="OpeningTag"&&(le=""+ve+Ce.value+be.value+de,K.push(Q-2,Q-1))}return le}));return K.forEach((function(oe){return ee[oe]=null})),ee.filter((function(oe){return!!oe})).join(`
|
||
`)}}},o={};function d(p){var m=o[p];if(m!==void 0){if(m.error!==void 0)throw m.error;return m.exports}var g=o[p]={exports:{}};try{var b={id:p,module:g,factory:s[p],require:d};d.i.forEach((function(S){S(b)})),g=b.module,b.factory.call(g.exports,g,g.exports,b.require)}catch(S){throw g.error=S,S}return g.exports}d.m=s,d.c=o,d.i=[],d.n=p=>{var m=p&&p.__esModule?()=>p.default:()=>p;return d.d(m,{a:m}),m},d.d=(p,m)=>{for(var g in m)d.o(m,g)&&!d.o(p,g)&&Object.defineProperty(p,g,{enumerable:!0,get:m[g]})},d.hu=p=>p+"."+d.h()+".hot-update.js",d.hmrF=()=>"main."+d.h()+".hot-update.json",d.h=()=>"2337278d415d81467132",d.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),d.o=(p,m)=>Object.prototype.hasOwnProperty.call(p,m),e={},r="rapidoc:",d.l=(p,m,g,b)=>{if(e[p])e[p].push(m);else{var S,j;if(g!==void 0)for(var A=document.getElementsByTagName("script"),k=0;k<A.length;k++){var T=A[k];if(T.getAttribute("src")==p||T.getAttribute("data-webpack")==r+g){S=T;break}}S||(j=!0,(S=document.createElement("script")).charset="utf-8",S.timeout=120,d.nc&&S.setAttribute("nonce",d.nc),S.setAttribute("data-webpack",r+g),S.src=p),e[p]=[m];var M=(q,G)=>{S.onerror=S.onload=null,clearTimeout(I);var K=e[p];if(delete e[p],S.parentNode&&S.parentNode.removeChild(S),K&&K.forEach((X=>X(G))),q)return q(G)},I=setTimeout(M.bind(null,void 0,{type:"timeout",target:S}),12e4);S.onerror=M.bind(null,S.onerror),S.onload=M.bind(null,S.onload),j&&document.head.appendChild(S)}},(()=>{var p,m,g,b={},S=d.c,j=[],A=[],k="idle",T=0,M=[];function I(ee){k=ee;for(var oe=[],Q=0;Q<A.length;Q++)oe[Q]=A[Q].call(null,ee);return Promise.all(oe).then((function(){}))}function q(){--T==0&&I("ready").then((function(){if(T===0){var ee=M;M=[];for(var oe=0;oe<ee.length;oe++)ee[oe]()}}))}function G(ee){if(k!=="idle")throw new Error("check() is only allowed in idle status");return I("check").then(d.hmrM).then((function(oe){return oe?I("prepare").then((function(){var Q=[];return m=[],Promise.all(Object.keys(d.hmrC).reduce((function(ne,de){return d.hmrC[de](oe.c,oe.r,oe.m,ne,m,Q),ne}),[])).then((function(){return ne=function(){return ee?X(ee):I("ready").then((function(){return Q}))},T===0?ne():new Promise((function(de){M.push((function(){de(ne())}))}));var ne}))})):I(L()?"ready":"idle").then((function(){return null}))}))}function K(ee){return k!=="ready"?Promise.resolve().then((function(){throw new Error("apply() is only allowed in ready status (state: "+k+")")})):X(ee)}function X(ee){ee=ee||{},L();var oe=m.map((function(be){return be(ee)}));m=void 0;var Q=oe.map((function(be){return be.error})).filter(Boolean);if(Q.length>0)return I("abort").then((function(){throw Q[0]}));var ne=I("dispose");oe.forEach((function(be){be.dispose&&be.dispose()}));var de,je=I("apply"),ve=function(be){de||(de=be)},le=[];return oe.forEach((function(be){if(be.apply){var Ce=be.apply(ve);if(Ce)for(var Ke=0;Ke<Ce.length;Ke++)le.push(Ce[Ke])}})),Promise.all([ne,je]).then((function(){return de?I("fail").then((function(){throw de})):g?X(ee).then((function(be){return le.forEach((function(Ce){be.indexOf(Ce)<0&&be.push(Ce)})),be})):I("idle").then((function(){return le}))}))}function L(){if(g)return m||(m=[]),Object.keys(d.hmrI).forEach((function(ee){g.forEach((function(oe){d.hmrI[ee](oe,m)}))})),g=void 0,!0}d.hmrD=b,d.i.push((function(ee){var oe,Q,ne,de,je=ee.module,ve=(function(le,be){var Ce=S[be];if(!Ce)return le;var Ke=function(ue){if(Ce.hot.active){if(S[ue]){var _e=S[ue].parents;_e.indexOf(be)===-1&&_e.push(be)}else j=[be],p=ue;Ce.children.indexOf(ue)===-1&&Ce.children.push(ue)}else console.warn("[HMR] unexpected require("+ue+") from disposed module "+be),j=[];return le(ue)},ce=function(ue){return{configurable:!0,enumerable:!0,get:function(){return le[ue]},set:function(_e){le[ue]=_e}}};for(var re in le)Object.prototype.hasOwnProperty.call(le,re)&&re!=="e"&&Object.defineProperty(Ke,re,ce(re));return Ke.e=function(ue,_e){return(function(fe){switch(k){case"ready":I("prepare");case"prepare":return T++,fe.then(q,q),fe;default:return fe}})(le.e(ue,_e))},Ke})(ee.require,ee.id);je.hot=(oe=ee.id,Q=je,de={_acceptedDependencies:{},_acceptedErrorHandlers:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:ne=p!==oe,_requireSelf:function(){j=Q.parents.slice(),p=ne?void 0:oe,d(oe)},active:!0,accept:function(le,be,Ce){if(le===void 0)de._selfAccepted=!0;else if(typeof le=="function")de._selfAccepted=le;else if(typeof le=="object"&&le!==null)for(var Ke=0;Ke<le.length;Ke++)de._acceptedDependencies[le[Ke]]=be||function(){},de._acceptedErrorHandlers[le[Ke]]=Ce;else de._acceptedDependencies[le]=be||function(){},de._acceptedErrorHandlers[le]=Ce},decline:function(le){if(le===void 0)de._selfDeclined=!0;else if(typeof le=="object"&&le!==null)for(var be=0;be<le.length;be++)de._declinedDependencies[le[be]]=!0;else de._declinedDependencies[le]=!0},dispose:function(le){de._disposeHandlers.push(le)},addDisposeHandler:function(le){de._disposeHandlers.push(le)},removeDisposeHandler:function(le){var be=de._disposeHandlers.indexOf(le);be>=0&&de._disposeHandlers.splice(be,1)},invalidate:function(){switch(this._selfInvalidated=!0,k){case"idle":m=[],Object.keys(d.hmrI).forEach((function(le){d.hmrI[le](oe,m)})),I("ready");break;case"ready":Object.keys(d.hmrI).forEach((function(le){d.hmrI[le](oe,m)}));break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(oe)}},check:G,apply:K,status:function(le){if(!le)return k;A.push(le)},addStatusHandler:function(le){A.push(le)},removeStatusHandler:function(le){var be=A.indexOf(le);be>=0&&A.splice(be,1)},data:b[oe]},p=void 0,de),je.parents=j,je.children=[],j=[],ee.require=ve})),d.hmrC={},d.hmrI={}})(),d.p="",(()=>{var p,m,g,b,S,j=d.hmrS_jsonp=d.hmrS_jsonp||{792:0},A={};function k(M,I){return p=I,new Promise(((q,G)=>{A[M]=q;var K=d.p+d.hu(M),X=new Error;d.l(K,(L=>{if(A[M]){A[M]=void 0;var ee=L&&(L.type==="load"?"missing":L.type),oe=L&&L.target&&L.target.src;X.message="Loading hot update chunk "+M+` failed.
|
||
(`+ee+": "+oe+")",X.name="ChunkLoadError",X.type=ee,X.request=oe,G(X)}}))}))}function T(M){function I(re){for(var ue=[re],_e={},fe=ue.map((function(tt){return{chain:[tt],id:tt}}));fe.length>0;){var He=fe.pop(),Oe=He.id,ke=He.chain,Ve=d.c[Oe];if(Ve&&(!Ve.hot._selfAccepted||Ve.hot._selfInvalidated)){if(Ve.hot._selfDeclined)return{type:"self-declined",chain:ke,moduleId:Oe};if(Ve.hot._main)return{type:"unaccepted",chain:ke,moduleId:Oe};for(var ie=0;ie<Ve.parents.length;ie++){var De=Ve.parents[ie],Le=d.c[De];if(Le){if(Le.hot._declinedDependencies[Oe])return{type:"declined",chain:ke.concat([De]),moduleId:Oe,parentId:De};ue.indexOf(De)===-1&&(Le.hot._acceptedDependencies[Oe]?(_e[De]||(_e[De]=[]),q(_e[De],[Oe])):(delete _e[De],ue.push(De),fe.push({chain:ke.concat([De]),id:De})))}}}}return{type:"accepted",moduleId:re,outdatedModules:ue,outdatedDependencies:_e}}function q(re,ue){for(var _e=0;_e<ue.length;_e++){var fe=ue[_e];re.indexOf(fe)===-1&&re.push(fe)}}d.f&&delete d.f.jsonpHmr,m=void 0;var G={},K=[],X={},L=function(re){console.warn("[HMR] unexpected require("+re.id+") to disposed module")};for(var ee in g)if(d.o(g,ee)){var oe=g[ee],Q=oe?I(ee):{type:"disposed",moduleId:ee},ne=!1,de=!1,je=!1,ve="";switch(Q.chain&&(ve=`
|
||
Update propagation: `+Q.chain.join(" -> ")),Q.type){case"self-declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(ne=new Error("Aborted because of self decline: "+Q.moduleId+ve));break;case"declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(ne=new Error("Aborted because of declined dependency: "+Q.moduleId+" in "+Q.parentId+ve));break;case"unaccepted":M.onUnaccepted&&M.onUnaccepted(Q),M.ignoreUnaccepted||(ne=new Error("Aborted because "+ee+" is not accepted"+ve));break;case"accepted":M.onAccepted&&M.onAccepted(Q),de=!0;break;case"disposed":M.onDisposed&&M.onDisposed(Q),je=!0;break;default:throw new Error("Unexception type "+Q.type)}if(ne)return{error:ne};if(de)for(ee in X[ee]=oe,q(K,Q.outdatedModules),Q.outdatedDependencies)d.o(Q.outdatedDependencies,ee)&&(G[ee]||(G[ee]=[]),q(G[ee],Q.outdatedDependencies[ee]));je&&(q(K,[Q.moduleId]),X[ee]=L)}g=void 0;for(var le,be=[],Ce=0;Ce<K.length;Ce++){var Ke=K[Ce],ce=d.c[Ke];ce&&(ce.hot._selfAccepted||ce.hot._main)&&X[Ke]!==L&&!ce.hot._selfInvalidated&&be.push({module:Ke,require:ce.hot._requireSelf,errorHandler:ce.hot._selfAccepted})}return{dispose:function(){var re;b.forEach((function(De){delete j[De]})),b=void 0;for(var ue,_e=K.slice();_e.length>0;){var fe=_e.pop(),He=d.c[fe];if(He){var Oe={},ke=He.hot._disposeHandlers;for(Ce=0;Ce<ke.length;Ce++)ke[Ce].call(null,Oe);for(d.hmrD[fe]=Oe,He.hot.active=!1,delete d.c[fe],delete G[fe],Ce=0;Ce<He.children.length;Ce++){var Ve=d.c[He.children[Ce]];Ve&&(re=Ve.parents.indexOf(fe))>=0&&Ve.parents.splice(re,1)}}}for(var ie in G)if(d.o(G,ie)&&(He=d.c[ie]))for(le=G[ie],Ce=0;Ce<le.length;Ce++)ue=le[Ce],(re=He.children.indexOf(ue))>=0&&He.children.splice(re,1)},apply:function(re){for(var ue in X)d.o(X,ue)&&(d.m[ue]=X[ue]);for(var _e=0;_e<S.length;_e++)S[_e](d);for(var fe in G)if(d.o(G,fe)){var He=d.c[fe];if(He){le=G[fe];for(var Oe=[],ke=[],Ve=[],ie=0;ie<le.length;ie++){var De=le[ie],Le=He.hot._acceptedDependencies[De],tt=He.hot._acceptedErrorHandlers[De];if(Le){if(Oe.indexOf(Le)!==-1)continue;Oe.push(Le),ke.push(tt),Ve.push(De)}}for(var yt=0;yt<Oe.length;yt++)try{Oe[yt].call(null,le)}catch(Jt){if(typeof ke[yt]=="function")try{ke[yt](Jt,{moduleId:fe,dependencyId:Ve[yt]})}catch(ze){M.onErrored&&M.onErrored({type:"accept-error-handler-errored",moduleId:fe,dependencyId:Ve[yt],error:ze,originalError:Jt}),M.ignoreErrored||(re(ze),re(Jt))}else M.onErrored&&M.onErrored({type:"accept-errored",moduleId:fe,dependencyId:Ve[yt],error:Jt}),M.ignoreErrored||re(Jt)}}}for(var Ot=0;Ot<be.length;Ot++){var Ft=be[Ot],kt=Ft.module;try{Ft.require(kt)}catch(Jt){if(typeof Ft.errorHandler=="function")try{Ft.errorHandler(Jt,{moduleId:kt,module:d.c[kt]})}catch(ze){M.onErrored&&M.onErrored({type:"self-accept-error-handler-errored",moduleId:kt,error:ze,originalError:Jt}),M.ignoreErrored||(re(ze),re(Jt))}else M.onErrored&&M.onErrored({type:"self-accept-errored",moduleId:kt,error:Jt}),M.ignoreErrored||re(Jt)}}return K}}}self.webpackHotUpdaterapidoc=(M,I,q)=>{for(var G in I)d.o(I,G)&&(g[G]=I[G],p&&p.push(G));q&&S.push(q),A[M]&&(A[M](),A[M]=void 0)},d.hmrI.jsonp=function(M,I){g||(g={},S=[],b=[],I.push(T)),d.o(g,M)||(g[M]=d.m[M])},d.hmrC.jsonp=function(M,I,q,G,K,X){K.push(T),m={},b=I,g=q.reduce((function(L,ee){return L[ee]=!1,L}),{}),S=[],M.forEach((function(L){d.o(j,L)&&j[L]!==void 0?(G.push(k(L,X)),m[L]=!0):m[L]=!1})),d.f&&(d.f.jsonpHmr=function(L,ee){m&&d.o(m,L)&&!m[L]&&(ee.push(k(L)),m[L]=!0)})},d.hmrM=()=>{if(typeof fetch>"u")throw new Error("No browser support: need fetch API");return fetch(d.p+d.hmrF()).then((M=>{if(M.status!==404){if(!M.ok)throw new Error("Failed to fetch update manifest "+M.statusText);return M.json()}}))}})(),d(557)})()),D3}zbe();const Fbe=()=>{const e=R.useRef(null),{theme:r,systemTheme:s,setTheme:o}=N_(),[d,p]=R.useState(""),[m,g]=R.useState("auto");R.useEffect(()=>{(()=>{const A=localStorage.getItem("autoglue.org");A&&p(A)})()},[]),R.useEffect(()=>{const j=e.current;if(!j)return;let A="light";if(m==="light"?A="light":m==="dark"?A="dark":A=(r==="system"?s:r)==="dark"?"dark":"light",j.setAttribute("theme",A),typeof window<"u"){const k=`${window.location.origin}/api/v1`;j.setAttribute("default-api-server",k)}d?(j.setAttribute("api-key-name","X-ORG-ID"),j.setAttribute("api-key-location","header"),j.setAttribute("api-key-value",d)):j.removeAttribute("api-key-value")},[r,s,m,d]);const b=()=>{const j=d.trim();localStorage.setItem("autoglue.org",j);const A=e.current;A&&(j?A.setAttribute("api-key-value",j):A.removeAttribute("api-key-value"))},S=()=>{localStorage.removeItem("autoglue.org"),p("");const j=e.current;j&&j.removeAttribute("api-key-value")};return u.jsxs("div",{className:"flex h-[100svh] flex-col",children:[u.jsxs(ha,{className:"rounded-none border-b",children:[u.jsx(sl,{className:"py-3",children:u.jsxs(il,{className:"flex flex-wrap items-center justify-between gap-4 text-base",children:[u.jsx("span",{children:"AutoGlue API Docs"}),u.jsx("div",{className:"flex items-center gap-2 text-xs",children:u.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Docs theme"}),u.jsxs(Rn,{value:m,onValueChange:j=>{const A=j;g(A),o(A==="auto"?"system":j)},children:[u.jsx(_n,{className:"h-8 w-[120px]",children:u.jsx(Tn,{})}),u.jsxs($n,{children:[u.jsx(jt,{value:"auto",children:"Auto (match app)"}),u.jsx(jt,{value:"light",children:"Light"}),u.jsx(jt,{value:"dark",children:"Dark"})]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-muted-foreground",children:"Org ID (X-ORG-ID)"}),u.jsx(gt,{className:"h-8 w-80",value:d,onChange:j=>p(j.target.value),placeholder:"org_..."}),u.jsx(Fe,{size:"sm",onClick:b,children:"Save"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:S,children:"Reset"})]})]})})]})}),u.jsxs(ao,{className:"text-muted-foreground py-0 pb-2 text-xs",children:["Requests from ",u.jsx("code",{children:"<rapi-doc>"})," will include:",u.jsx("code",{className:"ml-1",children:"Cookie: ag_jwt=…"})," and"," ",u.jsxs("code",{className:"ml-1",children:["X-ORG-ID=",d]}),!d&&u.jsx(u.Fragment,{children:" (set an Org ID above to send an X-ORG-ID header)"})]})]}),u.jsx("rapi-doc",{ref:e,id:"autoglue-docs","spec-url":"/swagger/openapi.json","render-style":"read","show-header":"false","persist-auth":"true","allow-advanced-search":"true","schema-description-expanded":"true","allow-schema-description-expand-toggle":"false","allow-spec-file-download":"true","allow-spec-file-load":"false","allow-spec-url-load":"false","allow-try":"true","schema-style":"tree","fetch-credentials":"include"})]})},db=rte(),hb={listJobs:(e={})=>ut(async()=>await db.adminListArcherJobs(e)),enqueue:e=>ut(async()=>await db.adminEnqueueArcherJob({dtoEnqueueRequest:e})),retryJob:e=>ut(async()=>await db.adminRetryArcherJob({id:e})),cancelJob:e=>ut(async()=>await db.adminCancelArcherJob({id:e})),listQueues:()=>ut(async()=>await db.adminListArcherQueues())},qbe=[Ra.queued,Ra.running,Ra.succeeded,Ra.failed,Ra.canceled,Ra.retrying,Ra.scheduled],Bbe={queued:"bg-amber-100 text-amber-800",running:"bg-sky-100 text-sky-800",succeeded:"bg-emerald-100 text-emerald-800",failed:"bg-red-100 text-red-800",canceled:"bg-zinc-200 text-zinc-700",retrying:"bg-orange-100 text-orange-800",scheduled:"bg-violet-100 text-violet-800"};function M3(e){if(!e)return"—";const r=new Date(e);return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(r)}function Ube(e,r=300){const[s,o]=R.useState(e);return R.useEffect(()=>{const d=setTimeout(()=>o(e),r);return()=>clearTimeout(d)},[e,r]),s}const Kbe=()=>{const e=Hs(),[r,s]=R.useState(""),[o,d]=R.useState(""),[p,m]=R.useState(""),g=Ube(p,300),[b,S]=R.useState(1),[j,A]=R.useState(25),T=rr({queryKey:["archer","jobs",{status:r,queue:o,q:g,page:b,pageSize:j}],queryFn:()=>hb.listJobs({status:r||void 0,queue:o||void 0,q:g||void 0,page:b,pageSize:j}),placeholderData:Q=>Q,staleTime:1e4}),M=rr({queryKey:["archer","queues"],queryFn:()=>hb.listQueues(),staleTime:3e4}),I=nn({mutationFn:Q=>hb.enqueue(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),q=nn({mutationFn:Q=>hb.retryJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),G=nn({mutationFn:Q=>hb.cancelJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),K=T.isFetching,X=T.data,L=X?.items??[],ee=X?.total??0,oe=Math.max(1,Math.ceil(ee/j));return u.jsxs("div",{className:"container mx-auto space-y-6 p-6",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-semibold",children:"Archer Jobs"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Inspect, enqueue, retry and cancel background jobs."})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Hbe,{onSubmit:Q=>I.mutateAsync(Q),submitting:I.isPending}),u.jsxs(Fe,{variant:"secondary",onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),disabled:K,children:[K?u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(vW,{className:"mr-2 h-4 w-4"}),"Refresh"]})]})]}),u.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:M.data?.map(Q=>u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-base",children:Q.name})}),u.jsxs(ao,{className:"grid grid-cols-2 gap-2 text-sm",children:[u.jsx(uj,{label:"Pending",value:Q.pending??0}),u.jsx(uj,{label:"Running",value:Q.running??0}),u.jsx(uj,{label:"Failed",value:Q.failed??0}),u.jsx(uj,{label:"Scheduled",value:Q.scheduled??0})]})]},Q.name))}),u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Filters"})}),u.jsxs(ao,{className:"grid gap-3 md:grid-cols-4",children:[u.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[u.jsx(gt,{placeholder:"Search id, queue, error, payload…",value:p,onChange:Q=>{m(Q.target.value),S(1)},onKeyDown:Q=>Q.key==="Enter"&&e.invalidateQueries({queryKey:["archer","jobs"]})}),p&&u.jsx(Fe,{variant:"ghost",size:"icon",onClick:()=>m(""),children:u.jsx(q_,{className:"h-4 w-4"})}),u.jsxs(Fe,{onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),children:[u.jsx(Pa,{className:"mr-2 h-4 w-4"})," Search"]})]}),u.jsxs(Rn,{value:r||"all",onValueChange:Q=>{s(Q==="all"?"":Q),S(1)},children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"All statuses"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All statuses"}),qbe.map(Q=>u.jsx(jt,{value:Q,children:Q},Q))]})]}),u.jsx(gt,{placeholder:"Queue (optional)",value:o,onChange:Q=>{d(Q.target.value),S(1)}}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(xi,{className:"whitespace-nowrap",children:"Page size"}),u.jsxs(Rn,{value:String(j),onValueChange:Q=>{A(Number(Q)),S(1)},children:[u.jsx(_n,{className:"w-[120px]",children:u.jsx(Tn,{})}),u.jsx($n,{children:[10,25,50,100].map(Q=>u.jsx(jt,{value:String(Q),children:Q},Q))})]})]})]})]}),u.jsx(ha,{children:u.jsxs(ao,{className:"p-0",children:[u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"ID"}),u.jsx(At,{children:"Queue"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Attempts"}),u.jsx(At,{children:"Run At"}),u.jsx(At,{children:"Updated"}),u.jsx(At,{className:"pr-4 text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[T.isLoading&&u.jsx(an,{children:u.jsx(xt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"Loading…"})}),T.isError&&u.jsx(an,{children:u.jsx(xt,{colSpan:7,className:"py-8 text-center text-red-600",children:"Failed to load jobs"})}),!T.isLoading&&L.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"No jobs match your filters."})}),L.map(Q=>{const ne=Q.status??Ra.queued;return u.jsxs(an,{children:[u.jsx(xt,{children:u.jsx("code",{className:"text-xs",children:Q.id})}),u.jsx(xt,{children:u.jsx(ns,{variant:"secondary",children:Q.queue})}),u.jsx(xt,{children:u.jsx("span",{className:ft("rounded-md px-2 py-0.5 text-xs",Bbe[ne]),children:ne})}),u.jsx(xt,{children:Q.max_attempts?`${Q.attempts}/${Q.max_attempts}`:Q.attempts}),u.jsx(xt,{children:M3(Q.run_at)}),u.jsx(xt,{children:M3(Q.updated_at??Q.created_at)}),u.jsx(xt,{className:"text-right",children:u.jsxs("div",{className:"flex justify-end gap-2",children:[(ne===Ra.failed||ne===Ra.canceled)&&u.jsx(Fe,{size:"sm",variant:"outline",disabled:q.isPending||!Q.id,onClick:()=>{Q.id&&q.mutate(Q.id)},children:"Retry"}),(ne===Ra.queued||ne===Ra.running||ne===Ra.scheduled)&&u.jsx(Fe,{size:"sm",variant:"outline",disabled:G.isPending||!Q.id,onClick:()=>{Q.id&&G.mutate(Q.id)},children:"Cancel"}),u.jsx(Vbe,{job:Q})]})})]},Q.id)})]})]}),u.jsxs("div",{className:"flex items-center justify-between border-t p-3 text-sm",children:[u.jsxs("div",{children:["Page ",b," of ",oe," • ",ee," total"]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{variant:"outline",disabled:b<=1||T.isFetching,onClick:()=>S(Q=>Math.max(1,Q-1)),children:"Prev"}),u.jsx(Fe,{variant:"outline",disabled:b>=oe||T.isFetching,onClick:()=>S(Q=>Q+1),children:"Next"})]})]})]})})]})};function uj({label:e,value:r}){return u.jsxs("div",{className:"bg-muted/30 rounded-lg border p-3",children:[u.jsx("div",{className:"text-muted-foreground text-xs",children:e}),u.jsx("div",{className:"text-lg font-semibold",children:r})]})}function Vbe({job:e}){return u.jsxs(fn,{children:[u.jsx(zi,{asChild:!0,children:u.jsx(Fe,{size:"sm",variant:"ghost",children:"Details"})}),u.jsxs(mn,{className:"max-w-2xl",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Job ",e.id]})}),u.jsxs("div",{className:"grid gap-3",children:[e.last_error&&u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-sm",children:"Last error"})}),u.jsx(ao,{children:u.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:e.last_error})})]}),u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{className:"text-sm",children:"Payload"})}),u.jsx(ao,{children:u.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:JSON.stringify(e.payload,null,2)})})]})]}),u.jsx(Sn,{children:u.jsx(Bj,{asChild:!0,children:u.jsx(Fe,{variant:"secondary",children:"Close"})})})]})]})}function Hbe({onSubmit:e,submitting:r}){const[s,o]=R.useState(!1),[d,p]=R.useState(""),[m,g]=R.useState(""),[b,S]=R.useState("{}"),[j,A]=R.useState(""),k=d&&m&&!r;async function T(){const M=b?JSON.parse(b):void 0;await e({queue:d,type:m,payload:M,run_at:j||void 0}),o(!1),p(""),g(""),S("{}"),A("")}return u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{children:[u.jsx(oo,{className:"mr-2 h-4 w-4"})," Enqueue"]})}),u.jsxs(mn,{children:[u.jsx(gn,{children:u.jsx(yn,{children:"Enqueue Job"})}),u.jsxs("div",{className:"grid gap-3",children:[u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Queue"}),u.jsx(gt,{value:d,onChange:M=>p(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Type"}),u.jsx(gt,{value:m,onChange:M=>g(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Payload (JSON)"}),u.jsx(hu,{value:b,onChange:M=>S(M.target.value),className:"min-h-[120px] font-mono text-xs"})]}),u.jsxs("div",{className:"grid gap-2",children:[u.jsx(xi,{children:"Run at (optional)"}),u.jsx(gt,{type:"datetime-local",value:j,onChange:M=>A(M.target.value)})]})]}),u.jsxs(Sn,{children:[u.jsx(Bj,{asChild:!0,children:u.jsx(Fe,{variant:"secondary",children:"Cancel"})}),u.jsxs(Fe,{onClick:T,disabled:!k,children:[r?u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Enqueue"]})]})]})]})}const pb=tte(),kb={listLabels:()=>ut(async()=>await pb.listLabels()),createLabel:e=>ut(async()=>await pb.createLabel({dtoCreateLabelRequest:e})),getLabel:e=>ut(async()=>await pb.getLabel({id:e})),deleteLabel:e=>ut(async()=>{await pb.deleteLabel({id:e})}),updateLabel:(e,r)=>ut(async()=>await pb.updateLabel({id:e,dtoUpdateLabelRequest:r}))},uB=Xs({key:Nn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Nn().trim().optional()}),Gbe=uB.partial();function Xbe({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return u.jsxs(ns,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(mC,{className:"mr-1 h-3 w-3"}),r]})}const Ybe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),j=Hs(),A=rr({queryKey:["labels"],queryFn:()=>kb.listLabels()}),k=mr({resolver:gr(uB),defaultValues:{key:"",value:""}}),T=nn({mutationFn:L=>kb.createLabel(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["labels"]}),k.reset(),o(!1),Ze.success("Label Created Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while creating Label")}}),M=L=>{T.mutate(L)},I=mr({resolver:gr(Gbe),defaultValues:{}}),q=nn({mutationFn:({id:L,values:ee})=>kb.updateLabel(L,ee),onSuccess:async()=>{await j.invalidateQueries({queryKey:["labels"]}),I.reset(),p(!1),Ze.success("Label Updated Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while updating Label")}}),G=L=>{S(L.id),I.reset({key:L.key,value:L.value}),p(!0)},K=nn({mutationFn:L=>kb.deleteLabel(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["labels"]}),g(null),Ze.success("Label Deleted Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while deleting Label")}}),X=R.useMemo(()=>{const L=A.data??[],ee=e.trim().toLowerCase();return ee?L.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)):L},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading labels…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading labels."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Labels"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:L=>r(L.target.value),placeholder:"Search labels",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Label"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Label"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(pt,{control:k.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"environment",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dev",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Key"}),u.jsx(At,{children:"Value"}),u.jsx(At,{children:"Label"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(L=>u.jsxs(an,{children:[u.jsx(xt,{children:L.key}),u.jsx(xt,{children:L.value}),u.jsx(xt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Xbe,{t:L}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(L.id,6)})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(L),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(L.id),disabled:K.isPending&&m===L.id,children:K.isPending&&m===L.id?"Deleting…":"Delete"})]})})]},L.id)),X.length===0&&u.jsx(an,{children:u.jsxs(xt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[u.jsx(Jb,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Label"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(L=>{b&&q.mutate({id:b,values:L})}),children:[u.jsx(pt,{control:I.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dedicated",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"gpu",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:L=>!L&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete label"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this label?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})},dB=Xs({name:Nn().trim().min(1,"Name is required").max(120,"Max 120 chars"),kind:Da(["glueops","public"]).default("public"),public_ip_address:Nn().trim().min(1,"Public IP/hostname is required").max(255,"Max 255 chars"),private_ip_address:Nn().trim().min(1,"Private IP/hostname is required").max(255,"Max 255 chars")}),Zbe=dB.partial();function Wbe({lb:e}){return u.jsxs(ns,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(uW,{className:"mr-1 h-3 w-3"}),e.name," · ",e.kind," · ",e.public_ip_address," → ",e.private_ip_address]})}const Jbe=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),j=Hs(),A=rr({queryKey:["loadBalancers"],queryFn:()=>jb.listLoadBalancers()}),k=mr({resolver:gr(dB),defaultValues:{name:"",kind:"public",public_ip_address:"",private_ip_address:""}}),T=nn({mutationFn:L=>jb.createLoadBalancer(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["loadBalancers"]}),k.reset(),o(!1),Ze.success("Load balancer created successfully.")},onError:L=>{Ze.error(L?.message??"There was an error while creating the load balancer")}}),M=L=>{T.mutate(L)},I=mr({resolver:gr(Zbe),defaultValues:{}}),q=nn({mutationFn:({id:L,values:ee})=>jb.updateLoadBalancer(L,ee),onSuccess:async()=>{await j.invalidateQueries({queryKey:["loadBalancers"]}),I.reset(),p(!1),Ze.success("Load balancer updated successfully.")},onError:L=>{Ze.error(L?.message??"There was an error while updating the load balancer")}}),G=L=>{S(L.id),I.reset({name:L.name??"",kind:L.kind??"public",public_ip_address:L.public_ip_address??"",private_ip_address:L.private_ip_address??""}),p(!0)},K=nn({mutationFn:L=>jb.deleteLoadBalancer(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["loadBalancers"]}),g(null),Ze.success("Load balancer deleted successfully.")},onError:L=>{Ze.error(L?.message??"There was an error while deleting the load balancer")}}),X=R.useMemo(()=>{const L=A.data??[],ee=e.trim().toLowerCase();return ee?L.filter(oe=>oe.name?.toLowerCase().includes(ee)||oe.kind?.toLowerCase().includes(ee)||oe.public_ip_address?.toLowerCase().includes(ee)||oe.private_ip_address?.toLowerCase().includes(ee)):L},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading load balancers…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading load balancers."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Load Balancers"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:L=>r(L.target.value),placeholder:"Search load balancers",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Load Balancer"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Load Balancer"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(pt,{control:k.control,name:"name",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"apps-lb-01",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"kind",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Kind"}),u.jsx(wt,{children:u.jsxs(Rn,{onValueChange:L.onChange,value:L.value??"public",children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select kind"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"public",children:"Public"}),u.jsx(jt,{value:"glueops",children:"GlueOps"})]})]})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"public_ip_address",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Public IP"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"1.2.3.4",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"private_ip_address",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Private IP"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"10.0.30.10",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:T.isPending,children:T.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Kind"}),u.jsx(At,{children:"Public IP / Hostname"}),u.jsx(At,{children:"Private IP / Hostname"}),u.jsx(At,{children:"Summary"}),u.jsx(At,{className:"w-[220px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(L=>u.jsxs(an,{children:[u.jsx(xt,{children:L.name}),u.jsx(xt,{children:L.kind}),u.jsx(xt,{children:L.public_ip_address}),u.jsx(xt,{children:L.private_ip_address}),u.jsx(xt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Wbe,{lb:L}),L.id&&u.jsx("code",{className:"text-muted-foreground text-xs",children:el(L.id,6)})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(L),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(L.id),disabled:K.isPending&&m===L.id,children:K.isPending&&m===L.id?"Deleting…":"Delete"})]})})]},L.id)),X.length===0&&u.jsx(an,{children:u.jsxs(xt,{colSpan:6,className:"text-muted-foreground py-10 text-center",children:[u.jsx(Jb,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No load balancers match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Load Balancer"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(L=>{b&&q.mutate({id:b,values:L})}),children:[u.jsx(pt,{control:I.control,name:"name",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"apps-lb-01",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"kind",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Kind"}),u.jsx(wt,{children:u.jsxs(Rn,{onValueChange:L.onChange,value:L.value??"public",children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select kind"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"public",children:"Public"}),u.jsx(jt,{value:"glueops",children:"GlueOps"})]})]})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"public_ip_address",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Public IP / Hostname"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"1.2.3.4 or apps.example.com",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"private_ip_address",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Private IP / Hostname"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"10.0.30.10",...L})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:L=>!L&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete load balancer"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this load balancer?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})};function Qbe(e,r="gsot-auth",s=520,o=640){const d=window.top.outerHeight/2+window.top.screenY-o/2,p=window.top.outerWidth/2+window.top.screenX-s/2;return window.open(e,r,`toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${s},height=${o},top=${d},left=${p}`)}async function ewe(e){const r=new URLSearchParams({mode:"spa",origin:window.location.origin}),s=await fetch(`${B_}/auth/${e}/start?`+r,{method:"POST"});if(!s.ok)throw new Error("Failed to start auth");return(await s.json()).auth_url}const I3=()=>{const e=mY(),r=__(),s=R.useMemo(()=>{const d=new URLSearchParams(r.search).get("to")||"/me";try{const p=new URL(d,window.location.origin);return p.origin===window.location.origin?p.pathname+p.search:"/me"}catch{return"/me"}},[r.search]);R.useEffect(()=>{Ks.get()?.access_token&&e(s,{replace:!0})},[e,s]),R.useEffect(()=>{const d=p=>{if(!(typeof p.data=="object"&&p.data?.type==="autoglue:auth"))return;const g=p.data.payload;Ks.set(g),e(s,{replace:!0})};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[e,s]);const o=async d=>{const p=await ewe(d);Qbe(p)||alert("Please allow popups to sign in.")};return u.jsx("div",{className:"mx-auto flex items-center justify-center p-4",children:u.jsxs(ha,{className:"w-full max-w-md",children:[u.jsxs(sl,{children:[u.jsx(il,{className:"text-lg md:text-xl",children:"Sign In"}),u.jsx(C_,{className:"text-xs md:text-sm",children:"Continue with a provider below to access your account."})]}),u.jsx(ao,{children:u.jsx("div",{className:"grid gap-4",children:u.jsx("div",{className:ft("flex w-full items-center gap-2","flex-col justify-between"),children:u.jsxs(Fe,{variant:"outline",className:"w-full gap-2",onClick:()=>o("google"),children:[u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.98em",height:"1em",viewBox:"0 0 256 262","aria-hidden":"true",focusable:"false",children:[u.jsx("path",{fill:"#4285F4",d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"}),u.jsx("path",{fill:"#34A853",d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"}),u.jsx("path",{fill:"#FBBC05",d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"}),u.jsx("path",{fill:"#EB4335",d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"})]}),"Sign in with Google"]})})})})]})})},twe=gC(),nwe={create:e=>ut(async()=>twe.createOrg({handlersOrgCreateReq:e}))},rwe=Xs({display_name:Nn().min(2,"Too short").max(100,"Too long")}),swe=Xs({name:Nn().min(2,"Too short").max(100,"Too long"),expires_in_hours:Xb().min(1).max(43800)}),iwe=Xs({name:Nn().min(2,"Too short").max(100,"Too long"),domain:Nn().trim().toLowerCase().optional().or(Yb("")).refine(e=>!e||/^[a-z0-9.-]+\.[a-z]{2,}$/i.test(e),"Invalid domain (e.g. example.com)")}),awe=()=>{const e=Hs(),r=rr({queryKey:["me"],queryFn:()=>yp.getMe()}),s=mr({resolver:gr(rwe),defaultValues:{display_name:""},values:r.data?{display_name:r.data.display_name??""}:void 0}),o=nn({mutationFn:X=>yp.updateMe(X),onSuccess:()=>{e.invalidateQueries({queryKey:["me"]}),Ze.success("Profile updated")},onError:X=>Ze.error(X?.message??"Update failed")}),d=rr({queryKey:["me","api-keys"],queryFn:()=>yp.listKeys()}),[p,m]=R.useState(!1),[g,b]=R.useState(null),S=mr({resolver:gr(swe),defaultValues:{name:"",expires_in_hours:720}}),j=nn({mutationFn:X=>yp.createKey({name:X.name,expires_in_hours:X.expires_in_hours}),onSuccess:X=>{b(X),m(!1),e.invalidateQueries({queryKey:["me","api-keys"]}),Ze.success("API key created")},onError:X=>Ze.error(X?.message??"Failed to create key")}),[A,k]=R.useState(null),T=nn({mutationFn:X=>yp.deleteKey(X),onSuccess:()=>{e.invalidateQueries({queryKey:["me","api-keys"]}),k(null),Ze.success("Key deleted")},onError:X=>Ze.error(X?.message??"Failed to delete key")}),M=R.useMemo(()=>r.data?.emails?.find(X=>X.is_primary)?.email??r.data?.primary_email??"",[r.data]),[I,q]=R.useState(!1),G=mr({resolver:gr(iwe),defaultValues:{name:"",domain:""}}),K=nn({mutationFn:X=>nwe.create({name:X.name.trim(),domain:X.domain?.trim()?X.domain.trim().toLowerCase():void 0}),onSuccess:()=>{q(!1),G.reset(),e.invalidateQueries({queryKey:["me"]}),Ze.success("Organization created")},onError:X=>Ze.error(X?.message??"Failed to create organization")});return r.isLoading?u.jsx("div",{className:"p-6",children:"Loading…"}):r.error?u.jsx("div",{className:"text-destructive p-6",children:"Failed to load profile"}):u.jsxs("div",{className:"space-y-6 p-6",children:[u.jsxs(ha,{children:[u.jsxs(sl,{children:[u.jsx(il,{children:"Profile"}),u.jsx(C_,{children:"Manage your personal information."})]}),u.jsx(ao,{children:u.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx(xi,{children:"Email"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:M||"—"})]}),u.jsxs("div",{children:[u.jsx(xi,{children:"ID"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:r.data?.id||"—"}),u.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:"Share this ID with the organization owner of the Organization to join"})]}),u.jsx(yr,{...s,children:u.jsxs("form",{className:"space-y-4",onSubmit:s.handleSubmit(X=>o.mutate(X)),children:[u.jsx(pt,{control:s.control,name:"display_name",render:({field:X})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Display name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"Your name",...X})}),u.jsx(dt,{})]})}),u.jsx(Fe,{type:"submit",disabled:o.isPending,children:"Save"})]})})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(xi,{children:"Organizations"}),u.jsxs(fn,{open:I,onOpenChange:q,children:[u.jsx(zi,{asChild:!0,children:u.jsx(Fe,{size:"sm",children:"New Organization"})}),u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Create organization"}),u.jsx(GR,{children:"Give it a name, and optionally assign your company domain."})]}),u.jsx(yr,{...G,children:u.jsxs("form",{className:"space-y-4",onSubmit:G.handleSubmit(X=>K.mutate(X)),children:[u.jsx(pt,{control:G.control,name:"name",render:({field:X})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"Acme Inc.",...X})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:G.control,name:"domain",render:({field:X})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Domain (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"acme.com",...X})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{children:[u.jsx(Bj,{asChild:!0,children:u.jsx(Fe,{type:"button",variant:"outline",children:"Cancel"})}),u.jsx(Fe,{type:"submit",disabled:K.isPending,children:"Create"})]})]})})]})]})]}),u.jsx("div",{className:"rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Domain"})]})}),u.jsxs(Bi,{children:[r.data?.organizations?.map(X=>u.jsxs(an,{children:[u.jsx(xt,{children:X.name}),u.jsx(xt,{children:X.domain??"—"})]},X.id)),(!r.data?.organizations||r.data.organizations.length===0)&&u.jsx(an,{children:u.jsx(xt,{colSpan:2,className:"text-muted-foreground",children:"No organizations"})})]})]})})]})]})})]}),u.jsx(bb,{}),u.jsxs(ha,{children:[u.jsxs(sl,{className:"flex flex-row items-center justify-between space-y-0",children:[u.jsxs("div",{children:[u.jsx(il,{children:"User API Keys"}),u.jsx(C_,{children:"Personal keys for API access."})]}),u.jsxs(fn,{open:p,onOpenChange:m,children:[u.jsx(zi,{asChild:!0,children:u.jsx(Fe,{children:"New Key"})}),u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Create API Key"}),u.jsx(GR,{children:"Give it a label and expiry."})]}),u.jsx(yr,{...S,children:u.jsxs("form",{className:"space-y-4",onSubmit:S.handleSubmit(X=>j.mutate(X)),children:[u.jsx(pt,{control:S.control,name:"name",render:({field:X})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Label"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"CI script, local dev, ...",...X})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:S.control,name:"expires_in_hours",render:({field:X})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Expires in hours"}),u.jsx(wt,{children:u.jsx(gt,{type:"number",inputMode:"numeric",step:1,min:1,placeholder:"e.g. 720",...X,onChange:L=>X.onChange(L.target.value===""?"":Number(L.target.value))})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{children:[u.jsx(Bj,{asChild:!0,children:u.jsx(Fe,{type:"button",variant:"outline",children:"Cancel"})}),u.jsx(Fe,{type:"submit",disabled:j.isPending,children:"Create"})]})]})})]})]})]}),u.jsx(ao,{children:u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{className:"text-sm",children:[u.jsx(fye,{children:"Your user-scoped API keys."}),u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Label"}),u.jsx(At,{children:"Created"}),u.jsx(At,{children:"Expires"}),u.jsx(At,{children:"Last used"}),u.jsx(At,{className:"w-24"})]})}),u.jsxs(Bi,{children:[d.data?.map(X=>u.jsxs(an,{children:[u.jsx(xt,{children:X.name??"—"}),u.jsx(xt,{children:new Date(X.created_at).toLocaleString()}),u.jsx(xt,{children:X.expires_at?new Date(X.expires_at).toLocaleString():"—"}),u.jsx(xt,{children:X.last_used_at?new Date(X.last_used_at).toLocaleString():"—"}),u.jsx(xt,{className:"text-right",children:u.jsxs(nC,{open:A===X.id,onOpenChange:L=>!L&&k(null),children:[u.jsx(rC,{asChild:!0,children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>k(X.id),children:"Delete"})}),u.jsxs(sC,{children:[u.jsxs(iC,{children:[u.jsx(oC,{children:"Delete this key?"}),u.jsx(lC,{children:"This action cannot be undone. Requests using this key will stop working."})]}),u.jsxs(aC,{children:[u.jsx(uC,{children:"Cancel"}),u.jsx(cC,{onClick:()=>T.mutate(X.id),children:"Delete"})]})]})]})})]},X.id)),(!d.data||d.data.length===0)&&u.jsx(an,{children:u.jsx(xt,{colSpan:5,className:"text-muted-foreground",children:"No API keys yet."})})]})]})})})]}),u.jsx(fn,{open:!!g,onOpenChange:X=>!X&&b(null),children:u.jsxs(mn,{children:[u.jsxs(gn,{children:[u.jsx(yn,{children:"Copy your new API key"}),u.jsx(GR,{children:"This is only shown once. Store it securely."})]}),u.jsx("div",{className:"rounded-md border p-3 font-mono text-sm break-all",children:g?.plain??"—"}),u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>{const X=g?.plain;X&&(navigator.clipboard.writeText(X),Ze.success("Copied"))},children:"Copy"}),u.jsx(Fe,{onClick:()=>b(null),children:"Done"})]})]})})]})},fb=ete(),Rb={listTaints:()=>ut(async()=>await fb.listTaints()),createTaint:e=>ut(async()=>await fb.createTaint({dtoCreateTaintRequest:e})),getTaint:e=>ut(async()=>await fb.getTaint({id:e})),deleteTaint:e=>ut(async()=>{await fb.deleteTaint({id:e})}),updateTaint:(e,r)=>ut(async()=>await fb.updateTaint({id:e,dtoUpdateTaintRequest:r}))},owe=["master","worker"];function L3({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return u.jsx(ns,{variant:r,className:"capitalize",children:e||"unknown"})}function du(e,r){return(e??"").toLowerCase().includes(r)}function vT(e){const{open:r,title:s,onOpenChange:o,items:d,initialSelectedIds:p,onSave:m,columns:g,allowItem:b}=e,[S,j]=R.useState(""),[A,k]=R.useState(new Set(p)),[T,M]=R.useState(!1);R.useEffect(()=>{k(new Set(p)),j("")},[p,r]);const I=R.useMemo(()=>{const K=S.trim().toLowerCase();return d.filter(X=>b&&!b(X)?!1:K?du(X.name,K)||du(X.key,K)||du(X.value,K)||du(X.effect,K)||du(X.hostname,K)||du(X.private_ip_address,K)||du(X.public_ip_address,K)||du(X.role,K)||du(X.status,K):!0)},[d,S,b]),q=p,G=Array.from(A).some(K=>!q.has(K))||Array.from(q).some(K=>!A.has(K));return u.jsx(fn,{open:r,onOpenChange:o,children:u.jsxs(mn,{className:"sm:max-w-3xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:s})}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:S,onChange:K=>j(K.target.value),placeholder:"Search…",className:"pl-8"})]}),u.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{className:"w-[48px]"}),g.map((K,X)=>u.jsx(At,{children:K.header},X))]})}),u.jsxs(Bi,{children:[I.map(K=>{const X=K.id,L=A.has(X);return u.jsxs(an,{children:[u.jsx(xt,{className:"text-center align-middle",children:u.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:L,onChange:ee=>{const oe=new Set(A);ee.target.checked?oe.add(X):oe.delete(X),k(oe)}})}),g.map((ee,oe)=>u.jsx(xt,{children:ee.render(K)},oe))]},X)}),I.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:1+g.length,className:"text-muted-foreground py-8 text-center",children:"No items found."})})]})]})}),u.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",u.jsx("span",{className:"text-foreground font-medium",children:A.size})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:T,children:"Close"}),u.jsx(Fe,{onClick:async()=>{const K=[],X=[];for(const L of A)q.has(L)||K.push(L);for(const L of q)A.has(L)||X.push(L);try{M(!0),await m({toAttach:K,toDetach:X}),o(!1)}finally{M(!1)}},disabled:T||!G,children:T?"Saving…":"Save changes"})]})]})})}const hB=Xs({name:Nn().trim().min(1,"Name is required").max(120,"Max 120 chars"),role:Da(owe)}),lwe=hB.partial();function cwe(){const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(!1),[b,S]=R.useState(null),[j,A]=R.useState(null),[k,T]=R.useState(!1),[M,I]=R.useState(null),[q,G]=R.useState(new Set),[K,X]=R.useState(new Set),[L,ee]=R.useState(""),[oe,Q]=R.useState(!1),[ne,de]=R.useState(!1),[je,ve]=R.useState(!1),[le,be]=R.useState(null),[Ce,Ke]=R.useState(new Set),[ce,re]=R.useState(new Set),[ue,_e]=R.useState(new Set),fe=Hs(),He=rr({queryKey:["node-pools"],queryFn:()=>ka.listNodePools()}),Oe=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),ke=rr({queryKey:["annotations"],queryFn:()=>Sb.listAnnotations()}),Ve=rr({queryKey:["labels"],queryFn:()=>kb.listLabels()}),ie=rr({queryKey:["taints"],queryFn:()=>Rb.listTaints()}),De=mr({resolver:gr(hB),defaultValues:{name:"",role:"worker"}}),Le=nn({mutationFn:ze=>ka.createNodePool(ze),onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),De.reset({name:"",role:"worker"}),o(!1),Ze.success("Node pool created.")},onError:ze=>Ze.error(ze?.message??"Unable to create node pool.")}),tt=ze=>Le.mutate(ze),yt=mr({resolver:gr(lwe),defaultValues:{name:void 0,role:void 0}});R.useEffect(()=>{b?yt.reset({name:b.name,role:b.role}):yt.reset({name:void 0,role:void 0})},[b]);const Ot=nn({mutationFn:async ze=>{if(!b)return;const zt={};return ze.name!==b.name&&(zt.name=ze.name),ze.role!==b.role&&(zt.role=ze.role),await ka.updateNodePool(b.id,zt)},onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),p(!1),S(null),Ze.success("Node pool updated.")},onError:ze=>Ze.error(ze?.message??"Unable to update node pool.")}),Ft=ze=>Ot.mutate(ze),kt=nn({mutationFn:async()=>{j&&await ka.deleteNodePool(j.id)},onSuccess:async()=>{await fe.invalidateQueries({queryKey:["node-pools"]}),g(!1),A(null),Ze.success("Node pool deleted.")},onError:ze=>Ze.error(ze?.message??"Unable to delete node pool.")}),Jt=R.useMemo(()=>{const ze=He.data??[],zt=e.trim().toLowerCase();return zt?ze.filter(Rt=>Rt.name?.toLowerCase().includes(zt)||Rt.role?.toLowerCase().includes(zt)):ze},[e,He.data]);return He.isLoading?u.jsx("div",{className:"p-6",children:"Loading node pools…"}):He.error?u.jsxs("div",{className:"p-6 text-red-500",children:["Error loading node pools.",u.jsx("pre",{className:"bg-muted mt-3 rounded p-3 text-xs",children:JSON.stringify(He.error,null,2)})]}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Node Pools"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:ze=>r(ze.target.value),placeholder:"Search node pools",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Node Pool"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create Node Pool"})}),u.jsx(yr,{...De,children:u.jsxs("form",{className:"space-y-4",onSubmit:De.handleSubmit(tt),children:[u.jsx(pt,{control:De.control,name:"name",render:({field:ze})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"master-pool",...ze})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:De.control,name:"role",render:({field:ze})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Role"}),u.jsxs(Rn,{onValueChange:zt=>De.setValue("role",zt,{shouldDirty:!0,shouldValidate:!0}),value:ze.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"})]})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:De.formState.isSubmitting,children:De.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"Servers"}),u.jsx(At,{children:"Annotations"}),u.jsx(At,{children:"Labels"}),u.jsx(At,{children:"Taints"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[Jt.map(ze=>{const zt=Array.isArray(ze.servers)?ze.servers.length:0;return u.jsxs(an,{children:[u.jsx(xt,{className:"font-medium",children:ze.name}),u.jsx(xt,{className:"font-medium",children:ze.role}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(ze.servers||[]).slice(0,6).map(Rt=>u.jsxs(ns,{variant:"secondary",className:"gap-1",children:[u.jsx(F_,{className:"h-3 w-3"}),Rt.hostname||Rt.private_ip_address,u.jsx("span",{className:"ml-1",children:Rt.role}),Rt.status&&u.jsx("span",{className:"ml-1",children:u.jsx(L3,{status:Rt.status})})]},Rt.id)),zt===0&&u.jsx("span",{className:"text-muted-foreground",children:"No servers"}),zt>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",zt-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{I(ze);const Rt=new Set((ze.servers||[]).map(V=>V.id));G(new Set(Rt)),X(new Set(Rt)),ee(""),T(!0)},children:[u.jsx(LE,{className:"mr-2 h-4 w-4"}),"Manage Servers"]})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(ze.annotations||[]).slice(0,6).map(Rt=>u.jsxs(ns,{variant:"outline",className:"gap-1",children:[Rt.key,":",Rt.value]},Rt.id)),(ze.annotations||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No annotations"}),(ze.annotations||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(ze.annotations||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(ze),re(new Set((ze.annotations||[]).map(Rt=>Rt.id))),de(!0)},children:[u.jsx(LE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(ze.labels||[]).slice(0,6).map(Rt=>u.jsxs(ns,{variant:"secondary",className:"gap-1",children:[Rt.key,":",Rt.value]},Rt.id)),(ze.labels||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No labels"}),(ze.labels||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(ze.labels||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(ze),Ke(new Set((ze.labels||[]).map(Rt=>Rt.id))),Q(!0)},children:[u.jsx(LE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(ze.taints||[]).slice(0,6).map(Rt=>u.jsxs(ns,{variant:"outline",className:"gap-1",children:[Rt.key,":",Rt.value,Rt.effect?u.jsxs("span",{className:"ml-1",children:["(",Rt.effect,")"]}):null]},Rt.id)),(ze.taints||[]).length===0&&u.jsx("span",{className:"text-muted-foreground",children:"No taints"}),(ze.taints||[]).length>6&&u.jsxs("span",{className:"text-muted-foreground",children:["+",(ze.taints||[]).length-6," more"]}),u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>{be(ze),_e(new Set((ze.taints||[]).map(Rt=>Rt.id))),ve(!0)},children:[u.jsx(LE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),u.jsx(xt,{className:"text-right",children:u.jsxs(f$,{children:[u.jsx(m$,{asChild:!0,children:u.jsx(Fe,{size:"icon",variant:"ghost",className:"h-8 w-8",children:u.jsx(z_,{className:"h-4 w-4"})})}),u.jsxs(g$,{align:"end",children:[u.jsxs(jp,{onClick:()=>{S(ze),p(!0)},children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsxs(jp,{className:"text-red-600 focus:text-red-600",onClick:()=>{A(ze),g(!0)},children:[u.jsx(Ib,{className:"mr-2 h-4 w-4"})," Delete"]})]})]})})]},ze.id)}),Jt.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:7,className:"text-muted-foreground py-10 text-center",children:"No node pools found."})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit Node Pool"})}),u.jsx(yr,{...yt,children:u.jsxs("form",{className:"space-y-4",onSubmit:yt.handleSubmit(Ft),children:[u.jsx(pt,{control:yt.control,name:"name",render:({field:ze})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"pool-name",...ze})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:yt.control,name:"role",render:({field:ze})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Role"}),u.jsxs(Rn,{onValueChange:zt=>yt.setValue("role",zt,{shouldDirty:!0,shouldValidate:!0}),value:ze.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"})]})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{p(!1),S(null)},children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:yt.formState.isSubmitting,children:yt.formState.isSubmitting?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:m,onOpenChange:g,children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete node pool"})}),u.jsxs("p",{className:"text-muted-foreground text-sm",children:["This will permanently delete"," ",u.jsx("span",{className:"text-foreground font-medium",children:j?.name}),"."]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{g(!1),A(null)},children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>kt.mutate(),disabled:kt.isPending,children:kt.isPending?"Deleting…":"Delete"})]})]})}),u.jsx(fn,{open:k,onOpenChange:T,children:u.jsxs(mn,{className:"sm:max-w-3xl",children:[u.jsx(gn,{children:u.jsxs(yn,{children:["Manage Servers",M?` — ${M.name}`:""]})}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:L,onChange:ze=>ee(ze.target.value),placeholder:"Search by hostname, IP or role…",className:"pl-8"})]}),u.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{className:"w-[48px]"}),u.jsx(At,{children:"Hostname"}),u.jsx(At,{children:"Private IP"}),u.jsx(At,{children:"Public IP"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"Status"})]})}),u.jsxs(Bi,{children:[(Oe.data??[]).filter(ze=>{if(M?.role&&!vye(M.role,ze.role))return!1;const zt=L.trim().toLowerCase();return zt?(ze.hostname??"").toLowerCase().includes(zt)||(ze.private_ip_address??"").toLowerCase().includes(zt)||(ze.public_ip_address??"").toLowerCase().includes(zt)||(ze.role??"").toLowerCase().includes(zt):!0}).map(ze=>{const zt=ze.id,Rt=q.has(zt);return u.jsxs(an,{children:[u.jsx(xt,{className:"text-center align-middle",children:u.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:Rt,onChange:V=>{const Dn=new Set(q);V.target.checked?Dn.add(zt):Dn.delete(zt),G(Dn)}})}),u.jsx(xt,{className:"font-medium",children:ze.hostname||"—"}),u.jsx(xt,{children:ze.private_ip_address||"—"}),u.jsx(xt,{children:ze.public_ip_address||"—"}),u.jsx(xt,{className:"capitalize",children:ze.role||"—"}),u.jsx(xt,{children:u.jsx(L3,{status:ze.status})})]},zt)}),(Oe.data??[]).length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:6,className:"text-muted-foreground py-8 text-center",children:Oe.isLoading?"Loading servers…":"No servers found."})})]})]})}),u.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",u.jsx("span",{className:"text-foreground font-medium",children:q.size})]})]}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>{T(!1),I(null),G(new Set),X(new Set),ee("")},children:"Close"}),u.jsx(Fe,{onClick:async()=>{if(!M)return;const ze=M.id,zt=[],Rt=[];for(const V of q)K.has(V)||zt.push(V);for(const V of K)q.has(V)||Rt.push(V);try{zt.length>0&&await ka.attachNodePoolServer(ze,{server_ids:zt});for(const V of Rt)await ka.detachNodePoolServers(ze,V);await fe.invalidateQueries({queryKey:["node-pools"]}),await fe.invalidateQueries({queryKey:["servers"]}),Ze.success("Servers updated for node pool."),T(!1),I(null),G(new Set),X(new Set),ee("")}catch(V){Ze.error(V?.message??"Failed to update servers.")}},disabled:Oe.isLoading,children:"Save changes"})]})]})}),u.jsx(vT,{open:oe,onOpenChange:ze=>{Q(ze),ze||be(null)},title:`Manage Labels${le?` — ${le.name}`:""}`,items:(Ve.data??[]).map(ze=>({id:ze.id,key:ze.key,value:ze.value,name:`${ze.key}:${ze.value}`})),initialSelectedIds:Ce,columns:[{header:"Key",render:ze=>u.jsx("span",{className:"font-medium",children:ze.key})},{header:"Value",render:ze=>ze.value??"—"}],onSave:async({toAttach:ze,toDetach:zt})=>{if(!le)return;const Rt=le.id;try{ze.length>0&&await ka.attachNodePoolLabels(Rt,{label_ids:ze});for(const V of zt)await ka.detachNodePoolLabels(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Labels updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update labels."),V}}}),u.jsx(vT,{open:ne,onOpenChange:ze=>{de(ze),ze||be(null)},title:`Manage Annotations${le?` — ${le.name}`:""}`,items:(ke.data??[]).map(ze=>({id:ze.id,key:ze.key,value:ze.value,name:`${ze.key}:${ze.value}`})),initialSelectedIds:ce,columns:[{header:"Key",render:ze=>u.jsx("span",{className:"font-medium",children:ze.key})},{header:"Value",render:ze=>ze.value??"—"}],onSave:async({toAttach:ze,toDetach:zt})=>{if(!le)return;const Rt=le.id;try{ze.length>0&&await ka.attachNodePoolAnnotations(Rt,{annotation_ids:ze});for(const V of zt)await ka.detachNodePoolAnnotations(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Annotations updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update annotations."),V}}}),u.jsx(vT,{open:je,onOpenChange:ze=>{ve(ze),ze||be(null)},title:`Manage Taints${le?` — ${le.name}`:""}`,items:(ie.data??[]).map(ze=>({id:ze.id,key:ze.key,value:ze.value,effect:ze.effect,name:`${ze.key}:${ze.value}`})),initialSelectedIds:ue,columns:[{header:"Key",render:ze=>u.jsx("span",{className:"font-medium",children:ze.key})},{header:"Value",render:ze=>ze.value??"—"},{header:"Effect",render:ze=>ze.effect??"—"}],onSave:async({toAttach:ze,toDetach:zt})=>{if(!le)return;const Rt=le.id;try{ze.length>0&&await ka.attachNodePoolTaints(Rt,{taint_ids:ze});for(const V of zt)await ka.detachNodePoolTaints(Rt,V);await fe.invalidateQueries({queryKey:["node-pools"]}),Ze.success("Taints updated for node pool.")}catch(V){throw Ze.error(V?.message??"Failed to update taints."),V}}})]})}const uwe=Xs({name:Nn(),expires_in_hours:Xb().min(1).max(43800)}),dwe=()=>{const e=gC(),r=Hs(),s=Qo.get(),o=rr({enabled:!!s,queryKey:["org:keys",s],queryFn:()=>ut(()=>e.listOrgKeys({id:s}))}),d=mr({resolver:gr(uwe),defaultValues:{name:"",expires_in_hours:720}}),[p,m]=R.useState(null),g=nn({mutationFn:S=>e.createOrgKey({id:s,handlersOrgKeyCreateReq:S}),onSuccess:S=>{r.invalidateQueries({queryKey:["org:keys",s]}),m({key:S.org_key,secret:S.org_secret}),Ze.success("Key created"),d.reset({name:"",expires_in_hours:void 0})},onError:S=>Ze.error(S?.message??"Failed to create key")}),b=nn({mutationFn:S=>e.deleteOrgKey({id:s,keyId:S}),onSuccess:()=>{r.invalidateQueries({queryKey:["org:keys",s]}),Ze.success("Key deleted")},onError:S=>Ze.error(S?.message??"Failed to delete key")});return s?o.isLoading?u.jsx("p",{children:"Loading..."}):o.error?u.jsx("p",{className:"text-destructive",children:"Failed to load keys."}):u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Org API Keys"})}),u.jsxs(ao,{className:"space-y-6",children:[u.jsx(yr,{...d,children:u.jsxs("form",{onSubmit:d.handleSubmit(S=>g.mutate(S)),className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",children:[u.jsx("div",{className:"md:col-span-6",children:u.jsx(pt,{control:d.control,name:"name",render:({field:S})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"automation-bot",...S})}),u.jsx(dt,{})]})})}),u.jsx("div",{className:"md:col-span-4",children:u.jsx(pt,{control:d.control,name:"expires_in_hours",render:({field:S})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Expires In (hours)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"e.g. 720",...S})}),u.jsx(dt,{})]})})}),u.jsx("div",{className:"md:col-span-2",children:u.jsx(Fe,{type:"submit",className:"w-full",disabled:g.isPending,children:"Create"})})]})}),u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Scope"}),u.jsx(At,{children:"Created"}),u.jsx(At,{children:"Expires"}),u.jsx(At,{className:"w-28"})]})}),u.jsxs(Bi,{children:[o.data?.map(S=>u.jsxs(an,{children:[u.jsx(xt,{children:S.name??"-"}),u.jsx(xt,{children:S.scope}),u.jsx(xt,{children:new Date(S.created_at).toLocaleString()}),u.jsx(xt,{children:S.expires_at?new Date(S.expires_at).toLocaleString():"-"}),u.jsx(xt,{className:"text-right",children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>b.mutate(S.id),children:"Delete"})})]},S.id)),o.data?.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:5,className:"text-muted-foreground p-4",children:"No keys."})})]})]})}),u.jsx(fn,{open:!!p,onOpenChange:S=>!S&&m(null),children:u.jsxs(mn,{children:[u.jsx(gn,{children:u.jsx(yn,{children:"Copy your credentials"})}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Key"}),u.jsx(gt,{readOnly:!0,value:p?.key??"",onFocus:S=>S.currentTarget.select()})]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Secret"}),u.jsx(gt,{readOnly:!0,value:p?.secret??"",onFocus:S=>S.currentTarget.select()})]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:"This secret is shown once. Store it securely."})]}),u.jsx(Sn,{children:u.jsx(Fe,{onClick:()=>m(null),children:"Done"})})]})})]})]}):u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},hwe=Xs({user_id:S6("Invalid UUID"),role:Da(["owner","admin","member"])}),pwe=()=>{const e=gC(),r=Hs(),s=Qo.get(),[o,d]=R.useState(null),p=rr({enabled:!!s,queryKey:["org:members",s],queryFn:()=>ut(()=>e.listMembers({id:s}))}),m=R.useMemo(()=>(p.data??[]).filter(k=>k.role==="owner").length,[p.data]),g=mr({resolver:gr(hwe),defaultValues:{user_id:"",role:"member"}}),b=nn({mutationFn:k=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:k}),onSuccess:()=>{Ze.success("Member added/updated"),r.invalidateQueries({queryKey:["org:members",s]}),g.reset({user_id:"",role:"member"})},onError:k=>Ze.error(k?.message??"Failed")}),S=nn({mutationFn:k=>e.removeMember({id:s,userId:k}),onSuccess:()=>{Ze.success("Member removed"),r.invalidateQueries({queryKey:["org:members",s]})},onError:k=>Ze.error(k?.message??"Failed")}),j=nn({mutationFn:({userId:k,role:T})=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:{user_id:k,role:T}}),onMutate:async({userId:k,role:T})=>{d(k),await r.cancelQueries({queryKey:["org:members",s]});const M=r.getQueryData(["org:members",s]);return r.setQueryData(["org:members",s],(I=[])=>I.map(q=>q.user_id===k?{...q,role:T}:q)),{prev:M}},onError:(k,T,M)=>{M?.prev&&r.setQueryData(["org:members",s],M.prev),Ze.error(k?.message??"Failed to update role")},onSuccess:()=>{Ze.success("Role updated")},onSettled:()=>{d(null),r.invalidateQueries({queryKey:["org:members",s]})}}),A=k=>!(k.role==="owner"&&m<=1);return s?p.isLoading?u.jsx("p",{children:"Loading..."}):p.error?u.jsx("p",{className:"text-destructive",children:"Failed to load members."}):u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Members"})}),u.jsxs(ao,{className:"space-y-6",children:[u.jsx(yr,{...g,children:u.jsxs("form",{className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",onSubmit:g.handleSubmit(k=>b.mutate(k)),children:[u.jsx("div",{className:"md:col-span-6",children:u.jsx(pt,{control:g.control,name:"user_id",render:({field:k})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"User ID"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"UUID",...k})}),u.jsx(dt,{})]})})}),u.jsx("div",{className:"md:col-span-4",children:u.jsx(pt,{control:g.control,name:"role",render:({field:k})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Role"}),u.jsxs(Rn,{onValueChange:k.onChange,value:k.value,children:[u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"member",children:"member"}),u.jsx(jt,{value:"admin",children:"admin"}),u.jsx(jt,{value:"owner",children:"owner"})]})]}),u.jsx(dt,{})]})})}),u.jsx("div",{className:"md:col-span-2",children:u.jsx(Fe,{type:"submit",className:"w-full",disabled:b.isPending,children:"Save"})})]})}),u.jsx("div",{className:"overflow-x-auto rounded-md border",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Id"}),u.jsx(At,{children:"User"}),u.jsx(At,{children:"Role"}),u.jsx(At,{className:"w-28"})]})}),u.jsxs(Bi,{children:[p.data?.map(k=>{const T=o===k.user_id;return u.jsxs(an,{className:"align-middle",children:[u.jsx(xt,{className:"font-mono text-xs",children:k.user_id}),u.jsx(xt,{children:k.email}),u.jsx(xt,{className:"capitalize",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Rn,{value:k.role,onValueChange:M=>{if(k.role!==M){if(k.role==="owner"&&M!=="owner"&&!A(k)){Ze.error("You cannot demote the last owner.");return}j.mutate({userId:k.user_id,role:M})}},disabled:T,children:[u.jsx(_n,{className:"h-8 w-[140px]",children:u.jsx(Tn,{})}),u.jsxs($n,{children:[u.jsx(jt,{value:"member",children:"member"}),u.jsx(jt,{value:"admin",children:"admin"}),u.jsx(jt,{value:"owner",children:"owner"})]})]}),T&&u.jsx(Ds,{className:"h-4 w-4 animate-spin"})]})}),u.jsx(xt,{className:"text-right",children:u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>S.mutate(k.user_id),disabled:k.role==="owner"&&m<=1,title:k.role==="owner"&&m<=1?"Cannot remove the last owner":"",children:"Remove"})})]},k.user_id)}),p.data?.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:3,className:"text-muted-foreground p-4",children:"No members."})})]})]})})]})]}):u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},fwe=Xs({name:Nn().min(1,"Required"),domain:Nn().optional()}),mwe=()=>{const e=gC(),r=Hs(),s=Qo.get(),o=rr({enabled:!!s,queryKey:["org",s],queryFn:()=>ut(()=>e.getOrg({id:s}))}),d=mr({resolver:gr(fwe),defaultValues:{name:"",domain:""}});R.useEffect(()=>{o.data&&d.reset({name:o.data.name??"",domain:o.data.domain??""})},[o.data,d]);const p=nn({mutationFn:b=>e.updateOrg({id:s,handlersOrgUpdateReq:b}),onSuccess:()=>{r.invalidateQueries({queryKey:["org",s]}),Ze.success("Organization updated")},onError:b=>Ze.error(b?.message??"Update failed")}),m=nn({mutationFn:()=>e.deleteOrg({id:s}),onSuccess:()=>{Ze.success("Organization deleted"),Qo.set(""),r.invalidateQueries({queryKey:["orgs:mine"]})},onError:b=>Ze.error(b?.message??"Delete failed")});if(!s)return u.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."});if(o.isLoading)return u.jsx("p",{children:"Loading..."});if(o.error)return u.jsx("p",{className:"text-destructive",children:"Failed to load."});const g=b=>{const S={};b.name!==o.data?.name&&(S.name=b.name);const j=b.domain?.trim()||void 0;(j??null)!==(o.data?.domain??null)&&(S.domain=j),Object.keys(S).length!==0&&p.mutate(S)};return u.jsxs(ha,{children:[u.jsx(sl,{children:u.jsx(il,{children:"Organization Settings"})}),u.jsx(ao,{className:"space-y-6",children:u.jsx(yr,{...d,children:u.jsxs("form",{className:"space-y-4",onSubmit:d.handleSubmit(g),children:[u.jsx(pt,{control:d.control,name:"name",render:({field:b})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{...b})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:d.control,name:"domain",render:({field:b})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Domain (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"acme.com",...b})}),u.jsx(dt,{})]})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Fe,{type:"submit",disabled:p.isPending,children:"Save"}),u.jsx(Fe,{type:"button",variant:"destructive",onClick:()=>m.mutate(),disabled:m.isPending,children:"Delete Org"})]})]})})})]})},dj=Jee();function gwe(){const e=Ks.getAccessToken(),r=Qo.get();return{...e?{Authorization:`Bearer ${e}`}:{},...r?{"X-Org-ID":r}:{}}}async function xT(e,r={}){return fetch(e,{...r,headers:{...r.headers,...gwe()},credentials:"include"})}const eg={listSshKeys:()=>ut(async()=>await dj.listPublicSshKeys()),createSshKey:e=>ut(async()=>await dj.createSSHKey({dtoCreateSSHRequest:e})),getSshKeyById:e=>ut(async()=>await dj.getSSHKey({id:e})),revealSshKeyById:e=>ut(async()=>{const r=new URL(`/api/v1/ssh/${e}`,window.location.origin);r.searchParams.set("reveal","true");const s=await xT(r.toString());if(!s.ok)throw new Error(`Failed to reveal key: ${s.statusText}`);return await s.json()}),deleteSshKey:e=>ut(async()=>{await dj.deleteSSHKey({id:e})}),downloadJson:(e,r)=>ut(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r),s.searchParams.set("mode","json");const o=await xT(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);return await o.json()}),downloadBlob:(e,r)=>ut(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r);const o=await xT(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);const d=o.headers.get("Content-Disposition")||"",m=/filename="([^"]+)"/i.exec(d)?.[1]??"ssh-key-download",g=await o.blob();return{filename:m,blob:g}})},hj=43200,z3=1440,F3=Symbol.for("constructDateFrom");function y$(e,r){return typeof e=="function"?e(r):e&&typeof e=="object"&&F3 in e?e[F3](r):e instanceof Date?new e.constructor(r):new Date(r)}function Vd(e,r){return y$(e,e)}let ywe={};function vwe(){return ywe}function q3(e){const r=Vd(e),s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),+e-+s}function v$(e,...r){const s=y$.bind(null,e||r.find(o=>typeof o=="object"));return r.map(s)}function jj(e,r){const s=+Vd(e)-+Vd(r);return s<0?-1:s>0?1:s}function xwe(e){return y$(e,Date.now())}function bwe(e,r,s){const[o,d]=v$(s?.in,e,r),p=o.getFullYear()-d.getFullYear(),m=o.getMonth()-d.getMonth();return p*12+m}function wwe(e){return r=>{const o=(e?Math[e]:Math.trunc)(r);return o===0?0:o}}function Swe(e,r){return+Vd(e)-+Vd(r)}function Ewe(e,r){const s=Vd(e);return s.setHours(23,59,59,999),s}function jwe(e,r){const s=Vd(e),o=s.getMonth();return s.setFullYear(s.getFullYear(),o+1,0),s.setHours(23,59,59,999),s}function Cwe(e,r){const s=Vd(e);return+Ewe(s)==+jwe(s)}function Awe(e,r,s){const[o,d,p]=v$(s?.in,e,e,r),m=jj(d,p),g=Math.abs(bwe(d,p));if(g<1)return 0;d.getMonth()===1&&d.getDate()>27&&d.setDate(30),d.setMonth(d.getMonth()-m*g);let b=jj(d,p)===-m;Cwe(o)&&g===1&&jj(o,p)===1&&(b=!1);const S=m*(g-+b);return S===0?0:S}function Owe(e,r,s){const o=Swe(e,r)/1e3;return wwe(s?.roundingMethod)(o)}const kwe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Rwe=(e,r,s)=>{let o;const d=kwe[e];return typeof d=="string"?o=d:r===1?o=d.one:o=d.other.replace("{{count}}",r.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+o:o+" ago":o};function bT(e){return(r={})=>{const s=r.width?String(r.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const Twe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_we={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$we={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nwe={date:bT({formats:Twe,defaultWidth:"full"}),time:bT({formats:_we,defaultWidth:"full"}),dateTime:bT({formats:$we,defaultWidth:"full"})},Dwe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pwe=(e,r,s,o)=>Dwe[e];function mb(e){return(r,s)=>{const o=s?.context?String(s.context):"standalone";let d;if(o==="formatting"&&e.formattingValues){const m=e.defaultFormattingWidth||e.defaultWidth,g=s?.width?String(s.width):m;d=e.formattingValues[g]||e.formattingValues[m]}else{const m=e.defaultWidth,g=s?.width?String(s.width):e.defaultWidth;d=e.values[g]||e.values[m]}const p=e.argumentCallback?e.argumentCallback(r):r;return d[p]}}const Mwe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iwe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lwe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zwe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Fwe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qwe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Bwe=(e,r)=>{const s=Number(e),o=s%100;if(o>20||o<10)switch(o%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},Uwe={ordinalNumber:Bwe,era:mb({values:Mwe,defaultWidth:"wide"}),quarter:mb({values:Iwe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mb({values:Lwe,defaultWidth:"wide"}),day:mb({values:zwe,defaultWidth:"wide"}),dayPeriod:mb({values:Fwe,defaultWidth:"wide",formattingValues:qwe,defaultFormattingWidth:"wide"})};function gb(e){return(r,s={})=>{const o=s.width,d=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],p=r.match(d);if(!p)return null;const m=p[0],g=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],b=Array.isArray(g)?Vwe(g,A=>A.test(m)):Kwe(g,A=>A.test(m));let S;S=e.valueCallback?e.valueCallback(b):b,S=s.valueCallback?s.valueCallback(S):S;const j=r.slice(m.length);return{value:S,rest:j}}}function Kwe(e,r){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&r(e[s]))return s}function Vwe(e,r){for(let s=0;s<e.length;s++)if(r(e[s]))return s}function Hwe(e){return(r,s={})=>{const o=r.match(e.matchPattern);if(!o)return null;const d=o[0],p=r.match(e.parsePattern);if(!p)return null;let m=e.valueCallback?e.valueCallback(p[0]):p[0];m=s.valueCallback?s.valueCallback(m):m;const g=r.slice(d.length);return{value:m,rest:g}}}const Gwe=/^(\d+)(th|st|nd|rd)?/i,Xwe=/\d+/i,Ywe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Zwe={any:[/^b/i,/^(a|c)/i]},Wwe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jwe={any:[/1/i,/2/i,/3/i,/4/i]},Qwe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},e0e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},t0e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},n0e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},r0e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},s0e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i0e={ordinalNumber:Hwe({matchPattern:Gwe,parsePattern:Xwe,valueCallback:e=>parseInt(e,10)}),era:gb({matchPatterns:Ywe,defaultMatchWidth:"wide",parsePatterns:Zwe,defaultParseWidth:"any"}),quarter:gb({matchPatterns:Wwe,defaultMatchWidth:"wide",parsePatterns:Jwe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gb({matchPatterns:Qwe,defaultMatchWidth:"wide",parsePatterns:e0e,defaultParseWidth:"any"}),day:gb({matchPatterns:t0e,defaultMatchWidth:"wide",parsePatterns:n0e,defaultParseWidth:"any"}),dayPeriod:gb({matchPatterns:r0e,defaultMatchWidth:"any",parsePatterns:s0e,defaultParseWidth:"any"})},a0e={code:"en-US",formatDistance:Rwe,formatLong:Nwe,formatRelative:Pwe,localize:Uwe,match:i0e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function o0e(e,r,s){const o=vwe(),d=s?.locale??o.locale??a0e,p=2520,m=jj(e,r);if(isNaN(m))throw new RangeError("Invalid time value");const g=Object.assign({},s,{addSuffix:s?.addSuffix,comparison:m}),[b,S]=v$(s?.in,...m>0?[r,e]:[e,r]),j=Owe(S,b),A=(q3(S)-q3(b))/1e3,k=Math.round((j-A)/60);let T;if(k<2)return s?.includeSeconds?j<5?d.formatDistance("lessThanXSeconds",5,g):j<10?d.formatDistance("lessThanXSeconds",10,g):j<20?d.formatDistance("lessThanXSeconds",20,g):j<40?d.formatDistance("halfAMinute",0,g):j<60?d.formatDistance("lessThanXMinutes",1,g):d.formatDistance("xMinutes",1,g):k===0?d.formatDistance("lessThanXMinutes",1,g):d.formatDistance("xMinutes",k,g);if(k<45)return d.formatDistance("xMinutes",k,g);if(k<90)return d.formatDistance("aboutXHours",1,g);if(k<z3){const M=Math.round(k/60);return d.formatDistance("aboutXHours",M,g)}else{if(k<p)return d.formatDistance("xDays",1,g);if(k<hj){const M=Math.round(k/z3);return d.formatDistance("xDays",M,g)}else if(k<hj*2)return T=Math.round(k/hj),d.formatDistance("aboutXMonths",T,g)}if(T=Awe(S,b),T<12){const M=Math.round(k/hj);return d.formatDistance("xMonths",M,g)}else{const M=T%12,I=Math.trunc(T/12);return M<3?d.formatDistance("aboutXYears",I,g):M<9?d.formatDistance("overXYears",I,g):d.formatDistance("almostXYears",I+1,g)}}function l0e(e,r){return o0e(e,xwe(e),r)}const pB=["master","worker","bastion"],Cj=["pending","provisioning","ready","failed"],fB=Xs({hostname:Nn().trim().max(60,"Max 60 chars"),public_ip_address:Nn().trim().optional().or(Yb("")),private_ip_address:Nn().trim().min(1,"Private IP address required"),role:Da(pB),ssh_key_id:S6("Pick a valid SSH key"),ssh_user:Nn().trim().min(1,"SSH user is required"),status:Da(Cj).default("pending")}).refine(e=>e.role!=="bastion"||e.public_ip_address&&e.public_ip_address.trim()!=="",{message:"Public IP required for bastion",path:["public_ip_address"]}),c0e=fB.partial();function u0e({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return u.jsx(ns,{variant:r,className:"capitalize",children:e})}const d0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(""),[j,A]=R.useState(""),[k,T]=R.useState(null),M=Hs(),I=rr({queryKey:["servers"],queryFn:()=>hg.listServers()}),q=rr({queryKey:["ssh_keys"],queryFn:()=>eg.listSshKeys()}),G=R.useMemo(()=>{const fe=new Map;for(const He of q.data??[]){const Oe=He.name?He.name:"Unnamed key",ke=He.fingerprint?el(He.fingerprint,8):"";fe.set(He.id,ke?`${Oe} — ${ke}`:Oe)}return fe},[q.data]),K=mr({resolver:gr(fB),defaultValues:{hostname:"",private_ip_address:"",public_ip_address:"",role:"worker",ssh_key_id:"",ssh_user:"",status:"pending"},mode:"onChange"}),L=ug({control:K.control,name:"role"})==="bastion",oe=ug({control:K.control,name:"public_ip_address"})?.trim()??"",Q=L&&oe==="",ne=nn({mutationFn:fe=>hg.createServer(fe),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),K.reset(),o(!1),Ze.success("Server created successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to create server")}}),de=mr({resolver:gr(c0e),defaultValues:{},mode:"onChange"}),je=ug({control:de.control,name:"role"}),ve=ug({control:de.control,name:"public_ip_address"}),le=je==="bastion",be=ve?.trim()??"",Ce=le&&be==="",Ke=nn({mutationFn:({id:fe,values:He})=>hg.updateServer(fe,He),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),p(!1),T(null),Ze.success("Server updated successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to update server")}}),ce=nn({mutationFn:fe=>hg.deleteServer(fe),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),g(null),Ze.success("Server deleted successfully")},onError:fe=>{Ze.error(fe?.message??"Failed to delete server")}}),re=R.useMemo(()=>{const fe=I.data??[],He=e.trim().toLowerCase(),Oe=He?fe.filter(ie=>ie.hostname?.toLowerCase().includes(He)||ie.public_ip_address?.toLowerCase().includes(He)||ie.private_ip_address?.toLowerCase().includes(He)||ie.role?.toLowerCase().includes(He)||ie.ssh_user?.toLowerCase().includes(He)):fe,ke=j?Oe.filter(ie=>ie.role===j):Oe;return b?ke.filter(ie=>ie.status===b):ke},[e,j,b,I.data]),ue=fe=>{ne.mutate(fe)},_e=fe=>{T(fe.id),de.reset({hostname:fe.hostname??"",public_ip_address:fe.public_ip_address??"",private_ip_address:fe.private_ip_address??"",role:fe.role??"worker",ssh_key_id:fe.ssh_key_id??"",ssh_user:fe.ssh_user??"",status:fe.status??"pending"}),p(!0)};return q.data?.length===0?u.jsx("div",{className:"p-6",children:"Please create an SSH key for your organization first."}):I.isLoading?u.jsx("div",{className:"p-6",children:"Loading servers…"}):I.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading servers."}):u.jsxs(rw,{children:[u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Servers"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:fe=>r(fe.target.value),placeholder:"Search hostname, Public IP, Private IP, role, user…",className:"w-64 pl-8"})]}),u.jsxs(Rn,{value:j||"all",onValueChange:fe=>A(fe==="all"?"":fe),children:[u.jsx(_n,{className:"w-36",children:u.jsx(Tn,{placeholder:"Role (all)"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All roles"}),pB.map(fe=>u.jsx(jt,{value:fe,children:fe},fe))]})]}),u.jsxs(Rn,{value:b||"all",onValueChange:fe=>S(fe==="all"?"":fe),children:[u.jsx(_n,{className:"w-40",children:u.jsx(Tn,{placeholder:"Status (all)"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"all",children:"All statuses"})," ",Cj.map(fe=>u.jsx(jt,{value:fe,children:fe},fe))]})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create Server"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create server"})}),u.jsx(yr,{...K,children:u.jsxs("form",{className:"space-y-4",onSubmit:K.handleSubmit(ue),children:[u.jsx(pt,{control:K.control,name:"hostname",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Hostname"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"worker-01",...fe})}),u.jsx(dt,{})]})}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:K.control,name:"public_ip_address",render:({field:fe})=>u.jsxs(ot,{children:[u.jsxs(lt,{className:"flex items-center justify-between",children:[u.jsx("span",{children:"Public IP Address"}),u.jsx("span",{className:ft("rounded-full px-2 py-0.5 text-xs",L?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:L?"Required for bastion":"Optional"})]}),u.jsx(wt,{children:u.jsx(gt,{placeholder:L?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":L,"aria-invalid":Q||!!K.formState.errors.public_ip_address,required:L,...fe,className:ft(Q&&"border-destructive focus-visible:ring-destructive")})}),L&&u.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a"," ",u.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:K.control,name:"private_ip_address",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Private IP Address"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"192.168.10.1",...fe})}),u.jsx(dt,{})]})})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:K.control,name:"role",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Role"}),u.jsxs(Rn,{onValueChange:He=>K.setValue("role",He,{shouldDirty:!0,shouldValidate:!0}),value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"}),u.jsx(jt,{value:"bastion",children:"bastion — requires Public IP"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:K.control,name:"ssh_user",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"SSH user"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"ubuntu",...fe})}),u.jsx(dt,{})]})})]}),u.jsx(pt,{control:K.control,name:"ssh_key_id",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"SSH key"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:q.data?.length?"Select SSH key":"No SSH keys found"})})}),u.jsx($n,{children:q.data.map(He=>u.jsxs(jt,{value:He.id,children:[He.name?He.name:"Unnamed key"," —"," ",el(He.fingerprint,8)]},He.id))})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:K.control,name:"status",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Initial status"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"pending"})})}),u.jsx($n,{children:Cj.map(He=>u.jsx(jt,{value:He,children:He},He))})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:ne.isPending||K.formState.isSubmitting||!K.formState.isValid,children:ne.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Hostname"}),u.jsx(At,{children:"IP address"}),u.jsx(At,{children:"Role"}),u.jsx(At,{children:"SSH user"}),u.jsx(At,{children:"SSH key"}),u.jsx(At,{children:"Status"}),u.jsx(At,{children:"Created"}),u.jsx(At,{className:"w-[220px] text-right",children:"Actions"})]})}),u.jsx(Bi,{children:re.length===0?u.jsx(an,{children:u.jsx(xt,{colSpan:8,className:"text-muted-foreground py-10 text-center text-sm",children:"No servers found."})}):re.map(fe=>u.jsxs(an,{children:[u.jsx(xt,{className:"font-medium",children:fe.hostname}),u.jsx(xt,{children:u.jsxs("div",{className:"flex flex-col",children:[u.jsx("span",{className:ft("tabular-nums",!fe.public_ip_address&&"text-muted-foreground"),children:fe.public_ip_address||"—"}),u.jsx("span",{className:"text-muted-foreground tabular-nums",children:fe.private_ip_address})]})}),u.jsx(xt,{className:"capitalize",children:u.jsx("span",{className:ft(fe.role==="bastion"&&"rounded bg-amber-50 px-2 py-0.5 dark:bg-amber-900"),children:fe.role})}),u.jsx(xt,{className:"tabular-nums",children:fe.ssh_user}),u.jsx(xt,{className:"truncate",children:G.get(fe.ssh_key_id)??"—"}),u.jsx(xt,{children:u.jsx(u0e,{status:fe.status??"pending"})}),u.jsx(xt,{title:fe.created_at,children:fe.created_at?`${l0e(new Date(fe.created_at),{addSuffix:!0})}`:"—"}),u.jsx(xt,{className:"text-right",children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsx(Fe,{variant:"outline",size:"sm",onClick:()=>_e(fe),children:"Edit"}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(fe.id),disabled:ce.isPending&&m===fe.id,children:ce.isPending&&m===fe.id?"Deleting…":"Delete"})]})})]},fe.id))})]})})})]}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit server"})}),u.jsx(yr,{...de,children:u.jsxs("form",{className:"space-y-4",onSubmit:de.handleSubmit(fe=>{k&&Ke.mutate({id:k,values:fe})}),children:[u.jsx(pt,{control:de.control,name:"hostname",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Hostname"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"worker-01",...fe})}),u.jsx(dt,{})]})}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:de.control,name:"public_ip_address",render:({field:fe})=>u.jsxs(ot,{children:[u.jsxs(lt,{className:"flex items-center justify-between",children:[u.jsx("span",{children:"Public IP Address"}),u.jsx("span",{className:ft("rounded-full px-2 py-0.5 text-xs",le?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:le?"Required for bastion":"Optional"})]}),u.jsx(wt,{children:u.jsx(gt,{placeholder:le?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":le,"aria-invalid":Ce||!!de.formState.errors.public_ip_address,required:le,...fe,className:ft(Ce&&"border-destructive focus-visible:ring-destructive")})}),le&&u.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a ",u.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:de.control,name:"private_ip_address",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Private IP Address"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"192.168.10.1",...fe})}),u.jsx(dt,{})]})})]}),u.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[u.jsx(pt,{control:de.control,name:"role",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Role"}),u.jsxs(Rn,{onValueChange:He=>de.setValue("role",He,{shouldDirty:!0,shouldValidate:!0}),value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select role"})})}),u.jsxs($n,{children:[u.jsx(jt,{value:"master",children:"master"}),u.jsx(jt,{value:"worker",children:"worker"}),u.jsx(jt,{value:"bastion",children:"bastion — requires Public IP"})]})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:de.control,name:"ssh_user",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"SSH user"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"ubuntu",...fe})}),u.jsx(dt,{})]})})]}),u.jsx(pt,{control:de.control,name:"ssh_key_id",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"SSH key"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select SSH key"})})}),u.jsx($n,{children:q.data.map(He=>u.jsxs(jt,{value:He.id,children:[He.name?He.name:"Unnamed key"," — ",el(He.fingerprint,8)]},He.id))})]}),u.jsx(dt,{})]})}),u.jsx(pt,{control:de.control,name:"status",render:({field:fe})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Status"}),u.jsxs(Rn,{onValueChange:fe.onChange,value:fe.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"pending"})})}),u.jsx($n,{children:Cj.map(He=>u.jsx(jt,{value:He,children:He},He))})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:Ke.isPending,children:Ke.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:fe=>!fe&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete server"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this server?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&ce.mutate(m),disabled:ce.isPending,children:ce.isPending?"Deleting…":"Delete"})]})]})})]})},h0e=Xs({name:Nn().trim().min(1,"Name is required").max(100,"Max 100 characters"),comment:Nn().trim().min(1,"Comment is required").max(100,"Max 100 characters"),bits:Da(["2048","3072","4096"]).optional(),type:Da(["rsa","ed25519"]).optional()});function p0e(e,r){const s=URL.createObjectURL(e),o=document.createElement("a");o.href=s,o.download=r,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s)}function wT(e,r="Copied"){navigator.clipboard.writeText(e).then(()=>Ze.success(r)).catch(()=>Ze.error("Copy failed"))}function f0e(e){return e?.split(/\s+/)?.[0]??"ssh-key"}const m0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(null),[m,g]=R.useState(null),b=Hs(),S=rr({queryKey:["ssh"],queryFn:()=>eg.listSshKeys()}),j=mr({resolver:gr(h0e),defaultValues:{name:"",comment:"",type:"rsa",bits:"4096"}}),A=ug({control:j.control,name:"type"}),k=nn({mutationFn:async q=>{const G={name:q.name,comment:q.comment,bits:q.type==="rsa"&&q.bits?Number(q.bits):void 0,type:q.type};return await eg.createSshKey(G)},onSuccess:()=>{b.invalidateQueries({queryKey:["ssh"]}),o(!1),j.reset({name:"",comment:"",type:"rsa",bits:"4096"}),Ze.success("SSH Key created")},onError:q=>Ze.error(q?.message??"SSH Key creation failed")}),T=nn({mutationFn:q=>eg.revealSshKeyById(q),onSuccess:q=>p(q),onError:q=>Ze.error(q?.message??"Failed to reveal key")}),M=nn({mutationFn:q=>eg.deleteSshKey(q),onSuccess:async()=>{await b.invalidateQueries({queryKey:["ssh"]}),g(null),Ze.success("SSH Key deleted")},onError:q=>Ze.error(q?.message??"Delete failed")}),I=R.useMemo(()=>{const q=e.trim().toLowerCase();return q?(S.data??[]).filter(G=>G.name?.toLowerCase().includes(q)||G.fingerprint?.toLowerCase().includes(q)||G.public_key?.toLowerCase().includes(q)):S.data??[]},[e,S.data]);return S.isLoading?u.jsx("div",{className:"p-6",children:"Loading SSH Keys…"}):S.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error Loading SSH Keys"}):u.jsx(rw,{children:u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsx("h1",{className:"text-2xl font-bold",children:"SSH Keys"}),u.jsx("div",{className:"w-full max-w-sm",children:u.jsx(gt,{value:e,onChange:q=>r(q.target.value),placeholder:"Search by name, fingerprint or key"})}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"}),"Create New Keypair"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create SSH Keypair"})}),u.jsx(yr,{...j,children:u.jsxs("form",{onSubmit:j.handleSubmit(q=>k.mutate(q)),className:"space-y-4",children:[u.jsx(pt,{control:j.control,name:"name",render:({field:q})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Name"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"e.g., CI deploy key",...q})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:j.control,name:"comment",render:({field:q})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Comment"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"e.g., deploy@autoglue",...q})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:j.control,name:"type",render:({field:q})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Type"}),u.jsx(wt,{children:u.jsxs(Rn,{value:q.value,onValueChange:G=>{q.onChange(G),G==="ed25519"?j.setValue("bits",void 0):j.setValue("bits","4096")},children:[u.jsx(_n,{className:"w-[180px]",children:u.jsx(Tn,{placeholder:"Select a ssh key type"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"rsa",children:"RSA"}),u.jsx(jt,{value:"ed25519",children:"ED25519"})]})]})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:j.control,name:"bits",render:({field:q})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key size"}),u.jsx(wt,{children:u.jsxs(Rn,{value:q.value,disabled:A==="ed25519",onValueChange:q.onChange,children:[u.jsx(_n,{className:"w-[180px]",children:u.jsx(Tn,{placeholder:"RSA only"})}),u.jsxs($n,{children:[u.jsx(jt,{value:"2048",children:"2048"}),u.jsx(jt,{value:"3072",children:"3072"}),u.jsx(jt,{value:"4096",children:"4096"})]})]})}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:k.isPending,children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.isPending,children:k.isPending?u.jsxs(u.Fragment,{children:[u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create"})]})]})})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Name"}),u.jsx(At,{children:"Public Key"}),u.jsx(At,{children:"Fingerprint"}),u.jsx(At,{children:"Created"}),u.jsx(At,{className:"w-[160px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[I.map(q=>{const G=f0e(q.public_key);return u.jsxs(an,{children:[u.jsx(xt,{className:"font-medium",children:q.name||"—"}),u.jsx(xt,{children:u.jsxs(Mj,{children:[u.jsx(Ij,{asChild:!0,children:u.jsx(ns,{variant:"secondary",className:"whitespace-nowrap",children:G})}),u.jsx(Lj,{className:"max-w-[70vw]",children:u.jsx("div",{className:"max-w-full",children:u.jsx("p",{className:"font-mono text-xs break-all",children:q.public_key})})})]})}),u.jsx(xt,{className:"font-mono text-xs",children:q.fingerprint}),u.jsx(xt,{children:q.created_at?new Date(q.created_at).toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}),u.jsxs(xt,{className:"space-x-2 text-right",children:[u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>wT(q.public_key??"","Public key copied"),children:"Copy Pub"}),u.jsx(Fe,{size:"sm",variant:"outline",onClick:()=>wT(q.fingerprint??"","Fingerprint copied"),children:"Copy FP"}),u.jsxs(Fe,{size:"sm",variant:"outline",onClick:()=>T.mutate(q.id),children:[u.jsx(kT,{className:"mr-1 h-4 w-4"}),"Reveal"]}),u.jsxs(Fe,{size:"sm",variant:"outline",onClick:async()=>{try{const{filename:K,blob:X}=await eg.downloadBlob(q.id,"both");p0e(X,K)}catch(K){Ze.error(K?.message??"Download failed")}},children:[u.jsx(IZ,{className:"mr-1 h-4 w-4"}),"Download"]}),u.jsxs(Fe,{size:"sm",variant:"destructive",onClick:()=>g(q.id),children:[u.jsx(Ib,{className:"mr-1 h-4 w-4"}),"Delete"]})]})]},q.id)}),I.length===0&&u.jsx(an,{children:u.jsx(xt,{colSpan:5,className:"text-muted-foreground py-10 text-center",children:"No SSH Keys"})})]})]})})}),u.jsx(fn,{open:!!d,onOpenChange:q=>!q&&p(null),children:u.jsxs(mn,{className:"sm:max-w-2xl",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Private Key (read-only)"})}),u.jsx("div",{className:"space-y-3",children:u.jsxs("div",{className:"text-sm",children:[u.jsx("div",{className:"font-medium",children:d?.name??"SSH key"}),u.jsx("div",{className:"text-muted-foreground font-mono text-xs",children:d?.fingerprint}),u.jsx(hu,{readOnly:!0,className:"h-64 w-full rounded-md border p-3 font-mono text-xs",value:d?.private_key??""}),u.jsx("div",{className:"flex justify-end",children:u.jsx(Fe,{onClick:()=>d?.private_key&&wT(d.private_key,"Private key copied"),children:"Copy"})})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:q=>!q&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete SSH Key"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This will permanently delete the keypair. This action cannot be undone."}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&M.mutate(m),disabled:M.isPending,children:M.isPending?u.jsxs(u.Fragment,{children:[u.jsx(Ds,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting…"]}):"Delete"})]})]})})]})})},R_=["NoSchedule","PreferNoSchedule","NoExecute"],mB=Xs({key:Nn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Nn().trim().optional(),effect:Da(R_)}),g0e=mB.partial();function y0e({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}${e.effect?`:${e.effect}`:""}`;return u.jsxs(ns,{variant:"secondary",className:"font-mono text-xs",children:[u.jsx(mC,{className:"mr-1 h-3 w-3"}),r]})}const v0e=()=>{const[e,r]=R.useState(""),[s,o]=R.useState(!1),[d,p]=R.useState(!1),[m,g]=R.useState(null),[b,S]=R.useState(null),j=Hs(),A=rr({queryKey:["taints"],queryFn:()=>Rb.listTaints()}),k=mr({resolver:gr(mB),defaultValues:{key:"",value:"",effect:void 0}}),T=nn({mutationFn:L=>Rb.createTaint(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["taints"]}),k.reset(),o(!1),Ze.success("Taint Created Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while creating Taint")}}),M=L=>{T.mutate(L)},I=mr({resolver:gr(g0e),defaultValues:{}}),q=nn({mutationFn:({id:L,values:ee})=>Rb.updateTaint(L,ee),onSuccess:async()=>{await j.invalidateQueries({queryKey:["taints"]}),I.reset(),p(!1),Ze.success("Taint Updated Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while updating Taint")}}),G=L=>{S(L.id),I.reset({key:L.key,value:L.value,effect:L.effect}),p(!0)},K=nn({mutationFn:L=>Rb.deleteTaint(L),onSuccess:async()=>{await j.invalidateQueries({queryKey:["taints"]}),g(null),Ze.success("Taint Deleted Successfully.")},onError:L=>{Ze.error(L.message??"There was an error while deleting Taint")}}),X=R.useMemo(()=>{const L=A.data??[],ee=e.trim().toLowerCase();return ee?L.filter(oe=>oe.key?.toLowerCase().includes(ee)||oe.value?.toLowerCase().includes(ee)||oe.effect?.toLowerCase().includes(ee)):L},[e,A.data]);return A.isLoading?u.jsx("div",{className:"p-6",children:"Loading taints…"}):A.error?u.jsx("div",{className:"p-6 text-red-500",children:"Error loading taints."}):u.jsxs("div",{className:"space-y-4 p-6",children:[u.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[u.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Taints"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("div",{className:"relative",children:[u.jsx(Pa,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),u.jsx(gt,{value:e,onChange:L=>r(L.target.value),placeholder:"Search taints",className:"w-64 pl-8"})]}),u.jsxs(fn,{open:s,onOpenChange:o,children:[u.jsx(zi,{asChild:!0,children:u.jsxs(Fe,{onClick:()=>o(!0),children:[u.jsx(oo,{className:"mr-2 h-4 w-4"})," Create Taint"]})}),u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Create taint"})}),u.jsx(yr,{...k,children:u.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[u.jsx(pt,{control:k.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dedicated",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"gpu",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:k.control,name:"effect",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Effect"}),u.jsxs(Rn,{onValueChange:L.onChange,value:L.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select effect"})})}),u.jsx($n,{children:R_.map(ee=>u.jsx(jt,{value:ee,children:ee},ee))})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),u.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:u.jsx("div",{className:"overflow-x-auto",children:u.jsxs(Fi,{children:[u.jsx(qi,{children:u.jsxs(an,{children:[u.jsx(At,{children:"Taint"}),u.jsx(At,{className:"w-[180px] text-right",children:"Actions"})]})}),u.jsxs(Bi,{children:[X.map(L=>u.jsxs(an,{children:[u.jsx(xt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(y0e,{t:L}),u.jsx("code",{className:"text-muted-foreground text-xs",children:el(L.id,6)})]})}),u.jsx(xt,{children:u.jsxs("div",{className:"flex justify-end gap-2",children:[u.jsxs(Fe,{variant:"outline",size:"sm",onClick:()=>G(L),children:[u.jsx(pu,{className:"mr-2 h-4 w-4"})," Edit"]}),u.jsx(Fe,{variant:"destructive",size:"sm",onClick:()=>g(L.id),disabled:K.isPending&&m===L.id,children:K.isPending&&m===L.id?"Deleting…":"Delete"})]})})]},L.id)),X.length===0&&u.jsx(an,{children:u.jsxs(xt,{colSpan:3,className:"text-muted-foreground py-10 text-center",children:[u.jsx(Jb,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No taints match your search."]})})]})]})})}),u.jsx(fn,{open:d,onOpenChange:p,children:u.jsxs(mn,{className:"sm:max-w-lg",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Edit taint"})}),u.jsx(yr,{...I,children:u.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(L=>{b&&q.mutate({id:b,values:L})}),children:[u.jsx(pt,{control:I.control,name:"key",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Key"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"dedicated",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"value",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Value (optional)"}),u.jsx(wt,{children:u.jsx(gt,{placeholder:"gpu",...L})}),u.jsx(dt,{})]})}),u.jsx(pt,{control:I.control,name:"effect",render:({field:L})=>u.jsxs(ot,{children:[u.jsx(lt,{children:"Effect"}),u.jsxs(Rn,{onValueChange:L.onChange,value:L.value,children:[u.jsx(wt,{children:u.jsx(_n,{children:u.jsx(Tn,{placeholder:"Select effect"})})}),u.jsx($n,{children:R_.map(ee=>u.jsx(jt,{value:ee,children:ee},ee))})]}),u.jsx(dt,{})]})}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),u.jsx(Fe,{type:"submit",disabled:q.isPending,children:q.isPending?"Saving…":"Save changes"})]})]})})]})}),u.jsx(fn,{open:!!m,onOpenChange:L=>!L&&g(null),children:u.jsxs(mn,{className:"sm:max-w-md",children:[u.jsx(gn,{children:u.jsx(yn,{children:"Delete taint"})}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this taint?"}),u.jsxs(Sn,{className:"gap-2",children:[u.jsx(Fe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),u.jsx(Fe,{variant:"destructive",onClick:()=>m&&K.mutate(m),disabled:K.isPending,children:K.isPending?"Deleting…":"Delete"})]})]})})]})};function x0e(){return u.jsxs(gY,{children:[u.jsx(hs,{path:"/login",element:u.jsx(I3,{})}),u.jsx(hs,{path:"/docs",element:u.jsx(Fbe,{})}),u.jsx(hs,{element:u.jsx(_he,{}),children:u.jsxs(hs,{element:u.jsx(Rhe,{}),children:[u.jsx(hs,{path:"/me",element:u.jsx(awe,{})}),u.jsx(hs,{path:"/org/settings",element:u.jsx(mwe,{})}),u.jsx(hs,{path:"/org/members",element:u.jsx(pwe,{})}),u.jsx(hs,{path:"/org/api-keys",element:u.jsx(dwe,{})}),u.jsx(hs,{path:"/ssh",element:u.jsx(m0e,{})}),u.jsx(hs,{path:"/servers",element:u.jsx(d0e,{})}),u.jsx(hs,{path:"/taints",element:u.jsx(v0e,{})}),u.jsx(hs,{path:"/labels",element:u.jsx(Ybe,{})}),u.jsx(hs,{path:"/annotations",element:u.jsx(yye,{})}),u.jsx(hs,{path:"/node-pools",element:u.jsx(cwe,{})}),u.jsx(hs,{path:"/credentials",element:u.jsx(_be,{})}),u.jsx(hs,{path:"/dns",element:u.jsx(Lbe,{})}),u.jsx(hs,{path:"/load-balancers",element:u.jsx(Jbe,{})}),u.jsx(hs,{path:"/clusters",element:u.jsx(yve,{})}),u.jsx(hs,{path:"/admin/jobs",element:u.jsx(Kbe,{})})]})}),u.jsx(hs,{path:"*",element:u.jsx(I3,{})})]})}fJ.createRoot(document.getElementById("root")).render(u.jsx(R.StrictMode,{children:u.jsx(yY,{children:u.jsx(cJ,{children:u.jsx(x0e,{})})})}));
|
||
//# sourceMappingURL=index-CyGsiYei.js.map
|